From a585d961453bcc016534fb10cc88381d00e28c30 Mon Sep 17 00:00:00 2001 From: Abstra Bot Date: Tue, 22 Aug 2023 00:24:26 +0000 Subject: [PATCH] Update abstra-lib --- abstra_server/api/__init__.py | 7 +- ...ue_type_script_setup_true_lang.5682728a.js | 2 + ...ue_type_script_setup_true_lang.cdfb7200.js | 2 - .../dist/assets/ApiKeys.2e963cde.js | 2 - .../dist/assets/ApiKeys.5ce6c5c7.js | 2 + .../dist/assets/BackButton.1cd8c02a.js | 2 - .../dist/assets/BackButton.6790f37d.js | 2 - .../dist/assets/BackButton.6e480dd1.js | 2 + .../dist/assets/BackButton.fb83d4bd.js | 2 + abstra_statics/dist/assets/Builds.5fd3279d.js | 4 - abstra_statics/dist/assets/Builds.dbfd5324.js | 4 + .../dist/assets/CircularLoading.0fb686c0.js | 2 + .../dist/assets/CircularLoading.5630a601.js | 2 - ...3a62ef9.js => ConnectorEditor.7b329188.js} | 4 +- ...ors.a8ae7e7e.js => Connectors.f3069a96.js} | 4 +- ...dView.bd13f7e1.js => CrudView.7ced9145.js} | 4 +- ...tor.84c221ab.js => DashEditor.d2eeb2dd.js} | 4 +- ...yer.6a8897dd.js => DashPlayer.2457a054.js} | 4 +- .../dist/assets/DashPreview.3bf93e31.js | 2 + .../dist/assets/DashPreview.a29719ea.js | 2 - abstra_statics/dist/assets/Dashes.8a9fc0d5.js | 2 + abstra_statics/dist/assets/Dashes.d14ad66a.js | 2 - .../dist/assets/DocsButton.b174b81b.js | 2 - .../dist/assets/DocsButton.f9b71025.js | 2 + ...u.162e22a4.js => DropdownMenu.8f7fc9d3.js} | 4 +- ...nvVars.bb060638.js => EnvVars.38d91162.js} | 4 +- .../{Error.11930ed4.js => Error.d0c3932f.js} | 4 +- ...tor.bc98641f.js => FormEditor.f707e99b.js} | 4 +- .../dist/assets/FormPreview.203b2e5a.js | 2 + .../dist/assets/FormPreview.32564b37.js | 2 - .../{Forms.bc146527.js => Forms.b27f8e52.js} | 4 +- abstra_statics/dist/assets/Home.3eaff566.js | 2 + abstra_statics/dist/assets/Home.6d7eef5e.js | 2 - ...tor.446d4a64.js => HookEditor.58a2f578.js} | 4 +- abstra_statics/dist/assets/Hooks.c2164fb8.js | 2 + abstra_statics/dist/assets/Hooks.d41656c0.js | 2 - ...itor.b0e3148a.js => JobEditor.2e1f22b7.js} | 4 +- .../{Jobs.626e2a1c.js => Jobs.a895bf8c.js} | 4 +- .../dist/assets/LoadingIndicator.10cfcfe7.js | 2 + .../dist/assets/LoadingIndicator.a271d3bb.js | 2 - abstra_statics/dist/assets/Login.04e589a7.js | 2 + abstra_statics/dist/assets/Login.7b25d743.js | 2 - .../{Logs.9b4c6324.js => Logs.6a1222af.js} | 6 +- .../dist/assets/Members.79c4954a.js | 2 - .../dist/assets/Members.f5d95bd4.js | 2 + abstra_statics/dist/assets/Modal.2f8d0c91.js | 2 - abstra_statics/dist/assets/Modal.73e976a2.js | 2 + ...{Navbar.41c99d51.js => Navbar.dbea5082.js} | 4 +- .../dist/assets/Organization.8d378a9c.js | 2 + .../dist/assets/Organization.bebd813e.js | 2 - .../assets/OrganizationSettings.0d13a7d8.js | 2 - .../assets/OrganizationSettings.46e64732.js | 2 + ....cd10673b.js => Organizations.86d96323.js} | 4 +- ...s.65114c07.js => Passwordless.ac83d40c.js} | 4 +- abstra_statics/dist/assets/Player.0779238b.js | 2 + abstra_statics/dist/assets/Player.daf19edf.js | 2 - ...r.e3146994.js => PlayerNavbar.2a5ed820.js} | 4 +- .../dist/assets/PreviewButton.4d9be351.js | 2 + .../dist/assets/PreviewButton.fc12f428.js | 2 - ...roject.9a23c33c.js => Project.03df7c29.js} | 4 +- ...fb2e75f.js => ProjectSettings.007fec14.js} | 4 +- ...jects.ad9a8254.js => Projects.51ccea2f.js} | 4 +- ...st.1bf51451.js => RuntimeList.097a29c4.js} | 4 +- .../dist/assets/SaveButton.c0a67dea.js | 2 + .../dist/assets/SaveButton.e379ab16.js | 2 - .../dist/assets/Sidebar.8babb822.js | 2 + .../dist/assets/Sidebar.e123944a.js | 2 - ....689be76e.js => SidebarEditor.6edb80a9.js} | 4 +- ...dacadfbc.js => SidebarPreview.e7347f81.js} | 4 +- ...or.c9fef8ca.js => StyleEditor.ec27cc19.js} | 4 +- abstra_statics/dist/assets/Tab.1de0ecf6.js | 2 + abstra_statics/dist/assets/Tab.55e05bca.js | 2 - ...or.cf8a13f0.js => TableEditor.440cab96.js} | 4 +- abstra_statics/dist/assets/Tables.3387e003.js | 2 - abstra_statics/dist/assets/Tables.e6b943f2.js | 2 + ...ooltip.8c336607.js => Tooltip.1f768a3e.js} | 4 +- ...e_type_script_setup_true_lang.ad1532da.js} | 4 +- ....c18ef298.js => WidgetPreview.6ebb6ff1.js} | 4 +- .../dist/assets/WidgetsFrame.2b06573d.js | 2 + .../dist/assets/WidgetsFrame.8af89817.js | 2 - ...pace.cceaede0.js => Workspace.4a9a4e8f.js} | 6 +- .../dist/assets/activeRecord.11b7d185.js | 2 - .../dist/assets/activeRecord.3d3c7835.js | 2 + .../dist/assets/asyncComputed.3cb2e10b.js | 2 - .../dist/assets/asyncComputed.8ac91a75.js | 2 + ...{broker.a62f2378.js => broker.67106cf5.js} | 6 +- abstra_statics/dist/assets/build.5096fbe2.js | 2 - abstra_statics/dist/assets/build.ac459472.js | 2 + ...{colors.4425ff79.js => colors.bc71fdf2.js} | 4 +- ...ctor.d9ae500d.js => connector.8528d309.js} | 4 +- .../dist/assets/console.138f0d87.js | 2 + .../dist/assets/console.470f1cee.js | 2 - ...ssMode.84f7d84d.js => cssMode.a07fb68f.js} | 4 +- ...{dashes.9f1aca90.js => dashes.f8616397.js} | 4 +- abstra_statics/dist/assets/editor.16e28ae9.js | 2 + abstra_statics/dist/assets/editor.b03c2e3e.js | 2 - ...in.71e27b19.js => editor.main.1c8cebfc.js} | 98 +++++++++---------- ...teJs.c3858a9c.js => executeJs.dfd1b55f.js} | 4 +- .../{forms.38d7da0a.js => forms.59430d62.js} | 4 +- ...r2.da17bfda.js => freemarker2.5ac535cb.js} | 4 +- .../dist/assets/gateway.0deebb85.js | 2 + .../dist/assets/gateway.fa3322de.js | 2 - ...ars.8f21526b.js => handlebars.6e3dd22e.js} | 4 +- .../{hooks.d7d78397.js => hooks.6e1e253e.js} | 4 +- .../{html.a026c447.js => html.7cbc54d4.js} | 4 +- ...lMode.bf1c4c91.js => htmlMode.141d1da7.js} | 4 +- .../{icons.11151937.js => icons.9cfdae6d.js} | 4 +- .../{index.a2df0371.js => index.d40cd19f.js} | 4 +- .../{index.a86d8064.js => index.dae46ea1.js} | 4 +- ...ipt.f90e66cb.js => javascript.ad911371.js} | 6 +- .../{jobs.2ad85710.js => jobs.310261dd.js} | 4 +- ...nMode.9952188c.js => jsonMode.8ce8b65f.js} | 4 +- ...{liquid.022aa170.js => liquid.f7b7c7fe.js} | 4 +- .../{login.bbc5e7c0.js => login.6c1df514.js} | 4 +- ...{lottie.9d24e472.js => lottie.fc57e5ac.js} | 4 +- ...{member.f1e6c466.js => member.f4131337.js} | 4 +- .../dist/assets/organization.007992e9.js | 2 - .../dist/assets/organization.682269f4.js | 2 + ...ba0.js => passwordlessManager.884221ca.js} | 4 +- abstra_statics/dist/assets/player.8ca40ee1.js | 2 + abstra_statics/dist/assets/player.a18b536b.js | 2 - .../dist/assets/project.a27ed749.js | 2 + .../dist/assets/project.f2b2a33c.js | 2 - ...{pubsub.581c075e.js => pubsub.d7600aa1.js} | 4 +- ...{python.1cd2abe3.js => python.3eb11cc2.js} | 6 +- .../{razor.a734f30f.js => razor.5b8183f8.js} | 6 +- ...a6243ef.js => registerWidgets.89616af0.js} | 10 +- ...ata.170ae941.js => runnerData.bd24d7de.js} | 4 +- ...{tables.94b40ff0.js => tables.b83ad23f.js} | 4 +- ...{tsMode.f7255e05.js => tsMode.2890ed03.js} | 4 +- ...ipt.8aa88c16.js => typescript.ac0b7aa1.js} | 6 +- abstra_statics/dist/assets/uuid.d6201508.js | 2 + abstra_statics/dist/assets/uuid.f763745d.js | 2 - ...8.js => vue-quill.esm-bundler.9116f2eb.js} | 4 +- ...ces.25055240.js => workspaces.621b79ad.js} | 4 +- .../{xml.9eb7a6fc.js => xml.d83bcfca.js} | 6 +- .../{yaml.a0e81576.js => yaml.8e5d7e4f.js} | 6 +- abstra_statics/dist/console.html | 10 +- abstra_statics/dist/editor.html | 6 +- abstra_statics/dist/player.html | 4 +- 140 files changed, 275 insertions(+), 278 deletions(-) create mode 100644 abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js delete mode 100644 abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js delete mode 100644 abstra_statics/dist/assets/ApiKeys.2e963cde.js create mode 100644 abstra_statics/dist/assets/ApiKeys.5ce6c5c7.js delete mode 100644 abstra_statics/dist/assets/BackButton.1cd8c02a.js delete mode 100644 abstra_statics/dist/assets/BackButton.6790f37d.js create mode 100644 abstra_statics/dist/assets/BackButton.6e480dd1.js create mode 100644 abstra_statics/dist/assets/BackButton.fb83d4bd.js delete mode 100644 abstra_statics/dist/assets/Builds.5fd3279d.js create mode 100644 abstra_statics/dist/assets/Builds.dbfd5324.js create mode 100644 abstra_statics/dist/assets/CircularLoading.0fb686c0.js delete mode 100644 abstra_statics/dist/assets/CircularLoading.5630a601.js rename abstra_statics/dist/assets/{ConnectorEditor.c3a62ef9.js => ConnectorEditor.7b329188.js} (91%) rename abstra_statics/dist/assets/{Connectors.a8ae7e7e.js => Connectors.f3069a96.js} (53%) rename abstra_statics/dist/assets/{CrudView.bd13f7e1.js => CrudView.7ced9145.js} (56%) rename abstra_statics/dist/assets/{DashEditor.84c221ab.js => DashEditor.d2eeb2dd.js} (98%) rename abstra_statics/dist/assets/{DashPlayer.6a8897dd.js => DashPlayer.2457a054.js} (82%) create mode 100644 abstra_statics/dist/assets/DashPreview.3bf93e31.js delete mode 100644 abstra_statics/dist/assets/DashPreview.a29719ea.js create mode 100644 abstra_statics/dist/assets/Dashes.8a9fc0d5.js delete mode 100644 abstra_statics/dist/assets/Dashes.d14ad66a.js delete mode 100644 abstra_statics/dist/assets/DocsButton.b174b81b.js create mode 100644 abstra_statics/dist/assets/DocsButton.f9b71025.js rename abstra_statics/dist/assets/{DropdownMenu.162e22a4.js => DropdownMenu.8f7fc9d3.js} (70%) rename abstra_statics/dist/assets/{EnvVars.bb060638.js => EnvVars.38d91162.js} (52%) rename abstra_statics/dist/assets/{Error.11930ed4.js => Error.d0c3932f.js} (50%) rename abstra_statics/dist/assets/{FormEditor.bc98641f.js => FormEditor.f707e99b.js} (62%) create mode 100644 abstra_statics/dist/assets/FormPreview.203b2e5a.js delete mode 100644 abstra_statics/dist/assets/FormPreview.32564b37.js rename abstra_statics/dist/assets/{Forms.bc146527.js => Forms.b27f8e52.js} (52%) create mode 100644 abstra_statics/dist/assets/Home.3eaff566.js delete mode 100644 abstra_statics/dist/assets/Home.6d7eef5e.js rename abstra_statics/dist/assets/{HookEditor.446d4a64.js => HookEditor.58a2f578.js} (52%) create mode 100644 abstra_statics/dist/assets/Hooks.c2164fb8.js delete mode 100644 abstra_statics/dist/assets/Hooks.d41656c0.js rename abstra_statics/dist/assets/{JobEditor.b0e3148a.js => JobEditor.2e1f22b7.js} (80%) rename abstra_statics/dist/assets/{Jobs.626e2a1c.js => Jobs.a895bf8c.js} (69%) create mode 100644 abstra_statics/dist/assets/LoadingIndicator.10cfcfe7.js delete mode 100644 abstra_statics/dist/assets/LoadingIndicator.a271d3bb.js create mode 100644 abstra_statics/dist/assets/Login.04e589a7.js delete mode 100644 abstra_statics/dist/assets/Login.7b25d743.js rename abstra_statics/dist/assets/{Logs.9b4c6324.js => Logs.6a1222af.js} (92%) delete mode 100644 abstra_statics/dist/assets/Members.79c4954a.js create mode 100644 abstra_statics/dist/assets/Members.f5d95bd4.js delete mode 100644 abstra_statics/dist/assets/Modal.2f8d0c91.js create mode 100644 abstra_statics/dist/assets/Modal.73e976a2.js rename abstra_statics/dist/assets/{Navbar.41c99d51.js => Navbar.dbea5082.js} (52%) create mode 100644 abstra_statics/dist/assets/Organization.8d378a9c.js delete mode 100644 abstra_statics/dist/assets/Organization.bebd813e.js delete mode 100644 abstra_statics/dist/assets/OrganizationSettings.0d13a7d8.js create mode 100644 abstra_statics/dist/assets/OrganizationSettings.46e64732.js rename abstra_statics/dist/assets/{Organizations.cd10673b.js => Organizations.86d96323.js} (68%) rename abstra_statics/dist/assets/{Passwordless.65114c07.js => Passwordless.ac83d40c.js} (88%) create mode 100644 abstra_statics/dist/assets/Player.0779238b.js delete mode 100644 abstra_statics/dist/assets/Player.daf19edf.js rename abstra_statics/dist/assets/{PlayerNavbar.e3146994.js => PlayerNavbar.2a5ed820.js} (75%) create mode 100644 abstra_statics/dist/assets/PreviewButton.4d9be351.js delete mode 100644 abstra_statics/dist/assets/PreviewButton.fc12f428.js rename abstra_statics/dist/assets/{Project.9a23c33c.js => Project.03df7c29.js} (55%) rename abstra_statics/dist/assets/{ProjectSettings.9fb2e75f.js => ProjectSettings.007fec14.js} (82%) rename abstra_statics/dist/assets/{Projects.ad9a8254.js => Projects.51ccea2f.js} (65%) rename abstra_statics/dist/assets/{RuntimeList.1bf51451.js => RuntimeList.097a29c4.js} (66%) create mode 100644 abstra_statics/dist/assets/SaveButton.c0a67dea.js delete mode 100644 abstra_statics/dist/assets/SaveButton.e379ab16.js create mode 100644 abstra_statics/dist/assets/Sidebar.8babb822.js delete mode 100644 abstra_statics/dist/assets/Sidebar.e123944a.js rename abstra_statics/dist/assets/{SidebarEditor.689be76e.js => SidebarEditor.6edb80a9.js} (99%) rename abstra_statics/dist/assets/{SidebarPreview.dacadfbc.js => SidebarPreview.e7347f81.js} (75%) rename abstra_statics/dist/assets/{StyleEditor.c9fef8ca.js => StyleEditor.ec27cc19.js} (98%) create mode 100644 abstra_statics/dist/assets/Tab.1de0ecf6.js delete mode 100644 abstra_statics/dist/assets/Tab.55e05bca.js rename abstra_statics/dist/assets/{TableEditor.cf8a13f0.js => TableEditor.440cab96.js} (66%) delete mode 100644 abstra_statics/dist/assets/Tables.3387e003.js create mode 100644 abstra_statics/dist/assets/Tables.e6b943f2.js rename abstra_statics/dist/assets/{Tooltip.8c336607.js => Tooltip.1f768a3e.js} (56%) rename abstra_statics/dist/assets/{UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js => UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js} (92%) rename abstra_statics/dist/assets/{WidgetPreview.c18ef298.js => WidgetPreview.6ebb6ff1.js} (69%) create mode 100644 abstra_statics/dist/assets/WidgetsFrame.2b06573d.js delete mode 100644 abstra_statics/dist/assets/WidgetsFrame.8af89817.js rename abstra_statics/dist/assets/{Workspace.cceaede0.js => Workspace.4a9a4e8f.js} (70%) delete mode 100644 abstra_statics/dist/assets/activeRecord.11b7d185.js create mode 100644 abstra_statics/dist/assets/activeRecord.3d3c7835.js delete mode 100644 abstra_statics/dist/assets/asyncComputed.3cb2e10b.js create mode 100644 abstra_statics/dist/assets/asyncComputed.8ac91a75.js rename abstra_statics/dist/assets/{broker.a62f2378.js => broker.67106cf5.js} (83%) delete mode 100644 abstra_statics/dist/assets/build.5096fbe2.js create mode 100644 abstra_statics/dist/assets/build.ac459472.js rename abstra_statics/dist/assets/{colors.4425ff79.js => colors.bc71fdf2.js} (94%) rename abstra_statics/dist/assets/{connector.d9ae500d.js => connector.8528d309.js} (60%) create mode 100644 abstra_statics/dist/assets/console.138f0d87.js delete mode 100644 abstra_statics/dist/assets/console.470f1cee.js rename abstra_statics/dist/assets/{cssMode.84f7d84d.js => cssMode.a07fb68f.js} (99%) rename abstra_statics/dist/assets/{dashes.9f1aca90.js => dashes.f8616397.js} (90%) create mode 100644 abstra_statics/dist/assets/editor.16e28ae9.js delete mode 100644 abstra_statics/dist/assets/editor.b03c2e3e.js rename abstra_statics/dist/assets/{editor.main.71e27b19.js => editor.main.1c8cebfc.js} (99%) rename abstra_statics/dist/assets/{executeJs.c3858a9c.js => executeJs.dfd1b55f.js} (94%) rename abstra_statics/dist/assets/{forms.38d7da0a.js => forms.59430d62.js} (91%) rename abstra_statics/dist/assets/{freemarker2.da17bfda.js => freemarker2.5ac535cb.js} (98%) create mode 100644 abstra_statics/dist/assets/gateway.0deebb85.js delete mode 100644 abstra_statics/dist/assets/gateway.fa3322de.js rename abstra_statics/dist/assets/{handlebars.8f21526b.js => handlebars.6e3dd22e.js} (95%) rename abstra_statics/dist/assets/{hooks.d7d78397.js => hooks.6e1e253e.js} (82%) rename abstra_statics/dist/assets/{html.a026c447.js => html.7cbc54d4.js} (94%) rename abstra_statics/dist/assets/{htmlMode.bf1c4c91.js => htmlMode.141d1da7.js} (99%) rename abstra_statics/dist/assets/{icons.11151937.js => icons.9cfdae6d.js} (97%) rename abstra_statics/dist/assets/{index.a2df0371.js => index.d40cd19f.js} (97%) rename abstra_statics/dist/assets/{index.a86d8064.js => index.dae46ea1.js} (76%) rename abstra_statics/dist/assets/{javascript.f90e66cb.js => javascript.ad911371.js} (64%) rename abstra_statics/dist/assets/{jobs.2ad85710.js => jobs.310261dd.js} (61%) rename abstra_statics/dist/assets/{jsonMode.9952188c.js => jsonMode.8ce8b65f.js} (99%) rename abstra_statics/dist/assets/{liquid.022aa170.js => liquid.f7b7c7fe.js} (93%) rename abstra_statics/dist/assets/{login.bbc5e7c0.js => login.6c1df514.js} (71%) rename abstra_statics/dist/assets/{lottie.9d24e472.js => lottie.fc57e5ac.js} (99%) rename abstra_statics/dist/assets/{member.f1e6c466.js => member.f4131337.js} (71%) delete mode 100644 abstra_statics/dist/assets/organization.007992e9.js create mode 100644 abstra_statics/dist/assets/organization.682269f4.js rename abstra_statics/dist/assets/{passwordlessManager.0ab78ba0.js => passwordlessManager.884221ca.js} (83%) create mode 100644 abstra_statics/dist/assets/player.8ca40ee1.js delete mode 100644 abstra_statics/dist/assets/player.a18b536b.js create mode 100644 abstra_statics/dist/assets/project.a27ed749.js delete mode 100644 abstra_statics/dist/assets/project.f2b2a33c.js rename abstra_statics/dist/assets/{pubsub.581c075e.js => pubsub.d7600aa1.js} (66%) rename abstra_statics/dist/assets/{python.1cd2abe3.js => python.3eb11cc2.js} (89%) rename abstra_statics/dist/assets/{razor.a734f30f.js => razor.5b8183f8.js} (94%) rename abstra_statics/dist/assets/{registerWidgets.ca6243ef.js => registerWidgets.89616af0.js} (99%) rename abstra_statics/dist/assets/{runnerData.170ae941.js => runnerData.bd24d7de.js} (99%) rename abstra_statics/dist/assets/{tables.94b40ff0.js => tables.b83ad23f.js} (92%) rename abstra_statics/dist/assets/{tsMode.f7255e05.js => tsMode.2890ed03.js} (98%) rename abstra_statics/dist/assets/{typescript.8aa88c16.js => typescript.ac0b7aa1.js} (92%) create mode 100644 abstra_statics/dist/assets/uuid.d6201508.js delete mode 100644 abstra_statics/dist/assets/uuid.f763745d.js rename abstra_statics/dist/assets/{vue-quill.esm-bundler.f4c20868.js => vue-quill.esm-bundler.9116f2eb.js} (99%) rename abstra_statics/dist/assets/{workspaces.25055240.js => workspaces.621b79ad.js} (88%) rename abstra_statics/dist/assets/{xml.9eb7a6fc.js => xml.d83bcfca.js} (82%) rename abstra_statics/dist/assets/{yaml.a0e81576.js => yaml.8e5d7e4f.js} (90%) diff --git a/abstra_server/api/__init__.py b/abstra_server/api/__init__.py index d6b0129ebd..7c59a53800 100644 --- a/abstra_server/api/__init__.py +++ b/abstra_server/api/__init__.py @@ -47,11 +47,8 @@ def persist(self, abstra_json: classes.AbstraJSON): temp_file = Path(tempfile.mkdtemp()) / "abstra.json" with temp_file.open("w") as f: - try: - json.dump(abstra_json.__dict__, f, indent=2) - temp_file.rename(self.abstra_json_path) - except IOError: - print("Error writing to abstra.json") + json.dump(abstra_json.__dict__, f, indent=2) + temp_file.replace(self.abstra_json_path) def __get_abstra_json(self) -> classes.AbstraJSON: abstra_json_content = json.loads( diff --git a/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js b/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js new file mode 100644 index 0000000000..9e7a42e5b1 --- /dev/null +++ b/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js @@ -0,0 +1,2 @@ +import{d as r,r as i,o as l,a5 as u,b as c,c as b,N as f,af as y}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="13633866-a7d8-4431-9716-299dbbbbcd22",e._sentryDebugIdIdentifier="sentry-dbid-13633866-a7d8-4431-9716-299dbbbbcd22")}catch{}})();const g=r({__name:"ActionButton",props:{action:null},emits:["next"],setup(e,{emit:n}){const o=e,s=i(null);l(()=>{s.value&&o.action.setElement(s.value),u.addAction(o.action)});const a=()=>n("next");return(m,t)=>(c(),b("button",{ref_key:"element",ref:s,class:"next-button",onClick:t[0]||(t[0]=d=>a()),onKeydown:t[1]||(t[1]=y(d=>a(),["enter"]))},f(e.action.name),545))}});export{g as _}; +//# sourceMappingURL=ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js.map diff --git a/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js b/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js deleted file mode 100644 index 6aa69d0890..0000000000 --- a/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d,r as i,o as c,a5 as l,b as f,c as u,N as b,af as y}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0e60554c-aab6-4ac0-b2c0-f7d96a8a9bd3",e._sentryDebugIdIdentifier="sentry-dbid-0e60554c-aab6-4ac0-b2c0-f7d96a8a9bd3")}catch{}})();const g=d({__name:"ActionButton",props:{action:null},emits:["next"],setup(e,{emit:n}){const o=e,a=i(null);c(()=>{a.value&&o.action.setElement(a.value),l.addAction(o.action)});const s=()=>n("next");return(m,t)=>(f(),u("button",{ref_key:"element",ref:a,class:"next-button",onClick:t[0]||(t[0]=r=>s()),onKeydown:t[1]||(t[1]=y(r=>s(),["enter"]))},b(e.action.name),545))}});export{g as _}; -//# sourceMappingURL=ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js.map diff --git a/abstra_statics/dist/assets/ApiKeys.2e963cde.js b/abstra_statics/dist/assets/ApiKeys.2e963cde.js deleted file mode 100644 index 2fddf10512..0000000000 --- a/abstra_statics/dist/assets/ApiKeys.2e963cde.js +++ /dev/null @@ -1,2 +0,0 @@ -var P=Object.defineProperty;var k=(a,e,t)=>e in a?P(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var h=(a,e,t)=>(k(a,typeof e!="symbol"?e+"":e,t),t);import{d as C,r as w,b,t as D,w as x,U as I,x as l,N as S,O as j,Q as M,q as N,K as $,c as B,e as A,z as v,F as K,J as z}from"./registerWidgets.ca6243ef.js";import{a as E}from"./asyncComputed.3cb2e10b.js";import{P as V}from"./project.f2b2a33c.js";import{C as g}from"./gateway.fa3322de.js";import{M as F}from"./member.f1e6c466.js";import{A as O}from"./activeRecord.11b7d185.js";import"./index.a86d8064.js";import{C as U}from"./CrudView.bd13f7e1.js";import{M as W}from"./Modal.2f8d0c91.js";import{r as Y}from"./icons.11151937.js";import{f as q}from"./index.b048d0fb.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./DropdownMenu.162e22a4.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="1a92d9f6-d640-4ccd-af5a-295462d96319",a._sentryDebugIdIdentifier="sentry-dbid-1a92d9f6-d640-4ccd-af5a-295462d96319")}catch{}})();class G{constructor(){h(this,"urlPath","api-keys")}async create({projectId:e,name:t}){return g.post(`projects/${e}/${this.urlPath}`,{name:t})}async delete(e,t){await g.delete(`projects/${e}/${this.urlPath}/${t}`)}async list(e){return g.get(`projects/${e}/${this.urlPath}`)}async get(){throw new Error("Not implemented")}async update(){throw new Error("Not implemented")}}const u=new G;class c{constructor(e){h(this,"record");this.record=O.create(u,e,"id")}static async list(e){return(await u.list(e)).map(n=>new c(n))}static async create(e){const t=await u.create(e);return new c(t)}static async delete(e,t){await u.delete(e,t)}get id(){return this.record.get("id")}get name(){return this.record.get("name")}async save(){await this.record.save()}get createdAt(){return new Date(this.record.get("createdAt"))}hasChanges(){return this.record.hasChanges()}get ownerId(){return this.record.get("createdBy")}get value(){var e;return(e=this.record.get("value"))!=null?e:null}}const H=a=>(j("data-v-3da8363c"),a=a(),M(),a),J={class:"main-text"},Q=H(()=>l("div",{class:"separator"},null,-1)),T=["value"],L=C({__name:"ApiKeyModal",emits:["delete"],setup(a,{expose:e}){const t=w(null),n=w(""),m={maxWidth:"350px",height:"unset",padding:"30px"},y={display:"flex",flexDirection:"column",alignItems:"center",color:"#414A58",justifyContent:"center",lineHeight:"22px",fontSize:"18px",textAlign:"center",borderBottom:"none",gap:"23px",fontWeight:"700",marginBottom:"17px"},d={color:"#6D7C93",fontSize:"14px",textAlign:"center",justifyContent:"space-around"},f=o=>{var s;n.value=o,(s=t==null?void 0:t.value)==null||s.open()},p=()=>{var o;return(o=t==null?void 0:t.value)==null?void 0:o.close()};return e({open:f,close:p}),(o,s)=>(b(),D(W,{ref_key:"modalRef",ref:t,"container-style":m,"header-style":y,"content-style":d},{header:x(()=>[I(" API Key Created ")]),content:x(()=>[l("div",J,[I(S("Your API key has been created. Please copy it and store it in a safe place. You will not be able to see it again.")+" ",1),Q,l("input",{disabled:"",value:n.value},null,8,T),l("div",{class:"buttons"},[l("button",{class:"cancel",onClick:p},"Close")])])]),_:1},512))}});const R=N(L,[["__scopeId","data-v-3da8363c"]]),fe=C({__name:"ApiKeys",setup(a){const e=[{key:"name",label:"API key name"}],n=z().params.projectId,{loading:m,result:y,refetch:d}=E(async()=>Promise.all([c.list(n),V.get(n).then(o=>F.list(o.organizationId))]).then(([o,s])=>o.map(r=>({apiKey:r,member:s.find(i=>i.authorId===r.ownerId)})))),f=async o=>{const s=await c.create({projectId:n,name:o.name});d(),s.value&&prompt("Copy this API key and paste it in the local editor to deploy your app:",s==null?void 0:s.value)},p=$(()=>{var o,s;return{columns:[{name:"Name"},{name:"Creation date"},{name:"Owner"},{name:"Actions"}],rows:(s=(o=y.value)==null?void 0:o.map(({apiKey:r,member:i})=>{var _;return{key:r.id,cells:[{text:r.name,classes:["title","centered"]},{text:q(r.createdAt,Date.now(),{addSuffix:!0}),classes:[]},{text:(_=i==null?void 0:i.email)!=null?_:"Unknown"},{classes:["centered"],text:"actions",actions:[{label:"Delete",icon:Y,dangerous:!0,onClick:async()=>{await c.delete(n,r.id),d()}}]}]}}))!=null?s:[]}});return(o,s)=>(b(),B(K,null,[A(U,{"entity-name":"API key","create-button-text":"Create API Key",loading:v(m),title:"API Keys",description:"API Keys are used to deploy your app from the local editor.","empty-title":"No API keys here yet",table:v(p),fields:e,onCreate:f},null,8,["loading","table"]),A(R)],64))}});export{fe as default}; -//# sourceMappingURL=ApiKeys.2e963cde.js.map diff --git a/abstra_statics/dist/assets/ApiKeys.5ce6c5c7.js b/abstra_statics/dist/assets/ApiKeys.5ce6c5c7.js new file mode 100644 index 0000000000..15cab6b08f --- /dev/null +++ b/abstra_statics/dist/assets/ApiKeys.5ce6c5c7.js @@ -0,0 +1,2 @@ +var P=Object.defineProperty;var k=(a,e,t)=>e in a?P(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var h=(a,e,t)=>(k(a,typeof e!="symbol"?e+"":e,t),t);import{d as v,r as w,b as C,t as D,w as x,U as I,x as l,N as S,O as j,Q as M,q as N,K as $,c as B,e as b,z as A,F as K,J as z}from"./registerWidgets.89616af0.js";import{a as E}from"./asyncComputed.8ac91a75.js";import{P as V}from"./project.a27ed749.js";import{C as g}from"./gateway.0deebb85.js";import{M as F}from"./member.f4131337.js";import{A as O}from"./activeRecord.3d3c7835.js";import"./index.dae46ea1.js";import{C as U}from"./CrudView.7ced9145.js";import{M as W}from"./Modal.73e976a2.js";import{r as Y}from"./icons.9cfdae6d.js";import{f as q}from"./index.b048d0fb.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./DropdownMenu.8f7fc9d3.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="c04b871e-a145-4aef-af2c-06cb43603587",a._sentryDebugIdIdentifier="sentry-dbid-c04b871e-a145-4aef-af2c-06cb43603587")}catch{}})();class G{constructor(){h(this,"urlPath","api-keys")}async create({projectId:e,name:t}){return g.post(`projects/${e}/${this.urlPath}`,{name:t})}async delete(e,t){await g.delete(`projects/${e}/${this.urlPath}/${t}`)}async list(e){return g.get(`projects/${e}/${this.urlPath}`)}async get(){throw new Error("Not implemented")}async update(){throw new Error("Not implemented")}}const u=new G;class c{constructor(e){h(this,"record");this.record=O.create(u,e,"id")}static async list(e){return(await u.list(e)).map(n=>new c(n))}static async create(e){const t=await u.create(e);return new c(t)}static async delete(e,t){await u.delete(e,t)}get id(){return this.record.get("id")}get name(){return this.record.get("name")}async save(){await this.record.save()}get createdAt(){return new Date(this.record.get("createdAt"))}hasChanges(){return this.record.hasChanges()}get ownerId(){return this.record.get("createdBy")}get value(){var e;return(e=this.record.get("value"))!=null?e:null}}const H=a=>(j("data-v-3da8363c"),a=a(),M(),a),J={class:"main-text"},Q=H(()=>l("div",{class:"separator"},null,-1)),T=["value"],L=v({__name:"ApiKeyModal",emits:["delete"],setup(a,{expose:e}){const t=w(null),n=w(""),m={maxWidth:"350px",height:"unset",padding:"30px"},y={display:"flex",flexDirection:"column",alignItems:"center",color:"#414A58",justifyContent:"center",lineHeight:"22px",fontSize:"18px",textAlign:"center",borderBottom:"none",gap:"23px",fontWeight:"700",marginBottom:"17px"},d={color:"#6D7C93",fontSize:"14px",textAlign:"center",justifyContent:"space-around"},f=o=>{var s;n.value=o,(s=t==null?void 0:t.value)==null||s.open()},p=()=>{var o;return(o=t==null?void 0:t.value)==null?void 0:o.close()};return e({open:f,close:p}),(o,s)=>(C(),D(W,{ref_key:"modalRef",ref:t,"container-style":m,"header-style":y,"content-style":d},{header:x(()=>[I(" API Key Created ")]),content:x(()=>[l("div",J,[I(S("Your API key has been created. Please copy it and store it in a safe place. You will not be able to see it again.")+" ",1),Q,l("input",{disabled:"",value:n.value},null,8,T),l("div",{class:"buttons"},[l("button",{class:"cancel",onClick:p},"Close")])])]),_:1},512))}});const R=N(L,[["__scopeId","data-v-3da8363c"]]),fe=v({__name:"ApiKeys",setup(a){const e=[{key:"name",label:"API key name"}],n=z().params.projectId,{loading:m,result:y,refetch:d}=E(async()=>Promise.all([c.list(n),V.get(n).then(o=>F.list(o.organizationId))]).then(([o,s])=>o.map(r=>({apiKey:r,member:s.find(i=>i.authorId===r.ownerId)})))),f=async o=>{const s=await c.create({projectId:n,name:o.name});d(),s.value&&prompt("Copy this API key and paste it in the local editor to deploy your app:",s==null?void 0:s.value)},p=$(()=>{var o,s;return{columns:[{name:"Name"},{name:"Creation date"},{name:"Owner"},{name:"Actions"}],rows:(s=(o=y.value)==null?void 0:o.map(({apiKey:r,member:i})=>{var _;return{key:r.id,cells:[{text:r.name,classes:["title","centered"]},{text:q(r.createdAt,Date.now(),{addSuffix:!0}),classes:[]},{text:(_=i==null?void 0:i.email)!=null?_:"Unknown"},{classes:["centered"],text:"actions",actions:[{label:"Delete",icon:Y,dangerous:!0,onClick:async()=>{await c.delete(n,r.id),d()}}]}]}}))!=null?s:[]}});return(o,s)=>(C(),B(K,null,[b(U,{"entity-name":"API key","create-button-text":"Create API Key",loading:A(m),title:"API Keys",description:"API Keys are used to deploy your app from the local editor.","empty-title":"No API keys here yet",table:A(p),fields:e,onCreate:f},null,8,["loading","table"]),b(R)],64))}});export{fe as default}; +//# sourceMappingURL=ApiKeys.5ce6c5c7.js.map diff --git a/abstra_statics/dist/assets/BackButton.1cd8c02a.js b/abstra_statics/dist/assets/BackButton.1cd8c02a.js deleted file mode 100644 index dce2a9f619..0000000000 --- a/abstra_statics/dist/assets/BackButton.1cd8c02a.js +++ /dev/null @@ -1,2 +0,0 @@ -import{v as c}from"./icons.11151937.js";import{d as a,a as r,b as i,c as d,e as _,z as l,U as u,q as b}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="566ecd4b-8054-4110-804c-8c106eb4b3c2",e._sentryDebugIdIdentifier="sentry-dbid-566ecd4b-8054-4110-804c-8c106eb4b3c2")}catch{}})();const p=a({__name:"BackButton",emits:["exitFullscreenPreview"],setup(e,{emit:t}){return(o,n)=>{const s=r("icon");return i(),d("button",{class:"back-btn",onClick:n[0]||(n[0]=f=>t("exitFullscreenPreview"))},[_(s,{class:"icon",path:l(c),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),u(" Editor ")])}}});const v=b(p,[["__scopeId","data-v-eaeb3a6e"]]);export{v as B}; -//# sourceMappingURL=BackButton.1cd8c02a.js.map diff --git a/abstra_statics/dist/assets/BackButton.6790f37d.js b/abstra_statics/dist/assets/BackButton.6790f37d.js deleted file mode 100644 index f4f075996b..0000000000 --- a/abstra_statics/dist/assets/BackButton.6790f37d.js +++ /dev/null @@ -1,2 +0,0 @@ -import{q as n,b as o,c as a,x as d,d as r,a as _,t as i,w as l,e as u,U as f}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9240d19b-4d10-4b66-9ca2-cad390349871",e._sentryDebugIdIdentifier="sentry-dbid-9240d19b-4d10-4b66-9ca2-cad390349871")}catch{}})();const p={},w={width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b=d("path",{d:"M2.8725 4.25L5.5575 1.5575L4.5 0.5L0 5L4.5 9.5L5.5575 8.4425L2.8725 5.75H12V4.25H2.8725Z",fill:"#6D7C93"},null,-1),k=[b];function B(e,t){return o(),a("svg",w,k)}const h=n(p,[["render",B]]),g=r({__name:"BackButton",props:{link:null},setup(e){return(t,s)=>{const c=_("router-link");return o(),i(c,{class:"link-button",to:e.link},{default:l(()=>[u(h),f(" Back ")]),_:1},8,["to"])}}});const m=n(g,[["__scopeId","data-v-56a12edc"]]);export{m as B}; -//# sourceMappingURL=BackButton.6790f37d.js.map diff --git a/abstra_statics/dist/assets/BackButton.6e480dd1.js b/abstra_statics/dist/assets/BackButton.6e480dd1.js new file mode 100644 index 0000000000..8bd259a5da --- /dev/null +++ b/abstra_statics/dist/assets/BackButton.6e480dd1.js @@ -0,0 +1,2 @@ +import{q as n,b as o,c as a,x as r,d as _,a as d,t as i,w as l,e as f,U as u}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fd15bc0a-036c-41a1-a9e0-3bb053c74fd7",e._sentryDebugIdIdentifier="sentry-dbid-fd15bc0a-036c-41a1-a9e0-3bb053c74fd7")}catch{}})();const p={},b={width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w=r("path",{d:"M2.8725 4.25L5.5575 1.5575L4.5 0.5L0 5L4.5 9.5L5.5575 8.4425L2.8725 5.75H12V4.25H2.8725Z",fill:"#6D7C93"},null,-1),k=[w];function B(e,t){return o(),a("svg",b,k)}const h=n(p,[["render",B]]),g=_({__name:"BackButton",props:{link:null},setup(e){return(t,s)=>{const c=d("router-link");return o(),i(c,{class:"link-button",to:e.link},{default:l(()=>[f(h),u(" Back ")]),_:1},8,["to"])}}});const m=n(g,[["__scopeId","data-v-56a12edc"]]);export{m as B}; +//# sourceMappingURL=BackButton.6e480dd1.js.map diff --git a/abstra_statics/dist/assets/BackButton.fb83d4bd.js b/abstra_statics/dist/assets/BackButton.fb83d4bd.js new file mode 100644 index 0000000000..84abb1c771 --- /dev/null +++ b/abstra_statics/dist/assets/BackButton.fb83d4bd.js @@ -0,0 +1,2 @@ +import{v as a}from"./icons.9cfdae6d.js";import{d as r,a as c,b as d,c as i,e as _,z as f,U as l,q as u}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6befc756-5373-412d-943f-a14fd125812e",e._sentryDebugIdIdentifier="sentry-dbid-6befc756-5373-412d-943f-a14fd125812e")}catch{}})();const p=r({__name:"BackButton",emits:["exitFullscreenPreview"],setup(e,{emit:t}){return(o,n)=>{const s=c("icon");return d(),i("button",{class:"back-btn",onClick:n[0]||(n[0]=b=>t("exitFullscreenPreview"))},[_(s,{class:"icon",path:f(a),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),l(" Editor ")])}}});const v=u(p,[["__scopeId","data-v-eaeb3a6e"]]);export{v as B}; +//# sourceMappingURL=BackButton.fb83d4bd.js.map diff --git a/abstra_statics/dist/assets/Builds.5fd3279d.js b/abstra_statics/dist/assets/Builds.5fd3279d.js deleted file mode 100644 index 67d18e55ba..0000000000 --- a/abstra_statics/dist/assets/Builds.5fd3279d.js +++ /dev/null @@ -1,4 +0,0 @@ -import{d as u,K as m,b as f,t as _,w as y,z as i,J as b,O as g,Q as w,x as n,U as d,q as h}from"./registerWidgets.ca6243ef.js";import{a as x}from"./asyncComputed.3cb2e10b.js";import"./gateway.fa3322de.js";import{B as I}from"./build.5096fbe2.js";import"./index.a86d8064.js";import{C as v}from"./CrudView.bd13f7e1.js";import{K as B,M as D}from"./icons.11151937.js";import{r as C}from"./console.470f1cee.js";import{f as k}from"./index.b048d0fb.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";import"./DropdownMenu.162e22a4.js";import"./Modal.2f8d0c91.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";import"./index.a2df0371.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="fd3ce9a1-0ecf-43b4-8299-459208ece23f",e._sentryDebugIdIdentifier="sentry-dbid-fd3ce9a1-0ecf-43b4-8299-459208ece23f")}catch{}})();const S=e=>(g("data-v-e61ab2b9"),e=e(),w(),e),V=S(()=>n("div",{class:"instructions"},[d(" Get started with the local editor in seconds: "),n("pre",null,` $ pip install abstra --upgrade - $ abstra serve ./your-project-directory - `),d(" And you're done! Explore the local editor and start building apps. ")],-1)),j=u({__name:"Builds",setup(e){const s=b().params.projectId,{loading:c,result:l}=x(()=>I.list(s)),p=m(()=>{var a,r;return{columns:[{name:"Id"},{name:"Date"},{name:"Status"},{name:"Actions"}],rows:(r=(a=l.value)==null?void 0:a.map(t=>({key:t.id,cells:[{text:t.id.slice(0,8),classes:["centered"]},{text:k(t.createdAt,Date.now(),{addSuffix:!0}),classes:[]},{text:t.status+(t.log?": "+t.log:""),classes:[]},{text:"",classes:["centered"],actions:[{icon:B,label:"View logs",onClick:()=>C.push({name:"logs",params:{projectId:s},query:{buildId:t.id}})},{icon:D,label:"Download files",onClick:()=>t.download()}]}]})))!=null?r:[]}});return(a,r)=>(f(),_(v,{"entity-name":"build",loading:i(c),title:"Builds",description:"Each build is a version of your app. You can create a new build by deploying your app from the local editor.","empty-title":"No builds here yet",table:i(p)},{"empty-description":y(()=>[V]),_:1},8,["loading","table"]))}});const H=h(j,[["__scopeId","data-v-e61ab2b9"]]);export{H as default}; -//# sourceMappingURL=Builds.5fd3279d.js.map diff --git a/abstra_statics/dist/assets/Builds.dbfd5324.js b/abstra_statics/dist/assets/Builds.dbfd5324.js new file mode 100644 index 0000000000..7900e3d453 --- /dev/null +++ b/abstra_statics/dist/assets/Builds.dbfd5324.js @@ -0,0 +1,4 @@ +import{d as u,K as m,b as f,t as b,w as _,z as i,J as y,O as g,Q as w,x as n,U as d,q as h}from"./registerWidgets.89616af0.js";import{a as x}from"./asyncComputed.8ac91a75.js";import"./gateway.0deebb85.js";import{B as I}from"./build.ac459472.js";import"./index.dae46ea1.js";import{C as v}from"./CrudView.7ced9145.js";import{K as B,M as D}from"./icons.9cfdae6d.js";import{r as C}from"./console.138f0d87.js";import{f as k}from"./index.b048d0fb.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";import"./DropdownMenu.8f7fc9d3.js";import"./Modal.73e976a2.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";import"./index.d40cd19f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="7f9e32e9-6996-4bec-8eac-b524cb2f3eb7",e._sentryDebugIdIdentifier="sentry-dbid-7f9e32e9-6996-4bec-8eac-b524cb2f3eb7")}catch{}})();const S=e=>(g("data-v-e61ab2b9"),e=e(),w(),e),V=S(()=>n("div",{class:"instructions"},[d(" Get started with the local editor in seconds: "),n("pre",null,` $ pip install abstra --upgrade + $ abstra serve ./your-project-directory + `),d(" And you're done! Explore the local editor and start building apps. ")],-1)),j=u({__name:"Builds",setup(e){const s=y().params.projectId,{loading:c,result:l}=x(()=>I.list(s)),p=m(()=>{var a,r;return{columns:[{name:"Id"},{name:"Date"},{name:"Status"},{name:"Actions"}],rows:(r=(a=l.value)==null?void 0:a.map(t=>({key:t.id,cells:[{text:t.id.slice(0,8),classes:["centered"]},{text:k(t.createdAt,Date.now(),{addSuffix:!0}),classes:[]},{text:t.status+(t.log?": "+t.log:""),classes:[]},{text:"",classes:["centered"],actions:[{icon:B,label:"View logs",onClick:()=>C.push({name:"logs",params:{projectId:s},query:{buildId:t.id}})},{icon:D,label:"Download files",onClick:()=>t.download()}]}]})))!=null?r:[]}});return(a,r)=>(f(),b(v,{"entity-name":"build",loading:i(c),title:"Builds",description:"Each build is a version of your app. You can create a new build by deploying your app from the local editor.","empty-title":"No builds here yet",table:i(p)},{"empty-description":_(()=>[V]),_:1},8,["loading","table"]))}});const H=h(j,[["__scopeId","data-v-e61ab2b9"]]);export{H as default}; +//# sourceMappingURL=Builds.dbfd5324.js.map diff --git a/abstra_statics/dist/assets/CircularLoading.0fb686c0.js b/abstra_statics/dist/assets/CircularLoading.0fb686c0.js new file mode 100644 index 0000000000..d355156b50 --- /dev/null +++ b/abstra_statics/dist/assets/CircularLoading.0fb686c0.js @@ -0,0 +1,2 @@ +import{L as c}from"./lottie.fc57e5ac.js";import{d as u,r as f,o as p,K as a,b as _,c as y,x as g,A as s,z as d,B as b,q as m}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d8de0889-d0a6-4465-81fb-ffc77488ea32",e._sentryDebugIdIdentifier="sentry-dbid-d8de0889-d0a6-4465-81fb-ffc77488ea32")}catch{}})();const v=u({__name:"CircularLoading",props:{direction:null,justify:null,size:null},setup(e){const t=e,o=f(null);p(()=>{!o.value||c.loadAnimation({container:o.value,renderer:"svg",loop:!0,autoplay:!0,path:"/circularLoading.json"})});const i=a(()=>{const{direction:n="row",justify:r="space-between"}=t;return{flexDirection:n,justifyContent:r}}),l=a(()=>{const{size:n="40"}=t;return{width:`${n}px`,height:`${n}px`}});return(n,r)=>(_(),y("div",{class:"container",style:s(d(i))},[g("div",{ref_key:"loading",ref:o,style:s(d(l))},null,4),b(n.$slots,"default",{},void 0,!0)],4))}});const I=m(v,[["__scopeId","data-v-a1f994d4"]]);export{I as L}; +//# sourceMappingURL=CircularLoading.0fb686c0.js.map diff --git a/abstra_statics/dist/assets/CircularLoading.5630a601.js b/abstra_statics/dist/assets/CircularLoading.5630a601.js deleted file mode 100644 index 36f6546e19..0000000000 --- a/abstra_statics/dist/assets/CircularLoading.5630a601.js +++ /dev/null @@ -1,2 +0,0 @@ -import{L as f}from"./lottie.9d24e472.js";import{d as c,r as u,o as p,K as a,b as _,c as y,x as g,A as s,z as i,B as b,q as m}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5006e63f-8f32-4ea1-8b5f-691d4746ffdf",e._sentryDebugIdIdentifier="sentry-dbid-5006e63f-8f32-4ea1-8b5f-691d4746ffdf")}catch{}})();const v=c({__name:"CircularLoading",props:{direction:null,justify:null,size:null},setup(e){const t=e,o=u(null);p(()=>{!o.value||f.loadAnimation({container:o.value,renderer:"svg",loop:!0,autoplay:!0,path:"/circularLoading.json"})});const d=a(()=>{const{direction:n="row",justify:r="space-between"}=t;return{flexDirection:n,justifyContent:r}}),l=a(()=>{const{size:n="40"}=t;return{width:`${n}px`,height:`${n}px`}});return(n,r)=>(_(),y("div",{class:"container",style:s(i(d))},[g("div",{ref_key:"loading",ref:o,style:s(i(l))},null,4),b(n.$slots,"default",{},void 0,!0)],4))}});const I=m(v,[["__scopeId","data-v-a1f994d4"]]);export{I as L}; -//# sourceMappingURL=CircularLoading.5630a601.js.map diff --git a/abstra_statics/dist/assets/ConnectorEditor.c3a62ef9.js b/abstra_statics/dist/assets/ConnectorEditor.7b329188.js similarity index 91% rename from abstra_statics/dist/assets/ConnectorEditor.c3a62ef9.js rename to abstra_statics/dist/assets/ConnectorEditor.7b329188.js index 8e76811190..f1b5a390e2 100644 --- a/abstra_statics/dist/assets/ConnectorEditor.c3a62ef9.js +++ b/abstra_statics/dist/assets/ConnectorEditor.7b329188.js @@ -1,2 +1,2 @@ -import{d as v,v as T,ab as N,o as O,W as q,ac as P,b as t,c as s,B as M,q as C,F as $,L as k,x as d,N as I,e as y,K as S,D as m,t as w,am as E,z as _,a8 as L,y as U,aa as V,a as G,G as z,U as F,w as x,J,X as Q,O as W,Q as X}from"./registerWidgets.ca6243ef.js";import{b as j}from"./index.a86d8064.js";import"./gateway.fa3322de.js";import{C as H}from"./connector.d9ae500d.js";import{a as Y}from"./asyncComputed.3cb2e10b.js";import{B as Z}from"./BackButton.6790f37d.js";import{S as K}from"./SaveButton.e379ab16.js";import{L as ee}from"./CircularLoading.5630a601.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";import"./icons.11151937.js";import"./lottie.9d24e472.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="e6c087fe-d081-426a-94bb-6dc3d2eec622",e._sentryDebugIdIdentifier="sentry-dbid-e6c087fe-d081-426a-94bb-6dc3d2eec622")}catch{}})();const te={class:"tab"},se=v({__name:"Tab",props:{title:null,icon:null},setup(e){const o=e,u=T({isActive:!1,title:o.title,icon:o.icon}),n=N("addTab");return O(()=>{n(u)}),(l,a)=>q((t(),s("div",te,[M(l.$slots,"default",{},void 0,!0)],512)),[[P,u.isActive]])}});const D=C(se,[["__scopeId","data-v-497e4e8e"]]),ne=["value"],ae=v({__name:"TextInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ne))}}),oe=["value"],ce=v({__name:"NumberInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,type:"number",onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,oe))}}),le=["value"],ue=v({__name:"BooleanInput",props:{value:{type:Boolean},schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,type:"checkbox",onChange:n[0]||(n[0]=l=>o("change",l.target.checked))},null,40,le))}}),re={class:"oi"},ie={class:"oi-item-label"},de=v({__name:"ObjectInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){var g;const u=e,n=T({value:(g=u.value)!=null?g:{}}),l=(h,c)=>{n.value[h]=c,a()},a=()=>{o("change",n.value)};return(h,c)=>(t(),s("div",re,[(t(!0),s($,null,k(u.schema.values,(b,i)=>(t(),s("div",{key:i,class:"oi-item"},[d("div",ie,I(i),1),y(B,{class:"oi-item-input",schema:b,value:n.value[i],onChange:f=>l(i,f)},null,8,["schema","value","onChange"])]))),128))]))}});const _e=C(de,[["__scopeId","data-v-bd751ecc"]]),he={class:"ai"},me=["onClick"],pe=v({__name:"ArrayInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){var c;const n=T({value:(c=e.value)!=null?c:[]}),l=()=>{n.value.push(void 0)},a=b=>{n.value.splice(b,1),h()},g=(b,i)=>{n.value[b]=i,h()},h=()=>{o("change",n.value)};return(b,i)=>(t(),s("div",he,[(t(!0),s($,null,k(n.value,(f,r)=>(t(),s("div",{key:r,class:"ai-item"},[y(B,{schema:e.schema.items,value:f,onChange:p=>g(r,p)},null,8,["schema","value","onChange"]),d("button",{class:"ai-item-remove",onClick:p=>a(r)},"x",8,me)]))),128)),d("button",{class:"ai-item-add",onClick:i[0]||(i[0]=f=>l())},"Add")]))}});const ve=C(pe,[["__scopeId","data-v-a6c8b9fb"]]),ge=["value"],be=["value"],fe=v({__name:"OptionsInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("select",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},[(t(!0),s($,null,k(e.schema.values,l=>(t(),s("option",{key:l,value:l},I(l),9,be))),128))],40,ge))}}),ye=["value"],$e=v({__name:"UnionInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ye))}}),ke=["value"],Ie=v({__name:"AnyInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ke))}}),Ce={string:ae,number:ce,boolean:ue,object:_e,array:ve,options:fe,any:Ie,union:$e},xe={class:"gi"},Se={key:0,class:"gi-header"},Te={key:0,class:"gi-label"},Me={key:1,class:"gi-tags"},we={key:0,class:"gi-required"},Be={key:1,class:"gi-required"},Ae={key:1,class:"gi-description"},Re=v({__name:"GenericInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){const u=e,n=S(()=>({component:Ce[u.schema.type],props:{value:u.value,schema:u.schema}}));return(l,a)=>(t(),s("div",xe,["label"in e.schema?(t(),s("div",Se,["label"in e.schema?(t(),s("label",Te,I(e.schema.label),1)):m("",!0),"required"in e.schema||"secret"in e.schema?(t(),s("div",Me,["required"in e.schema&&e.schema.required?(t(),s("span",we,"[Required]")):m("",!0),"secret"in e.schema&&e.schema.secret?(t(),s("span",Be,"[Secret]")):m("",!0)])):m("",!0)])):m("",!0),"description"in e.schema?(t(),s("div",Ae,I(e.schema.description),1)):m("",!0),(t(),w(L(_(n).component),E({class:"gi-input"},_(n).props,{onChange:a[0]||(a[0]=g=>o("change",g))}),null,16))]))}});const B=C(Re,[["__scopeId","data-v-dd33d764"]]),je={class:"tab-menu"},De={class:"tabs"},Oe={key:0,class:"group"},qe={class:"group"},Ne=["onClick"],Pe={key:1,class:"group"},Ee={class:"content"},Le=v({__name:"TabMenuUnderline",setup(e){const o=T([]),u=U(),n=a=>{const g=h=>h==a;o.forEach((h,c)=>{h.isActive=g(c)})},l=S(()=>o.findIndex(a=>a.isActive));return V("addTab",a=>{o.push(a)}),O(()=>{n(0)}),(a,g)=>{const h=G("icon");return t(),s("div",je,[d("div",De,[_(u).left?(t(),s("div",Oe,[M(a.$slots,"left",{},void 0,!0)])):m("",!0),d("div",qe,[(t(!0),s($,null,k(o,(c,b)=>(t(),s("button",{key:c.title,class:z(["form-tab",_(l)==b&&"active"]),onClick:i=>n(b)},[c.icon?(t(),w(h,{key:0,path:c.icon,fill:"#8692A5",width:"10",height:"10"},null,8,["path"])):m("",!0),F(" "+I(c.title),1)],10,Ne))),128))]),_(u).right?(t(),s("div",Pe,[M(a.$slots,"right",{},void 0,!0)])):m("",!0)]),d("div",Ee,[M(a.$slots,"default",{},void 0,!0)])])}}});const Ue=C(Le,[["__scopeId","data-v-f2e43fa2"]]),A=e=>(W("data-v-63dce332"),e=e(),X(),e),Ve={class:"page settings"},Ge={class:"page test"},ze={class:"test-method-selector"},Fe=A(()=>d("label",{class:"test-method-selector-label"},"Method",-1)),Je=A(()=>d("option",{value:null,disabled:"",selected:"",hidden:""},"Select a method",-1)),Qe=["value"],We={key:0,class:"test-method-parameters"},Xe=A(()=>d("label",{class:"test-method-parameters-label"},"Params",-1)),He={key:1,class:"test-method-response"},Ye=A(()=>d("label",{class:"test-method-response-label"},"Response",-1)),Ze={key:0,class:"test-method-response-errors"},Ke={key:1,class:"test-method-response-returns"},et={class:"test-method-response-returns-value"},tt=v({__name:"ConnectorEditor",setup(e){const o=S(()=>{var i;return`/projects/${(i=a.value)==null?void 0:i.projectId}/connectors`}),n=J().params.connectorId,{loading:l,result:a}=Y(()=>H.get(n)),g=S(()=>{var i;return(i=a.value)!=null&&i.schema.methods?Object.keys(a.value.schema.methods).reduce((f,r)=>{const p=a.value.schema.methods[r];return[...f,{key:r,...p}]},[]):[]}),h=S(()=>!a.value||!(a.value.type in j.schema)?null:j.schema[a.value.type]),c=T({testMethod:null,testParams:{},testResponse:null}),b=async()=>{!a.value||!c.testMethod||!c.testParams||(c.testResponse=await a.value.test(c.testMethod,c.testParams))};return(i,f)=>_(l)||!_(a)||!_(h)?(t(),w(ee,{key:0})):(t(),w(Ue,{key:1,class:"connector-editor"},{left:x(()=>[y(Z,{link:_(o)},null,8,["link"])]),right:x(()=>[y(K,{model:_(a)},null,8,["model"])]),default:x(()=>[y(D,{title:"Settings"},{default:x(()=>[d("div",Ve,[(t(!0),s($,null,k(_(h).settings,(r,p)=>(t(),s("div",{key:p},[y(B,{schema:r,value:_(a).settings[p],onChange:R=>_(a).settings[p]=R},null,8,["schema","value","onChange"])]))),128))])]),_:1}),y(D,{title:"Test"},{default:x(()=>[d("div",Ge,[d("div",ze,[Fe,q(d("select",{"onUpdate:modelValue":f[0]||(f[0]=r=>c.testMethod=r),class:"test-method-selector-selector"},[Je,(t(!0),s($,null,k(_(g),r=>(t(),s("option",{key:r.key,value:r.key},I(r.label),9,Qe))),128))],512),[[Q,c.testMethod]])]),c.testMethod?(t(),s("div",We,[Xe,(t(!0),s($,null,k(_(a).schema.methods[c.testMethod].params,(r,p)=>(t(),s("div",{key:p,class:"test-field"},[y(B,{schema:r,value:c.testParams[p],onChange:R=>c.testParams[p]=R},null,8,["schema","value","onChange"])]))),128)),d("button",{class:"test-method-run",onClick:f[1]||(f[1]=r=>b())},"Test")])):m("",!0),c.testResponse?(t(),s("div",He,[Ye,c.testResponse.errors.length>0?(t(),s("div",Ze,[(t(!0),s($,null,k(c.testResponse.errors,r=>(t(),s("div",{key:r},I(r),1))),128))])):m("",!0),c.testResponse.returns&&Object.keys(c.testResponse.returns).length>0?(t(),s("div",Ke,[d("span",et,[d("pre",null,I(JSON.stringify(c.testResponse.returns,null,2)),1)])])):m("",!0)])):m("",!0)])]),_:1})]),_:1}))}});const pt=C(tt,[["__scopeId","data-v-63dce332"]]);export{pt as default}; -//# sourceMappingURL=ConnectorEditor.c3a62ef9.js.map +import{d as v,v as T,ab as N,o as O,W as q,ac as P,b as t,c as s,B as M,q as C,F as $,L as k,x as d,N as I,e as y,K as S,D as m,t as w,am as E,z as _,a8 as L,y as U,aa as V,a as G,G as z,U as F,w as x,J,X as Q,O as W,Q as X}from"./registerWidgets.89616af0.js";import{b as j}from"./index.dae46ea1.js";import"./gateway.0deebb85.js";import{C as H}from"./connector.8528d309.js";import{a as Y}from"./asyncComputed.8ac91a75.js";import{B as Z}from"./BackButton.6e480dd1.js";import{S as K}from"./SaveButton.c0a67dea.js";import{L as ee}from"./CircularLoading.0fb686c0.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";import"./icons.9cfdae6d.js";import"./lottie.fc57e5ac.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2a45d265-5c05-4708-9fc0-7dbc9a4c6d03",e._sentryDebugIdIdentifier="sentry-dbid-2a45d265-5c05-4708-9fc0-7dbc9a4c6d03")}catch{}})();const te={class:"tab"},se=v({__name:"Tab",props:{title:null,icon:null},setup(e){const o=e,u=T({isActive:!1,title:o.title,icon:o.icon}),n=N("addTab");return O(()=>{n(u)}),(l,a)=>q((t(),s("div",te,[M(l.$slots,"default",{},void 0,!0)],512)),[[P,u.isActive]])}});const D=C(se,[["__scopeId","data-v-497e4e8e"]]),ne=["value"],ae=v({__name:"TextInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ne))}}),oe=["value"],ce=v({__name:"NumberInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,type:"number",onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,oe))}}),le=["value"],ue=v({__name:"BooleanInput",props:{value:{type:Boolean},schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,type:"checkbox",onChange:n[0]||(n[0]=l=>o("change",l.target.checked))},null,40,le))}}),re={class:"oi"},ie={class:"oi-item-label"},de=v({__name:"ObjectInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){var g;const u=e,n=T({value:(g=u.value)!=null?g:{}}),l=(h,c)=>{n.value[h]=c,a()},a=()=>{o("change",n.value)};return(h,c)=>(t(),s("div",re,[(t(!0),s($,null,k(u.schema.values,(b,i)=>(t(),s("div",{key:i,class:"oi-item"},[d("div",ie,I(i),1),y(B,{class:"oi-item-input",schema:b,value:n.value[i],onChange:f=>l(i,f)},null,8,["schema","value","onChange"])]))),128))]))}});const _e=C(de,[["__scopeId","data-v-bd751ecc"]]),he={class:"ai"},me=["onClick"],pe=v({__name:"ArrayInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){var c;const n=T({value:(c=e.value)!=null?c:[]}),l=()=>{n.value.push(void 0)},a=b=>{n.value.splice(b,1),h()},g=(b,i)=>{n.value[b]=i,h()},h=()=>{o("change",n.value)};return(b,i)=>(t(),s("div",he,[(t(!0),s($,null,k(n.value,(f,r)=>(t(),s("div",{key:r,class:"ai-item"},[y(B,{schema:e.schema.items,value:f,onChange:p=>g(r,p)},null,8,["schema","value","onChange"]),d("button",{class:"ai-item-remove",onClick:p=>a(r)},"x",8,me)]))),128)),d("button",{class:"ai-item-add",onClick:i[0]||(i[0]=f=>l())},"Add")]))}});const ve=C(pe,[["__scopeId","data-v-a6c8b9fb"]]),ge=["value"],be=["value"],fe=v({__name:"OptionsInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("select",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},[(t(!0),s($,null,k(e.schema.values,l=>(t(),s("option",{key:l,value:l},I(l),9,be))),128))],40,ge))}}),ye=["value"],$e=v({__name:"UnionInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ye))}}),ke=["value"],Ie=v({__name:"AnyInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ke))}}),Ce={string:ae,number:ce,boolean:ue,object:_e,array:ve,options:fe,any:Ie,union:$e},xe={class:"gi"},Se={key:0,class:"gi-header"},Te={key:0,class:"gi-label"},Me={key:1,class:"gi-tags"},we={key:0,class:"gi-required"},Be={key:1,class:"gi-required"},Ae={key:1,class:"gi-description"},Re=v({__name:"GenericInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){const u=e,n=S(()=>({component:Ce[u.schema.type],props:{value:u.value,schema:u.schema}}));return(l,a)=>(t(),s("div",xe,["label"in e.schema?(t(),s("div",Se,["label"in e.schema?(t(),s("label",Te,I(e.schema.label),1)):m("",!0),"required"in e.schema||"secret"in e.schema?(t(),s("div",Me,["required"in e.schema&&e.schema.required?(t(),s("span",we,"[Required]")):m("",!0),"secret"in e.schema&&e.schema.secret?(t(),s("span",Be,"[Secret]")):m("",!0)])):m("",!0)])):m("",!0),"description"in e.schema?(t(),s("div",Ae,I(e.schema.description),1)):m("",!0),(t(),w(L(_(n).component),E({class:"gi-input"},_(n).props,{onChange:a[0]||(a[0]=g=>o("change",g))}),null,16))]))}});const B=C(Re,[["__scopeId","data-v-dd33d764"]]),je={class:"tab-menu"},De={class:"tabs"},Oe={key:0,class:"group"},qe={class:"group"},Ne=["onClick"],Pe={key:1,class:"group"},Ee={class:"content"},Le=v({__name:"TabMenuUnderline",setup(e){const o=T([]),u=U(),n=a=>{const g=h=>h==a;o.forEach((h,c)=>{h.isActive=g(c)})},l=S(()=>o.findIndex(a=>a.isActive));return V("addTab",a=>{o.push(a)}),O(()=>{n(0)}),(a,g)=>{const h=G("icon");return t(),s("div",je,[d("div",De,[_(u).left?(t(),s("div",Oe,[M(a.$slots,"left",{},void 0,!0)])):m("",!0),d("div",qe,[(t(!0),s($,null,k(o,(c,b)=>(t(),s("button",{key:c.title,class:z(["form-tab",_(l)==b&&"active"]),onClick:i=>n(b)},[c.icon?(t(),w(h,{key:0,path:c.icon,fill:"#8692A5",width:"10",height:"10"},null,8,["path"])):m("",!0),F(" "+I(c.title),1)],10,Ne))),128))]),_(u).right?(t(),s("div",Pe,[M(a.$slots,"right",{},void 0,!0)])):m("",!0)]),d("div",Ee,[M(a.$slots,"default",{},void 0,!0)])])}}});const Ue=C(Le,[["__scopeId","data-v-f2e43fa2"]]),A=e=>(W("data-v-63dce332"),e=e(),X(),e),Ve={class:"page settings"},Ge={class:"page test"},ze={class:"test-method-selector"},Fe=A(()=>d("label",{class:"test-method-selector-label"},"Method",-1)),Je=A(()=>d("option",{value:null,disabled:"",selected:"",hidden:""},"Select a method",-1)),Qe=["value"],We={key:0,class:"test-method-parameters"},Xe=A(()=>d("label",{class:"test-method-parameters-label"},"Params",-1)),He={key:1,class:"test-method-response"},Ye=A(()=>d("label",{class:"test-method-response-label"},"Response",-1)),Ze={key:0,class:"test-method-response-errors"},Ke={key:1,class:"test-method-response-returns"},et={class:"test-method-response-returns-value"},tt=v({__name:"ConnectorEditor",setup(e){const o=S(()=>{var i;return`/projects/${(i=a.value)==null?void 0:i.projectId}/connectors`}),n=J().params.connectorId,{loading:l,result:a}=Y(()=>H.get(n)),g=S(()=>{var i;return(i=a.value)!=null&&i.schema.methods?Object.keys(a.value.schema.methods).reduce((f,r)=>{const p=a.value.schema.methods[r];return[...f,{key:r,...p}]},[]):[]}),h=S(()=>!a.value||!(a.value.type in j.schema)?null:j.schema[a.value.type]),c=T({testMethod:null,testParams:{},testResponse:null}),b=async()=>{!a.value||!c.testMethod||!c.testParams||(c.testResponse=await a.value.test(c.testMethod,c.testParams))};return(i,f)=>_(l)||!_(a)||!_(h)?(t(),w(ee,{key:0})):(t(),w(Ue,{key:1,class:"connector-editor"},{left:x(()=>[y(Z,{link:_(o)},null,8,["link"])]),right:x(()=>[y(K,{model:_(a)},null,8,["model"])]),default:x(()=>[y(D,{title:"Settings"},{default:x(()=>[d("div",Ve,[(t(!0),s($,null,k(_(h).settings,(r,p)=>(t(),s("div",{key:p},[y(B,{schema:r,value:_(a).settings[p],onChange:R=>_(a).settings[p]=R},null,8,["schema","value","onChange"])]))),128))])]),_:1}),y(D,{title:"Test"},{default:x(()=>[d("div",Ge,[d("div",ze,[Fe,q(d("select",{"onUpdate:modelValue":f[0]||(f[0]=r=>c.testMethod=r),class:"test-method-selector-selector"},[Je,(t(!0),s($,null,k(_(g),r=>(t(),s("option",{key:r.key,value:r.key},I(r.label),9,Qe))),128))],512),[[Q,c.testMethod]])]),c.testMethod?(t(),s("div",We,[Xe,(t(!0),s($,null,k(_(a).schema.methods[c.testMethod].params,(r,p)=>(t(),s("div",{key:p,class:"test-field"},[y(B,{schema:r,value:c.testParams[p],onChange:R=>c.testParams[p]=R},null,8,["schema","value","onChange"])]))),128)),d("button",{class:"test-method-run",onClick:f[1]||(f[1]=r=>b())},"Test")])):m("",!0),c.testResponse?(t(),s("div",He,[Ye,c.testResponse.errors.length>0?(t(),s("div",Ze,[(t(!0),s($,null,k(c.testResponse.errors,r=>(t(),s("div",{key:r},I(r),1))),128))])):m("",!0),c.testResponse.returns&&Object.keys(c.testResponse.returns).length>0?(t(),s("div",Ke,[d("span",et,[d("pre",null,I(JSON.stringify(c.testResponse.returns,null,2)),1)])])):m("",!0)])):m("",!0)])]),_:1})]),_:1}))}});const pt=C(tt,[["__scopeId","data-v-63dce332"]]);export{pt as default}; +//# sourceMappingURL=ConnectorEditor.7b329188.js.map diff --git a/abstra_statics/dist/assets/Connectors.a8ae7e7e.js b/abstra_statics/dist/assets/Connectors.f3069a96.js similarity index 53% rename from abstra_statics/dist/assets/Connectors.a8ae7e7e.js rename to abstra_statics/dist/assets/Connectors.f3069a96.js index 22e4def53e..76e4d0b625 100644 --- a/abstra_statics/dist/assets/Connectors.a8ae7e7e.js +++ b/abstra_statics/dist/assets/Connectors.f3069a96.js @@ -1,2 +1,2 @@ -import{d as b,K as C,b as g,t as _,z as s,J as w,H as I}from"./registerWidgets.ca6243ef.js";import{b as h}from"./index.a86d8064.js";import"./gateway.fa3322de.js";import{C as i}from"./connector.d9ae500d.js";import{a as k}from"./asyncComputed.3cb2e10b.js";import{g as x,r as D}from"./icons.11151937.js";import{C as E}from"./CrudView.bd13f7e1.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";import"./DropdownMenu.162e22a4.js";import"./Modal.2f8d0c91.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="afef672c-cbda-4727-8eb9-723d5cbaca37",o._sentryDebugIdIdentifier="sentry-dbid-afef672c-cbda-4727-8eb9-723d5cbaca37")}catch{}})();const Y=b({__name:"Connectors",setup(o){const n=w(),r=I(),c=n.params.projectId;async function l(e){const t=await i.create(c,e.name,e.type);r.push({name:"connectorEditor",params:{connectorId:t.id}})}const d=[{key:"name",label:"Connector name",type:"text"},{key:"type",label:"Connector type",type:Object.entries(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:p,result:m,refetch:u}=k(()=>i.list(c)),f=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=m.value)==null?void 0:e.map(a=>({key:a.id,cells:[{text:a.name,classes:["centered"]},{text:a.type},{text:"Actions",classes:["centered"],actions:[{icon:x,label:"Edit",onClick({key:y}){r.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:D,label:"Delete",dangerous:!0,async onClick(){await a.delete(),u()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),_(E,{"entity-name":"connector",loading:s(p),title:"Connectors",description:"Each connector is a version of your app. You can create a new connector by deploying your app from the local editor.","empty-title":"No connectors here yet",table:s(f),fields:d,"create-button-text":"Create connector",onCreate:l},null,8,["loading","table"]))}});export{Y as default}; -//# sourceMappingURL=Connectors.a8ae7e7e.js.map +import{d as b,K as C,b as g,t as _,z as s,J as w,H as I}from"./registerWidgets.89616af0.js";import{b as h}from"./index.dae46ea1.js";import"./gateway.0deebb85.js";import{C as i}from"./connector.8528d309.js";import{a as k}from"./asyncComputed.8ac91a75.js";import{g as x,r as D}from"./icons.9cfdae6d.js";import{C as E}from"./CrudView.7ced9145.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";import"./DropdownMenu.8f7fc9d3.js";import"./Modal.73e976a2.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="13fe7f03-7a82-4844-8297-b47f00b283aa",o._sentryDebugIdIdentifier="sentry-dbid-13fe7f03-7a82-4844-8297-b47f00b283aa")}catch{}})();const Y=b({__name:"Connectors",setup(o){const n=w(),r=I(),c=n.params.projectId;async function l(e){const t=await i.create(c,e.name,e.type);r.push({name:"connectorEditor",params:{connectorId:t.id}})}const p=[{key:"name",label:"Connector name",type:"text"},{key:"type",label:"Connector type",type:Object.entries(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:d,result:m,refetch:u}=k(()=>i.list(c)),f=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=m.value)==null?void 0:e.map(a=>({key:a.id,cells:[{text:a.name,classes:["centered"]},{text:a.type},{text:"Actions",classes:["centered"],actions:[{icon:x,label:"Edit",onClick({key:y}){r.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:D,label:"Delete",dangerous:!0,async onClick(){await a.delete(),u()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),_(E,{"entity-name":"connector",loading:s(d),title:"Connectors",description:"Each connector is a version of your app. You can create a new connector by deploying your app from the local editor.","empty-title":"No connectors here yet",table:s(f),fields:p,"create-button-text":"Create connector",onCreate:l},null,8,["loading","table"]))}});export{Y as default}; +//# sourceMappingURL=Connectors.f3069a96.js.map diff --git a/abstra_statics/dist/assets/CrudView.bd13f7e1.js b/abstra_statics/dist/assets/CrudView.7ced9145.js similarity index 56% rename from abstra_statics/dist/assets/CrudView.bd13f7e1.js rename to abstra_statics/dist/assets/CrudView.7ced9145.js index 15b03af59c..efd1830ed5 100644 --- a/abstra_statics/dist/assets/CrudView.bd13f7e1.js +++ b/abstra_statics/dist/assets/CrudView.7ced9145.js @@ -1,2 +1,2 @@ -import{D as T,_ as A}from"./DropdownMenu.162e22a4.js";import{d as B,r as I,v as z,b as t,t as h,w as C,U as D,N as o,x as l,c as s,L as f,W as V,as as U,X as L,F as m,D as v,O as $,Q as N,q as M,K as E,B as F,A as W,z as j,a as q,G as S}from"./registerWidgets.ca6243ef.js";import{M as G}from"./Modal.2f8d0c91.js";import{L as H}from"./LoadingIndicator.a271d3bb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new Error().stack;u&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[u]="bd7866be-9b95-486c-a312-c311474b9683",e._sentryDebugIdIdentifier="sentry-dbid-bd7866be-9b95-486c-a312-c311474b9683")}catch{}})();const K=e=>($("data-v-ed693c76"),e=e(),N(),e),O={class:"main-text"},Q={class:"fields"},X=["onUpdate:modelValue","type"],Y=["onUpdate:modelValue"],J=["value"],P=K(()=>l("div",{class:"separator"},null,-1)),R={class:"buttons"},Z=B({__name:"CreationModal",props:{entityName:null,fields:null},emits:["create"],setup(e,{expose:u,emit:p}){const c=I(null),d=z({inputValue:{}}),b={maxWidth:"350px",height:"unset",padding:"30px"},g={borderBottom:"none",fontSize:"18px",marginBottom:"17px",display:"flex",flexDirection:"column",justifyContent:"center",color:"#4E596A",lineHeight:"22px"},r={color:"#414A58",fontSize:"14px",alignItems:"unset"},w=()=>{var i;return(i=c==null?void 0:c.value)==null?void 0:i.open()},_=()=>{var i;return(i=c==null?void 0:c.value)==null?void 0:i.close()},y=()=>{p("create",d.inputValue),_()};return u({open:w,close:_}),(i,x)=>(t(),h(G,{ref_key:"modalRef",ref:c,"container-style":b,"header-style":g,"content-style":r},{header:C(()=>[D(" Create a new "+o(e.entityName),1)]),content:C(()=>[l("div",O," You may edit the "+o(e.entityName)+" name afterwards at Settings. ",1),l("div",Q,[(t(!0),s(m,null,f(e.fields,n=>{var k;return t(),s("div",{key:n.key,class:"field"},[l("label",null,o(n.label),1),!n.type||typeof n.type=="string"?V((t(),s("input",{key:0,"onUpdate:modelValue":a=>d.inputValue[n.key]=a,type:(k=n.type)!=null?k:"text",class:"ws-name"},null,8,X)),[[U,d.inputValue[n.key]]]):Array.isArray(n.type)?V((t(),s("select",{key:1,"onUpdate:modelValue":a=>d.inputValue[n.key]=a,class:"ws-name"},[(t(!0),s(m,null,f(n.type,a=>(t(),s("option",{key:typeof a=="string"?a:a.value,value:typeof a=="string"?a:a.value},o(typeof a=="string"?a:a.label),9,J))),128))],8,Y)),[[L,d.inputValue[n.key]]]):v("",!0)])}),128))]),P,l("div",R,[l("button",{class:"cancel",onClick:_},"Cancel"),l("button",{class:"create",onClick:y},"Create "+o(e.entityName),1)])]),_:1},512))}});const ee=M(Z,[["__scopeId","data-v-ed693c76"]]),te=e=>($("data-v-8365dfdd"),e=e(),N(),e),ne={key:1,class:"crud-view"},se={class:"header"},ae={class:"title-wrapper"},le={class:"description"},oe={key:0,class:"empty-list"},ce=te(()=>l("img",{src:A},null,-1)),ie={class:"empty-list-title"},de={class:"empty-list-description"},re={key:2},ue=B({__name:"CrudView",props:{loading:{type:Boolean},title:null,description:null,createButtonText:null,emptyTitle:null,entityName:null,fields:null,table:null},emits:["create"],setup(e,{emit:u}){const p=e,c=I(null),d=()=>{var r;p.fields?(r=c.value)==null||r.open():u("create",{})};async function b(r){u("create",r)}const g=E(()=>({"--columnCount":`${p.table.columns.length}`}));return(r,w)=>{const _=q("router-link");return t(),s(m,null,[e.loading?(t(),h(H,{key:0})):(t(),s("div",ne,[l("div",se,[l("div",ae,[l("h1",null,o(e.title),1),l("p",le,o(e.description),1),e.createButtonText?(t(),s("button",{key:0,onClick:d},o(e.createButtonText),1)):v("",!0)])]),e.table.rows.length===0?(t(),s("div",oe,[ce,l("div",ie,o(e.emptyTitle),1),l("div",de,[F(r.$slots,"empty-description",{},void 0,!0)]),e.createButtonText?(t(),s("button",{key:0,onClick:d},o(e.createButtonText),1)):v("",!0)])):(t(),s("table",{key:1,style:W(j(g))},[l("th",null,[(t(!0),s(m,null,f(e.table.columns,(y,i)=>(t(),s("td",{key:i,class:"cell"},o(y.name),1))),128))]),(t(!0),s(m,null,f(e.table.rows,(y,i)=>{var x;return t(),s("tr",{key:i,class:S((x=y.classes)!=null?x:[])},[(t(!0),s(m,null,f(y.cells,(n,k)=>{var a;return t(),s("td",{key:k,class:S((a=n.classes)!=null?a:[])},[n.actions?(t(),h(T,{key:0,title:"Actions","highlight-last":!0,options:n.actions,payload:{key:y.key}},null,8,["options","payload"])):n.link?(t(),h(_,{key:1,to:n.link,class:"runtime-title"},{default:C(()=>[D(o(n.text),1)]),_:2},1032,["to"])):(t(),s("div",re,o(n.text),1))],2)}),128))],2)}),128))],4))])),e.fields?(t(),h(ee,{key:2,ref_key:"modalRef",ref:c,fields:e.fields,"entity-name":e.entityName,onCreate:b},null,8,["fields","entity-name"])):v("",!0)],64)}}});const he=M(ue,[["__scopeId","data-v-8365dfdd"]]);export{he as C}; -//# sourceMappingURL=CrudView.bd13f7e1.js.map +import{D as T,_ as A}from"./DropdownMenu.8f7fc9d3.js";import{d as B,r as I,v as z,b as t,t as _,w as C,U as D,N as o,x as l,c as s,L as h,W as V,as as U,X as L,F as m,D as v,O as $,Q as N,q as M,K as E,B as F,A as W,z as j,a as q,G as S}from"./registerWidgets.89616af0.js";import{M as G}from"./Modal.73e976a2.js";import{L as H}from"./LoadingIndicator.10cfcfe7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new Error().stack;u&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[u]="93c9fcfc-21cc-4da1-ae48-f8fcdff01db1",e._sentryDebugIdIdentifier="sentry-dbid-93c9fcfc-21cc-4da1-ae48-f8fcdff01db1")}catch{}})();const K=e=>($("data-v-ed693c76"),e=e(),N(),e),O={class:"main-text"},Q={class:"fields"},X=["onUpdate:modelValue","type"],Y=["onUpdate:modelValue"],J=["value"],P=K(()=>l("div",{class:"separator"},null,-1)),R={class:"buttons"},Z=B({__name:"CreationModal",props:{entityName:null,fields:null},emits:["create"],setup(e,{expose:u,emit:f}){const c=I(null),d=z({inputValue:{}}),g={maxWidth:"350px",height:"unset",padding:"30px"},b={borderBottom:"none",fontSize:"18px",marginBottom:"17px",display:"flex",flexDirection:"column",justifyContent:"center",color:"#4E596A",lineHeight:"22px"},r={color:"#414A58",fontSize:"14px",alignItems:"unset"},w=()=>{var i;return(i=c==null?void 0:c.value)==null?void 0:i.open()},p=()=>{var i;return(i=c==null?void 0:c.value)==null?void 0:i.close()},y=()=>{f("create",d.inputValue),p()};return u({open:w,close:p}),(i,x)=>(t(),_(G,{ref_key:"modalRef",ref:c,"container-style":g,"header-style":b,"content-style":r},{header:C(()=>[D(" Create a new "+o(e.entityName),1)]),content:C(()=>[l("div",O," You may edit the "+o(e.entityName)+" name afterwards at Settings. ",1),l("div",Q,[(t(!0),s(m,null,h(e.fields,n=>{var k;return t(),s("div",{key:n.key,class:"field"},[l("label",null,o(n.label),1),!n.type||typeof n.type=="string"?V((t(),s("input",{key:0,"onUpdate:modelValue":a=>d.inputValue[n.key]=a,type:(k=n.type)!=null?k:"text",class:"ws-name"},null,8,X)),[[U,d.inputValue[n.key]]]):Array.isArray(n.type)?V((t(),s("select",{key:1,"onUpdate:modelValue":a=>d.inputValue[n.key]=a,class:"ws-name"},[(t(!0),s(m,null,h(n.type,a=>(t(),s("option",{key:typeof a=="string"?a:a.value,value:typeof a=="string"?a:a.value},o(typeof a=="string"?a:a.label),9,J))),128))],8,Y)),[[L,d.inputValue[n.key]]]):v("",!0)])}),128))]),P,l("div",R,[l("button",{class:"cancel",onClick:p},"Cancel"),l("button",{class:"create",onClick:y},"Create "+o(e.entityName),1)])]),_:1},512))}});const ee=M(Z,[["__scopeId","data-v-ed693c76"]]),te=e=>($("data-v-8365dfdd"),e=e(),N(),e),ne={key:1,class:"crud-view"},se={class:"header"},ae={class:"title-wrapper"},le={class:"description"},oe={key:0,class:"empty-list"},ce=te(()=>l("img",{src:A},null,-1)),ie={class:"empty-list-title"},de={class:"empty-list-description"},re={key:2},ue=B({__name:"CrudView",props:{loading:{type:Boolean},title:null,description:null,createButtonText:null,emptyTitle:null,entityName:null,fields:null,table:null},emits:["create"],setup(e,{emit:u}){const f=e,c=I(null),d=()=>{var r;f.fields?(r=c.value)==null||r.open():u("create",{})};async function g(r){u("create",r)}const b=E(()=>({"--columnCount":`${f.table.columns.length}`}));return(r,w)=>{const p=q("router-link");return t(),s(m,null,[e.loading?(t(),_(H,{key:0})):(t(),s("div",ne,[l("div",se,[l("div",ae,[l("h1",null,o(e.title),1),l("p",le,o(e.description),1),e.createButtonText?(t(),s("button",{key:0,onClick:d},o(e.createButtonText),1)):v("",!0)])]),e.table.rows.length===0?(t(),s("div",oe,[ce,l("div",ie,o(e.emptyTitle),1),l("div",de,[F(r.$slots,"empty-description",{},void 0,!0)]),e.createButtonText?(t(),s("button",{key:0,onClick:d},o(e.createButtonText),1)):v("",!0)])):(t(),s("table",{key:1,style:W(j(b))},[l("th",null,[(t(!0),s(m,null,h(e.table.columns,(y,i)=>(t(),s("td",{key:i,class:"cell"},o(y.name),1))),128))]),(t(!0),s(m,null,h(e.table.rows,(y,i)=>{var x;return t(),s("tr",{key:i,class:S((x=y.classes)!=null?x:[])},[(t(!0),s(m,null,h(y.cells,(n,k)=>{var a;return t(),s("td",{key:k,class:S((a=n.classes)!=null?a:[])},[n.actions?(t(),_(T,{key:0,title:"Actions","highlight-last":!0,options:n.actions,payload:{key:y.key}},null,8,["options","payload"])):n.link?(t(),_(p,{key:1,to:n.link,class:"runtime-title"},{default:C(()=>[D(o(n.text),1)]),_:2},1032,["to"])):(t(),s("div",re,o(n.text),1))],2)}),128))],2)}),128))],4))])),e.fields?(t(),_(ee,{key:2,ref_key:"modalRef",ref:c,fields:e.fields,"entity-name":e.entityName,onCreate:g},null,8,["fields","entity-name"])):v("",!0)],64)}}});const _e=M(ue,[["__scopeId","data-v-8365dfdd"]]);export{_e as C}; +//# sourceMappingURL=CrudView.7ced9145.js.map diff --git a/abstra_statics/dist/assets/DashEditor.84c221ab.js b/abstra_statics/dist/assets/DashEditor.d2eeb2dd.js similarity index 98% rename from abstra_statics/dist/assets/DashEditor.84c221ab.js rename to abstra_statics/dist/assets/DashEditor.d2eeb2dd.js index f06e2d3c9f..fe7d4e8dcf 100644 --- a/abstra_statics/dist/assets/DashEditor.84c221ab.js +++ b/abstra_statics/dist/assets/DashEditor.d2eeb2dd.js @@ -1,4 +1,4 @@ -var $t=Object.defineProperty;var Gt=(s,e,t)=>e in s?$t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var v=(s,e,t)=>(Gt(s,typeof e!="symbol"?e+"":e,t),t);import{r as Ht}from"./index.a2df0371.js";import{T as Bt,a as st}from"./Tab.55e05bca.js";import{r as k,d as z,b as y,c as E,x as w,W as fe,Z as pt,e as L,O as $e,Q as Ge,q as U,K as G,a2 as ce,ac as He,N as W,z as m,F as de,L as he,A as ue,D as M,v as gt,Y as ft,a as Ee,af as zt,G as ee,t as X,ae as Be,V as H,o as vt,al as Ut,E as Ft,am as jt,an as Kt,w as re,U as Vt,R as Zt,H as Jt,J as Qt,S as qt}from"./registerWidgets.ca6243ef.js";import{d as Yt,D as Xt,w as B,r as ze,i as Oe,a as es,v as ts,b as mt,p as rt,c as ss,m as rs}from"./DashPlayer.6a8897dd.js";import{R as os,S as is,_ as ns,L as as}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js";import{L as ls}from"./CircularLoading.5630a601.js";import{i as D,w as j,g as cs,s as ds,a as Q,b as C,c as me,f as oe,e as Ue,h as hs,j as us,k as ps}from"./runnerData.170ae941.js";import{p as gs,i as fs,x as Ie,y as Pe,z as vs,t as ms,A as ys}from"./icons.11151937.js";import{a as ws}from"./asyncComputed.3cb2e10b.js";import{D as Ss}from"./dashes.9f1aca90.js";import{W as Es}from"./workspaces.25055240.js";import{B as _s}from"./BackButton.6790f37d.js";import{S as bs}from"./SaveButton.e379ab16.js";import{P as Is}from"./PreviewButton.fc12f428.js";import{D as Ps}from"./DocsButton.b174b81b.js";import{u as _e}from"./uuid.f763745d.js";import{P as Fe}from"./pubsub.581c075e.js";import"./executeJs.c3858a9c.js";import"./PlayerNavbar.e3146994.js";import"./WidgetsFrame.8af89817.js";import"./colors.4425ff79.js";import"./Modal.2f8d0c91.js";import"./passwordlessManager.0ab78ba0.js";import"./Passwordless.65114c07.js";import"./forms.38d7da0a.js";import"./activeRecord.11b7d185.js";import"./hooks.d7d78397.js";import"./jobs.2ad85710.js";import"./login.bbc5e7c0.js";import"./lottie.9d24e472.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="f5f1b060-87db-4bd0-878b-ef4f1ed427a7",s._sentryDebugIdIdentifier="sentry-dbid-f5f1b060-87db-4bd0-878b-ef4f1ed427a7")}catch{}})();const T={left:20,right:20,top:20,bottom:200};class je{constructor(e){v(this,"_state");v(this,"_projectedElement",null);v(this,"grid");this.grid=e,this._state=k({x:0,y:0,zoom:1})}get x(){return this._state.value.x}set x(e){if(Number.isNaN(e))throw new Error("x is NaN");this._state.value.x=e}get y(){return this._state.value.y}set y(e){if(Number.isNaN(e))throw new Error("y is NaN");this._state.value.y=e}static create(e){return new je(e)}setProjectedCanvas(e){this._projectedElement=e,this.fit()}get projectedElement(){if(!this._projectedElement)throw new Error("Camera has no projected element");return this._projectedElement}updateGrid(e){this.grid=e}get zoom(){return this._state.value.zoom}set zoom(e){if(e<=0)throw new Error("Zoom must be positive");this._state.value.zoom=e}fit(){if(!this.grid.width)throw new Error(`Grid width is ${this.grid.width}}`);if(!this.grid.height)throw new Error(`Grid height is ${this.grid.height}`);const e=this.canvasRect,t=Math.max(e.width-T.left-T.right,1),r=Math.max(e.height-T.top-T.bottom,1);this.zoom=1;const o=Math.min(t/this.grid.width,r/this.grid.height);this.zoomIn(o,{x:e.x+e.width/2,y:e.y+e.height/2,referential:"screen"}),this.x=t>this.grid.width*o?-(e.x+e.width/2-o*this.grid.width/2)/o:-(e.x+T.left)/o,this.y=rt.x+T.left,o=e.x+e.widtht.width,l=e.height>t.height,c=e.y+e.heightt.y+T.top,u=e.y+e.height/2-(t.y+t.height/2),p=this.screenDelta2world({dx:n?o&&r?0:r?e.x-t.x-T.right:o?e.x+e.width-(t.x+t.width)+T.left:0:i,dy:l?c&&a?0:a?e.y-t.y-T.top:c?e.y+e.height-(t.y+t.height)+T.bottom:0:u,referential:"screen"});this.x+=p.dx,this.y+=p.dy}}const xs=s=>($e("data-v-fb3c93ab"),s=s(),Ge(),s),Rs={class:"dash-settings"},Ls={class:"dash-property"},Os=xs(()=>w("label",{class:"property-label"},"Name",-1)),Ns=z({__name:"DashSettings",props:{dash:null},setup(s){return(e,t)=>(y(),E("div",Rs,[w("div",Ls,[Os,fe(w("input",{"onUpdate:modelValue":t[0]||(t[0]=r=>s.dash.title=r),class:"property-input",placeholder:"Enter a name"},null,512),[[pt,s.dash.title]])]),L(os,{runtime:s.dash},null,8,["runtime"])]))}});const As=U(Ns,[["__scopeId","data-v-fb3c93ab"]]),Ts={class:"zoom-bar"},Cs={class:"zoom-value"},ks=z({__name:"ZoomBar",props:{camera:null},emits:["hover","leave"],setup(s,{emit:e}){const t=s,r=k(!1),o=k(null),i=()=>{var a;(a=t.camera)==null||a.zoomIn(1.1,{x:document.body.offsetWidth/2,y:document.body.offsetHeight/2,referential:"screen"})},n=()=>{var a;(a=t.camera)==null||a.zoomIn(.9,{x:document.body.offsetWidth/2,y:document.body.offsetHeight/2,referential:"screen"})},l=G(()=>{var c,a;return`${Math.floor(((a=(c=t.camera)==null?void 0:c.zoom)!=null?a:1)*100)}%`});return ce(()=>{var c;return(c=t.camera)==null?void 0:c.zoom},()=>{clearTimeout(o.value),r.value=!0,o.value=setTimeout(()=>r.value=!1,3e3)}),(c,a)=>fe((y(),E("div",{class:"zoom-bar-wrapper",onMouseover:a[0]||(a[0]=u=>e("hover")),onMouseleave:a[1]||(a[1]=u=>e("leave"))},[w("div",Ts,[w("span",{class:"zoom-control",onClick:n},"-"),w("span",Cs,W(m(l)),1),w("span",{class:"zoom-control",onClick:i},"+")])],544)),[[He,s.camera&&r.value]])}});const Ds=U(ks,[["__scopeId","data-v-f937a967"]]),ot={PandasDataFrame:"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html",PlotlyFigure:"https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html","datetime.time":"https://docs.python.org/3/library/datetime.html#datetime.time","datetime.date":"https://docs.python.org/3/library/datetime.html#datetime.date","io.IOBase":"https://docs.python.org/3/library/io.html#io.IOBase","time.struct_time":"https://docs.python.org/3/library/time.html#time.struct_time"},Ws="#E286A3",Ms="#EF9542",$s="#B462DB",Gs="#40B6D3",Hs="#6FB96E",Bs=[Ws,Ms,$s,Gs,Hs];function it(s){let e=s;return Object.keys(ot).forEach(t=>{if(s.includes(t)){const r=ot[t];e=e.replace(t,`${t}`)}}),e}const ie={},zs=s=>e=>{if(ie[e])return ie[e];const t=Object.keys(ie).length%s.length;return ie[e]=s[t],s[t]},nt=zs([...Bs]),Us=()=>{Object.keys(ie).forEach(s=>delete ie[s])};class Fs{constructor(){v(this,"globalEventListeners",[])}addGlobalEventListener(e,t){addEventListener(e,t),this.globalEventListeners.find(r=>r.evt===e)||this.globalEventListeners.push({evt:e,handler:t})}removeGlobalEventListeners(){this.globalEventListeners.forEach(({evt:e,handler:t})=>{removeEventListener(e,t)}),this.globalEventListeners=[]}}const js={class:"param-types"},Ks=["innerHTML"],Vs={key:1,class:"prop-type"},Zs=["innerHTML"],Js=z({__name:"ParamTypes",props:{param:null},setup(s){return(e,t)=>(y(),E("div",js,[s.param&&s.param.typeDescription?(y(!0),E(de,{key:0},he(s.param.typeDescription,r=>(y(),E("div",{key:r,class:"prop-type"},[w("p",{class:"type",style:ue({color:m(nt)(r)}),innerHTML:m(it)(r)},null,12,Ks)]))),128)):s.param&&s.param.typeName?(y(),E("div",Vs,[w("p",{class:"type",style:ue({color:m(nt)(s.param.typeName)}),innerHTML:m(it)(s.param.typeName)},null,12,Zs)])):M("",!0)]))}});const at=U(Js,[["__scopeId","data-v-d6aed39d"]]),Qs=["value","placeholder"],qs=["value","placeholder"],Ys=z({__name:"PythonPropInputRaw",props:{hasError:{type:Boolean},placeholder:null,value:null,paramName:null,isCode:{type:Boolean},commit:{type:Function}},emits:["input","change","clearSuggestions"],setup(s,{emit:e}){const t=s,r=gt({isActive:!1,hasChanges:!1}),o=c=>{e("input",c),r.hasChanges=!0},i=()=>{r.isActive=!1,e("clearSuggestions")},n=c=>{c.preventDefault();const a=c.target,u=a.selectionStart,p=a.selectionEnd,d=a.value;a.value=d.substring(0,u)+" "+d.substring(p),a.selectionStart=a.selectionEnd=u+1,a.dispatchEvent(new Event("input"))},l=c=>{t.commit(c),r.hasChanges=!1};return ft(()=>{r.hasChanges&&t.commit(t.value)}),(c,a)=>{var p,d;const u=Ee("icon");return y(),E("div",{class:ee(["input-container",{error:s.hasError}])},[L(u,{path:m(gs),class:"icon",fill:s.hasError?"#D35249":r.isActive?"#3482E5":void 0},null,8,["path","fill"]),s.isCode?(y(),E("textarea",{key:0,value:s.value,class:"prop-input",placeholder:(p=s.placeholder)!=null?p:void 0,onInput:a[0]||(a[0]=h=>o(h.target.value)),onClick:a[1]||(a[1]=h=>r.isActive=!0),onBlur:i,onKeydown:a[2]||(a[2]=zt(h=>n(h),["tab"])),onChange:a[3]||(a[3]=h=>l(h.target.value))},null,40,Qs)):(y(),E("input",{key:1,value:s.value,class:"prop-input",placeholder:(d=s.placeholder)!=null?d:void 0,onInput:a[4]||(a[4]=h=>o(h.target.value)),onClick:a[5]||(a[5]=h=>r.isActive=!0),onBlur:i,onChange:a[6]||(a[6]=h=>l(h.target.value))},null,40,qs))],2)}}});const Xs=U(Ys,[["__scopeId","data-v-d30fa88e"]]),er={class:"suggestions"},tr=["onMousedown"],sr=z({__name:"PythonAutoCompleteSuggestions",props:{suggestions:null},emits:["select"],setup(s,{emit:e}){return(t,r)=>fe((y(),E("div",er,[(y(!0),E(de,null,he(s.suggestions,o=>(y(),E("div",{key:o,class:"suggestion",onMousedown:i=>e("select",o)},W(o),41,tr))),128))],512)),[[He,s.suggestions.length]])}});const rr=U(sr,[["__scopeId","data-v-afec000d"]]),or={class:"python-wrapper"},ir=z({__name:"PythonPropInput",props:{hasError:{type:Boolean},placeholder:null,value:null,paramName:null,dashPlayerService:null,isCode:{type:Boolean},commit:{type:Function}},emits:["input"],setup(s,{emit:e}){const t=s,r=G(()=>t.dashPlayerService.suggestionsFor),o=G(()=>t.dashPlayerService.suggestions),i=a=>{l(t.paramName,a),e("input",a)},n=a=>{c(),e("input",a),t.commit(a)},l=async(a,u)=>{!u||t.dashPlayerService.getAutocompleteSuggestions(a,u)},c=async()=>{await Be(),t.dashPlayerService.clearSuggestions()};return(a,u)=>(y(),E("div",or,[L(Xs,{value:s.value,commit:s.commit,"is-code":s.isCode,"param-name":s.paramName,"dash-player-service":s.dashPlayerService,onInput:i,onClearSuggestions:c},null,8,["value","commit","is-code","param-name","dash-player-service"]),m(r)===s.paramName?(y(),X(rr,{key:0,suggestions:m(o),onSelect:n},null,8,["suggestions"])):M("",!0)]))}});const xe=U(ir,[["__scopeId","data-v-63688ff1"]]),nr={name:"If Block",description:"A block of elements that is only rendered depending on a condition",params:[{typeName:"Boolean",argName:"condition",isKwarg:!1,default:null}],defaultEditProps:{condition:!0},thumbname:"IfBlock.svg"},ae={"if-block":nr},Z=s=>($e("data-v-718f02de"),s=s(),Ge(),s),ar={class:"wrapper"},lr={class:"title"},cr={key:0,class:"widget-prop"},dr=Z(()=>w("h2",null,"Error",-1)),hr=Z(()=>w("p",{class:"section-description"},"Some errors were found while computing the widget.",-1)),ur=["textContent"],pr={key:1,class:"section"},gr=Z(()=>w("h2",null,"VARIABLE",-1)),fr={key:0,class:"section-content"},vr={class:"widget-prop"},mr=Z(()=>w("p",{class:"prop-label"},"Bind a variable",-1)),yr=Z(()=>w("p",{class:"prop-description"},"Create a variable to be controlled by this widget.",-1)),wr={class:"input-container"},Sr={key:0,class:"variable-error prop-error"},Er=Z(()=>w("pre",null,"Variable not defined",-1)),_r={key:1,class:"prop-error",textContent:"SyntaxError: This field must be a variable name"},br=["textContent"],Ir={key:2,class:"section"},Pr=Z(()=>w("h2",null,"EVENTS",-1)),xr={key:0,class:"section-content"},Rr=Z(()=>w("p",{class:"section-description"}," Each event is a Python code that runs on specified situations ",-1)),Lr={class:"prop-label"},Or={class:"prop-description"},Nr={class:"section"},Ar=Z(()=>w("h2",null,"PROPERTIES",-1)),Tr={key:0,class:"section-content"},Cr=Z(()=>w("p",{class:"section-description"}," Each property is a Python expression, make sure to use the correct syntax. ",-1)),kr={class:"prop-label"},Dr={class:"prop-description"},Wr=["textContent"],Mr=Z(()=>w("div",{class:"feedback"},null,-1)),$r=[Mr],Gr=z({__name:"WidgetEditor",props:{selectedWidgetErrors:null,layoutModel:null,selectedWidgets:null,dashPlayerService:null},emits:["close","create-variable"],setup(s,{emit:e}){const t=s,r=k(null);ce(()=>t.selectedWidgetErrors,()=>{r.value=null});const o=S=>{f.openedSections.includes(S)?f.openedSections=f.openedSections.filter(b=>b!==S):f.openedSections.push(S)},i=S=>f.openedSections.includes(S),n=S=>D(S)?j[S.type].name:ae[S.type].name,l=G(()=>r.value===null?t.selectedWidgetErrors:r.value==="variable"?H.exports.omit(t.selectedWidgetErrors,"variable"):{...t.selectedWidgetErrors,props:H.exports.omit(t.selectedWidgetErrors.props,r.value)}),c=G(()=>a.value.type.includes("-input")&&a.value.type!=="click-input"),a=G(()=>t.selectedWidgets[0]),u=G(()=>{var I;if(!D(a.value))return;const b=((I=j[a.value.type].pythonAPI.params)!=null?I:[]).find(O=>O.argName==="initial_value");return b||null});function p(S){this.style.height="0",this.style.height=this.scrollHeight-24+"px"}const d=new Fs,h=k(null),g=402,f=gt({isActive:!1,resizing:!1,width:g,openedSections:["properties","variable"]});vt(()=>{h.value&&(d.addGlobalEventListener("mouseup",()=>f.resizing=!1),d.addGlobalEventListener("mousemove",I=>P(I))),document.querySelectorAll(".widget-props-editor textarea").forEach(I=>{!I||(I.setAttribute("style","height:"+(I.scrollHeight-24)+"px;overflow-y:hidden;"),I.addEventListener("input",p,!1))})}),Ut(()=>{Us(),d.removeGlobalEventListeners()});const P=S=>{f.resizing&&(f.width=Math.max(f.width-S.movementX,g))},_=G(()=>({width:`${f.width}px`})),x=S=>ae[S.type].params,q=G(()=>{const S=(O,F)=>O.argName===F.argName&&O.typeName===F.typeName,b=(O,F,R)=>R.findIndex(se=>S(O,se))===F,I=O=>!O.formOnly;return t.selectedWidgets.flatMap(O=>{var F;return D(O)?(F=j[O.type])==null?void 0:F.pythonAPI.params:x(O)}).filter(Boolean).filter(I).filter(b)}),tt=G(()=>{const S=(I,O)=>I.key===O.key,b=(I,O,F)=>F.findIndex(R=>S(I,R))===O;return t.selectedWidgets.flatMap(I=>{var O;return D(I)?(O=j[I.type])==null?void 0:O.events:[]}).filter(Boolean).filter(b).filter(I=>I.key!=="change")}),Lt=S=>{t.layoutModel.updateVariable(S,a.value.id),r.value="variable"},Ot=S=>b=>{t.layoutModel.updateProp({param:S,value:b},t.selectedWidgets.map(I=>I.id)),r.value=S.argName},Nt=S=>b=>{t.layoutModel.updateEvent({event:S,value:b},t.selectedWidgets.map(I=>I.id))},At=()=>{var S,b;return(b=(S=l.value.variable)==null?void 0:S.repr)==null?void 0:b.includes("SyntaxError")},Tt=()=>{var S,b;return(b=(S=l.value.variable)==null?void 0:S.repr)==null?void 0:b.includes("NameError")},Ct=S=>{!S||(t.dashPlayerService.sendVariableCreated(S),e("create-variable",S))},kt=()=>{var S,b;return((S=l.value.widget)==null?void 0:S.repr)&&!Object.values((b=l.value.props)!=null?b:{}).some(I=>I.repr)},Dt=()=>{var S;return(S=l.value.widget)==null?void 0:S.repr},be=S=>{var b,I;return(I=(b=l.value.props)==null?void 0:b[S])==null?void 0:I.repr},Wt=S=>H.exports.upperFirst(S.replace(/_/g," "));return(S,b)=>{var O,F;const I=Ee("icon");return y(),E("div",{class:"widget-props-editor",style:ue(m(_))},[w("div",ar,[w("div",lr,[w("h1",null,W(n(m(a))),1),L(I,{path:m(fs),fill:"#414A58",class:"close-icon",width:"16",height:"16",onClick:b[0]||(b[0]=R=>e("close"))},null,8,["path"])]),kt()?(y(),E("div",cr,[dr,hr,w("pre",{class:"prop-error",textContent:W(Dt())},null,8,ur)])):M("",!0),m(c)?(y(),E("div",pr,[w("div",{class:"section-header",onClick:b[1]||(b[1]=R=>o("variable"))},[L(I,{path:i("variable")?m(Ie):m(Pe),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),gr]),i("variable")?(y(),E("div",fr,[w("div",vr,[mr,yr,w("div",wr,[L(xe,{placeholder:"variable_name","param-name":"variable","dash-player-service":s.dashPlayerService,value:(O=m(a).variable)!=null?O:"",commit:Lt,"is-code":!1,onInput:b[2]||(b[2]=R=>m(a).variable=R)},null,8,["dash-player-service","value"])]),Tt()&&m(a).variable?(y(),E("div",Sr,[Er,w("button",{onClick:b[3]||(b[3]=R=>Ct(m(a).variable))}," Create ")])):At()?(y(),E("pre",_r)):(F=m(l).variable)!=null&&F.repr?(y(),E("pre",{key:2,class:"prop-error",textContent:W(m(l).variable.repr)},null,8,br)):M("",!0),L(at,{param:m(u)},null,8,["param"])])])):M("",!0)])):M("",!0),m(tt).length?(y(),E("div",Ir,[w("div",{class:"section-header",onClick:b[4]||(b[4]=R=>o("events"))},[L(I,{path:i("events")?m(Ie):m(Pe),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),Pr]),i("events")?(y(),E("div",xr,[Rr,(y(!0),E(de,null,he(m(tt),R=>(y(),E("div",{key:R.key,class:"widget-prop"},[w("label",Lr,"On "+W(R.key),1),w("p",Or,"Executed after "+W(R.key),1),L(xe,{"param-name":R.key,"dash-player-service":s.dashPlayerService,value:m(a).events[R.key],commit:Nt(R),"is-code":!0,onInput:se=>m(a).events[R.key]=se},null,8,["param-name","dash-player-service","value","commit","onInput"])]))),128))])):M("",!0)])):M("",!0),w("div",Nr,[w("div",{class:"section-header",onClick:b[5]||(b[5]=R=>o("properties"))},[L(I,{path:i("properties")?m(Ie):m(Pe),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),Ar]),i("properties")?(y(),E("div",Tr,[Cr,(y(!0),E(de,null,he(m(q),R=>{var se;return y(),E("div",{key:R.argName,class:"widget-prop"},[w("p",kr,W(Wt(R.argName)),1),w("p",Dr,W(R.description),1),L(xe,{"has-error":!!be(R.argName),placeholder:(se=R.default)!=null?se:void 0,"param-name":R.argName,"dash-player-service":s.dashPlayerService,value:m(a).props[R.argName],commit:Ot(R),"is-code":!0,onInput:Mt=>m(a).props[R.argName]=Mt},null,8,["has-error","placeholder","param-name","dash-player-service","value","commit","onInput"]),be(R.argName)?(y(),E("pre",{key:0,class:"prop-error",textContent:W(be(R.argName))},null,8,Wr)):M("",!0),L(at,{param:R},null,8,["param"])])}),128))])):M("",!0)])]),w("div",{ref_key:"handlerRef",ref:h,class:"handler",onMousedown:b[6]||(b[6]=Ft(R=>f.resizing=!0,["stop"]))},$r,544)],4)}}});const Hr=U(Gr,[["__scopeId","data-v-718f02de"]]),yt=s=>($e("data-v-0d595f79"),s=s(),Ge(),s),Br={class:"interact-menu"},zr={class:"icon-container"},Ur=yt(()=>w("span",{class:"edit"},"Edit [Shift + P]",-1)),Fr={class:"icon-container"},jr=yt(()=>w("span",null,"Interact [Shift + P]",-1)),Kr=z({__name:"InteractMenu",props:{isPreview:{type:Boolean}},emits:["changePreview"],setup(s,{emit:e}){return(t,r)=>{const o=Ee("icon");return y(),E("div",Br,[w("div",zr,[L(o,{class:ee(["icon",{active:!s.isPreview}]),path:m(vs),fill:"#5A677A",onClick:r[0]||(r[0]=i=>e("changePreview",!1))},null,8,["class","path"]),Ur]),w("div",Fr,[L(o,{class:ee(["icon",{active:s.isPreview}]),path:m(ms),fill:"#5A677A",onClick:r[1]||(r[1]=i=>e("changePreview",!0))},null,8,["class","path"]),jr])])}}});const Vr=U(Kr,[["__scopeId","data-v-0d595f79"]]),Zr={class:"header"},Jr={key:0},Qr={key:1},qr={key:2,class:"state"},Yr={key:3,class:"state"},Xr={key:4,class:"state"},eo={key:5},to={key:6},so=z({__name:"RuntimeHeader",props:{dash:null,dashPlayerService:null},setup(s){return(e,t)=>(y(),E("div",Zr,[s.dash.title?(y(),E("p",Jr,W(s.dash.title),1)):(y(),E("p",Qr,W(s.dash.path),1)),s.dashPlayerService.state.type==="RUNNING"?(y(),E("p",qr,"\u{1F7E2} running")):s.dashPlayerService.state.type==="ERROR"?(y(),E("p",Yr,"\u274C error")):s.dashPlayerService.state.type==="AUTHENTICATING"?(y(),E("p",Xr," \u{1F510} authenticating ")):s.dashPlayerService.state.type==="IDLE"?(y(),E("p",eo,"\u26AA\uFE0F idle")):s.dashPlayerService.state.type==="READY"?(y(),E("p",to,"\u23F3 loading")):M("",!0)]))}});const ro=U(so,[["__scopeId","data-v-b5964f37"]]),oo={key:0,class:"widget-metadata-card"},io=["src"],no={class:"metadata-title"},ao={class:"metadata-description"},lo={key:1,class:"collapsed-widget-metadata-card"},co=["src"],ho=z({__name:"WidgetMetadataCard",props:{metadata:null,collapsed:{type:Boolean}},setup(s){const e=window.__baseURL?`${window.__baseURL}/media`:"",t=o=>o in ae?`${e}/${ae[o].thumbname}`:`${e}/widget-thumbs/${cs(o)}.svg`,r=window.__vscodeTheme===2?"dark":"light";return(o,i)=>s.collapsed?(y(),E("div",lo,[w("img",{class:"metadata-thumbnail",src:t(s.metadata.type),style:ue(m(r)==="dark"?{filter:"invert(1)"}:"")},null,12,co)])):(y(),E("div",oo,[w("img",{class:"metadata-thumbnail",src:t(s.metadata.type),style:ue(m(r)==="dark"?{filter:"invert(1)"}:"")},null,12,io),w("div",no,W(s.metadata.name),1),w("div",ao,W(s.metadata.description),1)]))}});const uo=U(ho,[["__scopeId","data-v-2b654c57"]]),ve={"click-input":-1,"text-output":0,"number-input":1,"text-input":2,"link-output":3,"multiple-choice-input":4,"file-input":5,"email-input":6,"markdown-output":7,"dropdown-input":8,"date-input":9,"cards-input":10,"textarea-input":11,"list-input":12,"file-output":13,"html-output":14,"pandas-output":15,"checkbox-input":16,"cnpj-input":17,"code-input":18,"progress-output":19,"pandas-row-selection-input":20,"image-input":21,"password-input":22,"currency-input":23,"iframe-output":24,"checklist-input":25,"image-output":26,"nps-input":27,"phone-input":28},po=z({__name:"WidgetsMetadataList",emits:["dragstart","hover","leave"],setup(s,{emit:e}){const t=k(""),r=k(),o=k(!0),i=()=>{o.value=!1},n=()=>{o.value=!0,c()},l=async()=>{await Be(),r.value&&r.value.focus()},c=()=>{t.value=""},a=Object.values(j).concat(Object.entries(ae).map(([d,h])=>({type:d,...h}))).reduce((d,h)=>h.formOnly?d:{...d,[h.type]:h},{}),u=G(()=>t.value?Object.values(a).map(d=>({widget:d,score:ds(d,t.value.split(" "))})).filter(({score:d})=>d>0).sort(({score:d},{score:h})=>h-d).map(({widget:d})=>d):Object.values(a).sort((d,h)=>{const g=d.type,f=h.type;if(g in ve){if(!(f in ve))return-1}else return 1;return ve[g]-ve[f]}));function p(d,h){e("dragstart",d,h)}return(d,h)=>{const g=Ee("icon");return y(),E("div",{class:"widgets-metadata",onMouseover:i,onMouseleave:n},[w("div",jt({class:["search",{collapsed:o.value}]},Kt(o.value?{click:l}:{},!0)),[L(g,{path:m(ys),class:"search-icon"},null,8,["path"]),o.value?M("",!0):fe((y(),E("input",{key:0,ref_key:"searchInput",ref:r,"onUpdate:modelValue":h[0]||(h[0]=f=>t.value=f),type:"search",class:"widgets-metadata-filter",placeholder:"Find widgets"},null,512)),[[pt,t.value]])],16),w("div",{class:ee(["widgets-metadata-list",{collapsed:o.value}])},[(y(!0),E(de,null,he(m(u),f=>(y(),X(uo,{key:f.type,metadata:f,draggable:!0,collapsed:o.value,onDragstart:P=>p(P,f.type)},{default:re(()=>[Vt(W(f.type),1)]),_:2},1032,["metadata","collapsed","onDragstart"]))),128))],2)],32)}}});const go=U(po,[["__scopeId","data-v-a17e6382"]]),fo={class:"dash-layout-editor"},vo=z({__name:"DashLayoutEditor",props:{dash:null,params:null,dashEditorService:null,workspace:null},emits:["navigate","create-variable","change-preview"],setup(s,{emit:e}){const t=s;console.log(t);const r=k(null),o=k(null),i=(_,x)=>t.dashEditorService.metadataDragStart(_,x),n=_=>e("navigate",_),l=_=>e("create-variable",_),c=_=>e("change-preview",_);t.dashEditorService.pubsub.subscribe("change-preview",c);const a=()=>{t.dashEditorService.hoverZoomBar()},u=()=>{t.dashEditorService.leaveZoomBar()};ce(t.dash.layout,()=>{t.dashEditorService.layoutModel.setLayout(t.dash.layout)}),t.dashEditorService.setupOnSave(),ce(t.dashEditorService.layoutModel,()=>t.dashEditorService.setupOnSave());const p=G(()=>t.dashEditorService.getWidgetsWithErrors()),d=G(()=>t.dashEditorService.getSelectedWidgetErrors()),h=k(null),g=k(null),f=k(null),P=k(null);return vt(()=>{t.dashEditorService.selection.setLayoutModel(t.dashEditorService.layoutModel),f.value&&P.value&&g.value&&o.value&&r.value&&h.value&&t.dashEditorService.setup(f.value,P.value,g.value,o.value,r.value,h.value)}),ft(()=>{t.dashEditorService.tearDown()}),ce(()=>t.dashEditorService.dashPlayerService.isAuthenticating(),_=>{_&&(t.dashEditorService.isPreview=!0)}),(_,x)=>(y(),E("div",fo,[fe(L(go,{onDragstart:i},null,512),[[He,!s.dashEditorService.isPreview]]),w("div",{ref_key:"editor",ref:f,class:ee(["editor"])},[w("div",{ref_key:"listeners",ref:P,class:"listeners",tabindex:"0"},[L(Xt,{ref_key:"player",ref:r,class:ee(["player",{preview:s.dashEditorService.isPreview}]),style:{top:0,left:0,height:"unset"},"is-preview":!0,params:s.params,camera:s.dashEditorService.camera,"editing-mode":!s.dashEditorService.isPreview,"force-responsivity":"desktop","widgets-with-errors":m(p),"dash-player-service":s.dashEditorService.dashPlayerService,onNavigate:n},null,8,["class","params","camera","editing-mode","widgets-with-errors","dash-player-service"]),w("canvas",{ref_key:"canvas",ref:g,class:ee(["layout-canvas",{hide:s.dashEditorService.isPreview}])},null,2)],512),L(ro,{ref_key:"runtimeHeader",ref:h,dash:s.dash,"dash-player-service":s.dashEditorService.dashPlayerService},null,8,["dash","dash-player-service"]),L(Vr,{ref_key:"interactMenu",ref:o,class:"interact-menu","is-preview":s.dashEditorService.isPreview,onChangePreview:c},null,8,["is-preview"])],512),(s.dashEditorService.selection.selectedWidgetsIds.length>0||s.dashEditorService.selection.selectedSlottableId)&&!s.dashEditorService.isPreview&&s.dashEditorService.mouseState.state==="IDLE"?(y(),X(Hr,{key:0,"selected-widget-errors":m(d),"layout-model":s.dashEditorService.layoutModel,"selected-widgets":s.dashEditorService.selection.selectedSlottable?[s.dashEditorService.selection.selectedSlottable]:s.dashEditorService.selection.selectedWidgets,"dash-player-service":s.dashEditorService.dashPlayerService,onClose:x[0]||(x[0]=q=>s.dashEditorService.selection.resetSelection()),onCreateVariable:l},null,8,["selected-widget-errors","layout-model","selected-widgets","dash-player-service"])):M("",!0),L(Ds,{camera:s.dashEditorService.camera,class:"zoom-bar",onHover:a,onLeave:u},null,8,["camera"])]))}});const mo=U(vo,[["__scopeId","data-v-7661d381"]]),yo="rgba(0, 128, 233, 0.05)";class pe{constructor(e,t){v(this,"context");this.canvas=e,this.context=this.canvas.getContext("2d"),t.slottableRenderer.setContext(this.context)}static create(e,t){return new pe(e,t)}render({mouseState:e,dashEditorService:t,hoverState:r,resizeHandlerRects:o,widgetsInRectangularSelection:i,selectedWidgets:n,computedState:l,isPreview:c,calculatedPositions:a,selectedSlottable:u}){const p=t.camera,d=t.dashPlayerService.layoutGrid,h=t.dashPlayerService.calculatePositions();if(t.dashPlayerService.state.type==="RUNNING"){if(!p)throw new Error("No camera value yet");this.renderFrame(d,p),this.renderGrid(d,p,e),this.renderWidgetShadow(l,d,p,a.widgets),this.renderInvisibleWidgets(p,a,d,h),this.renderWidgetHoverBorders(r,e,p,d,a.widgets),this.renderSelectionHull(e,p,d,n,a.widgets),this.renderWidgetsSelectionBorders(e,n,p,d,a.widgets),this.renderRectangularSelection(e),this.renderRectangularSelectionHovers(e,i,p,d,a.widgets),this.renderResizeHandlers(e,o),c||(t.slottableRenderer.slottables=a.slottables,t.slottableRenderer.renderSlottables(u))}}renderFrame(e,t){const r={x:0,y:0,width:e.width,height:e.height+e.navbarLength,referential:"world"};this.context.fillStyle="transparent",this.context.shadowColor="rgba(0,0,0,0.1)",this.context.shadowBlur=15;const o=t.worldRect2screen(r);this.context.fillRect(o.x,o.y,o.width,o.height),this.context.clearRect(o.x,o.y,o.width,o.height)}getGridDots(e,t){var u;const r=[];if(!e)return[];const o=t.worldPoint2screen({y:0,x:0,referential:"world"}),i=(u=t.projectedElement)==null?void 0:u.getBoundingClientRect(),n=e.margin*t.zoom,l=e.gap*t.zoom,c=e.cellHeight*t.zoom,a=(i.y+i.height-o.y-n)/(c+l);for(const p in Array(e.columns+1).fill(null))for(const d in Array(Math.ceil(a+1)).fill(null))r.push(t.worldPoint2screen({x:e.margin+parseInt(p)*(e.cellWidth+e.gap),y:e.margin+parseInt(d)*(e.cellHeight+e.gap)+e.navbarLength,referential:"world"}));return r}renderGrid(e,t,r){if(r.state==="MOVING"||r.state==="RESIZING"||r.state==="SLOTTABLE_RESIZING"||r.state==="MOVING_SLOTTABLE"||r.state==="DRAGGING_SLOTTABLE"||r.state==="DRAGGING"){this.context.fillStyle="rgba(0,0,0,0.1)";for(const o of this.getGridDots(e,t))this.context.beginPath(),this.context.ellipse(o.x,o.y,2,2,0,0,2*Math.PI),this.context.fill()}}renderWidgetShadow(e,t,r,o){this.context.fillStyle="rgba(0, 0, 0, 0.1)";for(const i in o){if(!e.operations.some(c=>c.path.includes(i)))continue;const n=o[i],l=r.worldRect2screen(B(n.position,t));this.context.fillRect(l.x,l.y,l.width,l.height)}}renderInvisibleWidgets(e,t,r,o){const n=t.widgets;for(const l in n){if(l in o.widgets)continue;const c=n[l],a=B(c.position,r),u={x:a.x+5,y:a.y+5,width:a.width-2*5,height:a.height-2*5,referential:"world"},p=e.worldRect2screen(u);this.context.fillStyle="rgba(0, 0, 0, 0.1)",this.context.fillRect(p.x,p.y,p.width,p.height),this.context.fillStyle="black",this.context.font="15px sans-serif",this.context.textAlign="center",this.context.textBaseline="middle",this.context.fillText(j[c.type].name,p.x+p.width/2,p.y+p.height/2)}}renderWidgetHoverBorders(e,t,r,o,i){if(this.context.strokeStyle="#ababab",e.state==="HOVERING_WIDGET"&&t.state==="IDLE"){const n=i[e.widgetId];if(!n)return;const l=r.worldRect2screen(B(n.position,o));this.context.strokeRect(l.x,l.y,l.width,l.height)}else(t.state==="MOVING"||t.state==="RESIZING"||t.state==="DRAGGING"||t.state==="SELECTING")&&Object.keys(i).forEach(n=>{const l=i[n],c=r.worldRect2screen(B(l.position,o));this.context.strokeRect(c.x,c.y,c.width,c.height)})}renderWidgetsSelectionBorders(e,t,r,o,i){if(e.state==="IDLE"||e.state==="SELECTING"){this.context.strokeStyle="#3482E5",this.context.lineWidth=2;for(const n of t){const l=i[n],c=r.worldRect2screen(B(l.position,o));this.context.strokeRect(c.x,c.y,c.width,c.height)}}}renderRectangularSelection(e){if(this.context.fillStyle=yo,e.state==="SELECTING"){const t=Math.min(e.initialMousePos.x,e.mousePos.x),r=Math.min(e.initialMousePos.y,e.mousePos.y),o=Math.abs(e.initialMousePos.x-e.mousePos.x),i=Math.abs(e.initialMousePos.y-e.mousePos.y),n={x:t,y:r,width:o,height:i};this.context.fillRect(n.x,n.y,o,i)}}renderRectangularSelectionHovers(e,t,r,o,i){if(this.context.strokeStyle="#3482E5",e.state==="SELECTING")for(const n of t){const l=i[n],c=r.worldRect2screen(B(l.position,o));this.context.strokeRect(c.x,c.y,c.width,c.height)}}renderSelectionHull(e,t,r,o,i){const n=ze(Object.entries(i).filter(([c])=>o.has(c)).map(([c,a])=>B(a.position,r)).filter(c=>c!==null));if(e.state!=="IDLE"||!n)return;this.context.strokeStyle="#3482E5";const l=t.worldRect2screen(n);this.context.strokeRect(l.x,l.y,l.width,l.height)}static drawResizeHandler(e,t){e.fillStyle="white",e.strokeStyle="#3482E5",e.lineWidth=1,e.fillRect(t.x,t.y,t.width,t.height),e.strokeRect(t.x,t.y,t.width,t.height)}renderResizeHandlers(e,t){if(e.state!=="MOVING")for(const{rect:r}of t)pe.drawResizeHandler(this.context,r)}cursor(e,t){if(e.state==="MOVING")return"grabbing";if(e.state==="SELECTING")return"crosshair";if(e.state==="RESIZING")switch(e.side){case"bottom":case"top":return"ns-resize";case"left":case"right":return"ew-resize"}else{if(e.state==="START_PANNING")return"grab";if(e.state==="PANNING")return"grabbing";if(e.state==="JUST_CLICKED_TOGGLE")return"grabbing";if(t.state==="HOVERING_WIDGET")return"grab";if(t.state==="HOVERING_RESIZE_HANDLER")switch(t.side){case"bottom":case"top":return"ns-resize";case"left":case"right":return"ew-resize";case"top-left":case"bottom-right":return"nwse-resize";case"top-right":case"bottom-left":return"nesw-resize"}else return t.state==="HOVERING_TOGGLE"?"pointer":t.state==="HOVERING_SLOTTABLE_RESIZE_HANDLER"?"ns-resize":t.state==="HOVERING_SLOTTABLE_SELECTOR"?"pointer":"default"}}}const Ne=()=>document.body.classList.contains("vscode-dark"),Ae=window.__baseURL?`${window.__baseURL}/media`:"",wo=(s,e,t,r,o,i)=>{let n=[];return wt(e)||(i||(n=n.concat(bo(s,t,r,o))),i&&(n=n.concat(So(s,t,r,o)).concat(Eo(s,t,r,o)))),n.concat(Io(s,t,r,e,o)).concat(xo(s,t,r,o))},wt=s=>{var e;return!((e=s.condition)==null||e)},So=(s,e,t,r)=>{const{row:o,height:i}=s.position,{x:n,y:l,height:c,width:a}=e.getCell(0,o),u=i*c,p=a*e.columns,d={x:n,y:l,width:p,height:u,referential:"world"},h=3,g=2,f=t.worldRect2screen(d);return r.strokeStyle="#3482E5",r.lineWidth=g,r.strokeRect(f.x+h,f.y,f.width-2*h,f.height),[]},Eo=(s,e,t,r)=>{const o=_o(s,e,t);return pe.drawResizeHandler(r,o),[{type:"resizer",position:o,elementId:s.id}]},_o=(s,e,t)=>{const{row:i,height:n}=s.position,{x:l,y:c,height:a,width:u}=e.getCell(0,i),p=n*a,d=u*e.columns,h=t.worldRect2screen({x:l,y:c,width:d,height:p,referential:"world"});return{x:h.x+h.width/2-20/2,y:h.y+h.height-6/2,width:20,height:6,referential:"screen"}},bo=(s,e,t,r)=>{const{row:o,height:i}=s.position,{x:n,y:l,height:c,width:a}=e.getCell(0,o),u=i*c,p=a*e.columns,d={x:n,y:l,width:p,height:u,referential:"world"},h=4,g=3,f=2,P=t.worldRect2screen(d);return r.strokeStyle="rgb(39, 67, 255, 0.13)",r.lineWidth=f,r.beginPath(),r.roundRect(P.x+g,P.y,P.width-2*g,P.height,h),r.stroke(),[]},Io=(s,e,t,r,o)=>{const{row:i,height:n}=s.position,l=Po(i,n,e,t),c=new Image(l.width,l.height);return c.src=wt(r)?`${Ae}/chevron-down-${Ne()?"dark":"light"}.svg`:`${Ae}/chevron-up-${Ne()?"dark":"light"}.svg`,c.style.viewBox=`0 0 ${l.width} ${l.height}`,o.drawImage(c,l.x,l.y,l.width,l.height),[{type:"toggle",position:l,elementId:s.id}]},Po=(s,e,t,r)=>{const{y:o}=t.getCell(0,e),i=24,n=24,l={x:-30,y:o+t.cellHeight*s-n,width:i,height:n,referential:"world"};return r.worldRect2screen(l)},xo=(s,e,t,r)=>{const{row:o}=s.position,i=Ro(o,e,t),n=new Image(i.width,i.height);return n.src=`${Ae}/drag-${Ne()?"dark":"light"}.svg`,r.drawImage(n,i.x,i.y,i.width,i.height),[{type:"selector",position:i,elementId:s.id}]},Ro=(s,e,t)=>{const{y:r}=e.getCell(0,s),o={x:-30,y:r,width:24,height:24,referential:"world"};return t.worldRect2screen(o)},Lo={"if-block":wo};class Ke{constructor(e,t){v(this,"context",null);v(this,"_slottables",[]);v(this,"selectableElements",[]);v(this,"getSlottableRenderedElement",(e,t)=>{var r;return(r=this.selectableElements.find(o=>o.elementId===e&&o.type===t))!=null?r:null});v(this,"getRenderedElementUnderCursor",(e,t)=>this._slottables.find(r=>{var i,n;const o=(n=(i=this.getSlottableRenderedElement(r.id,e))==null?void 0:i.position)!=null?n:null;return o?Oe(t,o):!1})||null);v(this,"getSelectorUnderCursor",e=>this.getRenderedElementUnderCursor("selector",e));v(this,"getToggleUnderCursor",e=>this.getRenderedElementUnderCursor("toggle",e));v(this,"getResizerUnderCursor",e=>this.getRenderedElementUnderCursor("resizer",e));this.layoutGrid=e,this.camera=t}static create(e,t){return new Ke(e,t)}setContext(e){this.context=e}set slottables(e){if(!this.context)throw new Error("No context set yet");this._slottables=Object.values(e)}renderSlottables(e){if(this.selectableElements=[],this._slottables.length!==0)for(const t of this._slottables)this.selectableElements=this.selectableElements.concat(this.renderSlottable(t,e===t.id))}renderSlottable(e,t){return Lo[e.type](e,e.props,this.layoutGrid,this.camera,this.context,t)}}const Oo=s=>e=>e[s],No=s=>[...new Set(s)];class Ve{constructor(){v(this,"_selectedWidgetsIds");v(this,"_selectedSlottableId");v(this,"layoutModel");this.layoutModel=null,this._selectedSlottableId=k(null),this._selectedWidgetsIds=k([])}static create(){return new Ve}setLayoutModel(e){this.layoutModel=e}get selectedWidgetsIds(){return this._selectedWidgetsIds.value}set selectedWidgetsIds(e){e.length!==0&&this.resetSelection(),this._selectedWidgetsIds.value=No(e)}get selectedWidgetId(){return this.selectedWidgetsIds[0]}get selectedWidget(){return this.layoutModel&&this.selectedWidgetId?this.layoutModel.getWidget(this.selectedWidgetId):null}get selectedWidgets(){return this.layoutModel?this.selectedWidgetsIds.map(e=>this.layoutModel.getWidget(e)):[]}addWidget(e){this.selectedWidgetsIds=[...this.selectedWidgetsIds,e]}addToSelectedWidgets(e){if(!this.layoutModel)return;const t=this.layoutModel.getWidgetOrSlottable(e);(!D(t)||this.selectedWidget&&!D(this.selectedWidget))&&this.clearWidgetSelection(),this.addWidget(e)}toggleWidgetSelection(e){this.selectedWidgetsIds.includes(e)?this.removeWidget(e):this.addWidget(e)}removeWidget(e){this.selectedWidgetsIds=this.selectedWidgetsIds.filter(t=>t!==e)}clearWidgetSelection(){this.selectedWidgetsIds=[]}selectAll(){!this.layoutModel||(this.selectedWidgetsIds=Object.keys(this.layoutModel.allWidgets))}get selectedSlottableId(){return this._selectedSlottableId.value}set selectedSlottableId(e){e&&this.resetSelection(),this._selectedSlottableId.value=e}get selectedSlottable(){return this.layoutModel&&this.selectedSlottableId?this.layoutModel.getSlottable(this.selectedSlottableId):null}has(e){return this.selectedWidgetsIds.includes(e)}resetSelection(){this.clearWidgetSelection(),this.selectedSlottableId=null}}class Ze{static get isMac(){return navigator.userAgent.includes("Mac OS X")}static get buildPlatform(){return{}.CURRENT_PLATFORM||"web"}}const Ao=s=>Ze.isMac&&s.ctrlKey,le=s=>Ze.isMac?s.metaKey:s.ctrlKey,Te=s=>s.altKey,J=s=>s.shiftKey,Re={alt:Te,"arrow-up":s=>s.code==="ArrowUp","arrow-down":s=>s.code==="ArrowDown","arrow-left":s=>s.code==="ArrowLeft","arrow-right":s=>s.code==="ArrowRight",ctrl:le,delete:s=>Ze.isMac?s.code==="Backspace":s.code==="Delete",enter:s=>s.code==="Enter",escape:s=>s.code==="Escape",shift:J,space:s=>s.code==="Space",a:s=>s.code==="KeyA",b:s=>s.code==="KeyB",c:s=>s.code==="KeyC",d:s=>s.code==="KeyD",f:s=>s.code==="KeyF",g:s=>s.code==="KeyG",h:s=>s.code==="KeyH",k:s=>s.code==="KeyK",p:s=>s.code==="KeyP",v:s=>s.code==="KeyV",x:s=>s.code==="KeyX",z:s=>s.code==="KeyZ",0:s=>s.code==="Digit0","[":s=>s.code==="BracketLeft","]":s=>s.code==="BracketRight"};class To{constructor(e){v(this,"pressedKeys");v(this,"evt");this.evt=e,this.pressedKeys={};const t=r=>o=>{Object.keys(Re).forEach(i=>{Re[i](o)&&this.setPressed(i,r)})};this.evt||(window.addEventListener("keydown",t(!0)),window.addEventListener("keyup",t(!1)))}setPressed(e,t){this.pressedKeys[e]=t}isPressed(e){var t;return this.evt?Re[e](this.evt):(t=this.pressedKeys[e])!=null?t:!1}}const Co=new To,ko=s=>e=>H.exports.uniq(s.map(Oo(e))).length===1,Do=s=>s.some(e=>j[e.type].autoHeight);function Wo(s,e){const t=ko(s),r=Do(s),o=[],i=16,n=6;return t("colStart")&&o.push({rect:{x:e.x-n/2,y:e.y+e.height/2-i/2,width:n,height:i,referential:"screen"},side:"left"}),t("colEnd")&&o.push({rect:{x:e.x+e.width-n/2,y:e.y+e.height/2-i/2,width:n,height:i,referential:"screen"},side:"right"}),t("colStart")&&t("rowStart")&&!r&&o.push({rect:{x:e.x-n/2,y:e.y-n/2,width:n,height:n,referential:"screen"},side:"top-left"}),t("colEnd")&&t("rowStart")&&!r&&o.push({rect:{x:e.x+e.width-n/2,y:e.y-n/2,width:n,height:n,referential:"screen"},side:"top-right"}),t("colStart")&&t("rowEnd")&&!r&&o.push({rect:{x:e.x-n/2,y:e.y+e.height-n/2,width:n,height:n,referential:"screen"},side:"bottom-left"}),t("colEnd")&&t("rowEnd")&&!r&&o.push({rect:{x:e.x+e.width-n/2,y:e.y+e.height-n/2,width:n,height:n,referential:"screen"},side:"bottom-right"}),t("rowStart")&&!r&&o.push({rect:{x:e.x+e.width/2-i/2,y:e.y-n/2,width:i,height:n,referential:"screen"},side:"top"}),t("rowEnd")&&!r&&o.push({rect:{x:e.x+e.width/2-i/2,y:e.y+e.height-n/2,width:i,height:n,referential:"screen"},side:"bottom"}),o}/*! +var $t=Object.defineProperty;var Gt=(s,e,t)=>e in s?$t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var v=(s,e,t)=>(Gt(s,typeof e!="symbol"?e+"":e,t),t);import{r as Ht}from"./index.d40cd19f.js";import{T as Bt,a as st}from"./Tab.1de0ecf6.js";import{r as k,d as z,b as y,c as E,x as w,W as fe,Z as pt,e as L,O as $e,Q as Ge,q as U,K as G,a2 as ce,ac as He,N as W,z as m,F as de,L as he,A as ue,D as M,v as gt,Y as ft,a as Ee,af as zt,G as ee,t as X,ae as Be,V as H,o as vt,al as Ut,E as Ft,am as jt,an as Kt,w as re,U as Vt,R as Zt,H as Jt,J as Qt,S as qt}from"./registerWidgets.89616af0.js";import{d as Yt,D as Xt,w as B,r as ze,i as Oe,a as es,v as ts,b as mt,p as rt,c as ss,m as rs}from"./DashPlayer.2457a054.js";import{R as os,S as is,_ as ns,L as as}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js";import{L as ls}from"./CircularLoading.0fb686c0.js";import{i as D,w as j,g as cs,s as ds,a as Q,b as C,c as me,f as oe,e as Ue,h as hs,j as us,k as ps}from"./runnerData.bd24d7de.js";import{p as gs,i as fs,x as Ie,y as Pe,z as vs,t as ms,A as ys}from"./icons.9cfdae6d.js";import{a as ws}from"./asyncComputed.8ac91a75.js";import{D as Ss}from"./dashes.f8616397.js";import{W as Es}from"./workspaces.621b79ad.js";import{B as _s}from"./BackButton.6e480dd1.js";import{S as bs}from"./SaveButton.c0a67dea.js";import{P as Is}from"./PreviewButton.4d9be351.js";import{D as Ps}from"./DocsButton.f9b71025.js";import{u as _e}from"./uuid.d6201508.js";import{P as Fe}from"./pubsub.d7600aa1.js";import"./executeJs.dfd1b55f.js";import"./PlayerNavbar.2a5ed820.js";import"./WidgetsFrame.2b06573d.js";import"./colors.bc71fdf2.js";import"./Modal.73e976a2.js";import"./passwordlessManager.884221ca.js";import"./Passwordless.ac83d40c.js";import"./forms.59430d62.js";import"./activeRecord.3d3c7835.js";import"./hooks.6e1e253e.js";import"./jobs.310261dd.js";import"./login.6c1df514.js";import"./lottie.fc57e5ac.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="efa4f088-5335-41c6-a755-119eb2d4961e",s._sentryDebugIdIdentifier="sentry-dbid-efa4f088-5335-41c6-a755-119eb2d4961e")}catch{}})();const T={left:20,right:20,top:20,bottom:200};class je{constructor(e){v(this,"_state");v(this,"_projectedElement",null);v(this,"grid");this.grid=e,this._state=k({x:0,y:0,zoom:1})}get x(){return this._state.value.x}set x(e){if(Number.isNaN(e))throw new Error("x is NaN");this._state.value.x=e}get y(){return this._state.value.y}set y(e){if(Number.isNaN(e))throw new Error("y is NaN");this._state.value.y=e}static create(e){return new je(e)}setProjectedCanvas(e){this._projectedElement=e,this.fit()}get projectedElement(){if(!this._projectedElement)throw new Error("Camera has no projected element");return this._projectedElement}updateGrid(e){this.grid=e}get zoom(){return this._state.value.zoom}set zoom(e){if(e<=0)throw new Error("Zoom must be positive");this._state.value.zoom=e}fit(){if(!this.grid.width)throw new Error(`Grid width is ${this.grid.width}}`);if(!this.grid.height)throw new Error(`Grid height is ${this.grid.height}`);const e=this.canvasRect,t=Math.max(e.width-T.left-T.right,1),r=Math.max(e.height-T.top-T.bottom,1);this.zoom=1;const o=Math.min(t/this.grid.width,r/this.grid.height);this.zoomIn(o,{x:e.x+e.width/2,y:e.y+e.height/2,referential:"screen"}),this.x=t>this.grid.width*o?-(e.x+e.width/2-o*this.grid.width/2)/o:-(e.x+T.left)/o,this.y=rt.x+T.left,o=e.x+e.widtht.width,l=e.height>t.height,c=e.y+e.heightt.y+T.top,u=e.y+e.height/2-(t.y+t.height/2),p=this.screenDelta2world({dx:n?o&&r?0:r?e.x-t.x-T.right:o?e.x+e.width-(t.x+t.width)+T.left:0:i,dy:l?c&&a?0:a?e.y-t.y-T.top:c?e.y+e.height-(t.y+t.height)+T.bottom:0:u,referential:"screen"});this.x+=p.dx,this.y+=p.dy}}const xs=s=>($e("data-v-fb3c93ab"),s=s(),Ge(),s),Rs={class:"dash-settings"},Ls={class:"dash-property"},Os=xs(()=>w("label",{class:"property-label"},"Name",-1)),Ns=z({__name:"DashSettings",props:{dash:null},setup(s){return(e,t)=>(y(),E("div",Rs,[w("div",Ls,[Os,fe(w("input",{"onUpdate:modelValue":t[0]||(t[0]=r=>s.dash.title=r),class:"property-input",placeholder:"Enter a name"},null,512),[[pt,s.dash.title]])]),L(os,{runtime:s.dash},null,8,["runtime"])]))}});const As=U(Ns,[["__scopeId","data-v-fb3c93ab"]]),Ts={class:"zoom-bar"},Cs={class:"zoom-value"},ks=z({__name:"ZoomBar",props:{camera:null},emits:["hover","leave"],setup(s,{emit:e}){const t=s,r=k(!1),o=k(null),i=()=>{var a;(a=t.camera)==null||a.zoomIn(1.1,{x:document.body.offsetWidth/2,y:document.body.offsetHeight/2,referential:"screen"})},n=()=>{var a;(a=t.camera)==null||a.zoomIn(.9,{x:document.body.offsetWidth/2,y:document.body.offsetHeight/2,referential:"screen"})},l=G(()=>{var c,a;return`${Math.floor(((a=(c=t.camera)==null?void 0:c.zoom)!=null?a:1)*100)}%`});return ce(()=>{var c;return(c=t.camera)==null?void 0:c.zoom},()=>{clearTimeout(o.value),r.value=!0,o.value=setTimeout(()=>r.value=!1,3e3)}),(c,a)=>fe((y(),E("div",{class:"zoom-bar-wrapper",onMouseover:a[0]||(a[0]=u=>e("hover")),onMouseleave:a[1]||(a[1]=u=>e("leave"))},[w("div",Ts,[w("span",{class:"zoom-control",onClick:n},"-"),w("span",Cs,W(m(l)),1),w("span",{class:"zoom-control",onClick:i},"+")])],544)),[[He,s.camera&&r.value]])}});const Ds=U(ks,[["__scopeId","data-v-f937a967"]]),ot={PandasDataFrame:"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html",PlotlyFigure:"https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html","datetime.time":"https://docs.python.org/3/library/datetime.html#datetime.time","datetime.date":"https://docs.python.org/3/library/datetime.html#datetime.date","io.IOBase":"https://docs.python.org/3/library/io.html#io.IOBase","time.struct_time":"https://docs.python.org/3/library/time.html#time.struct_time"},Ws="#E286A3",Ms="#EF9542",$s="#B462DB",Gs="#40B6D3",Hs="#6FB96E",Bs=[Ws,Ms,$s,Gs,Hs];function it(s){let e=s;return Object.keys(ot).forEach(t=>{if(s.includes(t)){const r=ot[t];e=e.replace(t,`${t}`)}}),e}const ie={},zs=s=>e=>{if(ie[e])return ie[e];const t=Object.keys(ie).length%s.length;return ie[e]=s[t],s[t]},nt=zs([...Bs]),Us=()=>{Object.keys(ie).forEach(s=>delete ie[s])};class Fs{constructor(){v(this,"globalEventListeners",[])}addGlobalEventListener(e,t){addEventListener(e,t),this.globalEventListeners.find(r=>r.evt===e)||this.globalEventListeners.push({evt:e,handler:t})}removeGlobalEventListeners(){this.globalEventListeners.forEach(({evt:e,handler:t})=>{removeEventListener(e,t)}),this.globalEventListeners=[]}}const js={class:"param-types"},Ks=["innerHTML"],Vs={key:1,class:"prop-type"},Zs=["innerHTML"],Js=z({__name:"ParamTypes",props:{param:null},setup(s){return(e,t)=>(y(),E("div",js,[s.param&&s.param.typeDescription?(y(!0),E(de,{key:0},he(s.param.typeDescription,r=>(y(),E("div",{key:r,class:"prop-type"},[w("p",{class:"type",style:ue({color:m(nt)(r)}),innerHTML:m(it)(r)},null,12,Ks)]))),128)):s.param&&s.param.typeName?(y(),E("div",Vs,[w("p",{class:"type",style:ue({color:m(nt)(s.param.typeName)}),innerHTML:m(it)(s.param.typeName)},null,12,Zs)])):M("",!0)]))}});const at=U(Js,[["__scopeId","data-v-d6aed39d"]]),Qs=["value","placeholder"],qs=["value","placeholder"],Ys=z({__name:"PythonPropInputRaw",props:{hasError:{type:Boolean},placeholder:null,value:null,paramName:null,isCode:{type:Boolean},commit:{type:Function}},emits:["input","change","clearSuggestions"],setup(s,{emit:e}){const t=s,r=gt({isActive:!1,hasChanges:!1}),o=c=>{e("input",c),r.hasChanges=!0},i=()=>{r.isActive=!1,e("clearSuggestions")},n=c=>{c.preventDefault();const a=c.target,u=a.selectionStart,p=a.selectionEnd,d=a.value;a.value=d.substring(0,u)+" "+d.substring(p),a.selectionStart=a.selectionEnd=u+1,a.dispatchEvent(new Event("input"))},l=c=>{t.commit(c),r.hasChanges=!1};return ft(()=>{r.hasChanges&&t.commit(t.value)}),(c,a)=>{var p,d;const u=Ee("icon");return y(),E("div",{class:ee(["input-container",{error:s.hasError}])},[L(u,{path:m(gs),class:"icon",fill:s.hasError?"#D35249":r.isActive?"#3482E5":void 0},null,8,["path","fill"]),s.isCode?(y(),E("textarea",{key:0,value:s.value,class:"prop-input",placeholder:(p=s.placeholder)!=null?p:void 0,onInput:a[0]||(a[0]=h=>o(h.target.value)),onClick:a[1]||(a[1]=h=>r.isActive=!0),onBlur:i,onKeydown:a[2]||(a[2]=zt(h=>n(h),["tab"])),onChange:a[3]||(a[3]=h=>l(h.target.value))},null,40,Qs)):(y(),E("input",{key:1,value:s.value,class:"prop-input",placeholder:(d=s.placeholder)!=null?d:void 0,onInput:a[4]||(a[4]=h=>o(h.target.value)),onClick:a[5]||(a[5]=h=>r.isActive=!0),onBlur:i,onChange:a[6]||(a[6]=h=>l(h.target.value))},null,40,qs))],2)}}});const Xs=U(Ys,[["__scopeId","data-v-d30fa88e"]]),er={class:"suggestions"},tr=["onMousedown"],sr=z({__name:"PythonAutoCompleteSuggestions",props:{suggestions:null},emits:["select"],setup(s,{emit:e}){return(t,r)=>fe((y(),E("div",er,[(y(!0),E(de,null,he(s.suggestions,o=>(y(),E("div",{key:o,class:"suggestion",onMousedown:i=>e("select",o)},W(o),41,tr))),128))],512)),[[He,s.suggestions.length]])}});const rr=U(sr,[["__scopeId","data-v-afec000d"]]),or={class:"python-wrapper"},ir=z({__name:"PythonPropInput",props:{hasError:{type:Boolean},placeholder:null,value:null,paramName:null,dashPlayerService:null,isCode:{type:Boolean},commit:{type:Function}},emits:["input"],setup(s,{emit:e}){const t=s,r=G(()=>t.dashPlayerService.suggestionsFor),o=G(()=>t.dashPlayerService.suggestions),i=a=>{l(t.paramName,a),e("input",a)},n=a=>{c(),e("input",a),t.commit(a)},l=async(a,u)=>{!u||t.dashPlayerService.getAutocompleteSuggestions(a,u)},c=async()=>{await Be(),t.dashPlayerService.clearSuggestions()};return(a,u)=>(y(),E("div",or,[L(Xs,{value:s.value,commit:s.commit,"is-code":s.isCode,"param-name":s.paramName,"dash-player-service":s.dashPlayerService,onInput:i,onClearSuggestions:c},null,8,["value","commit","is-code","param-name","dash-player-service"]),m(r)===s.paramName?(y(),X(rr,{key:0,suggestions:m(o),onSelect:n},null,8,["suggestions"])):M("",!0)]))}});const xe=U(ir,[["__scopeId","data-v-63688ff1"]]),nr={name:"If Block",description:"A block of elements that is only rendered depending on a condition",params:[{typeName:"Boolean",argName:"condition",isKwarg:!1,default:null}],defaultEditProps:{condition:!0},thumbname:"IfBlock.svg"},ae={"if-block":nr},Z=s=>($e("data-v-718f02de"),s=s(),Ge(),s),ar={class:"wrapper"},lr={class:"title"},cr={key:0,class:"widget-prop"},dr=Z(()=>w("h2",null,"Error",-1)),hr=Z(()=>w("p",{class:"section-description"},"Some errors were found while computing the widget.",-1)),ur=["textContent"],pr={key:1,class:"section"},gr=Z(()=>w("h2",null,"VARIABLE",-1)),fr={key:0,class:"section-content"},vr={class:"widget-prop"},mr=Z(()=>w("p",{class:"prop-label"},"Bind a variable",-1)),yr=Z(()=>w("p",{class:"prop-description"},"Create a variable to be controlled by this widget.",-1)),wr={class:"input-container"},Sr={key:0,class:"variable-error prop-error"},Er=Z(()=>w("pre",null,"Variable not defined",-1)),_r={key:1,class:"prop-error",textContent:"SyntaxError: This field must be a variable name"},br=["textContent"],Ir={key:2,class:"section"},Pr=Z(()=>w("h2",null,"EVENTS",-1)),xr={key:0,class:"section-content"},Rr=Z(()=>w("p",{class:"section-description"}," Each event is a Python code that runs on specified situations ",-1)),Lr={class:"prop-label"},Or={class:"prop-description"},Nr={class:"section"},Ar=Z(()=>w("h2",null,"PROPERTIES",-1)),Tr={key:0,class:"section-content"},Cr=Z(()=>w("p",{class:"section-description"}," Each property is a Python expression, make sure to use the correct syntax. ",-1)),kr={class:"prop-label"},Dr={class:"prop-description"},Wr=["textContent"],Mr=Z(()=>w("div",{class:"feedback"},null,-1)),$r=[Mr],Gr=z({__name:"WidgetEditor",props:{selectedWidgetErrors:null,layoutModel:null,selectedWidgets:null,dashPlayerService:null},emits:["close","create-variable"],setup(s,{emit:e}){const t=s,r=k(null);ce(()=>t.selectedWidgetErrors,()=>{r.value=null});const o=S=>{f.openedSections.includes(S)?f.openedSections=f.openedSections.filter(b=>b!==S):f.openedSections.push(S)},i=S=>f.openedSections.includes(S),n=S=>D(S)?j[S.type].name:ae[S.type].name,l=G(()=>r.value===null?t.selectedWidgetErrors:r.value==="variable"?H.exports.omit(t.selectedWidgetErrors,"variable"):{...t.selectedWidgetErrors,props:H.exports.omit(t.selectedWidgetErrors.props,r.value)}),c=G(()=>a.value.type.includes("-input")&&a.value.type!=="click-input"),a=G(()=>t.selectedWidgets[0]),u=G(()=>{var I;if(!D(a.value))return;const b=((I=j[a.value.type].pythonAPI.params)!=null?I:[]).find(O=>O.argName==="initial_value");return b||null});function p(S){this.style.height="0",this.style.height=this.scrollHeight-24+"px"}const d=new Fs,h=k(null),g=402,f=gt({isActive:!1,resizing:!1,width:g,openedSections:["properties","variable"]});vt(()=>{h.value&&(d.addGlobalEventListener("mouseup",()=>f.resizing=!1),d.addGlobalEventListener("mousemove",I=>P(I))),document.querySelectorAll(".widget-props-editor textarea").forEach(I=>{!I||(I.setAttribute("style","height:"+(I.scrollHeight-24)+"px;overflow-y:hidden;"),I.addEventListener("input",p,!1))})}),Ut(()=>{Us(),d.removeGlobalEventListeners()});const P=S=>{f.resizing&&(f.width=Math.max(f.width-S.movementX,g))},_=G(()=>({width:`${f.width}px`})),x=S=>ae[S.type].params,q=G(()=>{const S=(O,F)=>O.argName===F.argName&&O.typeName===F.typeName,b=(O,F,R)=>R.findIndex(se=>S(O,se))===F,I=O=>!O.formOnly;return t.selectedWidgets.flatMap(O=>{var F;return D(O)?(F=j[O.type])==null?void 0:F.pythonAPI.params:x(O)}).filter(Boolean).filter(I).filter(b)}),tt=G(()=>{const S=(I,O)=>I.key===O.key,b=(I,O,F)=>F.findIndex(R=>S(I,R))===O;return t.selectedWidgets.flatMap(I=>{var O;return D(I)?(O=j[I.type])==null?void 0:O.events:[]}).filter(Boolean).filter(b).filter(I=>I.key!=="change")}),Lt=S=>{t.layoutModel.updateVariable(S,a.value.id),r.value="variable"},Ot=S=>b=>{t.layoutModel.updateProp({param:S,value:b},t.selectedWidgets.map(I=>I.id)),r.value=S.argName},Nt=S=>b=>{t.layoutModel.updateEvent({event:S,value:b},t.selectedWidgets.map(I=>I.id))},At=()=>{var S,b;return(b=(S=l.value.variable)==null?void 0:S.repr)==null?void 0:b.includes("SyntaxError")},Tt=()=>{var S,b;return(b=(S=l.value.variable)==null?void 0:S.repr)==null?void 0:b.includes("NameError")},Ct=S=>{!S||(t.dashPlayerService.sendVariableCreated(S),e("create-variable",S))},kt=()=>{var S,b;return((S=l.value.widget)==null?void 0:S.repr)&&!Object.values((b=l.value.props)!=null?b:{}).some(I=>I.repr)},Dt=()=>{var S;return(S=l.value.widget)==null?void 0:S.repr},be=S=>{var b,I;return(I=(b=l.value.props)==null?void 0:b[S])==null?void 0:I.repr},Wt=S=>H.exports.upperFirst(S.replace(/_/g," "));return(S,b)=>{var O,F;const I=Ee("icon");return y(),E("div",{class:"widget-props-editor",style:ue(m(_))},[w("div",ar,[w("div",lr,[w("h1",null,W(n(m(a))),1),L(I,{path:m(fs),fill:"#414A58",class:"close-icon",width:"16",height:"16",onClick:b[0]||(b[0]=R=>e("close"))},null,8,["path"])]),kt()?(y(),E("div",cr,[dr,hr,w("pre",{class:"prop-error",textContent:W(Dt())},null,8,ur)])):M("",!0),m(c)?(y(),E("div",pr,[w("div",{class:"section-header",onClick:b[1]||(b[1]=R=>o("variable"))},[L(I,{path:i("variable")?m(Ie):m(Pe),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),gr]),i("variable")?(y(),E("div",fr,[w("div",vr,[mr,yr,w("div",wr,[L(xe,{placeholder:"variable_name","param-name":"variable","dash-player-service":s.dashPlayerService,value:(O=m(a).variable)!=null?O:"",commit:Lt,"is-code":!1,onInput:b[2]||(b[2]=R=>m(a).variable=R)},null,8,["dash-player-service","value"])]),Tt()&&m(a).variable?(y(),E("div",Sr,[Er,w("button",{onClick:b[3]||(b[3]=R=>Ct(m(a).variable))}," Create ")])):At()?(y(),E("pre",_r)):(F=m(l).variable)!=null&&F.repr?(y(),E("pre",{key:2,class:"prop-error",textContent:W(m(l).variable.repr)},null,8,br)):M("",!0),L(at,{param:m(u)},null,8,["param"])])])):M("",!0)])):M("",!0),m(tt).length?(y(),E("div",Ir,[w("div",{class:"section-header",onClick:b[4]||(b[4]=R=>o("events"))},[L(I,{path:i("events")?m(Ie):m(Pe),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),Pr]),i("events")?(y(),E("div",xr,[Rr,(y(!0),E(de,null,he(m(tt),R=>(y(),E("div",{key:R.key,class:"widget-prop"},[w("label",Lr,"On "+W(R.key),1),w("p",Or,"Executed after "+W(R.key),1),L(xe,{"param-name":R.key,"dash-player-service":s.dashPlayerService,value:m(a).events[R.key],commit:Nt(R),"is-code":!0,onInput:se=>m(a).events[R.key]=se},null,8,["param-name","dash-player-service","value","commit","onInput"])]))),128))])):M("",!0)])):M("",!0),w("div",Nr,[w("div",{class:"section-header",onClick:b[5]||(b[5]=R=>o("properties"))},[L(I,{path:i("properties")?m(Ie):m(Pe),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),Ar]),i("properties")?(y(),E("div",Tr,[Cr,(y(!0),E(de,null,he(m(q),R=>{var se;return y(),E("div",{key:R.argName,class:"widget-prop"},[w("p",kr,W(Wt(R.argName)),1),w("p",Dr,W(R.description),1),L(xe,{"has-error":!!be(R.argName),placeholder:(se=R.default)!=null?se:void 0,"param-name":R.argName,"dash-player-service":s.dashPlayerService,value:m(a).props[R.argName],commit:Ot(R),"is-code":!0,onInput:Mt=>m(a).props[R.argName]=Mt},null,8,["has-error","placeholder","param-name","dash-player-service","value","commit","onInput"]),be(R.argName)?(y(),E("pre",{key:0,class:"prop-error",textContent:W(be(R.argName))},null,8,Wr)):M("",!0),L(at,{param:R},null,8,["param"])])}),128))])):M("",!0)])]),w("div",{ref_key:"handlerRef",ref:h,class:"handler",onMousedown:b[6]||(b[6]=Ft(R=>f.resizing=!0,["stop"]))},$r,544)],4)}}});const Hr=U(Gr,[["__scopeId","data-v-718f02de"]]),yt=s=>($e("data-v-0d595f79"),s=s(),Ge(),s),Br={class:"interact-menu"},zr={class:"icon-container"},Ur=yt(()=>w("span",{class:"edit"},"Edit [Shift + P]",-1)),Fr={class:"icon-container"},jr=yt(()=>w("span",null,"Interact [Shift + P]",-1)),Kr=z({__name:"InteractMenu",props:{isPreview:{type:Boolean}},emits:["changePreview"],setup(s,{emit:e}){return(t,r)=>{const o=Ee("icon");return y(),E("div",Br,[w("div",zr,[L(o,{class:ee(["icon",{active:!s.isPreview}]),path:m(vs),fill:"#5A677A",onClick:r[0]||(r[0]=i=>e("changePreview",!1))},null,8,["class","path"]),Ur]),w("div",Fr,[L(o,{class:ee(["icon",{active:s.isPreview}]),path:m(ms),fill:"#5A677A",onClick:r[1]||(r[1]=i=>e("changePreview",!0))},null,8,["class","path"]),jr])])}}});const Vr=U(Kr,[["__scopeId","data-v-0d595f79"]]),Zr={class:"header"},Jr={key:0},Qr={key:1},qr={key:2,class:"state"},Yr={key:3,class:"state"},Xr={key:4,class:"state"},eo={key:5},to={key:6},so=z({__name:"RuntimeHeader",props:{dash:null,dashPlayerService:null},setup(s){return(e,t)=>(y(),E("div",Zr,[s.dash.title?(y(),E("p",Jr,W(s.dash.title),1)):(y(),E("p",Qr,W(s.dash.path),1)),s.dashPlayerService.state.type==="RUNNING"?(y(),E("p",qr,"\u{1F7E2} running")):s.dashPlayerService.state.type==="ERROR"?(y(),E("p",Yr,"\u274C error")):s.dashPlayerService.state.type==="AUTHENTICATING"?(y(),E("p",Xr," \u{1F510} authenticating ")):s.dashPlayerService.state.type==="IDLE"?(y(),E("p",eo,"\u26AA\uFE0F idle")):s.dashPlayerService.state.type==="READY"?(y(),E("p",to,"\u23F3 loading")):M("",!0)]))}});const ro=U(so,[["__scopeId","data-v-b5964f37"]]),oo={key:0,class:"widget-metadata-card"},io=["src"],no={class:"metadata-title"},ao={class:"metadata-description"},lo={key:1,class:"collapsed-widget-metadata-card"},co=["src"],ho=z({__name:"WidgetMetadataCard",props:{metadata:null,collapsed:{type:Boolean}},setup(s){const e=window.__baseURL?`${window.__baseURL}/media`:"",t=o=>o in ae?`${e}/${ae[o].thumbname}`:`${e}/widget-thumbs/${cs(o)}.svg`,r=window.__vscodeTheme===2?"dark":"light";return(o,i)=>s.collapsed?(y(),E("div",lo,[w("img",{class:"metadata-thumbnail",src:t(s.metadata.type),style:ue(m(r)==="dark"?{filter:"invert(1)"}:"")},null,12,co)])):(y(),E("div",oo,[w("img",{class:"metadata-thumbnail",src:t(s.metadata.type),style:ue(m(r)==="dark"?{filter:"invert(1)"}:"")},null,12,io),w("div",no,W(s.metadata.name),1),w("div",ao,W(s.metadata.description),1)]))}});const uo=U(ho,[["__scopeId","data-v-2b654c57"]]),ve={"click-input":-1,"text-output":0,"number-input":1,"text-input":2,"link-output":3,"multiple-choice-input":4,"file-input":5,"email-input":6,"markdown-output":7,"dropdown-input":8,"date-input":9,"cards-input":10,"textarea-input":11,"list-input":12,"file-output":13,"html-output":14,"pandas-output":15,"checkbox-input":16,"cnpj-input":17,"code-input":18,"progress-output":19,"pandas-row-selection-input":20,"image-input":21,"password-input":22,"currency-input":23,"iframe-output":24,"checklist-input":25,"image-output":26,"nps-input":27,"phone-input":28},po=z({__name:"WidgetsMetadataList",emits:["dragstart","hover","leave"],setup(s,{emit:e}){const t=k(""),r=k(),o=k(!0),i=()=>{o.value=!1},n=()=>{o.value=!0,c()},l=async()=>{await Be(),r.value&&r.value.focus()},c=()=>{t.value=""},a=Object.values(j).concat(Object.entries(ae).map(([d,h])=>({type:d,...h}))).reduce((d,h)=>h.formOnly?d:{...d,[h.type]:h},{}),u=G(()=>t.value?Object.values(a).map(d=>({widget:d,score:ds(d,t.value.split(" "))})).filter(({score:d})=>d>0).sort(({score:d},{score:h})=>h-d).map(({widget:d})=>d):Object.values(a).sort((d,h)=>{const g=d.type,f=h.type;if(g in ve){if(!(f in ve))return-1}else return 1;return ve[g]-ve[f]}));function p(d,h){e("dragstart",d,h)}return(d,h)=>{const g=Ee("icon");return y(),E("div",{class:"widgets-metadata",onMouseover:i,onMouseleave:n},[w("div",jt({class:["search",{collapsed:o.value}]},Kt(o.value?{click:l}:{},!0)),[L(g,{path:m(ys),class:"search-icon"},null,8,["path"]),o.value?M("",!0):fe((y(),E("input",{key:0,ref_key:"searchInput",ref:r,"onUpdate:modelValue":h[0]||(h[0]=f=>t.value=f),type:"search",class:"widgets-metadata-filter",placeholder:"Find widgets"},null,512)),[[pt,t.value]])],16),w("div",{class:ee(["widgets-metadata-list",{collapsed:o.value}])},[(y(!0),E(de,null,he(m(u),f=>(y(),X(uo,{key:f.type,metadata:f,draggable:!0,collapsed:o.value,onDragstart:P=>p(P,f.type)},{default:re(()=>[Vt(W(f.type),1)]),_:2},1032,["metadata","collapsed","onDragstart"]))),128))],2)],32)}}});const go=U(po,[["__scopeId","data-v-a17e6382"]]),fo={class:"dash-layout-editor"},vo=z({__name:"DashLayoutEditor",props:{dash:null,params:null,dashEditorService:null,workspace:null},emits:["navigate","create-variable","change-preview"],setup(s,{emit:e}){const t=s;console.log(t);const r=k(null),o=k(null),i=(_,x)=>t.dashEditorService.metadataDragStart(_,x),n=_=>e("navigate",_),l=_=>e("create-variable",_),c=_=>e("change-preview",_);t.dashEditorService.pubsub.subscribe("change-preview",c);const a=()=>{t.dashEditorService.hoverZoomBar()},u=()=>{t.dashEditorService.leaveZoomBar()};ce(t.dash.layout,()=>{t.dashEditorService.layoutModel.setLayout(t.dash.layout)}),t.dashEditorService.setupOnSave(),ce(t.dashEditorService.layoutModel,()=>t.dashEditorService.setupOnSave());const p=G(()=>t.dashEditorService.getWidgetsWithErrors()),d=G(()=>t.dashEditorService.getSelectedWidgetErrors()),h=k(null),g=k(null),f=k(null),P=k(null);return vt(()=>{t.dashEditorService.selection.setLayoutModel(t.dashEditorService.layoutModel),f.value&&P.value&&g.value&&o.value&&r.value&&h.value&&t.dashEditorService.setup(f.value,P.value,g.value,o.value,r.value,h.value)}),ft(()=>{t.dashEditorService.tearDown()}),ce(()=>t.dashEditorService.dashPlayerService.isAuthenticating(),_=>{_&&(t.dashEditorService.isPreview=!0)}),(_,x)=>(y(),E("div",fo,[fe(L(go,{onDragstart:i},null,512),[[He,!s.dashEditorService.isPreview]]),w("div",{ref_key:"editor",ref:f,class:ee(["editor"])},[w("div",{ref_key:"listeners",ref:P,class:"listeners",tabindex:"0"},[L(Xt,{ref_key:"player",ref:r,class:ee(["player",{preview:s.dashEditorService.isPreview}]),style:{top:0,left:0,height:"unset"},"is-preview":!0,params:s.params,camera:s.dashEditorService.camera,"editing-mode":!s.dashEditorService.isPreview,"force-responsivity":"desktop","widgets-with-errors":m(p),"dash-player-service":s.dashEditorService.dashPlayerService,onNavigate:n},null,8,["class","params","camera","editing-mode","widgets-with-errors","dash-player-service"]),w("canvas",{ref_key:"canvas",ref:g,class:ee(["layout-canvas",{hide:s.dashEditorService.isPreview}])},null,2)],512),L(ro,{ref_key:"runtimeHeader",ref:h,dash:s.dash,"dash-player-service":s.dashEditorService.dashPlayerService},null,8,["dash","dash-player-service"]),L(Vr,{ref_key:"interactMenu",ref:o,class:"interact-menu","is-preview":s.dashEditorService.isPreview,onChangePreview:c},null,8,["is-preview"])],512),(s.dashEditorService.selection.selectedWidgetsIds.length>0||s.dashEditorService.selection.selectedSlottableId)&&!s.dashEditorService.isPreview&&s.dashEditorService.mouseState.state==="IDLE"?(y(),X(Hr,{key:0,"selected-widget-errors":m(d),"layout-model":s.dashEditorService.layoutModel,"selected-widgets":s.dashEditorService.selection.selectedSlottable?[s.dashEditorService.selection.selectedSlottable]:s.dashEditorService.selection.selectedWidgets,"dash-player-service":s.dashEditorService.dashPlayerService,onClose:x[0]||(x[0]=q=>s.dashEditorService.selection.resetSelection()),onCreateVariable:l},null,8,["selected-widget-errors","layout-model","selected-widgets","dash-player-service"])):M("",!0),L(Ds,{camera:s.dashEditorService.camera,class:"zoom-bar",onHover:a,onLeave:u},null,8,["camera"])]))}});const mo=U(vo,[["__scopeId","data-v-7661d381"]]),yo="rgba(0, 128, 233, 0.05)";class pe{constructor(e,t){v(this,"context");this.canvas=e,this.context=this.canvas.getContext("2d"),t.slottableRenderer.setContext(this.context)}static create(e,t){return new pe(e,t)}render({mouseState:e,dashEditorService:t,hoverState:r,resizeHandlerRects:o,widgetsInRectangularSelection:i,selectedWidgets:n,computedState:l,isPreview:c,calculatedPositions:a,selectedSlottable:u}){const p=t.camera,d=t.dashPlayerService.layoutGrid,h=t.dashPlayerService.calculatePositions();if(t.dashPlayerService.state.type==="RUNNING"){if(!p)throw new Error("No camera value yet");this.renderFrame(d,p),this.renderGrid(d,p,e),this.renderWidgetShadow(l,d,p,a.widgets),this.renderInvisibleWidgets(p,a,d,h),this.renderWidgetHoverBorders(r,e,p,d,a.widgets),this.renderSelectionHull(e,p,d,n,a.widgets),this.renderWidgetsSelectionBorders(e,n,p,d,a.widgets),this.renderRectangularSelection(e),this.renderRectangularSelectionHovers(e,i,p,d,a.widgets),this.renderResizeHandlers(e,o),c||(t.slottableRenderer.slottables=a.slottables,t.slottableRenderer.renderSlottables(u))}}renderFrame(e,t){const r={x:0,y:0,width:e.width,height:e.height+e.navbarLength,referential:"world"};this.context.fillStyle="transparent",this.context.shadowColor="rgba(0,0,0,0.1)",this.context.shadowBlur=15;const o=t.worldRect2screen(r);this.context.fillRect(o.x,o.y,o.width,o.height),this.context.clearRect(o.x,o.y,o.width,o.height)}getGridDots(e,t){var u;const r=[];if(!e)return[];const o=t.worldPoint2screen({y:0,x:0,referential:"world"}),i=(u=t.projectedElement)==null?void 0:u.getBoundingClientRect(),n=e.margin*t.zoom,l=e.gap*t.zoom,c=e.cellHeight*t.zoom,a=(i.y+i.height-o.y-n)/(c+l);for(const p in Array(e.columns+1).fill(null))for(const d in Array(Math.ceil(a+1)).fill(null))r.push(t.worldPoint2screen({x:e.margin+parseInt(p)*(e.cellWidth+e.gap),y:e.margin+parseInt(d)*(e.cellHeight+e.gap)+e.navbarLength,referential:"world"}));return r}renderGrid(e,t,r){if(r.state==="MOVING"||r.state==="RESIZING"||r.state==="SLOTTABLE_RESIZING"||r.state==="MOVING_SLOTTABLE"||r.state==="DRAGGING_SLOTTABLE"||r.state==="DRAGGING"){this.context.fillStyle="rgba(0,0,0,0.1)";for(const o of this.getGridDots(e,t))this.context.beginPath(),this.context.ellipse(o.x,o.y,2,2,0,0,2*Math.PI),this.context.fill()}}renderWidgetShadow(e,t,r,o){this.context.fillStyle="rgba(0, 0, 0, 0.1)";for(const i in o){if(!e.operations.some(c=>c.path.includes(i)))continue;const n=o[i],l=r.worldRect2screen(B(n.position,t));this.context.fillRect(l.x,l.y,l.width,l.height)}}renderInvisibleWidgets(e,t,r,o){const n=t.widgets;for(const l in n){if(l in o.widgets)continue;const c=n[l],a=B(c.position,r),u={x:a.x+5,y:a.y+5,width:a.width-2*5,height:a.height-2*5,referential:"world"},p=e.worldRect2screen(u);this.context.fillStyle="rgba(0, 0, 0, 0.1)",this.context.fillRect(p.x,p.y,p.width,p.height),this.context.fillStyle="black",this.context.font="15px sans-serif",this.context.textAlign="center",this.context.textBaseline="middle",this.context.fillText(j[c.type].name,p.x+p.width/2,p.y+p.height/2)}}renderWidgetHoverBorders(e,t,r,o,i){if(this.context.strokeStyle="#ababab",e.state==="HOVERING_WIDGET"&&t.state==="IDLE"){const n=i[e.widgetId];if(!n)return;const l=r.worldRect2screen(B(n.position,o));this.context.strokeRect(l.x,l.y,l.width,l.height)}else(t.state==="MOVING"||t.state==="RESIZING"||t.state==="DRAGGING"||t.state==="SELECTING")&&Object.keys(i).forEach(n=>{const l=i[n],c=r.worldRect2screen(B(l.position,o));this.context.strokeRect(c.x,c.y,c.width,c.height)})}renderWidgetsSelectionBorders(e,t,r,o,i){if(e.state==="IDLE"||e.state==="SELECTING"){this.context.strokeStyle="#3482E5",this.context.lineWidth=2;for(const n of t){const l=i[n],c=r.worldRect2screen(B(l.position,o));this.context.strokeRect(c.x,c.y,c.width,c.height)}}}renderRectangularSelection(e){if(this.context.fillStyle=yo,e.state==="SELECTING"){const t=Math.min(e.initialMousePos.x,e.mousePos.x),r=Math.min(e.initialMousePos.y,e.mousePos.y),o=Math.abs(e.initialMousePos.x-e.mousePos.x),i=Math.abs(e.initialMousePos.y-e.mousePos.y),n={x:t,y:r,width:o,height:i};this.context.fillRect(n.x,n.y,o,i)}}renderRectangularSelectionHovers(e,t,r,o,i){if(this.context.strokeStyle="#3482E5",e.state==="SELECTING")for(const n of t){const l=i[n],c=r.worldRect2screen(B(l.position,o));this.context.strokeRect(c.x,c.y,c.width,c.height)}}renderSelectionHull(e,t,r,o,i){const n=ze(Object.entries(i).filter(([c])=>o.has(c)).map(([c,a])=>B(a.position,r)).filter(c=>c!==null));if(e.state!=="IDLE"||!n)return;this.context.strokeStyle="#3482E5";const l=t.worldRect2screen(n);this.context.strokeRect(l.x,l.y,l.width,l.height)}static drawResizeHandler(e,t){e.fillStyle="white",e.strokeStyle="#3482E5",e.lineWidth=1,e.fillRect(t.x,t.y,t.width,t.height),e.strokeRect(t.x,t.y,t.width,t.height)}renderResizeHandlers(e,t){if(e.state!=="MOVING")for(const{rect:r}of t)pe.drawResizeHandler(this.context,r)}cursor(e,t){if(e.state==="MOVING")return"grabbing";if(e.state==="SELECTING")return"crosshair";if(e.state==="RESIZING")switch(e.side){case"bottom":case"top":return"ns-resize";case"left":case"right":return"ew-resize"}else{if(e.state==="START_PANNING")return"grab";if(e.state==="PANNING")return"grabbing";if(e.state==="JUST_CLICKED_TOGGLE")return"grabbing";if(t.state==="HOVERING_WIDGET")return"grab";if(t.state==="HOVERING_RESIZE_HANDLER")switch(t.side){case"bottom":case"top":return"ns-resize";case"left":case"right":return"ew-resize";case"top-left":case"bottom-right":return"nwse-resize";case"top-right":case"bottom-left":return"nesw-resize"}else return t.state==="HOVERING_TOGGLE"?"pointer":t.state==="HOVERING_SLOTTABLE_RESIZE_HANDLER"?"ns-resize":t.state==="HOVERING_SLOTTABLE_SELECTOR"?"pointer":"default"}}}const Ne=()=>document.body.classList.contains("vscode-dark"),Ae=window.__baseURL?`${window.__baseURL}/media`:"",wo=(s,e,t,r,o,i)=>{let n=[];return wt(e)||(i||(n=n.concat(bo(s,t,r,o))),i&&(n=n.concat(So(s,t,r,o)).concat(Eo(s,t,r,o)))),n.concat(Io(s,t,r,e,o)).concat(xo(s,t,r,o))},wt=s=>{var e;return!((e=s.condition)==null||e)},So=(s,e,t,r)=>{const{row:o,height:i}=s.position,{x:n,y:l,height:c,width:a}=e.getCell(0,o),u=i*c,p=a*e.columns,d={x:n,y:l,width:p,height:u,referential:"world"},h=3,g=2,f=t.worldRect2screen(d);return r.strokeStyle="#3482E5",r.lineWidth=g,r.strokeRect(f.x+h,f.y,f.width-2*h,f.height),[]},Eo=(s,e,t,r)=>{const o=_o(s,e,t);return pe.drawResizeHandler(r,o),[{type:"resizer",position:o,elementId:s.id}]},_o=(s,e,t)=>{const{row:i,height:n}=s.position,{x:l,y:c,height:a,width:u}=e.getCell(0,i),p=n*a,d=u*e.columns,h=t.worldRect2screen({x:l,y:c,width:d,height:p,referential:"world"});return{x:h.x+h.width/2-20/2,y:h.y+h.height-6/2,width:20,height:6,referential:"screen"}},bo=(s,e,t,r)=>{const{row:o,height:i}=s.position,{x:n,y:l,height:c,width:a}=e.getCell(0,o),u=i*c,p=a*e.columns,d={x:n,y:l,width:p,height:u,referential:"world"},h=4,g=3,f=2,P=t.worldRect2screen(d);return r.strokeStyle="rgb(39, 67, 255, 0.13)",r.lineWidth=f,r.beginPath(),r.roundRect(P.x+g,P.y,P.width-2*g,P.height,h),r.stroke(),[]},Io=(s,e,t,r,o)=>{const{row:i,height:n}=s.position,l=Po(i,n,e,t),c=new Image(l.width,l.height);return c.src=wt(r)?`${Ae}/chevron-down-${Ne()?"dark":"light"}.svg`:`${Ae}/chevron-up-${Ne()?"dark":"light"}.svg`,c.style.viewBox=`0 0 ${l.width} ${l.height}`,o.drawImage(c,l.x,l.y,l.width,l.height),[{type:"toggle",position:l,elementId:s.id}]},Po=(s,e,t,r)=>{const{y:o}=t.getCell(0,e),i=24,n=24,l={x:-30,y:o+t.cellHeight*s-n,width:i,height:n,referential:"world"};return r.worldRect2screen(l)},xo=(s,e,t,r)=>{const{row:o}=s.position,i=Ro(o,e,t),n=new Image(i.width,i.height);return n.src=`${Ae}/drag-${Ne()?"dark":"light"}.svg`,r.drawImage(n,i.x,i.y,i.width,i.height),[{type:"selector",position:i,elementId:s.id}]},Ro=(s,e,t)=>{const{y:r}=e.getCell(0,s),o={x:-30,y:r,width:24,height:24,referential:"world"};return t.worldRect2screen(o)},Lo={"if-block":wo};class Ke{constructor(e,t){v(this,"context",null);v(this,"_slottables",[]);v(this,"selectableElements",[]);v(this,"getSlottableRenderedElement",(e,t)=>{var r;return(r=this.selectableElements.find(o=>o.elementId===e&&o.type===t))!=null?r:null});v(this,"getRenderedElementUnderCursor",(e,t)=>this._slottables.find(r=>{var i,n;const o=(n=(i=this.getSlottableRenderedElement(r.id,e))==null?void 0:i.position)!=null?n:null;return o?Oe(t,o):!1})||null);v(this,"getSelectorUnderCursor",e=>this.getRenderedElementUnderCursor("selector",e));v(this,"getToggleUnderCursor",e=>this.getRenderedElementUnderCursor("toggle",e));v(this,"getResizerUnderCursor",e=>this.getRenderedElementUnderCursor("resizer",e));this.layoutGrid=e,this.camera=t}static create(e,t){return new Ke(e,t)}setContext(e){this.context=e}set slottables(e){if(!this.context)throw new Error("No context set yet");this._slottables=Object.values(e)}renderSlottables(e){if(this.selectableElements=[],this._slottables.length!==0)for(const t of this._slottables)this.selectableElements=this.selectableElements.concat(this.renderSlottable(t,e===t.id))}renderSlottable(e,t){return Lo[e.type](e,e.props,this.layoutGrid,this.camera,this.context,t)}}const Oo=s=>e=>e[s],No=s=>[...new Set(s)];class Ve{constructor(){v(this,"_selectedWidgetsIds");v(this,"_selectedSlottableId");v(this,"layoutModel");this.layoutModel=null,this._selectedSlottableId=k(null),this._selectedWidgetsIds=k([])}static create(){return new Ve}setLayoutModel(e){this.layoutModel=e}get selectedWidgetsIds(){return this._selectedWidgetsIds.value}set selectedWidgetsIds(e){e.length!==0&&this.resetSelection(),this._selectedWidgetsIds.value=No(e)}get selectedWidgetId(){return this.selectedWidgetsIds[0]}get selectedWidget(){return this.layoutModel&&this.selectedWidgetId?this.layoutModel.getWidget(this.selectedWidgetId):null}get selectedWidgets(){return this.layoutModel?this.selectedWidgetsIds.map(e=>this.layoutModel.getWidget(e)):[]}addWidget(e){this.selectedWidgetsIds=[...this.selectedWidgetsIds,e]}addToSelectedWidgets(e){if(!this.layoutModel)return;const t=this.layoutModel.getWidgetOrSlottable(e);(!D(t)||this.selectedWidget&&!D(this.selectedWidget))&&this.clearWidgetSelection(),this.addWidget(e)}toggleWidgetSelection(e){this.selectedWidgetsIds.includes(e)?this.removeWidget(e):this.addWidget(e)}removeWidget(e){this.selectedWidgetsIds=this.selectedWidgetsIds.filter(t=>t!==e)}clearWidgetSelection(){this.selectedWidgetsIds=[]}selectAll(){!this.layoutModel||(this.selectedWidgetsIds=Object.keys(this.layoutModel.allWidgets))}get selectedSlottableId(){return this._selectedSlottableId.value}set selectedSlottableId(e){e&&this.resetSelection(),this._selectedSlottableId.value=e}get selectedSlottable(){return this.layoutModel&&this.selectedSlottableId?this.layoutModel.getSlottable(this.selectedSlottableId):null}has(e){return this.selectedWidgetsIds.includes(e)}resetSelection(){this.clearWidgetSelection(),this.selectedSlottableId=null}}class Ze{static get isMac(){return navigator.userAgent.includes("Mac OS X")}static get buildPlatform(){return{}.CURRENT_PLATFORM||"web"}}const Ao=s=>Ze.isMac&&s.ctrlKey,le=s=>Ze.isMac?s.metaKey:s.ctrlKey,Te=s=>s.altKey,J=s=>s.shiftKey,Re={alt:Te,"arrow-up":s=>s.code==="ArrowUp","arrow-down":s=>s.code==="ArrowDown","arrow-left":s=>s.code==="ArrowLeft","arrow-right":s=>s.code==="ArrowRight",ctrl:le,delete:s=>Ze.isMac?s.code==="Backspace":s.code==="Delete",enter:s=>s.code==="Enter",escape:s=>s.code==="Escape",shift:J,space:s=>s.code==="Space",a:s=>s.code==="KeyA",b:s=>s.code==="KeyB",c:s=>s.code==="KeyC",d:s=>s.code==="KeyD",f:s=>s.code==="KeyF",g:s=>s.code==="KeyG",h:s=>s.code==="KeyH",k:s=>s.code==="KeyK",p:s=>s.code==="KeyP",v:s=>s.code==="KeyV",x:s=>s.code==="KeyX",z:s=>s.code==="KeyZ",0:s=>s.code==="Digit0","[":s=>s.code==="BracketLeft","]":s=>s.code==="BracketRight"};class To{constructor(e){v(this,"pressedKeys");v(this,"evt");this.evt=e,this.pressedKeys={};const t=r=>o=>{Object.keys(Re).forEach(i=>{Re[i](o)&&this.setPressed(i,r)})};this.evt||(window.addEventListener("keydown",t(!0)),window.addEventListener("keyup",t(!1)))}setPressed(e,t){this.pressedKeys[e]=t}isPressed(e){var t;return this.evt?Re[e](this.evt):(t=this.pressedKeys[e])!=null?t:!1}}const Co=new To,ko=s=>e=>H.exports.uniq(s.map(Oo(e))).length===1,Do=s=>s.some(e=>j[e.type].autoHeight);function Wo(s,e){const t=ko(s),r=Do(s),o=[],i=16,n=6;return t("colStart")&&o.push({rect:{x:e.x-n/2,y:e.y+e.height/2-i/2,width:n,height:i,referential:"screen"},side:"left"}),t("colEnd")&&o.push({rect:{x:e.x+e.width-n/2,y:e.y+e.height/2-i/2,width:n,height:i,referential:"screen"},side:"right"}),t("colStart")&&t("rowStart")&&!r&&o.push({rect:{x:e.x-n/2,y:e.y-n/2,width:n,height:n,referential:"screen"},side:"top-left"}),t("colEnd")&&t("rowStart")&&!r&&o.push({rect:{x:e.x+e.width-n/2,y:e.y-n/2,width:n,height:n,referential:"screen"},side:"top-right"}),t("colStart")&&t("rowEnd")&&!r&&o.push({rect:{x:e.x-n/2,y:e.y+e.height-n/2,width:n,height:n,referential:"screen"},side:"bottom-left"}),t("colEnd")&&t("rowEnd")&&!r&&o.push({rect:{x:e.x+e.width-n/2,y:e.y+e.height-n/2,width:n,height:n,referential:"screen"},side:"bottom-right"}),t("rowStart")&&!r&&o.push({rect:{x:e.x+e.width/2-i/2,y:e.y-n/2,width:i,height:n,referential:"screen"},side:"top"}),t("rowEnd")&&!r&&o.push({rect:{x:e.x+e.width/2-i/2,y:e.y+e.height-n/2,width:i,height:n,referential:"screen"},side:"bottom"}),o}/*! * https://github.com/Starcounter-Jack/JSON-Patch * (c) 2017-2022 Joachim Wester * MIT licensed @@ -8,4 +8,4 @@ var $t=Object.defineProperty;var Gt=(s,e,t)=>e in s?$t(s,e,{enumerable:!0,config * (c) 2017-2021 Joachim Wester * MIT license */var Je=new WeakMap,Uo=function(){function s(e){this.observers=new Map,this.obj=e}return s}(),Fo=function(){function s(e,t){this.callback=e,this.observer=t}return s}();function jo(s){return Je.get(s)}function Ko(s,e){return s.observers.get(e)}function Vo(s,e){s.observers.delete(e.callback)}function Zo(s,e){e.unobserve()}function Jo(s,e){var t=[],r,o=jo(s);if(!o)o=new Uo(s),Je.set(s,o);else{var i=Ko(o,e);r=i&&i.observer}if(r)return r;if(r={},o.value=$(s),e){r.callback=e,r.next=null;var n=function(){Me(r)},l=function(){clearTimeout(r.next),r.next=setTimeout(n)};typeof window<"u"&&(window.addEventListener("mouseup",l),window.addEventListener("keyup",l),window.addEventListener("mousedown",l),window.addEventListener("keydown",l),window.addEventListener("change",l))}return r.patches=t,r.object=s,r.unobserve=function(){Me(r),clearTimeout(r.next),Vo(o,r),typeof window<"u"&&(window.removeEventListener("mouseup",l),window.removeEventListener("keyup",l),window.removeEventListener("mousedown",l),window.removeEventListener("keydown",l),window.removeEventListener("change",l))},o.observers.set(e,new Fo(e,r)),r}function Me(s,e){e===void 0&&(e=!1);var t=Je.get(s.object);Qe(t.value,s.object,s.patches,"",e),s.patches.length&&A(t.value,s.patches);var r=s.patches;return r.length>0&&(s.patches=[],s.callback&&s.callback(r)),r}function Qe(s,e,t,r,o){if(e!==s){typeof e.toJSON=="function"&&(e=e.toJSON());for(var i=ke(e),n=ke(s),l=!1,c=n.length-1;c>=0;c--){var a=n[c],u=s[a];if(Ce(e,a)&&!(e[a]===void 0&&u!==void 0&&Array.isArray(e)===!1)){var p=e[a];typeof u=="object"&&u!=null&&typeof p=="object"&&p!=null&&Array.isArray(u)===Array.isArray(p)?Qe(u,p,t,r+"/"+Y(a),o):u!==p&&(o&&t.push({op:"test",path:r+"/"+Y(a),value:$(u)}),t.push({op:"replace",path:r+"/"+Y(a),value:$(p)}))}else Array.isArray(s)===Array.isArray(e)?(o&&t.push({op:"test",path:r+"/"+Y(a),value:$(u)}),t.push({op:"remove",path:r+"/"+Y(a)}),l=!0):(o&&t.push({op:"test",path:r,value:s}),t.push({op:"replace",path:r,value:e}))}if(!(!l&&i.length==n.length))for(var c=0;c{var h,g;return(g=(h=Q(d,e))==null?void 0:h.colStart)!=null?g:null}).filter(d=>d!==null)),c=Math.max(...n.map(d=>{var h,g;return(g=(h=Q(d,e))==null?void 0:h.colEnd)!=null?g:null}).filter(d=>d!==null)),a=Math.min(...n.map(d=>{var h,g;return(g=(h=Q(d,e))==null?void 0:h.rowStart)!=null?g:null}).filter(d=>d!==null)),u=c>i.columns-1?i.columns-1-c:l<0?-l:0,p=a<0?-a:0;return n.flatMap(d=>{const h=Q(d,e);if(u===0&&p===0)return[];if(!h||!D(h))return[];const g=V(K(d,C(e)),e);return[{op:"replace",path:`${g}/${d}/colStart`,backup:h,value:h.colStart+u},{op:"replace",path:`${g}/${d}/colEnd`,backup:h,value:h.colEnd+u},{op:"replace",path:`${g}/${d}/rowStart`,backup:h,value:h.rowStart+p},{op:"replace",path:`${g}/${d}/rowEnd`,backup:h,value:h.rowEnd+p}]})}const K=(s,e,t=null)=>{for(const r in e){const o=e[r];if(D(o)){if(r==s)return t}else{const i=K(s,o.slot,r);if(i)return i}}return null},Yo=(s,e)=>s.rowStart>=e.row&&s.rowStart{var t;return(t=Object.keys(e.slottables).find(r=>Yo(s,e.slottables[r].position)))!=null?t:null},ct=(s,e)=>{const t=C(e),r=(i,n,l)=>{for(const c in n){if(c==i)return l;const a=n[c];if(D(a))continue;const u=r(i,a.slot,`${l}/${c}/slot`);if(u)return u}return null},o=r(s,t,me(e));if(!o)throw new Error("Widget not found in layout");return o},V=(s,e)=>s?`${me(e)}/${s}/slot`:me(e),Se=(s,e,t)=>{if(t){const o=e.slottables[t];return{...s,rowStart:s.rowStart-o.position.row,rowEnd:s.rowEnd-o.position.row}}const r=Object.values(e.slottables).reduce((o,i)=>o+(i.position.row{const r=t.dashPlayerService.layoutGrid;return ze(Object.entries(e.widgets).filter(([o])=>s.has(o)).map(([o,i])=>B(e.widgets[o].position,r)).filter(o=>o!==null))};function ri(s){const{mouseState:e,dashEditorService:t,calculatedPositions:r}=s,o=t.dashPlayerService.layoutGrid;if(e.state!=="SLOTTABLE_RESIZING")return[];const i=r.slottables[e.slottableId],n={colStart:0,rowStart:i.position.row,colEnd:o.columns,rowEnd:i.position.row+i.position.height},l=o.rectFromArea(n);if(!l)return[];const c=It(s,l,o.width,o.cellHeight);if(!c)return[];const a=o.areaFromRect(c);return[{op:"replace",path:`/slot/${e.slottableId}/height`,backup:i.position.height,value:a.rowEnd-a.rowStart+1}]}function oi(s){const{mouseState:e,selectedWidgets:t,dashEditorService:r,workingLayout:o,calculatedPositions:i}=s,n=r.dashPlayerService.layoutGrid;if(e.state!=="RESIZING")return[];const l=e.side,c=si(s);if(!c)return[];const a=Array.from(t).filter(d=>{const h=i.widgets[d];return es(B(h.position,n),c,l)}),{minWidth:u,minHeight:p}=j[e.type].dashProperties;return a.flatMap(d=>{const h=i.widgets[d],g=B(h.position,n),f=It(s,g,u,p);if(!f)return[];const P=K(d,C(o.layout)),_=V(P,o.layout),x=n.areaFromRect(g),q=Se(n.areaFromRect(f),i,P);return[{op:"replace",path:`${_}/${d}/colStart`,backup:x.colStart,value:Math.max(q.colStart,0)},{op:"replace",path:`${_}/${d}/colEnd`,backup:x.colEnd,value:Math.min(q.colEnd,n.columns-1)},{op:"replace",path:`${_}/${d}/rowStart`,backup:x.rowStart,value:Math.max(q.rowStart,0)},{op:"replace",path:`${_}/${d}/rowEnd`,backup:x.rowEnd,value:q.rowEnd}]})}function ii(s){const{mouseState:e,dashEditorService:t,calculatedPositions:r}=s,o=t.dashPlayerService.layoutGrid;if(e.state!=="DRAGGING")return{operations:[]};const i=Object.values(j[e.type].pythonAPI.params).reduce((g,f)=>(f.isKwarg||!f.dashesInitialValue||(g[f.argName]=f.dashesInitialValue),g),{}),{initialWidth:n,initialHeight:l}=j[e.type].dashProperties,c=o.areaFromRect({x:e.x,y:e.y,width:n,height:l,referential:"world"}),a=bt(c,r),u=V(a,s.workingLayout.layout),p=_e(),d={id:p,type:e.type,props:{...i},...Se(c,r,a),events:{}};return{operations:[{op:"add",path:`${u}/${p}`,value:d}],widgetId:p}}const Pt=({j:s},e)=>({row:s,height:e,order:0}),ni=(s,e)=>Object.keys(s).reduce((t,r)=>(r===e||(t[r]=s[r]),t),{}),xt=(s,e,t)=>{const r=t?{...e,slottables:ni(e.slottables,t)}:e,o=Math.max(Object.values(r.slottables).reduce((n,l)=>l.position.row>=s.row?n:l.position.row+l.position.height<=s.row?n-l.position.height:n-(s.row-l.position.row),s.row),0),i=ai(s,r);return{...s,row:o,order:i}},dt=(s,e,t)=>Object.values(e.slottables).filter(r=>r.id!==t).find(r=>s.row>=r.position.row+r.position.height/2&&s.row<=r.position.row+r.position.height),ht=(s,e,t)=>Object.values(e.slottables).filter(r=>r.id!==t).filter(r=>r.position.row+r.position.height/2>s.row&&r.position.row<=s.row+s.height).reduce((r,o)=>!r||o.position.order{var u,p;const t=dt(s,e),r=ht(s,e),o=t?ht(t.position,e,t.id):null,i=r?dt(r.position,e,r.id):null,n=[t,i].reduce((d,h)=>d?h&&d.position.order>h.position.order?h:d:h,null),l=[r,o].reduce((d,h)=>d?h&&d.position.order!r.has(p)&&!(t!=null&&t.some(d=>p==d))&&D(n[p])).sort((p,d)=>ts(oe(p,C(e)),oe(d,C(e)))),a=[...r,...t||[]].map(p=>oe(p,C(e))).filter(p=>p!=null),u=[];return c.forEach(p=>{const d=oe(p,C(e));if(!d||!D(d))return;let h=0,g={...d};const f=()=>a.some(P=>mt(g,P));for(;f();)h++,g={...d,rowStart:d.rowStart+h,rowEnd:d.rowEnd+h};if(h){const P=V(i,e);u.push({op:"replace",path:`${P}/${p}/rowStart`,backup:d.rowStart,value:d.rowStart+h}),u.push({op:"replace",path:`${P}/${p}/rowEnd`,backup:d.rowEnd,value:d.rowEnd+h})}a.push(g)}),u}function di(s,e,t,r){const o=s.selectedWidgets;if(!o.size)return[];const i=[...o],n=[];return i.some(c=>{const a=K(c,C(r)),u=a?Ue(a,r).slot:C(r),p=Object.keys(u).filter(h=>!o.has(h)&&D(u[h])),d=Q(c,r);return p.some(h=>mt(d,u[h]))})&&o.forEach(c=>{const a=oe(c,C(r)),u=V(K(c,C(r)),r);!a||!D(a)||(n.push({op:"replace",path:`${u}/${c}/rowStart`,backup:a.rowStart,value:a.rowStart-t}),n.push({op:"replace",path:`${u}/${c}/rowEnd`,backup:a.rowEnd,value:a.rowEnd-t}),n.push({op:"replace",path:`${u}/${c}/colStart`,backup:a.colStart,value:a.colStart-e}),n.push({op:"replace",path:`${u}/${c}/colEnd`,backup:a.colEnd,value:a.colEnd-e}))}),n}function hi(s,e){const t=[],r=[];for(const o of e){const i=_e();t.push({op:"add",path:`/slot/${i}`,value:{...H.exports.cloneDeep(o),id:i}}),r.push(i)}return{operations:t,widgetsId:r}}function ui(s){const e=$(s.workingLayout.layout),t=ci(s,e);A(e,t);const r=Xo(s);A(e,r);const o=ei(s,e);A(e,o);const i=oi(s);A(e,i);const n=ri(s);A(e,n);const l=ii(s);A(e,l.operations);const c=li(s);A(e,c.operations);const a=qe(s,e,l.widgetId?[l.widgetId]:[]);A(e,a);const u=Rt(s,e,l.widgetId?[l.widgetId]:[]);return A(e,u),{layout:e,operations:[...t,...o,...r,...i,...n,...l.operations,...a,...u,...c.operations]}}function pi(s,e,t){const r=s.workingLayout.layout,o=ti(s,e,t,r);A(r,o);const i=di(s,e,t,r);A(r,i);const n=qe(s,r);return A(r,n),[...o,...i,...n]}function gi(s,e){const t=s.workingLayout.layout,r=hi(s,e);A(t,r.operations);const o=qe(s,t,r.widgetsId);A(t,o);const i=Rt(s,t,r.widgetsId);return A(t,i),[...r.operations,...o,...i]}const fi=()=>window.location.href.startsWith("vscode-webview://"),vi=(s,e)=>{!fi()||window.vscode.postMessage({type:"usage-event",event:{type:s,payload:e}})},mi=async({operations:s,name:e})=>{vi("widgets_updated",{checkpoint:e,operations:$(s)})};class Ye{constructor(e,t){v(this,"pubsub");v(this,"checkpointHistory",{undos:[],redos:[]});v(this,"_save",null);this.workingLayout=e,this.dashEditorService=t,this.pubsub=new Fe}static create(e,t){return new Ye(e,t)}setWorkingLayout(e){this.workingLayout=e}undo(){if(this.dashEditorService.isPreview||!this.checkpointHistory.undos.length)return;const e=this.checkpointHistory.undos.pop();if(e)return A(this.workingLayout,e.operations),this.checkpointHistory.redos.push(Le(e)),e}redo(){if(this.dashEditorService.isPreview)return;const e=this.checkpointHistory.redos.pop();if(e)return A(this.workingLayout,e.operations),this.checkpointHistory.undos.push(Le(e)),e}execute(e){this.dashEditorService.isPreview||(A(this.workingLayout,e.operations),this.checkpointHistory.undos.push(Le(e)),this.checkpointHistory.redos=[],this.save(),this.pubsub.publish("updated"),mi(e))}onSave(e){this._save=e}save(){var e;(e=this._save)==null||e.call(this)}}const Le=s=>({selection:s.selection,name:`RE: ${s.name}`,operations:s.operations.slice().reverse().map(e=>yi(e))}),yi=s=>{switch(s.op){case"add":return{op:"remove",backup:s.value,path:s.path};case"remove":return{op:"add",path:s.path,value:s.backup};case"replace":return{op:"replace",backup:s.value,path:s.path,value:s.backup}}};class Xe{constructor(e,t){v(this,"operationQueue");v(this,"pubsub");this.layout=e,this.pubsub=new Fe,this.operationQueue=Ye.create(e,t)}getRootSlot(){return C(this.layout)}getRootSlotPath(){return me(this.layout)}setLayout(e){this.operationQueue.setWorkingLayout(e)}static create(e,t){return new Xe(e,t)}getWidget(e){return Q(e,this.layout)}getWidgetOrSlottable(e){const t=hs(e,this.layout);if(!t)throw new Error(`Could not find widget or slottable with id ${e}`);return t}get widgets(){return this.getRootSlot()}get allWidgets(){const e=t=>Object.entries(t).reduce((r,[o,i])=>D(i)?{...r,[o]:i}:{...r,...e(i.slot)},{});return e(this.widgets)}getSlottable(e){return Ue(e,this.layout)}redo(){let e=this.operationQueue.redo();for(;e&&e.operations.length===0;)e=this.operationQueue.redo();return this.operationQueue.save(),e}undo(){let e=this.operationQueue.undo();for(;e&&e.operations.length===0;)e=this.operationQueue.undo();return this.operationQueue.save(),e}updateVariable(e,t){const r=this.getWidget(t);if(!D(r))return;const o=V(K(t,this.getRootSlot()),this.layout);this.operationQueue.execute({name:"update variable",selection:new Set([t]),operations:[{op:"replace",backup:r.variable,value:e,path:`${o}/${t}/variable`}]})}updateProp({param:e,value:t},r){const o=n=>this.getWidgetOrSlottable(n).props,i=(n,l,c)=>{const a=ct(n,this.layout);return[{op:"replace",backup:o(n)[l],value:c,path:`${a}/${n}/props/${l}`}]};this.operationQueue.execute({name:"update props",operations:r.flatMap(n=>i(n,e.argName,t)),selection:new Set(r)})}updateEvent({event:e,value:t},r){const o=n=>this.getWidget(n).events,i=(n,l,c)=>{const a=V(K(n,this.getRootSlot()),this.layout);return[{op:"replace",backup:o(n)[l],value:c,path:`${a}/${n}/events/${l}`}]};this.operationQueue.execute({name:"update events",operations:r.flatMap(n=>i(n,e.key,t)),selection:new Set(r)})}delete(e){this.operationQueue.execute({name:"widgets deleted",operations:e.map(t=>{const r=ct(t,this.layout);return{op:"remove",backup:this.getWidgetOrSlottable(t),path:`${r}/${t}`}}),selection:new Set(e)})}onSave(e){this.operationQueue.onSave(e)}updateVersion(){this.layout.version!=="0.2"&&this.operationQueue.execute({name:"Version updated",operations:[{op:"replace",backup:this.layout.version,value:"0.2",path:"/version"},{op:"add",value:this.layout.widgets,path:"/slot"},{op:"remove",path:"/widgets",backup:this.layout.widgets}],selection:new Set})}}const wi=s=>({type:"copyAndPaste",selectedWidgets:s});function Si(s,e){return s.setData("text/plain",JSON.stringify(wi(e))),!0}function Ei(s,e,t){const r=s.getData("text/plain");try{const o=r&&JSON.parse(r);if(!(o&&"type"in o&&o.type==="copyAndPaste"&&"selectedWidgets"in o&&Array.isArray(o.selectedWidgets)))return!1;const n=gi(e,o.selectedWidgets);return t.operationQueue.execute({name:"paste",operations:n,selection:e.selectedWidgets}),!0}catch{return!1}}class _i{constructor(e){v(this,"event");this.event=e}setData(e,t){var r;(r=this.event.clipboardData)==null||r.setData(e,t)}getData(e){var t,r;return(r=(t=this.event.clipboardData)==null?void 0:t.getData(e))!=null?r:null}getTransferItems(){var e,t;return Object.values((t=(e=this.event.clipboardData)==null?void 0:e.items)!=null?t:[]).map(Ii)}}class bi{constructor(e){v(this,"item");this.item=e}get type(){return this.item.type}getAsString(){return new Promise(e=>this.item.getAsString(t=>e(t)))}getJSONValue(){return this.getAsString().then(e=>{try{return e?JSON.parse(e):null}catch{return null}})}getAsFile(){return this.item.getAsFile()}}function Ii(s){return new bi(s)}function ut(s){return new _i(s)}function Pi(s){var t;const e=(t=document.getSelection())==null?void 0:t.toString();return(s==null?void 0:s.selectionStart)!==void 0||!!e}class et{constructor(e,t,r){v(this,"dash");v(this,"zoom");v(this,"prevSlot");v(this,"_collapsedSlottables");v(this,"_isPreview");v(this,"camera");v(this,"slottableRenderer");v(this,"selection");v(this,"dashPlayerService");v(this,"layoutModel");v(this,"workspace");v(this,"_mouseState");v(this,"_hoverState");v(this,"pubsub");v(this,"editor");v(this,"listener");v(this,"canvas");v(this,"interactMenu");v(this,"dashPlayer");v(this,"runtimeHeader");v(this,"canvasService");v(this,"computedState");v(this,"throttledWidgetsChangedSend",H.exports.throttle(()=>{H.exports.isEqual(this.dash.rootSlot,this.prevSlot)||(this.prevSlot=H.exports.cloneDeep(this.dash.rootSlot),this.dashPlayerService.sendWidgetsChanged(this.dash.rootSlot))},500));v(this,"startPanning",()=>{this.mouseState.state!=="PANNING"&&(this.mouseState.state="START_PANNING")});v(this,"onKeyDownEvents",e=>({escape:()=>this.escapeEvent(),backspace:()=>this.backspaceEvent(),delete:()=>this.backspaceEvent(),z:()=>this.undoEvent(e),arrowup:()=>this.arrowUpEvent(),arrowdown:()=>this.arrowDownEvent(),arrowleft:()=>this.arrowLeftEvent(),arrowright:()=>this.arrowRightEvent(),a:()=>this.selectAllEvent(e),p:()=>this.togglePreviewEvent(e),space:()=>this.startPanning()}));v(this,"resizeEventListener",e=>function(t){e.centerCanvasHandler(t)});v(this,"copyEventListener",e=>function(t){e.copyHandler(t)});v(this,"pasteEventListener",e=>function(t){e.pasteHandler(t)});v(this,"mousemoveEventListener",e=>function(t){e.mouseMoveHandler(t)});v(this,"mouseupEventListener",e=>function(t){e.mouseup(t)});v(this,"updateHoverStateOnResizeHandler",e=>{for(const t of this.getResizeHandlerRects())if(Oe(e,t.rect)){this.hoverState={state:"HOVERING_RESIZE_HANDLER",side:t.side};return}});v(this,"updateHoverStateOnWidget",e=>{var o;if(this.dashPlayerService.state.type!=="RUNNING")return;const{widgets:t}=this.calculatePositions(),r=(o=Object.keys(t).find(i=>Oe(this.camera.screenPoint2world(e),B(t[i].position,this.dashPlayerService.layoutGrid))))!=null?o:null;r?this.hoverState={state:"HOVERING_WIDGET",widgetId:r}:this.hoverState={state:"NONE"}});window.__dashEditorService=this,this.zoom={active:!1,hoverZoomBar:!1},this._isPreview=k(!1),this.dashPlayerService=e,this.dashPlayerService.layoutGrid.calculatePositions=()=>this.isPreview?this.dashPlayerService.calculatePositions():this.calculatePositions(),this.camera=je.create(this.dashPlayerService.layoutGrid),this.slottableRenderer=Ke.create(this.dashPlayerService.layoutGrid,this.camera),this._collapsedSlottables=Zt({}),this._mouseState={state:"IDLE"},this._hoverState={state:"NONE"},this.selection=Ve.create(),this.dash=t,this.workspace=r,this.pubsub=new Fe,this.layoutModel=Xe.create(H.exports.cloneDeep(this.dash.layout),this),this.layoutModel.updateVersion(),this.prevSlot=H.exports.cloneDeep(us(this.getRootWidgets(),j)),this.dashPlayerService.onWidgetsComputedMessage(o=>{var l;const i=Object.keys(this.dashPlayerService.runnerData.layout.slot),n=Object.keys((l=o.props)!=null?l:{});ps(i,n)})}overloadCollapsedSlottablesCondition(e){return Object.entries(e).reduce((t,[r,o])=>r in this.collapsedSlottables?{...t,[r]:{condition:!0}}:{...t,[r]:o},{})}get collapsedSlottables(){return this._collapsedSlottables.value}set collapsedSlottables(e){this._collapsedSlottables.value=e}get isPreview(){return this._isPreview.value}set isPreview(e){this._isPreview.value=e}get mouseState(){return this._mouseState}set mouseState(e){this._mouseState=e}get hoverState(){return this._hoverState}set hoverState(e){this._hoverState=e}getWidgetsWithErrors(){const e=this.dashPlayerService.state;return e?e.type!=="RUNNING"?[]:Object.keys(this.layoutModel.widgets).reduce((t,r)=>{var l,c,a;const o=(l=e.errors.props)==null?void 0:l[r],i=(c=e.errors.variables)==null?void 0:c[r],n=(a=e.errors.widgets)==null?void 0:a[r];return!o&&!i&&!n||!Object.keys({...o,...i,...n}).length?t:t?[...t,r]:[r]},[]):[]}getSelectedWidgetErrors(){var r,o,i,n,l,c;const e={},t=this.dashPlayerService.state;return!t||t.type!=="RUNNING"?e:{props:(o=t.errors.props)==null?void 0:o[(r=this.selection.selectedSlottableId)!=null?r:this.selection.selectedWidgetId],widget:(n=t.errors.widgets)==null?void 0:n[(i=this.selection.selectedSlottableId)!=null?i:this.selection.selectedWidgetId],variable:(c=t.errors.variables)==null?void 0:c[(l=this.selection.selectedSlottableId)!=null?l:this.selection.selectedWidgetId]}}setupOnSave(){this.layoutModel.onSave(async()=>{!this.workspace||(this.dash.layout=this.layoutModel.layout,this.dashPlayerService.updateDashData(this.dash.makeRunnerData(this.workspace)),this.throttledWidgetsChangedSend())})}hoverZoomBar(){this.zoom.hoverZoomBar=!0}leaveZoomBar(){this.zoom.hoverZoomBar=!1}getRootWidgets(){return Object.keys(this.dash.rootSlot).reduce((e,t)=>{const r=this.dash.rootSlot[t];return r.position&&(e[t]=r),e},{})}static create(e,t,r){return new et(e,t,r)}async restart(){this.dashPlayerService.start(),await this.dashPlayerService.wait("widgets-computed"),this.dashPlayerService.sendWidgetsChanged(this.dash.rootSlot)}metadataDragStart(e,t){if(!this.camera)return;const r=this.camera.screenPoint2world({x:e.pageX,y:e.pageY,referential:"screen"});this.selection.resetSelection(),t in ae?this.mouseState={state:"DRAGGING_SLOTTABLE",...r,type:t}:this.mouseState={state:"DRAGGING",...r,type:t}}fixPosition(e){if(!this.canvas)return;const{origin:t,element:r,ignoreZoom:o}=e;if(!this.camera||!r||!r.style)return;const i=this.camera.worldPoint2screen(t),n=this.canvas.getBoundingClientRect(),l=[`translate(${i.x-n.x}px, ${i.y-n.y}px)`,o?null:`scale(${this.camera.zoom})`].filter(c=>c).join(" ");Object.assign(r.style,{transform:l,transformOrigin:"top left"})}fixCanvasRectPosition(){var i,n,l,c,a,u,p,d,h,g;const e=this.camera.screenRect2world(this.camera.canvasRect),t=this.camera.screenDelta2world({dx:8,dy:8,referential:"screen"}),r=this.camera.screenRect2world({x:(i=this.interactMenu)==null?void 0:i.$el.getBoundingClientRect().x,y:(n=this.interactMenu)==null?void 0:n.$el.getBoundingClientRect().y,width:(l=this.interactMenu)==null?void 0:l.$el.getBoundingClientRect().width,height:(c=this.interactMenu)==null?void 0:c.$el.getBoundingClientRect().height,referential:"screen"});this.fixPosition({origin:{x:Math.min(this.dashPlayerService.layoutGrid.width+t.dx,e.x+e.width-r.width-t.dx),y:Math.max(e.y+t.dy,0),referential:"world"},element:(a=this.interactMenu)==null?void 0:a.$el,ignoreZoom:!0});const o=this.camera.screenRect2world({x:(u=this.runtimeHeader)==null?void 0:u.$el.getBoundingClientRect().x,y:(p=this.runtimeHeader)==null?void 0:p.$el.getBoundingClientRect().y,width:(d=this.runtimeHeader)==null?void 0:d.$el.getBoundingClientRect().width,height:(h=this.runtimeHeader)==null?void 0:h.$el.getBoundingClientRect().height,referential:"screen"});this.fixPosition({origin:{x:0,y:-o.height-t.dy,referential:"world"},element:(g=this.runtimeHeader)==null?void 0:g.$el,ignoreZoom:!0})}canvasMousedown(e){var o;if(!this.camera)return;const t={x:e.pageX,y:e.pageY,referential:"screen"};if(e.button==1||e.button==0&&Co.isPressed("space")){this.mouseState={state:"PANNING",initialMousePos:t,mousePos:t};return}const r=this.camera.screenPoint2world(t);this.hoverState.state==="HOVERING_WIDGET"?this.mouseState={state:"JUST_CLICKED",pos:r,widgetId:this.hoverState.widgetId}:this.hoverState.state==="HOVERING_RESIZE_HANDLER"?this.mouseState={state:"RESIZING",side:this.hoverState.side,initialMousePos:t,mousePos:t,type:(o=this.selection.selectedWidget)==null?void 0:o.type}:this.hoverState.state==="HOVERING_TOGGLE"?this.mouseState={state:"JUST_CLICKED_TOGGLE",mousePos:t,slottable:this.hoverState.slottable}:this.hoverState.state==="HOVERING_SLOTTABLE_RESIZE_HANDLER"?this.mouseState={state:"SLOTTABLE_RESIZING",initialMousePos:t,mousePos:t,slottableId:this.hoverState.slottableId,side:"bottom"}:this.hoverState.state==="HOVERING_SLOTTABLE_SELECTOR"?this.mouseState={state:"JUST_CLICKED_SLOTTABLE_SELECTOR",slottableId:this.hoverState.slottableId,mousePos:t}:(J(e)||this.selection.resetSelection(),this.mouseState={state:"SELECTING",initialMousePos:t,mousePos:t})}mouseMoveHandler(e){if(!this.camera)return;const t={x:e.pageX,y:e.pageY,referential:"screen"},r=this.camera.screenPoint2world(t);if(this.mouseState.state==="PANNING"){const o={dx:-e.movementX,dy:-e.movementY},i=this.camera.screenDelta2world({dx:o.dx,dy:o.dy,referential:"screen"});this.camera.translate(i),e.preventDefault(),e.stopPropagation();return}this.mouseState.state==="MOVING"&&(this.mouseState.mousePos=r,this.mouseState.duplicating=Te(e)),this.mouseState.state==="MOVING_SLOTTABLE"&&(this.mouseState.mousePos=r),this.mouseState.state==="JUST_CLICKED"&&rt(this.mouseState.pos,r)*this.camera.zoom>5&&(this.selection.has(this.mouseState.widgetId)||(J(e)?this.selection.addToSelectedWidgets(this.mouseState.widgetId):(this.selection.resetSelection(),this.selection.addToSelectedWidgets(this.mouseState.widgetId))),this.mouseState={state:"MOVING",initialMousePos:this.mouseState.pos,mousePos:r,duplicating:Te(e)}),this.mouseState.state==="JUST_CLICKED_SLOTTABLE_SELECTOR"&&rt(this.mouseState.mousePos,r)*this.camera.zoom>5&&(this.mouseState={state:"MOVING_SLOTTABLE",initialMousePos:this.camera.screenPoint2world(this.mouseState.mousePos),mousePos:r,slottableId:this.mouseState.slottableId}),this.mouseState.state==="SELECTING"&&(this.mouseState.mousePos=t),this.mouseState.state==="RESIZING"&&(this.mouseState.mousePos=t),this.mouseState.state==="SLOTTABLE_RESIZING"&&(this.mouseState.mousePos=t),this.computeHoverState(t)}everySelectedWidgetInPreviewState(){const e=this.dashPlayerService.state;return e.type!=="RUNNING"?!1:this.selection.selectedWidgetsIds.every(t=>Object.keys(e.widgets).includes(t))}getRectangularHull(){const e=this.dashPlayerService.state;return e.type!=="RUNNING"?null:ze(Object.entries(e.widgets).filter(([t])=>this.selection.has(t)).map(([t,r])=>B(r.position,this.dashPlayerService.layoutGrid)))}selectionRect(){if(this.mouseState.state!=="SELECTING")return null;const{x:e,y:t}=this.mouseState.initialMousePos,{x:r,y:o}=this.mouseState.mousePos;return{x:Math.min(e,r),y:Math.min(t,o),width:Math.abs(e-r),height:Math.abs(t-o),referential:"screen"}}pasteHandler(e){Ei(ut(e),this.getInput(),this.layoutModel)&&e.preventDefault()}renderScreenPositioning(){var r;if(!this.camera||!this.workspace||!this.canvas)return;this.fixPosition({origin:{x:0,y:0,referential:"world"},element:(r=this.dashPlayer)==null?void 0:r.$el}),this.fixCanvasRectPosition();const e=this.canvas.getContext("2d");if(!e)return;const t=this.canvas.getBoundingClientRect();this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,e.clearRect(0,0,this.canvas.width,this.canvas.height),e.translate(-t.x,-t.y)}renderComputeCursor(){var e,t;!this.canvas||(this.canvas.style.cursor=(t=(e=this.canvasService)==null?void 0:e.cursor(this.mouseState,this.hoverState))!=null?t:"default")}renderPreviewState(){var o,i;if(this.dashPlayerService.state.type!=="RUNNING")return;const e=this.getInput(),t=ui(e);(!H.exports.isEqual(t.operations,(o=this.computedState)==null?void 0:o.operations)||!H.exports.isEqual(t.layout,(i=this.computedState)==null?void 0:i.layout))&&(this.computedState=t),this.computedState&&this.canvasService&&this.canvasService.render({...e,computedState:this.computedState,isPreview:this.isPreview,calculatedPositions:this.calculatePositions(this.dash.makeRunnerData(this.workspace,this.computedState.layout).layout.slot)})}render(){try{this.renderScreenPositioning(),this.renderComputeCursor(),this.renderPreviewState()}catch(e){console.error(e)}finally{requestAnimationFrame(()=>this.render())}}onDragover(e){if(!this.camera)return;e.preventDefault();const t=this.camera.screenPoint2world({x:e.pageX,y:e.pageY,referential:"screen"});this.mouseState={...this.mouseState,...t}}canvasWheel(e){if(!this.camera)return;const t={x:e.pageX,y:e.pageY,referential:"screen"};if(le(e)||Ao(e))this.camera.zoomIn(Math.exp(-Math.sign(e.deltaY)*.05),t),e.preventDefault();else{const r=J(e)?{dx:e.deltaY,dy:0}:{dx:e.deltaX,dy:e.deltaY},o=this.camera.screenDelta2world({dx:r.dx,dy:r.dy,referential:"screen"});this.camera.translate(o)}e.stopPropagation()}togglePreviewEvent(e){J(e)&&this.pubsub.publish("change-preview",!this.isPreview)}resetEditingState(e){this.mouseState={state:"IDLE"},this.computeHoverState(e)}escapeEvent(){this.mouseState.state==="IDLE"&&this.selection.resetSelection(),this.resetEditingState({referential:"screen",x:0,y:0})}backspaceEvent(){this.selection.selectedSlottableId?this.layoutModel.delete([this.selection.selectedSlottableId]):this.layoutModel.delete(this.selection.selectedWidgetsIds),this.selection.resetSelection()}undoEvent(e){if(le(e)&&J(e)){e.preventDefault(),e.stopPropagation();const t=this.layoutModel.redo();if(t){if(t.operations.some(r=>r.op==="remove")){this.selection.resetSelection();return}this.selection.selectedWidgetsIds=[...Array.from(t.selection)]}return}else if(le(e)){e.preventDefault(),e.stopPropagation();const t=this.layoutModel.undo();if(t){if(t.operations.some(r=>r.op==="remove")){this.selection.resetSelection();return}this.selection.selectedWidgetsIds=[...Array.from(t.selection)]}return}}selectAllEvent(e){le(e)&&(e.preventDefault(),e.stopPropagation(),this.selection.selectAll())}move(e,t){const[r,o]={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]}[t],i=pi(e,r,o);this.layoutModel.operationQueue.execute({name:`move ${t}`,operations:i,selection:e.selectedWidgets})}arrowUpEvent(){this.move(this.getInput(),"up")}arrowDownEvent(){this.move(this.getInput(),"down")}arrowLeftEvent(){this.move(this.getInput(),"left")}arrowRightEvent(){this.move(this.getInput(),"right")}selectingOnMouseUp(e){J(e)?this.widgetsInRectangularSelection().forEach(t=>{this.selection.toggleWidgetSelection(t)}):(this.selection.resetSelection(),this.widgetsInRectangularSelection().forEach(t=>{this.selection.addToSelectedWidgets(t)}))}toggleSlottable(e){this.collapsedSlottables={...this.collapsedSlottables,[e]:!this.collapsedSlottables[e]}}mouseup(e){var r;(r=this.computedState)!=null&&r.operations.length&&this.layoutModel.operationQueue.execute({name:"mouse up",operations:this.computedState.operations,selection:new Set(this.selection.selectedWidgetsIds)}),this.mouseState.state==="SELECTING"&&this.selectingOnMouseUp(e),this.mouseState.state==="JUST_CLICKED"&&(J(e)?this.selection.toggleWidgetSelection(this.mouseState.widgetId):(this.selection.resetSelection(),this.selection.selectedSlottableId=null,this.selection.addToSelectedWidgets(this.mouseState.widgetId))),this.mouseState.state==="JUST_CLICKED_TOGGLE"&&this.toggleSlottable(this.mouseState.slottable),this.mouseState.state==="JUST_CLICKED_SLOTTABLE_SELECTOR"&&(this.selection.selectedSlottableId=this.mouseState.slottableId);const t={x:e.pageX,y:e.pageY,referential:"screen"};this.resetEditingState(t)}onKeydown(e){var t,r;(r=(t=this.onKeyDownEvents(e))[e.key.toLowerCase().trim()?e.key.toLowerCase():e.code.toLowerCase()])==null||r.call(t)}onKeyup(e){this.mouseState={state:"IDLE"}}copyHandler(e){Pi(e==null?void 0:e.target)||Si(ut(e),this.selection.selectedWidgets)&&e.preventDefault()}centerCanvasHandler(e){var t;(t=this.camera)==null||t.correct()}addGlobalEventListeners(){addEventListener("resize",this.resizeEventListener(this)),addEventListener("copy",this.copyEventListener(this)),addEventListener("paste",this.pasteEventListener(this)),addEventListener("mousemove",this.mousemoveEventListener(this)),addEventListener("mouseup",this.mouseupEventListener(this))}removeGlobalEventListeners(){removeEventListener("resize",this.resizeEventListener(this)),removeEventListener("copy",this.copyEventListener(this)),removeEventListener("paste",this.pasteEventListener(this)),removeEventListener("mousemove",this.mousemoveEventListener(this)),removeEventListener("mouseup",this.mouseupEventListener(this))}async setup(e,t,r,o,i,n){var c,a;if(this.editor=e,this.listener=t,this.interactMenu=o,this.dashPlayer=i,this.runtimeHeader=n,this.canvas=r,this.camera.setProjectedCanvas(r),this.camera.correct(),t.addEventListener("wheel",u=>this.canvasWheel(u)),r.addEventListener("mousedown",u=>this.canvasMousedown(u)),r.addEventListener("drop",u=>this.mouseup(u)),r.addEventListener("dragover",u=>this.onDragover(u)),(c=r.parentElement)==null||c.addEventListener("keydown",u=>this.onKeydown(u)),(a=r.parentElement)==null||a.addEventListener("keyup",u=>this.onKeyup(u)),!r.getContext("2d"))throw new Error(`I can't get no context 2d ${r}`);this.canvasService=pe.create(r,this),this.addGlobalEventListeners(),Be(()=>{this.camera.fit(),this.render()})}tearDown(){this.removeGlobalEventListeners()}widgetsInRectangularSelection(){if(!this.camera)throw new Error("No camera value yet");if(this.dashPlayerService.state.type!=="RUNNING")return new Set;const{widgets:e}=this.calculatePositions(),t=this.selectionRect();return t?new Set(Object.keys(e).filter(r=>ss(this.camera.worldRect2screen(B(e[r].position,this.dashPlayerService.layoutGrid)),t))):new Set}calculatePositions(e){return this.dashPlayerService.state.type!=="RUNNING"?{widgets:{},slottables:{}}:this.dashPlayerService.calculatePositions(this.overloadCollapsedSlottablesCondition(this.dashPlayerService.state.props),e)}getInput(){switch(this.dashPlayerService.state.type){case"AUTHENTICATING":case"RUNNING":return{mouseState:this.mouseState,dashEditorService:this,workingLayout:this.layoutModel,hoverState:this.hoverState,resizeHandlerRects:this.getResizeHandlerRects(),widgetsInRectangularSelection:this.widgetsInRectangularSelection(),selectedWidgets:new Set(this.selection.selectedWidgetsIds),dash:this.dash,calculatedPositions:this.calculatePositions(),selectedSlottable:this.selection.selectedSlottableId};default:throw new Error(`Invalid state ${JSON.stringify(this.dashPlayerService.state.type)} for getInput`)}}getResizeHandlerRects(){if(!this.camera)throw new Error("No camera value yet");const e=this.getRectangularHull();return!e||!this.everySelectedWidgetInPreviewState()?[]:Wo(this.selection.selectedWidgets,this.camera.worldRect2screen(e))}updateHoverStateOnToggle(e){const t=this.slottableRenderer.getToggleUnderCursor(e);t&&(this.hoverState={state:"HOVERING_TOGGLE",slottable:t.id})}updateHoverStateOnSlottableSelector(e){const t=this.slottableRenderer.getSelectorUnderCursor(e);t&&(this.hoverState={state:"HOVERING_SLOTTABLE_SELECTOR",slottableId:t.id})}updateHoverStateOnSlottableResizeHandler(e){const t=this.slottableRenderer.getResizerUnderCursor(e);t&&(this.hoverState={state:"HOVERING_SLOTTABLE_RESIZE_HANDLER",slottableId:t.id})}computeHoverState(e){!this.camera||(this.updateHoverStateOnWidget(e),this.updateHoverStateOnResizeHandler(e),this.updateHoverStateOnToggle(e),this.updateHoverStateOnSlottableSelector(e),this.updateHoverStateOnSlottableResizeHandler(e))}}const xi={class:"dash-editor"},Ri=z({__name:"DashEditor",setup(s){const e=Jt(),t=Qt(),r=({id:d,type:h})=>{h==="dash"?(e.push({name:"dashEditor",params:{dashId:d},query:t.query}),n()):e.push({name:"editor",params:{formId:d},query:t.query})},{loading:o,result:i,refetch:n}=ws(()=>Promise.all([Es.get(),Ss.get(t.params.dashPath)]).then(([d,h])=>qt({workspace:d,dash:h,...a(d,h)}))),l=d=>{i.value&&(i.value.dashEditorService.isPreview=d)},c=d=>{var h;return(h=i.value)==null?void 0:h.dash.addVariableToCode(d)};function a(d,h){const g=rs(h.makeRunnerData(d)),f=as.create(),P=et.create(g,h,d);return g.onRedirect(({url:_,queryParams:x})=>Ht(e,_,x)),g.on("eval-return",_=>{_.repr&&f.log({type:"eval-output",log:_.repr})}),g.on("eval-error",_=>{f.log({type:"eval-output",log:_.repr})}),g.on("stderr",_=>{f.log({type:"stderr",log:_.log})}),g.on("stdout",_=>{f.log({type:"stdout",log:_.log})}),g.on("widgets-computed",_=>{var x;(x=_.errors)!=null&&x.general&&f.log({type:"stderr",log:_.errors.general.repr})}),g.on("program-start-failed",_=>{var x;f.log({type:"stderr",log:(x=_.error)!=null?x:""})}),{dashPlayerService:g,logService:f,dashEditorService:P}}function u(d){var h;(h=i.value)==null||h.dashPlayerService.sendEvalRequest(d)}const p=()=>{!i.value||i.value.dashEditorService.restart()};return(d,h)=>{var g,f,P;return y(),E("div",xi,[m(o)||!((g=m(i))!=null&&g.dash)||!((f=m(i))!=null&&f.workspace)?(y(),X(ls,{key:0,class:"loading",justify:"center"})):(y(),X(Bt,{key:1},{left:re(()=>[L(_s,{link:"/_editor/dashes"})]),right:re(()=>[L(Ps,{path:"dashes/overview"}),L(Is,{model:m(i).dash},null,8,["model"]),L(bs,{model:m(i).dash},null,8,["model"])]),default:re(()=>[L(st,{title:"Layout editor"},{default:re(()=>{var _;return[(_=m(i))!=null&&_.dashPlayerService?(y(),X(mo,{key:0,workspace:m(i).workspace,dash:m(i).dash,"dash-editor-service":m(i).dashEditorService,params:m(t).query,onNavigate:r,onChangePreview:l,onCreateVariable:c},null,8,["workspace","dash","dash-editor-service","params"])):M("",!0)]}),_:1}),L(st,{title:"Settings"},{default:re(()=>[L(As,{dash:m(i).dash},null,8,["dash"])]),_:1})]),_:1})),m(i)?(y(),X(is,{key:2,"log-service":m(i).logService,runtime:"dashes",onRestart:p,onEvalRequest:u},null,8,["log-service"])):M("",!0),L(ns,{"has-changes":(P=m(i))==null?void 0:P.dash.hasChanges()},null,8,["has-changes"])])}}});const nn=U(Ri,[["__scopeId","data-v-73914f54"]]);export{nn as default}; -//# sourceMappingURL=DashEditor.84c221ab.js.map +//# sourceMappingURL=DashEditor.d2eeb2dd.js.map diff --git a/abstra_statics/dist/assets/DashPlayer.6a8897dd.js b/abstra_statics/dist/assets/DashPlayer.2457a054.js similarity index 82% rename from abstra_statics/dist/assets/DashPlayer.6a8897dd.js rename to abstra_statics/dist/assets/DashPlayer.2457a054.js index be55b23dac..93263f7bfe 100644 --- a/abstra_statics/dist/assets/DashPlayer.6a8897dd.js +++ b/abstra_statics/dist/assets/DashPlayer.2457a054.js @@ -1,2 +1,2 @@ -var B=Object.defineProperty;var z=(s,t,e)=>t in s?B(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var r=(s,t,e)=>(z(s,typeof t!="symbol"?t+"":t,e),e);import{R as V,ao as U,q as k,b as p,c as b,O as q,Q as J,x as C,d as M,K as y,r as W,a as Y,F as K,L as Q,A as I,e as P,z as m,D as H,t as S,am as X,an as Z,a8 as tt,G as L,y as et,w as x,B as G,ap as st,aq as it}from"./registerWidgets.ca6243ef.js";import{w as O,l as w}from"./runnerData.170ae941.js";import{e as ot,R as nt}from"./executeJs.c3858a9c.js";import{p as at}from"./passwordlessManager.0ab78ba0.js";import{P as rt}from"./pubsub.581c075e.js";import{P as lt}from"./Passwordless.65114c07.js";import{W as ht}from"./WidgetsFrame.8af89817.js";import{e as dt}from"./icons.11151937.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="47d0ec91-88e9-437b-ba30-f9121052c79c",s._sentryDebugIdIdentifier="sentry-dbid-47d0ec91-88e9-437b-ba30-f9121052c79c")}catch{}})();function ee(s,t){return{dx:t.x-s.x,dy:t.y-s.y,referential:s.referential}}function ct(s,t){return s.rowEnd=s.x&&t.y<=s.y&&t.y+t.height>=s.y:t.xs.x&&t.ys.y}function oe(s,t){return!(s.x>t.x+t.width||t.x>s.x+s.width||s.y>t.y+t.height||t.y>s.y+s.height)}function ne(s,t){return!(s.colStart>t.colEnd||t.colStart>s.colEnd||s.rowStart>t.rowEnd||t.rowStart>s.rowEnd)}function ae(s,t,e){const i=s.y===t.y,o=s.x===t.x,n=s.x+s.width===t.x+t.width,a=s.y+s.height===t.y+t.height;switch(e){case"left":return o;case"right":return n;case"top":return i;case"bottom":return a;case"top-left":return i&&o;case"top-right":return i&&n;case"bottom-left":return a&&o;case"bottom-right":return a&&n}}const re=s=>s.reduce((t,e)=>{const i=t?Math.min(t.x,e.x):e.x,o=t?Math.min(t.y,e.y):e.y,n=t?Math.max(t.x+t.width,e.x+e.width):e.x+e.width,a=t?Math.max(t.y+t.height,e.y+e.height):e.y+e.height;return{x:i,y:o,width:n-i,height:a-o,referential:e.referential}},null);function le(s,t){return Math.sqrt((s.x-t.x)**2+(s.y-t.y)**2)}function gt(s){const t=[];let e=0;for(const i in s){const[o,n]=s[i];e+=s.filter(([d,c,f],l)=>!(n.position.colStart>c.position.colEnd||c.position.colStart>n.position.colEnd)&&c.position.rowEnd+f>n.position.rowStart&&l<+i).reduce((d,c)=>d+Math.max(c[2],0),0);const a=ut(n,{deltaJ:e,deltaI:0});t.push([o,a])}return t}function pt(s,t){const e=Object.entries(s).sort((n,a)=>ct(n[1].position,a[1].position)),i=n=>document.querySelector(`[widget-id='${n}']`);return gt(e.map(([n,a])=>[n,a,i(n)?t.height2rows(i(n).offsetHeight)-(a.position.rowEnd-a.position.rowStart):0])).reduce((n,[a,d])=>({...n,[a]:{...d,position:{...d.position,rowEnd:O[d.type].autoHeight&&i(a)?d.position.rowStart+t.height2rows(i(a).offsetHeight):d.position.rowEnd}}}),{})}const wt=(s,t,e)=>t&&!t.condition?{computedElement:{...s,position:{...s.position,row:s.position.row+e,height:0}},updateOffset:0,addOffset:0,slot:{}}:{computedElement:{...s,position:{...s.position,row:s.position.row+e}},updateOffset:s.position.height,addOffset:s.position.row,slot:s.slot},yt={"if-block":wt},mt=(s,t,e)=>ft(T(Object.values(s),{widgets:[],slottables:[]},0,t),e),ft=(s,t)=>({widgets:pt(s.widgets.reduce((e,i)=>({...e,[i.id]:i}),{}),t),slottables:s.slottables.reduce((e,i)=>({...e,[i.id]:i}),{})}),vt=(s,t)=>{if(w(s)&&w(t))return t.position.rowStart-s.position.rowStart;if(w(s)&&!w(t))return t.position.row-s.position.rowStart===0?-1:t.position.row-s.position.rowStart;if(!w(s)&&w(t))return t.position.rowStart-s.position.row===0?1:t.position.rowStart-s.position.row;if(!w(s)&&!w(t)){if(t.position.row-s.position.row===0){if(t.position.order===s.position.order)throw new Error("Two slottables with the same order in the same row");return t.position.order-s.position.order}return t.position.row-s.position.row}return 0},T=(s,t,e,i)=>s.sort(vt).reduce((o,n)=>bt(n,e,o,i),t),bt=(s,t,e,i)=>w(s)?St(s,t,e):Ct(s,t,e,i),St=(s,t,e)=>(e.widgets.push({...s,position:j(s.position,t)}),e),Ct=(s,t,e,i)=>{const{computedElement:o,slot:n,updateOffset:a,addOffset:d}=yt[s.type](s,i[s.id],t),c=Pt(e,a);return c.slottables.push(o),T(Object.values(n),c,t+d,i)},Pt=(s,t)=>({widgets:xt(s.widgets,t),slottables:Et(s.slottables,t)}),xt=(s,t)=>s.map(e=>({...e,position:j(e.position,t)})),Et=(s,t)=>s.map(e=>({...e,position:{...e.position,row:e.position.row+t}})),j=(s,t)=>({...s,rowStart:s.rowStart+t,rowEnd:s.rowEnd+t}),kt=960,$=12,Nt=0,Rt=24,Wt=32,It=8;class D{constructor(t,e){r(this,"width");r(this,"columns");r(this,"gap");r(this,"margin");r(this,"padding");r(this,"calculatePositions");r(this,"_cellHeight");r(this,"dashPlayerService");this.dashPlayerService=t,this.width=kt,this.columns=$,this.gap=Nt,this.margin=Rt,this.padding=It,this._cellHeight=Wt,this.calculatePositions=e}static create(t,e){return new D(t,e)}static get columns(){return $}get cellHeight(){return this._cellHeight}get navbarLength(){return this.dashPlayerService.navbarVisible?48:0}get cellWidth(){const t=this.columns-1;return(this.width-2*this.margin-t*this.gap)/this.columns}get rows(){const{widgets:t,slottables:e}=this.calculatePositions();return Math.max(Object.values(t!=null?t:{}).map(i=>i.position.rowEnd).reduce((i,o)=>Math.max(i,o),0)+4,Object.values(e!=null?e:{}).map(i=>i.position.row+i.position.height).reduce((i,o)=>Math.max(i,o),0)+4,20)}get sidebarWidth(){return this.dashPlayerService.hasSidebar?240:0}getCell(t,e){return{x:this.margin+t*(this.cellWidth+(t>0?this.gap:0)),y:this.margin+this.navbarLength+e*(this._cellHeight+(e>0?this.gap:0)),width:this.cellWidth,height:this._cellHeight,referential:"world"}}getCellFrom(t,e){const i=this.getCell(t.i,t.j);return this.cellAt(i.x+e.dx,i.y+e.dy)}areaFromRect(t){const e=this.cellAt(t.x,t.y),i={dx:t.width-1,dy:t.height-1,referential:"world"},o=this.getCellFrom(e,i);return{colStart:e.i,rowStart:e.j,colEnd:o.i,rowEnd:o.j}}rectFromArea(t){const e=this.getCell(t.colStart,t.rowStart),i=this.getCell(t.colEnd,t.rowEnd);return{x:e.x,y:e.y,width:i.x+i.width-e.x,height:i.y+i.height-e.y,referential:"world"}}get height(){return this.rows*(this._cellHeight+this.gap)-this.gap+2*this.margin}cellAt(t,e){return{i:Math.floor((t-this.margin)/(this.cellWidth+this.gap)),j:Math.floor((e-this.margin-this.navbarLength)/(this._cellHeight+this.gap))}}snap(t,e){const i=e==="bottom-right"||e==="top-right"?1:0,o=e==="bottom-left"||e==="bottom-right"?1:0,n=this.cellWidth+this.gap,a=this._cellHeight+this.gap,d=this.margin+this.cellWidth*i,c=this.margin+this.navbarLength+this.cellHeight*o,f=t.x-d,l=t.y-c;return{x:d+n*Math.round(f/n),y:c+a*Math.round(l/a),referential:"world"}}snapDelta(t){const e=this.cellWidth+this.gap,i=this._cellHeight+this.gap;return{dx:e*Math.round(t.dx/e),dy:i*Math.round(t.dy/i),referential:"world"}}height2rows(t){return Math.ceil((t+this.gap)/(this.cellHeight+this.gap))}}class _{constructor(t,e,i){r(this,"_stateTimestamp",Date.now());r(this,"_state");r(this,"runnerData");r(this,"passwordlessManager");r(this,"websocketClient");r(this,"_autocompleteState");r(this,"layoutGrid");r(this,"stateChangeCallbacks",[]);r(this,"updateUserCallbacks",[]);r(this,"onWidgetsComputedCallbacks",[]);r(this,"onCloseCallbacks",[]);r(this,"onNoCreditsMessageCallbacks",[]);r(this,"onRedirectCallback",null);this._state=V({type:"IDLE"}),this._autocompleteState={suggestionsFor:null,suggestions:[]},this.runnerData=t,this.passwordlessManager=e,this.websocketClient=i,this.layoutGrid=D.create(this,()=>this.calculatePositions()),window.__playerService=()=>this}notifyStateChange(t){this.stateChangeCallbacks.forEach(e=>e(t))}onStateChange(t){this.stateChangeCallbacks.push(t)}setState(t){this._state.value=t,this.notifyStateChange(t)}get state(){return this._state.value}static create(t,e,i){return new _(t,e,i)}updateRunnerData(t){this.runnerData=t}get brokerIsClosed(){var t;return(t=this.websocketClient.isClosed)!=null?t:!0}calculatePositions(t,e){const i=t||(this.state.type==="RUNNING"?this.state.props:{}),o=e!=null?e:this.runnerData.layout.slot;return mt(o,i,this.layoutGrid)}updateDashData(t){if(!t)throw new Error("dash is null");if(!t.layout)throw new Error("dash.layout is null");switch(this.state.type){case"RUNNING":{this.runnerData=t;const{widgets:e}=this.calculatePositions();this.setState({...this.state,widgets:e});break}default:throw new Error(`Invalid state ${this.state.type} for updateDashData`)}}start(t={}){this.clearSuggestions(),this.websocketClient.isClosed||this.websocketClient.reset(),this.websocketClient.onClose(e=>{this.closeCallback(e)}),this.websocketClient.on("execution-id",()=>{this.websocketClient.send({type:"client-start",state:this.apiPageState,params:t}),this.setState({type:"READY"})}),this.websocketClient.on("program-start-failed",e=>{this.setState({...e,type:"ERROR",cause:"PROGRAM_START_FAILED"})}),this.websocketClient.on("widgets-computed",e=>{const{widgets:i,slottables:o}=this.calculatePositions(e.props);if(this.state.type==="READY"){const n={};if(e.variables)for(const a in e.variables){if(!(a in e.variables)){console.warn(`widget ${a} not found in layout`);continue}n[a]=new U(e.props[a]),n[a].setValue(e.variables[a])}this.setState({...e,type:"RUNNING",eventProcessing:!1,alerts:[],widgets:i,responses:n,slottables:o,authenticatedUser:this.passwordlessManager.getUser()})}if(this.passwordlessManager.pubsub.subscribe("authenticated",()=>this.endAuth()),this.state.type==="RUNNING"){const n={...this.state.responses};for(const a in e.variables)if(!n[a]){if(!(a in e.variables)){console.warn(`widget ${a} not found in layout`);continue}n[a]=new U(e.props[a]),n[a].setValue(e.variables[a])}this.setState({...this.state,eventProcessing:!1,widgets:i,props:e.props})}this.widgetsComputedMessage(e)}),this.websocketClient.on("not-enough-credits",()=>{this.noCreditsMessage()}),this.websocketClient.on("redirect",e=>{this.redirect(e)}),this.websocketClient.on("auth:require-info",()=>{this.passwordlessManager.getUser()?this.endAuth():this.startAuth()}),this.websocketClient.on("auth:valid-jwt",()=>{this.setState({type:"READY"})}),this.websocketClient.on("auth:invalid-jwt",()=>{console.warn("invalid jwt"),this.badAuth()}),this.websocketClient.on("autocomplete:suggestions",({suggestionsFor:e,suggestions:i})=>{this._autocompleteState={suggestionsFor:e,suggestions:i}}),this.websocketClient.on("alert",e=>{this.state.type==="RUNNING"&&this.setState({...this.state,alerts:[...this.state.alerts,{message:e.message,severity:e.severity,id:this.state.alerts.length}]})}),this.websocketClient.on("execute-js:request",async e=>{this.websocketClient.send({type:"execute-js:response",value:await ot(e)})}),this.websocketClient.connect()}sendWidgetsChanged(t){this.websocketClient.send({type:"widgets-changed",state:this.apiPageState,dashDefinition:{slot:t}})}sendEvalRequest(t){this.websocketClient.send({type:"eval",expression:t,state:this.apiPageState})}sendVariableCreated(t){this.websocketClient.send({name:t,value:null,type:"variable-created",state:this.apiPageState})}makeWidgetsError(t){return{widgets:Object.keys(this.runnerData.layout.slot).reduce((i,o)=>(i[o]={repr:t},i),{}),props:{},variables:{}}}onUpdateUser(t){this.updateUserCallbacks.push(t)}onWidgetsComputedMessage(t){this.onWidgetsComputedCallbacks.push(t)}widgetsComputedMessage(t){this.onWidgetsComputedCallbacks.forEach(e=>e(t))}onClose(t){this.onCloseCallbacks.push(t)}closeCallback(t){this.onCloseCallbacks.forEach(e=>e(t))}onNoCreditsMessage(t){this.onNoCreditsMessageCallbacks.push(t)}noCreditsMessage(){this.onNoCreditsMessageCallbacks.forEach(t=>t())}onRedirect(t){this.onRedirectCallback=t}redirect(t){!this.onRedirectCallback||this.onRedirectCallback(t)}wait(t){return this.websocketClient.wait(t)}on(t,e){this.websocketClient.on(t,e)}onMany(t,e){t.forEach(i=>this.on(i,e))}get apiPageState(){const t=this.state.type==="RUNNING"?this.state.responses:{},e=Object.keys(this.runnerData.layout.slot).reduce((i,o)=>{var n,a;return{...i,[o]:{value:(a=(n=t[o])==null?void 0:n.value)!=null?a:null}}},{});return{timestamp:this._stateTimestamp,widgets:e}}getUserEmail(){var t,e;switch(this.state.type){case"RUNNING":return(e=(t=this.state.authenticatedUser)==null?void 0:t.claims.email)!=null?e:null;default:return null}}startAuth(){switch(this.state.type){case"RUNNING":if(this.state.authenticatedUser)return;this.setState({type:"AUTHENTICATING",previousState:this.state});break;case"READY":this.setState({type:"AUTHENTICATING",previousState:this.state});break;default:throw new Error(`Invalid state ${this.state.type} for startAuth`)}}endAuth(){this.websocketClient.send({type:"auth:saved-jwt",jwt:this.passwordlessManager.getUser().jwt})}badAuth(){if(this.state.type!=="AUTHENTICATING")throw new Error(`Invalid state ${this.state.type} for badAuth`);this.state.previousState.type==="RUNNING"?this.setState({...this.state.previousState,authenticatedUser:null}):this.state.previousState.type==="READY"&&this.setState({...this.state.previousState})}logout(){this.passwordlessManager.removeUser(),this.start()}isAuthenticating(){return this.state.type==="AUTHENTICATING"}get suggestionsFor(){return this._autocompleteState.suggestionsFor}get suggestions(){return this._autocompleteState.suggestions}clearSuggestions(){this._autocompleteState={suggestionsFor:null,suggestions:[]}}getAutocompleteSuggestions(t,e){t!==this.suggestionsFor&&this.clearSuggestions(),this.websocketClient.send({type:"autocomplete:load",suggestionsFor:t,code:e})}get navbarVisible(){const{logoUrl:t,brandName:e}=this.runnerData,i=this.getUserEmail();return!!(this.hasSidebar||t||e||i)}get hasSidebar(){const t=this.runnerData.sidebar;return!t||t.length==0?!1:t.some(e=>e.visible)}getWidgetsListeners(){switch(this.state.type){case"RUNNING":return Object.entries(this.state.widgets).reduce((t,[e,i])=>({...t,[e]:this.listenersFromWidget(e,i.type)}),{});default:return{}}}listenersFromWidget(t,e){return O[e].events.reduce((i,o)=>({...i,[o.key]:n=>{this.sendWidgetInputMessage(t),this.sendWidgetEventMessage(t,o.key,n)}}),{})}sendWidgetInputMessage(t){!this.websocketClient||this.websocketClient.send({type:"widget-input",widgetId:t,state:this.apiPageState})}sendWidgetEventMessage(t,e,i){if(!this.websocketClient||this.state.type!=="RUNNING")return;const o=this.apiPageState;this.websocketClient.send({type:"widget-event",event:{type:e,payload:i},widgetId:t,state:o}),this.setState({...this.state,eventProcessing:!0})}}class A{constructor(t){r(this,"ws");r(this,"pubsub");r(this,"dash");this.pubsub=new rt,this.ws=null,this.dash=t,this.pubsub.wait("close")}static create(t){return new A(t)}get url(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/_socket?dashPath=${encodeURIComponent(this.dash.path)}`}get isClosed(){return this.ws?this.ws.readyState!==WebSocket.OPEN:!0}on(t,e){this.pubsub.subscribe(t,e)}wait(t){return this.pubsub.wait(t)}reset(){if(!this.ws)throw new Error("no websocket to clear");this.pubsub.reset(),this.ws.close()}async connect(t=1){t>3||await new Promise((e,i)=>{this.ws=new WebSocket(this.url),this.ws.onopen=()=>{e()},this.ws.onerror=o=>{i(o)},this.ws.onclose=()=>{this.pubsub.publish("close")},this.ws.onmessage=o=>{const n=JSON.parse(o.data);this.pubsub.publish(n.type,n)}}).catch(e=>{console.error(e),this.connect(t+1)})}onClose(t){this.pubsub.subscribe("close",t)}close(){if(!this.ws)throw new Error("no websocket to close");this.ws.close()}async send(t){if(!this.ws)throw new Error("no websocket to send");if(this.isClosed)throw new Error("websocket is closed");this.ws.send(JSON.stringify(t))}}function he(s){const t=A.create(s);return _.create(s,at,t)}const Mt={},Dt=s=>(q("data-v-5d7ea65b"),s=s(),J(),s),_t={class:"dash-loading"},At=Dt(()=>C("div",{class:"dash-loading-container"},[C("div",{class:"loading-bar-background"}),C("div",{class:"loading-bar"})],-1)),Ut=[At];function Gt(s,t){return p(),b("div",_t,Ut)}const $t=k(Mt,[["render",Gt],["__scopeId","data-v-5d7ea65b"]]);function E(){return window.matchMedia("(min-width: 1200px)").matches}const Ht={key:0,class:"error-widget"},Lt={key:0},Ot={key:2,class:"loading"},Tt=M({__name:"WidgetsGrid",props:{camera:null,isPreview:{type:Boolean},widgetsWithErrors:null,grid:null,widgetsListeners:null,widgetsProps:null,widgetsResponses:null,widgets:null,forceResponsivity:null},setup(s){const t=s,e=y(()=>({...i.value,padding:`${t.grid.margin}px`,gap:`${t.grid.gap}px`,maxWidth:`${t.grid.width}px`,height:`${t.grid.height}px`,gridTemplateColumns:`repeat(${t.grid.columns}, ${t.grid.cellWidth}px)`,gridTemplateRows:`repeat(auto-fill, ${t.grid.cellHeight}px)`})),i=y(()=>{const l=E()?t.grid.sidebarWidth+(o.value-t.grid.sidebarWidth-960)/2:(o.value-960)/2;return{"--dash-right-margin":`${E()?(o.value-t.grid.sidebarWidth-960)/2:(o.value-960)/2}px`,"--dash-left-margin":`${l}px`}}),o=W(window.innerWidth);window.addEventListener("resize",()=>{o.value=window.innerWidth});const n=l=>{const u=l.target;u.scrollHeight>u.clientHeight&&l.stopPropagation()};function a(l){return{gridColumnStart:`${l.position.colStart+1}`,gridColumnEnd:`${l.position.colEnd+2}`,gridRowStart:`${l.position.rowStart+1}`,gridRowEnd:`${l.position.rowEnd+2}`,padding:`${t.grid.padding}px`}}const d=l=>{const u=l.position.rowEnd-l.position.rowStart+1;return u*t.grid.cellHeight+(u-1)*t.grid.gap-2*t.grid.padding},c=l=>{const u=l.position.colEnd-l.position.colStart+1;return u*t.grid.cellWidth+(u-1)*t.grid.gap-2*t.grid.padding},f=l=>{var u;return l in((u=t.widgetsProps)!=null?u:{})};return(l,u)=>{const N=Y("icon");return p(),b("div",{class:L(["dash",s.forceResponsivity]),style:I(m(e))},[(p(!0),b(K,null,Q(s.widgets,(h,g)=>{var v,R;return p(),b("div",{key:g,class:"widget",style:I(a(h)),onWheel:n},[((v=s.widgetsWithErrors)==null?void 0:v.find(F=>F==g))&&s.isPreview?(p(),b("div",Ht,[P(N,{width:"20",height:"20",path:m(dt),fill:"#D35249"},null,8,["path"]),c(h)>=160&&d(h)>=120?(p(),b("p",Lt," Ops! There is an error in this widget's properties ")):H("",!0)])):f(g)?(p(),S(tt(h.type),X({key:1,data:s.widgetsProps[g],response:s.widgetsResponses[g],runtime:"dash","container-width":c(h),"container-height":d(h),zoom:(R=s.camera)==null?void 0:R.zoom,"widget-id":g},Z(s.widgetsListeners[g])),null,16,["data","response","container-width","container-height","zoom","widget-id"])):(p(),b("div",Ot))],36)}),128))],6)}}});const jt=k(Tt,[["__scopeId","data-v-4d2eaf45"]]),Ft=M({__name:"LayoutPresenter",props:{widgets:null,props:null,responses:null,widgetsListeners:null,camera:null,forceResponsivity:null,grid:null,widgetsWithErrors:null,runnerData:null,isPreview:{type:Boolean}},setup(s){const t=et();return(e,i)=>(p(),S(ht,{class:"dash-player","main-color":s.runnerData.mainColor,"font-family":s.runnerData.fontFamily,theme:s.runnerData.theme,runtime:"dash"},{default:x(()=>[G(e.$slots,"header",{},void 0,!0),m(t).overrideMain?G(e.$slots,"overrideMain",{key:1},void 0,!0):(p(),S(jt,{key:0,camera:s.camera,"is-preview":s.isPreview,"widgets-with-errors":s.widgetsWithErrors,grid:s.grid,"widgets-listeners":s.widgetsListeners,"widgets-props":s.props,"widgets-responses":s.responses,widgets:s.widgets,"force-responsivity":s.forceResponsivity},null,8,["camera","is-preview","widgets-with-errors","grid","widgets-listeners","widgets-props","widgets-responses","widgets","force-responsivity"]))]),_:3},8,["main-color","font-family","theme"]))}});const Bt=k(Ft,[["__scopeId","data-v-4c9ad021"]]),zt=M({__name:"DashPlayer",props:{isPreview:{type:Boolean},dashPlayerService:null,forceResponsivity:null,camera:null,widgetsWithErrors:null,editingMode:{type:Boolean},params:null},emits:["navigate","logout"],setup(s,{emit:t}){const e=s,i=W(null),o=W(window.innerWidth);window.addEventListener("resize",()=>{o.value=window.innerWidth});const n=h=>t("navigate",h),a=y(()=>{var h;return(h=e.dashPlayerService.getUserEmail())!=null?h:void 0}),d=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.widgets:Object.entries(e.dashPlayerService.runnerData.layout.slot).reduce((h,[g,v])=>Object.assign(h,{[g]:v}),{})),c=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.responses:{}),f=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.alerts:[]),l=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.props:{}),u=y(()=>{const h=E()?e.dashPlayerService.layoutGrid.sidebarWidth+(o.value-e.dashPlayerService.layoutGrid.sidebarWidth-960)/2:(o.value-960)/2;return{"--dash-right-margin":`${E()?(o.value-e.dashPlayerService.layoutGrid.sidebarWidth-960)/2:(o.value-960)/2}px`,"--dash-left-margin":`${h}px`}}),N=y(()=>({...u.value,padding:`${e.dashPlayerService.layoutGrid.margin}px`,width:`${e.dashPlayerService.layoutGrid.width}px`,gap:`${e.dashPlayerService.layoutGrid.gap}px`,height:"100%",boxSizing:"border-box"}));return e.dashPlayerService.start(e.params),e.dashPlayerService.onNoCreditsMessage(()=>{var h;(h=i.value)==null||h.open()}),(h,g)=>{var v;return p(),S(Bt,{widgets:m(d),props:m(l),responses:m(c),"widgets-listeners":s.dashPlayerService.getWidgetsListeners(),camera:s.camera,"force-responsivity":s.forceResponsivity,grid:s.dashPlayerService.layoutGrid,"widgets-with-errors":(v=s.widgetsWithErrors)!=null?v:[],"runner-data":s.dashPlayerService.runnerData,"is-preview":s.isPreview},st({header:x(()=>[P(nt,{ref_key:"runtimeCommonsRef",ref:i,type:"dashes",runtime:s.dashPlayerService.runnerData,"full-width":!0,"is-preview":s.isPreview,"user-email":m(a),"force-responsivity":s.forceResponsivity,alerts:m(f),onNavigate:n,onLogout:g[0]||(g[0]=R=>s.dashPlayerService.logout())},null,8,["runtime","is-preview","user-email","force-responsivity","alerts"]),P(it,null,{default:x(()=>[s.dashPlayerService.state.type==="RUNNING"&&s.dashPlayerService.state.eventProcessing?(p(),S($t,{key:0})):H("",!0)]),_:1})]),_:2},[s.dashPlayerService.isAuthenticating()?{name:"overrideMain",fn:x(()=>[C("div",{class:L(["auth-form",s.forceResponsivity]),style:I(m(N))},[P(lt,{class:"form-auth"})],6)]),key:"0"}:void 0]),1032,["widgets","props","responses","widgets-listeners","camera","force-responsivity","grid","widgets-with-errors","runner-data","is-preview"])}}});const de=k(zt,[["__scopeId","data-v-541764d8"]]);export{de as D,ae as a,ne as b,oe as c,ee as d,ie as i,he as m,le as p,re as r,ct as v,se as w}; -//# sourceMappingURL=DashPlayer.6a8897dd.js.map +var B=Object.defineProperty;var z=(s,t,e)=>t in s?B(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var r=(s,t,e)=>(z(s,typeof t!="symbol"?t+"":t,e),e);import{R as V,ao as U,q as k,b as p,c as b,O as q,Q as J,x as C,d as M,K as y,r as W,a as Y,F as K,L as Q,A as I,e as P,z as m,D as H,t as S,am as X,an as Z,a8 as tt,G as L,y as et,w as x,B as G,ap as st,aq as it}from"./registerWidgets.89616af0.js";import{w as O,l as w}from"./runnerData.bd24d7de.js";import{e as ot,R as at}from"./executeJs.dfd1b55f.js";import{p as nt}from"./passwordlessManager.884221ca.js";import{P as rt}from"./pubsub.d7600aa1.js";import{P as lt}from"./Passwordless.ac83d40c.js";import{W as ht}from"./WidgetsFrame.2b06573d.js";import{e as dt}from"./icons.9cfdae6d.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="0daaa06e-8daf-4d3f-8787-a83f58c8aaca",s._sentryDebugIdIdentifier="sentry-dbid-0daaa06e-8daf-4d3f-8787-a83f58c8aaca")}catch{}})();function ee(s,t){return{dx:t.x-s.x,dy:t.y-s.y,referential:s.referential}}function ct(s,t){return s.rowEnd=s.x&&t.y<=s.y&&t.y+t.height>=s.y:t.xs.x&&t.ys.y}function oe(s,t){return!(s.x>t.x+t.width||t.x>s.x+s.width||s.y>t.y+t.height||t.y>s.y+s.height)}function ae(s,t){return!(s.colStart>t.colEnd||t.colStart>s.colEnd||s.rowStart>t.rowEnd||t.rowStart>s.rowEnd)}function ne(s,t,e){const i=s.y===t.y,o=s.x===t.x,a=s.x+s.width===t.x+t.width,n=s.y+s.height===t.y+t.height;switch(e){case"left":return o;case"right":return a;case"top":return i;case"bottom":return n;case"top-left":return i&&o;case"top-right":return i&&a;case"bottom-left":return n&&o;case"bottom-right":return n&&a}}const re=s=>s.reduce((t,e)=>{const i=t?Math.min(t.x,e.x):e.x,o=t?Math.min(t.y,e.y):e.y,a=t?Math.max(t.x+t.width,e.x+e.width):e.x+e.width,n=t?Math.max(t.y+t.height,e.y+e.height):e.y+e.height;return{x:i,y:o,width:a-i,height:n-o,referential:e.referential}},null);function le(s,t){return Math.sqrt((s.x-t.x)**2+(s.y-t.y)**2)}function gt(s){const t=[];let e=0;for(const i in s){const[o,a]=s[i];e+=s.filter(([d,c,f],l)=>!(a.position.colStart>c.position.colEnd||c.position.colStart>a.position.colEnd)&&c.position.rowEnd+f>a.position.rowStart&&l<+i).reduce((d,c)=>d+Math.max(c[2],0),0);const n=ut(a,{deltaJ:e,deltaI:0});t.push([o,n])}return t}function pt(s,t){const e=Object.entries(s).sort((a,n)=>ct(a[1].position,n[1].position)),i=a=>document.querySelector(`[widget-id='${a}']`);return gt(e.map(([a,n])=>[a,n,i(a)?t.height2rows(i(a).offsetHeight)-(n.position.rowEnd-n.position.rowStart):0])).reduce((a,[n,d])=>({...a,[n]:{...d,position:{...d.position,rowEnd:O[d.type].autoHeight&&i(n)?d.position.rowStart+t.height2rows(i(n).offsetHeight):d.position.rowEnd}}}),{})}const wt=(s,t,e)=>t&&!t.condition?{computedElement:{...s,position:{...s.position,row:s.position.row+e,height:0}},updateOffset:0,addOffset:0,slot:{}}:{computedElement:{...s,position:{...s.position,row:s.position.row+e}},updateOffset:s.position.height,addOffset:s.position.row,slot:s.slot},yt={"if-block":wt},mt=(s,t,e)=>ft(T(Object.values(s),{widgets:[],slottables:[]},0,t),e),ft=(s,t)=>({widgets:pt(s.widgets.reduce((e,i)=>({...e,[i.id]:i}),{}),t),slottables:s.slottables.reduce((e,i)=>({...e,[i.id]:i}),{})}),vt=(s,t)=>{if(w(s)&&w(t))return t.position.rowStart-s.position.rowStart;if(w(s)&&!w(t))return t.position.row-s.position.rowStart===0?-1:t.position.row-s.position.rowStart;if(!w(s)&&w(t))return t.position.rowStart-s.position.row===0?1:t.position.rowStart-s.position.row;if(!w(s)&&!w(t)){if(t.position.row-s.position.row===0){if(t.position.order===s.position.order)throw new Error("Two slottables with the same order in the same row");return t.position.order-s.position.order}return t.position.row-s.position.row}return 0},T=(s,t,e,i)=>s.sort(vt).reduce((o,a)=>bt(a,e,o,i),t),bt=(s,t,e,i)=>w(s)?St(s,t,e):Ct(s,t,e,i),St=(s,t,e)=>(e.widgets.push({...s,position:j(s.position,t)}),e),Ct=(s,t,e,i)=>{const{computedElement:o,slot:a,updateOffset:n,addOffset:d}=yt[s.type](s,i[s.id],t),c=Pt(e,n);return c.slottables.push(o),T(Object.values(a),c,t+d,i)},Pt=(s,t)=>({widgets:xt(s.widgets,t),slottables:Et(s.slottables,t)}),xt=(s,t)=>s.map(e=>({...e,position:j(e.position,t)})),Et=(s,t)=>s.map(e=>({...e,position:{...e.position,row:e.position.row+t}})),j=(s,t)=>({...s,rowStart:s.rowStart+t,rowEnd:s.rowEnd+t}),kt=960,$=12,Nt=0,Rt=24,Wt=32,It=8;class D{constructor(t,e){r(this,"width");r(this,"columns");r(this,"gap");r(this,"margin");r(this,"padding");r(this,"calculatePositions");r(this,"_cellHeight");r(this,"dashPlayerService");this.dashPlayerService=t,this.width=kt,this.columns=$,this.gap=Nt,this.margin=Rt,this.padding=It,this._cellHeight=Wt,this.calculatePositions=e}static create(t,e){return new D(t,e)}static get columns(){return $}get cellHeight(){return this._cellHeight}get navbarLength(){return this.dashPlayerService.navbarVisible?48:0}get cellWidth(){const t=this.columns-1;return(this.width-2*this.margin-t*this.gap)/this.columns}get rows(){const{widgets:t,slottables:e}=this.calculatePositions();return Math.max(Object.values(t!=null?t:{}).map(i=>i.position.rowEnd).reduce((i,o)=>Math.max(i,o),0)+4,Object.values(e!=null?e:{}).map(i=>i.position.row+i.position.height).reduce((i,o)=>Math.max(i,o),0)+4,20)}get sidebarWidth(){return this.dashPlayerService.hasSidebar?240:0}getCell(t,e){return{x:this.margin+t*(this.cellWidth+(t>0?this.gap:0)),y:this.margin+this.navbarLength+e*(this._cellHeight+(e>0?this.gap:0)),width:this.cellWidth,height:this._cellHeight,referential:"world"}}getCellFrom(t,e){const i=this.getCell(t.i,t.j);return this.cellAt(i.x+e.dx,i.y+e.dy)}areaFromRect(t){const e=this.cellAt(t.x,t.y),i={dx:t.width-1,dy:t.height-1,referential:"world"},o=this.getCellFrom(e,i);return{colStart:e.i,rowStart:e.j,colEnd:o.i,rowEnd:o.j}}rectFromArea(t){const e=this.getCell(t.colStart,t.rowStart),i=this.getCell(t.colEnd,t.rowEnd);return{x:e.x,y:e.y,width:i.x+i.width-e.x,height:i.y+i.height-e.y,referential:"world"}}get height(){return this.rows*(this._cellHeight+this.gap)-this.gap+2*this.margin}cellAt(t,e){return{i:Math.floor((t-this.margin)/(this.cellWidth+this.gap)),j:Math.floor((e-this.margin-this.navbarLength)/(this._cellHeight+this.gap))}}snap(t,e){const i=e==="bottom-right"||e==="top-right"?1:0,o=e==="bottom-left"||e==="bottom-right"?1:0,a=this.cellWidth+this.gap,n=this._cellHeight+this.gap,d=this.margin+this.cellWidth*i,c=this.margin+this.navbarLength+this.cellHeight*o,f=t.x-d,l=t.y-c;return{x:d+a*Math.round(f/a),y:c+n*Math.round(l/n),referential:"world"}}snapDelta(t){const e=this.cellWidth+this.gap,i=this._cellHeight+this.gap;return{dx:e*Math.round(t.dx/e),dy:i*Math.round(t.dy/i),referential:"world"}}height2rows(t){return Math.ceil((t+this.gap)/(this.cellHeight+this.gap))}}class _{constructor(t,e,i){r(this,"_stateTimestamp",Date.now());r(this,"_state");r(this,"runnerData");r(this,"passwordlessManager");r(this,"websocketClient");r(this,"_autocompleteState");r(this,"layoutGrid");r(this,"stateChangeCallbacks",[]);r(this,"updateUserCallbacks",[]);r(this,"onWidgetsComputedCallbacks",[]);r(this,"onCloseCallbacks",[]);r(this,"onNoCreditsMessageCallbacks",[]);r(this,"onRedirectCallback",null);this._state=V({type:"IDLE"}),this._autocompleteState={suggestionsFor:null,suggestions:[]},this.runnerData=t,this.passwordlessManager=e,this.websocketClient=i,this.layoutGrid=D.create(this,()=>this.calculatePositions()),window.__playerService=()=>this}notifyStateChange(t){this.stateChangeCallbacks.forEach(e=>e(t))}onStateChange(t){this.stateChangeCallbacks.push(t)}setState(t){this._state.value=t,this.notifyStateChange(t)}get state(){return this._state.value}static create(t,e,i){return new _(t,e,i)}updateRunnerData(t){this.runnerData=t}get brokerIsClosed(){var t;return(t=this.websocketClient.isClosed)!=null?t:!0}calculatePositions(t,e){const i=t||(this.state.type==="RUNNING"?this.state.props:{}),o=e!=null?e:this.runnerData.layout.slot;return mt(o,i,this.layoutGrid)}updateDashData(t){if(!t)throw new Error("dash is null");if(!t.layout)throw new Error("dash.layout is null");switch(this.state.type){case"RUNNING":{this.runnerData=t;const{widgets:e}=this.calculatePositions();this.setState({...this.state,widgets:e});break}default:throw new Error(`Invalid state ${this.state.type} for updateDashData`)}}start(t={}){this.clearSuggestions(),this.websocketClient.isClosed||this.websocketClient.reset(),this.websocketClient.onClose(e=>{this.closeCallback(e)}),this.websocketClient.on("execution-id",()=>{this.websocketClient.send({type:"client-start",state:this.apiPageState,params:t}),this.setState({type:"READY"})}),this.websocketClient.on("program-start-failed",e=>{this.setState({...e,type:"ERROR",cause:"PROGRAM_START_FAILED"})}),this.websocketClient.on("widgets-computed",e=>{const{widgets:i,slottables:o}=this.calculatePositions(e.props);if(this.state.type==="READY"){const a={};if(e.variables)for(const n in e.variables){if(!(n in e.variables)){console.warn(`widget ${n} not found in layout`);continue}a[n]=new U(e.props[n]),a[n].setValue(e.variables[n])}this.setState({...e,type:"RUNNING",eventProcessing:!1,alerts:[],widgets:i,responses:a,slottables:o,authenticatedUser:this.passwordlessManager.getUser()})}if(this.passwordlessManager.pubsub.subscribe("authenticated",()=>this.endAuth()),this.state.type==="RUNNING"){const a={...this.state.responses};for(const n in e.variables)if(!a[n]){if(!(n in e.variables)){console.warn(`widget ${n} not found in layout`);continue}a[n]=new U(e.props[n]),a[n].setValue(e.variables[n])}this.setState({...this.state,eventProcessing:!1,widgets:i,props:e.props})}this.widgetsComputedMessage(e)}),this.websocketClient.on("not-enough-credits",()=>{this.noCreditsMessage()}),this.websocketClient.on("redirect",e=>{this.redirect(e)}),this.websocketClient.on("auth:require-info",()=>{this.passwordlessManager.getUser()?this.endAuth():this.startAuth()}),this.websocketClient.on("auth:valid-jwt",()=>{this.setState({type:"READY"})}),this.websocketClient.on("auth:invalid-jwt",()=>{console.warn("invalid jwt"),this.badAuth()}),this.websocketClient.on("autocomplete:suggestions",({suggestionsFor:e,suggestions:i})=>{this._autocompleteState={suggestionsFor:e,suggestions:i}}),this.websocketClient.on("alert",e=>{this.state.type==="RUNNING"&&this.setState({...this.state,alerts:[...this.state.alerts,{message:e.message,severity:e.severity,id:this.state.alerts.length}]})}),this.websocketClient.on("execute-js:request",async e=>{this.websocketClient.send({type:"execute-js:response",value:await ot(e)})}),this.websocketClient.connect()}sendWidgetsChanged(t){this.websocketClient.send({type:"widgets-changed",state:this.apiPageState,dashDefinition:{slot:t}})}sendEvalRequest(t){this.websocketClient.send({type:"eval",expression:t,state:this.apiPageState})}sendVariableCreated(t){this.websocketClient.send({name:t,value:null,type:"variable-created",state:this.apiPageState})}makeWidgetsError(t){return{widgets:Object.keys(this.runnerData.layout.slot).reduce((i,o)=>(i[o]={repr:t},i),{}),props:{},variables:{}}}onUpdateUser(t){this.updateUserCallbacks.push(t)}onWidgetsComputedMessage(t){this.onWidgetsComputedCallbacks.push(t)}widgetsComputedMessage(t){this.onWidgetsComputedCallbacks.forEach(e=>e(t))}onClose(t){this.onCloseCallbacks.push(t)}closeCallback(t){this.onCloseCallbacks.forEach(e=>e(t))}onNoCreditsMessage(t){this.onNoCreditsMessageCallbacks.push(t)}noCreditsMessage(){this.onNoCreditsMessageCallbacks.forEach(t=>t())}onRedirect(t){this.onRedirectCallback=t}redirect(t){!this.onRedirectCallback||this.onRedirectCallback(t)}wait(t){return this.websocketClient.wait(t)}on(t,e){this.websocketClient.on(t,e)}onMany(t,e){t.forEach(i=>this.on(i,e))}get apiPageState(){const t=this.state.type==="RUNNING"?this.state.responses:{},e=Object.keys(this.runnerData.layout.slot).reduce((i,o)=>{var a,n;return{...i,[o]:{value:(n=(a=t[o])==null?void 0:a.value)!=null?n:null}}},{});return{timestamp:this._stateTimestamp,widgets:e}}getUserEmail(){var t,e;switch(this.state.type){case"RUNNING":return(e=(t=this.state.authenticatedUser)==null?void 0:t.claims.email)!=null?e:null;default:return null}}startAuth(){switch(this.state.type){case"RUNNING":if(this.state.authenticatedUser)return;this.setState({type:"AUTHENTICATING",previousState:this.state});break;case"READY":this.setState({type:"AUTHENTICATING",previousState:this.state});break;default:throw new Error(`Invalid state ${this.state.type} for startAuth`)}}endAuth(){this.websocketClient.send({type:"auth:saved-jwt",jwt:this.passwordlessManager.getUser().jwt})}badAuth(){if(this.state.type!=="AUTHENTICATING")throw new Error(`Invalid state ${this.state.type} for badAuth`);this.state.previousState.type==="RUNNING"?this.setState({...this.state.previousState,authenticatedUser:null}):this.state.previousState.type==="READY"&&this.setState({...this.state.previousState})}logout(){this.passwordlessManager.removeUser(),this.start()}isAuthenticating(){return this.state.type==="AUTHENTICATING"}get suggestionsFor(){return this._autocompleteState.suggestionsFor}get suggestions(){return this._autocompleteState.suggestions}clearSuggestions(){this._autocompleteState={suggestionsFor:null,suggestions:[]}}getAutocompleteSuggestions(t,e){t!==this.suggestionsFor&&this.clearSuggestions(),this.websocketClient.send({type:"autocomplete:load",suggestionsFor:t,code:e})}get navbarVisible(){const{logoUrl:t,brandName:e}=this.runnerData,i=this.getUserEmail();return!!(this.hasSidebar||t||e||i)}get hasSidebar(){const t=this.runnerData.sidebar;return!t||t.length==0?!1:t.some(e=>e.visible)}getWidgetsListeners(){switch(this.state.type){case"RUNNING":return Object.entries(this.state.widgets).reduce((t,[e,i])=>({...t,[e]:this.listenersFromWidget(e,i.type)}),{});default:return{}}}listenersFromWidget(t,e){return O[e].events.reduce((i,o)=>({...i,[o.key]:a=>{this.sendWidgetInputMessage(t),this.sendWidgetEventMessage(t,o.key,a)}}),{})}sendWidgetInputMessage(t){!this.websocketClient||this.websocketClient.send({type:"widget-input",widgetId:t,state:this.apiPageState})}sendWidgetEventMessage(t,e,i){if(!this.websocketClient||this.state.type!=="RUNNING")return;const o=this.apiPageState;this.websocketClient.send({type:"widget-event",event:{type:e,payload:i},widgetId:t,state:o}),this.setState({...this.state,eventProcessing:!0})}}class A{constructor(t){r(this,"ws");r(this,"pubsub");r(this,"dash");this.pubsub=new rt,this.ws=null,this.dash=t,this.pubsub.wait("close")}static create(t){return new A(t)}get url(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/_socket?dashPath=${encodeURIComponent(this.dash.path)}`}get isClosed(){return this.ws?this.ws.readyState!==WebSocket.OPEN:!0}on(t,e){this.pubsub.subscribe(t,e)}wait(t){return this.pubsub.wait(t)}reset(){if(!this.ws)throw new Error("no websocket to clear");this.pubsub.reset(),this.ws.close()}async connect(t=1){t>3||await new Promise((e,i)=>{this.ws=new WebSocket(this.url),this.ws.onopen=()=>{e()},this.ws.onerror=o=>{i(o)},this.ws.onclose=()=>{this.pubsub.publish("close")},this.ws.onmessage=o=>{const a=JSON.parse(o.data);this.pubsub.publish(a.type,a)}}).catch(e=>{console.error(e),this.connect(t+1)})}onClose(t){this.pubsub.subscribe("close",t)}close(){if(!this.ws)throw new Error("no websocket to close");this.ws.close()}async send(t){if(!this.ws)throw new Error("no websocket to send");if(this.isClosed)throw new Error("websocket is closed");this.ws.send(JSON.stringify(t))}}function he(s){const t=A.create(s);return _.create(s,nt,t)}const Mt={},Dt=s=>(q("data-v-5d7ea65b"),s=s(),J(),s),_t={class:"dash-loading"},At=Dt(()=>C("div",{class:"dash-loading-container"},[C("div",{class:"loading-bar-background"}),C("div",{class:"loading-bar"})],-1)),Ut=[At];function Gt(s,t){return p(),b("div",_t,Ut)}const $t=k(Mt,[["render",Gt],["__scopeId","data-v-5d7ea65b"]]);function E(){return window.matchMedia("(min-width: 1200px)").matches}const Ht={key:0,class:"error-widget"},Lt={key:0},Ot={key:2,class:"loading"},Tt=M({__name:"WidgetsGrid",props:{camera:null,isPreview:{type:Boolean},widgetsWithErrors:null,grid:null,widgetsListeners:null,widgetsProps:null,widgetsResponses:null,widgets:null,forceResponsivity:null},setup(s){const t=s,e=y(()=>({...i.value,padding:`${t.grid.margin}px`,gap:`${t.grid.gap}px`,maxWidth:`${t.grid.width}px`,height:`${t.grid.height}px`,gridTemplateColumns:`repeat(${t.grid.columns}, ${t.grid.cellWidth}px)`,gridTemplateRows:`repeat(auto-fill, ${t.grid.cellHeight}px)`})),i=y(()=>{const l=E()?t.grid.sidebarWidth+(o.value-t.grid.sidebarWidth-960)/2:(o.value-960)/2;return{"--dash-right-margin":`${E()?(o.value-t.grid.sidebarWidth-960)/2:(o.value-960)/2}px`,"--dash-left-margin":`${l}px`}}),o=W(window.innerWidth);window.addEventListener("resize",()=>{o.value=window.innerWidth});const a=l=>{const u=l.target;u.scrollHeight>u.clientHeight&&l.stopPropagation()};function n(l){return{gridColumnStart:`${l.position.colStart+1}`,gridColumnEnd:`${l.position.colEnd+2}`,gridRowStart:`${l.position.rowStart+1}`,gridRowEnd:`${l.position.rowEnd+2}`,padding:`${t.grid.padding}px`}}const d=l=>{const u=l.position.rowEnd-l.position.rowStart+1;return u*t.grid.cellHeight+(u-1)*t.grid.gap-2*t.grid.padding},c=l=>{const u=l.position.colEnd-l.position.colStart+1;return u*t.grid.cellWidth+(u-1)*t.grid.gap-2*t.grid.padding},f=l=>{var u;return l in((u=t.widgetsProps)!=null?u:{})};return(l,u)=>{const N=Y("icon");return p(),b("div",{class:L(["dash",s.forceResponsivity]),style:I(m(e))},[(p(!0),b(K,null,Q(s.widgets,(h,g)=>{var v,R;return p(),b("div",{key:g,class:"widget",style:I(n(h)),onWheel:a},[((v=s.widgetsWithErrors)==null?void 0:v.find(F=>F==g))&&s.isPreview?(p(),b("div",Ht,[P(N,{width:"20",height:"20",path:m(dt),fill:"#D35249"},null,8,["path"]),c(h)>=160&&d(h)>=120?(p(),b("p",Lt," Ops! There is an error in this widget's properties ")):H("",!0)])):f(g)?(p(),S(tt(h.type),X({key:1,data:s.widgetsProps[g],response:s.widgetsResponses[g],runtime:"dash","container-width":c(h),"container-height":d(h),zoom:(R=s.camera)==null?void 0:R.zoom,"widget-id":g},Z(s.widgetsListeners[g])),null,16,["data","response","container-width","container-height","zoom","widget-id"])):(p(),b("div",Ot))],36)}),128))],6)}}});const jt=k(Tt,[["__scopeId","data-v-4d2eaf45"]]),Ft=M({__name:"LayoutPresenter",props:{widgets:null,props:null,responses:null,widgetsListeners:null,camera:null,forceResponsivity:null,grid:null,widgetsWithErrors:null,runnerData:null,isPreview:{type:Boolean}},setup(s){const t=et();return(e,i)=>(p(),S(ht,{class:"dash-player","main-color":s.runnerData.mainColor,"font-family":s.runnerData.fontFamily,theme:s.runnerData.theme,runtime:"dash"},{default:x(()=>[G(e.$slots,"header",{},void 0,!0),m(t).overrideMain?G(e.$slots,"overrideMain",{key:1},void 0,!0):(p(),S(jt,{key:0,camera:s.camera,"is-preview":s.isPreview,"widgets-with-errors":s.widgetsWithErrors,grid:s.grid,"widgets-listeners":s.widgetsListeners,"widgets-props":s.props,"widgets-responses":s.responses,widgets:s.widgets,"force-responsivity":s.forceResponsivity},null,8,["camera","is-preview","widgets-with-errors","grid","widgets-listeners","widgets-props","widgets-responses","widgets","force-responsivity"]))]),_:3},8,["main-color","font-family","theme"]))}});const Bt=k(Ft,[["__scopeId","data-v-4c9ad021"]]),zt=M({__name:"DashPlayer",props:{isPreview:{type:Boolean},dashPlayerService:null,forceResponsivity:null,camera:null,widgetsWithErrors:null,editingMode:{type:Boolean},params:null},emits:["navigate","logout"],setup(s,{emit:t}){const e=s,i=W(null),o=W(window.innerWidth);window.addEventListener("resize",()=>{o.value=window.innerWidth});const a=h=>t("navigate",h),n=y(()=>{var h;return(h=e.dashPlayerService.getUserEmail())!=null?h:void 0}),d=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.widgets:Object.entries(e.dashPlayerService.runnerData.layout.slot).reduce((h,[g,v])=>Object.assign(h,{[g]:v}),{})),c=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.responses:{}),f=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.alerts:[]),l=y(()=>e.dashPlayerService.state.type==="RUNNING"?e.dashPlayerService.state.props:{}),u=y(()=>{const h=E()?e.dashPlayerService.layoutGrid.sidebarWidth+(o.value-e.dashPlayerService.layoutGrid.sidebarWidth-960)/2:(o.value-960)/2;return{"--dash-right-margin":`${E()?(o.value-e.dashPlayerService.layoutGrid.sidebarWidth-960)/2:(o.value-960)/2}px`,"--dash-left-margin":`${h}px`}}),N=y(()=>({...u.value,padding:`${e.dashPlayerService.layoutGrid.margin}px`,width:`${e.dashPlayerService.layoutGrid.width}px`,gap:`${e.dashPlayerService.layoutGrid.gap}px`,height:"100%",boxSizing:"border-box"}));return e.dashPlayerService.start(e.params),e.dashPlayerService.onNoCreditsMessage(()=>{var h;(h=i.value)==null||h.open()}),(h,g)=>{var v;return p(),S(Bt,{widgets:m(d),props:m(l),responses:m(c),"widgets-listeners":s.dashPlayerService.getWidgetsListeners(),camera:s.camera,"force-responsivity":s.forceResponsivity,grid:s.dashPlayerService.layoutGrid,"widgets-with-errors":(v=s.widgetsWithErrors)!=null?v:[],"runner-data":s.dashPlayerService.runnerData,"is-preview":s.isPreview},st({header:x(()=>[P(at,{ref_key:"runtimeCommonsRef",ref:i,type:"dashes",runtime:s.dashPlayerService.runnerData,"full-width":!0,"is-preview":s.isPreview,"user-email":m(n),"force-responsivity":s.forceResponsivity,alerts:m(f),onNavigate:a,onLogout:g[0]||(g[0]=R=>s.dashPlayerService.logout())},null,8,["runtime","is-preview","user-email","force-responsivity","alerts"]),P(it,null,{default:x(()=>[s.dashPlayerService.state.type==="RUNNING"&&s.dashPlayerService.state.eventProcessing?(p(),S($t,{key:0})):H("",!0)]),_:1})]),_:2},[s.dashPlayerService.isAuthenticating()?{name:"overrideMain",fn:x(()=>[C("div",{class:L(["auth-form",s.forceResponsivity]),style:I(m(N))},[P(lt,{class:"form-auth"})],6)]),key:"0"}:void 0]),1032,["widgets","props","responses","widgets-listeners","camera","force-responsivity","grid","widgets-with-errors","runner-data","is-preview"])}}});const de=k(zt,[["__scopeId","data-v-541764d8"]]);export{de as D,ne as a,ae as b,oe as c,ee as d,ie as i,he as m,le as p,re as r,ct as v,se as w}; +//# sourceMappingURL=DashPlayer.2457a054.js.map diff --git a/abstra_statics/dist/assets/DashPreview.3bf93e31.js b/abstra_statics/dist/assets/DashPreview.3bf93e31.js new file mode 100644 index 0000000000..653fa03c42 --- /dev/null +++ b/abstra_statics/dist/assets/DashPreview.3bf93e31.js @@ -0,0 +1,2 @@ +import{d as _,K as g,b as i,c as w,z as t,t as c,D as p,F as D,J as k,H as I,q as P}from"./registerWidgets.89616af0.js";import{D as b,m as q}from"./DashPlayer.2457a054.js";import{L as x}from"./CircularLoading.0fb686c0.js";import{r as B}from"./index.d40cd19f.js";import{B as R}from"./BackButton.fb83d4bd.js";import{a as m}from"./asyncComputed.8ac91a75.js";import{D as C}from"./dashes.f8616397.js";import{W as F}from"./workspaces.621b79ad.js";import"./runnerData.bd24d7de.js";import"./executeJs.dfd1b55f.js";import"./PlayerNavbar.2a5ed820.js";import"./icons.9cfdae6d.js";import"./WidgetsFrame.2b06573d.js";import"./colors.bc71fdf2.js";import"./Modal.73e976a2.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./Passwordless.ac83d40c.js";import"./lottie.fc57e5ac.js";import"./activeRecord.3d3c7835.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="0f6f9841-d471-4161-9a2d-a5d66cc01129",s._sentryDebugIdIdentifier="sentry-dbid-0f6f9841-d471-4161-9a2d-a5d66cc01129")}catch{}})();const E=_({__name:"DashPreview",setup(s){const r=k(),o=I(),l=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):o.push({name:"form-preview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:h,result:a,refetch:y}=m(()=>C.get(r.params.dashPath)),{result:u}=m(()=>F.get()),d=g(()=>{if(!a.value||!u.value||!a.value.makeRunnerData(u.value))return null;const e=q(a.value.makeRunnerData(u.value));return e.onRedirect(({url:n,queryParams:v})=>B(o,n,v)),e});return(e,n)=>(i(),w(D,null,[t(h)||!t(a)?(i(),c(x,{key:0,class:"loading",justify:"center"})):p("",!0),t(d)?(i(),c(b,{key:1,class:"player",dash:t(d).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(d),onNavigate:l},null,8,["dash","params","dash-player-service"])):p("",!0),t(a)?(i(),c(R,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default}; +//# sourceMappingURL=DashPreview.3bf93e31.js.map diff --git a/abstra_statics/dist/assets/DashPreview.a29719ea.js b/abstra_statics/dist/assets/DashPreview.a29719ea.js deleted file mode 100644 index 9c3f2e1dbf..0000000000 --- a/abstra_statics/dist/assets/DashPreview.a29719ea.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as _,K as g,b as i,c as w,z as t,t as c,D as p,F as D,J as k,H as b,q as I}from"./registerWidgets.ca6243ef.js";import{D as P,m as q}from"./DashPlayer.6a8897dd.js";import{L as x}from"./CircularLoading.5630a601.js";import{r as B}from"./index.a2df0371.js";import{B as R}from"./BackButton.1cd8c02a.js";import{a as m}from"./asyncComputed.3cb2e10b.js";import{D as C}from"./dashes.9f1aca90.js";import{W as F}from"./workspaces.25055240.js";import"./runnerData.170ae941.js";import"./executeJs.c3858a9c.js";import"./PlayerNavbar.e3146994.js";import"./icons.11151937.js";import"./WidgetsFrame.8af89817.js";import"./colors.4425ff79.js";import"./Modal.2f8d0c91.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./Passwordless.65114c07.js";import"./lottie.9d24e472.js";import"./activeRecord.11b7d185.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="d75cc7ec-db72-401e-ad0a-3d1b393118f6",s._sentryDebugIdIdentifier="sentry-dbid-d75cc7ec-db72-401e-ad0a-3d1b393118f6")}catch{}})();const E=_({__name:"DashPreview",setup(s){const r=k(),o=b(),l=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):o.push({name:"form-preview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:h,result:a,refetch:y}=m(()=>C.get(r.params.dashPath)),{result:d}=m(()=>F.get()),u=g(()=>{if(!a.value||!d.value||!a.value.makeRunnerData(d.value))return null;const e=q(a.value.makeRunnerData(d.value));return e.onRedirect(({url:n,queryParams:v})=>B(o,n,v)),e});return(e,n)=>(i(),w(D,null,[t(h)||!t(a)?(i(),c(x,{key:0,class:"loading",justify:"center"})):p("",!0),t(u)?(i(),c(P,{key:1,class:"player",dash:t(u).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(u),onNavigate:l},null,8,["dash","params","dash-player-service"])):p("",!0),t(a)?(i(),c(R,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default}; -//# sourceMappingURL=DashPreview.a29719ea.js.map diff --git a/abstra_statics/dist/assets/Dashes.8a9fc0d5.js b/abstra_statics/dist/assets/Dashes.8a9fc0d5.js new file mode 100644 index 0000000000..d10b010d68 --- /dev/null +++ b/abstra_statics/dist/assets/Dashes.8a9fc0d5.js @@ -0,0 +1,2 @@ +import{d as b,K as y,b as D,t as w,z as d,H as g}from"./registerWidgets.89616af0.js";import{f as _,g as k,h as C}from"./icons.9cfdae6d.js";import{a as x}from"./asyncComputed.8ac91a75.js";import{D as p}from"./dashes.f8616397.js";import{R as I}from"./RuntimeList.097a29c4.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./runnerData.bd24d7de.js";import"./DropdownMenu.8f7fc9d3.js";import"./CircularLoading.0fb686c0.js";import"./lottie.fc57e5ac.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="69ef4f38-290b-42e2-80ba-04899a0a583b",o._sentryDebugIdIdentifier="sentry-dbid-69ef4f38-290b-42e2-80ba-04899a0a583b")}catch{}})();const L=b({__name:"Dashes",setup(o){const s=g(),{loading:r,result:n,refetch:c}=x(()=>p.list()),l=({key:e})=>s.push({name:"dashEditor",params:{dashPath:e}}),u=async({key:e})=>{var a,t;await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.duplicate()),c()},h=async()=>{const e=await p.create();l({key:e.path})},m=async({key:e})=>{var a,t;confirm("Are you sure you want to delete this dash?")&&(await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.delete()),c())},f=y(()=>{var e,a;return{columns:[{name:"Dash Name"},{name:"Path"},{name:"Dash Actions"}],rows:(a=(e=n.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/dash/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:_,label:"Delete",onClick:m,dangerous:!0},{icon:k,label:"Edit Dash",onClick:l},{icon:C,label:"Duplicate",onClick:u}]}]})))!=null?a:[]}});return(e,a)=>(D(),w(I,{loading:d(r),title:"Python Dashes",description:"Create a dashboard page with charts and inputs interacting with your python code.","create-button-text":"Create Dash","empty-title":"No dashes here yet","video-url":"https://www.youtube.com/embed/oYMptrk7QNE",table:d(f),onCreate:h},null,8,["loading","table"]))}});export{L as default}; +//# sourceMappingURL=Dashes.8a9fc0d5.js.map diff --git a/abstra_statics/dist/assets/Dashes.d14ad66a.js b/abstra_statics/dist/assets/Dashes.d14ad66a.js deleted file mode 100644 index 8b3f58f44a..0000000000 --- a/abstra_statics/dist/assets/Dashes.d14ad66a.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as y,K as b,b as D,t as w,z as l,H as g}from"./registerWidgets.ca6243ef.js";import{f as _,g as k,h as C}from"./icons.11151937.js";import{a as x}from"./asyncComputed.3cb2e10b.js";import{D as p}from"./dashes.9f1aca90.js";import{R as I}from"./RuntimeList.1bf51451.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./runnerData.170ae941.js";import"./DropdownMenu.162e22a4.js";import"./CircularLoading.5630a601.js";import"./lottie.9d24e472.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="0263d48d-7f22-4a2a-a5b6-fb5d55cc1a08",o._sentryDebugIdIdentifier="sentry-dbid-0263d48d-7f22-4a2a-a5b6-fb5d55cc1a08")}catch{}})();const L=y({__name:"Dashes",setup(o){const s=g(),{loading:r,result:n,refetch:c}=x(()=>p.list()),d=({key:e})=>s.push({name:"dashEditor",params:{dashPath:e}}),u=async({key:e})=>{var a,t;await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.duplicate()),c()},h=async()=>{const e=await p.create();d({key:e.path})},m=async({key:e})=>{var a,t;confirm("Are you sure you want to delete this dash?")&&(await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.delete()),c())},f=b(()=>{var e,a;return{columns:[{name:"Dash Name"},{name:"Path"},{name:"Dash Actions"}],rows:(a=(e=n.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/dash/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:_,label:"Delete",onClick:m,dangerous:!0},{icon:k,label:"Edit Dash",onClick:d},{icon:C,label:"Duplicate",onClick:u}]}]})))!=null?a:[]}});return(e,a)=>(D(),w(I,{loading:l(r),title:"Python Dashes",description:"Create a dashboard page with charts and inputs interacting with your python code.","create-button-text":"Create Dash","empty-title":"No dashes here yet","video-url":"https://www.youtube.com/embed/oYMptrk7QNE",table:l(f),onCreate:h},null,8,["loading","table"]))}});export{L as default}; -//# sourceMappingURL=Dashes.d14ad66a.js.map diff --git a/abstra_statics/dist/assets/DocsButton.b174b81b.js b/abstra_statics/dist/assets/DocsButton.b174b81b.js deleted file mode 100644 index 73668ba4d1..0000000000 --- a/abstra_statics/dist/assets/DocsButton.b174b81b.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as o,b as c,c as a,q as d}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d93e52fc-bb16-4a3f-b8c2-ac41704e7126",e._sentryDebugIdIdentifier="sentry-dbid-d93e52fc-bb16-4a3f-b8c2-ac41704e7126")}catch{}})();const _=["href"],r=o({__name:"DocsButton",props:{path:null},setup(e){return(t,n)=>{var s;return c(),a("a",{class:"docs-button",href:`https://docs.abstra.io/${(s=e.path)!=null?s:""}`,target:"_blank"}," Docs ",8,_)}}});const u=d(r,[["__scopeId","data-v-9fec5678"]]);export{u as D}; -//# sourceMappingURL=DocsButton.b174b81b.js.map diff --git a/abstra_statics/dist/assets/DocsButton.f9b71025.js b/abstra_statics/dist/assets/DocsButton.f9b71025.js new file mode 100644 index 0000000000..190b419476 --- /dev/null +++ b/abstra_statics/dist/assets/DocsButton.f9b71025.js @@ -0,0 +1,2 @@ +import{d as o,b as a,c,q as d}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f446ba43-a19d-4a3e-ba72-e83b04e697ec",e._sentryDebugIdIdentifier="sentry-dbid-f446ba43-a19d-4a3e-ba72-e83b04e697ec")}catch{}})();const _=["href"],r=o({__name:"DocsButton",props:{path:null},setup(e){return(t,n)=>{var s;return a(),c("a",{class:"docs-button",href:`https://docs.abstra.io/${(s=e.path)!=null?s:""}`,target:"_blank"}," Docs ",8,_)}}});const u=d(r,[["__scopeId","data-v-9fec5678"]]);export{u as D}; +//# sourceMappingURL=DocsButton.f9b71025.js.map diff --git a/abstra_statics/dist/assets/DropdownMenu.162e22a4.js b/abstra_statics/dist/assets/DropdownMenu.8f7fc9d3.js similarity index 70% rename from abstra_statics/dist/assets/DropdownMenu.162e22a4.js rename to abstra_statics/dist/assets/DropdownMenu.8f7fc9d3.js index 756faafaa2..529b6b3376 100644 --- a/abstra_statics/dist/assets/DropdownMenu.162e22a4.js +++ b/abstra_statics/dist/assets/DropdownMenu.8f7fc9d3.js @@ -1,2 +1,2 @@ -import{d as h,K as m,b as n,c as o,A as w,z as c,q as g,B as k,G as y,v as C,e as d,w as x,N as u,D as p,t as b,I as _,F as B,L as D,x as f}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="03ed55ff-c3c2-4be5-8c99-2f89eb46bb79",e._sentryDebugIdIdentifier="sentry-dbid-03ed55ff-c3c2-4be5-8c99-2f89eb46bb79")}catch{}})();const j="/assets/empty-box.758770e4.svg",I=h({__name:"Triangle",props:{color:{type:String,required:!1}},setup(e){const t=e,s=m(()=>t.color?{borderColor:`${t.color} transparent transparent transparent`}:{});return(l,i)=>(n(),o("div",{class:"triangle",style:w(c(s))},null,4))}});const S=g(I,[["__scopeId","data-v-7ca41e33"]]),q=h({__name:"BoxShadowButton",props:{active:{type:Boolean}},setup(e){return(t,s)=>(n(),o("button",{class:y(["box-shadow-button",{active:e.active}])},[k(t.$slots,"default",{},void 0,!0)],2))}});const $=g(q,[["__scopeId","data-v-04d82775"]]),L={class:"dropdown-menu"},N={key:0},z={key:0,class:"options"},A=["onClick"],M={key:0,class:"line"},O=h({__name:"DropdownMenu",props:{title:{type:String,required:!1},options:{type:Array,required:!0},highlightLast:{type:Boolean,required:!1,default:!1},selectIcon:{type:Object,required:!1},payload:{required:!1,default:()=>({}),type:Object}},setup(e){const t=e,s=C({open:!1}),l=m(()=>t.options[t.options.length-1]),i=async v=>{await v(t.payload),s.open=!1};return(v,r)=>(n(),o("div",L,[d($,{class:"title",active:s.open,onClick:r[0]||(r[0]=a=>s.open=!s.open)},{default:x(()=>[e.title?(n(),o("span",N,u(e.title),1)):p("",!0),e.selectIcon?(n(),b(_,{key:1,class:"select-icon",width:"18",height:"18",path:e.selectIcon,fill:"#6D7C93"},null,8,["path"])):(n(),b(S,{key:2,class:"icon",color:"#414a58"}))]),_:1},8,["active"]),s.open?(n(),o("div",z,[(n(!0),o(B,null,D(e.options.slice(0,-1),a=>(n(),o("div",{key:a.label,class:y(["option",{dangerous:!!a.dangerous}]),onClick:T=>i(a.onClick)},[d(_,{class:"option-icon",width:"14",height:"14",path:a.icon,fill:"#6D7C93"},null,8,["path"]),f("span",null,u(a.label),1)],10,A))),128)),e.highlightLast?(n(),o("div",M)):p("",!0),f("div",{class:y(["option",{dangerous:!!c(l).dangerous}]),onClick:r[1]||(r[1]=a=>i(c(l).onClick))},[d(_,{class:"option-icon",width:"14",height:"14",path:c(l).icon,fill:"#6D7C93"},null,8,["path"]),f("span",null,u(c(l).label),1)],2)])):p("",!0)]))}});const E=g(O,[["__scopeId","data-v-c4232f59"]]);export{E as D,j as _}; -//# sourceMappingURL=DropdownMenu.162e22a4.js.map +import{d as h,K as m,b as n,c as o,A as w,z as r,q as g,B as k,G as y,v as C,e as d,w as x,N as u,D as p,t as b,I as _,F as B,L as D,x as f}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1a3fea25-e4e3-43f1-b04b-73433ab10720",e._sentryDebugIdIdentifier="sentry-dbid-1a3fea25-e4e3-43f1-b04b-73433ab10720")}catch{}})();const j="/assets/empty-box.758770e4.svg",I=h({__name:"Triangle",props:{color:{type:String,required:!1}},setup(e){const t=e,s=m(()=>t.color?{borderColor:`${t.color} transparent transparent transparent`}:{});return(l,i)=>(n(),o("div",{class:"triangle",style:w(r(s))},null,4))}});const S=g(I,[["__scopeId","data-v-7ca41e33"]]),q=h({__name:"BoxShadowButton",props:{active:{type:Boolean}},setup(e){return(t,s)=>(n(),o("button",{class:y(["box-shadow-button",{active:e.active}])},[k(t.$slots,"default",{},void 0,!0)],2))}});const $=g(q,[["__scopeId","data-v-04d82775"]]),L={class:"dropdown-menu"},N={key:0},z={key:0,class:"options"},A=["onClick"],M={key:0,class:"line"},O=h({__name:"DropdownMenu",props:{title:{type:String,required:!1},options:{type:Array,required:!0},highlightLast:{type:Boolean,required:!1,default:!1},selectIcon:{type:Object,required:!1},payload:{required:!1,default:()=>({}),type:Object}},setup(e){const t=e,s=C({open:!1}),l=m(()=>t.options[t.options.length-1]),i=async v=>{await v(t.payload),s.open=!1};return(v,c)=>(n(),o("div",L,[d($,{class:"title",active:s.open,onClick:c[0]||(c[0]=a=>s.open=!s.open)},{default:x(()=>[e.title?(n(),o("span",N,u(e.title),1)):p("",!0),e.selectIcon?(n(),b(_,{key:1,class:"select-icon",width:"18",height:"18",path:e.selectIcon,fill:"#6D7C93"},null,8,["path"])):(n(),b(S,{key:2,class:"icon",color:"#414a58"}))]),_:1},8,["active"]),s.open?(n(),o("div",z,[(n(!0),o(B,null,D(e.options.slice(0,-1),a=>(n(),o("div",{key:a.label,class:y(["option",{dangerous:!!a.dangerous}]),onClick:T=>i(a.onClick)},[d(_,{class:"option-icon",width:"14",height:"14",path:a.icon,fill:"#6D7C93"},null,8,["path"]),f("span",null,u(a.label),1)],10,A))),128)),e.highlightLast?(n(),o("div",M)):p("",!0),f("div",{class:y(["option",{dangerous:!!r(l).dangerous}]),onClick:c[1]||(c[1]=a=>i(r(l).onClick))},[d(_,{class:"option-icon",width:"14",height:"14",path:r(l).icon,fill:"#6D7C93"},null,8,["path"]),f("span",null,u(r(l).label),1)],2)])):p("",!0)]))}});const E=g(O,[["__scopeId","data-v-c4232f59"]]);export{E as D,j as _}; +//# sourceMappingURL=DropdownMenu.8f7fc9d3.js.map diff --git a/abstra_statics/dist/assets/EnvVars.bb060638.js b/abstra_statics/dist/assets/EnvVars.38d91162.js similarity index 52% rename from abstra_statics/dist/assets/EnvVars.bb060638.js rename to abstra_statics/dist/assets/EnvVars.38d91162.js index de69ba830f..a1b5783138 100644 --- a/abstra_statics/dist/assets/EnvVars.bb060638.js +++ b/abstra_statics/dist/assets/EnvVars.38d91162.js @@ -1,2 +1,2 @@ -var b=Object.defineProperty;var w=(a,e,t)=>e in a?b(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var u=(a,e,t)=>(w(a,typeof e!="symbol"?e+"":e,t),t);import{d as g,K as v,b as k,t as $,z as p,J as C}from"./registerWidgets.ca6243ef.js";import{a as I}from"./asyncComputed.3cb2e10b.js";import{C as d}from"./gateway.fa3322de.js";import{A as _}from"./activeRecord.11b7d185.js";import"./index.a86d8064.js";import{C as j}from"./CrudView.bd13f7e1.js";import{r as A}from"./icons.11151937.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./DropdownMenu.162e22a4.js";import"./Modal.2f8d0c91.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="9b4d0fc3-5da4-4a64-a7ad-d3c4ccf55373",a._sentryDebugIdIdentifier="sentry-dbid-9b4d0fc3-5da4-4a64-a7ad-d3c4ccf55373")}catch{}})();class P{constructor(){u(this,"urlPath","env-vars")}async create(e){return d.post(`projects/${e.projectId}/${this.urlPath}`,{name:e.name,value:e.value})}async delete(e,t){await d.delete(`projects/${e}/${this.urlPath}/${t}`)}async list(e){return d.get(`projects/${e}/${this.urlPath}`)}async get(e){return d.get(`${this.urlPath}/${e}`)}async update(e,t){return d.patch(`${this.urlPath}/${e}`,t)}}const n=new P;class s{constructor(e,t){u(this,"record");this.projectId=e,this.record=_.create(n,t,"id")}static async list(e){return(await n.list(e)).map(r=>new s(e,r))}static async create(e,t,r){const o=await n.create({projectId:e,name:t,value:r});return new s(e,o)}static async get(e,t){const r=await n.get(t);return new s(e,r)}static async update(e,t,r){const o=await n.update(t,r);return new s(e,o)}get key(){return this.record.get("name")}get value(){return this.record.get("value")}set value(e){this.record.set("value",e)}async save(){await this.record.save()}async delete(){await n.delete(this.projectId,this.key)}hasChanges(){return this.record.hasChanges()}}const H=g({__name:"EnvVars",setup(a){const t=C().params.projectId,{loading:r,result:o,refetch:m}=I(()=>s.list(t)),y=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}];async function f({key:c,value:i}){await s.create(t,c,i),m()}const h=v(()=>{var c,i;return{columns:[{name:"Key"},{name:"Actions"}],rows:(i=(c=o.value)==null?void 0:c.map(l=>({key:l.key,cells:[{text:l.key,classes:["title","centered"]},{text:"Actions",classes:["centered"],actions:[{icon:A,label:"Delete",async onClick(){await l.delete(),m()},dangerous:!0}]}]})))!=null?i:[]}});return(c,i)=>(k(),$(j,{"entity-name":"env-vars",loading:p(r),title:"Environment Variables",description:"Set environment variables for your project.","empty-title":"No environment variables set",table:p(h),"create-button-text":"Add Environment Variable",fields:p(y),onCreate:f},null,8,["loading","table","fields"]))}});export{H as default}; -//# sourceMappingURL=EnvVars.bb060638.js.map +var b=Object.defineProperty;var w=(a,e,t)=>e in a?b(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var u=(a,e,t)=>(w(a,typeof e!="symbol"?e+"":e,t),t);import{d as g,K as v,b as k,t as $,z as p,J as C}from"./registerWidgets.89616af0.js";import{a as I}from"./asyncComputed.8ac91a75.js";import{C as l}from"./gateway.0deebb85.js";import{A as _}from"./activeRecord.3d3c7835.js";import"./index.dae46ea1.js";import{C as j}from"./CrudView.7ced9145.js";import{r as A}from"./icons.9cfdae6d.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./DropdownMenu.8f7fc9d3.js";import"./Modal.73e976a2.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a280905a-2a6e-4b03-8868-0407c2a4cb60",a._sentryDebugIdIdentifier="sentry-dbid-a280905a-2a6e-4b03-8868-0407c2a4cb60")}catch{}})();class P{constructor(){u(this,"urlPath","env-vars")}async create(e){return l.post(`projects/${e.projectId}/${this.urlPath}`,{name:e.name,value:e.value})}async delete(e,t){await l.delete(`projects/${e}/${this.urlPath}/${t}`)}async list(e){return l.get(`projects/${e}/${this.urlPath}`)}async get(e){return l.get(`${this.urlPath}/${e}`)}async update(e,t){return l.patch(`${this.urlPath}/${e}`,t)}}const n=new P;class s{constructor(e,t){u(this,"record");this.projectId=e,this.record=_.create(n,t,"id")}static async list(e){return(await n.list(e)).map(r=>new s(e,r))}static async create(e,t,r){const o=await n.create({projectId:e,name:t,value:r});return new s(e,o)}static async get(e,t){const r=await n.get(t);return new s(e,r)}static async update(e,t,r){const o=await n.update(t,r);return new s(e,o)}get key(){return this.record.get("name")}get value(){return this.record.get("value")}set value(e){this.record.set("value",e)}async save(){await this.record.save()}async delete(){await n.delete(this.projectId,this.key)}hasChanges(){return this.record.hasChanges()}}const H=g({__name:"EnvVars",setup(a){const t=C().params.projectId,{loading:r,result:o,refetch:m}=I(()=>s.list(t)),y=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}];async function h({key:c,value:i}){await s.create(t,c,i),m()}const f=v(()=>{var c,i;return{columns:[{name:"Key"},{name:"Actions"}],rows:(i=(c=o.value)==null?void 0:c.map(d=>({key:d.key,cells:[{text:d.key,classes:["title","centered"]},{text:"Actions",classes:["centered"],actions:[{icon:A,label:"Delete",async onClick(){await d.delete(),m()},dangerous:!0}]}]})))!=null?i:[]}});return(c,i)=>(k(),$(j,{"entity-name":"env-vars",loading:p(r),title:"Environment Variables",description:"Set environment variables for your project.","empty-title":"No environment variables set",table:p(f),"create-button-text":"Add Environment Variable",fields:p(y),onCreate:h},null,8,["loading","table","fields"]))}});export{H as default}; +//# sourceMappingURL=EnvVars.38d91162.js.map diff --git a/abstra_statics/dist/assets/Error.11930ed4.js b/abstra_statics/dist/assets/Error.d0c3932f.js similarity index 50% rename from abstra_statics/dist/assets/Error.11930ed4.js rename to abstra_statics/dist/assets/Error.d0c3932f.js index 3b5fae798f..f8a3b3eb2d 100644 --- a/abstra_statics/dist/assets/Error.11930ed4.js +++ b/abstra_statics/dist/assets/Error.d0c3932f.js @@ -1,2 +1,2 @@ -import{d as c,K as i,b as l,c as _,x as r,N as s,z as p,O as u,Q as b,q as f}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="8c9bea61-ae8b-4ec8-935f-e95b27764696",e._sentryDebugIdIdentifier="sentry-dbid-8c9bea61-ae8b-4ec8-935f-e95b27764696")}catch{}})();const a=e=>(u("data-v-d3846761"),e=e(),b(),e),y={class:"error"},h=a(()=>r("h1",{class:"error-header"},"Error",-1)),g={class:"error-body"},m={class:"error-message"},v={class:"error-details"},I=a(()=>r("span",null,"Reload",-1)),E=[I],w=c({__name:"Error",props:{error:{type:Object,required:!0},repeated:{type:Boolean,required:!1}},emits:["reload"],setup(e,{emit:o}){const t=e,d=i(()=>t.repeated?"Ooops. The same error occured, please try again later.":"An error occurred while loading.");function n(){o("reload")}return(x,D)=>(l(),_("div",y,[h,r("div",g,[r("div",m,[r("p",null,s(p(d)),1),r("p",v,s(e.error.name)+": "+s(e.error.message),1)]),r("div",{class:"error-actions"},[r("button",{class:"btn btn-primary",onClick:n},E)])])]))}});const B=f(w,[["__scopeId","data-v-d3846761"]]);export{B as E}; -//# sourceMappingURL=Error.11930ed4.js.map +import{d as c,K as i,b as l,c as _,x as r,N as s,z as p,O as u,Q as f,q as b}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="afb8df54-60d2-4d47-980f-52da54e2b66e",e._sentryDebugIdIdentifier="sentry-dbid-afb8df54-60d2-4d47-980f-52da54e2b66e")}catch{}})();const d=e=>(u("data-v-d3846761"),e=e(),f(),e),y={class:"error"},h=d(()=>r("h1",{class:"error-header"},"Error",-1)),g={class:"error-body"},m={class:"error-message"},v={class:"error-details"},I=d(()=>r("span",null,"Reload",-1)),E=[I],w=c({__name:"Error",props:{error:{type:Object,required:!0},repeated:{type:Boolean,required:!1}},emits:["reload"],setup(e,{emit:o}){const t=e,a=i(()=>t.repeated?"Ooops. The same error occured, please try again later.":"An error occurred while loading.");function n(){o("reload")}return(x,D)=>(l(),_("div",y,[h,r("div",g,[r("div",m,[r("p",null,s(p(a)),1),r("p",v,s(e.error.name)+": "+s(e.error.message),1)]),r("div",{class:"error-actions"},[r("button",{class:"btn btn-primary",onClick:n},E)])])]))}});const B=b(w,[["__scopeId","data-v-d3846761"]]);export{B as E}; +//# sourceMappingURL=Error.d0c3932f.js.map diff --git a/abstra_statics/dist/assets/FormEditor.bc98641f.js b/abstra_statics/dist/assets/FormEditor.f707e99b.js similarity index 62% rename from abstra_statics/dist/assets/FormEditor.bc98641f.js rename to abstra_statics/dist/assets/FormEditor.f707e99b.js index a9bea296b4..1ab5638d2b 100644 --- a/abstra_statics/dist/assets/FormEditor.bc98641f.js +++ b/abstra_statics/dist/assets/FormEditor.f707e99b.js @@ -1,2 +1,2 @@ -import{d as $,r as x,v as H,b as i,c as f,x as a,F as C,L as T,N as q,W as M,a3 as N,e as n,O as Q,Q as j,q as A,K as X,z as t,t as w,w as y,D as V,H as Y,J as Z,S as ee}from"./registerWidgets.ca6243ef.js";import{L as te}from"./CircularLoading.5630a601.js";import{E as oe}from"./Error.11930ed4.js";import{R as re,F as ae}from"./broker.a62f2378.js";import{R as se,S as le,_ as ne,L as ie}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js";import{T as ue,a as W}from"./Tab.55e05bca.js";import{a as me}from"./asyncComputed.3cb2e10b.js";import{F as ce}from"./forms.38d7da0a.js";import{W as de}from"./workspaces.25055240.js";import{B as pe}from"./BackButton.6790f37d.js";import{S as fe}from"./SaveButton.e379ab16.js";import{D as _e}from"./DocsButton.b174b81b.js";import{P as ve}from"./PreviewButton.fc12f428.js";import"./lottie.9d24e472.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./icons.11151937.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js";import"./Passwordless.65114c07.js";import"./executeJs.c3858a9c.js";import"./PlayerNavbar.e3146994.js";import"./index.a2df0371.js";import"./WidgetsFrame.8af89817.js";import"./colors.4425ff79.js";import"./Modal.2f8d0c91.js";import"./dashes.9f1aca90.js";import"./activeRecord.11b7d185.js";import"./runnerData.170ae941.js";import"./hooks.d7d78397.js";import"./jobs.2ad85710.js";import"./uuid.f763745d.js";import"./login.bbc5e7c0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="ad0a75a2-dc27-477a-8a1f-6d69b097eaee",s._sentryDebugIdIdentifier="sentry-dbid-ad0a75a2-dc27-477a-8a1f-6d69b097eaee")}catch{}})();const ye="forms_workspace_id_path_key",U=s=>(Q("data-v-89e322ed"),s=s(),j(),s),he={class:"form-settings"},ge={class:"content"},be={class:"subsection-label"},ke={class:"property-label"},we=["value","onChange"],Se={class:"content"},xe={class:"property"},Ce=U(()=>a("div",{class:"property-label"},"Start smart form automatically",-1)),Ee={class:"property"},Fe=U(()=>a("div",{class:"property-label"},"Allow the user to restart the smart form after it is over",-1)),Re=$({__name:"FormSettings",props:{form:null},setup(s){const o=x(s.form),h=[{label:"General",props:[{label:"Form name",valueKey:"title"}]},{label:"Welcome Screen",props:[{label:"Title",valueKey:"welcome_title"},{label:"Subtitle",valueKey:"start_message"},{label:"Start button text",valueKey:"start_button_text"}]},{label:"Ending Screen",props:[{label:"Title",valueKey:"end_message"},{label:"Restart button text",valueKey:"restart_button_text"}]},{label:"Alert Messages",props:[{label:"Error message",valueKey:"error_message"}]}],g=H({pathError:null,sectionsShown:[!0,!1,!1]}),S=_=>{_.detail.includes(ye)&&(g.pathError=r)},r="This path is already being used by another form or dash on your workspace";return addEventListener("hasura-error",S),(_,c)=>(i(),f("div",he,[a("div",ge,[(i(),f(C,null,T(h,l=>a("div",{key:l.label,class:"subsection"},[a("div",be,q(l.label),1),(i(!0),f(C,null,T(l.props,p=>(i(),f("div",{key:p.label,class:"property column"},[a("div",ke,q(p.label),1),a("input",{class:"property-input",type:"text",value:o.value.get(p.valueKey),onChange:u=>o.value.set(p.valueKey,u.target.value)},null,40,we)]))),128))])),64))]),a("div",Se,[a("div",xe,[M(a("input",{"onUpdate:modelValue":c[0]||(c[0]=l=>o.value.autoStart=l),class:"checkbox-input",type:"checkbox"},null,512),[[N,o.value.autoStart]]),Ce]),a("div",Ee,[M(a("input",{"onUpdate:modelValue":c[1]||(c[1]=l=>o.value.allowRestart=l),class:"checkbox-input",type:"checkbox"},null,512),[[N,o.value.allowRestart]]),Fe])]),n(se,{runtime:o.value},null,8,["runtime"])]))}});const Ke=A(Re,[["__scopeId","data-v-89e322ed"]]),Pe={class:"page"},Be={key:1,class:"error"},De=$({__name:"FormEditor",setup(s){var F,R,K;const d=Y(),o=Z(),h=H({fullscreen:!1,rightPanelCollapsed:!1,hasChanges:!1,started:!1});addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&e.key==="s"&&(e.preventDefault(),p())});const g=x(null),{loading:S,result:r,error:_,refetch:c}=me(()=>Promise.all([de.get(),ce.get(o.params.formPath)]).then(([e,k])=>ee({workspace:e,form:k}))),l=x(!1);async function p(){var e;l.value=!0;try{await((e=r.value)==null?void 0:e.form.save())}finally{l.value=!1}}const u=ie.create(),b=X(()=>re.create({formPath:o.params.formPath}));(F=b.value)==null||F.on("stdout",e=>{u.log({type:"stdout",log:e.log})}),(R=b.value)==null||R.on("stderr",e=>{u.log({type:"stderr",log:e.log})}),(K=b.value)==null||K.onClose(()=>{u.log({type:"stderr",log:"Program closed"})});const z=()=>{u.clear()},E=async()=>{var e;return u.log({type:"restart"}),(e=g.value)==null?void 0:e.run()},G=({path:e,type:k})=>{k==="dash"?d.push({name:"dashEditor",params:{dashPath:e},query:o.query}):(d.push({name:"editor",params:{formPath:e},query:o.query}),c())},J=()=>{h.started=!0},O=()=>{h.started=!1};return(e,k)=>{var P,B,D,I,L;return i(),f(C,null,[a("div",Pe,[t(S)||!((P=t(r))!=null&&P.form)||!((B=t(r))!=null&&B.workspace)?(i(),w(te,{key:0})):t(_)?(i(),f("div",Be,[n(oe,{error:t(_),onReload:t(c)},null,8,["error","onReload"])])):(i(),w(ue,{key:2},{left:y(()=>[n(pe,{link:"/_editor/forms"})]),right:y(()=>{var m,v;return[n(_e),n(ve,{model:(m=t(r))==null?void 0:m.form},null,8,["model"]),n(fe,{model:(v=t(r))==null?void 0:v.form},null,8,["model"])]}),default:y(()=>[n(W,{title:"Preview"},{default:y(()=>{var m,v;return[n(ae,{ref_key:"runner",ref:g,form:(v=t(r))==null?void 0:v.form.makeRunnerData((m=t(r))==null?void 0:m.workspace),params:t(o).query,"is-preview":!0,"enable-auto-focus":!1,broker:t(b),style:{height:"unset",flex:1,overflow:"hidden"},onNavigate:G,onLogout:E,onExit:O,onStart:J},null,8,["form","params","broker"])]}),_:1}),n(W,{title:"Settings"},{default:y(()=>{var m;return[(m=t(r))!=null&&m.form?(i(),w(Ke,{key:0,form:t(r).form},null,8,["form"])):V("",!0)]}),_:1})]),_:1})),(D=t(r))!=null&&D.form?(i(),w(le,{key:3,runtime:"forms","log-service":t(u),onRestart:E,onClearTerminal:z},null,8,["log-service"])):V("",!0)]),n(ne,{"has-changes":(L=(I=t(r))==null?void 0:I.form)==null?void 0:L.hasChanges()},null,8,["has-changes"])],64)}}});const ct=A(De,[["__scopeId","data-v-8b7849de"]]);export{ct as default}; -//# sourceMappingURL=FormEditor.bc98641f.js.map +import{d as $,r as x,v as H,b as i,c as f,x as a,F as C,L as T,N as q,W as M,a3 as N,e as n,O as Q,Q as j,q as A,K as X,z as t,t as w,w as y,D as V,H as Y,J as Z,S as ee}from"./registerWidgets.89616af0.js";import{L as te}from"./CircularLoading.0fb686c0.js";import{E as oe}from"./Error.d0c3932f.js";import{R as re,F as ae}from"./broker.67106cf5.js";import{R as se,S as le,_ as ne,L as ie}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js";import{T as ue,a as W}from"./Tab.1de0ecf6.js";import{a as ce}from"./asyncComputed.8ac91a75.js";import{F as me}from"./forms.59430d62.js";import{W as de}from"./workspaces.621b79ad.js";import{B as pe}from"./BackButton.6e480dd1.js";import{S as fe}from"./SaveButton.c0a67dea.js";import{D as _e}from"./DocsButton.f9b71025.js";import{P as ve}from"./PreviewButton.4d9be351.js";import"./lottie.fc57e5ac.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./icons.9cfdae6d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js";import"./Passwordless.ac83d40c.js";import"./executeJs.dfd1b55f.js";import"./PlayerNavbar.2a5ed820.js";import"./index.d40cd19f.js";import"./WidgetsFrame.2b06573d.js";import"./colors.bc71fdf2.js";import"./Modal.73e976a2.js";import"./dashes.f8616397.js";import"./activeRecord.3d3c7835.js";import"./runnerData.bd24d7de.js";import"./hooks.6e1e253e.js";import"./jobs.310261dd.js";import"./uuid.d6201508.js";import"./login.6c1df514.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="d614b41e-520c-4254-befe-5e5c9b69fc9d",s._sentryDebugIdIdentifier="sentry-dbid-d614b41e-520c-4254-befe-5e5c9b69fc9d")}catch{}})();const ye="forms_workspace_id_path_key",U=s=>(Q("data-v-89e322ed"),s=s(),j(),s),he={class:"form-settings"},ge={class:"content"},be={class:"subsection-label"},ke={class:"property-label"},we=["value","onChange"],Se={class:"content"},xe={class:"property"},Ce=U(()=>a("div",{class:"property-label"},"Start smart form automatically",-1)),Ee={class:"property"},Fe=U(()=>a("div",{class:"property-label"},"Allow the user to restart the smart form after it is over",-1)),Re=$({__name:"FormSettings",props:{form:null},setup(s){const o=x(s.form),h=[{label:"General",props:[{label:"Form name",valueKey:"title"}]},{label:"Welcome Screen",props:[{label:"Title",valueKey:"welcome_title"},{label:"Subtitle",valueKey:"start_message"},{label:"Start button text",valueKey:"start_button_text"}]},{label:"Ending Screen",props:[{label:"Title",valueKey:"end_message"},{label:"Restart button text",valueKey:"restart_button_text"}]},{label:"Alert Messages",props:[{label:"Error message",valueKey:"error_message"}]}],g=H({pathError:null,sectionsShown:[!0,!1,!1]}),S=_=>{_.detail.includes(ye)&&(g.pathError=r)},r="This path is already being used by another form or dash on your workspace";return addEventListener("hasura-error",S),(_,m)=>(i(),f("div",he,[a("div",ge,[(i(),f(C,null,T(h,l=>a("div",{key:l.label,class:"subsection"},[a("div",be,q(l.label),1),(i(!0),f(C,null,T(l.props,p=>(i(),f("div",{key:p.label,class:"property column"},[a("div",ke,q(p.label),1),a("input",{class:"property-input",type:"text",value:o.value.get(p.valueKey),onChange:u=>o.value.set(p.valueKey,u.target.value)},null,40,we)]))),128))])),64))]),a("div",Se,[a("div",xe,[M(a("input",{"onUpdate:modelValue":m[0]||(m[0]=l=>o.value.autoStart=l),class:"checkbox-input",type:"checkbox"},null,512),[[N,o.value.autoStart]]),Ce]),a("div",Ee,[M(a("input",{"onUpdate:modelValue":m[1]||(m[1]=l=>o.value.allowRestart=l),class:"checkbox-input",type:"checkbox"},null,512),[[N,o.value.allowRestart]]),Fe])]),n(se,{runtime:o.value},null,8,["runtime"])]))}});const Ke=A(Re,[["__scopeId","data-v-89e322ed"]]),Pe={class:"page"},Be={key:1,class:"error"},De=$({__name:"FormEditor",setup(s){var F,R,K;const d=Y(),o=Z(),h=H({fullscreen:!1,rightPanelCollapsed:!1,hasChanges:!1,started:!1});addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&e.key==="s"&&(e.preventDefault(),p())});const g=x(null),{loading:S,result:r,error:_,refetch:m}=ce(()=>Promise.all([de.get(),me.get(o.params.formPath)]).then(([e,k])=>ee({workspace:e,form:k}))),l=x(!1);async function p(){var e;l.value=!0;try{await((e=r.value)==null?void 0:e.form.save())}finally{l.value=!1}}const u=ie.create(),b=X(()=>re.create({formPath:o.params.formPath}));(F=b.value)==null||F.on("stdout",e=>{u.log({type:"stdout",log:e.log})}),(R=b.value)==null||R.on("stderr",e=>{u.log({type:"stderr",log:e.log})}),(K=b.value)==null||K.onClose(()=>{u.log({type:"stderr",log:"Program closed"})});const z=()=>{u.clear()},E=async()=>{var e;return u.log({type:"restart"}),(e=g.value)==null?void 0:e.run()},G=({path:e,type:k})=>{k==="dash"?d.push({name:"dashEditor",params:{dashPath:e},query:o.query}):(d.push({name:"editor",params:{formPath:e},query:o.query}),m())},J=()=>{h.started=!0},O=()=>{h.started=!1};return(e,k)=>{var P,B,D,I,L;return i(),f(C,null,[a("div",Pe,[t(S)||!((P=t(r))!=null&&P.form)||!((B=t(r))!=null&&B.workspace)?(i(),w(te,{key:0})):t(_)?(i(),f("div",Be,[n(oe,{error:t(_),onReload:t(m)},null,8,["error","onReload"])])):(i(),w(ue,{key:2},{left:y(()=>[n(pe,{link:"/_editor/forms"})]),right:y(()=>{var c,v;return[n(_e),n(ve,{model:(c=t(r))==null?void 0:c.form},null,8,["model"]),n(fe,{model:(v=t(r))==null?void 0:v.form},null,8,["model"])]}),default:y(()=>[n(W,{title:"Preview"},{default:y(()=>{var c,v;return[n(ae,{ref_key:"runner",ref:g,form:(v=t(r))==null?void 0:v.form.makeRunnerData((c=t(r))==null?void 0:c.workspace),params:t(o).query,"is-preview":!0,"enable-auto-focus":!1,broker:t(b),style:{height:"unset",flex:1,overflow:"hidden"},onNavigate:G,onLogout:E,onExit:O,onStart:J},null,8,["form","params","broker"])]}),_:1}),n(W,{title:"Settings"},{default:y(()=>{var c;return[(c=t(r))!=null&&c.form?(i(),w(Ke,{key:0,form:t(r).form},null,8,["form"])):V("",!0)]}),_:1})]),_:1})),(D=t(r))!=null&&D.form?(i(),w(le,{key:3,runtime:"forms","log-service":t(u),onRestart:E,onClearTerminal:z},null,8,["log-service"])):V("",!0)]),n(ne,{"has-changes":(L=(I=t(r))==null?void 0:I.form)==null?void 0:L.hasChanges()},null,8,["has-changes"])],64)}}});const mt=A(De,[["__scopeId","data-v-8b7849de"]]);export{mt as default}; +//# sourceMappingURL=FormEditor.f707e99b.js.map diff --git a/abstra_statics/dist/assets/FormPreview.203b2e5a.js b/abstra_statics/dist/assets/FormPreview.203b2e5a.js new file mode 100644 index 0000000000..1f1a4033a4 --- /dev/null +++ b/abstra_statics/dist/assets/FormPreview.203b2e5a.js @@ -0,0 +1,2 @@ +import{d as x,v as P,r as F,K as R,b as n,c as d,z as e,t as B,e as i,x as I,H as q,J as E,q as D}from"./registerWidgets.89616af0.js";import{L as C}from"./CircularLoading.0fb686c0.js";import{E as L}from"./Error.d0c3932f.js";import{F as N,R as H}from"./broker.67106cf5.js";import{B as M}from"./BackButton.fb83d4bd.js";import{a as _}from"./asyncComputed.8ac91a75.js";import{F as V}from"./forms.59430d62.js";import{W}from"./workspaces.621b79ad.js";import"./lottie.fc57e5ac.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./icons.9cfdae6d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js";import"./Passwordless.ac83d40c.js";import"./executeJs.dfd1b55f.js";import"./PlayerNavbar.2a5ed820.js";import"./index.d40cd19f.js";import"./WidgetsFrame.2b06573d.js";import"./colors.bc71fdf2.js";import"./Modal.73e976a2.js";import"./activeRecord.3d3c7835.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="0dc269d0-14ef-4b72-912b-57bbdc002ed8",s._sentryDebugIdIdentifier="sentry-dbid-0dc269d0-14ef-4b72-912b-57bbdc002ed8")}catch{}})();const z={class:"page"},J={key:1,class:"error"},K={key:2,style:{width:"100%",height:"100%",display:"flex"}},S={style:{width:"100%",height:"100%",display:"flex"}},U=x({__name:"FormPreview",setup(s){const t=q(),r=E(),a=P({started:!1}),m=F(null),{loading:h,result:c,error:u,refetch:p}=_(()=>V.get(r.params.formPath)),{result:f}=_(()=>W.get()),y=R(()=>H.create({formPath:r.params.formPath})),b=async()=>{var o;if(!a.started){(o=m.value)==null||o.run();return}a.started=!1},v=({path:o,type:l})=>{l==="dash"?t.push({name:"dashPreview",params:{dashPath:o},query:r.query}):(t.push({name:"form-preview",params:{formPath:o},query:r.query}),p())},g=()=>{t.push(`/_editor/form/${encodeURIComponent(r.params.formPath)}`)},w=()=>{a.started=!0},k=()=>{a.started=!1};return(o,l)=>(n(),d("div",z,[e(h)||!e(c)||!e(f)?(n(),B(C,{key:0})):e(u)?(n(),d("div",J,[i(L,{error:e(u),onReload:e(p)},null,8,["error","onReload"])])):(n(),d("main",K,[I("div",S,[i(N,{ref_key:"runner",ref:m,form:e(c).makeRunnerData(e(f)),params:e(r).query,"is-preview":!0,"enable-auto-focus":!0,broker:e(y),style:{height:"unset",flex:1,overflow:"hidden"},onNavigate:v,onLogout:b,onExit:k,onStart:w},null,8,["form","params","broker"]),i(M,{onExitFullscreenPreview:g})])]))]))}});const ue=D(U,[["__scopeId","data-v-2cdbdd7a"]]);export{ue as default}; +//# sourceMappingURL=FormPreview.203b2e5a.js.map diff --git a/abstra_statics/dist/assets/FormPreview.32564b37.js b/abstra_statics/dist/assets/FormPreview.32564b37.js deleted file mode 100644 index 06f6a6e591..0000000000 --- a/abstra_statics/dist/assets/FormPreview.32564b37.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as x,v as P,r as F,K as R,b as n,c as d,z as e,t as B,e as i,x as I,H as q,J as E,q as D}from"./registerWidgets.ca6243ef.js";import{L as C}from"./CircularLoading.5630a601.js";import{E as L}from"./Error.11930ed4.js";import{F as N,R as H}from"./broker.a62f2378.js";import{B as M}from"./BackButton.1cd8c02a.js";import{a as _}from"./asyncComputed.3cb2e10b.js";import{F as V}from"./forms.38d7da0a.js";import{W}from"./workspaces.25055240.js";import"./lottie.9d24e472.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./icons.11151937.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js";import"./Passwordless.65114c07.js";import"./executeJs.c3858a9c.js";import"./PlayerNavbar.e3146994.js";import"./index.a2df0371.js";import"./WidgetsFrame.8af89817.js";import"./colors.4425ff79.js";import"./Modal.2f8d0c91.js";import"./activeRecord.11b7d185.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="2693ba0a-fd8b-481b-9021-5afcd92b5dcf",a._sentryDebugIdIdentifier="sentry-dbid-2693ba0a-fd8b-481b-9021-5afcd92b5dcf")}catch{}})();const z={class:"page"},J={key:1,class:"error"},K={key:2,style:{width:"100%",height:"100%",display:"flex"}},S={style:{width:"100%",height:"100%",display:"flex"}},U=x({__name:"FormPreview",setup(a){const t=q(),r=E(),s=P({started:!1}),m=F(null),{loading:h,result:c,error:u,refetch:f}=_(()=>V.get(r.params.formPath)),{result:p}=_(()=>W.get()),y=R(()=>H.create({formPath:r.params.formPath})),b=async()=>{var o;if(!s.started){(o=m.value)==null||o.run();return}s.started=!1},v=({path:o,type:l})=>{l==="dash"?t.push({name:"dashPreview",params:{dashPath:o},query:r.query}):(t.push({name:"form-preview",params:{formPath:o},query:r.query}),f())},g=()=>{t.push(`/_editor/form/${encodeURIComponent(r.params.formPath)}`)},w=()=>{s.started=!0},k=()=>{s.started=!1};return(o,l)=>(n(),d("div",z,[e(h)||!e(c)||!e(p)?(n(),B(C,{key:0})):e(u)?(n(),d("div",J,[i(L,{error:e(u),onReload:e(f)},null,8,["error","onReload"])])):(n(),d("main",K,[I("div",S,[i(N,{ref_key:"runner",ref:m,form:e(c).makeRunnerData(e(p)),params:e(r).query,"is-preview":!0,"enable-auto-focus":!0,broker:e(y),style:{height:"unset",flex:1,overflow:"hidden"},onNavigate:v,onLogout:b,onExit:k,onStart:w},null,8,["form","params","broker"]),i(M,{onExitFullscreenPreview:g})])]))]))}});const ue=D(U,[["__scopeId","data-v-2cdbdd7a"]]);export{ue as default}; -//# sourceMappingURL=FormPreview.32564b37.js.map diff --git a/abstra_statics/dist/assets/Forms.bc146527.js b/abstra_statics/dist/assets/Forms.b27f8e52.js similarity index 52% rename from abstra_statics/dist/assets/Forms.bc146527.js rename to abstra_statics/dist/assets/Forms.b27f8e52.js index fb20b6114f..1c872b532d 100644 --- a/abstra_statics/dist/assets/Forms.bc146527.js +++ b/abstra_statics/dist/assets/Forms.b27f8e52.js @@ -1,2 +1,2 @@ -import{d as b,K as h,b as g,t as w,z as l,H as _}from"./registerWidgets.ca6243ef.js";import{f as F,g as C,h as k}from"./icons.11151937.js";import{a as D}from"./asyncComputed.3cb2e10b.js";import{F as m}from"./forms.38d7da0a.js";import{R as I}from"./RuntimeList.1bf51451.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./DropdownMenu.162e22a4.js";import"./CircularLoading.5630a601.js";import"./lottie.9d24e472.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="8fe8bd97-a288-4510-84e6-276da34ee77d",a._sentryDebugIdIdentifier="sentry-dbid-8fe8bd97-a288-4510-84e6-276da34ee77d")}catch{}})();const z=b({__name:"Forms",setup(a){const n=_(),{loading:i,result:r,refetch:c}=D(()=>m.list()),d=({key:e})=>n.push({path:`/_editor/form/${encodeURIComponent(e)}`}),u=async({key:e})=>{var o,t;await((t=(o=r.value)==null?void 0:o.find(s=>s.path===e))==null?void 0:t.duplicate()),c()},p=async()=>{const e=await m.create();d({key:e.path})},f=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this form?")&&(await((t=(o=r.value)==null?void 0:o.find(s=>s.path===e))==null?void 0:t.delete()),c())},y=h(()=>{var e,o;return{columns:[{name:"Form Name"},{name:"Path"},{name:"Form Actions"}],rows:(o=(e=r.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/form/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:F,label:"Delete",onClick:f,dangerous:!0},{icon:C,label:"Edit Form",onClick:d},{icon:k,label:"Duplicate",onClick:u}]}]})))!=null?o:[]}});return(e,o)=>(g(),w(I,{loading:l(i),title:"Dynamic Python forms",description:"Create forms with advanced logic, easy integrations and custom branding.","create-button-text":"Create Form","empty-title":"No forms here yet","video-url":"https://www.youtube.com/embed/tN7SRGmVPwc",table:l(y),onCreate:p},null,8,["loading","table"]))}});export{z as default}; -//# sourceMappingURL=Forms.bc146527.js.map +import{d as b,K as h,b as g,t as w,z as d,H as _}from"./registerWidgets.89616af0.js";import{f as F,g as C,h as k}from"./icons.9cfdae6d.js";import{a as D}from"./asyncComputed.8ac91a75.js";import{F as m}from"./forms.59430d62.js";import{R as I}from"./RuntimeList.097a29c4.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./DropdownMenu.8f7fc9d3.js";import"./CircularLoading.0fb686c0.js";import"./lottie.fc57e5ac.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="94232dea-87d9-4c04-8873-e402cb17109c",a._sentryDebugIdIdentifier="sentry-dbid-94232dea-87d9-4c04-8873-e402cb17109c")}catch{}})();const z=b({__name:"Forms",setup(a){const n=_(),{loading:i,result:r,refetch:c}=D(()=>m.list()),l=({key:e})=>n.push({path:`/_editor/form/${encodeURIComponent(e)}`}),u=async({key:e})=>{var o,t;await((t=(o=r.value)==null?void 0:o.find(s=>s.path===e))==null?void 0:t.duplicate()),c()},p=async()=>{const e=await m.create();l({key:e.path})},f=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this form?")&&(await((t=(o=r.value)==null?void 0:o.find(s=>s.path===e))==null?void 0:t.delete()),c())},y=h(()=>{var e,o;return{columns:[{name:"Form Name"},{name:"Path"},{name:"Form Actions"}],rows:(o=(e=r.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/form/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:F,label:"Delete",onClick:f,dangerous:!0},{icon:C,label:"Edit Form",onClick:l},{icon:k,label:"Duplicate",onClick:u}]}]})))!=null?o:[]}});return(e,o)=>(g(),w(I,{loading:d(i),title:"Dynamic Python forms",description:"Create forms with advanced logic, easy integrations and custom branding.","create-button-text":"Create Form","empty-title":"No forms here yet","video-url":"https://www.youtube.com/embed/tN7SRGmVPwc",table:d(y),onCreate:p},null,8,["loading","table"]))}});export{z as default}; +//# sourceMappingURL=Forms.b27f8e52.js.map diff --git a/abstra_statics/dist/assets/Home.3eaff566.js b/abstra_statics/dist/assets/Home.3eaff566.js new file mode 100644 index 0000000000..f8d312dddb --- /dev/null +++ b/abstra_statics/dist/assets/Home.3eaff566.js @@ -0,0 +1,2 @@ +import{M as r}from"./Modal.73e976a2.js";import{d as a,v as c,r as d,b as _,c as l,e as n,w as f,F as i,a as m,x as u,q as p}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="e134f561-3642-4d3d-9bea-187e545eb8a2",e._sentryDebugIdIdentifier="sentry-dbid-e134f561-3642-4d3d-9bea-187e545eb8a2")}catch{}})();const b=["src"],y=a({__name:"Home",setup(e){const o=c({onboardingForm:""}),t=d(null);return(g,v)=>{const s=m("router-view");return _(),l(i,null,[n(s,{class:"router"}),n(r,{ref_key:"modal",ref:t},{content:f(()=>[u("iframe",{class:"form",src:o.onboardingForm},null,8,b)]),_:1},512)],64)}}});const I=p(y,[["__scopeId","data-v-8c8bc27e"]]);export{I as default}; +//# sourceMappingURL=Home.3eaff566.js.map diff --git a/abstra_statics/dist/assets/Home.6d7eef5e.js b/abstra_statics/dist/assets/Home.6d7eef5e.js deleted file mode 100644 index 167deb21f1..0000000000 --- a/abstra_statics/dist/assets/Home.6d7eef5e.js +++ /dev/null @@ -1,2 +0,0 @@ -import{M as a}from"./Modal.2f8d0c91.js";import{d as r,v as d,r as c,b as _,c as l,e as n,w as f,F as i,a as m,x as u,q as p}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d2798434-9dfa-402a-8225-adc8e83d1901",e._sentryDebugIdIdentifier="sentry-dbid-d2798434-9dfa-402a-8225-adc8e83d1901")}catch{}})();const b=["src"],y=r({__name:"Home",setup(e){const o=d({onboardingForm:""}),t=c(null);return(g,v)=>{const s=m("router-view");return _(),l(i,null,[n(s,{class:"router"}),n(a,{ref_key:"modal",ref:t},{content:f(()=>[u("iframe",{class:"form",src:o.onboardingForm},null,8,b)]),_:1},512)],64)}}});const I=p(y,[["__scopeId","data-v-8c8bc27e"]]);export{I as default}; -//# sourceMappingURL=Home.6d7eef5e.js.map diff --git a/abstra_statics/dist/assets/HookEditor.446d4a64.js b/abstra_statics/dist/assets/HookEditor.58a2f578.js similarity index 52% rename from abstra_statics/dist/assets/HookEditor.446d4a64.js rename to abstra_statics/dist/assets/HookEditor.58a2f578.js index 58bc42a1d2..c5896642b1 100644 --- a/abstra_statics/dist/assets/HookEditor.446d4a64.js +++ b/abstra_statics/dist/assets/HookEditor.58a2f578.js @@ -1,2 +1,2 @@ -import{d as w,b as o,c as a,e as n,q as S,r as R,U as k,N as f,x as t,F as x,L as P,v as U,a as V,t as $,z as c,W as b,Z as B,a3 as q,D as H,O,Q as J,w as y,J as L}from"./registerWidgets.ca6243ef.js";import{T as N,a as I}from"./Tab.55e05bca.js";import{L as D}from"./CircularLoading.5630a601.js";import{R as A,L as E,S as G,_ as M}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js";import{a as Q}from"./asyncComputed.3cb2e10b.js";import{H as F}from"./hooks.d7d78397.js";import{B as j}from"./BackButton.6790f37d.js";import{B as z,C as W,f as Z}from"./icons.11151937.js";import{S as K}from"./SaveButton.e379ab16.js";import{D as X}from"./DocsButton.b174b81b.js";import"./lottie.9d24e472.js";import"./forms.38d7da0a.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./dashes.9f1aca90.js";import"./runnerData.170ae941.js";import"./jobs.2ad85710.js";import"./workspaces.25055240.js";import"./uuid.f763745d.js";import"./login.bbc5e7c0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="eda0027f-0f61-4341-ad65-47ea5ac0bb21",s._sentryDebugIdIdentifier="sentry-dbid-eda0027f-0f61-4341-ad65-47ea5ac0bb21")}catch{}})();const Y={class:"hook-settings"},ee=w({__name:"HookSettings",props:{hook:null},setup(s){return(d,u)=>(o(),a("div",Y,[n(A,{runtime:s.hook},null,8,["runtime"])]))}});const oe=S(ee,[["__scopeId","data-v-6e8accf0"]]),te={class:"options-wrapper"},se=["onClick"],ae=w({__name:"ADropdown",props:{options:null,value:null},emits:["select"],setup(s,{emit:d}){const u=R(null),e=i=>{var m;d("select",i),(m=u.value)==null||m.blur()};return(i,m)=>(o(),a("div",{ref_key:"dropdown",ref:u,class:"dropdown",tabindex:"1"},[k(f(s.value)+" ",1),t("div",te,[(o(!0),a(x,null,P(s.options,p=>(o(),a("div",{key:p.value,class:"option",onClick:T=>e(p.value)},f(p.label),9,se))),128))])],512))}});const ne=S(ae,[["__scopeId","data-v-cac46a2e"]]),C=s=>(O("data-v-36cb1667"),s=s(),J(),s),le={class:"hook-runner"},ie={class:"title"},re={class:"section"},ce=C(()=>t("div",{class:"section-header"},"Request configuration",-1)),de=C(()=>t("div",{class:"subsection-label"},"Method",-1)),ue={class:"subsection-label"},pe=["onUpdate:modelValue"],_e=["onUpdate:modelValue"],he={key:0,class:"subsection-label"},me={class:"property"},ve=C(()=>t("div",{class:"property-label"},"Body is JSON",-1)),fe={class:"section"},ye=C(()=>t("div",{class:"section-header"},"Response",-1)),ke={key:0,class:"section"},ge={class:"no-execution-message"},be={key:1,class:"section"},xe=w({__name:"HookRunner",props:{hook:null},setup(s){const d=s,u=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"}],e=U({queryParams:[{name:"",value:""}],method:"GET",body:"",loading:!1,isBodyJson:!0}),i=E.create(),m=async()=>{const v={"Content-Type":e.isBodyJson?"application/json":"text/plain"},r=await d.hook.test({method:e.method,query:e.queryParams.reduce((_,{name:l,value:h})=>(l&&h&&(_[l]=h),_),{}),body:e.body,headers:{...v}});e.response=r,r.stderr&&i.log({type:"stderr",log:r.stderr}),r.stdout&&i.log({type:"stdout",log:r.stdout})},p=()=>{e.queryParams.push({name:"",value:""})},T=v=>{e.queryParams=e.queryParams.filter((r,_)=>_!==v)};return(v,r)=>{const _=V("icon");return o(),a("div",le,[t("div",ie,[k(" Test your hook here "),e.loading?(o(),$(D,{key:0})):(o(),a("button",{key:1,class:"execution-button",onClick:m},[n(_,{path:c(z),width:"14",height:"14",fill:"#ffffff"},null,8,["path"]),k(" Run ")]))]),t("div",re,[ce,de,n(ne,{value:e.method,options:u,onSelect:r[0]||(r[0]=l=>e.method=l)},null,8,["value"]),t("div",ue,[k(" Query Params "),n(_,{class:"action-icon",path:c(W),width:"16",height:"16","fill-hover":"#777777",onClick:p},null,8,["path"])]),(o(!0),a(x,null,P(e.queryParams,(l,h)=>(o(),a("div",{key:h,class:"params-input"},[b(t("input",{"onUpdate:modelValue":g=>l.name=g,type:"text",placeholder:"name"},null,8,pe),[[B,l.name]]),b(t("input",{"onUpdate:modelValue":g=>l.value=g,type:"text",placeholder:"value"},null,8,_e),[[B,l.value]]),n(_,{class:"delete-icon",path:c(Z),"fill-hover":"#777777",onClick:g=>T(h)},null,8,["path","onClick"])]))),128)),e.method!=="GET"?(o(),a("div",he,[k(" Request Body "),t("div",me,[b(t("input",{"onUpdate:modelValue":r[1]||(r[1]=l=>e.isBodyJson=l),class:"checkbox-input",type:"checkbox"},null,512),[[q,e.isBodyJson]]),ve])])):H("",!0),e.method!=="GET"?b((o(),a("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=l=>e.body=l)},null,512)),[[B,e.body]]):H("",!0)]),t("div",fe,[ye,e.loading?(o(),a("div",ke,[t("div",ge,[n(D)])])):e.response?(o(),a("div",be,[t("pre",null,"Status: "+f(e.response.status),1),(o(!0),a(x,null,P(e.response.headers,(l,h)=>(o(),a("pre",{key:h},f(h)+": "+f(l),1))),128)),t("pre",null,f(e.response.body),1)])):H("",!0)])])}}});const we=S(xe,[["__scopeId","data-v-36cb1667"]]),Se={class:"page"},Ce={key:0,class:"loading"},Te=w({__name:"HookEditor",setup(s){const d=L(),u=E.create(),{loading:e,result:i}=Q(async()=>await F.get(d.params.hookPath)),m=async p=>{i.value&&(i.value.path=p,await i.value.save())};return(p,T)=>{var v;return o(),a(x,null,[t("div",Se,[c(e)||!c(i)?(o(),a("div",Ce,[n(D)])):(o(),$(N,{key:1,class:"editor"},{left:y(()=>[n(j,{link:"/_editor/hooks"})]),right:y(()=>[n(X,{path:"hooks"}),n(K,{model:c(i)},null,8,["model"])]),default:y(()=>[n(I,{title:"Debug"},{default:y(()=>[n(we,{hook:c(i)},null,8,["hook"])]),_:1}),n(I,{title:"Settings"},{default:y(()=>[n(oe,{hook:c(i),onUpdatePath:m},null,8,["hook"])]),_:1})]),_:1})),n(G,{"log-service":c(u),runtime:"hooks"},null,8,["log-service"])]),n(M,{"has-changes":(v=c(i))==null?void 0:v.hasChanges()},null,8,["has-changes"])],64)}}});const je=S(Te,[["__scopeId","data-v-69cc27ff"]]);export{je as default}; -//# sourceMappingURL=HookEditor.446d4a64.js.map +import{d as w,b as o,c as a,e as n,q as S,r as R,U as k,N as f,x as t,F as x,L as P,v as U,a as V,t as $,z as r,W as b,Z as B,a3 as q,D as H,O,Q as J,w as y,J as L}from"./registerWidgets.89616af0.js";import{T as N,a as I}from"./Tab.1de0ecf6.js";import{L as D}from"./CircularLoading.0fb686c0.js";import{R as A,L as E,S as G,_ as M}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js";import{a as Q}from"./asyncComputed.8ac91a75.js";import{H as F}from"./hooks.6e1e253e.js";import{B as j}from"./BackButton.6e480dd1.js";import{B as z,C as W,f as Z}from"./icons.9cfdae6d.js";import{S as K}from"./SaveButton.c0a67dea.js";import{D as X}from"./DocsButton.f9b71025.js";import"./lottie.fc57e5ac.js";import"./forms.59430d62.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./dashes.f8616397.js";import"./runnerData.bd24d7de.js";import"./jobs.310261dd.js";import"./workspaces.621b79ad.js";import"./uuid.d6201508.js";import"./login.6c1df514.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="62beca26-1e26-42d0-a35b-68829f8cc275",s._sentryDebugIdIdentifier="sentry-dbid-62beca26-1e26-42d0-a35b-68829f8cc275")}catch{}})();const Y={class:"hook-settings"},ee=w({__name:"HookSettings",props:{hook:null},setup(s){return(d,u)=>(o(),a("div",Y,[n(A,{runtime:s.hook},null,8,["runtime"])]))}});const oe=S(ee,[["__scopeId","data-v-6e8accf0"]]),te={class:"options-wrapper"},se=["onClick"],ae=w({__name:"ADropdown",props:{options:null,value:null},emits:["select"],setup(s,{emit:d}){const u=R(null),e=c=>{var m;d("select",c),(m=u.value)==null||m.blur()};return(c,m)=>(o(),a("div",{ref_key:"dropdown",ref:u,class:"dropdown",tabindex:"1"},[k(f(s.value)+" ",1),t("div",te,[(o(!0),a(x,null,P(s.options,p=>(o(),a("div",{key:p.value,class:"option",onClick:T=>e(p.value)},f(p.label),9,se))),128))])],512))}});const ne=S(ae,[["__scopeId","data-v-cac46a2e"]]),C=s=>(O("data-v-36cb1667"),s=s(),J(),s),le={class:"hook-runner"},ce={class:"title"},ie={class:"section"},re=C(()=>t("div",{class:"section-header"},"Request configuration",-1)),de=C(()=>t("div",{class:"subsection-label"},"Method",-1)),ue={class:"subsection-label"},pe=["onUpdate:modelValue"],_e=["onUpdate:modelValue"],he={key:0,class:"subsection-label"},me={class:"property"},ve=C(()=>t("div",{class:"property-label"},"Body is JSON",-1)),fe={class:"section"},ye=C(()=>t("div",{class:"section-header"},"Response",-1)),ke={key:0,class:"section"},ge={class:"no-execution-message"},be={key:1,class:"section"},xe=w({__name:"HookRunner",props:{hook:null},setup(s){const d=s,u=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"}],e=U({queryParams:[{name:"",value:""}],method:"GET",body:"",loading:!1,isBodyJson:!0}),c=E.create(),m=async()=>{const v={"Content-Type":e.isBodyJson?"application/json":"text/plain"},i=await d.hook.test({method:e.method,query:e.queryParams.reduce((_,{name:l,value:h})=>(l&&h&&(_[l]=h),_),{}),body:e.body,headers:{...v}});e.response=i,i.stderr&&c.log({type:"stderr",log:i.stderr}),i.stdout&&c.log({type:"stdout",log:i.stdout})},p=()=>{e.queryParams.push({name:"",value:""})},T=v=>{e.queryParams=e.queryParams.filter((i,_)=>_!==v)};return(v,i)=>{const _=V("icon");return o(),a("div",le,[t("div",ce,[k(" Test your hook here "),e.loading?(o(),$(D,{key:0})):(o(),a("button",{key:1,class:"execution-button",onClick:m},[n(_,{path:r(z),width:"14",height:"14",fill:"#ffffff"},null,8,["path"]),k(" Run ")]))]),t("div",ie,[re,de,n(ne,{value:e.method,options:u,onSelect:i[0]||(i[0]=l=>e.method=l)},null,8,["value"]),t("div",ue,[k(" Query Params "),n(_,{class:"action-icon",path:r(W),width:"16",height:"16","fill-hover":"#777777",onClick:p},null,8,["path"])]),(o(!0),a(x,null,P(e.queryParams,(l,h)=>(o(),a("div",{key:h,class:"params-input"},[b(t("input",{"onUpdate:modelValue":g=>l.name=g,type:"text",placeholder:"name"},null,8,pe),[[B,l.name]]),b(t("input",{"onUpdate:modelValue":g=>l.value=g,type:"text",placeholder:"value"},null,8,_e),[[B,l.value]]),n(_,{class:"delete-icon",path:r(Z),"fill-hover":"#777777",onClick:g=>T(h)},null,8,["path","onClick"])]))),128)),e.method!=="GET"?(o(),a("div",he,[k(" Request Body "),t("div",me,[b(t("input",{"onUpdate:modelValue":i[1]||(i[1]=l=>e.isBodyJson=l),class:"checkbox-input",type:"checkbox"},null,512),[[q,e.isBodyJson]]),ve])])):H("",!0),e.method!=="GET"?b((o(),a("textarea",{key:1,"onUpdate:modelValue":i[2]||(i[2]=l=>e.body=l)},null,512)),[[B,e.body]]):H("",!0)]),t("div",fe,[ye,e.loading?(o(),a("div",ke,[t("div",ge,[n(D)])])):e.response?(o(),a("div",be,[t("pre",null,"Status: "+f(e.response.status),1),(o(!0),a(x,null,P(e.response.headers,(l,h)=>(o(),a("pre",{key:h},f(h)+": "+f(l),1))),128)),t("pre",null,f(e.response.body),1)])):H("",!0)])])}}});const we=S(xe,[["__scopeId","data-v-36cb1667"]]),Se={class:"page"},Ce={key:0,class:"loading"},Te=w({__name:"HookEditor",setup(s){const d=L(),u=E.create(),{loading:e,result:c}=Q(async()=>await F.get(d.params.hookPath)),m=async p=>{c.value&&(c.value.path=p,await c.value.save())};return(p,T)=>{var v;return o(),a(x,null,[t("div",Se,[r(e)||!r(c)?(o(),a("div",Ce,[n(D)])):(o(),$(N,{key:1,class:"editor"},{left:y(()=>[n(j,{link:"/_editor/hooks"})]),right:y(()=>[n(X,{path:"hooks"}),n(K,{model:r(c)},null,8,["model"])]),default:y(()=>[n(I,{title:"Debug"},{default:y(()=>[n(we,{hook:r(c)},null,8,["hook"])]),_:1}),n(I,{title:"Settings"},{default:y(()=>[n(oe,{hook:r(c),onUpdatePath:m},null,8,["hook"])]),_:1})]),_:1})),n(G,{"log-service":r(u),runtime:"hooks"},null,8,["log-service"])]),n(M,{"has-changes":(v=r(c))==null?void 0:v.hasChanges()},null,8,["has-changes"])],64)}}});const je=S(Te,[["__scopeId","data-v-69cc27ff"]]);export{je as default}; +//# sourceMappingURL=HookEditor.58a2f578.js.map diff --git a/abstra_statics/dist/assets/Hooks.c2164fb8.js b/abstra_statics/dist/assets/Hooks.c2164fb8.js new file mode 100644 index 0000000000..124083ae81 --- /dev/null +++ b/abstra_statics/dist/assets/Hooks.c2164fb8.js @@ -0,0 +1,2 @@ +import{d as k,K as y,b as h,t as g,z as d,H as _}from"./registerWidgets.89616af0.js";import{f as H,g as w,h as C}from"./icons.9cfdae6d.js";import{a as I}from"./asyncComputed.8ac91a75.js";import{H as p}from"./hooks.6e1e253e.js";import{R as x}from"./RuntimeList.097a29c4.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./DropdownMenu.8f7fc9d3.js";import"./CircularLoading.0fb686c0.js";import"./lottie.fc57e5ac.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="17bb1466-c217-4ac0-8162-42e8b5a7b577",a._sentryDebugIdIdentifier="sentry-dbid-17bb1466-c217-4ac0-8162-42e8b5a7b577")}catch{}})();const $=k({__name:"Hooks",setup(a){const n=_(),{loading:r,result:s,refetch:c}=I(()=>p.list()),l=({key:e})=>n.push({path:`/_editor/hook/${encodeURIComponent(e)}`}),u=async({key:e})=>{var o,t;await((t=(o=s.value)==null?void 0:o.find(i=>i.path===e))==null?void 0:t.duplicate()),c()},m=async()=>{const e=await p.create();l({key:e.path})},f=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this hook?")&&(await((t=(o=s.value)==null?void 0:o.find(i=>i.path===e))==null?void 0:t.delete()),c())},b=y(()=>{var e,o;return{columns:[{name:"Hook Name"},{name:"Path"},{name:"Hook Actions"}],rows:(o=(e=s.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/hook/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:H,label:"Delete",onClick:f,dangerous:!0},{icon:w,label:"Edit Hook",onClick:l},{icon:C,label:"Duplicate",onClick:u}]}]})))!=null?o:[]}});return(e,o)=>(h(),g(x,{loading:d(r),title:"Python Hooks",description:"Trigger your Python scripts with a request.","create-button-text":"Create Hook","empty-title":"No hooks here yet",table:d(b),onCreate:m},null,8,["loading","table"]))}});export{$ as default}; +//# sourceMappingURL=Hooks.c2164fb8.js.map diff --git a/abstra_statics/dist/assets/Hooks.d41656c0.js b/abstra_statics/dist/assets/Hooks.d41656c0.js deleted file mode 100644 index 8c915e7384..0000000000 --- a/abstra_statics/dist/assets/Hooks.d41656c0.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as y,K as h,b,t as g,z as d,H as _}from"./registerWidgets.ca6243ef.js";import{f as H,g as w,h as C}from"./icons.11151937.js";import{a as I}from"./asyncComputed.3cb2e10b.js";import{H as p}from"./hooks.d7d78397.js";import{R as x}from"./RuntimeList.1bf51451.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./DropdownMenu.162e22a4.js";import"./CircularLoading.5630a601.js";import"./lottie.9d24e472.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="293e1653-2bf3-465d-a8ef-7e7c9f9eb004",a._sentryDebugIdIdentifier="sentry-dbid-293e1653-2bf3-465d-a8ef-7e7c9f9eb004")}catch{}})();const $=y({__name:"Hooks",setup(a){const n=_(),{loading:r,result:s,refetch:c}=I(()=>p.list()),l=({key:e})=>n.push({path:`/_editor/hook/${encodeURIComponent(e)}`}),u=async({key:e})=>{var o,t;await((t=(o=s.value)==null?void 0:o.find(i=>i.path===e))==null?void 0:t.duplicate()),c()},f=async()=>{const e=await p.create();l({key:e.path})},m=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this hook?")&&(await((t=(o=s.value)==null?void 0:o.find(i=>i.path===e))==null?void 0:t.delete()),c())},k=h(()=>{var e,o;return{columns:[{name:"Hook Name"},{name:"Path"},{name:"Hook Actions"}],rows:(o=(e=s.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/hook/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:H,label:"Delete",onClick:m,dangerous:!0},{icon:w,label:"Edit Hook",onClick:l},{icon:C,label:"Duplicate",onClick:u}]}]})))!=null?o:[]}});return(e,o)=>(b(),g(x,{loading:d(r),title:"Python Hooks",description:"Trigger your Python scripts with a request.","create-button-text":"Create Hook","empty-title":"No hooks here yet",table:d(k),onCreate:f},null,8,["loading","table"]))}});export{$ as default}; -//# sourceMappingURL=Hooks.d41656c0.js.map diff --git a/abstra_statics/dist/assets/JobEditor.b0e3148a.js b/abstra_statics/dist/assets/JobEditor.2e1f22b7.js similarity index 80% rename from abstra_statics/dist/assets/JobEditor.b0e3148a.js rename to abstra_statics/dist/assets/JobEditor.2e1f22b7.js index 0565a8869a..f00e499b69 100644 --- a/abstra_statics/dist/assets/JobEditor.b0e3148a.js +++ b/abstra_statics/dist/assets/JobEditor.2e1f22b7.js @@ -1,2 +1,2 @@ -import{a1 as ie,d as H,o as ne,v as q,r as $,b as k,c as X,x as _,F as x,L as A,N as C,z as T,W as j,ac as L,U as N,O as K,Q,q as R,a2 as ee,K as U,e as D,G as te,t as P,D as se,w as F,J as ce}from"./registerWidgets.ca6243ef.js";import{T as ue,a as le}from"./Tab.55e05bca.js";import{L as de}from"./CircularLoading.5630a601.js";import{a as he}from"./asyncComputed.3cb2e10b.js";import{J as pe}from"./jobs.2ad85710.js";import{S as fe}from"./SaveButton.e379ab16.js";import{B as ve}from"./BackButton.6790f37d.js";import{S as me,_ as ye,R as _e,L as ge}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js";import{D as be}from"./DocsButton.b174b81b.js";import"./lottie.9d24e472.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./icons.11151937.js";import"./forms.38d7da0a.js";import"./dashes.9f1aca90.js";import"./runnerData.170ae941.js";import"./hooks.d7d78397.js";import"./workspaces.25055240.js";import"./uuid.f763745d.js";import"./login.bbc5e7c0.js";(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g=new Error().stack;g&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[g]="641d97ec-ccee-4fc2-87fa-f401ec39abfa",p._sentryDebugIdIdentifier="sentry-dbid-641d97ec-ccee-4fc2-87fa-f401ec39abfa")}catch{}})();var oe={exports:{}};(function(p,g){(function(f,h){p.exports=h()})(globalThis,function(){return(()=>{var l={794:(m,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CronParser=void 0;var n=b(586),y=function(){function u(t,e,i){e===void 0&&(e=!0),i===void 0&&(i=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=i}return u.prototype.parse=function(){var t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},u.prototype.extractParts=function(t){if(!this.expression)throw new Error("Expression is empty");var e=t.trim().split(/[ ]+/);if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var i=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";i?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},u.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(O){var M=O.replace(/\D/,""),w=M;return e.dayOfWeekStartIndexZero?M=="7"&&(w="0"):w=(parseInt(M)-1).toString(),O.replace(M,w)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var i={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var o in i)t[5]=t[5].replace(new RegExp(o,"gi"),i[o].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(O){var M=O.replace(/\D/,""),w=M;return e.monthStartIndexZero&&(w=(parseInt(M)+1).toString()),O.replace(M,w)});var r={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in r)t[4]=t[4].replace(new RegExp(a,"gi"),r[a].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var s=0;s-1&&!/^\*|\-|\,/.test(t[s])){var d=null;switch(s){case 4:d="12";break;case 5:d="6";break;case 6:d="9999";break;default:d=null;break}if(d!==null){var S=t[s].split("/");t[s]="".concat(S[0],"-").concat(d,"/").concat(S[1])}}},u.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},u.prototype.validateRange=function(t){n.default.secondRange(t[0]),n.default.minuteRange(t[1]),n.default.hourRange(t[2]),n.default.dayOfMonthRange(t[3]),n.default.monthRange(t[4],this.monthStartIndexZero),n.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},u.prototype.assertNoInvalidCharacters=function(t,e){var i=e.match(/[A-KM-VX-Z]+/gi);if(i&&i.length)throw new Error("".concat(t," part contains invalid values: '").concat(i.toString(),"'"))},u}();c.CronParser=y},728:(m,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExpressionDescriptor=void 0;var n=b(910),y=b(794),u=function(){function t(e,i){if(this.expression=e,this.options=i,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var o=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(o,"'.")),this.options.locale=o}this.i18n=t.locales[this.options.locale],i.use24HourTimeFormat===void 0&&(i.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,i){var o=i===void 0?{}:i,r=o.throwExceptionOnParseError,a=r===void 0?!0:r,s=o.verbose,d=s===void 0?!1:s,S=o.dayOfWeekStartIndexZero,O=S===void 0?!0:S,M=o.monthStartIndexZero,w=M===void 0?!1:M,I=o.use24HourTimeFormat,E=o.locale,J=E===void 0?null:E,W={throwExceptionOnParseError:a,verbose:d,dayOfWeekStartIndexZero:O,monthStartIndexZero:w,use24HourTimeFormat:I,locale:J},V=new t(e,W);return V.getFullDescription()},t.initialize=function(e,i){i===void 0&&(i="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=i,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var i=new y.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=i.parse();var o=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),a=this.getMonthDescription(),s=this.getDayOfWeekDescription(),d=this.getYearDescription();e+=o+r+s+a+d,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(S){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(S)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],i=this.expressionParts[1],o=this.expressionParts[2],r="";if(!n.StringUtilities.containsAny(i,t.specialCharacters)&&!n.StringUtilities.containsAny(o,t.specialCharacters)&&!n.StringUtilities.containsAny(e,t.specialCharacters))r+=this.i18n.atSpace()+this.formatTime(o,i,e);else if(!e&&i.indexOf("-")>-1&&!(i.indexOf(",")>-1)&&!(i.indexOf("/")>-1)&&!n.StringUtilities.containsAny(o,t.specialCharacters)){var a=i.split("-");r+=n.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(o,a[0],""),this.formatTime(o,a[1],""))}else if(!e&&o.indexOf(",")>-1&&o.indexOf("-")==-1&&o.indexOf("/")==-1&&!n.StringUtilities.containsAny(i,t.specialCharacters)){var s=o.split(",");r+=this.i18n.at();for(var d=0;d1){var a=r[r.length-1].index;o=o.substring(0,a)+":59"+o.substring(a+3)}}return o},t.prototype.getDayOfWeekDescription=function(){var e=this,i=this.i18n.daysOfTheWeek(),o=null;return this.expressionParts[5]=="*"?o="":o=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(r,a){var s=r;return r.indexOf("#")>-1?s=r.substr(0,r.indexOf("#")):r.indexOf("L")>-1&&(s=s.replace("L","")),e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(a)[parseInt(s)]:i[parseInt(s)]},function(r){return parseInt(r)==1?"":n.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(r),r)},function(r){var a=r.substring(0,r.indexOf("-")),s=e.expressionParts[3]!="*";return s?e.i18n.commaAndX0ThroughX1(a):e.i18n.commaX0ThroughX1(a)},function(r){var a=null;if(r.indexOf("#")>-1){var s=r.substring(r.indexOf("#")+1),d=r.substring(0,r.indexOf("#")),S=null;switch(s){case"1":S=e.i18n.first(d);break;case"2":S=e.i18n.second(d);break;case"3":S=e.i18n.third(d);break;case"4":S=e.i18n.fourth(d);break;case"5":S=e.i18n.fifth(d);break}a=e.i18n.commaOnThe(s)+S+e.i18n.spaceX0OfTheMonth()}else if(r.indexOf("L")>-1)a=e.i18n.commaOnTheLastX0OfTheMonth(r.replace("L",""));else{var O=e.expressionParts[3]!="*";a=O?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(r)}return a}),o},t.prototype.getMonthDescription=function(){var e=this,i=this.i18n.monthsOfTheYear(),o=this.getSegmentDescription(this.expressionParts[4],"",function(r,a){return a&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(a)[parseInt(r)-1]:i[parseInt(r)-1]},function(r){return parseInt(r)==1?"":n.StringUtilities.format(e.i18n.commaEveryX0Months(r),r)},function(r){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return o},t.prototype.getDayOfMonthDescription=function(){var e=this,i=null,o=this.expressionParts[3];switch(o){case"L":i=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":i=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var r=o.match(/(\d{1,2}W)|(W\d{1,2})/);if(r){var a=parseInt(r[0].replace("W","")),s=a==1?this.i18n.firstWeekday():n.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());i=n.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),s);break}else{var d=o.match(/L-(\d{1,2})/);if(d){var S=d[1];i=n.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(S),S);break}else{if(o=="*"&&this.expressionParts[5]!="*")return"";i=this.getSegmentDescription(o,this.i18n.commaEveryDay(),function(O){return O=="L"?e.i18n.lastDay():e.i18n.dayX0?n.StringUtilities.format(e.i18n.dayX0(),O):O},function(O){return O=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(O)},function(O){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(O)},function(O){return e.i18n.commaOnDayX0OfTheMonth(O)})}break}}return i},t.prototype.getYearDescription=function(){var e=this,i=this.getSegmentDescription(this.expressionParts[6],"",function(o){return/^\d+$/.test(o)?new Date(parseInt(o),1).getFullYear().toString():o},function(o){return n.StringUtilities.format(e.i18n.commaEveryX0Years(o),o)},function(o){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(o){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return i},t.prototype.getSegmentDescription=function(e,i,o,r,a,s){var d=null,S=e.indexOf("/")>-1,O=e.indexOf("-")>-1,M=e.indexOf(",")>-1;if(!e)d="";else if(e==="*")d=i;else if(!S&&!O&&!M)d=n.StringUtilities.format(s(e),o(e));else if(M){for(var w=e.split(","),I="",E=0;E0&&w.length>2&&(I+=",",E0&&w.length>1&&(E==w.length-1||w.length==2)&&(I+="".concat(this.i18n.spaceAnd()," ")),w[E].indexOf("/")>-1||w[E].indexOf("-")>-1){var J=w[E].indexOf("-")>-1&&w[E].indexOf("/")==-1,W=this.getSegmentDescription(w[E],i,o,r,J?this.i18n.commaX0ThroughX1:a,s);J&&(W=W.replace(", ","")),I+=W}else S?I+=this.getSegmentDescription(w[E],i,o,r,a,s):I+=o(w[E]);S?d=I:d=n.StringUtilities.format(s(e),I)}else if(S){var w=e.split("/");if(d=n.StringUtilities.format(r(w[1]),w[1]),w[0].indexOf("-")>-1){var V=this.generateRangeSegmentDescription(w[0],a,o);V.indexOf(", ")!=0&&(d+=", "),d+=V}else if(w[0].indexOf("*")==-1){var Z=n.StringUtilities.format(s(w[0]),o(w[0]));Z=Z.replace(", ",""),d+=n.StringUtilities.format(this.i18n.commaStartingX0(),Z)}}else O&&(d=this.generateRangeSegmentDescription(e,a,o));return d},t.prototype.generateRangeSegmentDescription=function(e,i,o){var r="",a=e.split("-"),s=o(a[0],1),d=o(a[1],2),S=i(e);return r+=n.StringUtilities.format(S,s,d),r},t.prototype.formatTime=function(e,i,o){var r=parseInt(e),a="",s=!1;this.options.use24HourTimeFormat||(s=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),a=s?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),r===0&&(r=12));var d=i,S="";return o&&(S=":".concat(("00"+o).substring(o.length))),"".concat(s?a:"").concat(("00"+r.toString()).substring(r.toString().length),":").concat(("00"+d.toString()).substring(d.toString().length)).concat(S).concat(s?"":a)},t.prototype.transformVerbosity=function(e,i){return i||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();c.ExpressionDescriptor=u},336:(m,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.enLocaleLoader=void 0;var n=b(751),y=function(){function u(){}return u.prototype.load=function(t){t.en=new n.en},u}();c.enLocaleLoader=y},751:(m,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.en=void 0;var b=function(){function n(){}return n.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},n.prototype.atX0MinutesPastTheHourGt20=function(){return null},n.prototype.commaMonthX0ThroughMonthX1=function(){return null},n.prototype.commaYearX0ThroughYearX1=function(){return null},n.prototype.use24HourTimeFormatByDefault=function(){return!1},n.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},n.prototype.everyMinute=function(){return"every minute"},n.prototype.everyHour=function(){return"every hour"},n.prototype.atSpace=function(){return"At "},n.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},n.prototype.at=function(){return"At"},n.prototype.spaceAnd=function(){return" and"},n.prototype.everySecond=function(){return"every second"},n.prototype.everyX0Seconds=function(){return"every %s seconds"},n.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},n.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},n.prototype.everyX0Minutes=function(){return"every %s minutes"},n.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},n.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},n.prototype.everyX0Hours=function(){return"every %s hours"},n.prototype.betweenX0AndX1=function(){return"between %s and %s"},n.prototype.atX0=function(){return"at %s"},n.prototype.commaEveryDay=function(){return", every day"},n.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},n.prototype.commaX0ThroughX1=function(){return", %s through %s"},n.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},n.prototype.first=function(){return"first"},n.prototype.second=function(){return"second"},n.prototype.third=function(){return"third"},n.prototype.fourth=function(){return"fourth"},n.prototype.fifth=function(){return"fifth"},n.prototype.commaOnThe=function(){return", on the "},n.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},n.prototype.lastDay=function(){return"the last day"},n.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},n.prototype.commaOnlyOnX0=function(){return", only on %s"},n.prototype.commaAndOnX0=function(){return", and on %s"},n.prototype.commaEveryX0Months=function(){return", every %s months"},n.prototype.commaOnlyInX0=function(){return", only in %s"},n.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},n.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},n.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},n.prototype.firstWeekday=function(){return"first weekday"},n.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},n.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},n.prototype.commaEveryX0Days=function(){return", every %s days"},n.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},n.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},n.prototype.commaEveryHour=function(){return", every hour"},n.prototype.commaEveryX0Years=function(){return", every %s years"},n.prototype.commaStartingX0=function(){return", starting %s"},n.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},n.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},n}();c.en=b},586:(m,c)=>{Object.defineProperty(c,"__esModule",{value:!0});function b(y,u){if(!y)throw new Error(u)}var n=function(){function y(){}return y.secondRange=function(u){for(var t=u.split(","),e=0;e=0&&i<=59,"seconds part must be >= 0 and <= 59")}},y.minuteRange=function(u){for(var t=u.split(","),e=0;e=0&&i<=59,"minutes part must be >= 0 and <= 59")}},y.hourRange=function(u){for(var t=u.split(","),e=0;e=0&&i<=23,"hours part must be >= 0 and <= 23")}},y.dayOfMonthRange=function(u){for(var t=u.split(","),e=0;e=1&&i<=31,"DOM part must be >= 1 and <= 31")}},y.monthRange=function(u,t){for(var e=u.split(","),i=0;i=1&&o<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},y.dayOfWeekRange=function(u,t){for(var e=u.split(","),i=0;i=0&&o<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},y}();c.default=n},910:(m,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.StringUtilities=void 0;var b=function(){function n(){}return n.format=function(y){for(var u=[],t=1;t-1})},n}();c.StringUtilities=b}},f={};function h(m){var c=f[m];if(c!==void 0)return c.exports;var b=f[m]={exports:{}};return l[m](b,b.exports,h),b.exports}var v={};return(()=>{var m=v;Object.defineProperty(m,"__esModule",{value:!0}),m.toString=void 0;var c=h(728),b=h(336);c.ExpressionDescriptor.initialize(new b.enLocaleLoader),m.default=c.ExpressionDescriptor;var n=c.ExpressionDescriptor.toString;m.toString=n})(),v})()})})(oe);const re=ie(oe.exports),Se=p=>{const[g,l,f,h,v]=p.split(" ");return{minute:g,hour:l,day:f,month:h,weekday:v}};function B(p){if(p==="*")return{values:[-1]};{const l=p.split(","),f=[];for(let h=0;h[...Array(60).keys()].reduce((p,g)=>(g%15||p.push(g),p),[]),we=()=>[...Array(31).keys()].map(p=>p+1),G=()=>{const p=[];for(let g=0;g<24;g++)for(let l=0;l<60;l+=30)g<12?l<10?p.push(`${g}:0${l} AM`):p.push(`${g}:${l} AM`):g===12?l<10?p.push(`${g}:0${l} PM`):p.push(`${g}:${l} PM`):l<10?p.push(`${g-12}:0${l} PM`):p.push(`${g-12}:${l} PM`);return p},Te={0:"0",1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23",24:"24",25:"25",26:"26",27:"27",28:"28",29:"29",30:"30",31:"31",32:"32",33:"33",34:"34",35:"35",36:"36",37:"37",38:"38",39:"39",40:"40",41:"41",42:"42",43:"43",44:"44",45:"45",46:"46",47:"47",48:"48",49:"49",50:"50",51:"51",52:"52",53:"53",54:"54",55:"55",56:"56",57:"57",58:"58",59:"59"},ke={0:"0",1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23"},Xe={1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23",24:"24",25:"25",26:"26",27:"27",28:"28",29:"29",30:"30",31:"31"},Me={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"},z={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"},Ee=["hourly","daily","weekly","monthly"],De={hourly:{minute:"0",hour:"*",day:"*",month:"*",weekday:"*"},daily:{minute:"0",hour:"6",day:"*",month:"*",weekday:"*"},weekly:{minute:"0",hour:"6",day:"*",month:"*",weekday:"1"},monthly:{minute:"0",hour:"6",day:"1",month:"*",weekday:"*"}},Ce=p=>(K("data-v-4a09321b"),p=p(),Q(),p),Ie={class:"cron-settings-wrapper"},$e={class:"cron-selector"},xe={class:"periodicity"},Ae=Ce(()=>_("div",{class:"label"},"Recurrence",-1)),je=["selected"],Le=["selected"],Ue=["value","selected"],Ne={class:"periodicity"},He={class:"schedule"},Re=["value","selected"],We={class:"schedule"},Be=["value","selected"],Ye={class:"schedule"},Je=["value","selected"],Ve=["value","selected"],Fe={class:"schedule"},Ze=["value","selected"],Ge=["value","selected"],Pe=H({__name:"CronEditor",props:{crontab:null},emits:["changeCrontab","saveCrontab","showAdvancedSettings"],setup(p,{emit:g}){const l=p;function f(o,r){const a=parseInt(o),s=parseInt(r),d=a>=12?"PM":"AM",S=a%12,O=s<10?`0${s}`:s;return`${S}:${O} ${d}`}ne(()=>{const{hour:o,day:r,weekday:a,month:s,minute:d}=l.crontab;s=="*"&&a==="*"&&r!=="*"&&!c([r,o,d])?v.value="monthly":s==="*"&&r==="*"&&a!=="*"&&!c([a,o,d])?v.value="weekly":r==="*"&&a==="*"&&s==="*"&&o!=="*"&&!c([o,d])?v.value="daily":o=="*"&&r==="*"&&a==="*"&&s==="*"&&!c([d])?v.value="hourly":v.value="custom"});const h=q({minute:l.crontab.minute,hour:l.crontab.hour,day:l.crontab.day,month:l.crontab.month,weekday:l.crontab.weekday}),v=$(""),m=$(1),c=o=>o.some(r=>r.includes("-")||r.includes(",")),b=o=>{h.minute=o.minute,h.hour=o.hour,h.day=o.day,h.month=o.month,h.weekday=o.weekday},n=o=>{m.value=0,v.value=o.target.value,b(De[v.value]),g("changeCrontab",h)},y=o=>{m.value=0;const r=o.target.value;h.minute=r,g("changeCrontab",h)},u=o=>{m.value=0;const r=o.target.value;let a=r.split(":")[0],s=r.split(":")[1];a=r.split(" ")[1]==="AM"||a==="12"?a:(Number(a)+12).toString(),s=s.split(" ")[0],h.minute=s,h.hour=a,g("changeCrontab",h)},t=o=>{m.value=0;const r=o.target.value;h.weekday=r,g("changeCrontab",h)},e=o=>{m.value=0;const r=o.target.value;h.day=r,g("changeCrontab",h)},i=()=>{v.value="custom",g("showAdvancedSettings")};return(o,r)=>(k(),X("div",Ie,[_("div",$e,[_("div",xe,[Ae,_("select",{class:"select",onChange:n},[_("option",{value:"",selected:!v.value,disabled:"",hidden:""}," Choose a periodicity ",8,je),_("option",{value:"",selected:v.value=="custom",disabled:"",hidden:""}," Custom ",8,Le),(k(!0),X(x,null,A(T(Ee),(a,s)=>(k(),X("option",{key:s,value:a,selected:a==v.value},C(a),9,Ue))),128))],32)]),_("div",Ne,[j(_("div",He,[N(" at "),_("select",{class:"select",onChange:y},[(k(!0),X(x,null,A(T(Oe)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a==parseInt(h.minute)},C(a),9,Re))),128))],32),N(" minutes ")],512),[[L,v.value==="hourly"]]),j(_("div",We,[N(" at "),_("select",{class:"select",onChange:u},[(k(!0),X(x,null,A(T(G)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===f(h.hour,h.minute)},C(a),9,Be))),128))],32)],512),[[L,v.value==="daily"]]),j(_("div",Ye,[N(" on "),_("select",{class:"select",onChange:t},[(k(!0),X(x,null,A(T(z),(a,s)=>(k(),X("option",{key:s,value:s,selected:a===Object.values(T(z))[parseInt(h.weekday)]},C(a),9,Je))),128))],32),N(" at "),_("select",{class:"select",onChange:u},[(k(!0),X(x,null,A(T(G)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===f(h.hour,h.minute)},C(a),9,Ve))),128))],32)],512),[[L,v.value==="weekly"]]),j(_("div",Fe,[N(" on "),_("select",{class:"select",onChange:e},[(k(!0),X(x,null,A(T(we)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===parseInt(h.day)},C(a),9,Ze))),128))],32),N(" at "),_("select",{class:"select",onChange:u},[(k(!0),X(x,null,A(T(G)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===f(h.hour,h.minute)},C(a),9,Ge))),128))],32)],512),[[L,v.value==="monthly"]])]),_("span",{class:"advanced-settings",onClick:i},"Advanced settings")])]))}});const ze=R(Pe,[["__scopeId","data-v-4a09321b"]]),qe=p=>(K("data-v-a5e38138"),p=p(),Q(),p),Ke={class:"container"},Qe=qe(()=>_("div",{class:"header"},[_("span",null,"Choice")],-1)),et={class:"body"},tt={class:"checkbox"},nt=["id","checked"],ot=["for"],rt={class:"name"},at=H({__name:"Choice",props:{choiceOptions:null,values:null},emits:["changeValues"],setup(p,{emit:g}){const l=p,f=$([]),h=$(l.choiceOptions);ne(()=>{l.values&&(f.value=l.values,l.values[0]===-1?f.value=[...Object.keys(l.choiceOptions).map(Number)]:f.value=l.values)}),ee(()=>l.values,()=>{l.values&&(l.values[0]!==-1?f.value=l.values:f.value=[...Object.keys(l.choiceOptions).map(Number)])});const v=U(()=>c.value.join(",")),m=U(()=>[...f.value].sort((y,u)=>y-u)),c=U(()=>{var y=[],u,t;for(let e=0;ef.value.includes(Number(y)),n=y=>{if(y.preventDefault(),f.value.length===1&&y&&y.target&&!y.target.checked){alert("You must select at least one item"),y.target.checked=!0;return}const u=y.target.id;b(u)?f.value=f.value.filter(t=>t!==Number(u)):f.value.push(Number(u)),g("changeValues",v.value?v.value:"*")};return(y,u)=>(k(),X("div",Ke,[Qe,_("div",et,[(k(!0),X(x,null,A(h.value,(t,e)=>(k(),X("div",{key:e,class:"item"},[_("div",tt,[_("input",{id:e,type:"checkbox",checked:b(e),onInput:n},null,40,nt),_("label",{for:`${e}`},null,8,ot)]),_("div",rt,C(t),1)]))),128))])]))}});const it=R(at,[["__scopeId","data-v-a5e38138"]]),st={class:"wrapper"},ct=H({__name:"TimeSelector",props:{initialValue:null,options:null,type:null},emits:["change"],setup(p,{emit:g}){const l=p,f=$(l.initialValue),h=v=>{g("change",l.type,v)};return ee(()=>l.initialValue,v=>{f.value=v}),(v,m)=>(k(),X("div",st,[D(it,{"choice-options":p.options,values:f.value.values,onChangeValues:h},null,8,["choice-options","values"])]))}});const Y=R(ct,[["__scopeId","data-v-a1b10267"]]),ut={class:"cron-settings-wrapper"},lt={class:"cron-settings"},dt={class:"human-readable"},ht={class:"cron-editor"},pt={class:"cron-tabs"},ft=["onClick"],vt={class:"actions"},mt=H({__name:"AdvancedCronEditor",props:{job:null},emits:["updateSchedule"],setup(p,{emit:g}){const f=$(p.job),{minute:h,hour:v,day:m,month:c,weekday:b}=Se(f.value.schedule),n=q({weekday:b,month:c,day:m,hour:v,minute:h}),y=["Month","Day of Month","Hours","Minutes","Days of week"],u=$(0),t=d=>{u.value=d},e=U(()=>o.value===f.value.schedule),i=U(()=>re.toString(o.value)),o=U(()=>`${n.minute} ${n.hour} ${n.day} ${n.month} ${n.weekday}`),r=(d,S)=>{n[d]=S},a=()=>{g("updateSchedule",o.value)},s=()=>{n.minute=h,n.hour=v,n.day=m,n.month=c,n.weekday=b};return(d,S)=>(k(),X("div",ut,[_("div",lt,[_("p",dt,'"'+C(T(i))+'" - GMT+0',1),_("div",ht,[_("div",pt,[(k(),X(x,null,A(y,(O,M)=>_("span",{key:M,class:te(["cron-tab",{active:u.value===M}]),onClick:w=>t(M)},C(O),11,ft)),64))]),j(D(Y,{"initial-value":T(B)(n.month),options:T(Me),type:"month",onChange:r},null,8,["initial-value","options"]),[[L,u.value===0]]),j(D(Y,{"initial-value":T(B)(n.day),options:T(Xe),type:"day",onChange:r},null,8,["initial-value","options"]),[[L,u.value===1]]),j(D(Y,{"initial-value":T(B)(n.hour),options:T(ke),type:"hour",onChange:r},null,8,["initial-value","options"]),[[L,u.value===2]]),j(D(Y,{"initial-value":T(B)(n.minute),options:T(Te),type:"minute",onChange:r},null,8,["initial-value","options"]),[[L,u.value===3]]),j(D(Y,{"initial-value":T(B)(n.weekday),options:T(z),type:"weekday",onChange:r},null,8,["initial-value","options"]),[[L,u.value===4]]),_("div",vt,[_("button",{class:"save-button button",onClick:s}," Reset changes "),_("button",{class:te(["save-button","button",T(e)?"disabled":""]),onClick:a}," Set changes ",2)])])])]))}});const yt=R(mt,[["__scopeId","data-v-07f4693a"]]),_t={class:"modal-wrapper"},gt={class:"modal"},bt={class:"modal-content-wrapper"},St=H({__name:"AdvancedSettingsModal",props:{job:null},emits:["close","saveCrontab"],setup(p,{emit:g}){const f=$(p.job),h=m=>{g("saveCrontab",m)},v=()=>{g("close")};return(m,c)=>(k(),X("div",_t,[_("div",gt,[_("span",{class:"close",onClick:v},"\xD7"),_("div",bt,[D(yt,{job:f.value,onUpdateSchedule:h},null,8,["job"])])])]))}});const Ot=R(St,[["__scopeId","data-v-184784f2"]]),ae=p=>(K("data-v-53b723be"),p=p(),Q(),p),wt={class:"schedule-editor"},Tt={class:"schedule-settings"},kt=ae(()=>_("div",{class:"title"},"Schedule settings",-1)),Xt=ae(()=>_("div",{class:"subtitle"},"Time Zone: GMT+0000",-1)),Mt={class:"readable-cron"},Et=H({__name:"ScheduleEditor",props:{job:null},setup(p){const g=p,l=$(!1),f=$(g.job),h=()=>{l.value=!l.value},v=()=>{l.value=!1},m=t=>({weekday:t.split(" ")[4],month:t.split(" ")[3],day:t.split(" ")[2],hour:t.split(" ")[1],minute:t.split(" ")[0]}),c=q(m(f.value.schedule)),b=U(()=>re.toString(n.value)),n=U(()=>`${c.minute} ${c.hour} ${c.day} ${c.month} ${c.weekday}`),y=t=>{c.minute==t.minute&&c.hour==t.hour&&c.day==t.day&&c.month==t.month&&c.weekday==t.weekday||(c.minute=t.minute,c.hour=t.hour,c.day=t.day,c.month=t.month,c.weekday=t.weekday,f.value.schedule=n.value)},u=t=>{t?(f.value.schedule=t,Object.assign(c,m(t))):f.value.schedule=n.value,v()};return ee(()=>f.value.schedule,t=>{y({minute:t.split(" ")[0],hour:t.split(" ")[1],day:t.split(" ")[2],month:t.split(" ")[3],weekday:t.split(" ")[4]})}),(t,e)=>(k(),X("div",wt,[_("div",Tt,[kt,Xt,D(ze,{class:"recurrence-settings",crontab:c,onChangeCrontab:y,onSaveCrontab:u,onShowAdvancedSettings:h},null,8,["crontab"])]),_("div",Mt,C(T(b)),1),l.value?(k(),P(Ot,{key:0,job:f.value,onClose:v,onSaveCrontab:u},null,8,["job"])):se("",!0)]))}});const Dt=R(Et,[["__scopeId","data-v-53b723be"]]),Ct={class:"job-editor"},It={class:"settings"},$t=H({__name:"JobEditor",setup(p){const g=ce(),{result:l,loading:f}=he(()=>pe.get(g.params.jobId)),h=ge.create();async function v(){if(!l.value)return;const{stdout:m,stderr:c}=await l.value.test();h.log({type:"stdout",log:m}),h.log({type:"stderr",log:c})}return(m,c)=>{var b;return k(),X("div",Ct,[T(f)||!T(l)?(k(),P(de,{key:0})):(k(),P(ue,{key:1},{left:F(()=>[D(ve,{link:"/_editor/jobs"})]),right:F(()=>[D(be,{path:"jobs"}),D(fe,{model:T(l)},null,8,["model"])]),default:F(()=>[D(le,{title:"Settings"},{default:F(()=>[_("div",It,[D(_e,{runtime:T(l)},null,8,["runtime"]),D(Dt,{style:{width:"100%",height:"100%"},job:T(l)},null,8,["job"])])]),_:1})]),_:1})),D(me,{"log-service":T(h),runtime:"jobs",onRestart:v},null,8,["log-service"]),D(ye,{"has-changes":(b=T(l))==null?void 0:b.hasChanges()},null,8,["has-changes"])])}}});const Qt=R($t,[["__scopeId","data-v-e13d5fde"]]);export{Qt as default}; -//# sourceMappingURL=JobEditor.b0e3148a.js.map +import{a1 as ie,d as H,o as ne,v as q,r as $,b as k,c as X,x as _,F as x,L as A,N as C,z as T,W as j,ac as L,U as N,O as K,Q,q as R,a2 as ee,K as U,e as D,G as te,t as P,D as se,w as F,J as ue}from"./registerWidgets.89616af0.js";import{T as ce,a as le}from"./Tab.1de0ecf6.js";import{L as de}from"./CircularLoading.0fb686c0.js";import{a as he}from"./asyncComputed.8ac91a75.js";import{J as pe}from"./jobs.310261dd.js";import{S as fe}from"./SaveButton.c0a67dea.js";import{B as ve}from"./BackButton.6e480dd1.js";import{S as me,_ as ye,R as _e,L as ge}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js";import{D as be}from"./DocsButton.f9b71025.js";import"./lottie.fc57e5ac.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./icons.9cfdae6d.js";import"./forms.59430d62.js";import"./dashes.f8616397.js";import"./runnerData.bd24d7de.js";import"./hooks.6e1e253e.js";import"./workspaces.621b79ad.js";import"./uuid.d6201508.js";import"./login.6c1df514.js";(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g=new Error().stack;g&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[g]="ac649254-f2c3-4179-823f-48b228d9a18f",p._sentryDebugIdIdentifier="sentry-dbid-ac649254-f2c3-4179-823f-48b228d9a18f")}catch{}})();var oe={exports:{}};(function(p,g){(function(f,h){p.exports=h()})(globalThis,function(){return(()=>{var l={794:(m,u,b)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CronParser=void 0;var n=b(586),y=function(){function c(t,e,i){e===void 0&&(e=!0),i===void 0&&(i=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=i}return c.prototype.parse=function(){var t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},c.prototype.extractParts=function(t){if(!this.expression)throw new Error("Expression is empty");var e=t.trim().split(/[ ]+/);if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var i=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";i?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},c.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(O){var M=O.replace(/\D/,""),w=M;return e.dayOfWeekStartIndexZero?M=="7"&&(w="0"):w=(parseInt(M)-1).toString(),O.replace(M,w)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var i={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var o in i)t[5]=t[5].replace(new RegExp(o,"gi"),i[o].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(O){var M=O.replace(/\D/,""),w=M;return e.monthStartIndexZero&&(w=(parseInt(M)+1).toString()),O.replace(M,w)});var r={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in r)t[4]=t[4].replace(new RegExp(a,"gi"),r[a].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var s=0;s-1&&!/^\*|\-|\,/.test(t[s])){var d=null;switch(s){case 4:d="12";break;case 5:d="6";break;case 6:d="9999";break;default:d=null;break}if(d!==null){var S=t[s].split("/");t[s]="".concat(S[0],"-").concat(d,"/").concat(S[1])}}},c.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},c.prototype.validateRange=function(t){n.default.secondRange(t[0]),n.default.minuteRange(t[1]),n.default.hourRange(t[2]),n.default.dayOfMonthRange(t[3]),n.default.monthRange(t[4],this.monthStartIndexZero),n.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},c.prototype.assertNoInvalidCharacters=function(t,e){var i=e.match(/[A-KM-VX-Z]+/gi);if(i&&i.length)throw new Error("".concat(t," part contains invalid values: '").concat(i.toString(),"'"))},c}();u.CronParser=y},728:(m,u,b)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExpressionDescriptor=void 0;var n=b(910),y=b(794),c=function(){function t(e,i){if(this.expression=e,this.options=i,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var o=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(o,"'.")),this.options.locale=o}this.i18n=t.locales[this.options.locale],i.use24HourTimeFormat===void 0&&(i.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,i){var o=i===void 0?{}:i,r=o.throwExceptionOnParseError,a=r===void 0?!0:r,s=o.verbose,d=s===void 0?!1:s,S=o.dayOfWeekStartIndexZero,O=S===void 0?!0:S,M=o.monthStartIndexZero,w=M===void 0?!1:M,I=o.use24HourTimeFormat,E=o.locale,J=E===void 0?null:E,W={throwExceptionOnParseError:a,verbose:d,dayOfWeekStartIndexZero:O,monthStartIndexZero:w,use24HourTimeFormat:I,locale:J},V=new t(e,W);return V.getFullDescription()},t.initialize=function(e,i){i===void 0&&(i="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=i,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var i=new y.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=i.parse();var o=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),a=this.getMonthDescription(),s=this.getDayOfWeekDescription(),d=this.getYearDescription();e+=o+r+s+a+d,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(S){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(S)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],i=this.expressionParts[1],o=this.expressionParts[2],r="";if(!n.StringUtilities.containsAny(i,t.specialCharacters)&&!n.StringUtilities.containsAny(o,t.specialCharacters)&&!n.StringUtilities.containsAny(e,t.specialCharacters))r+=this.i18n.atSpace()+this.formatTime(o,i,e);else if(!e&&i.indexOf("-")>-1&&!(i.indexOf(",")>-1)&&!(i.indexOf("/")>-1)&&!n.StringUtilities.containsAny(o,t.specialCharacters)){var a=i.split("-");r+=n.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(o,a[0],""),this.formatTime(o,a[1],""))}else if(!e&&o.indexOf(",")>-1&&o.indexOf("-")==-1&&o.indexOf("/")==-1&&!n.StringUtilities.containsAny(i,t.specialCharacters)){var s=o.split(",");r+=this.i18n.at();for(var d=0;d1){var a=r[r.length-1].index;o=o.substring(0,a)+":59"+o.substring(a+3)}}return o},t.prototype.getDayOfWeekDescription=function(){var e=this,i=this.i18n.daysOfTheWeek(),o=null;return this.expressionParts[5]=="*"?o="":o=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(r,a){var s=r;return r.indexOf("#")>-1?s=r.substr(0,r.indexOf("#")):r.indexOf("L")>-1&&(s=s.replace("L","")),e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(a)[parseInt(s)]:i[parseInt(s)]},function(r){return parseInt(r)==1?"":n.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(r),r)},function(r){var a=r.substring(0,r.indexOf("-")),s=e.expressionParts[3]!="*";return s?e.i18n.commaAndX0ThroughX1(a):e.i18n.commaX0ThroughX1(a)},function(r){var a=null;if(r.indexOf("#")>-1){var s=r.substring(r.indexOf("#")+1),d=r.substring(0,r.indexOf("#")),S=null;switch(s){case"1":S=e.i18n.first(d);break;case"2":S=e.i18n.second(d);break;case"3":S=e.i18n.third(d);break;case"4":S=e.i18n.fourth(d);break;case"5":S=e.i18n.fifth(d);break}a=e.i18n.commaOnThe(s)+S+e.i18n.spaceX0OfTheMonth()}else if(r.indexOf("L")>-1)a=e.i18n.commaOnTheLastX0OfTheMonth(r.replace("L",""));else{var O=e.expressionParts[3]!="*";a=O?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(r)}return a}),o},t.prototype.getMonthDescription=function(){var e=this,i=this.i18n.monthsOfTheYear(),o=this.getSegmentDescription(this.expressionParts[4],"",function(r,a){return a&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(a)[parseInt(r)-1]:i[parseInt(r)-1]},function(r){return parseInt(r)==1?"":n.StringUtilities.format(e.i18n.commaEveryX0Months(r),r)},function(r){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return o},t.prototype.getDayOfMonthDescription=function(){var e=this,i=null,o=this.expressionParts[3];switch(o){case"L":i=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":i=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var r=o.match(/(\d{1,2}W)|(W\d{1,2})/);if(r){var a=parseInt(r[0].replace("W","")),s=a==1?this.i18n.firstWeekday():n.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());i=n.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),s);break}else{var d=o.match(/L-(\d{1,2})/);if(d){var S=d[1];i=n.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(S),S);break}else{if(o=="*"&&this.expressionParts[5]!="*")return"";i=this.getSegmentDescription(o,this.i18n.commaEveryDay(),function(O){return O=="L"?e.i18n.lastDay():e.i18n.dayX0?n.StringUtilities.format(e.i18n.dayX0(),O):O},function(O){return O=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(O)},function(O){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(O)},function(O){return e.i18n.commaOnDayX0OfTheMonth(O)})}break}}return i},t.prototype.getYearDescription=function(){var e=this,i=this.getSegmentDescription(this.expressionParts[6],"",function(o){return/^\d+$/.test(o)?new Date(parseInt(o),1).getFullYear().toString():o},function(o){return n.StringUtilities.format(e.i18n.commaEveryX0Years(o),o)},function(o){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(o){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return i},t.prototype.getSegmentDescription=function(e,i,o,r,a,s){var d=null,S=e.indexOf("/")>-1,O=e.indexOf("-")>-1,M=e.indexOf(",")>-1;if(!e)d="";else if(e==="*")d=i;else if(!S&&!O&&!M)d=n.StringUtilities.format(s(e),o(e));else if(M){for(var w=e.split(","),I="",E=0;E0&&w.length>2&&(I+=",",E0&&w.length>1&&(E==w.length-1||w.length==2)&&(I+="".concat(this.i18n.spaceAnd()," ")),w[E].indexOf("/")>-1||w[E].indexOf("-")>-1){var J=w[E].indexOf("-")>-1&&w[E].indexOf("/")==-1,W=this.getSegmentDescription(w[E],i,o,r,J?this.i18n.commaX0ThroughX1:a,s);J&&(W=W.replace(", ","")),I+=W}else S?I+=this.getSegmentDescription(w[E],i,o,r,a,s):I+=o(w[E]);S?d=I:d=n.StringUtilities.format(s(e),I)}else if(S){var w=e.split("/");if(d=n.StringUtilities.format(r(w[1]),w[1]),w[0].indexOf("-")>-1){var V=this.generateRangeSegmentDescription(w[0],a,o);V.indexOf(", ")!=0&&(d+=", "),d+=V}else if(w[0].indexOf("*")==-1){var Z=n.StringUtilities.format(s(w[0]),o(w[0]));Z=Z.replace(", ",""),d+=n.StringUtilities.format(this.i18n.commaStartingX0(),Z)}}else O&&(d=this.generateRangeSegmentDescription(e,a,o));return d},t.prototype.generateRangeSegmentDescription=function(e,i,o){var r="",a=e.split("-"),s=o(a[0],1),d=o(a[1],2),S=i(e);return r+=n.StringUtilities.format(S,s,d),r},t.prototype.formatTime=function(e,i,o){var r=parseInt(e),a="",s=!1;this.options.use24HourTimeFormat||(s=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),a=s?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),r===0&&(r=12));var d=i,S="";return o&&(S=":".concat(("00"+o).substring(o.length))),"".concat(s?a:"").concat(("00"+r.toString()).substring(r.toString().length),":").concat(("00"+d.toString()).substring(d.toString().length)).concat(S).concat(s?"":a)},t.prototype.transformVerbosity=function(e,i){return i||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();u.ExpressionDescriptor=c},336:(m,u,b)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.enLocaleLoader=void 0;var n=b(751),y=function(){function c(){}return c.prototype.load=function(t){t.en=new n.en},c}();u.enLocaleLoader=y},751:(m,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.en=void 0;var b=function(){function n(){}return n.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},n.prototype.atX0MinutesPastTheHourGt20=function(){return null},n.prototype.commaMonthX0ThroughMonthX1=function(){return null},n.prototype.commaYearX0ThroughYearX1=function(){return null},n.prototype.use24HourTimeFormatByDefault=function(){return!1},n.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},n.prototype.everyMinute=function(){return"every minute"},n.prototype.everyHour=function(){return"every hour"},n.prototype.atSpace=function(){return"At "},n.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},n.prototype.at=function(){return"At"},n.prototype.spaceAnd=function(){return" and"},n.prototype.everySecond=function(){return"every second"},n.prototype.everyX0Seconds=function(){return"every %s seconds"},n.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},n.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},n.prototype.everyX0Minutes=function(){return"every %s minutes"},n.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},n.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},n.prototype.everyX0Hours=function(){return"every %s hours"},n.prototype.betweenX0AndX1=function(){return"between %s and %s"},n.prototype.atX0=function(){return"at %s"},n.prototype.commaEveryDay=function(){return", every day"},n.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},n.prototype.commaX0ThroughX1=function(){return", %s through %s"},n.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},n.prototype.first=function(){return"first"},n.prototype.second=function(){return"second"},n.prototype.third=function(){return"third"},n.prototype.fourth=function(){return"fourth"},n.prototype.fifth=function(){return"fifth"},n.prototype.commaOnThe=function(){return", on the "},n.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},n.prototype.lastDay=function(){return"the last day"},n.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},n.prototype.commaOnlyOnX0=function(){return", only on %s"},n.prototype.commaAndOnX0=function(){return", and on %s"},n.prototype.commaEveryX0Months=function(){return", every %s months"},n.prototype.commaOnlyInX0=function(){return", only in %s"},n.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},n.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},n.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},n.prototype.firstWeekday=function(){return"first weekday"},n.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},n.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},n.prototype.commaEveryX0Days=function(){return", every %s days"},n.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},n.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},n.prototype.commaEveryHour=function(){return", every hour"},n.prototype.commaEveryX0Years=function(){return", every %s years"},n.prototype.commaStartingX0=function(){return", starting %s"},n.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},n.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},n}();u.en=b},586:(m,u)=>{Object.defineProperty(u,"__esModule",{value:!0});function b(y,c){if(!y)throw new Error(c)}var n=function(){function y(){}return y.secondRange=function(c){for(var t=c.split(","),e=0;e=0&&i<=59,"seconds part must be >= 0 and <= 59")}},y.minuteRange=function(c){for(var t=c.split(","),e=0;e=0&&i<=59,"minutes part must be >= 0 and <= 59")}},y.hourRange=function(c){for(var t=c.split(","),e=0;e=0&&i<=23,"hours part must be >= 0 and <= 23")}},y.dayOfMonthRange=function(c){for(var t=c.split(","),e=0;e=1&&i<=31,"DOM part must be >= 1 and <= 31")}},y.monthRange=function(c,t){for(var e=c.split(","),i=0;i=1&&o<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},y.dayOfWeekRange=function(c,t){for(var e=c.split(","),i=0;i=0&&o<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},y}();u.default=n},910:(m,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.StringUtilities=void 0;var b=function(){function n(){}return n.format=function(y){for(var c=[],t=1;t-1})},n}();u.StringUtilities=b}},f={};function h(m){var u=f[m];if(u!==void 0)return u.exports;var b=f[m]={exports:{}};return l[m](b,b.exports,h),b.exports}var v={};return(()=>{var m=v;Object.defineProperty(m,"__esModule",{value:!0}),m.toString=void 0;var u=h(728),b=h(336);u.ExpressionDescriptor.initialize(new b.enLocaleLoader),m.default=u.ExpressionDescriptor;var n=u.ExpressionDescriptor.toString;m.toString=n})(),v})()})})(oe);const re=ie(oe.exports),Se=p=>{const[g,l,f,h,v]=p.split(" ");return{minute:g,hour:l,day:f,month:h,weekday:v}};function B(p){if(p==="*")return{values:[-1]};{const l=p.split(","),f=[];for(let h=0;h[...Array(60).keys()].reduce((p,g)=>(g%15||p.push(g),p),[]),we=()=>[...Array(31).keys()].map(p=>p+1),G=()=>{const p=[];for(let g=0;g<24;g++)for(let l=0;l<60;l+=30)g<12?l<10?p.push(`${g}:0${l} AM`):p.push(`${g}:${l} AM`):g===12?l<10?p.push(`${g}:0${l} PM`):p.push(`${g}:${l} PM`):l<10?p.push(`${g-12}:0${l} PM`):p.push(`${g-12}:${l} PM`);return p},Te={0:"0",1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23",24:"24",25:"25",26:"26",27:"27",28:"28",29:"29",30:"30",31:"31",32:"32",33:"33",34:"34",35:"35",36:"36",37:"37",38:"38",39:"39",40:"40",41:"41",42:"42",43:"43",44:"44",45:"45",46:"46",47:"47",48:"48",49:"49",50:"50",51:"51",52:"52",53:"53",54:"54",55:"55",56:"56",57:"57",58:"58",59:"59"},ke={0:"0",1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23"},Xe={1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23",24:"24",25:"25",26:"26",27:"27",28:"28",29:"29",30:"30",31:"31"},Me={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"},z={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"},Ee=["hourly","daily","weekly","monthly"],De={hourly:{minute:"0",hour:"*",day:"*",month:"*",weekday:"*"},daily:{minute:"0",hour:"6",day:"*",month:"*",weekday:"*"},weekly:{minute:"0",hour:"6",day:"*",month:"*",weekday:"1"},monthly:{minute:"0",hour:"6",day:"1",month:"*",weekday:"*"}},Ce=p=>(K("data-v-4a09321b"),p=p(),Q(),p),Ie={class:"cron-settings-wrapper"},$e={class:"cron-selector"},xe={class:"periodicity"},Ae=Ce(()=>_("div",{class:"label"},"Recurrence",-1)),je=["selected"],Le=["selected"],Ue=["value","selected"],Ne={class:"periodicity"},He={class:"schedule"},Re=["value","selected"],We={class:"schedule"},Be=["value","selected"],Ye={class:"schedule"},Je=["value","selected"],Ve=["value","selected"],Fe={class:"schedule"},Ze=["value","selected"],Ge=["value","selected"],Pe=H({__name:"CronEditor",props:{crontab:null},emits:["changeCrontab","saveCrontab","showAdvancedSettings"],setup(p,{emit:g}){const l=p;function f(o,r){const a=parseInt(o),s=parseInt(r),d=a>=12?"PM":"AM",S=a%12,O=s<10?`0${s}`:s;return`${S}:${O} ${d}`}ne(()=>{const{hour:o,day:r,weekday:a,month:s,minute:d}=l.crontab;s=="*"&&a==="*"&&r!=="*"&&!u([r,o,d])?v.value="monthly":s==="*"&&r==="*"&&a!=="*"&&!u([a,o,d])?v.value="weekly":r==="*"&&a==="*"&&s==="*"&&o!=="*"&&!u([o,d])?v.value="daily":o=="*"&&r==="*"&&a==="*"&&s==="*"&&!u([d])?v.value="hourly":v.value="custom"});const h=q({minute:l.crontab.minute,hour:l.crontab.hour,day:l.crontab.day,month:l.crontab.month,weekday:l.crontab.weekday}),v=$(""),m=$(1),u=o=>o.some(r=>r.includes("-")||r.includes(",")),b=o=>{h.minute=o.minute,h.hour=o.hour,h.day=o.day,h.month=o.month,h.weekday=o.weekday},n=o=>{m.value=0,v.value=o.target.value,b(De[v.value]),g("changeCrontab",h)},y=o=>{m.value=0;const r=o.target.value;h.minute=r,g("changeCrontab",h)},c=o=>{m.value=0;const r=o.target.value;let a=r.split(":")[0],s=r.split(":")[1];a=r.split(" ")[1]==="AM"||a==="12"?a:(Number(a)+12).toString(),s=s.split(" ")[0],h.minute=s,h.hour=a,g("changeCrontab",h)},t=o=>{m.value=0;const r=o.target.value;h.weekday=r,g("changeCrontab",h)},e=o=>{m.value=0;const r=o.target.value;h.day=r,g("changeCrontab",h)},i=()=>{v.value="custom",g("showAdvancedSettings")};return(o,r)=>(k(),X("div",Ie,[_("div",$e,[_("div",xe,[Ae,_("select",{class:"select",onChange:n},[_("option",{value:"",selected:!v.value,disabled:"",hidden:""}," Choose a periodicity ",8,je),_("option",{value:"",selected:v.value=="custom",disabled:"",hidden:""}," Custom ",8,Le),(k(!0),X(x,null,A(T(Ee),(a,s)=>(k(),X("option",{key:s,value:a,selected:a==v.value},C(a),9,Ue))),128))],32)]),_("div",Ne,[j(_("div",He,[N(" at "),_("select",{class:"select",onChange:y},[(k(!0),X(x,null,A(T(Oe)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a==parseInt(h.minute)},C(a),9,Re))),128))],32),N(" minutes ")],512),[[L,v.value==="hourly"]]),j(_("div",We,[N(" at "),_("select",{class:"select",onChange:c},[(k(!0),X(x,null,A(T(G)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===f(h.hour,h.minute)},C(a),9,Be))),128))],32)],512),[[L,v.value==="daily"]]),j(_("div",Ye,[N(" on "),_("select",{class:"select",onChange:t},[(k(!0),X(x,null,A(T(z),(a,s)=>(k(),X("option",{key:s,value:s,selected:a===Object.values(T(z))[parseInt(h.weekday)]},C(a),9,Je))),128))],32),N(" at "),_("select",{class:"select",onChange:c},[(k(!0),X(x,null,A(T(G)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===f(h.hour,h.minute)},C(a),9,Ve))),128))],32)],512),[[L,v.value==="weekly"]]),j(_("div",Fe,[N(" on "),_("select",{class:"select",onChange:e},[(k(!0),X(x,null,A(T(we)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===parseInt(h.day)},C(a),9,Ze))),128))],32),N(" at "),_("select",{class:"select",onChange:c},[(k(!0),X(x,null,A(T(G)(),(a,s)=>(k(),X("option",{key:s,value:a,selected:a===f(h.hour,h.minute)},C(a),9,Ge))),128))],32)],512),[[L,v.value==="monthly"]])]),_("span",{class:"advanced-settings",onClick:i},"Advanced settings")])]))}});const ze=R(Pe,[["__scopeId","data-v-4a09321b"]]),qe=p=>(K("data-v-a5e38138"),p=p(),Q(),p),Ke={class:"container"},Qe=qe(()=>_("div",{class:"header"},[_("span",null,"Choice")],-1)),et={class:"body"},tt={class:"checkbox"},nt=["id","checked"],ot=["for"],rt={class:"name"},at=H({__name:"Choice",props:{choiceOptions:null,values:null},emits:["changeValues"],setup(p,{emit:g}){const l=p,f=$([]),h=$(l.choiceOptions);ne(()=>{l.values&&(f.value=l.values,l.values[0]===-1?f.value=[...Object.keys(l.choiceOptions).map(Number)]:f.value=l.values)}),ee(()=>l.values,()=>{l.values&&(l.values[0]!==-1?f.value=l.values:f.value=[...Object.keys(l.choiceOptions).map(Number)])});const v=U(()=>u.value.join(",")),m=U(()=>[...f.value].sort((y,c)=>y-c)),u=U(()=>{var y=[],c,t;for(let e=0;ef.value.includes(Number(y)),n=y=>{if(y.preventDefault(),f.value.length===1&&y&&y.target&&!y.target.checked){alert("You must select at least one item"),y.target.checked=!0;return}const c=y.target.id;b(c)?f.value=f.value.filter(t=>t!==Number(c)):f.value.push(Number(c)),g("changeValues",v.value?v.value:"*")};return(y,c)=>(k(),X("div",Ke,[Qe,_("div",et,[(k(!0),X(x,null,A(h.value,(t,e)=>(k(),X("div",{key:e,class:"item"},[_("div",tt,[_("input",{id:e,type:"checkbox",checked:b(e),onInput:n},null,40,nt),_("label",{for:`${e}`},null,8,ot)]),_("div",rt,C(t),1)]))),128))])]))}});const it=R(at,[["__scopeId","data-v-a5e38138"]]),st={class:"wrapper"},ut=H({__name:"TimeSelector",props:{initialValue:null,options:null,type:null},emits:["change"],setup(p,{emit:g}){const l=p,f=$(l.initialValue),h=v=>{g("change",l.type,v)};return ee(()=>l.initialValue,v=>{f.value=v}),(v,m)=>(k(),X("div",st,[D(it,{"choice-options":p.options,values:f.value.values,onChangeValues:h},null,8,["choice-options","values"])]))}});const Y=R(ut,[["__scopeId","data-v-a1b10267"]]),ct={class:"cron-settings-wrapper"},lt={class:"cron-settings"},dt={class:"human-readable"},ht={class:"cron-editor"},pt={class:"cron-tabs"},ft=["onClick"],vt={class:"actions"},mt=H({__name:"AdvancedCronEditor",props:{job:null},emits:["updateSchedule"],setup(p,{emit:g}){const f=$(p.job),{minute:h,hour:v,day:m,month:u,weekday:b}=Se(f.value.schedule),n=q({weekday:b,month:u,day:m,hour:v,minute:h}),y=["Month","Day of Month","Hours","Minutes","Days of week"],c=$(0),t=d=>{c.value=d},e=U(()=>o.value===f.value.schedule),i=U(()=>re.toString(o.value)),o=U(()=>`${n.minute} ${n.hour} ${n.day} ${n.month} ${n.weekday}`),r=(d,S)=>{n[d]=S},a=()=>{g("updateSchedule",o.value)},s=()=>{n.minute=h,n.hour=v,n.day=m,n.month=u,n.weekday=b};return(d,S)=>(k(),X("div",ct,[_("div",lt,[_("p",dt,'"'+C(T(i))+'" - GMT+0',1),_("div",ht,[_("div",pt,[(k(),X(x,null,A(y,(O,M)=>_("span",{key:M,class:te(["cron-tab",{active:c.value===M}]),onClick:w=>t(M)},C(O),11,ft)),64))]),j(D(Y,{"initial-value":T(B)(n.month),options:T(Me),type:"month",onChange:r},null,8,["initial-value","options"]),[[L,c.value===0]]),j(D(Y,{"initial-value":T(B)(n.day),options:T(Xe),type:"day",onChange:r},null,8,["initial-value","options"]),[[L,c.value===1]]),j(D(Y,{"initial-value":T(B)(n.hour),options:T(ke),type:"hour",onChange:r},null,8,["initial-value","options"]),[[L,c.value===2]]),j(D(Y,{"initial-value":T(B)(n.minute),options:T(Te),type:"minute",onChange:r},null,8,["initial-value","options"]),[[L,c.value===3]]),j(D(Y,{"initial-value":T(B)(n.weekday),options:T(z),type:"weekday",onChange:r},null,8,["initial-value","options"]),[[L,c.value===4]]),_("div",vt,[_("button",{class:"save-button button",onClick:s}," Reset changes "),_("button",{class:te(["save-button","button",T(e)?"disabled":""]),onClick:a}," Set changes ",2)])])])]))}});const yt=R(mt,[["__scopeId","data-v-07f4693a"]]),_t={class:"modal-wrapper"},gt={class:"modal"},bt={class:"modal-content-wrapper"},St=H({__name:"AdvancedSettingsModal",props:{job:null},emits:["close","saveCrontab"],setup(p,{emit:g}){const f=$(p.job),h=m=>{g("saveCrontab",m)},v=()=>{g("close")};return(m,u)=>(k(),X("div",_t,[_("div",gt,[_("span",{class:"close",onClick:v},"\xD7"),_("div",bt,[D(yt,{job:f.value,onUpdateSchedule:h},null,8,["job"])])])]))}});const Ot=R(St,[["__scopeId","data-v-184784f2"]]),ae=p=>(K("data-v-53b723be"),p=p(),Q(),p),wt={class:"schedule-editor"},Tt={class:"schedule-settings"},kt=ae(()=>_("div",{class:"title"},"Schedule settings",-1)),Xt=ae(()=>_("div",{class:"subtitle"},"Time Zone: GMT+0000",-1)),Mt={class:"readable-cron"},Et=H({__name:"ScheduleEditor",props:{job:null},setup(p){const g=p,l=$(!1),f=$(g.job),h=()=>{l.value=!l.value},v=()=>{l.value=!1},m=t=>({weekday:t.split(" ")[4],month:t.split(" ")[3],day:t.split(" ")[2],hour:t.split(" ")[1],minute:t.split(" ")[0]}),u=q(m(f.value.schedule)),b=U(()=>re.toString(n.value)),n=U(()=>`${u.minute} ${u.hour} ${u.day} ${u.month} ${u.weekday}`),y=t=>{u.minute==t.minute&&u.hour==t.hour&&u.day==t.day&&u.month==t.month&&u.weekday==t.weekday||(u.minute=t.minute,u.hour=t.hour,u.day=t.day,u.month=t.month,u.weekday=t.weekday,f.value.schedule=n.value)},c=t=>{t?(f.value.schedule=t,Object.assign(u,m(t))):f.value.schedule=n.value,v()};return ee(()=>f.value.schedule,t=>{y({minute:t.split(" ")[0],hour:t.split(" ")[1],day:t.split(" ")[2],month:t.split(" ")[3],weekday:t.split(" ")[4]})}),(t,e)=>(k(),X("div",wt,[_("div",Tt,[kt,Xt,D(ze,{class:"recurrence-settings",crontab:u,onChangeCrontab:y,onSaveCrontab:c,onShowAdvancedSettings:h},null,8,["crontab"])]),_("div",Mt,C(T(b)),1),l.value?(k(),P(Ot,{key:0,job:f.value,onClose:v,onSaveCrontab:c},null,8,["job"])):se("",!0)]))}});const Dt=R(Et,[["__scopeId","data-v-53b723be"]]),Ct={class:"job-editor"},It={class:"settings"},$t=H({__name:"JobEditor",setup(p){const g=ue(),{result:l,loading:f}=he(()=>pe.get(g.params.jobId)),h=ge.create();async function v(){if(!l.value)return;const{stdout:m,stderr:u}=await l.value.test();h.log({type:"stdout",log:m}),h.log({type:"stderr",log:u})}return(m,u)=>{var b;return k(),X("div",Ct,[T(f)||!T(l)?(k(),P(de,{key:0})):(k(),P(ce,{key:1},{left:F(()=>[D(ve,{link:"/_editor/jobs"})]),right:F(()=>[D(be,{path:"jobs"}),D(fe,{model:T(l)},null,8,["model"])]),default:F(()=>[D(le,{title:"Settings"},{default:F(()=>[_("div",It,[D(_e,{runtime:T(l)},null,8,["runtime"]),D(Dt,{style:{width:"100%",height:"100%"},job:T(l)},null,8,["job"])])]),_:1})]),_:1})),D(me,{"log-service":T(h),runtime:"jobs",onRestart:v},null,8,["log-service"]),D(ye,{"has-changes":(b=T(l))==null?void 0:b.hasChanges()},null,8,["has-changes"])])}}});const Qt=R($t,[["__scopeId","data-v-e13d5fde"]]);export{Qt as default}; +//# sourceMappingURL=JobEditor.2e1f22b7.js.map diff --git a/abstra_statics/dist/assets/Jobs.626e2a1c.js b/abstra_statics/dist/assets/Jobs.a895bf8c.js similarity index 69% rename from abstra_statics/dist/assets/Jobs.626e2a1c.js rename to abstra_statics/dist/assets/Jobs.a895bf8c.js index f8666b0991..494a287c75 100644 --- a/abstra_statics/dist/assets/Jobs.626e2a1c.js +++ b/abstra_statics/dist/assets/Jobs.a895bf8c.js @@ -1,2 +1,2 @@ -import{d as y,K as _,b as g,t as h,z as d,H as J}from"./registerWidgets.ca6243ef.js";import{f as k,g as w,h as C}from"./icons.11151937.js";import{a as I}from"./asyncComputed.3cb2e10b.js";import{J as u}from"./jobs.2ad85710.js";import{R as x}from"./RuntimeList.1bf51451.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./DropdownMenu.162e22a4.js";import"./CircularLoading.5630a601.js";import"./lottie.9d24e472.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="a90b3305-2226-4cbc-9d86-60289a7f97a2",n._sentryDebugIdIdentifier="sentry-dbid-a90b3305-2226-4cbc-9d86-60289a7f97a2")}catch{}})();const $=y({__name:"Jobs",setup(n){const i=J(),{loading:r,result:a,refetch:c}=I(()=>u.list()),l=({key:e})=>i.push({path:`/_editor/job/${encodeURIComponent(e)}`}),b=async({key:e})=>{var o,t;await((t=(o=a.value)==null?void 0:o.find(s=>s.identifier===e))==null?void 0:t.duplicate()),c()},f=async()=>{const e=await u.create();l({key:e.identifier})},p=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this job?")&&(await((t=(o=a.value)==null?void 0:o.find(s=>s.identifier===e))==null?void 0:t.delete()),c())},m=_(()=>{var e,o;return{columns:[{name:"Job Name"},{name:"Path"},{name:"Job Actions"}],rows:(o=(e=a.value)==null?void 0:e.map(t=>({key:t.identifier,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/job/${encodeURIComponent(t.identifier)}`},{text:t.identifier},{text:"",classes:["centered"],actions:[{icon:k,label:"Delete",onClick:p,dangerous:!0},{icon:w,label:"Edit Job",onClick:l},{icon:C,label:"Duplicate",onClick:b}]}]})))!=null?o:[]}});return(e,o)=>(g(),h(x,{loading:d(r),title:"Python Jobs",description:"Schedule Python scripts like events on a calendar","create-button-text":"Create Job","empty-title":"No jobs here yet",table:d(m),onCreate:f},null,8,["loading","table"]))}});export{$ as default}; -//# sourceMappingURL=Jobs.626e2a1c.js.map +import{d as y,K as _,b as g,t as h,z as d,H as J}from"./registerWidgets.89616af0.js";import{f as k,g as w,h as C}from"./icons.9cfdae6d.js";import{a as I}from"./asyncComputed.8ac91a75.js";import{J as u}from"./jobs.310261dd.js";import{R as x}from"./RuntimeList.097a29c4.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./DropdownMenu.8f7fc9d3.js";import"./CircularLoading.0fb686c0.js";import"./lottie.fc57e5ac.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="948106c6-57ab-4726-bef0-f784b5d1b299",n._sentryDebugIdIdentifier="sentry-dbid-948106c6-57ab-4726-bef0-f784b5d1b299")}catch{}})();const $=y({__name:"Jobs",setup(n){const i=J(),{loading:r,result:a,refetch:c}=I(()=>u.list()),l=({key:e})=>i.push({path:`/_editor/job/${encodeURIComponent(e)}`}),b=async({key:e})=>{var o,t;await((t=(o=a.value)==null?void 0:o.find(s=>s.identifier===e))==null?void 0:t.duplicate()),c()},f=async()=>{const e=await u.create();l({key:e.identifier})},p=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this job?")&&(await((t=(o=a.value)==null?void 0:o.find(s=>s.identifier===e))==null?void 0:t.delete()),c())},m=_(()=>{var e,o;return{columns:[{name:"Job Name"},{name:"Path"},{name:"Job Actions"}],rows:(o=(e=a.value)==null?void 0:e.map(t=>({key:t.identifier,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/job/${encodeURIComponent(t.identifier)}`},{text:t.identifier},{text:"",classes:["centered"],actions:[{icon:k,label:"Delete",onClick:p,dangerous:!0},{icon:w,label:"Edit Job",onClick:l},{icon:C,label:"Duplicate",onClick:b}]}]})))!=null?o:[]}});return(e,o)=>(g(),h(x,{loading:d(r),title:"Python Jobs",description:"Schedule Python scripts like events on a calendar","create-button-text":"Create Job","empty-title":"No jobs here yet",table:d(m),onCreate:f},null,8,["loading","table"]))}});export{$ as default}; +//# sourceMappingURL=Jobs.a895bf8c.js.map diff --git a/abstra_statics/dist/assets/LoadingIndicator.10cfcfe7.js b/abstra_statics/dist/assets/LoadingIndicator.10cfcfe7.js new file mode 100644 index 0000000000..90c0f8cb1d --- /dev/null +++ b/abstra_statics/dist/assets/LoadingIndicator.10cfcfe7.js @@ -0,0 +1,2 @@ +import{L as t}from"./lottie.fc57e5ac.js";import{d as a,r as d,o as r,b as s,c,x as i,B as _,q as l}from"./registerWidgets.89616af0.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="fa8de61c-6de3-4b6b-8cd1-4edccd15159f",n._sentryDebugIdIdentifier="sentry-dbid-fa8de61c-6de3-4b6b-8cd1-4edccd15159f")}catch{}})();const u={class:"container"},f=a({__name:"LoadingIndicator",setup(n){const e=d(null);return r(()=>{!e.value||t.loadAnimation({container:e.value,renderer:"svg",loop:!0,autoplay:!0,path:"/circularLoading.json"})}),(o,p)=>(s(),c("div",u,[i("div",{ref_key:"animation",ref:e,class:"animation"},null,512),_(o.$slots,"default",{},void 0,!0)]))}});const g=l(f,[["__scopeId","data-v-c30401d8"]]);export{g as L}; +//# sourceMappingURL=LoadingIndicator.10cfcfe7.js.map diff --git a/abstra_statics/dist/assets/LoadingIndicator.a271d3bb.js b/abstra_statics/dist/assets/LoadingIndicator.a271d3bb.js deleted file mode 100644 index 0f4acf58b1..0000000000 --- a/abstra_statics/dist/assets/LoadingIndicator.a271d3bb.js +++ /dev/null @@ -1,2 +0,0 @@ -import{L as o}from"./lottie.9d24e472.js";import{d as t,r as d,o as r,b as s,c as i,x as c,B as _,q as l}from"./registerWidgets.ca6243ef.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a19d5032-9d35-4a9d-b30e-aca1cdf0c1af",a._sentryDebugIdIdentifier="sentry-dbid-a19d5032-9d35-4a9d-b30e-aca1cdf0c1af")}catch{}})();const u={class:"container"},f=t({__name:"LoadingIndicator",setup(a){const e=d(null);return r(()=>{!e.value||o.loadAnimation({container:e.value,renderer:"svg",loop:!0,autoplay:!0,path:"/circularLoading.json"})}),(n,p)=>(s(),i("div",u,[c("div",{ref_key:"animation",ref:e,class:"animation"},null,512),_(n.$slots,"default",{},void 0,!0)]))}});const m=l(f,[["__scopeId","data-v-c30401d8"]]);export{m as L}; -//# sourceMappingURL=LoadingIndicator.a271d3bb.js.map diff --git a/abstra_statics/dist/assets/Login.04e589a7.js b/abstra_statics/dist/assets/Login.04e589a7.js new file mode 100644 index 0000000000..9e55703996 --- /dev/null +++ b/abstra_statics/dist/assets/Login.04e589a7.js @@ -0,0 +1,2 @@ +import{P as r}from"./Passwordless.ac83d40c.js";import{N as a}from"./Navbar.dbea5082.js";import{d,b as i,c,e as t,H as p,q as _}from"./registerWidgets.89616af0.js";import{M as f}from"./member.f4131337.js";import"./CircularLoading.0fb686c0.js";import"./lottie.fc57e5ac.js";import"./icons.9cfdae6d.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./logo.084e5d7c.js";import"./asyncComputed.8ac91a75.js";import"./gateway.0deebb85.js";import"./activeRecord.3d3c7835.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="ec25df0f-858f-412a-b77d-a6794bda6907",e._sentryDebugIdIdentifier="sentry-dbid-ec25df0f-858f-412a-b77d-a6794bda6907")}catch{}})();const m={class:"login"},l=d({__name:"Login",setup(e){const o=p();async function s(n){await f.login(),o.push({name:"home"})}return(n,u)=>(i(),c("div",m,[t(a,{class:"nav"}),t(r,{class:"passwordless",onDone:s})]))}});const B=_(l,[["__scopeId","data-v-c9b2b4e6"]]);export{B as default}; +//# sourceMappingURL=Login.04e589a7.js.map diff --git a/abstra_statics/dist/assets/Login.7b25d743.js b/abstra_statics/dist/assets/Login.7b25d743.js deleted file mode 100644 index 71bc3d763f..0000000000 --- a/abstra_statics/dist/assets/Login.7b25d743.js +++ /dev/null @@ -1,2 +0,0 @@ -import{P as r}from"./Passwordless.65114c07.js";import{N as a}from"./Navbar.41c99d51.js";import{d as c,b as i,c as d,e as t,H as p,q as _}from"./registerWidgets.ca6243ef.js";import{M as m}from"./member.f1e6c466.js";import"./CircularLoading.5630a601.js";import"./lottie.9d24e472.js";import"./icons.11151937.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./logo.084e5d7c.js";import"./asyncComputed.3cb2e10b.js";import"./gateway.fa3322de.js";import"./activeRecord.11b7d185.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="cb55e7fc-29c8-414b-9d88-31f63a3b6ec5",e._sentryDebugIdIdentifier="sentry-dbid-cb55e7fc-29c8-414b-9d88-31f63a3b6ec5")}catch{}})();const f={class:"login"},b=c({__name:"Login",setup(e){const o=p();async function s(n){await m.login(),o.push({name:"home"})}return(n,l)=>(i(),d("div",f,[t(a,{class:"nav"}),t(r,{class:"passwordless",onDone:s})]))}});const B=_(b,[["__scopeId","data-v-c9b2b4e6"]]);export{B as default}; -//# sourceMappingURL=Login.7b25d743.js.map diff --git a/abstra_statics/dist/assets/Logs.9b4c6324.js b/abstra_statics/dist/assets/Logs.6a1222af.js similarity index 92% rename from abstra_statics/dist/assets/Logs.9b4c6324.js rename to abstra_statics/dist/assets/Logs.6a1222af.js index b9e54438fd..7f8d37e1df 100644 --- a/abstra_statics/dist/assets/Logs.9b4c6324.js +++ b/abstra_statics/dist/assets/Logs.6a1222af.js @@ -1,4 +1,4 @@ -import{at as P,au as A,av as b,aw as f,ax as z,ay as N,az as j,aA as W,aB as Z,aC as q,a as U,aD as J,b as r,c as d,am as L,B as v,U as F,N as c,D as x,x as o,G as _,e as K,w as k,aq as Q,A as D,ap as X,F as H,L as G,W as E,d as Y,v as $,K as ee,z as O,t as te,Z as B,ai as ie,J as se,O as le,Q as ne,S as oe,q as ae}from"./registerWidgets.ca6243ef.js";import{C as re}from"./gateway.fa3322de.js";import{B as de}from"./build.5096fbe2.js";import"./index.a86d8064.js";import{a as ue}from"./asyncComputed.3cb2e10b.js";import{L as ce}from"./LoadingIndicator.a271d3bb.js";import{f as he}from"./index.b048d0fb.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";import"./lottie.9d24e472.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="77efec5e-57d9-4316-980d-c502f2a492a1",e._sentryDebugIdIdentifier="sentry-dbid-77efec5e-57d9-4316-980d-c502f2a492a1")}catch{}})();class pe{list(t){const s=new URLSearchParams({offset:t.offset.toString(),limit:t.limit.toString(),from:t.from.getTime().toString(),to:t.to.getTime().toString(),search:t.search});return re.get(`projects/${t.projectId}/builds/${t.buildId}/logs?${s}`)}}const fe=new pe;class M{constructor(t,s,u,l,i,I,V){this.executionId=t,this.runtimeType=s,this.runtimeName=u,this.payload=l,this.event=i,this.buildId=I,this.createdAt=V}static fromDTO(t){return new M(t.executionId,t.runtimeType,t.runtimeName,t.payload,t.event,t.buildId,new Date(t.createdAt))}static async list(t){return(await fe.list(t)).logs.map(M.fromDTO)}}var R={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||P()},modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||P(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(A.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?b.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?b.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?b.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return this.optionDisabled?b.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return b.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return b.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(t=>this.isOptionGroup(t)).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&f.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&f.focus(this.$refs.focusInput)};setTimeout(()=>{t()},0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled){e.preventDefault();return}const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&b.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}},onEditableInput(e){const t=e.target.value;this.searchValue="",!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.$emit("update:modelValue",t)},onContainerClick(e){this.disabled||this.loading||f.hasClass(e.target,"p-dropdown-clear-icon")||e.target.tagName==="INPUT"||(!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?f.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;f.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?f.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;f.focus(t)},onOptionSelect(e,t,s=!0){const u=this.getOptionValue(t);this.updateModel(e,u),s&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){z.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){switch(e.code){case"Escape":this.onEscapeKey(e);break}},onArrowDownKey(e){const t=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const s=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const s=e.currentTarget,u=s.value.length;s.setSelectionRange(u,u),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(f.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){A.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&f.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){A.clear(e)},alignOverlay(){this.appendTo==="self"?f.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=f.getOuterWidth(this.$el)+"px",f.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new N(this.$refs.container,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!f.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return f.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return b.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex(e=>this.isValidOption(e))},findLastOptionIndex(){return b.findLastIndex(this.visibleOptions,e=>this.isValidOption(e))},findNextOptionIndex(e){const t=ethis.isValidOption(s)):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?b.findLastIndex(this.visibleOptions.slice(0,e),s=>this.isValidOption(s)):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex(e=>this.isValidSelectedOption(e)):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let s=-1,u=!1;return this.focusedOptionIndex!==-1?(s=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(l=>this.isOptionMatched(l)),s=s===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(l=>this.isOptionMatched(l)):s+this.focusedOptionIndex):s=this.visibleOptions.findIndex(l=>this.isOptionMatched(l)),s!==-1&&(u=!0),s===-1&&this.focusedOptionIndex===-1&&(s=this.findFirstFocusedOptionIndex()),s!==-1&&this.changeFocusedOptionIndex(e,s),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),u},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=e!==-1?`${this.id}_${e}`:this.focusedOptionId,s=f.findSingle(this.list,`li[id="${t}"]`);s?s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e!==-1?e:this.focusedOptionIndex)},0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce((t,s,u)=>{t.push({optionGroup:s,group:!0,index:u});const l=this.getOptionGroupChildren(s);return l&&l.forEach(i=>t.push(i)),t},[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!this.editable&&!this.$slots.value&&(this.label==="p-emptylabel"||this.label.length===0)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":this.$primevue.config.inputStyle==="filled","p-ripple-disabled":this.$primevue.config.ripple===!1}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const e=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const t=j.filter(e,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const s=this.options||[],u=[];return s.forEach(l=>{const i=l.items.filter(I=>t.includes(I));i.length>0&&u.push({...l,items:[...i]})}),this.flatOptions(u)}return t}return e},hasSelectedOption(){return b.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return b.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return this.focusedOptionIndex!==-1?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter(e=>!this.isOptionGroup(e)).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:W},components:{VirtualScroller:Z,Portal:q}};const ye=["id"],be=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],me=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],ge={class:"p-dropdown-trigger"},ve={key:0,class:"p-dropdown-header"},Oe={class:"p-dropdown-filter-container"},Ie=["value","placeholder","aria-owns","aria-activedescendant"],we={role:"status","aria-live":"polite",class:"p-hidden-accessible"},xe=["id"],Se=["id"],Le=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],Ve={key:0,class:"p-dropdown-empty-message",role:"option"},Fe={key:1,class:"p-dropdown-empty-message",role:"option"},_e={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},Ce={role:"status","aria-live":"polite",class:"p-hidden-accessible"};function ke(e,t,s,u,l,i){const I=U("VirtualScroller"),V=U("Portal"),w=J("ripple");return r(),d("div",{ref:"container",id:l.id,class:_(i.containerClass),onClick:t[16]||(t[16]=(...n)=>i.onContainerClick&&i.onContainerClick(...n))},[s.editable?(r(),d("input",L({key:0,ref:"focusInput",id:s.inputId,type:"text",style:s.inputStyle,class:i.inputStyleClass,value:i.editableInputValue,placeholder:s.placeholder,tabindex:s.disabled?-1:s.tabindex,disabled:s.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":l.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":l.focused?i.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...n)=>i.onFocus&&i.onFocus(...n)),onBlur:t[1]||(t[1]=(...n)=>i.onBlur&&i.onBlur(...n)),onKeydown:t[2]||(t[2]=(...n)=>i.onKeyDown&&i.onKeyDown(...n)),onInput:t[3]||(t[3]=(...n)=>i.onEditableInput&&i.onEditableInput(...n))},s.inputProps),null,16,be)):(r(),d("span",L({key:1,ref:"focusInput",id:s.inputId,style:s.inputStyle,class:i.inputStyleClass,tabindex:s.disabled?-1:s.tabindex,role:"combobox","aria-label":e.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":l.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":l.focused?i.focusedOptionId:void 0,"aria-disabled":s.disabled,onFocus:t[4]||(t[4]=(...n)=>i.onFocus&&i.onFocus(...n)),onBlur:t[5]||(t[5]=(...n)=>i.onBlur&&i.onBlur(...n)),onKeydown:t[6]||(t[6]=(...n)=>i.onKeyDown&&i.onKeyDown(...n))},s.inputProps),[v(e.$slots,"value",{value:s.modelValue,placeholder:s.placeholder},()=>[F(c(i.label==="p-emptylabel"?"\xA0":i.label||"empty"),1)])],16,me)),s.showClear&&s.modelValue!=null?(r(),d("i",L({key:2,class:["p-dropdown-clear-icon",s.clearIcon],onClick:t[7]||(t[7]=(...n)=>i.onClearClick&&i.onClearClick(...n))},s.clearIconProps),null,16)):x("",!0),o("div",ge,[v(e.$slots,"indicator",{},()=>[o("span",{class:_(i.dropdownIconClass),"aria-hidden":"true"},null,2)])]),K(V,{appendTo:s.appendTo},{default:k(()=>[K(Q,{name:"p-connected-overlay",onEnter:i.onOverlayEnter,onAfterEnter:i.onOverlayAfterEnter,onLeave:i.onOverlayLeave,onAfterLeave:i.onOverlayAfterLeave},{default:k(()=>[l.overlayVisible?(r(),d("div",L({key:0,ref:i.overlayRef,style:s.panelStyle,class:i.panelStyleClass,onClick:t[14]||(t[14]=(...n)=>i.onOverlayClick&&i.onOverlayClick(...n)),onKeydown:t[15]||(t[15]=(...n)=>i.onOverlayKeyDown&&i.onOverlayKeyDown(...n))},s.panelProps),[o("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...n)=>i.onFirstHiddenFocus&&i.onFirstHiddenFocus(...n))},null,544),v(e.$slots,"header",{value:s.modelValue,options:i.visibleOptions}),s.filter?(r(),d("div",ve,[o("div",Oe,[o("input",L({ref:"filterInput",type:"text",value:l.filterValue,onVnodeUpdated:t[9]||(t[9]=(...n)=>i.onFilterUpdated&&i.onFilterUpdated(...n)),class:"p-dropdown-filter p-inputtext p-component",placeholder:s.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":l.id+"_list","aria-activedescendant":i.focusedOptionId,onKeydown:t[10]||(t[10]=(...n)=>i.onFilterKeyDown&&i.onFilterKeyDown(...n)),onBlur:t[11]||(t[11]=(...n)=>i.onFilterBlur&&i.onFilterBlur(...n)),onInput:t[12]||(t[12]=(...n)=>i.onFilterChange&&i.onFilterChange(...n))},s.filterInputProps),null,16,Ie),o("span",{class:_(["p-dropdown-filter-icon",s.filterIcon])},null,2)]),o("span",we,c(i.filterResultMessageText),1)])):x("",!0),o("div",{class:"p-dropdown-items-wrapper",style:D({"max-height":i.virtualScrollerDisabled?s.scrollHeight:""})},[K(I,L({ref:i.virtualScrollerRef},s.virtualScrollerOptions,{items:i.visibleOptions,style:{height:s.scrollHeight},tabindex:-1,disabled:i.virtualScrollerDisabled}),X({content:k(({styleClass:n,contentRef:y,items:h,getItemOptions:m,contentStyle:C,itemSize:a})=>[o("ul",{ref:p=>i.listRef(p,y),id:l.id+"_list",class:_(["p-dropdown-items",n]),style:D(C),role:"listbox"},[(r(!0),d(H,null,G(h,(p,g)=>(r(),d(H,{key:i.getOptionRenderKey(p,i.getOptionIndex(g,m))},[i.isOptionGroup(p)?(r(),d("li",{key:0,id:l.id+"_"+i.getOptionIndex(g,m),style:D({height:a?a+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[v(e.$slots,"optiongroup",{option:p.optionGroup,index:i.getOptionIndex(g,m)},()=>[F(c(i.getOptionGroupLabel(p.optionGroup)),1)])],12,Se)):E((r(),d("li",{key:1,id:l.id+"_"+i.getOptionIndex(g,m),style:D({height:a?a+"px":void 0}),class:_(["p-dropdown-item",{"p-highlight":i.isSelected(p),"p-focus":l.focusedOptionIndex===i.getOptionIndex(g,m),"p-disabled":i.isOptionDisabled(p)}]),role:"option","aria-label":i.getOptionLabel(p),"aria-selected":i.isSelected(p),"aria-disabled":i.isOptionDisabled(p),"aria-setsize":i.ariaSetSize,"aria-posinset":i.getAriaPosInset(i.getOptionIndex(g,m)),onClick:T=>i.onOptionSelect(T,p),onMousemove:T=>i.onOptionMouseMove(T,i.getOptionIndex(g,m))},[v(e.$slots,"option",{option:p,index:i.getOptionIndex(g,m)},()=>[F(c(i.getOptionLabel(p)),1)])],46,Le)),[[w]])],64))),128)),l.filterValue&&(!h||h&&h.length===0)?(r(),d("li",Ve,[v(e.$slots,"emptyfilter",{},()=>[F(c(i.emptyFilterMessageText),1)])])):!s.options||s.options&&s.options.length===0?(r(),d("li",Fe,[v(e.$slots,"empty",{},()=>[F(c(i.emptyMessageText),1)])])):x("",!0)],14,xe)]),_:2},[e.$slots.loader?{name:"loader",fn:k(({options:n})=>[v(e.$slots,"loader",{options:n})]),key:"0"}:void 0]),1040,["items","style","disabled"])],4),v(e.$slots,"footer",{value:s.modelValue,options:i.visibleOptions}),!s.options||s.options&&s.options.length===0?(r(),d("span",_e,c(i.emptyMessageText),1)):x("",!0),o("span",Ce,c(i.selectedMessageText),1),o("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...n)=>i.onLastHiddenFocus&&i.onLastHiddenFocus(...n))},null,544)],16)):x("",!0)]),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]),_:3},8,["appendTo"])],10,ye)}function De(e,t){t===void 0&&(t={});var s=t.insertAt;if(!(!e||typeof document>"u")){var u=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",s==="top"&&u.firstChild?u.insertBefore(l,u.firstChild):u.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}var Ke=` +import{at as P,au as A,av as y,aw as f,ax as z,ay as N,az as j,aA as W,aB as Z,aC as q,a as U,aD as J,b as r,c as d,am as L,B as v,U as F,N as c,D as x,x as o,G as _,e as K,w as k,aq as Q,A as D,ap as X,F as H,L as G,W as E,d as Y,v as $,K as ee,z as O,t as te,Z as B,ai as ie,J as se,O as le,Q as ne,S as oe,q as ae}from"./registerWidgets.89616af0.js";import{C as re}from"./gateway.0deebb85.js";import{B as de}from"./build.ac459472.js";import"./index.dae46ea1.js";import{a as ue}from"./asyncComputed.8ac91a75.js";import{L as ce}from"./LoadingIndicator.10cfcfe7.js";import{f as he}from"./index.b048d0fb.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";import"./lottie.fc57e5ac.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3a1ca750-6e49-45b5-a9be-1fd918d4d947",e._sentryDebugIdIdentifier="sentry-dbid-3a1ca750-6e49-45b5-a9be-1fd918d4d947")}catch{}})();class pe{list(t){const s=new URLSearchParams({offset:t.offset.toString(),limit:t.limit.toString(),from:t.from.getTime().toString(),to:t.to.getTime().toString(),search:t.search});return re.get(`projects/${t.projectId}/builds/${t.buildId}/logs?${s}`)}}const fe=new pe;class M{constructor(t,s,u,l,i,I,V){this.executionId=t,this.runtimeType=s,this.runtimeName=u,this.payload=l,this.event=i,this.buildId=I,this.createdAt=V}static fromDTO(t){return new M(t.executionId,t.runtimeType,t.runtimeName,t.payload,t.event,t.buildId,new Date(t.createdAt))}static async list(t){return(await fe.list(t)).logs.map(M.fromDTO)}}var R={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||P()},modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||P(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(A.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?y.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?y.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?y.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return this.optionDisabled?y.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return y.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return y.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(t=>this.isOptionGroup(t)).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&f.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&f.focus(this.$refs.focusInput)};setTimeout(()=>{t()},0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled){e.preventDefault();return}const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&y.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}},onEditableInput(e){const t=e.target.value;this.searchValue="",!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.$emit("update:modelValue",t)},onContainerClick(e){this.disabled||this.loading||f.hasClass(e.target,"p-dropdown-clear-icon")||e.target.tagName==="INPUT"||(!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?f.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;f.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?f.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;f.focus(t)},onOptionSelect(e,t,s=!0){const u=this.getOptionValue(t);this.updateModel(e,u),s&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){z.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){switch(e.code){case"Escape":this.onEscapeKey(e);break}},onArrowDownKey(e){const t=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const s=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const s=e.currentTarget,u=s.value.length;s.setSelectionRange(u,u),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(f.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){A.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&f.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){A.clear(e)},alignOverlay(){this.appendTo==="self"?f.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=f.getOuterWidth(this.$el)+"px",f.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new N(this.$refs.container,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!f.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return f.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return y.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex(e=>this.isValidOption(e))},findLastOptionIndex(){return y.findLastIndex(this.visibleOptions,e=>this.isValidOption(e))},findNextOptionIndex(e){const t=ethis.isValidOption(s)):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?y.findLastIndex(this.visibleOptions.slice(0,e),s=>this.isValidOption(s)):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex(e=>this.isValidSelectedOption(e)):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let s=-1,u=!1;return this.focusedOptionIndex!==-1?(s=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(l=>this.isOptionMatched(l)),s=s===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(l=>this.isOptionMatched(l)):s+this.focusedOptionIndex):s=this.visibleOptions.findIndex(l=>this.isOptionMatched(l)),s!==-1&&(u=!0),s===-1&&this.focusedOptionIndex===-1&&(s=this.findFirstFocusedOptionIndex()),s!==-1&&this.changeFocusedOptionIndex(e,s),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),u},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=e!==-1?`${this.id}_${e}`:this.focusedOptionId,s=f.findSingle(this.list,`li[id="${t}"]`);s?s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e!==-1?e:this.focusedOptionIndex)},0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce((t,s,u)=>{t.push({optionGroup:s,group:!0,index:u});const l=this.getOptionGroupChildren(s);return l&&l.forEach(i=>t.push(i)),t},[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!this.editable&&!this.$slots.value&&(this.label==="p-emptylabel"||this.label.length===0)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":this.$primevue.config.inputStyle==="filled","p-ripple-disabled":this.$primevue.config.ripple===!1}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const e=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const t=j.filter(e,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const s=this.options||[],u=[];return s.forEach(l=>{const i=l.items.filter(I=>t.includes(I));i.length>0&&u.push({...l,items:[...i]})}),this.flatOptions(u)}return t}return e},hasSelectedOption(){return y.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return y.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return this.focusedOptionIndex!==-1?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter(e=>!this.isOptionGroup(e)).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:W},components:{VirtualScroller:Z,Portal:q}};const be=["id"],ye=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],me=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],ge={class:"p-dropdown-trigger"},ve={key:0,class:"p-dropdown-header"},Oe={class:"p-dropdown-filter-container"},Ie=["value","placeholder","aria-owns","aria-activedescendant"],we={role:"status","aria-live":"polite",class:"p-hidden-accessible"},xe=["id"],Se=["id"],Le=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],Ve={key:0,class:"p-dropdown-empty-message",role:"option"},Fe={key:1,class:"p-dropdown-empty-message",role:"option"},_e={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},Ce={role:"status","aria-live":"polite",class:"p-hidden-accessible"};function ke(e,t,s,u,l,i){const I=U("VirtualScroller"),V=U("Portal"),w=J("ripple");return r(),d("div",{ref:"container",id:l.id,class:_(i.containerClass),onClick:t[16]||(t[16]=(...n)=>i.onContainerClick&&i.onContainerClick(...n))},[s.editable?(r(),d("input",L({key:0,ref:"focusInput",id:s.inputId,type:"text",style:s.inputStyle,class:i.inputStyleClass,value:i.editableInputValue,placeholder:s.placeholder,tabindex:s.disabled?-1:s.tabindex,disabled:s.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":l.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":l.focused?i.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...n)=>i.onFocus&&i.onFocus(...n)),onBlur:t[1]||(t[1]=(...n)=>i.onBlur&&i.onBlur(...n)),onKeydown:t[2]||(t[2]=(...n)=>i.onKeyDown&&i.onKeyDown(...n)),onInput:t[3]||(t[3]=(...n)=>i.onEditableInput&&i.onEditableInput(...n))},s.inputProps),null,16,ye)):(r(),d("span",L({key:1,ref:"focusInput",id:s.inputId,style:s.inputStyle,class:i.inputStyleClass,tabindex:s.disabled?-1:s.tabindex,role:"combobox","aria-label":e.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":l.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":l.focused?i.focusedOptionId:void 0,"aria-disabled":s.disabled,onFocus:t[4]||(t[4]=(...n)=>i.onFocus&&i.onFocus(...n)),onBlur:t[5]||(t[5]=(...n)=>i.onBlur&&i.onBlur(...n)),onKeydown:t[6]||(t[6]=(...n)=>i.onKeyDown&&i.onKeyDown(...n))},s.inputProps),[v(e.$slots,"value",{value:s.modelValue,placeholder:s.placeholder},()=>[F(c(i.label==="p-emptylabel"?"\xA0":i.label||"empty"),1)])],16,me)),s.showClear&&s.modelValue!=null?(r(),d("i",L({key:2,class:["p-dropdown-clear-icon",s.clearIcon],onClick:t[7]||(t[7]=(...n)=>i.onClearClick&&i.onClearClick(...n))},s.clearIconProps),null,16)):x("",!0),o("div",ge,[v(e.$slots,"indicator",{},()=>[o("span",{class:_(i.dropdownIconClass),"aria-hidden":"true"},null,2)])]),K(V,{appendTo:s.appendTo},{default:k(()=>[K(Q,{name:"p-connected-overlay",onEnter:i.onOverlayEnter,onAfterEnter:i.onOverlayAfterEnter,onLeave:i.onOverlayLeave,onAfterLeave:i.onOverlayAfterLeave},{default:k(()=>[l.overlayVisible?(r(),d("div",L({key:0,ref:i.overlayRef,style:s.panelStyle,class:i.panelStyleClass,onClick:t[14]||(t[14]=(...n)=>i.onOverlayClick&&i.onOverlayClick(...n)),onKeydown:t[15]||(t[15]=(...n)=>i.onOverlayKeyDown&&i.onOverlayKeyDown(...n))},s.panelProps),[o("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...n)=>i.onFirstHiddenFocus&&i.onFirstHiddenFocus(...n))},null,544),v(e.$slots,"header",{value:s.modelValue,options:i.visibleOptions}),s.filter?(r(),d("div",ve,[o("div",Oe,[o("input",L({ref:"filterInput",type:"text",value:l.filterValue,onVnodeUpdated:t[9]||(t[9]=(...n)=>i.onFilterUpdated&&i.onFilterUpdated(...n)),class:"p-dropdown-filter p-inputtext p-component",placeholder:s.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":l.id+"_list","aria-activedescendant":i.focusedOptionId,onKeydown:t[10]||(t[10]=(...n)=>i.onFilterKeyDown&&i.onFilterKeyDown(...n)),onBlur:t[11]||(t[11]=(...n)=>i.onFilterBlur&&i.onFilterBlur(...n)),onInput:t[12]||(t[12]=(...n)=>i.onFilterChange&&i.onFilterChange(...n))},s.filterInputProps),null,16,Ie),o("span",{class:_(["p-dropdown-filter-icon",s.filterIcon])},null,2)]),o("span",we,c(i.filterResultMessageText),1)])):x("",!0),o("div",{class:"p-dropdown-items-wrapper",style:D({"max-height":i.virtualScrollerDisabled?s.scrollHeight:""})},[K(I,L({ref:i.virtualScrollerRef},s.virtualScrollerOptions,{items:i.visibleOptions,style:{height:s.scrollHeight},tabindex:-1,disabled:i.virtualScrollerDisabled}),X({content:k(({styleClass:n,contentRef:b,items:h,getItemOptions:m,contentStyle:C,itemSize:a})=>[o("ul",{ref:p=>i.listRef(p,b),id:l.id+"_list",class:_(["p-dropdown-items",n]),style:D(C),role:"listbox"},[(r(!0),d(H,null,G(h,(p,g)=>(r(),d(H,{key:i.getOptionRenderKey(p,i.getOptionIndex(g,m))},[i.isOptionGroup(p)?(r(),d("li",{key:0,id:l.id+"_"+i.getOptionIndex(g,m),style:D({height:a?a+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[v(e.$slots,"optiongroup",{option:p.optionGroup,index:i.getOptionIndex(g,m)},()=>[F(c(i.getOptionGroupLabel(p.optionGroup)),1)])],12,Se)):E((r(),d("li",{key:1,id:l.id+"_"+i.getOptionIndex(g,m),style:D({height:a?a+"px":void 0}),class:_(["p-dropdown-item",{"p-highlight":i.isSelected(p),"p-focus":l.focusedOptionIndex===i.getOptionIndex(g,m),"p-disabled":i.isOptionDisabled(p)}]),role:"option","aria-label":i.getOptionLabel(p),"aria-selected":i.isSelected(p),"aria-disabled":i.isOptionDisabled(p),"aria-setsize":i.ariaSetSize,"aria-posinset":i.getAriaPosInset(i.getOptionIndex(g,m)),onClick:T=>i.onOptionSelect(T,p),onMousemove:T=>i.onOptionMouseMove(T,i.getOptionIndex(g,m))},[v(e.$slots,"option",{option:p,index:i.getOptionIndex(g,m)},()=>[F(c(i.getOptionLabel(p)),1)])],46,Le)),[[w]])],64))),128)),l.filterValue&&(!h||h&&h.length===0)?(r(),d("li",Ve,[v(e.$slots,"emptyfilter",{},()=>[F(c(i.emptyFilterMessageText),1)])])):!s.options||s.options&&s.options.length===0?(r(),d("li",Fe,[v(e.$slots,"empty",{},()=>[F(c(i.emptyMessageText),1)])])):x("",!0)],14,xe)]),_:2},[e.$slots.loader?{name:"loader",fn:k(({options:n})=>[v(e.$slots,"loader",{options:n})]),key:"0"}:void 0]),1040,["items","style","disabled"])],4),v(e.$slots,"footer",{value:s.modelValue,options:i.visibleOptions}),!s.options||s.options&&s.options.length===0?(r(),d("span",_e,c(i.emptyMessageText),1)):x("",!0),o("span",Ce,c(i.selectedMessageText),1),o("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...n)=>i.onLastHiddenFocus&&i.onLastHiddenFocus(...n))},null,544)],16)):x("",!0)]),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]),_:3},8,["appendTo"])],10,be)}function De(e,t){t===void 0&&(t={});var s=t.insertAt;if(!(!e||typeof document>"u")){var u=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",s==="top"&&u.firstChild?u.insertBefore(l,u.firstChild):u.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}var Ke=` .p-dropdown { display: inline-flex; cursor: pointer; @@ -75,5 +75,5 @@ input.p-dropdown-label { .p-fluid .p-dropdown .p-dropdown-label { width: 1%; } -`;De(Ke);R.render=ke;const S=e=>(le("data-v-4bfb8853"),e=e(),ne(),e),Ee={key:1,class:"logs"},Me=S(()=>o("h1",null,"Logs",-1)),Te={class:"filters"},Ae={class:"field field-build"},Be=S(()=>o("label",null,"Build",-1)),He={class:"field"},Pe=S(()=>o("label",null,"From",-1)),Ue={class:"field"},Ge=S(()=>o("label",null,"To",-1)),Re={class:"field"},ze=S(()=>o("label",null,"Search",-1)),Ne={key:0,class:"log-list"},je={class:"search-summary"},We={class:"log"},Ze={class:"log-header"},qe={key:0,class:"log-date log-header-item"},Je=S(()=>o("span",{class:"log-header-item-name"},"Build",-1)),Qe=[Je],Xe=ie('
Date
Runtime
Execution
Event
',4),Ye={class:"log-header"},$e={key:0,class:"log-date log-header-item"},et={class:"log-header-item-value"},tt={class:"log-date log-header-item"},it={class:"log-header-item-value"},st={class:"log-runtime log-header-item"},lt={class:"log-header-item-value"},nt={class:"log-execution log-header-item"},ot={class:"log-header-item-value"},at={class:"log-event log-header-item"},rt={class:"log-header-item-value"},dt={class:"log-payload"},ut=["textContent"],ct=["textContent"],ht=["textContent"],pt=["textContent"],ft=["textContent"],yt={key:1,class:"no-logs"},bt=S(()=>o("p",null,"No logs found.",-1)),mt=[bt],gt=Y({__name:"Logs",setup(e){function t(y){return he(y,new Date,{addSuffix:!0})}const s=se(),u=s.params.projectId,l=$({selectedBuild:s.query.buildId||"latest",from:new Date(Date.now()-1e3*60*60*24*7).toISOString().slice(0,16),to:new Date().toISOString().slice(0,16),search:"",limit:50,offset:0}),i=ee(()=>w.value?[{label:"Latest",value:"latest"},{label:"All",value:"all"},...w.value.builds.map(y=>({label:`${t(y.createdAt)} (${y.id.slice(0,8)})`,value:y.id}))]:[{label:"Latest",value:"latest"},{label:"All",value:"all"}]),I=y=>{l.selectedBuild=y.value,n()},{loading:V,result:w,refetch:n}=ue(()=>Promise.all([M.list({projectId:u,limit:l.limit,offset:l.offset,buildId:l.selectedBuild,from:new Date(l.from),to:new Date(l.to),search:l.search}),de.list(u)]).then(([y,h])=>oe({logs:y,builds:h})));return(y,h)=>{var m,C;return O(V)||!((m=O(w))!=null&&m.logs)?(r(),te(ce,{key:0})):(r(),d("div",Ee,[Me,o("div",Te,[o("div",Ae,[Be,K(O(R),{modelValue:l.selectedBuild,"onUpdate:modelValue":h[0]||(h[0]=a=>l.selectedBuild=a),class:"build-dropdown",options:O(i),"option-label":"label","option-value":"value",filter:!1,onChange:I},null,8,["modelValue","options"])]),o("div",He,[Pe,E(o("input",{"onUpdate:modelValue":h[1]||(h[1]=a=>l.from=a),type:"datetime-local"},null,512),[[B,l.from]])]),o("div",Ue,[Ge,E(o("input",{"onUpdate:modelValue":h[2]||(h[2]=a=>l.to=a),type:"datetime-local"},null,512),[[B,l.to]])]),o("div",Re,[ze,E(o("input",{"onUpdate:modelValue":h[3]||(h[3]=a=>l.search=a),type:"search"},null,512),[[B,l.search]])]),o("button",{onClick:h[4]||(h[4]=(...a)=>O(n)&&O(n)(...a))},"Filter")]),((C=O(w))==null?void 0:C.logs.length)>0?(r(),d("div",Ne,[o("div",je," Showing from "+c(l.offset+1)+" to "+c(l.offset+l.limit),1),o("details",We,[o("summary",Ze,[l.selectedBuild=="all"?(r(),d("div",qe,Qe)):x("",!0),Xe])]),(r(!0),d(H,null,G(O(w).logs,a=>{var p,g;return r(),d("details",{key:a.createdAt.toString(),class:"log"},[o("summary",Ye,[l.selectedBuild=="all"?(r(),d("div",$e,[o("span",et,c(a.buildId.split("-")[0]),1)])):x("",!0),o("div",tt,[o("span",it,c(t(a.createdAt)),1)]),o("div",st,[o("span",lt,c(a.runtimeType)+":"+c(a.runtimeName),1)]),o("div",nt,[o("span",ot,c(a.executionId.slice(0,8)),1)]),o("div",at,[o("span",rt,c(a.event),1)])]),o("div",dt,[a.event==="stdout"?(r(),d("pre",{key:0,class:"log-payload-content",textContent:c(a.payload.log)},null,8,ut)):a.event==="stderr"?(r(),d("pre",{key:1,class:"log-payload-content",textContent:c(a.payload.log)},null,8,ct)):a.event==="program-start-failed"?(r(),d("pre",{key:2,class:"log-payload-content",textContent:c(a.payload.error)},null,8,ht)):a.event==="widgets-computed"&&((g=(p=a.payload.errors)==null?void 0:p.general)==null?void 0:g.repr)?(r(),d("pre",{key:3,class:"log-payload-content",textContent:c(a.payload.errors.general.repr)},null,8,pt)):(r(),d("pre",{key:4,class:"log-payload-content",textContent:c(a.payload)},null,8,ft))])])}),128))])):(r(),d("div",yt,mt))]))}}});const kt=ae(gt,[["__scopeId","data-v-4bfb8853"]]);export{kt as default}; -//# sourceMappingURL=Logs.9b4c6324.js.map +`;De(Ke);R.render=ke;const S=e=>(le("data-v-4bfb8853"),e=e(),ne(),e),Ee={key:1,class:"logs"},Me=S(()=>o("h1",null,"Logs",-1)),Te={class:"filters"},Ae={class:"field field-build"},Be=S(()=>o("label",null,"Build",-1)),He={class:"field"},Pe=S(()=>o("label",null,"From",-1)),Ue={class:"field"},Ge=S(()=>o("label",null,"To",-1)),Re={class:"field"},ze=S(()=>o("label",null,"Search",-1)),Ne={key:0,class:"log-list"},je={class:"search-summary"},We={class:"log"},Ze={class:"log-header"},qe={key:0,class:"log-date log-header-item"},Je=S(()=>o("span",{class:"log-header-item-name"},"Build",-1)),Qe=[Je],Xe=ie('
Date
Runtime
Execution
Event
',4),Ye={class:"log-header"},$e={key:0,class:"log-date log-header-item"},et={class:"log-header-item-value"},tt={class:"log-date log-header-item"},it={class:"log-header-item-value"},st={class:"log-runtime log-header-item"},lt={class:"log-header-item-value"},nt={class:"log-execution log-header-item"},ot={class:"log-header-item-value"},at={class:"log-event log-header-item"},rt={class:"log-header-item-value"},dt={class:"log-payload"},ut=["textContent"],ct=["textContent"],ht=["textContent"],pt=["textContent"],ft=["textContent"],bt={key:1,class:"no-logs"},yt=S(()=>o("p",null,"No logs found.",-1)),mt=[yt],gt=Y({__name:"Logs",setup(e){function t(b){return he(b,new Date,{addSuffix:!0})}const s=se(),u=s.params.projectId,l=$({selectedBuild:s.query.buildId||"latest",from:new Date(Date.now()-1e3*60*60*24*7).toISOString().slice(0,16),to:new Date().toISOString().slice(0,16),search:"",limit:50,offset:0}),i=ee(()=>w.value?[{label:"Latest",value:"latest"},{label:"All",value:"all"},...w.value.builds.map(b=>({label:`${t(b.createdAt)} (${b.id.slice(0,8)})`,value:b.id}))]:[{label:"Latest",value:"latest"},{label:"All",value:"all"}]),I=b=>{l.selectedBuild=b.value,n()},{loading:V,result:w,refetch:n}=ue(()=>Promise.all([M.list({projectId:u,limit:l.limit,offset:l.offset,buildId:l.selectedBuild,from:new Date(l.from),to:new Date(l.to),search:l.search}),de.list(u)]).then(([b,h])=>oe({logs:b,builds:h})));return(b,h)=>{var m,C;return O(V)||!((m=O(w))!=null&&m.logs)?(r(),te(ce,{key:0})):(r(),d("div",Ee,[Me,o("div",Te,[o("div",Ae,[Be,K(O(R),{modelValue:l.selectedBuild,"onUpdate:modelValue":h[0]||(h[0]=a=>l.selectedBuild=a),class:"build-dropdown",options:O(i),"option-label":"label","option-value":"value",filter:!1,onChange:I},null,8,["modelValue","options"])]),o("div",He,[Pe,E(o("input",{"onUpdate:modelValue":h[1]||(h[1]=a=>l.from=a),type:"datetime-local"},null,512),[[B,l.from]])]),o("div",Ue,[Ge,E(o("input",{"onUpdate:modelValue":h[2]||(h[2]=a=>l.to=a),type:"datetime-local"},null,512),[[B,l.to]])]),o("div",Re,[ze,E(o("input",{"onUpdate:modelValue":h[3]||(h[3]=a=>l.search=a),type:"search"},null,512),[[B,l.search]])]),o("button",{onClick:h[4]||(h[4]=(...a)=>O(n)&&O(n)(...a))},"Filter")]),((C=O(w))==null?void 0:C.logs.length)>0?(r(),d("div",Ne,[o("div",je," Showing from "+c(l.offset+1)+" to "+c(l.offset+l.limit),1),o("details",We,[o("summary",Ze,[l.selectedBuild=="all"?(r(),d("div",qe,Qe)):x("",!0),Xe])]),(r(!0),d(H,null,G(O(w).logs,a=>{var p,g;return r(),d("details",{key:a.createdAt.toString(),class:"log"},[o("summary",Ye,[l.selectedBuild=="all"?(r(),d("div",$e,[o("span",et,c(a.buildId.split("-")[0]),1)])):x("",!0),o("div",tt,[o("span",it,c(t(a.createdAt)),1)]),o("div",st,[o("span",lt,c(a.runtimeType)+":"+c(a.runtimeName),1)]),o("div",nt,[o("span",ot,c(a.executionId.slice(0,8)),1)]),o("div",at,[o("span",rt,c(a.event),1)])]),o("div",dt,[a.event==="stdout"?(r(),d("pre",{key:0,class:"log-payload-content",textContent:c(a.payload.log)},null,8,ut)):a.event==="stderr"?(r(),d("pre",{key:1,class:"log-payload-content",textContent:c(a.payload.log)},null,8,ct)):a.event==="program-start-failed"?(r(),d("pre",{key:2,class:"log-payload-content",textContent:c(a.payload.error)},null,8,ht)):a.event==="widgets-computed"&&((g=(p=a.payload.errors)==null?void 0:p.general)==null?void 0:g.repr)?(r(),d("pre",{key:3,class:"log-payload-content",textContent:c(a.payload.errors.general.repr)},null,8,pt)):(r(),d("pre",{key:4,class:"log-payload-content",textContent:c(a.payload)},null,8,ft))])])}),128))])):(r(),d("div",bt,mt))]))}}});const kt=ae(gt,[["__scopeId","data-v-4bfb8853"]]);export{kt as default}; +//# sourceMappingURL=Logs.6a1222af.js.map diff --git a/abstra_statics/dist/assets/Members.79c4954a.js b/abstra_statics/dist/assets/Members.79c4954a.js deleted file mode 100644 index 0d3289aa0f..0000000000 --- a/abstra_statics/dist/assets/Members.79c4954a.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as u,K as f,b as y,t as g,z as s,J as _}from"./registerWidgets.ca6243ef.js";import{a as w}from"./asyncComputed.3cb2e10b.js";import"./gateway.fa3322de.js";import{M as i}from"./member.f1e6c466.js";import"./index.a86d8064.js";import{C as I}from"./CrudView.bd13f7e1.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";import"./DropdownMenu.162e22a4.js";import"./Modal.2f8d0c91.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="3017dfce-b24e-42f1-be44-43230b2e9960",e._sentryDebugIdIdentifier="sentry-dbid-3017dfce-b24e-42f1-be44-43230b2e9960")}catch{}})();const K=u({__name:"Members",setup(e){const r=_().params.organizationId,m=[{key:"email",label:"Email"}],l=async t=>{await i.create(r,t.email),p()},{loading:d,result:c,refetch:p}=w(()=>i.list(r)),b=f(()=>{var t,a;return{columns:[{name:"Email"},{name:"Role"}],rows:(a=(t=c.value)==null?void 0:t.map(n=>({key:n.email,cells:[{text:n.email,classes:["title","centered"]},{text:n.role,classes:["centered"]}]})))!=null?a:[]}});return(t,a)=>(y(),g(I,{"entity-name":"members",loading:s(d),title:"Organization members",description:"List all organization members.","empty-title":"No members yet",table:s(b),"create-button-text":"Add members",fields:m,onCreate:l},null,8,["loading","table"]))}});export{K as default}; -//# sourceMappingURL=Members.79c4954a.js.map diff --git a/abstra_statics/dist/assets/Members.f5d95bd4.js b/abstra_statics/dist/assets/Members.f5d95bd4.js new file mode 100644 index 0000000000..1eb935d3b1 --- /dev/null +++ b/abstra_statics/dist/assets/Members.f5d95bd4.js @@ -0,0 +1,2 @@ +import{d as u,K as b,b as y,t as g,z as s,J as _}from"./registerWidgets.89616af0.js";import{a as w}from"./asyncComputed.8ac91a75.js";import"./gateway.0deebb85.js";import{M as i}from"./member.f4131337.js";import"./index.dae46ea1.js";import{C as I}from"./CrudView.7ced9145.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";import"./DropdownMenu.8f7fc9d3.js";import"./Modal.73e976a2.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="93603f9f-fb1f-416c-86dd-d10506a968e0",e._sentryDebugIdIdentifier="sentry-dbid-93603f9f-fb1f-416c-86dd-d10506a968e0")}catch{}})();const K=u({__name:"Members",setup(e){const a=_().params.organizationId,m=[{key:"email",label:"Email"}],l=async t=>{await i.create(a,t.email),f()},{loading:d,result:c,refetch:f}=w(()=>i.list(a)),p=b(()=>{var t,r;return{columns:[{name:"Email"},{name:"Role"}],rows:(r=(t=c.value)==null?void 0:t.map(n=>({key:n.email,cells:[{text:n.email,classes:["title","centered"]},{text:n.role,classes:["centered"]}]})))!=null?r:[]}});return(t,r)=>(y(),g(I,{"entity-name":"members",loading:s(d),title:"Organization members",description:"List all organization members.","empty-title":"No members yet",table:s(p),"create-button-text":"Add members",fields:m,onCreate:l},null,8,["loading","table"]))}});export{K as default}; +//# sourceMappingURL=Members.f5d95bd4.js.map diff --git a/abstra_statics/dist/assets/Modal.2f8d0c91.js b/abstra_statics/dist/assets/Modal.2f8d0c91.js deleted file mode 100644 index a2f0749f63..0000000000 --- a/abstra_statics/dist/assets/Modal.2f8d0c91.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as p,y as _,v,b as c,c as r,x as i,z as b,A as a,B as u,D as m,E as S,G as g,q as k}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="d45c1254-8d5a-4cbc-a72a-d897cc7a778e",e._sentryDebugIdIdentifier="sentry-dbid-d45c1254-8d5a-4cbc-a72a-d897cc7a778e")}catch{}})();const h=p({__name:"Modal",props:{containerStyle:null,headerStyle:null,contentStyle:null},emits:["open","close"],setup(e,{expose:s,emit:t}){const y=_(),f=()=>{n.isOpened=!0,t("open")},o=()=>{n.isOpened=!1,t("close")};s({open:f,close:o});const n=v({isOpened:!1});return(d,l)=>(c(),r("div",{class:g(["background",n.isOpened&&"visible"]),onClick:o},[i("div",{class:"container",style:a(e.containerStyle),onClick:l[0]||(l[0]=S(()=>{},["stop"]))},[b(y).header?(c(),r("div",{key:0,class:"header",style:a(e.headerStyle)},[u(d.$slots,"header",{},void 0,!0)],4)):m("",!0),i("div",{class:"content",style:a(e.contentStyle)},[u(d.$slots,"content",{},void 0,!0)],4)],4)],2))}});const I=k(h,[["__scopeId","data-v-24f739ca"]]);export{I as M}; -//# sourceMappingURL=Modal.2f8d0c91.js.map diff --git a/abstra_statics/dist/assets/Modal.73e976a2.js b/abstra_statics/dist/assets/Modal.73e976a2.js new file mode 100644 index 0000000000..e63353e8c3 --- /dev/null +++ b/abstra_statics/dist/assets/Modal.73e976a2.js @@ -0,0 +1,2 @@ +import{d as p,y as b,v as _,b as r,c,x as i,z as v,A as o,B as u,D as m,E as S,G as g,q as k}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="52eb2b4e-164c-4e07-9d1e-d9b8a19867a7",e._sentryDebugIdIdentifier="sentry-dbid-52eb2b4e-164c-4e07-9d1e-d9b8a19867a7")}catch{}})();const h=p({__name:"Modal",props:{containerStyle:null,headerStyle:null,contentStyle:null},emits:["open","close"],setup(e,{expose:s,emit:t}){const y=b(),f=()=>{n.isOpened=!0,t("open")},a=()=>{n.isOpened=!1,t("close")};s({open:f,close:a});const n=_({isOpened:!1});return(l,d)=>(r(),c("div",{class:g(["background",n.isOpened&&"visible"]),onClick:a},[i("div",{class:"container",style:o(e.containerStyle),onClick:d[0]||(d[0]=S(()=>{},["stop"]))},[v(y).header?(r(),c("div",{key:0,class:"header",style:o(e.headerStyle)},[u(l.$slots,"header",{},void 0,!0)],4)):m("",!0),i("div",{class:"content",style:o(e.contentStyle)},[u(l.$slots,"content",{},void 0,!0)],4)],4)],2))}});const I=k(h,[["__scopeId","data-v-24f739ca"]]);export{I as M}; +//# sourceMappingURL=Modal.73e976a2.js.map diff --git a/abstra_statics/dist/assets/Navbar.41c99d51.js b/abstra_statics/dist/assets/Navbar.dbea5082.js similarity index 52% rename from abstra_statics/dist/assets/Navbar.41c99d51.js rename to abstra_statics/dist/assets/Navbar.dbea5082.js index 5b67a075ef..529cd18fbf 100644 --- a/abstra_statics/dist/assets/Navbar.41c99d51.js +++ b/abstra_statics/dist/assets/Navbar.dbea5082.js @@ -1,2 +1,2 @@ -import{_ as k}from"./logo.084e5d7c.js";import{q as i,b as s,c as o,O as u,Q as p,x as t,d as b,H as I,a as x,z as _,N as f,e as r,w as g,U as m,F as $,L as w,D as L,ar as N}from"./registerWidgets.ca6243ef.js";import{p as l}from"./passwordlessManager.0ab78ba0.js";import{a as C}from"./asyncComputed.3cb2e10b.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="de1ff354-aab5-4b40-8f49-aff4a49472c7",e._sentryDebugIdIdentifier="sentry-dbid-de1ff354-aab5-4b40-8f49-aff4a49472c7")}catch{}})();const B={},v=e=>(u("data-v-439be421"),e=e(),p(),e),D={class:"logo"},S=v(()=>t("img",{class:"logo-img",src:k,alt:"Abstra cloud logo"},null,-1)),V=v(()=>t("span",null,"Abstra Cloud",-1)),U=[S,V];function A(e,a){return s(),o("div",D,U)}const E=i(B,[["render",A],["__scopeId","data-v-439be421"]]),F={key:0},R={key:1,class:"logged"},q={class:"author-email"},z={key:2},H=b({__name:"LoginBlock",setup(e){const a=I(),{result:c,loading:n,refetch:d}=C(async()=>l.getUser());function h(){l.removeUser(),d(),a.push({name:"login"})}return(P,W)=>{const y=x("router-link");return _(n)?(s(),o("div",F,"loading...")):_(c)?(s(),o("div",R,[t("span",q,f(_(c).claims.email),1),t("button",{class:"btn",onClick:h},"Logout")])):(s(),o("div",z,[r(y,{class:"btn",to:"/login"},{default:g(()=>[m("Login")]),_:1})]))}}});const M=i(H,[["__scopeId","data-v-6c08207b"]]),O=e=>(u("data-v-cf48b8cc"),e=e(),p(),e),Q={class:"nav"},T={class:"left"},j={key:0,class:"breadcrumb-container"},G=O(()=>t("span",{class:"divider"},">",-1)),J={class:"right"},K=b({__name:"Navbar",props:{breadcrumb:null},setup(e){return(a,c)=>(s(),o("nav",Q,[t("div",T,[r(E),e.breadcrumb?(s(),o("div",j,[(s(!0),o($,null,w(e.breadcrumb,(n,d)=>(s(),o("span",{key:d,class:"breadcrumb-item"},[r(_(N),{class:"breadcrumb-link",to:n.path},{default:g(()=>[m(f(n.label),1)]),_:2},1032,["to"]),G]))),128))])):L("",!0)]),t("div",J,[r(M)])]))}});const se=i(K,[["__scopeId","data-v-cf48b8cc"]]);export{se as N}; -//# sourceMappingURL=Navbar.41c99d51.js.map +import{_ as k}from"./logo.084e5d7c.js";import{q as i,b as s,c as o,O as u,Q as p,x as t,d as b,H as I,a as x,z as _,N as g,e as r,w as m,U as f,F as $,L as w,D as L,ar as N}from"./registerWidgets.89616af0.js";import{p as l}from"./passwordlessManager.884221ca.js";import{a as C}from"./asyncComputed.8ac91a75.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},c=new Error().stack;c&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[c]="d3747cf0-e392-4195-8946-1bdc4b44d0fe",e._sentryDebugIdIdentifier="sentry-dbid-d3747cf0-e392-4195-8946-1bdc4b44d0fe")}catch{}})();const B={},v=e=>(u("data-v-439be421"),e=e(),p(),e),D={class:"logo"},S=v(()=>t("img",{class:"logo-img",src:k,alt:"Abstra cloud logo"},null,-1)),V=v(()=>t("span",null,"Abstra Cloud",-1)),U=[S,V];function A(e,c){return s(),o("div",D,U)}const E=i(B,[["render",A],["__scopeId","data-v-439be421"]]),F={key:0},R={key:1,class:"logged"},q={class:"author-email"},z={key:2},H=b({__name:"LoginBlock",setup(e){const c=I(),{result:a,loading:n,refetch:d}=C(async()=>l.getUser());function h(){l.removeUser(),d(),c.push({name:"login"})}return(P,W)=>{const y=x("router-link");return _(n)?(s(),o("div",F,"loading...")):_(a)?(s(),o("div",R,[t("span",q,g(_(a).claims.email),1),t("button",{class:"btn",onClick:h},"Logout")])):(s(),o("div",z,[r(y,{class:"btn",to:"/login"},{default:m(()=>[f("Login")]),_:1})]))}}});const M=i(H,[["__scopeId","data-v-6c08207b"]]),O=e=>(u("data-v-cf48b8cc"),e=e(),p(),e),Q={class:"nav"},T={class:"left"},j={key:0,class:"breadcrumb-container"},G=O(()=>t("span",{class:"divider"},">",-1)),J={class:"right"},K=b({__name:"Navbar",props:{breadcrumb:null},setup(e){return(c,a)=>(s(),o("nav",Q,[t("div",T,[r(E),e.breadcrumb?(s(),o("div",j,[(s(!0),o($,null,w(e.breadcrumb,(n,d)=>(s(),o("span",{key:d,class:"breadcrumb-item"},[r(_(N),{class:"breadcrumb-link",to:n.path},{default:m(()=>[f(g(n.label),1)]),_:2},1032,["to"]),G]))),128))])):L("",!0)]),t("div",J,[r(M)])]))}});const se=i(K,[["__scopeId","data-v-cf48b8cc"]]);export{se as N}; +//# sourceMappingURL=Navbar.dbea5082.js.map diff --git a/abstra_statics/dist/assets/Organization.8d378a9c.js b/abstra_statics/dist/assets/Organization.8d378a9c.js new file mode 100644 index 0000000000..a9b1c62626 --- /dev/null +++ b/abstra_statics/dist/assets/Organization.8d378a9c.js @@ -0,0 +1,2 @@ +import{S as m}from"./Sidebar.8babb822.js";import{N as d}from"./Navbar.dbea5082.js";import{E as p,F as l,G as u}from"./icons.9cfdae6d.js";import{d as f,K as _,b,c as g,e as t,z as r,x as v,F as y,J as z,a as w,q as I}from"./registerWidgets.89616af0.js";import{a as h}from"./asyncComputed.8ac91a75.js";import"./gateway.0deebb85.js";import{O}from"./organization.682269f4.js";import"./index.dae46ea1.js";import"./Tooltip.1f768a3e.js";import"./logo.084e5d7c.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="fed01c26-8f98-4c91-9f71-f5e17393a39e",e._sentryDebugIdIdentifier="sentry-dbid-fed01c26-8f98-4c91-9f71-f5e17393a39e")}catch{}})();const x={class:"organization"},k=f({__name:"Organization",setup(e){const n=z().params.organizationId,{result:a}=h(()=>O.get(n)),s=_(()=>a.value?[{label:a.value.name,path:`/organizations/${a.value.id}`}]:void 0),i=[{name:"Organization",items:[{name:"Projects",icon:p,path:"projects"},{name:"Members",icon:l,path:"members"},{name:"Billing",icon:u,path:"billing",unavailable:!0}]}];return(B,D)=>{const c=w("router-view");return b(),g(y,null,[t(d,{breadcrumb:r(s)},null,8,["breadcrumb"]),v("div",x,[t(m,{class:"sidebar",sections:r(i)},null,8,["sections"]),t(c)])],64)}}});const R=I(k,[["__scopeId","data-v-7eef90b7"]]);export{R as default}; +//# sourceMappingURL=Organization.8d378a9c.js.map diff --git a/abstra_statics/dist/assets/Organization.bebd813e.js b/abstra_statics/dist/assets/Organization.bebd813e.js deleted file mode 100644 index e3ccc8037c..0000000000 --- a/abstra_statics/dist/assets/Organization.bebd813e.js +++ /dev/null @@ -1,2 +0,0 @@ -import{S as d}from"./Sidebar.e123944a.js";import{N as m}from"./Navbar.41c99d51.js";import{E as p,F as l,G as u}from"./icons.11151937.js";import{d as b,K as _,b as f,c as g,e as t,z as r,x as v,F as y,J as z,a as w,q as I}from"./registerWidgets.ca6243ef.js";import{a as h}from"./asyncComputed.3cb2e10b.js";import"./gateway.fa3322de.js";import{O}from"./organization.007992e9.js";import"./index.a86d8064.js";import"./Tooltip.8c336607.js";import"./logo.084e5d7c.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="e49c77eb-ad65-4eb7-8464-a6f58a41d506",e._sentryDebugIdIdentifier="sentry-dbid-e49c77eb-ad65-4eb7-8464-a6f58a41d506")}catch{}})();const x={class:"organization"},k=b({__name:"Organization",setup(e){const n=z().params.organizationId,{result:o}=h(()=>O.get(n)),s=_(()=>o.value?[{label:o.value.name,path:`/organizations/${o.value.id}`}]:void 0),i=[{name:"Organization",items:[{name:"Projects",icon:p,path:"projects"},{name:"Members",icon:l,path:"members"},{name:"Billing",icon:u,path:"billing",unavailable:!0}]}];return(B,D)=>{const c=w("router-view");return f(),g(y,null,[t(m,{breadcrumb:r(s)},null,8,["breadcrumb"]),v("div",x,[t(d,{class:"sidebar",sections:r(i)},null,8,["sections"]),t(c)])],64)}}});const R=I(k,[["__scopeId","data-v-7eef90b7"]]);export{R as default}; -//# sourceMappingURL=Organization.bebd813e.js.map diff --git a/abstra_statics/dist/assets/OrganizationSettings.0d13a7d8.js b/abstra_statics/dist/assets/OrganizationSettings.0d13a7d8.js deleted file mode 100644 index 7e97e0426f..0000000000 --- a/abstra_statics/dist/assets/OrganizationSettings.0d13a7d8.js +++ /dev/null @@ -1,2 +0,0 @@ -import{q as t,b as s,c}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be060d3e-9951-4c1a-a3c0-26b76f81b00c",e._sentryDebugIdIdentifier="sentry-dbid-be060d3e-9951-4c1a-a3c0-26b76f81b00c")}catch{}})();const o={},r={class:"organization-settings"};function a(e,n){return s(),c("div",r,"Organization settings")}const f=t(o,[["render",a]]);export{f as default}; -//# sourceMappingURL=OrganizationSettings.0d13a7d8.js.map diff --git a/abstra_statics/dist/assets/OrganizationSettings.46e64732.js b/abstra_statics/dist/assets/OrganizationSettings.46e64732.js new file mode 100644 index 0000000000..33212cd2fb --- /dev/null +++ b/abstra_statics/dist/assets/OrganizationSettings.46e64732.js @@ -0,0 +1,2 @@ +import{q as t,b as s,c as a}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="999bd285-31a8-4aec-be31-6bf681f81eba",e._sentryDebugIdIdentifier="sentry-dbid-999bd285-31a8-4aec-be31-6bf681f81eba")}catch{}})();const o={},r={class:"organization-settings"};function i(e,n){return s(),a("div",r,"Organization settings")}const f=t(o,[["render",i]]);export{f as default}; +//# sourceMappingURL=OrganizationSettings.46e64732.js.map diff --git a/abstra_statics/dist/assets/Organizations.cd10673b.js b/abstra_statics/dist/assets/Organizations.86d96323.js similarity index 68% rename from abstra_statics/dist/assets/Organizations.cd10673b.js rename to abstra_statics/dist/assets/Organizations.86d96323.js index 6ff2b0f3cf..32d392d61c 100644 --- a/abstra_statics/dist/assets/Organizations.cd10673b.js +++ b/abstra_statics/dist/assets/Organizations.86d96323.js @@ -1,2 +1,2 @@ -import{d as y,K as z,b,c as O,e as c,x as w,z as d,F as k,H as h,q as x}from"./registerWidgets.ca6243ef.js";import{f as C,g as v}from"./icons.11151937.js";import{a as I}from"./asyncComputed.3cb2e10b.js";import"./gateway.fa3322de.js";import{O as l}from"./organization.007992e9.js";import"./index.a86d8064.js";import{C as N}from"./CrudView.bd13f7e1.js";import{N as D}from"./Navbar.41c99d51.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./activeRecord.11b7d185.js";import"./DropdownMenu.162e22a4.js";import"./Modal.2f8d0c91.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";import"./logo.084e5d7c.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="68127c86-9625-4200-99c0-f3064cd96cd6",n._sentryDebugIdIdentifier="sentry-dbid-68127c86-9625-4200-99c0-f3064cd96cd6")}catch{}})();const A={class:"organizations"},B=y({__name:"Organizations",setup(n){const o=[{key:"name",label:"Organization Name"}],i=h(),{loading:m,result:r,refetch:p}=I(()=>l.list()),s=({key:e})=>{i.push({name:"organization",params:{organizationId:e}})},u=async e=>{const t=await l.create(e.name);s({key:t.id})},g=async({key:e})=>{var t,a;confirm("Are you sure you want to delete this organization?")&&(await((a=(t=r.value)==null?void 0:t.find(_=>_.id===e))==null?void 0:a.delete()),p())},f=z(()=>{var e,t;return{columns:[{name:"Organization Name"},{name:"Path"},{name:"Organization Actions"}],rows:(t=(e=r.value)==null?void 0:e.map(a=>({key:a.id,cells:[{text:a.name,classes:["title","centered"],link:`/organizations/${encodeURIComponent(a.id)}`},{text:a.id},{text:"",classes:["centered"],actions:[{icon:C,label:"Delete",onClick:g,dangerous:!0},{icon:v,label:"Edit Organization",onClick:s}]}]})))!=null?t:[]}});return(e,t)=>(b(),O(k,null,[c(D),w("div",A,[c(N,{"entity-name":"organization",loading:d(m),title:"My organizations",description:"An organization is your company\u2019s account. Add co-workers, manage their access, organize projects and billing.","create-button-text":"Create Organization","empty-title":"No organizations here yet",table:d(f),fields:o,onCreate:u},null,8,["loading","table"])])],64))}});const Q=x(B,[["__scopeId","data-v-360ce05c"]]);export{Q as default}; -//# sourceMappingURL=Organizations.cd10673b.js.map +import{d as y,K as z,b,c as O,e as c,x as w,z as d,F as k,H as h,q as x}from"./registerWidgets.89616af0.js";import{f as C,g as v}from"./icons.9cfdae6d.js";import{a as I}from"./asyncComputed.8ac91a75.js";import"./gateway.0deebb85.js";import{O as l}from"./organization.682269f4.js";import"./index.dae46ea1.js";import{C as N}from"./CrudView.7ced9145.js";import{N as D}from"./Navbar.dbea5082.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./activeRecord.3d3c7835.js";import"./DropdownMenu.8f7fc9d3.js";import"./Modal.73e976a2.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";import"./logo.084e5d7c.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="0c41dc94-2b5d-4248-a9da-1b996f660f1c",n._sentryDebugIdIdentifier="sentry-dbid-0c41dc94-2b5d-4248-a9da-1b996f660f1c")}catch{}})();const A={class:"organizations"},B=y({__name:"Organizations",setup(n){const o=[{key:"name",label:"Organization Name"}],i=h(),{loading:m,result:r,refetch:p}=I(()=>l.list()),s=({key:e})=>{i.push({name:"organization",params:{organizationId:e}})},u=async e=>{const t=await l.create(e.name);s({key:t.id})},g=async({key:e})=>{var t,a;confirm("Are you sure you want to delete this organization?")&&(await((a=(t=r.value)==null?void 0:t.find(_=>_.id===e))==null?void 0:a.delete()),p())},f=z(()=>{var e,t;return{columns:[{name:"Organization Name"},{name:"Path"},{name:"Organization Actions"}],rows:(t=(e=r.value)==null?void 0:e.map(a=>({key:a.id,cells:[{text:a.name,classes:["title","centered"],link:`/organizations/${encodeURIComponent(a.id)}`},{text:a.id},{text:"",classes:["centered"],actions:[{icon:C,label:"Delete",onClick:g,dangerous:!0},{icon:v,label:"Edit Organization",onClick:s}]}]})))!=null?t:[]}});return(e,t)=>(b(),O(k,null,[c(D),w("div",A,[c(N,{"entity-name":"organization",loading:d(m),title:"My organizations",description:"An organization is your company\u2019s account. Add co-workers, manage their access, organize projects and billing.","create-button-text":"Create Organization","empty-title":"No organizations here yet",table:d(f),fields:o,onCreate:u},null,8,["loading","table"])])],64))}});const Q=x(B,[["__scopeId","data-v-360ce05c"]]);export{Q as default}; +//# sourceMappingURL=Organizations.86d96323.js.map diff --git a/abstra_statics/dist/assets/Passwordless.65114c07.js b/abstra_statics/dist/assets/Passwordless.ac83d40c.js similarity index 88% rename from abstra_statics/dist/assets/Passwordless.65114c07.js rename to abstra_statics/dist/assets/Passwordless.ac83d40c.js index 79b69a1705..2bb12d1c33 100644 --- a/abstra_statics/dist/assets/Passwordless.65114c07.js +++ b/abstra_statics/dist/assets/Passwordless.ac83d40c.js @@ -1,2 +1,2 @@ -import{L as S}from"./CircularLoading.5630a601.js";import{d as f,v,b as s,c as a,x as o,N as g,W as b,Z as w,af as I,D as h,O as T,Q as x,q as y,z as V,U as B,e as p}from"./registerWidgets.ca6243ef.js";import{u as C}from"./icons.11151937.js";import{p as k}from"./passwordlessManager.0ab78ba0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="06e2f3ce-4940-4570-a03f-9a8d813453b5",t._sentryDebugIdIdentifier="sentry-dbid-06e2f3ce-4940-4570-a03f-9a8d813453b5")}catch{}})();const $=t=>(T("data-v-1b435c3a"),t=t(),x(),t),D={class:"auth-info"},E={class:"auth-header"},K={class:"auth-label"},N=$(()=>o("div",{class:"description"},"To continue we need you to authenticate",-1)),P=["onKeyup"],R={key:0,class:"span-error"},U=$(()=>o("div",{class:"spacer"},null,-1)),L=f({__name:"AuthInfo",props:{invalid:{type:Boolean,default:!1},header:{type:String}},emits:["sendAuthInfo"],setup(t,{emit:n}){const e=v({email:""}),c=()=>{n("sendAuthInfo",e)};return(_,l)=>(s(),a("div",D,[o("div",E,[o("div",K,g(t.header),1),N]),b(o("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>e.email=u),type:"email",placeholder:"Email address",class:"input email-input",onKeyup:I(c,["enter"])},null,40,P),[[w,e.email]]),t.invalid?(s(),a("span",R," Email invalid, please try again. ")):h("",!0),U,o("button",{class:"next-button",onClick:c}," Send a verification email ")]))}});const M=y(L,[["__scopeId","data-v-1b435c3a"]]),A=t=>(T("data-v-9316d802"),t=t(),x(),t),q={class:"auth-token"},z={class:"auth-label"},O=["onKeyup"],Q={key:0,class:"span-error"},W={key:1,class:"span-error"},Z=A(()=>o("div",{class:"spacer"},null,-1)),j={class:"button-icon",viewBox:"0 0 24 24"},F=["d"],G=A(()=>o("div",{class:"footer"}," If you haven't received the verification code, try again or choose another email ",-1)),H=f({__name:"AuthToken",props:{expired:{type:Boolean},invalid:{type:Boolean},email:null},emits:["sendToken","restartAuth","resendToken"],setup(t,{emit:n}){const e=v({token:""}),c=()=>{n("restartAuth")},_=()=>{n("resendToken")},l=()=>{n("sendToken",e.token)};return(u,i)=>(s(),a("div",q,[o("div",z," Check "+g(t.email)+"'s inbox and enter your verification code below ",1),b(o("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>e.token=d),type:"text",placeholder:"Type your verification code",class:"input",onKeyup:I(l,["enter"])},null,40,O),[[w,e.token]]),t.expired?(s(),a("span",Q," Token expired, try to resend it. ")):h("",!0),t.invalid?(s(),a("span",W," Token invalid, please try again or go back and alter you email address. ")):h("",!0),Z,o("button",{class:"next-button",onClick:l},"Verify Email"),o("button",{class:"secondary-button back",onClick:c},[(s(),a("svg",j,[o("path",{d:V(C)},null,8,F)])),B(" Try Again ")]),o("button",{class:"secondary-button back",onClick:_}," Resend Email "),G]))}});const J=y(H,[["__scopeId","data-v-9316d802"]]),X={key:0,class:"form"},Y={class:"form-wrapper"},ee={class:"widget"},te={key:1,class:"form"},oe={class:"form-wrapper"},ne={class:"widget"},se={key:2,class:"form"},ae={class:"form-wrapper"},ie={class:"loading"},de=f({__name:"Passwordless",props:{header:{type:String,default:"Validate your email"}},emits:["done"],setup(t,{emit:n}){const e=v({stage:"collect-info",info:null,token:null,invalid:!1}),c=async i=>{e.info=i,e.stage="loading";const d=await k.authenticate(i.email);e.invalid=!!d,d?e.stage="collect-info":e.stage="collect-token"},_=async i=>{var d;if(!!((d=e.info)!=null&&d.email)){e.token=i,e.stage="loading";try{const r=await k.verify(e.info.email,e.token);if(!r)throw new Error("no user");n("done",r),e.stage="done"}catch{e.invalid=!0,e.stage="collect-token"}}},l=()=>{e.info&&c(e.info)},u=()=>{e.stage="collect-info",e.info=null,e.token=null,e.invalid=!1};return(i,d)=>{var r,m;return e.stage==="collect-info"?(s(),a("div",X,[o("div",Y,[o("div",ee,[p(M,{invalid:e.invalid,header:t.header,onSendAuthInfo:c},null,8,["invalid","header"])])])])):e.stage==="collect-token"?(s(),a("div",te,[o("div",oe,[o("div",ne,[p(J,{invalid:e.invalid,email:(m=(r=e.info)==null?void 0:r.email)!=null?m:"",onSendToken:_,onResendToken:l,onRestartAuth:u},null,8,["invalid","email"])])])])):(s(),a("div",se,[o("div",ae,[o("div",ie,[p(S)])])]))}}});const ue=y(de,[["__scopeId","data-v-c7662bee"]]);export{ue as P}; -//# sourceMappingURL=Passwordless.65114c07.js.map +import{L as S}from"./CircularLoading.0fb686c0.js";import{d as f,v,b as s,c as a,x as o,N as g,W as b,Z as w,af as I,D as h,O as T,Q as x,q as y,z as V,U as B,e as p}from"./registerWidgets.89616af0.js";import{u as C}from"./icons.9cfdae6d.js";import{p as k}from"./passwordlessManager.884221ca.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="326e8c4d-dd42-4275-b235-953f4c8a3a34",t._sentryDebugIdIdentifier="sentry-dbid-326e8c4d-dd42-4275-b235-953f4c8a3a34")}catch{}})();const $=t=>(T("data-v-1b435c3a"),t=t(),x(),t),D={class:"auth-info"},E={class:"auth-header"},K={class:"auth-label"},N=$(()=>o("div",{class:"description"},"To continue we need you to authenticate",-1)),P=["onKeyup"],R={key:0,class:"span-error"},U=$(()=>o("div",{class:"spacer"},null,-1)),L=f({__name:"AuthInfo",props:{invalid:{type:Boolean,default:!1},header:{type:String}},emits:["sendAuthInfo"],setup(t,{emit:n}){const e=v({email:""}),c=()=>{n("sendAuthInfo",e)};return(_,l)=>(s(),a("div",D,[o("div",E,[o("div",K,g(t.header),1),N]),b(o("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>e.email=u),type:"email",placeholder:"Email address",class:"input email-input",onKeyup:I(c,["enter"])},null,40,P),[[w,e.email]]),t.invalid?(s(),a("span",R," Email invalid, please try again. ")):h("",!0),U,o("button",{class:"next-button",onClick:c}," Send a verification email ")]))}});const M=y(L,[["__scopeId","data-v-1b435c3a"]]),A=t=>(T("data-v-9316d802"),t=t(),x(),t),q={class:"auth-token"},z={class:"auth-label"},O=["onKeyup"],Q={key:0,class:"span-error"},W={key:1,class:"span-error"},Z=A(()=>o("div",{class:"spacer"},null,-1)),j={class:"button-icon",viewBox:"0 0 24 24"},F=["d"],G=A(()=>o("div",{class:"footer"}," If you haven't received the verification code, try again or choose another email ",-1)),H=f({__name:"AuthToken",props:{expired:{type:Boolean},invalid:{type:Boolean},email:null},emits:["sendToken","restartAuth","resendToken"],setup(t,{emit:n}){const e=v({token:""}),c=()=>{n("restartAuth")},_=()=>{n("resendToken")},l=()=>{n("sendToken",e.token)};return(u,i)=>(s(),a("div",q,[o("div",z," Check "+g(t.email)+"'s inbox and enter your verification code below ",1),b(o("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>e.token=d),type:"text",placeholder:"Type your verification code",class:"input",onKeyup:I(l,["enter"])},null,40,O),[[w,e.token]]),t.expired?(s(),a("span",Q," Token expired, try to resend it. ")):h("",!0),t.invalid?(s(),a("span",W," Token invalid, please try again or go back and alter you email address. ")):h("",!0),Z,o("button",{class:"next-button",onClick:l},"Verify Email"),o("button",{class:"secondary-button back",onClick:c},[(s(),a("svg",j,[o("path",{d:V(C)},null,8,F)])),B(" Try Again ")]),o("button",{class:"secondary-button back",onClick:_}," Resend Email "),G]))}});const J=y(H,[["__scopeId","data-v-9316d802"]]),X={key:0,class:"form"},Y={class:"form-wrapper"},ee={class:"widget"},te={key:1,class:"form"},oe={class:"form-wrapper"},ne={class:"widget"},se={key:2,class:"form"},ae={class:"form-wrapper"},ie={class:"loading"},de=f({__name:"Passwordless",props:{header:{type:String,default:"Validate your email"}},emits:["done"],setup(t,{emit:n}){const e=v({stage:"collect-info",info:null,token:null,invalid:!1}),c=async i=>{e.info=i,e.stage="loading";const d=await k.authenticate(i.email);e.invalid=!!d,d?e.stage="collect-info":e.stage="collect-token"},_=async i=>{var d;if(!!((d=e.info)!=null&&d.email)){e.token=i,e.stage="loading";try{const r=await k.verify(e.info.email,e.token);if(!r)throw new Error("no user");n("done",r),e.stage="done"}catch{e.invalid=!0,e.stage="collect-token"}}},l=()=>{e.info&&c(e.info)},u=()=>{e.stage="collect-info",e.info=null,e.token=null,e.invalid=!1};return(i,d)=>{var r,m;return e.stage==="collect-info"?(s(),a("div",X,[o("div",Y,[o("div",ee,[p(M,{invalid:e.invalid,header:t.header,onSendAuthInfo:c},null,8,["invalid","header"])])])])):e.stage==="collect-token"?(s(),a("div",te,[o("div",oe,[o("div",ne,[p(J,{invalid:e.invalid,email:(m=(r=e.info)==null?void 0:r.email)!=null?m:"",onSendToken:_,onResendToken:l,onRestartAuth:u},null,8,["invalid","email"])])])])):(s(),a("div",se,[o("div",ae,[o("div",ie,[p(S)])])]))}}});const ue=y(de,[["__scopeId","data-v-c7662bee"]]);export{ue as P}; +//# sourceMappingURL=Passwordless.ac83d40c.js.map diff --git a/abstra_statics/dist/assets/Player.0779238b.js b/abstra_statics/dist/assets/Player.0779238b.js new file mode 100644 index 0000000000..ef1f941e35 --- /dev/null +++ b/abstra_statics/dist/assets/Player.0779238b.js @@ -0,0 +1,2 @@ +import{r as q}from"./index.d40cd19f.js";import{u as g}from"./uuid.d6201508.js";import{F as x,R as S}from"./broker.67106cf5.js";import{d as B,v as K,a2 as m,K as f,z as a,b as s,c as u,e as E,t as k,J as N,H as O,O as T,Q as F,x as d,q as L}from"./registerWidgets.89616af0.js";import{D as C,m as V}from"./DashPlayer.2457a054.js";import{a as j}from"./asyncComputed.8ac91a75.js";import{r as z,m as A}from"./runnerData.bd24d7de.js";import{L as H}from"./CircularLoading.0fb686c0.js";import"./passwordlessManager.884221ca.js";import"./pubsub.d7600aa1.js";import"./icons.9cfdae6d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js";import"./Passwordless.ac83d40c.js";import"./executeJs.dfd1b55f.js";import"./PlayerNavbar.2a5ed820.js";import"./WidgetsFrame.2b06573d.js";import"./colors.bc71fdf2.js";import"./Modal.73e976a2.js";import"./lottie.fc57e5ac.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="d273e71e-4372-49ec-9291-67b86b79c79c",r._sentryDebugIdIdentifier="sentry-dbid-d273e71e-4372-49ec-9291-67b86b79c79c")}catch{}})();async function J(r){const e=await fetch(`/_api/${r}`);if(e.status==404)return null;if(!e.ok)throw new Error(await e.text());const{form:n,dash:c}=await e.json();return{form:n&&z(n),dash:c&&A(c)}}const p=r=>(T("data-v-5d17475b"),r=r(),F(),r),Q={key:0,class:"loading"},$={key:1,class:"error"},G=p(()=>d("h1",null,"Oops! Something went wrong",-1)),M=p(()=>d("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),U=[G,M],W={key:2,class:"form"},X={key:3,class:"dash-wrapper"},Y={key:4,class:"error not-found"},Z=p(()=>d("h1",null,"Page not found",-1)),ee=p(()=>d("p",null,"The page you requested could not be found.",-1)),te=[Z,ee],re=B({__name:"Player",setup(r){const e=N(),n=O(),c=K({playerKey:g()});m(e,()=>I());const _=({path:t})=>{n.push({name:"player",query:e.query,params:{path:t.split("/")}})},y=async()=>{c.playerKey=g()};m([()=>e.path,()=>e.query],()=>y());const{loading:w,result:o,error:D,refetch:I}=j(()=>{var t;return J((t=e.path.slice(1))!=null?t:"")}),h=f(()=>l.value?S.create({formPath:l.value.path}):null),l=f(()=>{var t,i;return(i=(t=o.value)==null?void 0:t.form)!=null?i:null}),v=f(()=>{var i,b;if(!((i=o.value)!=null&&i.dash))return null;const t=V((b=o.value)==null?void 0:b.dash);return t.onRedirect(({url:P,queryParams:R})=>q(n,P,R)),t});return m(o,()=>{var t;!o.value||(o.value.form?document.title=(t=o.value.form.welcomeTitle)!=null?t:o.value.form.title:o.value.dash&&(document.title=o.value.dash.title))}),(t,i)=>a(w)?(s(),u("div",Q,[E(H)])):a(D)?(s(),u("div",$,U)):a(l)&&a(h)?(s(),u("div",W,[(s(),k(x,{key:c.playerKey,class:"player",form:a(l),params:a(e).query,broker:a(h),"enable-auto-focus":!0,onNavigate:_,onLogout:y},null,8,["form","params","broker"]))])):a(v)?(s(),u("div",X,[(s(),k(C,{key:c.playerKey,class:"player","is-preview":!1,params:a(e).query,"dash-player-service":a(v),onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),u("div",Y,te))}});const we=L(re,[["__scopeId","data-v-5d17475b"]]);export{we as default}; +//# sourceMappingURL=Player.0779238b.js.map diff --git a/abstra_statics/dist/assets/Player.daf19edf.js b/abstra_statics/dist/assets/Player.daf19edf.js deleted file mode 100644 index 0dacffb201..0000000000 --- a/abstra_statics/dist/assets/Player.daf19edf.js +++ /dev/null @@ -1,2 +0,0 @@ -import{r as q}from"./index.a2df0371.js";import{u as b}from"./uuid.f763745d.js";import{F as x,R as S}from"./broker.a62f2378.js";import{d as B,v as K,a2 as m,K as f,z as a,b as s,c as u,e as E,t as k,J as N,H as O,O as T,Q as F,x as l,q as L}from"./registerWidgets.ca6243ef.js";import{D as C,m as V}from"./DashPlayer.6a8897dd.js";import{a as j}from"./asyncComputed.3cb2e10b.js";import{r as z,m as A}from"./runnerData.170ae941.js";import{L as H}from"./CircularLoading.5630a601.js";import"./passwordlessManager.0ab78ba0.js";import"./pubsub.581c075e.js";import"./icons.11151937.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js";import"./Passwordless.65114c07.js";import"./executeJs.c3858a9c.js";import"./PlayerNavbar.e3146994.js";import"./WidgetsFrame.8af89817.js";import"./colors.4425ff79.js";import"./Modal.2f8d0c91.js";import"./lottie.9d24e472.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="2dc1a702-9511-45d9-9dbd-74c476840505",r._sentryDebugIdIdentifier="sentry-dbid-2dc1a702-9511-45d9-9dbd-74c476840505")}catch{}})();async function J(r){const e=await fetch(`/_api/${r}`);if(e.status==404)return null;if(!e.ok)throw new Error(await e.text());const{form:n,dash:c}=await e.json();return{form:n&&z(n),dash:c&&A(c)}}const p=r=>(T("data-v-5d17475b"),r=r(),F(),r),Q={key:0,class:"loading"},$={key:1,class:"error"},G=p(()=>l("h1",null,"Oops! Something went wrong",-1)),M=p(()=>l("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),U=[G,M],W={key:2,class:"form"},X={key:3,class:"dash-wrapper"},Y={key:4,class:"error not-found"},Z=p(()=>l("h1",null,"Page not found",-1)),ee=p(()=>l("p",null,"The page you requested could not be found.",-1)),te=[Z,ee],re=B({__name:"Player",setup(r){const e=N(),n=O(),c=K({playerKey:b()});m(e,()=>I());const _=({path:t})=>{n.push({name:"player",query:e.query,params:{path:t.split("/")}})},y=async()=>{c.playerKey=b()};m([()=>e.path,()=>e.query],()=>y());const{loading:w,result:o,error:D,refetch:I}=j(()=>{var t;return J((t=e.path.slice(1))!=null?t:"")}),h=f(()=>d.value?S.create({formPath:d.value.path}):null),d=f(()=>{var t,i;return(i=(t=o.value)==null?void 0:t.form)!=null?i:null}),v=f(()=>{var i,g;if(!((i=o.value)!=null&&i.dash))return null;const t=V((g=o.value)==null?void 0:g.dash);return t.onRedirect(({url:P,queryParams:R})=>q(n,P,R)),t});return m(o,()=>{var t;!o.value||(o.value.form?document.title=(t=o.value.form.welcomeTitle)!=null?t:o.value.form.title:o.value.dash&&(document.title=o.value.dash.title))}),(t,i)=>a(w)?(s(),u("div",Q,[E(H)])):a(D)?(s(),u("div",$,U)):a(d)&&a(h)?(s(),u("div",W,[(s(),k(x,{key:c.playerKey,class:"player",form:a(d),params:a(e).query,broker:a(h),"enable-auto-focus":!0,onNavigate:_,onLogout:y},null,8,["form","params","broker"]))])):a(v)?(s(),u("div",X,[(s(),k(C,{key:c.playerKey,class:"player","is-preview":!1,params:a(e).query,"dash-player-service":a(v),onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),u("div",Y,te))}});const we=L(re,[["__scopeId","data-v-5d17475b"]]);export{we as default}; -//# sourceMappingURL=Player.daf19edf.js.map diff --git a/abstra_statics/dist/assets/PlayerNavbar.e3146994.js b/abstra_statics/dist/assets/PlayerNavbar.2a5ed820.js similarity index 75% rename from abstra_statics/dist/assets/PlayerNavbar.e3146994.js rename to abstra_statics/dist/assets/PlayerNavbar.2a5ed820.js index dd45f3f1d1..528c7b611b 100644 --- a/abstra_statics/dist/assets/PlayerNavbar.e3146994.js +++ b/abstra_statics/dist/assets/PlayerNavbar.2a5ed820.js @@ -1,2 +1,2 @@ -import{m as k,l as S}from"./icons.11151937.js";import{d as h,K as v,b as s,c as n,x as l,F as p,L as R,z as i,G as m,N as f,q as _,v as I,D as d,e as N,I as w,t as x,O as C,Q as D}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3576eec6-3dc2-4712-96d3-3f8c87b8383a",e._sentryDebugIdIdentifier="sentry-dbid-3576eec6-3dc2-4712-96d3-3f8c87b8383a")}catch{}})();const $={class:"sidebar-content"},B={class:"section"},E=["onClick"],P=h({__name:"Sidebar",props:{currentRuntime:null,displaySidebar:{type:Boolean},forceResponsivity:null},emits:["selectRuntime","closeSidebar"],setup(e,{emit:r}){const o=e,u=v(()=>o.currentRuntime.runtimeType==="dash"),c=t=>{a(t.id)||r("selectRuntime",t)},b=v(()=>o.currentRuntime.sidebar.filter(t=>t.visible)),a=t=>t===o.currentRuntime.id;return(t,g)=>(s(),n("div",{class:m(["sidebar",e.forceResponsivity,{open:e.displaySidebar,dash:i(u)}])},[l("div",$,[l("div",B,[(s(!0),n(p,null,R(i(b),y=>(s(),n("div",{key:y.id,class:m(["item",{active:a(y.id)}]),onClick:Q=>c(y)},[l("div",{class:m(["item-title",{open:e.displaySidebar}])},f(y.name),3)],10,E))),128))])])],2))}});const U=_(P,[["__scopeId","data-v-09ca60c8"]]),T=e=>(C("data-v-a92d79dd"),e=e(),D(),e),V={class:"left-side"},z=["d"],F={key:1,class:"brand"},L=["src"],q={key:1,class:"brand-name"},G=T(()=>l("div",null,null,-1)),K={key:0,class:"signed-email"},O=h({__name:"PlayerNavbar",props:{runtime:null,brandName:null,userEmail:null,forceResponsivity:null},emits:["logout","navigate"],setup(e,{emit:r}){const o=e,u=I({displaySidebar:!1}),c=v(()=>{const a=o.runtime.sidebar;return!a||a.length==0?!1:a.some(t=>t.visible)}),b=a=>r("navigate",a);return(a,t)=>(s(),n(p,null,[i(c)||e.runtime.logoUrl||e.runtime.brandName||e.userEmail?(s(),n("div",{key:0,class:m(["navbar",(e.runtime.runtimeType=="dash"||i(c))&&"background"])},[l("div",V,[i(c)?(s(),n("svg",{key:0,class:m(["sidebar-menu-icon",e.forceResponsivity,{dash:e.runtime.runtimeType=="dash"}]),viewBox:"0 0 24 24",fill:"var(--color-main)",onClick:t[0]||(t[0]=g=>u.displaySidebar=!u.displaySidebar)},[l("path",{d:i(k)},null,8,z)],2)):d("",!0),e.runtime.logoUrl||e.runtime.brandName?(s(),n("div",F,[e.runtime.logoUrl?(s(),n("img",{key:0,src:e.runtime.logoUrl,class:"logo-image"},null,8,L)):d("",!0),e.runtime.brandName?(s(),n("p",q,f(e.runtime.brandName),1)):d("",!0)])):d("",!0)]),G,e.userEmail?(s(),n("div",K,[l("span",null,f(e.userEmail),1),N(w,{width:"20",height:"20",class:"logout",path:i(S),fill:"var(--color-main)",onClick:t[1]||(t[1]=g=>r("logout"))},null,8,["path"])])):d("",!0)],2)):d("",!0),i(c)?(s(),x(U,{key:1,"current-runtime":e.runtime,"display-sidebar":u.displaySidebar,"force-responsivity":e.forceResponsivity,onSelectRuntime:b},null,8,["current-runtime","display-sidebar","force-responsivity"])):d("",!0)],64))}});const H=_(O,[["__scopeId","data-v-a92d79dd"]]);export{H as P}; -//# sourceMappingURL=PlayerNavbar.e3146994.js.map +import{m as k,l as S}from"./icons.9cfdae6d.js";import{d as h,K as v,b as s,c as n,x as l,F as p,L as R,z as i,G as m,N as f,q as _,v as I,D as d,e as N,I as w,t as x,O as C,Q as D}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="16451f0e-2e75-4b65-978d-d7eca9e3bf74",e._sentryDebugIdIdentifier="sentry-dbid-16451f0e-2e75-4b65-978d-d7eca9e3bf74")}catch{}})();const $={class:"sidebar-content"},B={class:"section"},E=["onClick"],P=h({__name:"Sidebar",props:{currentRuntime:null,displaySidebar:{type:Boolean},forceResponsivity:null},emits:["selectRuntime","closeSidebar"],setup(e,{emit:r}){const o=e,u=v(()=>o.currentRuntime.runtimeType==="dash"),c=t=>{a(t.id)||r("selectRuntime",t)},y=v(()=>o.currentRuntime.sidebar.filter(t=>t.visible)),a=t=>t===o.currentRuntime.id;return(t,g)=>(s(),n("div",{class:m(["sidebar",e.forceResponsivity,{open:e.displaySidebar,dash:i(u)}])},[l("div",$,[l("div",B,[(s(!0),n(p,null,R(i(y),b=>(s(),n("div",{key:b.id,class:m(["item",{active:a(b.id)}]),onClick:Q=>c(b)},[l("div",{class:m(["item-title",{open:e.displaySidebar}])},f(b.name),3)],10,E))),128))])])],2))}});const U=_(P,[["__scopeId","data-v-09ca60c8"]]),T=e=>(C("data-v-a92d79dd"),e=e(),D(),e),V={class:"left-side"},z=["d"],F={key:1,class:"brand"},L=["src"],q={key:1,class:"brand-name"},G=T(()=>l("div",null,null,-1)),K={key:0,class:"signed-email"},O=h({__name:"PlayerNavbar",props:{runtime:null,brandName:null,userEmail:null,forceResponsivity:null},emits:["logout","navigate"],setup(e,{emit:r}){const o=e,u=I({displaySidebar:!1}),c=v(()=>{const a=o.runtime.sidebar;return!a||a.length==0?!1:a.some(t=>t.visible)}),y=a=>r("navigate",a);return(a,t)=>(s(),n(p,null,[i(c)||e.runtime.logoUrl||e.runtime.brandName||e.userEmail?(s(),n("div",{key:0,class:m(["navbar",(e.runtime.runtimeType=="dash"||i(c))&&"background"])},[l("div",V,[i(c)?(s(),n("svg",{key:0,class:m(["sidebar-menu-icon",e.forceResponsivity,{dash:e.runtime.runtimeType=="dash"}]),viewBox:"0 0 24 24",fill:"var(--color-main)",onClick:t[0]||(t[0]=g=>u.displaySidebar=!u.displaySidebar)},[l("path",{d:i(k)},null,8,z)],2)):d("",!0),e.runtime.logoUrl||e.runtime.brandName?(s(),n("div",F,[e.runtime.logoUrl?(s(),n("img",{key:0,src:e.runtime.logoUrl,class:"logo-image"},null,8,L)):d("",!0),e.runtime.brandName?(s(),n("p",q,f(e.runtime.brandName),1)):d("",!0)])):d("",!0)]),G,e.userEmail?(s(),n("div",K,[l("span",null,f(e.userEmail),1),N(w,{width:"20",height:"20",class:"logout",path:i(S),fill:"var(--color-main)",onClick:t[1]||(t[1]=g=>r("logout"))},null,8,["path"])])):d("",!0)],2)):d("",!0),i(c)?(s(),x(U,{key:1,"current-runtime":e.runtime,"display-sidebar":u.displaySidebar,"force-responsivity":e.forceResponsivity,onSelectRuntime:y},null,8,["current-runtime","display-sidebar","force-responsivity"])):d("",!0)],64))}});const H=_(O,[["__scopeId","data-v-a92d79dd"]]);export{H as P}; +//# sourceMappingURL=PlayerNavbar.2a5ed820.js.map diff --git a/abstra_statics/dist/assets/PreviewButton.4d9be351.js b/abstra_statics/dist/assets/PreviewButton.4d9be351.js new file mode 100644 index 0000000000..8d28d4b306 --- /dev/null +++ b/abstra_statics/dist/assets/PreviewButton.4d9be351.js @@ -0,0 +1,2 @@ +import{t as c}from"./icons.9cfdae6d.js";import{d,J as u,H as i,a as p,b as _,c as f,e as b,z as l,U as m,q as y}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="753b27fb-f5b5-4343-b3a0-65bf24ba776f",e._sentryDebugIdIdentifier="sentry-dbid-753b27fb-f5b5-4343-b3a0-65bf24ba776f")}catch{}})();const v=d({__name:"PreviewButton",props:{model:null},setup(e){const t=e,o=u(),s=i(),r=()=>{const n=o.query;s.push({path:`/_editor/${t.model.routeName}/${encodeURIComponent(t.model.path)}/preview`,query:n})};return(n,w)=>{const a=p("icon");return _(),f("button",{class:"preview-button",onClick:r},[b(a,{class:"icon",path:l(c),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),m(" Preview ")])}}});const I=y(v,[["__scopeId","data-v-4b4c109d"]]);export{I as P}; +//# sourceMappingURL=PreviewButton.4d9be351.js.map diff --git a/abstra_statics/dist/assets/PreviewButton.fc12f428.js b/abstra_statics/dist/assets/PreviewButton.fc12f428.js deleted file mode 100644 index aef5178b05..0000000000 --- a/abstra_statics/dist/assets/PreviewButton.fc12f428.js +++ /dev/null @@ -1,2 +0,0 @@ -import{t as c}from"./icons.11151937.js";import{d,J as u,H as i,a as p,b as _,c as l,e as f,z as b,U as m,q as y}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c20987d1-103c-48b1-ba76-9a6d724de954",e._sentryDebugIdIdentifier="sentry-dbid-c20987d1-103c-48b1-ba76-9a6d724de954")}catch{}})();const v=d({__name:"PreviewButton",props:{model:null},setup(e){const t=e,o=u(),s=i(),r=()=>{const n=o.query;s.push({path:`/_editor/${t.model.routeName}/${encodeURIComponent(t.model.path)}/preview`,query:n})};return(n,w)=>{const a=p("icon");return _(),l("button",{class:"preview-button",onClick:r},[f(a,{class:"icon",path:b(c),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),m(" Preview ")])}}});const I=y(v,[["__scopeId","data-v-4b4c109d"]]);export{I as P}; -//# sourceMappingURL=PreviewButton.fc12f428.js.map diff --git a/abstra_statics/dist/assets/Project.9a23c33c.js b/abstra_statics/dist/assets/Project.03df7c29.js similarity index 55% rename from abstra_statics/dist/assets/Project.9a23c33c.js rename to abstra_statics/dist/assets/Project.03df7c29.js index 4424b18f00..cb3f69213c 100644 --- a/abstra_statics/dist/assets/Project.9a23c33c.js +++ b/abstra_statics/dist/assets/Project.03df7c29.js @@ -1,2 +1,2 @@ -import{d as b,K as i,b as f,c as _,e as s,z as c,x as l,F as g,J as v,a as y,q as h}from"./registerWidgets.ca6243ef.js";import{a as p}from"./asyncComputed.3cb2e10b.js";import{P as I}from"./project.f2b2a33c.js";import"./gateway.fa3322de.js";import{O as j}from"./organization.007992e9.js";import"./index.a86d8064.js";import{N as z}from"./Navbar.41c99d51.js";import{S as w}from"./Sidebar.e123944a.js";import{H as P,I as k,D as x,J as B,K as D,L as $,E as C,F as E,G as N}from"./icons.11151937.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./passwordlessManager.0ab78ba0.js";import"./logo.084e5d7c.js";import"./Tooltip.8c336607.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="46b09fb8-5156-4fde-b6c6-63f23a7c5f7b",a._sentryDebugIdIdentifier="sentry-dbid-46b09fb8-5156-4fde-b6c6-63f23a7c5f7b")}catch{}})();const S={class:"project"},F={class:"content-wrapper"},K=b({__name:"Project",setup(a){const r=v().params.projectId,{result:e}=p(()=>I.get(r)),{result:t}=p(()=>e.value?j.get(e.value.organizationId):Promise.resolve(null)),m=i(()=>{var n;return t.value&&e.value?[{label:(n=t.value)==null?void 0:n.name,path:`/organizations/${t.value.id}`},{label:e.value.name,path:`/projects/${e.value.id}`}]:void 0}),d=i(()=>e.value?[{name:"Project",items:[{name:"Builds",path:"builds",icon:P},{name:"Connectors",path:"connectors",icon:k},{name:"API Keys",path:"api-keys",icon:x},{name:"Env Vars",path:"env-vars",icon:B},{name:"Logs",icon:D,path:"logs",beta:!0},{name:"Settings",icon:$,path:"settings"}]},{name:"Organization",items:[{name:"Projects",icon:C,path:`/organizations/${e.value.organizationId}/projects`},{name:"Members",icon:E,path:`/organizations/${e.value.organizationId}/members`},{name:"Billing",icon:N,path:`/organizations/${e.value.organizationId}/billing`,unavailable:!0}]}]:[]);return(n,L)=>{const u=y("router-view");return f(),_(g,null,[s(z,{class:"nav",breadcrumb:c(m)},null,8,["breadcrumb"]),l("div",S,[s(w,{class:"sidebar",sections:c(d)},null,8,["sections"]),l("div",F,[s(u)])])],64)}}});const Y=h(K,[["__scopeId","data-v-f3927501"]]);export{Y as default}; -//# sourceMappingURL=Project.9a23c33c.js.map +import{d as b,K as i,b as _,c as g,e as s,z as c,x as l,F as v,J as f,a as y,q as h}from"./registerWidgets.89616af0.js";import{a as p}from"./asyncComputed.8ac91a75.js";import{P as I}from"./project.a27ed749.js";import"./gateway.0deebb85.js";import{O as j}from"./organization.682269f4.js";import"./index.dae46ea1.js";import{N as z}from"./Navbar.dbea5082.js";import{S as w}from"./Sidebar.8babb822.js";import{H as P,I as k,D as x,J as B,K as D,L as $,E as C,F as E,G as N}from"./icons.9cfdae6d.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./passwordlessManager.884221ca.js";import"./logo.084e5d7c.js";import"./Tooltip.1f768a3e.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="4e7b6df3-c1a7-40e2-a266-dc17cb43b26b",a._sentryDebugIdIdentifier="sentry-dbid-4e7b6df3-c1a7-40e2-a266-dc17cb43b26b")}catch{}})();const S={class:"project"},F={class:"content-wrapper"},K=b({__name:"Project",setup(a){const r=f().params.projectId,{result:e}=p(()=>I.get(r)),{result:t}=p(()=>e.value?j.get(e.value.organizationId):Promise.resolve(null)),m=i(()=>{var n;return t.value&&e.value?[{label:(n=t.value)==null?void 0:n.name,path:`/organizations/${t.value.id}`},{label:e.value.name,path:`/projects/${e.value.id}`}]:void 0}),d=i(()=>e.value?[{name:"Project",items:[{name:"Builds",path:"builds",icon:P},{name:"Connectors",path:"connectors",icon:k},{name:"API Keys",path:"api-keys",icon:x},{name:"Env Vars",path:"env-vars",icon:B},{name:"Logs",icon:D,path:"logs",beta:!0},{name:"Settings",icon:$,path:"settings"}]},{name:"Organization",items:[{name:"Projects",icon:C,path:`/organizations/${e.value.organizationId}/projects`},{name:"Members",icon:E,path:`/organizations/${e.value.organizationId}/members`},{name:"Billing",icon:N,path:`/organizations/${e.value.organizationId}/billing`,unavailable:!0}]}]:[]);return(n,L)=>{const u=y("router-view");return _(),g(v,null,[s(z,{class:"nav",breadcrumb:c(m)},null,8,["breadcrumb"]),l("div",S,[s(w,{class:"sidebar",sections:c(d)},null,8,["sections"]),l("div",F,[s(u)])])],64)}}});const Y=h(K,[["__scopeId","data-v-f3927501"]]);export{Y as default}; +//# sourceMappingURL=Project.03df7c29.js.map diff --git a/abstra_statics/dist/assets/ProjectSettings.9fb2e75f.js b/abstra_statics/dist/assets/ProjectSettings.007fec14.js similarity index 82% rename from abstra_statics/dist/assets/ProjectSettings.9fb2e75f.js rename to abstra_statics/dist/assets/ProjectSettings.007fec14.js index 66d3729fb2..444642399c 100644 --- a/abstra_statics/dist/assets/ProjectSettings.9fb2e75f.js +++ b/abstra_statics/dist/assets/ProjectSettings.007fec14.js @@ -1,2 +1,2 @@ -import{a as S}from"./asyncComputed.3cb2e10b.js";import{P as I}from"./project.f2b2a33c.js";import"./gateway.fa3322de.js";import{d as f,v as C,b as n,c,x as t,e as l,z as r,U as a,N as p,D as _,t as x,a as D,O as v,Q as g,q as y,J as E}from"./registerWidgets.ca6243ef.js";import"./index.a86d8064.js";import{s as P}from"./index.a2df0371.js";import{L as N}from"./CircularLoading.5630a601.js";import{N as B,e as A,O as V}from"./icons.11151937.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./passwordlessManager.0ab78ba0.js";import"./lottie.9d24e472.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="6f830ac3-30d1-4975-932a-4db4634d266d",s._sentryDebugIdIdentifier="sentry-dbid-6f830ac3-30d1-4975-932a-4db4634d266d")}catch{}})();const i=s=>(v("data-v-263381f5"),s=s(),g(),s),$={class:"subdomain-editor"},H={class:"title"},L=i(()=>t("div",{class:"subtitle"}," Every project in Abstra Cloud comes with a default subdomain, which will appear on all shared project links. ",-1)),O={key:0,class:"subdomain-presenter"},T={class:"link-item"},z=i(()=>t("div",{class:"link-title"},"Forms and Dashes available at:",-1)),R={class:"link"},U={class:"custom-subdomain"},q={class:"link-item"},F=i(()=>t("div",{class:"link-title"},"Hooks available at:",-1)),J={class:"link"},M={class:"custom-subdomain"},Q={key:1,class:"subdomain-value-editor"},G={class:"subdomain-change-warning"},K={class:"section-title"},W=i(()=>t("div",{class:"section-body"}," Changing the project's subdomain will result in the replacement of the previous URL, which may break any links you've shared previously. ",-1)),X={class:"input-section"},Y={class:"subdomain-value-input"},Z=i(()=>t("span",null,"https://",-1)),tt=["value"],et=i(()=>t("span",null,".abstra.app",-1)),st={key:0,class:"error"},ot={class:"option-buttons"},at=f({__name:"SubdomainEditor",props:{project:null},setup(s){const o=s,e=C({name:o.project.subdomain,error:"",editing:!1,loading:!1}),d=()=>e.editing=!0,m=()=>{k(),e.editing=!1,e.error=""},h=async()=>{e.error="",e.loading=!0,await j(),e.error||(e.editing=!1),e.loading=!1},j=async()=>{if(!(!o.project||o.project.subdomain===e.name)){if(!e.name){e.error="Subdomain cannot be empty";return}o.project.subdomain=e.name,await o.project.save()}},k=()=>e.name=o.project.subdomain,w=b=>{e.name=P(b.target.value,{replacement:"-",lower:!0,strict:!0})};return(b,lt)=>{const u=D("icon");return n(),c("div",$,[t("h2",H,[l(u,{width:"22",height:"22",path:r(B),fill:"#414A58"},null,8,["path"]),a("Subdomain ")]),L,e.editing?(n(),c("div",Q,[t("div",G,[t("div",K,[l(u,{path:r(A),width:"12",height:"12",fill:"#D35249"},null,8,["path"]),a(" Be careful ")]),W]),t("div",X,[t("div",Y,[Z,t("input",{value:e.name,type:"text",onInput:w},null,40,tt),et]),e.error?(n(),c("div",st,[l(u,{path:r(V),fill:"#D35249",width:"12",height:"12"},null,8,["path"]),a(" "+p(e.error),1)])):_("",!0),t("div",ot,[t("button",{class:"cancel-button",onClick:m},"Cancel"),t("button",{class:"save-button",onClick:h},[a(" Save Changes "),e.loading?(n(),x(N,{key:0,size:"16"})):_("",!0)])])])])):(n(),c("div",O,[t("div",T,[z,t("div",R,[a(" https://"),t("span",U,p(s.project.subdomain),1),a(".abstra.app/[PATH] ")])]),t("div",q,[F,t("div",J,[a(" https://"),t("span",M,p(s.project.subdomain),1),a(".abstra.app/_hooks/[PATH] ")])]),t("button",{onClick:d},"Edit Subdomain")]))])}}});const nt=y(at,[["__scopeId","data-v-263381f5"]]),it=s=>(v("data-v-0990f6ef"),s=s(),g(),s),ct={key:0,class:"project-settings"},rt=it(()=>t("div",{class:"header"},[t("div",{class:"title-wrapper"},[t("h1",null,"Project Settings")])],-1)),dt=f({__name:"ProjectSettings",setup(s){const e=E().params.projectId,{result:d}=S(()=>I.get(e));return(m,h)=>r(d)?(n(),c("div",ct,[rt,l(nt,{project:r(d)},null,8,["project"])])):_("",!0)}});const wt=y(dt,[["__scopeId","data-v-0990f6ef"]]);export{wt as default}; -//# sourceMappingURL=ProjectSettings.9fb2e75f.js.map +import{a as S}from"./asyncComputed.8ac91a75.js";import{P as I}from"./project.a27ed749.js";import"./gateway.0deebb85.js";import{d as f,v as C,b as n,c,x as t,e as l,z as r,U as a,N as p,D as _,t as x,a as D,O as v,Q as g,q as y,J as E}from"./registerWidgets.89616af0.js";import"./index.dae46ea1.js";import{s as P}from"./index.d40cd19f.js";import{L as N}from"./CircularLoading.0fb686c0.js";import{N as B,e as A,O as V}from"./icons.9cfdae6d.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./passwordlessManager.884221ca.js";import"./lottie.fc57e5ac.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="617444a3-955c-4988-af3f-ac234b0bb65f",s._sentryDebugIdIdentifier="sentry-dbid-617444a3-955c-4988-af3f-ac234b0bb65f")}catch{}})();const i=s=>(v("data-v-263381f5"),s=s(),g(),s),$={class:"subdomain-editor"},H={class:"title"},L=i(()=>t("div",{class:"subtitle"}," Every project in Abstra Cloud comes with a default subdomain, which will appear on all shared project links. ",-1)),O={key:0,class:"subdomain-presenter"},T={class:"link-item"},z=i(()=>t("div",{class:"link-title"},"Forms and Dashes available at:",-1)),R={class:"link"},U={class:"custom-subdomain"},q={class:"link-item"},F=i(()=>t("div",{class:"link-title"},"Hooks available at:",-1)),J={class:"link"},M={class:"custom-subdomain"},Q={key:1,class:"subdomain-value-editor"},G={class:"subdomain-change-warning"},K={class:"section-title"},W=i(()=>t("div",{class:"section-body"}," Changing the project's subdomain will result in the replacement of the previous URL, which may break any links you've shared previously. ",-1)),X={class:"input-section"},Y={class:"subdomain-value-input"},Z=i(()=>t("span",null,"https://",-1)),tt=["value"],et=i(()=>t("span",null,".abstra.app",-1)),st={key:0,class:"error"},ot={class:"option-buttons"},at=f({__name:"SubdomainEditor",props:{project:null},setup(s){const o=s,e=C({name:o.project.subdomain,error:"",editing:!1,loading:!1}),d=()=>e.editing=!0,m=()=>{k(),e.editing=!1,e.error=""},h=async()=>{e.error="",e.loading=!0,await j(),e.error||(e.editing=!1),e.loading=!1},j=async()=>{if(!(!o.project||o.project.subdomain===e.name)){if(!e.name){e.error="Subdomain cannot be empty";return}o.project.subdomain=e.name,await o.project.save()}},k=()=>e.name=o.project.subdomain,w=b=>{e.name=P(b.target.value,{replacement:"-",lower:!0,strict:!0})};return(b,lt)=>{const u=D("icon");return n(),c("div",$,[t("h2",H,[l(u,{width:"22",height:"22",path:r(B),fill:"#414A58"},null,8,["path"]),a("Subdomain ")]),L,e.editing?(n(),c("div",Q,[t("div",G,[t("div",K,[l(u,{path:r(A),width:"12",height:"12",fill:"#D35249"},null,8,["path"]),a(" Be careful ")]),W]),t("div",X,[t("div",Y,[Z,t("input",{value:e.name,type:"text",onInput:w},null,40,tt),et]),e.error?(n(),c("div",st,[l(u,{path:r(V),fill:"#D35249",width:"12",height:"12"},null,8,["path"]),a(" "+p(e.error),1)])):_("",!0),t("div",ot,[t("button",{class:"cancel-button",onClick:m},"Cancel"),t("button",{class:"save-button",onClick:h},[a(" Save Changes "),e.loading?(n(),x(N,{key:0,size:"16"})):_("",!0)])])])])):(n(),c("div",O,[t("div",T,[z,t("div",R,[a(" https://"),t("span",U,p(s.project.subdomain),1),a(".abstra.app/[PATH] ")])]),t("div",q,[F,t("div",J,[a(" https://"),t("span",M,p(s.project.subdomain),1),a(".abstra.app/_hooks/[PATH] ")])]),t("button",{onClick:d},"Edit Subdomain")]))])}}});const nt=y(at,[["__scopeId","data-v-263381f5"]]),it=s=>(v("data-v-0990f6ef"),s=s(),g(),s),ct={key:0,class:"project-settings"},rt=it(()=>t("div",{class:"header"},[t("div",{class:"title-wrapper"},[t("h1",null,"Project Settings")])],-1)),dt=f({__name:"ProjectSettings",setup(s){const e=E().params.projectId,{result:d}=S(()=>I.get(e));return(m,h)=>r(d)?(n(),c("div",ct,[rt,l(nt,{project:r(d)},null,8,["project"])])):_("",!0)}});const wt=y(dt,[["__scopeId","data-v-0990f6ef"]]);export{wt as default}; +//# sourceMappingURL=ProjectSettings.007fec14.js.map diff --git a/abstra_statics/dist/assets/Projects.ad9a8254.js b/abstra_statics/dist/assets/Projects.51ccea2f.js similarity index 65% rename from abstra_statics/dist/assets/Projects.ad9a8254.js rename to abstra_statics/dist/assets/Projects.51ccea2f.js index 48a15d493a..e712dcb1be 100644 --- a/abstra_statics/dist/assets/Projects.ad9a8254.js +++ b/abstra_statics/dist/assets/Projects.51ccea2f.js @@ -1,2 +1,2 @@ -import{d as j,K as P,z as s,b as w,t as _,D as k,J as C,H as I}from"./registerWidgets.ca6243ef.js";import{f as h,g as x}from"./icons.11151937.js";import{a as z}from"./asyncComputed.3cb2e10b.js";import{P as d}from"./project.f2b2a33c.js";import"./gateway.fa3322de.js";import{O as D}from"./organization.007992e9.js";import"./index.a86d8064.js";import{C as N}from"./CrudView.bd13f7e1.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./passwordlessManager.0ab78ba0.js";import"./DropdownMenu.162e22a4.js";import"./Modal.2f8d0c91.js";import"./LoadingIndicator.a271d3bb.js";import"./lottie.9d24e472.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="a7ca3f33-a881-4b92-84fb-fdb059f18e03",a._sentryDebugIdIdentifier="sentry-dbid-a7ca3f33-a881-4b92-84fb-fdb059f18e03")}catch{}})();const F=j({__name:"Projects",setup(a){const r=[{key:"name",label:"Project Name"}],i=C().params.organizationId,m=I(),{loading:p,result:n,refetch:u}=z(()=>Promise.all([d.list(i),D.get(i)]).then(([e,t])=>({projects:e,organization:t}))),c=({key:e})=>m.push({name:"project",params:{projectId:e}}),f=async e=>{const t=await d.create({organizationId:i,name:e.name});c({key:t.id})},b=async({key:e})=>{var t,o;confirm("Are you sure you want to delete this project?")&&(await((o=(t=n.value)==null?void 0:t.projects.find(g=>g.id===e))==null?void 0:o.delete()),u())},y=P(()=>{var e,t;return{columns:[{name:"Id"},{name:"Project Name"},{name:"Project Actions"}],rows:(t=(e=n.value)==null?void 0:e.projects.map(o=>({key:o.id,cells:[{text:o.id.slice(0,8),classes:["centered"]},{text:o.name,classes:["title"],link:`/projects/${encodeURIComponent(o.id)}`},{text:"",classes:["centered"],actions:[{icon:h,label:"Delete",onClick:b,dangerous:!0},{icon:x,label:"Edit Project",onClick:c}]}]})))!=null?t:[]}});return(e,t)=>s(n)?(w(),_(N,{key:0,"entity-name":"project",loading:s(p),title:`${s(n).organization.name}'s Projects`,description:"Organize your team's work into different Projects, each with it's own subdomain.","create-button-text":"Create Project","empty-title":"No projects here yet",table:s(y),fields:r,onCreate:f},null,8,["loading","title","table"])):k("",!0)}});export{F as default}; -//# sourceMappingURL=Projects.ad9a8254.js.map +import{d as j,K as P,z as s,b as w,t as _,D as k,J as C,H as I}from"./registerWidgets.89616af0.js";import{f as h,g as x}from"./icons.9cfdae6d.js";import{a as z}from"./asyncComputed.8ac91a75.js";import{P as d}from"./project.a27ed749.js";import"./gateway.0deebb85.js";import{O as D}from"./organization.682269f4.js";import"./index.dae46ea1.js";import{C as N}from"./CrudView.7ced9145.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./passwordlessManager.884221ca.js";import"./DropdownMenu.8f7fc9d3.js";import"./Modal.73e976a2.js";import"./LoadingIndicator.10cfcfe7.js";import"./lottie.fc57e5ac.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="a9851231-1029-459a-b53b-7b58ac6301fc",a._sentryDebugIdIdentifier="sentry-dbid-a9851231-1029-459a-b53b-7b58ac6301fc")}catch{}})();const F=j({__name:"Projects",setup(a){const r=[{key:"name",label:"Project Name"}],i=C().params.organizationId,m=I(),{loading:p,result:n,refetch:u}=z(()=>Promise.all([d.list(i),D.get(i)]).then(([e,t])=>({projects:e,organization:t}))),c=({key:e})=>m.push({name:"project",params:{projectId:e}}),f=async e=>{const t=await d.create({organizationId:i,name:e.name});c({key:t.id})},b=async({key:e})=>{var t,o;confirm("Are you sure you want to delete this project?")&&(await((o=(t=n.value)==null?void 0:t.projects.find(g=>g.id===e))==null?void 0:o.delete()),u())},y=P(()=>{var e,t;return{columns:[{name:"Id"},{name:"Project Name"},{name:"Project Actions"}],rows:(t=(e=n.value)==null?void 0:e.projects.map(o=>({key:o.id,cells:[{text:o.id.slice(0,8),classes:["centered"]},{text:o.name,classes:["title"],link:`/projects/${encodeURIComponent(o.id)}`},{text:"",classes:["centered"],actions:[{icon:h,label:"Delete",onClick:b,dangerous:!0},{icon:x,label:"Edit Project",onClick:c}]}]})))!=null?t:[]}});return(e,t)=>s(n)?(w(),_(N,{key:0,"entity-name":"project",loading:s(p),title:`${s(n).organization.name}'s Projects`,description:"Organize your team's work into different Projects, each with it's own subdomain.","create-button-text":"Create Project","empty-title":"No projects here yet",table:s(y),fields:r,onCreate:f},null,8,["loading","title","table"])):k("",!0)}});export{F as default}; +//# sourceMappingURL=Projects.51ccea2f.js.map diff --git a/abstra_statics/dist/assets/RuntimeList.1bf51451.js b/abstra_statics/dist/assets/RuntimeList.097a29c4.js similarity index 66% rename from abstra_statics/dist/assets/RuntimeList.1bf51451.js rename to abstra_statics/dist/assets/RuntimeList.097a29c4.js index 989b710a07..cbd281e7ca 100644 --- a/abstra_statics/dist/assets/RuntimeList.1bf51451.js +++ b/abstra_statics/dist/assets/RuntimeList.097a29c4.js @@ -1,2 +1,2 @@ -import{D as b,_ as g}from"./DropdownMenu.162e22a4.js";import{L as w}from"./CircularLoading.5630a601.js";import{d as x,b as t,t as d,c as n,x as s,N as o,B as I,F as u,L as m,D as B,a as D,G as _,w as C,U as L,O as S,Q as T,q as N}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="256c0745-7ee4-4c8d-97e4-50c7a80e4518",e._sentryDebugIdIdentifier="sentry-dbid-256c0745-7ee4-4c8d-97e4-50c7a80e4518")}catch{}})();const h=e=>(S("data-v-a0aa59f6"),e=e(),T(),e),R={key:1,class:"runtimes-container"},U={class:"header"},V={class:"title-wrapper"},E={class:"description"},F={key:0,class:"empty-list"},j=h(()=>s("img",{src:g},null,-1)),q={class:"empty-list-title"},z={class:"empty-list-description"},A={key:1},G={key:2},M={key:2,class:"video-section"},O=h(()=>s("h1",null,"See it in action",-1)),Q=["src"],$=x({__name:"RuntimeList",props:{loading:{type:Boolean},title:null,description:null,createButtonText:null,emptyTitle:null,videoUrl:null,table:null},emits:["create"],setup(e,{emit:l}){async function c(){l("create")}return(f,H)=>{const k=D("router-link");return e.loading?(t(),d(w,{key:0,class:"loading-wrapper",justify:"center"})):(t(),n("div",R,[s("div",U,[s("div",V,[s("h1",null,o(e.title),1),s("p",E,o(e.description),1),s("button",{onClick:c},o(e.createButtonText),1)])]),e.table.rows.length===0?(t(),n("div",F,[j,s("div",q,o(e.emptyTitle),1),s("div",z,[I(f.$slots,"empty-description",{},void 0,!0)]),s("button",{onClick:c},o(e.createButtonText),1)])):(t(),n("table",A,[s("thead",null,[(t(!0),n(u,null,m(e.table.columns,(i,r)=>(t(),n("td",{key:r,class:"cell"},o(i.name),1))),128))]),(t(!0),n(u,null,m(e.table.rows,(i,r)=>{var y;return t(),n("tr",{key:r,class:_((y=i.classes)!=null?y:[])},[(t(!0),n(u,null,m(i.cells,(a,v)=>{var p;return t(),n("td",{key:v,class:_((p=a.classes)!=null?p:[])},[a.actions?(t(),d(b,{key:0,title:"Actions","highlight-last":!0,options:a.actions,payload:{key:i.key}},null,8,["options","payload"])):a.link?(t(),d(k,{key:1,to:a.link,class:"runtime-title"},{default:C(()=>[L(o(a.text),1)]),_:2},1032,["to"])):(t(),n("div",G,o(a.text),1))],2)}),128))],2)}),128))])),e.videoUrl?(t(),n("section",M,[O,s("iframe",{class:"runtimes-example-video",src:e.videoUrl,title:"runtimes example",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,Q)])):B("",!0)]))}}});const W=N($,[["__scopeId","data-v-a0aa59f6"]]);export{W as R}; -//# sourceMappingURL=RuntimeList.1bf51451.js.map +import{D as v,_ as g}from"./DropdownMenu.8f7fc9d3.js";import{L as w}from"./CircularLoading.0fb686c0.js";import{d as x,b as t,t as d,c as n,x as s,N as o,B as I,F as u,L as m,D as B,a as D,G as _,w as C,U as L,O as S,Q as T,q as N}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="f194208e-b848-4a26-9bd2-533dd17c5d9c",e._sentryDebugIdIdentifier="sentry-dbid-f194208e-b848-4a26-9bd2-533dd17c5d9c")}catch{}})();const f=e=>(S("data-v-a0aa59f6"),e=e(),T(),e),R={key:1,class:"runtimes-container"},U={class:"header"},V={class:"title-wrapper"},E={class:"description"},F={key:0,class:"empty-list"},j=f(()=>s("img",{src:g},null,-1)),q={class:"empty-list-title"},z={class:"empty-list-description"},A={key:1},G={key:2},M={key:2,class:"video-section"},O=f(()=>s("h1",null,"See it in action",-1)),Q=["src"],$=x({__name:"RuntimeList",props:{loading:{type:Boolean},title:null,description:null,createButtonText:null,emptyTitle:null,videoUrl:null,table:null},emits:["create"],setup(e,{emit:l}){async function c(){l("create")}return(h,H)=>{const k=D("router-link");return e.loading?(t(),d(w,{key:0,class:"loading-wrapper",justify:"center"})):(t(),n("div",R,[s("div",U,[s("div",V,[s("h1",null,o(e.title),1),s("p",E,o(e.description),1),s("button",{onClick:c},o(e.createButtonText),1)])]),e.table.rows.length===0?(t(),n("div",F,[j,s("div",q,o(e.emptyTitle),1),s("div",z,[I(h.$slots,"empty-description",{},void 0,!0)]),s("button",{onClick:c},o(e.createButtonText),1)])):(t(),n("table",A,[s("thead",null,[(t(!0),n(u,null,m(e.table.columns,(i,r)=>(t(),n("td",{key:r,class:"cell"},o(i.name),1))),128))]),(t(!0),n(u,null,m(e.table.rows,(i,r)=>{var y;return t(),n("tr",{key:r,class:_((y=i.classes)!=null?y:[])},[(t(!0),n(u,null,m(i.cells,(a,b)=>{var p;return t(),n("td",{key:b,class:_((p=a.classes)!=null?p:[])},[a.actions?(t(),d(v,{key:0,title:"Actions","highlight-last":!0,options:a.actions,payload:{key:i.key}},null,8,["options","payload"])):a.link?(t(),d(k,{key:1,to:a.link,class:"runtime-title"},{default:C(()=>[L(o(a.text),1)]),_:2},1032,["to"])):(t(),n("div",G,o(a.text),1))],2)}),128))],2)}),128))])),e.videoUrl?(t(),n("section",M,[O,s("iframe",{class:"runtimes-example-video",src:e.videoUrl,title:"runtimes example",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,Q)])):B("",!0)]))}}});const W=N($,[["__scopeId","data-v-a0aa59f6"]]);export{W as R}; +//# sourceMappingURL=RuntimeList.097a29c4.js.map diff --git a/abstra_statics/dist/assets/SaveButton.c0a67dea.js b/abstra_statics/dist/assets/SaveButton.c0a67dea.js new file mode 100644 index 0000000000..82678eb12c --- /dev/null +++ b/abstra_statics/dist/assets/SaveButton.c0a67dea.js @@ -0,0 +1,2 @@ +import{s as f}from"./icons.9cfdae6d.js";import{d as c,r as i,b as u,c as v,e as p,z as y,U as _,N as m,G as g,a as h,q as b}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="32a1cfdd-a23c-4243-8580-0a2a9d2993f4",e._sentryDebugIdIdentifier="sentry-dbid-32a1cfdd-a23c-4243-8580-0a2a9d2993f4")}catch{}})();const w=c({__name:"SaveButton",props:{model:null},setup(e){const n=e,t=i(!1);async function s(){t.value=!0;try{await n.model.save()}finally{t.value=!1}}return addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="s"&&(a.preventDefault(),s())}),addEventListener("beforeunload",a=>{n.model.hasChanges()&&(a.preventDefault(),a.returnValue="")}),(a,o)=>{var d,l;const r=h("icon");return u(),v("button",{class:g(["save-button",{changes:(d=e.model)==null?void 0:d.hasChanges()}]),onClick:o[0]||(o[0]=S=>s())},[p(r,{class:"icon",path:y(f),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),_(" "+m(t.value?"Saving ...":(l=e.model)!=null&&l.hasChanges()?"Save":"Saved"),1)],2)}}});const k=b(w,[["__scopeId","data-v-15752ff4"]]);export{k as S}; +//# sourceMappingURL=SaveButton.c0a67dea.js.map diff --git a/abstra_statics/dist/assets/SaveButton.e379ab16.js b/abstra_statics/dist/assets/SaveButton.e379ab16.js deleted file mode 100644 index ff0545169a..0000000000 --- a/abstra_statics/dist/assets/SaveButton.e379ab16.js +++ /dev/null @@ -1,2 +0,0 @@ -import{s as f}from"./icons.11151937.js";import{d as i,r as c,b as u,c as v,e as p,z as b,U as y,N as _,G as m,a as g,q as h}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f2e844be-0901-4a76-9d70-5bb64c45d2b6",e._sentryDebugIdIdentifier="sentry-dbid-f2e844be-0901-4a76-9d70-5bb64c45d2b6")}catch{}})();const w=i({__name:"SaveButton",props:{model:null},setup(e){const t=e,a=c(!1);async function s(){a.value=!0;try{await t.model.save()}finally{a.value=!1}}return addEventListener("keydown",n=>{(n.metaKey||n.ctrlKey)&&n.key==="s"&&(n.preventDefault(),s())}),addEventListener("beforeunload",n=>{t.model.hasChanges()&&(n.preventDefault(),n.returnValue="")}),(n,o)=>{var l,d;const r=g("icon");return u(),v("button",{class:m(["save-button",{changes:(l=e.model)==null?void 0:l.hasChanges()}]),onClick:o[0]||(o[0]=S=>s())},[p(r,{class:"icon",path:b(f),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),y(" "+_(a.value?"Saving ...":(d=e.model)!=null&&d.hasChanges()?"Save":"Saved"),1)],2)}}});const k=h(w,[["__scopeId","data-v-15752ff4"]]);export{k as S}; -//# sourceMappingURL=SaveButton.e379ab16.js.map diff --git a/abstra_statics/dist/assets/Sidebar.8babb822.js b/abstra_statics/dist/assets/Sidebar.8babb822.js new file mode 100644 index 0000000000..e814da3103 --- /dev/null +++ b/abstra_statics/dist/assets/Sidebar.8babb822.js @@ -0,0 +1,2 @@ +import{d as v,r as w,b as a,c as s,F as u,L as _,H as k,J as m,x as p,N as b,G as h,e as f,I as g,D as l,t as x,w as D,z as I,q as C}from"./registerWidgets.89616af0.js";import{e as S}from"./icons.9cfdae6d.js";import{T as B}from"./Tooltip.1f768a3e.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="7805da16-4710-4715-b2ee-76ac185be36c",t._sentryDebugIdIdentifier="sentry-dbid-7805da16-4710-4715-b2ee-76ac185be36c")}catch{}})();const N={class:"sidebar"},T={class:"section-name"},O=["onClick"],E={class:"item-name"},L={key:0,class:"tag soon"},V={key:1,class:"tag beta"},z={key:2,class:"tag cloud"},F=v({__name:"Sidebar",props:{sections:null},setup(t){var i;const n=k(),d=m(),c=w((i=d.name)!=null?i:"forms"),y=o=>{o.unavailable||(n.push(o.path),c.value=o.path)};return(o,R)=>(a(),s("div",N,[(a(!0),s(u,null,_(t.sections,r=>(a(),s("div",{key:r.name,class:"section"},[p("span",T,b(r.name),1),(a(!0),s(u,null,_(r.items,e=>(a(),s("div",{key:e.name,role:"button",class:h(["item",{active:c.value===e.path,disabled:e.unavailable||r.cloud}]),tabindex:"0",onClick:q=>y(e)},[f(g,{class:h(["icon",{disabled:e.unavailable,active:c.value===e.path}]),path:e.icon,width:"20",height:"20"},null,8,["class","path"]),p("span",E,b(e.name),1),e.unavailable?(a(),s("span",L,"SOON")):l("",!0),e.beta?(a(),s("span",V,"BETA")):l("",!0),e.cloud?(a(),s("span",z,"CLOUD")):l("",!0),e.warning?(a(),x(B,{key:3,class:"warning",text:e.warning,fixed:!0,top:18,left:18},{default:D(()=>[f(g,{path:I(S),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):l("",!0)],10,O))),128))]))),128))]))}});const J=C(F,[["__scopeId","data-v-65839ebd"]]);export{J as S}; +//# sourceMappingURL=Sidebar.8babb822.js.map diff --git a/abstra_statics/dist/assets/Sidebar.e123944a.js b/abstra_statics/dist/assets/Sidebar.e123944a.js deleted file mode 100644 index 9be737ce81..0000000000 --- a/abstra_statics/dist/assets/Sidebar.e123944a.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as v,r as w,b as a,c as s,F as u,L as _,H as k,J as m,x as p,N as f,G as b,e as h,I as g,D as l,t as x,w as D,z as I,q as C}from"./registerWidgets.ca6243ef.js";import{e as S}from"./icons.11151937.js";import{T as B}from"./Tooltip.8c336607.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="2a01f4ed-4cd3-4769-a880-302805fbdea0",t._sentryDebugIdIdentifier="sentry-dbid-2a01f4ed-4cd3-4769-a880-302805fbdea0")}catch{}})();const N={class:"sidebar"},T={class:"section-name"},O=["onClick"],E={class:"item-name"},L={key:0,class:"tag soon"},V={key:1,class:"tag beta"},z={key:2,class:"tag cloud"},F=v({__name:"Sidebar",props:{sections:null},setup(t){var i;const n=k(),c=m(),d=w((i=c.name)!=null?i:"forms"),y=o=>{o.unavailable||(n.push(o.path),d.value=o.path)};return(o,R)=>(a(),s("div",N,[(a(!0),s(u,null,_(t.sections,r=>(a(),s("div",{key:r.name,class:"section"},[p("span",T,f(r.name),1),(a(!0),s(u,null,_(r.items,e=>(a(),s("div",{key:e.name,role:"button",class:b(["item",{active:d.value===e.path,disabled:e.unavailable||r.cloud}]),tabindex:"0",onClick:q=>y(e)},[h(g,{class:b(["icon",{disabled:e.unavailable,active:d.value===e.path}]),path:e.icon,width:"20",height:"20"},null,8,["class","path"]),p("span",E,f(e.name),1),e.unavailable?(a(),s("span",L,"SOON")):l("",!0),e.beta?(a(),s("span",V,"BETA")):l("",!0),e.cloud?(a(),s("span",z,"CLOUD")):l("",!0),e.warning?(a(),x(B,{key:3,class:"warning",text:e.warning,fixed:!0,top:18,left:18},{default:D(()=>[h(g,{path:I(S),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):l("",!0)],10,O))),128))]))),128))]))}});const J=C(F,[["__scopeId","data-v-65839ebd"]]);export{J as S}; -//# sourceMappingURL=Sidebar.e123944a.js.map diff --git a/abstra_statics/dist/assets/SidebarEditor.689be76e.js b/abstra_statics/dist/assets/SidebarEditor.6edb80a9.js similarity index 99% rename from abstra_statics/dist/assets/SidebarEditor.689be76e.js rename to abstra_statics/dist/assets/SidebarEditor.6edb80a9.js index 1c6819f31d..753018b788 100644 --- a/abstra_statics/dist/assets/SidebarEditor.689be76e.js +++ b/abstra_statics/dist/assets/SidebarEditor.6edb80a9.js @@ -1,4 +1,4 @@ -import{$ as qr,a0 as _r,p as tn,a1 as en,d as jr,r as rn,a2 as nn,o as on,V as _e,b as ur,c as wr,e as Ge,w as an,z as ee,x as jt,N as Er,W as sn,a3 as ln,O as Fr,Q as Lr,q as Ur,t as fn}from"./registerWidgets.ca6243ef.js";import{W as un}from"./workspaces.25055240.js";import{a as cn}from"./asyncComputed.3cb2e10b.js";import{L as dn}from"./CircularLoading.5630a601.js";import{S as vn}from"./SaveButton.e379ab16.js";import{S as hn}from"./SidebarPreview.dacadfbc.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./lottie.9d24e472.js";import"./icons.11151937.js";import"./PlayerNavbar.e3146994.js";import"./runnerData.170ae941.js";import"./colors.4425ff79.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="89cd5523-8192-4680-8fb1-2ffe8003c215",s._sentryDebugIdIdentifier="sentry-dbid-89cd5523-8192-4680-8fb1-2ffe8003c215")}catch{}})();var $r={exports:{}};/**! +import{$ as qr,a0 as _r,p as tn,a1 as en,d as jr,r as rn,a2 as nn,o as on,V as _e,b as ur,c as wr,e as Ge,w as an,z as ee,x as jt,N as Er,W as sn,a3 as ln,O as Fr,Q as Lr,q as Ur,t as fn}from"./registerWidgets.89616af0.js";import{W as un}from"./workspaces.621b79ad.js";import{a as cn}from"./asyncComputed.8ac91a75.js";import{L as dn}from"./CircularLoading.0fb686c0.js";import{S as vn}from"./SaveButton.c0a67dea.js";import{S as hn}from"./SidebarPreview.e7347f81.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./lottie.fc57e5ac.js";import"./icons.9cfdae6d.js";import"./PlayerNavbar.2a5ed820.js";import"./runnerData.bd24d7de.js";import"./colors.bc71fdf2.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="716b5255-22e2-4073-99a4-b60fe4401020",s._sentryDebugIdIdentifier="sentry-dbid-716b5255-22e2-4073-99a4-b60fe4401020")}catch{}})();var $r={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm @@ -8,4 +8,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)&&(I="(?: "+I+")",j=" "+j,N++),x=new RegExp("^(?:"+I+")",U)),h&&(x=new RegExp("^"+I+"$(?!\\s)",U)),d&&(T=b.lastIndex),D=l.call(F?x:b,j),F?D?(D.input=D.input.slice(N),D[0]=D[0].slice(N),D.index=b.lastIndex,b.lastIndex+=D[0].length):b.lastIndex=0:d&&D&&(b.lastIndex=b.global?D.index+D[0].length:T),h&&D&&D.length>1&&c.call(D[0],x,function(){for(O=1;O=51||!a(function(){var I=[];return I[b]=!1,I.concat()[0]!==I}),O=p("concat"),F=function(I){if(!c(I))return!1;var N=I[b];return N!==void 0?!!N:l(I)},U=!D||!O;o({target:"Array",proto:!0,forced:U},{concat:function(N){var j=u(this),X=h(j,0),C=0,R,W,M,G,_;for(R=-1,M=arguments.length;RT)throw TypeError(x);for(W=0;W=T)throw TypeError(x);v(X,C++,_)}return X.length=C,X}})},"9bdd":function(e,f,t){var o=t("825a");e.exports=function(a,l,c,u){try{return u?l(o(c)[0],c[1]):l(c)}catch(v){var d=a.return;throw d!==void 0&&o(d.call(a)),v}}},"9bf2":function(e,f,t){var o=t("83ab"),a=t("0cfb"),l=t("825a"),c=t("c04e"),u=Object.defineProperty;f.f=o?u:function(v,h,p){if(l(v),h=c(h,!0),l(p),a)try{return u(v,h,p)}catch{}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(v[h]=p.value),v}},"9ed3":function(e,f,t){var o=t("ae93").IteratorPrototype,a=t("7c73"),l=t("5c6c"),c=t("d44e"),u=t("3f8c"),d=function(){return this};e.exports=function(v,h,p){var g=h+" Iterator";return v.prototype=a(o,{next:l(1,p)}),c(v,g,!1,!0),u[g]=d,v}},"9f7f":function(e,f,t){var o=t("d039");function a(l,c){return RegExp(l,c)}f.UNSUPPORTED_Y=o(function(){var l=a("a","y");return l.lastIndex=2,l.exec("abcd")!=null}),f.BROKEN_CARET=o(function(){var l=a("^r","gy");return l.lastIndex=2,l.exec("str")!=null})},a2bf:function(e,f,t){var o=t("e8b5"),a=t("50c4"),l=t("0366"),c=function(u,d,v,h,p,g,S,b){for(var T=p,x=0,D=S?l(S,b,3):!1,O;x0&&o(O))T=c(u,d,O,a(O.length),T,g-1)-1;else{if(T>=9007199254740991)throw TypeError("Exceed the acceptable array length");u[T]=O}T++}x++}return T};e.exports=c},a352:function(e,f){e.exports=i},a434:function(e,f,t){var o=t("23e7"),a=t("23cb"),l=t("a691"),c=t("50c4"),u=t("7b0b"),d=t("65f0"),v=t("8418"),h=t("1dde"),p=t("ae40"),g=h("splice"),S=p("splice",{ACCESSORS:!0,0:0,1:2}),b=Math.max,T=Math.min,x=9007199254740991,D="Maximum allowed length exceeded";o({target:"Array",proto:!0,forced:!g||!S},{splice:function(F,U){var I=u(this),N=c(I.length),j=a(F,N),X=arguments.length,C,R,W,M,G,_;if(X===0?C=R=0:X===1?(C=0,R=N-j):(C=X-2,R=T(b(l(U),0),N-j)),N+C-R>x)throw TypeError(D);for(W=d(I,R),M=0;MN-R+C;M--)delete I[M-1]}else if(C>R)for(M=N-R;M>j;M--)G=M+R-1,_=M+C-1,G in I?I[_]=I[G]:delete I[_];for(M=0;MDt;)q.push(arguments[Dt++]);if(qe=B,!(!S(B)&&$===void 0||y($)))return g(B)||(B=function(kr,Me){if(typeof qe=="function"&&(Me=qe.call(this,kr,Me)),!y(Me))return Me}),q[1]=B,qt.apply(null,q)}})}bt[It][Vt]||W(bt[It],Vt,bt[It].valueOf),mt(bt,At),rt[it]=!0},a630:function(e,f,t){var o=t("23e7"),a=t("4df4"),l=t("1c7e"),c=!l(function(u){Array.from(u)});o({target:"Array",stat:!0,forced:c},{from:a})},a640:function(e,f,t){var o=t("d039");e.exports=function(a,l){var c=[][a];return!!c&&o(function(){c.call(null,l||function(){throw 1},1)})}},a691:function(e,f){var t=Math.ceil,o=Math.floor;e.exports=function(a){return isNaN(a=+a)?0:(a>0?o:t)(a)}},ab13:function(e,f,t){var o=t("b622"),a=o("match");e.exports=function(l){var c=/./;try{"/./"[l](c)}catch{try{return c[a]=!1,"/./"[l](c)}catch{}}return!1}},ac1f:function(e,f,t){var o=t("23e7"),a=t("9263");o({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},ad6d:function(e,f,t){var o=t("825a");e.exports=function(){var a=o(this),l="";return a.global&&(l+="g"),a.ignoreCase&&(l+="i"),a.multiline&&(l+="m"),a.dotAll&&(l+="s"),a.unicode&&(l+="u"),a.sticky&&(l+="y"),l}},ae40:function(e,f,t){var o=t("83ab"),a=t("d039"),l=t("5135"),c=Object.defineProperty,u={},d=function(v){throw v};e.exports=function(v,h){if(l(u,v))return u[v];h||(h={});var p=[][v],g=l(h,"ACCESSORS")?h.ACCESSORS:!1,S=l(h,0)?h[0]:d,b=l(h,1)?h[1]:void 0;return u[v]=!!p&&!a(function(){if(g&&!o)return!0;var T={length:-1};g?c(T,1,{enumerable:!0,get:d}):T[1]=1,p.call(T,S,b)})}},ae93:function(e,f,t){var o=t("e163"),a=t("9112"),l=t("5135"),c=t("b622"),u=t("c430"),d=c("iterator"),v=!1,h=function(){return this},p,g,S;[].keys&&(S=[].keys(),"next"in S?(g=o(o(S)),g!==Object.prototype&&(p=g)):v=!0),p==null&&(p={}),!u&&!l(p,d)&&a(p,d,h),e.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:v}},b041:function(e,f,t){var o=t("00ee"),a=t("f5df");e.exports=o?{}.toString:function(){return"[object "+a(this)+"]"}},b0c0:function(e,f,t){var o=t("83ab"),a=t("9bf2").f,l=Function.prototype,c=l.toString,u=/^\s*function ([^ (]*)/,d="name";o&&!(d in l)&&a(l,d,{configurable:!0,get:function(){try{return c.call(this).match(u)[1]}catch{return""}}})},b622:function(e,f,t){var o=t("da84"),a=t("5692"),l=t("5135"),c=t("90e3"),u=t("4930"),d=t("fdbf"),v=a("wks"),h=o.Symbol,p=d?h:h&&h.withoutSetter||c;e.exports=function(g){return l(v,g)||(u&&l(h,g)?v[g]=h[g]:v[g]=p("Symbol."+g)),v[g]}},b64b:function(e,f,t){var o=t("23e7"),a=t("7b0b"),l=t("df75"),c=t("d039"),u=c(function(){l(1)});o({target:"Object",stat:!0,forced:u},{keys:function(v){return l(a(v))}})},b727:function(e,f,t){var o=t("0366"),a=t("44ad"),l=t("7b0b"),c=t("50c4"),u=t("65f0"),d=[].push,v=function(h){var p=h==1,g=h==2,S=h==3,b=h==4,T=h==6,x=h==5||T;return function(D,O,F,U){for(var I=l(D),N=a(I),j=o(O,F,3),X=c(N.length),C=0,R=U||u,W=p?R(D,X):g?R(D,0):void 0,M,G;X>C;C++)if((x||C in N)&&(M=N[C],G=j(M,C,I),h)){if(p)W[C]=G;else if(G)switch(h){case 3:return!0;case 5:return M;case 6:return C;case 2:d.call(W,M)}else if(b)return!1}return T?-1:S||b?b:W}};e.exports={forEach:v(0),map:v(1),filter:v(2),some:v(3),every:v(4),find:v(5),findIndex:v(6)}},c04e:function(e,f,t){var o=t("861d");e.exports=function(a,l){if(!o(a))return a;var c,u;if(l&&typeof(c=a.toString)=="function"&&!o(u=c.call(a))||typeof(c=a.valueOf)=="function"&&!o(u=c.call(a))||!l&&typeof(c=a.toString)=="function"&&!o(u=c.call(a)))return u;throw TypeError("Can't convert object to primitive value")}},c430:function(e,f){e.exports=!1},c6b6:function(e,f){var t={}.toString;e.exports=function(o){return t.call(o).slice(8,-1)}},c6cd:function(e,f,t){var o=t("da84"),a=t("ce4e"),l="__core-js_shared__",c=o[l]||a(l,{});e.exports=c},c740:function(e,f,t){var o=t("23e7"),a=t("b727").findIndex,l=t("44d2"),c=t("ae40"),u="findIndex",d=!0,v=c(u);u in[]&&Array(1)[u](function(){d=!1}),o({target:"Array",proto:!0,forced:d||!v},{findIndex:function(p){return a(this,p,arguments.length>1?arguments[1]:void 0)}}),l(u)},c8ba:function(e,f){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch{typeof window=="object"&&(t=window)}e.exports=t},c975:function(e,f,t){var o=t("23e7"),a=t("4d64").indexOf,l=t("a640"),c=t("ae40"),u=[].indexOf,d=!!u&&1/[1].indexOf(1,-0)<0,v=l("indexOf"),h=c("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:d||!v||!h},{indexOf:function(g){return d?u.apply(this,arguments)||0:a(this,g,arguments.length>1?arguments[1]:void 0)}})},ca84:function(e,f,t){var o=t("5135"),a=t("fc6a"),l=t("4d64").indexOf,c=t("d012");e.exports=function(u,d){var v=a(u),h=0,p=[],g;for(g in v)!o(c,g)&&o(v,g)&&p.push(g);for(;d.length>h;)o(v,g=d[h++])&&(~l(p,g)||p.push(g));return p}},caad:function(e,f,t){var o=t("23e7"),a=t("4d64").includes,l=t("44d2"),c=t("ae40"),u=c("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:!u},{includes:function(v){return a(this,v,arguments.length>1?arguments[1]:void 0)}}),l("includes")},cc12:function(e,f,t){var o=t("da84"),a=t("861d"),l=o.document,c=a(l)&&a(l.createElement);e.exports=function(u){return c?l.createElement(u):{}}},ce4e:function(e,f,t){var o=t("da84"),a=t("9112");e.exports=function(l,c){try{a(o,l,c)}catch{o[l]=c}return c}},d012:function(e,f){e.exports={}},d039:function(e,f){e.exports=function(t){try{return!!t()}catch{return!0}}},d066:function(e,f,t){var o=t("428f"),a=t("da84"),l=function(c){return typeof c=="function"?c:void 0};e.exports=function(c,u){return arguments.length<2?l(o[c])||l(a[c]):o[c]&&o[c][u]||a[c]&&a[c][u]}},d1e7:function(e,f,t){var o={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,l=a&&!o.call({1:2},1);f.f=l?function(u){var d=a(this,u);return!!d&&d.enumerable}:o},d28b:function(e,f,t){var o=t("746f");o("iterator")},d2bb:function(e,f,t){var o=t("825a"),a=t("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var l=!1,c={},u;try{u=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,u.call(c,[]),l=c instanceof Array}catch{}return function(v,h){return o(v),a(h),l?u.call(v,h):v.__proto__=h,v}}():void 0)},d3b7:function(e,f,t){var o=t("00ee"),a=t("6eeb"),l=t("b041");o||a(Object.prototype,"toString",l,{unsafe:!0})},d44e:function(e,f,t){var o=t("9bf2").f,a=t("5135"),l=t("b622"),c=l("toStringTag");e.exports=function(u,d,v){u&&!a(u=v?u:u.prototype,c)&&o(u,c,{configurable:!0,value:d})}},d58f:function(e,f,t){var o=t("1c0b"),a=t("7b0b"),l=t("44ad"),c=t("50c4"),u=function(d){return function(v,h,p,g){o(h);var S=a(v),b=l(S),T=c(S.length),x=d?T-1:0,D=d?-1:1;if(p<2)for(;;){if(x in b){g=b[x],x+=D;break}if(x+=D,d?x<0:T<=x)throw TypeError("Reduce of empty array with no initial value")}for(;d?x>=0:T>x;x+=D)x in b&&(g=h(g,b[x],x,S));return g}};e.exports={left:u(!1),right:u(!0)}},d784:function(e,f,t){t("ac1f");var o=t("6eeb"),a=t("d039"),l=t("b622"),c=t("9263"),u=t("9112"),d=l("species"),v=!a(function(){var b=/./;return b.exec=function(){var T=[];return T.groups={a:"7"},T},"".replace(b,"$")!=="7"}),h=function(){return"a".replace(/./,"$0")==="$0"}(),p=l("replace"),g=function(){return/./[p]?/./[p]("a","$0")==="":!1}(),S=!a(function(){var b=/(?:)/,T=b.exec;b.exec=function(){return T.apply(this,arguments)};var x="ab".split(b);return x.length!==2||x[0]!=="a"||x[1]!=="b"});e.exports=function(b,T,x,D){var O=l(b),F=!a(function(){var C={};return C[O]=function(){return 7},""[b](C)!=7}),U=F&&!a(function(){var C=!1,R=/a/;return b==="split"&&(R={},R.constructor={},R.constructor[d]=function(){return R},R.flags="",R[O]=/./[O]),R.exec=function(){return C=!0,null},R[O](""),!C});if(!F||!U||b==="replace"&&!(v&&h&&!g)||b==="split"&&!S){var I=/./[O],N=x(O,""[b],function(C,R,W,M,G){return R.exec===c?F&&!G?{done:!0,value:I.call(R,W,M)}:{done:!0,value:C.call(W,R,M)}:{done:!1}},{REPLACE_KEEPS_$0:h,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:g}),j=N[0],X=N[1];o(String.prototype,b,j),o(RegExp.prototype,O,T==2?function(C,R){return X.call(C,this,R)}:function(C){return X.call(C,this)})}D&&u(RegExp.prototype[O],"sham",!0)}},d81d:function(e,f,t){var o=t("23e7"),a=t("b727").map,l=t("1dde"),c=t("ae40"),u=l("map"),d=c("map");o({target:"Array",proto:!0,forced:!u||!d},{map:function(h){return a(this,h,arguments.length>1?arguments[1]:void 0)}})},da84:function(e,f,t){(function(o){var a=function(l){return l&&l.Math==Math&&l};e.exports=a(typeof globalThis=="object"&&globalThis)||a(typeof window=="object"&&window)||a(typeof self=="object"&&self)||a(typeof o=="object"&&o)||Function("return this")()}).call(this,t("c8ba"))},dbb4:function(e,f,t){var o=t("23e7"),a=t("83ab"),l=t("56ef"),c=t("fc6a"),u=t("06cf"),d=t("8418");o({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(h){for(var p=c(h),g=u.f,S=l(p),b={},T=0,x,D;S.length>T;)D=g(p,x=S[T++]),D!==void 0&&d(b,x,D);return b}})},dbf1:function(e,f,t){(function(o){t.d(f,"a",function(){return l});function a(){return typeof window<"u"?window.console:o.console}var l=a()}).call(this,t("c8ba"))},ddb0:function(e,f,t){var o=t("da84"),a=t("fdbc"),l=t("e260"),c=t("9112"),u=t("b622"),d=u("iterator"),v=u("toStringTag"),h=l.values;for(var p in a){var g=o[p],S=g&&g.prototype;if(S){if(S[d]!==h)try{c(S,d,h)}catch{S[d]=h}if(S[v]||c(S,v,p),a[p]){for(var b in l)if(S[b]!==l[b])try{c(S,b,l[b])}catch{S[b]=l[b]}}}}},df75:function(e,f,t){var o=t("ca84"),a=t("7839");e.exports=Object.keys||function(c){return o(c,a)}},e01a:function(e,f,t){var o=t("23e7"),a=t("83ab"),l=t("da84"),c=t("5135"),u=t("861d"),d=t("9bf2").f,v=t("e893"),h=l.Symbol;if(a&&typeof h=="function"&&(!("description"in h.prototype)||h().description!==void 0)){var p={},g=function(){var O=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),F=this instanceof g?new h(O):O===void 0?h():h(O);return O===""&&(p[F]=!0),F};v(g,h);var S=g.prototype=h.prototype;S.constructor=g;var b=S.toString,T=String(h("test"))=="Symbol(test)",x=/^Symbol\((.*)\)[^)]+$/;d(S,"description",{configurable:!0,get:function(){var O=u(this)?this.valueOf():this,F=b.call(O);if(c(p,O))return"";var U=T?F.slice(7,-1):F.replace(x,"$1");return U===""?void 0:U}}),o({global:!0,forced:!0},{Symbol:g})}},e163:function(e,f,t){var o=t("5135"),a=t("7b0b"),l=t("f772"),c=t("e177"),u=l("IE_PROTO"),d=Object.prototype;e.exports=c?Object.getPrototypeOf:function(v){return v=a(v),o(v,u)?v[u]:typeof v.constructor=="function"&&v instanceof v.constructor?v.constructor.prototype:v instanceof Object?d:null}},e177:function(e,f,t){var o=t("d039");e.exports=!o(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype})},e260:function(e,f,t){var o=t("fc6a"),a=t("44d2"),l=t("3f8c"),c=t("69f3"),u=t("7dd0"),d="Array Iterator",v=c.set,h=c.getterFor(d);e.exports=u(Array,"Array",function(p,g){v(this,{type:d,target:o(p),index:0,kind:g})},function(){var p=h(this),g=p.target,S=p.kind,b=p.index++;return!g||b>=g.length?(p.target=void 0,{value:void 0,done:!0}):S=="keys"?{value:b,done:!1}:S=="values"?{value:g[b],done:!1}:{value:[b,g[b]],done:!1}},"values"),l.Arguments=l.Array,a("keys"),a("values"),a("entries")},e439:function(e,f,t){var o=t("23e7"),a=t("d039"),l=t("fc6a"),c=t("06cf").f,u=t("83ab"),d=a(function(){c(1)}),v=!u||d;o({target:"Object",stat:!0,forced:v,sham:!u},{getOwnPropertyDescriptor:function(p,g){return c(l(p),g)}})},e538:function(e,f,t){var o=t("b622");f.f=o},e893:function(e,f,t){var o=t("5135"),a=t("56ef"),l=t("06cf"),c=t("9bf2");e.exports=function(u,d){for(var v=a(d),h=c.f,p=l.f,g=0;g"u"||!(Symbol.iterator in Object(y)))){var E=[],P=!0,w=!1,H=void 0;try{for(var J=y[Symbol.iterator](),tt;!(P=(tt=J.next()).done)&&(E.push(tt.value),!(m&&E.length===m));P=!0);}catch(vt){w=!0,H=vt}finally{try{!P&&J.return!=null&&J.return()}finally{if(w)throw H}}return E}}t("a630"),t("fb6a"),t("b0c0"),t("25f0");function p(y,m){(m==null||m>y.length)&&(m=y.length);for(var E=0,P=new Array(m);E(Fr("data-v-f4ca2d64"),s=s(),Lr(),s),_n={class:"sidebar-editor"},to={class:"sidebar-item draggable"},eo={class:"property"},ro=br(()=>jt("span",{class:"property-name"},"Route:",-1)),no={class:"property-value"},oo={class:"property"},ao=br(()=>jt("span",{class:"property-name"},"Name:",-1)),io={class:"property-value"},so={class:"property"},lo=br(()=>jt("span",{class:"property-name"},"Visible:",-1)),fo=["onUpdate:modelValue"],uo=jr({__name:"SidebarEditor",props:{modelValue:null},emits:["update:modelValue"],setup(s,{emit:r}){const n=s,i=rn([]),e=()=>r("update:modelValue",i.value);return nn(()=>n.modelValue,(f,t)=>{_e.exports.isEqual(f,t)||(i.value=_e.exports.cloneDeep(f))}),on(()=>{i.value=_e.exports.cloneDeep(n.modelValue)}),(f,t)=>(ur(),wr("div",_n,[Ge(ee(qn),{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=o=>i.value=o),style:{width:"100%"},onChange:e},{item:an(({element:o})=>[jt("div",to,[jt("div",eo,[ro,jt("span",no,"/"+Er(o.path),1)]),jt("div",oo,[ao,jt("span",io,Er(o.name),1)]),jt("div",so,[lo,sn(jt("input",{"onUpdate:modelValue":a=>o.visible=a,class:"property-value",type:"checkbox",onChange:e},null,40,fo),[[ln,o.visible]])])])]),_:1},8,["modelValue"])]))}});const co=Ur(uo,[["__scopeId","data-v-f4ca2d64"]]),Zr=s=>(Fr("data-v-c55f20f4"),s=s(),Lr(),s),vo={key:1,class:"sidebar-editor"},ho=Zr(()=>jt("h1",null,"Sidebar Editor",-1)),po=Zr(()=>jt("h2",null,"Preview",-1)),go=jr({__name:"SidebarEditor",setup(s){const{result:r,loading:n}=cn(()=>un.get());return(i,e)=>ee(n)||!ee(r)?(ur(),fn(dn,{key:0})):(ur(),wr("div",vo,[ho,Ge(co,{modelValue:ee(r).sidebar,"onUpdate:modelValue":e[0]||(e[0]=f=>ee(r).sidebar=f)},null,8,["modelValue"]),po,Ge(hn,{workspace:ee(r)},null,8,["workspace"]),Ge(vn,{model:ee(r)},null,8,["model"])]))}});const Ro=Ur(go,[["__scopeId","data-v-c55f20f4"]]);export{Ro as default}; -//# sourceMappingURL=SidebarEditor.689be76e.js.map +//# sourceMappingURL=SidebarEditor.6edb80a9.js.map diff --git a/abstra_statics/dist/assets/SidebarPreview.dacadfbc.js b/abstra_statics/dist/assets/SidebarPreview.e7347f81.js similarity index 75% rename from abstra_statics/dist/assets/SidebarPreview.dacadfbc.js rename to abstra_statics/dist/assets/SidebarPreview.e7347f81.js index 57a14b2d3d..d38c9845eb 100644 --- a/abstra_statics/dist/assets/SidebarPreview.dacadfbc.js +++ b/abstra_statics/dist/assets/SidebarPreview.e7347f81.js @@ -1,2 +1,2 @@ -import{P as m}from"./PlayerNavbar.e3146994.js";import{d as u}from"./runnerData.170ae941.js";import{l as p,a as i,b}from"./colors.4425ff79.js";import{d as k,K as s,b as l,c as f,x as y,z as a,t as g,D as w,A as _,q as h}from"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="049e6ae0-c2ec-4629-a682-ba4f04914be9",r._sentryDebugIdIdentifier="sentry-dbid-049e6ae0-c2ec-4629-a682-ba4f04914be9")}catch{}})();function v(r){return r.startsWith("#")||r.match(/^(rgb|hsl)/)}function C(r){return r.startsWith("http://")||r.startsWith("https://")}function I(r){return C(r)?"external-image":v(r)?"color":"hosted-image"}function P(r,e="/_assets/background"){switch(I(r)){case"external-image":return{backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"};case"color":return{backgroundColor:r};case"hosted-image":return{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:"center"}}}const x={class:"sidebar-preview"},D=k({__name:"SidebarPreview",props:{workspace:null},setup(r){const e=r,o=s(()=>e.workspace.makeRunnerData()),d=s(()=>(document.documentElement.style.setProperty("--ac-global-font-family",e.workspace.fontFamily),{"--color-main":e.workspace.mainColor,"--color-main-light":p(e.workspace.mainColor,.15),"--color-main-hover":i(e.workspace.mainColor),"--color-main-active":i(e.workspace.mainColor),"--color-secondary":"transparent","--color-secondary-lighter":"transparent","--color-secondary-darker":"transparent","--button-font-color-main":b(e.workspace.mainColor),"--font-family":e.workspace.fontFamily,...P(e.workspace.theme,`/_editor/api/assets/${e.workspace.theme}`)})),c=s(()=>{var t,n;return e.workspace?{id:"mockId",path:"mockPath",title:"mockTitle",theme:e.workspace.theme,brandName:(t=e.workspace.brandName)!=null?t:null,logoUrl:(n=e.workspace.logoUrl)!=null?n:null,mainColor:e.workspace.mainColor,fontFamily:e.workspace.fontFamily,layout:u({props:{},slot:{},version:"0.2"}),workspaceName:"Untitled Workspace",sidebar:e.workspace.sidebar,runtimeType:"dash"}:null});return(t,n)=>(l(),f("div",x,[y("div",{class:"sidebar-frame",style:_(a(d))},[a(c)?(l(),g(m,{key:0,runtime:a(c),"brand-name":a(o).brandName,"user-email":"user@email.com","force-responsivity":"desktop"},null,8,["runtime","brand-name"])):w("",!0)],4)]))}});const z=h(D,[["__scopeId","data-v-e4bddb5d"]]);export{z as S,I as b}; -//# sourceMappingURL=SidebarPreview.dacadfbc.js.map +import{P as m}from"./PlayerNavbar.2a5ed820.js";import{d as u}from"./runnerData.bd24d7de.js";import{l as p,a as i,b}from"./colors.bc71fdf2.js";import{d as k,K as s,b as l,c as f,x as y,z as o,t as g,D as w,A as _,q as h}from"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="054cce39-8c83-47f0-b4dd-41ba6bc9f04e",r._sentryDebugIdIdentifier="sentry-dbid-054cce39-8c83-47f0-b4dd-41ba6bc9f04e")}catch{}})();function v(r){return r.startsWith("#")||r.match(/^(rgb|hsl)/)}function C(r){return r.startsWith("http://")||r.startsWith("https://")}function I(r){return C(r)?"external-image":v(r)?"color":"hosted-image"}function P(r,e="/_assets/background"){switch(I(r)){case"external-image":return{backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"};case"color":return{backgroundColor:r};case"hosted-image":return{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:"center"}}}const x={class:"sidebar-preview"},D=k({__name:"SidebarPreview",props:{workspace:null},setup(r){const e=r,a=s(()=>e.workspace.makeRunnerData()),d=s(()=>(document.documentElement.style.setProperty("--ac-global-font-family",e.workspace.fontFamily),{"--color-main":e.workspace.mainColor,"--color-main-light":p(e.workspace.mainColor,.15),"--color-main-hover":i(e.workspace.mainColor),"--color-main-active":i(e.workspace.mainColor),"--color-secondary":"transparent","--color-secondary-lighter":"transparent","--color-secondary-darker":"transparent","--button-font-color-main":b(e.workspace.mainColor),"--font-family":e.workspace.fontFamily,...P(e.workspace.theme,`/_editor/api/assets/${e.workspace.theme}`)})),c=s(()=>{var t,n;return e.workspace?{id:"mockId",path:"mockPath",title:"mockTitle",theme:e.workspace.theme,brandName:(t=e.workspace.brandName)!=null?t:null,logoUrl:(n=e.workspace.logoUrl)!=null?n:null,mainColor:e.workspace.mainColor,fontFamily:e.workspace.fontFamily,layout:u({props:{},slot:{},version:"0.2"}),workspaceName:"Untitled Workspace",sidebar:e.workspace.sidebar,runtimeType:"dash"}:null});return(t,n)=>(l(),f("div",x,[y("div",{class:"sidebar-frame",style:_(o(d))},[o(c)?(l(),g(m,{key:0,runtime:o(c),"brand-name":o(a).brandName,"user-email":"user@email.com","force-responsivity":"desktop"},null,8,["runtime","brand-name"])):w("",!0)],4)]))}});const z=h(D,[["__scopeId","data-v-e4bddb5d"]]);export{z as S,I as b}; +//# sourceMappingURL=SidebarPreview.e7347f81.js.map diff --git a/abstra_statics/dist/assets/StyleEditor.c9fef8ca.js b/abstra_statics/dist/assets/StyleEditor.ec27cc19.js similarity index 98% rename from abstra_statics/dist/assets/StyleEditor.c9fef8ca.js rename to abstra_statics/dist/assets/StyleEditor.ec27cc19.js index bd9eba9841..539e95e7dd 100644 --- a/abstra_statics/dist/assets/StyleEditor.c9fef8ca.js +++ b/abstra_statics/dist/assets/StyleEditor.ec27cc19.js @@ -1,6 +1,6 @@ -import{d as g,r as O,W as $,X as ee,b as h,c as C,F as _,L as T,z as d,N as J,q as L,v as ae,K as F,o as oe,Y as q,x as c,B as H,A as X,t as m,e as u,E as G,D as B,Z as R,a as M,w as j,U as te,O as ne,Q as ie}from"./registerWidgets.ca6243ef.js";import{a as re}from"./asyncComputed.3cb2e10b.js";import{W as se}from"./workspaces.25055240.js";import{L as le}from"./CircularLoading.5630a601.js";import{i as ue}from"./icons.11151937.js";import{b as P,S as ce}from"./SidebarPreview.dacadfbc.js";import{S as de}from"./SaveButton.e379ab16.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./lottie.9d24e472.js";import"./PlayerNavbar.e3146994.js";import"./runnerData.170ae941.js";import"./colors.4425ff79.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="9357b748-fb25-415f-9ea3-a29f962ac6e9",e._sentryDebugIdIdentifier="sentry-dbid-9357b748-fb25-415f-9ea3-a29f962ac6e9")}catch{}})();const he=["ABeeZee","Abel","Abhaya Libre","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akaya Kanadaka","Akaya Telivigala","Akronim","Aladin","Alata","Alatsi","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Aleo","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allison","Allura","Almarai","Almendra","Almendra Display","Almendra SC","Alumni Sans","Amarante","Amaranth","Amatic SC","Amethysta","Amiko","Amiri","Amita","Anaheim","Andada Pro","Andika","Andika New Basic","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Antonio","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo","Archivo Black","Archivo Narrow","Are You Serious","Aref Ruqaa","Arima Madurai","Arimo","Arizonia","Armata","Arsenal","Artifika","Arvo","Arya","Asap","Asap Condensed","Asar","Asset","Assistant","Astloch","Asul","Athiti","Atkinson Hyperlegible","Atma","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Azeret Mono","B612","B612 Mono","Bad Script","Bahiana","Bahianita","Bai Jamjuree","Ballet","Baloo 2","Baloo Bhai 2","Baloo Bhaina 2","Baloo Chettan 2","Baloo Da 2","Baloo Paaji 2","Baloo Tamma 2","Baloo Tammudu 2","Baloo Thambi 2","Balsamiq Sans","Balthazar","Bangers","Barlow","Barlow Condensed","Barlow Semi Condensed","Barriecito","Barrio","Basic","Baskervville","Battambang","Baumans","Bayon","Be Vietnam","Be Vietnam Pro","Bebas Neue","Belgrano","Bellefair","Belleza","Bellota","Bellota Text","BenchNine","Benne","Bentham","Berkshire Swash","Besley","Beth Ellen","Bevan","Big Shoulders Display","Big Shoulders Inline Display","Big Shoulders Inline Text","Big Shoulders Stencil Display","Big Shoulders Stencil Text","Big Shoulders Text","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","BioRhyme","BioRhyme Expanded","Birthstone","Birthstone Bounce","Biryani","Bitter","Black And White Picture","Black Han Sans","Black Ops One","Blinker","Bodoni Moda","Bokor","Bona Nova","Bonbon","Bonheur Royale","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Brygada 1918","Bubblegum Sans","Bubbler One","Buenard","Bungee","Bungee Hairline","Bungee Inline","Bungee Outline","Bungee Shade","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Cairo","Caladea","Calistoga","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Caramel","Carattere","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Castoro","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Chakra Petch","Changa","Changa One","Chango","Charm","Charmonman","Chathura","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherish","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chilanka","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Coiny","Combo","Comfortaa","Comic Neue","Coming Soon","Commissioner","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Cormorant","Cormorant Garamond","Cormorant Infant","Cormorant SC","Cormorant Unicase","Cormorant Upright","Courgette","Courier Prime","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Pro","Crimson Text","Croissant One","Crushed","Cuprum","Cute Font","Cutive","Cutive Mono","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Damion","Dancing Script","Dangrek","Darker Grotesque","David Libre","Dawning of a New Day","Days One","Dekko","Dela Gothic One","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Do Hyeon","Dokdo","Domine","Donegal One","Doppio One","Dorsa","Dosis","DotGothic16","Dr Sugiyama","Duru Sans","Dynalight","EB Garamond","Eagle Lake","East Sea Dokdo","Eater","Economica","Eczar","El Messiri","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Encode Sans","Encode Sans Condensed","Encode Sans Expanded","Encode Sans SC","Encode Sans Semi Condensed","Encode Sans Semi Expanded","Engagement","Englebert","Enriqueta","Ephesis","Epilogue","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Explora","Fahkwang","Fanwood Text","Farro","Farsan","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Faustina","Federant","Federo","Felipa","Fenix","Festive","Finger Paint","Fira Code","Fira Mono","Fira Sans","Fira Sans Condensed","Fira Sans Extra Condensed","Fjalla One","Fjord One","Flamenco","Flavors","Fleur De Leah","Fondamento","Fontdiner Swanky","Forum","Francois One","Frank Ruhl Libre","Fraunces","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","Fuggles","GFS Didot","GFS Neohellenic","Gabriela","Gaegu","Gafata","Galada","Galdeano","Galindo","Gamja Flower","Gayathri","Gelasio","Gemunu Libre","Gentium Basic","Gentium Book Basic","Geo","Georama","Geostar","Geostar Fill","Germania One","Gideon Roman","Gidugu","Gilda Display","Girassol","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Glory","Gluten","Goblin One","Gochi Hand","Goldman","Gorditas","Gothic A1","Gotu","Goudy Bookletter 1911","Gowun Batang","Gowun Dodum","Graduate","Grand Hotel","Grandstander","Gravitas One","Great Vibes","Grechen Fuemen","Grenze","Grenze Gotisch","Grey Qo","Griffy","Gruppo","Gudea","Gugi","Gupter","Gurajada","Habibi","Hachi Maru Pop","Hahmlet","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Harmattan","Headland One","Heebo","Henny Penny","Hepta Slab","Herr Von Muellerhoff","Hi Melody","Hina Mincho","Hind","Hind Guntur","Hind Madurai","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IBM Plex Mono","IBM Plex Sans","IBM Plex Sans Arabic","IBM Plex Sans Condensed","IBM Plex Sans Devanagari","IBM Plex Sans Hebrew","IBM Plex Sans KR","IBM Plex Sans Thai","IBM Plex Sans Thai Looped","IBM Plex Serif","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Ibarra Real Nova","Iceberg","Iceland","Imbue","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Inria Sans","Inria Serif","Inter","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","JetBrains Mono","Jim Nightshade","Jockey One","Jolly Lodger","Jomhuria","Jomolhari","Josefin Sans","Josefin Slab","Jost","Joti One","Jua","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","K2D","Kadwa","Kaisei Decol","Kaisei HarunoUmi","Kaisei Opti","Kaisei Tokumin","Kalam","Kameron","Kanit","Kantumruy","Karantina","Karla","Karma","Katibeh","Kaushan Script","Kavivanar","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kirang Haerang","Kite One","Kiwi Maru","Klee One","Knewave","KoHo","Kodchasan","Koh Santepheap","Kosugi","Kosugi Maru","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Krub","Kufam","Kulim Park","Kumar One","Kumar One Outline","Kumbh Sans","Kurale","La Belle Aurore","Lacquer","Laila","Lakki Reddy","Lalezar","Lancelot","Langar","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Lemonada","Lexend","Lexend Deca","Lexend Exa","Lexend Giga","Lexend Mega","Lexend Peta","Lexend Tera","Lexend Zetta","Libre Barcode 128","Libre Barcode 128 Text","Libre Barcode 39","Libre Barcode 39 Extended","Libre Barcode 39 Extended Text","Libre Barcode 39 Text","Libre Barcode EAN13 Text","Libre Baskerville","Libre Caslon Display","Libre Caslon Text","Libre Franklin","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Literata","Liu Jian Mao Cao","Livvic","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Long Cang","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","M PLUS 1p","M PLUS Rounded 1c","Ma Shan Zheng","Macondo","Macondo Swash Caps","Mada","Magra","Maiden Orange","Maitree","Major Mono Display","Mako","Mali","Mallanna","Mandali","Manjari","Manrope","Mansalva","Manuale","Marcellus","Marcellus SC","Marck Script","Margarine","Markazi Text","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Material Icons","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Meera Inimai","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Mina","Miniver","Miriam Libre","Mirza","Miss Fajardose","Mitr","Modak","Modern Antiqua","Mogra","Molengo","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","MonteCarlo","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Mukta","Mukta Mahee","Mukta Malar","Mukta Vaani","Mulish","MuseoModerno","Mystery Quest","NTR","Nanum Brush Script","Nanum Gothic","Nanum Gothic Coding","Nanum Myeongjo","Nanum Pen Script","Nerko One","Neucha","Neuton","New Rocker","New Tegomin","News Cycle","Newsreader","Niconne","Niramit","Nixie One","Nobile","Nokora","Norican","Nosifer","Notable","Nothing You Could Do","Noticia Text","Noto Kufi Arabic","Noto Music","Noto Naskh Arabic","Noto Nastaliq Urdu","Noto Rashi Hebrew","Noto Sans","Noto Sans Adlam","Noto Sans Adlam Unjoined","Noto Sans Anatolian Hieroglyphs","Noto Sans Arabic","Noto Sans Armenian","Noto Sans Avestan","Noto Sans Balinese","Noto Sans Bamum","Noto Sans Bassa Vah","Noto Sans Batak","Noto Sans Bengali","Noto Sans Bhaiksuki","Noto Sans Brahmi","Noto Sans Buginese","Noto Sans Buhid","Noto Sans Canadian Aboriginal","Noto Sans Carian","Noto Sans Caucasian Albanian","Noto Sans Chakma","Noto Sans Cham","Noto Sans Cherokee","Noto Sans Coptic","Noto Sans Cuneiform","Noto Sans Cypriot","Noto Sans Deseret","Noto Sans Devanagari","Noto Sans Display","Noto Sans Duployan","Noto Sans Egyptian Hieroglyphs","Noto Sans Elbasan","Noto Sans Elymaic","Noto Sans Georgian","Noto Sans Glagolitic","Noto Sans Gothic","Noto Sans Grantha","Noto Sans Gujarati","Noto Sans Gunjala Gondi","Noto Sans Gurmukhi","Noto Sans HK","Noto Sans Hanifi Rohingya","Noto Sans Hanunoo","Noto Sans Hatran","Noto Sans Hebrew","Noto Sans Imperial Aramaic","Noto Sans Indic Siyaq Numbers","Noto Sans Inscriptional Pahlavi","Noto Sans Inscriptional Parthian","Noto Sans JP","Noto Sans Javanese","Noto Sans KR","Noto Sans Kaithi","Noto Sans Kannada","Noto Sans Kayah Li","Noto Sans Kharoshthi","Noto Sans Khmer","Noto Sans Khojki","Noto Sans Khudawadi","Noto Sans Lao","Noto Sans Lepcha","Noto Sans Limbu","Noto Sans Linear A","Noto Sans Linear B","Noto Sans Lisu","Noto Sans Lycian","Noto Sans Lydian","Noto Sans Mahajani","Noto Sans Malayalam","Noto Sans Mandaic","Noto Sans Manichaean","Noto Sans Marchen","Noto Sans Masaram Gondi","Noto Sans Math","Noto Sans Mayan Numerals","Noto Sans Medefaidrin","Noto Sans Meroitic","Noto Sans Miao","Noto Sans Modi","Noto Sans Mongolian","Noto Sans Mono","Noto Sans Mro","Noto Sans Multani","Noto Sans Myanmar","Noto Sans N Ko","Noto Sans Nabataean","Noto Sans New Tai Lue","Noto Sans Newa","Noto Sans Nushu","Noto Sans Ogham","Noto Sans Ol Chiki","Noto Sans Old Hungarian","Noto Sans Old Italic","Noto Sans Old North Arabian","Noto Sans Old Permic","Noto Sans Old Persian","Noto Sans Old Sogdian","Noto Sans Old South Arabian","Noto Sans Old Turkic","Noto Sans Oriya","Noto Sans Osage","Noto Sans Osmanya","Noto Sans Pahawh Hmong","Noto Sans Palmyrene","Noto Sans Pau Cin Hau","Noto Sans Phags Pa","Noto Sans Phoenician","Noto Sans Psalter Pahlavi","Noto Sans Rejang","Noto Sans Runic","Noto Sans SC","Noto Sans Samaritan","Noto Sans Saurashtra","Noto Sans Sharada","Noto Sans Shavian","Noto Sans Siddham","Noto Sans Sinhala","Noto Sans Sogdian","Noto Sans Sora Sompeng","Noto Sans Soyombo","Noto Sans Sundanese","Noto Sans Syloti Nagri","Noto Sans Symbols","Noto Sans Symbols 2","Noto Sans Syriac","Noto Sans TC","Noto Sans Tagalog","Noto Sans Tagbanwa","Noto Sans Tai Le","Noto Sans Tai Tham","Noto Sans Tai Viet","Noto Sans Takri","Noto Sans Tamil","Noto Sans Tamil Supplement","Noto Sans Telugu","Noto Sans Thaana","Noto Sans Thai","Noto Sans Thai Looped","Noto Sans Tifinagh","Noto Sans Tirhuta","Noto Sans Ugaritic","Noto Sans Vai","Noto Sans Wancho","Noto Sans Warang Citi","Noto Sans Yi","Noto Sans Zanabazar Square","Noto Serif","Noto Serif Ahom","Noto Serif Armenian","Noto Serif Balinese","Noto Serif Bengali","Noto Serif Devanagari","Noto Serif Display","Noto Serif Dogra","Noto Serif Ethiopic","Noto Serif Georgian","Noto Serif Grantha","Noto Serif Gujarati","Noto Serif Gurmukhi","Noto Serif Hebrew","Noto Serif JP","Noto Serif KR","Noto Serif Kannada","Noto Serif Khmer","Noto Serif Lao","Noto Serif Malayalam","Noto Serif Myanmar","Noto Serif Nyiakeng Puachue Hmong","Noto Serif SC","Noto Serif Sinhala","Noto Serif TC","Noto Serif Tamil","Noto Serif Tangut","Noto Serif Telugu","Noto Serif Thai","Noto Serif Tibetan","Noto Serif Yezidi","Noto Traditional Nushu","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Nunito Sans","Odibee Sans","Odor Mean Chey","Offside","Oi","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orelega One","Orienta","Original Surfer","Oswald","Otomanopee One","Over the Rainbow","Overlock","Overlock SC","Overpass","Overpass Mono","Ovo","Oxanium","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Padauk","Palanquin","Palanquin Dark","Palette Mosaic","Pangolin","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Pattaya","Patua One","Pavanam","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piazzolla","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poor Story","Poppins","Port Lligat Sans","Port Lligat Slab","Potta One","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Pridi","Princess Sofia","Prociono","Prompt","Prosto One","Proza Libre","Public Sans","Puritan","Purple Purse","Qahiri","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Rakkas","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Rampart One","Ranchers","Rancho","Ranga","Rasa","Rationale","Ravi Prakash","Recursive","Red Hat Display","Red Hat Text","Red Rose","Redressed","Reem Kufi","Reenie Beanie","Reggae One","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","RocknRoll One","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rowdies","Rozha One","Rubik","Rubik Beastly","Rubik Mono One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","STIX Two Text","Sacramento","Sahitya","Sail","Saira","Saira Condensed","Saira Extra Condensed","Saira Semi Condensed","Saira Stencil One","Salsa","Sanchez","Sancreek","Sansita","Sansita Swashed","Sarabun","Sarala","Sarina","Sarpanch","Satisfy","Sawarabi Gothic","Sawarabi Mincho","Scada","Scheherazade","Scheherazade New","Schoolbell","Scope One","Seaweed Script","Secular One","Sedgwick Ave","Sedgwick Ave Display","Sen","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shippori Mincho","Shippori Mincho B1","Shojumaru","Short Stack","Shrikhand","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Single Day","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Solway","Song Myung","Sonsie One","Sora","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Space Grotesk","Space Mono","Spartan","Special Elite","Spectral","Spectral SC","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Sriracha","Srisakdi","Staatliches","Stalemate","Stalinist One","Stardos Stencil","Stick","Stick No Bills","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Style Script","Stylish","Sue Ellen Francisco","Suez One","Sulphur Point","Sumana","Sunflower","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Syne","Syne Mono","Syne Tactile","Tajawal","Tangerine","Taprom","Tauri","Taviraj","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","Texturina","Thasadith","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Tomorrow","Tourney","Trade Winds","Train One","Trirong","Trispace","Trocchi","Trochut","Truculenta","Trykker","Tulpen One","Turret Road","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Uchen","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","Urbanist","VT323","Vampiro One","Varela","Varela Round","Varta","Vast Shadow","Vesper Libre","Viaoda Libre","Vibes","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Vollkorn SC","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","WindSong","Wire One","Work Sans","Xanh Mono","Yaldevi","Yanone Kaffeesatz","Yantramanav","Yatra One","Yellowtail","Yeon Sung","Yeseva One","Yesteryear","Yomogi","Yrsa","Yusei Magic","ZCOOL KuaiLe","ZCOOL QingKe HuangYou","ZCOOL XiaoWei","Zen Antique","Zen Antique Soft","Zen Dots","Zen Kaku Gothic Antique","Zen Kaku Gothic New","Zen Kurenaido","Zen Loop","Zen Maru Gothic","Zen Old Mincho","Zen Tokyo Zoo","Zeyada","Zhi Mang Xing","Zilla Slab","Zilla Slab Highlight"],Se=["value"],pe=g({__name:"FontInput",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:a}){const r=O(e.modelValue),t=he,n=()=>a("update:modelValue",r.value);return(i,s)=>$((h(),C("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),class:"select",onChange:n},[(h(!0),C(_,null,T(d(t),l=>(h(),C("option",{key:l,value:l},J(l),9,Se))),128))],544)),[[ee,r.value]])}});const me=L(pe,[["__scopeId","data-v-7aef3563"]]),ge={class:"header-content"},ve=["d"],fe={class:"body"},ye={class:"body-content"},Ce=g({__name:"PopOver",emits:["open","hide"],setup(e,{expose:a,emit:o}){const r=O(null),t=ae({visible:!1,originX:0,originY:0,dragging:null}),n=F(()=>({visibility:t.visible?"visible":"hidden",top:`${t.originY}px`,left:`${t.originX}px`}));oe(()=>{document.addEventListener("mousemove",v),document.addEventListener("mouseup",f)}),q(()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mousemove",f)});const i=()=>{t.visible=!1,o("hide")},s=S=>S>window.innerWidth/2,l=S=>{var k;if(t.visible=!0,!r.value)return;const y=(k=r==null?void 0:r.value)==null?void 0:k.getBoundingClientRect();if(S)if(s(S.clientX)?t.originX=S.clientX-y.width-32:t.originX=S.clientX+y.width+32,S.clientY+y.height>window.innerHeight){const Q=S.clientY+y.height-window.innerHeight;t.originY=S.clientY-Q-32}else t.originY=S.clientY;else t.originX=(window.innerWidth-y.width)/2,t.originY=(window.innerHeight-y.height)/2},p=S=>{t.dragging={initialX:t.originX,initialY:t.originY,clientX:S.clientX,clientY:S.clientY}},v=S=>{t.dragging&&(t.originX=t.dragging.initialX+S.clientX-t.dragging.clientX,t.originY=t.dragging.initialY+S.clientY-t.dragging.clientY)},f=()=>{t.dragging=null};return a({open:l}),(S,y)=>(h(),C("div",{ref_key:"popover",ref:r,class:"pop-over",style:X(d(n))},[c("div",{class:"header",onMousedown:p},[c("span",ge,[H(S.$slots,"header",{},void 0,!0)]),(h(),C("svg",{class:"icon",viewBox:"0 0 24 24",onClick:i},[c("path",{d:d(ue)},null,8,ve)]))],32),c("div",fe,[c("div",ye,[H(S.$slots,"body",{},void 0,!0)])])],4))}});const ke=L(Ce,[["__scopeId","data-v-dacbc73d"]]);/*! +import{d as g,r as O,W as $,X as ee,b as h,c as C,F as _,L as T,z as d,N as J,q as L,v as ae,K as F,o as oe,Y as q,x as c,B as H,A as X,t as m,e as u,E as G,D as B,Z as R,a as M,w as j,U as te,O as ne,Q as ie}from"./registerWidgets.89616af0.js";import{a as re}from"./asyncComputed.8ac91a75.js";import{W as se}from"./workspaces.621b79ad.js";import{L as le}from"./CircularLoading.0fb686c0.js";import{i as ue}from"./icons.9cfdae6d.js";import{b as P,S as ce}from"./SidebarPreview.e7347f81.js";import{S as de}from"./SaveButton.c0a67dea.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./lottie.fc57e5ac.js";import"./PlayerNavbar.2a5ed820.js";import"./runnerData.bd24d7de.js";import"./colors.bc71fdf2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="aca5f1fd-e746-4d06-8cf4-291684cb16ab",e._sentryDebugIdIdentifier="sentry-dbid-aca5f1fd-e746-4d06-8cf4-291684cb16ab")}catch{}})();const he=["ABeeZee","Abel","Abhaya Libre","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akaya Kanadaka","Akaya Telivigala","Akronim","Aladin","Alata","Alatsi","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Aleo","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allison","Allura","Almarai","Almendra","Almendra Display","Almendra SC","Alumni Sans","Amarante","Amaranth","Amatic SC","Amethysta","Amiko","Amiri","Amita","Anaheim","Andada Pro","Andika","Andika New Basic","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Antonio","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo","Archivo Black","Archivo Narrow","Are You Serious","Aref Ruqaa","Arima Madurai","Arimo","Arizonia","Armata","Arsenal","Artifika","Arvo","Arya","Asap","Asap Condensed","Asar","Asset","Assistant","Astloch","Asul","Athiti","Atkinson Hyperlegible","Atma","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Azeret Mono","B612","B612 Mono","Bad Script","Bahiana","Bahianita","Bai Jamjuree","Ballet","Baloo 2","Baloo Bhai 2","Baloo Bhaina 2","Baloo Chettan 2","Baloo Da 2","Baloo Paaji 2","Baloo Tamma 2","Baloo Tammudu 2","Baloo Thambi 2","Balsamiq Sans","Balthazar","Bangers","Barlow","Barlow Condensed","Barlow Semi Condensed","Barriecito","Barrio","Basic","Baskervville","Battambang","Baumans","Bayon","Be Vietnam","Be Vietnam Pro","Bebas Neue","Belgrano","Bellefair","Belleza","Bellota","Bellota Text","BenchNine","Benne","Bentham","Berkshire Swash","Besley","Beth Ellen","Bevan","Big Shoulders Display","Big Shoulders Inline Display","Big Shoulders Inline Text","Big Shoulders Stencil Display","Big Shoulders Stencil Text","Big Shoulders Text","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","BioRhyme","BioRhyme Expanded","Birthstone","Birthstone Bounce","Biryani","Bitter","Black And White Picture","Black Han Sans","Black Ops One","Blinker","Bodoni Moda","Bokor","Bona Nova","Bonbon","Bonheur Royale","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Brygada 1918","Bubblegum Sans","Bubbler One","Buenard","Bungee","Bungee Hairline","Bungee Inline","Bungee Outline","Bungee Shade","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Cairo","Caladea","Calistoga","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Caramel","Carattere","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Castoro","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Chakra Petch","Changa","Changa One","Chango","Charm","Charmonman","Chathura","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherish","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chilanka","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Coiny","Combo","Comfortaa","Comic Neue","Coming Soon","Commissioner","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Cormorant","Cormorant Garamond","Cormorant Infant","Cormorant SC","Cormorant Unicase","Cormorant Upright","Courgette","Courier Prime","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Pro","Crimson Text","Croissant One","Crushed","Cuprum","Cute Font","Cutive","Cutive Mono","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Damion","Dancing Script","Dangrek","Darker Grotesque","David Libre","Dawning of a New Day","Days One","Dekko","Dela Gothic One","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Do Hyeon","Dokdo","Domine","Donegal One","Doppio One","Dorsa","Dosis","DotGothic16","Dr Sugiyama","Duru Sans","Dynalight","EB Garamond","Eagle Lake","East Sea Dokdo","Eater","Economica","Eczar","El Messiri","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Encode Sans","Encode Sans Condensed","Encode Sans Expanded","Encode Sans SC","Encode Sans Semi Condensed","Encode Sans Semi Expanded","Engagement","Englebert","Enriqueta","Ephesis","Epilogue","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Explora","Fahkwang","Fanwood Text","Farro","Farsan","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Faustina","Federant","Federo","Felipa","Fenix","Festive","Finger Paint","Fira Code","Fira Mono","Fira Sans","Fira Sans Condensed","Fira Sans Extra Condensed","Fjalla One","Fjord One","Flamenco","Flavors","Fleur De Leah","Fondamento","Fontdiner Swanky","Forum","Francois One","Frank Ruhl Libre","Fraunces","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","Fuggles","GFS Didot","GFS Neohellenic","Gabriela","Gaegu","Gafata","Galada","Galdeano","Galindo","Gamja Flower","Gayathri","Gelasio","Gemunu Libre","Gentium Basic","Gentium Book Basic","Geo","Georama","Geostar","Geostar Fill","Germania One","Gideon Roman","Gidugu","Gilda Display","Girassol","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Glory","Gluten","Goblin One","Gochi Hand","Goldman","Gorditas","Gothic A1","Gotu","Goudy Bookletter 1911","Gowun Batang","Gowun Dodum","Graduate","Grand Hotel","Grandstander","Gravitas One","Great Vibes","Grechen Fuemen","Grenze","Grenze Gotisch","Grey Qo","Griffy","Gruppo","Gudea","Gugi","Gupter","Gurajada","Habibi","Hachi Maru Pop","Hahmlet","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Harmattan","Headland One","Heebo","Henny Penny","Hepta Slab","Herr Von Muellerhoff","Hi Melody","Hina Mincho","Hind","Hind Guntur","Hind Madurai","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IBM Plex Mono","IBM Plex Sans","IBM Plex Sans Arabic","IBM Plex Sans Condensed","IBM Plex Sans Devanagari","IBM Plex Sans Hebrew","IBM Plex Sans KR","IBM Plex Sans Thai","IBM Plex Sans Thai Looped","IBM Plex Serif","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Ibarra Real Nova","Iceberg","Iceland","Imbue","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Inria Sans","Inria Serif","Inter","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","JetBrains Mono","Jim Nightshade","Jockey One","Jolly Lodger","Jomhuria","Jomolhari","Josefin Sans","Josefin Slab","Jost","Joti One","Jua","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","K2D","Kadwa","Kaisei Decol","Kaisei HarunoUmi","Kaisei Opti","Kaisei Tokumin","Kalam","Kameron","Kanit","Kantumruy","Karantina","Karla","Karma","Katibeh","Kaushan Script","Kavivanar","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kirang Haerang","Kite One","Kiwi Maru","Klee One","Knewave","KoHo","Kodchasan","Koh Santepheap","Kosugi","Kosugi Maru","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Krub","Kufam","Kulim Park","Kumar One","Kumar One Outline","Kumbh Sans","Kurale","La Belle Aurore","Lacquer","Laila","Lakki Reddy","Lalezar","Lancelot","Langar","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Lemonada","Lexend","Lexend Deca","Lexend Exa","Lexend Giga","Lexend Mega","Lexend Peta","Lexend Tera","Lexend Zetta","Libre Barcode 128","Libre Barcode 128 Text","Libre Barcode 39","Libre Barcode 39 Extended","Libre Barcode 39 Extended Text","Libre Barcode 39 Text","Libre Barcode EAN13 Text","Libre Baskerville","Libre Caslon Display","Libre Caslon Text","Libre Franklin","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Literata","Liu Jian Mao Cao","Livvic","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Long Cang","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","M PLUS 1p","M PLUS Rounded 1c","Ma Shan Zheng","Macondo","Macondo Swash Caps","Mada","Magra","Maiden Orange","Maitree","Major Mono Display","Mako","Mali","Mallanna","Mandali","Manjari","Manrope","Mansalva","Manuale","Marcellus","Marcellus SC","Marck Script","Margarine","Markazi Text","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Material Icons","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Meera Inimai","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Mina","Miniver","Miriam Libre","Mirza","Miss Fajardose","Mitr","Modak","Modern Antiqua","Mogra","Molengo","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","MonteCarlo","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Mukta","Mukta Mahee","Mukta Malar","Mukta Vaani","Mulish","MuseoModerno","Mystery Quest","NTR","Nanum Brush Script","Nanum Gothic","Nanum Gothic Coding","Nanum Myeongjo","Nanum Pen Script","Nerko One","Neucha","Neuton","New Rocker","New Tegomin","News Cycle","Newsreader","Niconne","Niramit","Nixie One","Nobile","Nokora","Norican","Nosifer","Notable","Nothing You Could Do","Noticia Text","Noto Kufi Arabic","Noto Music","Noto Naskh Arabic","Noto Nastaliq Urdu","Noto Rashi Hebrew","Noto Sans","Noto Sans Adlam","Noto Sans Adlam Unjoined","Noto Sans Anatolian Hieroglyphs","Noto Sans Arabic","Noto Sans Armenian","Noto Sans Avestan","Noto Sans Balinese","Noto Sans Bamum","Noto Sans Bassa Vah","Noto Sans Batak","Noto Sans Bengali","Noto Sans Bhaiksuki","Noto Sans Brahmi","Noto Sans Buginese","Noto Sans Buhid","Noto Sans Canadian Aboriginal","Noto Sans Carian","Noto Sans Caucasian Albanian","Noto Sans Chakma","Noto Sans Cham","Noto Sans Cherokee","Noto Sans Coptic","Noto Sans Cuneiform","Noto Sans Cypriot","Noto Sans Deseret","Noto Sans Devanagari","Noto Sans Display","Noto Sans Duployan","Noto Sans Egyptian Hieroglyphs","Noto Sans Elbasan","Noto Sans Elymaic","Noto Sans Georgian","Noto Sans Glagolitic","Noto Sans Gothic","Noto Sans Grantha","Noto Sans Gujarati","Noto Sans Gunjala Gondi","Noto Sans Gurmukhi","Noto Sans HK","Noto Sans Hanifi Rohingya","Noto Sans Hanunoo","Noto Sans Hatran","Noto Sans Hebrew","Noto Sans Imperial Aramaic","Noto Sans Indic Siyaq Numbers","Noto Sans Inscriptional Pahlavi","Noto Sans Inscriptional Parthian","Noto Sans JP","Noto Sans Javanese","Noto Sans KR","Noto Sans Kaithi","Noto Sans Kannada","Noto Sans Kayah Li","Noto Sans Kharoshthi","Noto Sans Khmer","Noto Sans Khojki","Noto Sans Khudawadi","Noto Sans Lao","Noto Sans Lepcha","Noto Sans Limbu","Noto Sans Linear A","Noto Sans Linear B","Noto Sans Lisu","Noto Sans Lycian","Noto Sans Lydian","Noto Sans Mahajani","Noto Sans Malayalam","Noto Sans Mandaic","Noto Sans Manichaean","Noto Sans Marchen","Noto Sans Masaram Gondi","Noto Sans Math","Noto Sans Mayan Numerals","Noto Sans Medefaidrin","Noto Sans Meroitic","Noto Sans Miao","Noto Sans Modi","Noto Sans Mongolian","Noto Sans Mono","Noto Sans Mro","Noto Sans Multani","Noto Sans Myanmar","Noto Sans N Ko","Noto Sans Nabataean","Noto Sans New Tai Lue","Noto Sans Newa","Noto Sans Nushu","Noto Sans Ogham","Noto Sans Ol Chiki","Noto Sans Old Hungarian","Noto Sans Old Italic","Noto Sans Old North Arabian","Noto Sans Old Permic","Noto Sans Old Persian","Noto Sans Old Sogdian","Noto Sans Old South Arabian","Noto Sans Old Turkic","Noto Sans Oriya","Noto Sans Osage","Noto Sans Osmanya","Noto Sans Pahawh Hmong","Noto Sans Palmyrene","Noto Sans Pau Cin Hau","Noto Sans Phags Pa","Noto Sans Phoenician","Noto Sans Psalter Pahlavi","Noto Sans Rejang","Noto Sans Runic","Noto Sans SC","Noto Sans Samaritan","Noto Sans Saurashtra","Noto Sans Sharada","Noto Sans Shavian","Noto Sans Siddham","Noto Sans Sinhala","Noto Sans Sogdian","Noto Sans Sora Sompeng","Noto Sans Soyombo","Noto Sans Sundanese","Noto Sans Syloti Nagri","Noto Sans Symbols","Noto Sans Symbols 2","Noto Sans Syriac","Noto Sans TC","Noto Sans Tagalog","Noto Sans Tagbanwa","Noto Sans Tai Le","Noto Sans Tai Tham","Noto Sans Tai Viet","Noto Sans Takri","Noto Sans Tamil","Noto Sans Tamil Supplement","Noto Sans Telugu","Noto Sans Thaana","Noto Sans Thai","Noto Sans Thai Looped","Noto Sans Tifinagh","Noto Sans Tirhuta","Noto Sans Ugaritic","Noto Sans Vai","Noto Sans Wancho","Noto Sans Warang Citi","Noto Sans Yi","Noto Sans Zanabazar Square","Noto Serif","Noto Serif Ahom","Noto Serif Armenian","Noto Serif Balinese","Noto Serif Bengali","Noto Serif Devanagari","Noto Serif Display","Noto Serif Dogra","Noto Serif Ethiopic","Noto Serif Georgian","Noto Serif Grantha","Noto Serif Gujarati","Noto Serif Gurmukhi","Noto Serif Hebrew","Noto Serif JP","Noto Serif KR","Noto Serif Kannada","Noto Serif Khmer","Noto Serif Lao","Noto Serif Malayalam","Noto Serif Myanmar","Noto Serif Nyiakeng Puachue Hmong","Noto Serif SC","Noto Serif Sinhala","Noto Serif TC","Noto Serif Tamil","Noto Serif Tangut","Noto Serif Telugu","Noto Serif Thai","Noto Serif Tibetan","Noto Serif Yezidi","Noto Traditional Nushu","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Nunito Sans","Odibee Sans","Odor Mean Chey","Offside","Oi","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orelega One","Orienta","Original Surfer","Oswald","Otomanopee One","Over the Rainbow","Overlock","Overlock SC","Overpass","Overpass Mono","Ovo","Oxanium","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Padauk","Palanquin","Palanquin Dark","Palette Mosaic","Pangolin","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Pattaya","Patua One","Pavanam","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piazzolla","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poor Story","Poppins","Port Lligat Sans","Port Lligat Slab","Potta One","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Pridi","Princess Sofia","Prociono","Prompt","Prosto One","Proza Libre","Public Sans","Puritan","Purple Purse","Qahiri","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Rakkas","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Rampart One","Ranchers","Rancho","Ranga","Rasa","Rationale","Ravi Prakash","Recursive","Red Hat Display","Red Hat Text","Red Rose","Redressed","Reem Kufi","Reenie Beanie","Reggae One","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","RocknRoll One","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rowdies","Rozha One","Rubik","Rubik Beastly","Rubik Mono One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","STIX Two Text","Sacramento","Sahitya","Sail","Saira","Saira Condensed","Saira Extra Condensed","Saira Semi Condensed","Saira Stencil One","Salsa","Sanchez","Sancreek","Sansita","Sansita Swashed","Sarabun","Sarala","Sarina","Sarpanch","Satisfy","Sawarabi Gothic","Sawarabi Mincho","Scada","Scheherazade","Scheherazade New","Schoolbell","Scope One","Seaweed Script","Secular One","Sedgwick Ave","Sedgwick Ave Display","Sen","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shippori Mincho","Shippori Mincho B1","Shojumaru","Short Stack","Shrikhand","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Single Day","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Solway","Song Myung","Sonsie One","Sora","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Space Grotesk","Space Mono","Spartan","Special Elite","Spectral","Spectral SC","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Sriracha","Srisakdi","Staatliches","Stalemate","Stalinist One","Stardos Stencil","Stick","Stick No Bills","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Style Script","Stylish","Sue Ellen Francisco","Suez One","Sulphur Point","Sumana","Sunflower","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Syne","Syne Mono","Syne Tactile","Tajawal","Tangerine","Taprom","Tauri","Taviraj","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","Texturina","Thasadith","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Tomorrow","Tourney","Trade Winds","Train One","Trirong","Trispace","Trocchi","Trochut","Truculenta","Trykker","Tulpen One","Turret Road","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Uchen","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","Urbanist","VT323","Vampiro One","Varela","Varela Round","Varta","Vast Shadow","Vesper Libre","Viaoda Libre","Vibes","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Vollkorn SC","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","WindSong","Wire One","Work Sans","Xanh Mono","Yaldevi","Yanone Kaffeesatz","Yantramanav","Yatra One","Yellowtail","Yeon Sung","Yeseva One","Yesteryear","Yomogi","Yrsa","Yusei Magic","ZCOOL KuaiLe","ZCOOL QingKe HuangYou","ZCOOL XiaoWei","Zen Antique","Zen Antique Soft","Zen Dots","Zen Kaku Gothic Antique","Zen Kaku Gothic New","Zen Kurenaido","Zen Loop","Zen Maru Gothic","Zen Old Mincho","Zen Tokyo Zoo","Zeyada","Zhi Mang Xing","Zilla Slab","Zilla Slab Highlight"],Se=["value"],pe=g({__name:"FontInput",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:a}){const r=O(e.modelValue),t=he,n=()=>a("update:modelValue",r.value);return(i,s)=>$((h(),C("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),class:"select",onChange:n},[(h(!0),C(_,null,T(d(t),l=>(h(),C("option",{key:l,value:l},J(l),9,Se))),128))],544)),[[ee,r.value]])}});const me=L(pe,[["__scopeId","data-v-7aef3563"]]),ge={class:"header-content"},ve=["d"],fe={class:"body"},ye={class:"body-content"},Ce=g({__name:"PopOver",emits:["open","hide"],setup(e,{expose:a,emit:o}){const r=O(null),t=ae({visible:!1,originX:0,originY:0,dragging:null}),n=F(()=>({visibility:t.visible?"visible":"hidden",top:`${t.originY}px`,left:`${t.originX}px`}));oe(()=>{document.addEventListener("mousemove",v),document.addEventListener("mouseup",f)}),q(()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mousemove",f)});const i=()=>{t.visible=!1,o("hide")},s=S=>S>window.innerWidth/2,l=S=>{var k;if(t.visible=!0,!r.value)return;const y=(k=r==null?void 0:r.value)==null?void 0:k.getBoundingClientRect();if(S)if(s(S.clientX)?t.originX=S.clientX-y.width-32:t.originX=S.clientX+y.width+32,S.clientY+y.height>window.innerHeight){const Q=S.clientY+y.height-window.innerHeight;t.originY=S.clientY-Q-32}else t.originY=S.clientY;else t.originX=(window.innerWidth-y.width)/2,t.originY=(window.innerHeight-y.height)/2},p=S=>{t.dragging={initialX:t.originX,initialY:t.originY,clientX:S.clientX,clientY:S.clientY}},v=S=>{t.dragging&&(t.originX=t.dragging.initialX+S.clientX-t.dragging.clientX,t.originY=t.dragging.initialY+S.clientY-t.dragging.clientY)},f=()=>{t.dragging=null};return a({open:l}),(S,y)=>(h(),C("div",{ref_key:"popover",ref:r,class:"pop-over",style:X(d(n))},[c("div",{class:"header",onMousedown:p},[c("span",ge,[H(S.$slots,"header",{},void 0,!0)]),(h(),C("svg",{class:"icon",viewBox:"0 0 24 24",onClick:i},[c("path",{d:d(ue)},null,8,ve)]))],32),c("div",fe,[c("div",ye,[H(S.$slots,"body",{},void 0,!0)])])],4))}});const ke=L(Ce,[["__scopeId","data-v-dacbc73d"]]);/*! * vue-color-kit v1.0.4 * (c) 2021 * @license MIT */function w(e){let a={r:0,g:0,b:0,a:1};/#/.test(e)?a=be(e):/rgb/.test(e)?a=W(e):typeof e=="string"?a=W(`rgba(${e})`):Object.prototype.toString.call(e)==="[object Object]"&&(a=e);const{r:o,g:r,b:t,a:n}=a,{h:i,s,v:l}=Me(a);return{r:o,g:r,b:t,a:n===void 0?1:n,h:i,s,v:l}}function D(e){const a=document.createElement("canvas"),o=a.getContext("2d"),r=e*2;return a.width=r,a.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,e,e),o.fillRect(e,e,e,e),a}function x(e,a,o,r,t,n){const i=e==="l",s=a.createLinearGradient(0,0,i?o:0,i?0:r);s.addColorStop(.01,t),s.addColorStop(.99,n),a.fillStyle=s,a.fillRect(0,0,o,r)}function Ne({r:e,g:a,b:o},r){const t=i=>("0"+Number(i).toString(16)).slice(-2),n=`#${t(e)}${t(a)}${t(o)}`;return r?n.toUpperCase():n}function be(e){e=e.slice(1);const a=o=>parseInt(o,16)||0;return{r:a(e.slice(0,2)),g:a(e.slice(2,4)),b:a(e.slice(4,6))}}function W(e){return typeof e=="string"?(e=(/rgba?\((.*?)\)/.exec(e)||["","0,0,0,1"])[1].split(","),{r:Number(e[0])||0,g:Number(e[1])||0,b:Number(e[2])||0,a:Number(e[3]?e[3]:1)}):e}function Me({r:e,g:a,b:o}){e=e/255,a=a/255,o=o/255;const r=Math.max(e,a,o),t=Math.min(e,a,o),n=r-t;let i=0;r===t?i=0:r===e?a>=o?i=60*(a-o)/n:i=60*(a-o)/n+360:r===a?i=60*(o-e)/n+120:r===o&&(i=60*(e-a)/n+240),i=Math.floor(i);let s=parseFloat((r===0?0:1-t/r).toFixed(2)),l=parseFloat(r.toFixed(2));return{h:i,s,v:l}}var I=g({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const e=this.$refs.canvasSaturation,a=this.size,o=e.getContext("2d");e.width=a,e.height=a,o.fillStyle=this.color,o.fillRect(0,0,a,a),x("l",o,a,a,"#FFFFFF","rgba(255,255,255,0)"),x("p",o,a,a,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(e){const{top:a,left:o}=this.$el.getBoundingClientRect(),r=e.target.getContext("2d"),t=i=>{let s=i.clientX-o,l=i.clientY-a;s<0&&(s=0),l<0&&(l=0),s>this.size&&(s=this.size),l>this.size&&(l=this.size),this.slideSaturationStyle={left:s-5+"px",top:l-5+"px"};const p=r.getImageData(Math.min(s,this.size-1),Math.min(l,this.size-1),1,1),[v,f,S]=p.data;this.$emit("selectSaturation",{r:v,g:f,b:S})};t(e);const n=()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}}});const we={ref:"canvasSaturation"};function Oe(e,a,o,r,t,n){return h(),m("div",{class:"saturation",onMousedown:a[1]||(a[1]=G((...i)=>e.selectSaturation&&e.selectSaturation(...i),["prevent","stop"]))},[u("canvas",we,null,512),u("div",{style:e.slideSaturationStyle,class:"slide"},null,4)],32)}I.render=Oe;I.__file="src/color/Saturation.vue";var E=g({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const e=this.$refs.canvasHue,a=this.width,o=this.height,r=e.getContext("2d");e.width=a,e.height=o;const t=r.createLinearGradient(0,0,0,o);t.addColorStop(0,"#FF0000"),t.addColorStop(.17*1,"#FF00FF"),t.addColorStop(.17*2,"#0000FF"),t.addColorStop(.17*3,"#00FFFF"),t.addColorStop(.17*4,"#00FF00"),t.addColorStop(.17*5,"#FFFF00"),t.addColorStop(1,"#FF0000"),r.fillStyle=t,r.fillRect(0,0,a,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(e){const{top:a}=this.$el.getBoundingClientRect(),o=e.target.getContext("2d"),r=n=>{let i=n.clientY-a;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const s=o.getImageData(0,Math.min(i,this.height-1),1,1),[l,p,v]=s.data;this.$emit("selectHue",{r:l,g:p,b:v})};r(e);const t=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",t)}}});const Ae={ref:"canvasHue"};function Be(e,a,o,r,t,n){return h(),m("div",{class:"hue",onMousedown:a[1]||(a[1]=G((...i)=>e.selectHue&&e.selectHue(...i),["prevent","stop"]))},[u("canvas",Ae,null,512),u("div",{style:e.slideHueStyle,class:"slide"},null,4)],32)}E.render=Be;E.__file="src/color/Hue.vue";var K=g({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const e=this.$refs.canvasAlpha,a=this.width,o=this.height,r=this.alphaSize,t=D(r),n=e.getContext("2d");e.width=a,e.height=o,n.fillStyle=n.createPattern(t,"repeat"),n.fillRect(0,0,a,o),x("p",n,a,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(e){const{top:a}=this.$el.getBoundingClientRect(),o=t=>{let n=t.clientY-a;n<0&&(n=0),n>this.height&&(n=this.height);let i=parseFloat((n/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(e);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Pe={ref:"canvasAlpha"};function Fe(e,a,o,r,t,n){return h(),m("div",{class:"color-alpha",onMousedown:a[1]||(a[1]=G((...i)=>e.selectAlpha&&e.selectAlpha(...i),["prevent","stop"]))},[u("canvas",Pe,null,512),u("div",{style:e.slideAlphaStyle,class:"slide"},null,4)],32)}K.render=Fe;K.__file="src/color/Alpha.vue";var V=g({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const e=this.$el,a=this.width,o=this.height,r=this.alphaSize,t=D(r),n=e.getContext("2d");e.width=a,e.height=o,n.fillStyle=n.createPattern(t,"repeat"),n.fillRect(0,0,a,o),n.fillStyle=this.color,n.fillRect(0,0,a,o)}}});function Le(e,a,o,r,t,n){return h(),m("canvas")}V.render=Le;V.__file="src/color/Preview.vue";var U=g({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(e){this.isSucking=!1,this.suckColor(e)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(e){e.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(e){const{clientX:a,clientY:o}=e,{top:r,left:t,width:n,height:i}=this.suckerCanvas.getBoundingClientRect(),s=a-t,l=o-r,v=this.suckerCanvas.getContext("2d").getImageData(Math.min(s,n-1),Math.min(l,i-1),1,1);let[f,S,y,k]=v.data;k=parseFloat((k/255).toFixed(2));const N=this.suckerPreview.style;Object.assign(N,{position:"absolute",left:a+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${f}, ${S}, ${y}, ${k})`,zIndex:95}),this.suckerArea.length&&a>=this.suckerArea[0]&&o>=this.suckerArea[1]&&a<=this.suckerArea[2]&&o<=this.suckerArea[3]?N.display="":N.display="none"},suckColor(e){e&&e.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),e.addEventListener("click",a=>{const{clientX:o,clientY:r}=a,{top:t,left:n,width:i,height:s}=e.getBoundingClientRect(),l=o-n,p=r-t,f=e.getContext("2d").getImageData(Math.min(l,i-1),Math.min(p,s-1),1,1);let[S,y,k,N]=f.data;N=parseFloat((N/255).toFixed(2)),this.$emit("selectSucker",{r:S,g:y,b:k,a:N})}))}}});const $e=u("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),_e={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Te=u("g",{fill:"none","fill-rule":"evenodd"},[u("g",{transform:"translate(1 1)","stroke-width":"4"},[u("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),u("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[u("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function He(e,a,o,r,t,n){return h(),m("div",null,[e.isSucking?B("v-if",!0):(h(),m("svg",{key:0,class:[{active:e.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:a[1]||(a[1]=(...i)=>e.openSucker&&e.openSucker(...i))},[$e],2)),e.isSucking?(h(),m("svg",_e,[Te])):B("v-if",!0)])}U.render=He;U.__file="src/color/Sucker.vue";var z=g({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor"],setup(e,{emit:a}){return{modelColor:F({get(){return e.color||""},set(r){a("inputColor",r)}})}}});const Re={class:"color-type"},xe={class:"name"};function Ge(e,a,o,r,t,n){return h(),m("div",Re,[u("span",xe,J(e.name),1),$(u("input",{"onUpdate:modelValue":a[1]||(a[1]=i=>e.modelColor=i),class:"value"},null,512),[[R,e.modelColor]])])}z.render=Ge;z.__file="src/color/Box.vue";var Y=g({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(e,{emit:a}){const o=O(),r=O([]),t=O();e.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(e.colorsHistoryKey))||[]),t.value=D(4).toDataURL(),q(()=>{n(o.value)});function n(s){if(!s)return;const l=r.value||[],p=l.indexOf(s);p>=0&&l.splice(p,1),l.length>=8&&(l.length=7),l.unshift(s),r.value=l||[],localStorage&&e.colorsHistoryKey&&localStorage.setItem(e.colorsHistoryKey,JSON.stringify(l))}function i(s){a("selectColor",s)}return{setColorsHistory:n,colorsHistory:r,color:o,imgAlphaBase64:t,selectColor:i}}});const De={class:"colors"},Ie={key:0,class:"colors history"};function Ee(e,a,o,r,t,n){return h(),m("div",null,[u("ul",De,[(h(!0),m(_,null,T(e.colorsDefault,i=>(h(),m("li",{key:i,class:"item",onClick:s=>e.selectColor(i)},[u("div",{style:{background:`url(${e.imgAlphaBase64})`},class:"alpha"},null,4),u("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),e.colorsHistory.length?(h(),m("ul",Ie,[(h(!0),m(_,null,T(e.colorsHistory,i=>(h(),m("li",{key:i,class:"item",onClick:s=>e.selectColor(i)},[u("div",{style:{background:`url(${e.imgAlphaBase64})`},class:"alpha"},null,4),u("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):B("v-if",!0)])}Y.render=Ee;Y.__file="src/color/Colors.vue";var A=g({components:{Saturation:I,Hue:E,Alpha:K,Preview:V,Sucker:U,Box:z,Colors:Y},emits:["changeColor","openSucker"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return Ne(this.rgba,!0)}},created(){Object.assign(this,w(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(e){const{r:a,g:o,b:r,h:t,s:n,v:i}=w(e);Object.assign(this,{r:a,g:o,b:r,h:t,s:n,v:i}),this.setText()},selectHue(e){const{r:a,g:o,b:r,h:t,s:n,v:i}=w(e);Object.assign(this,{r:a,g:o,b:r,h:t,s:n,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(e){this.a=e,this.setText()},inputHex(e){const{r:a,g:o,b:r,a:t,h:n,s:i,v:s}=w(e);Object.assign(this,{r:a,g:o,b:r,a:t,h:n,s:i,v:s}),this.modelHex=e,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(e){const{r:a,g:o,b:r,a:t,h:n,s:i,v:s}=w(e);Object.assign(this,{r:a,g:o,b:r,a:t,h:n,s:i,v:s}),this.modelHex=this.hexString,this.modelRgba=e,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(e){this.$emit("openSucker",e)},selectSucker(e){const{r:a,g:o,b:r,a:t,h:n,s:i,v:s}=w(e);Object.assign(this,{r:a,g:o,b:r,a:t,h:n,s:i,v:s}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(e){const{r:a,g:o,b:r,a:t,h:n,s:i,v:s}=w(e);Object.assign(this,{r:a,g:o,b:r,a:t,h:n,s:i,v:s}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Ke={class:"color-set"};function Ve(e,a,o,r,t,n){const i=M("Saturation"),s=M("Hue"),l=M("Alpha"),p=M("Preview"),v=M("Sucker"),f=M("Box"),S=M("Colors");return h(),m("div",{class:["hu-color-picker",{light:e.isLightTheme}],style:{width:e.totalWidth+"px"}},[u("div",Ke,[u(i,{ref:"saturation",color:e.rgbString,hsv:e.hsv,size:e.hueHeight,onSelectSaturation:e.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),u(s,{ref:"hue",hsv:e.hsv,width:e.hueWidth,height:e.hueHeight,onSelectHue:e.selectHue},null,8,["hsv","width","height","onSelectHue"]),u(l,{ref:"alpha",color:e.rgbString,rgba:e.rgba,width:e.hueWidth,height:e.hueHeight,onSelectAlpha:e.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),u("div",{style:{height:e.previewHeight+"px"},class:"color-show"},[u(p,{color:e.rgbaString,width:e.previewWidth,height:e.previewHeight},null,8,["color","width","height"]),e.suckerHide?B("v-if",!0):(h(),m(v,{key:0,"sucker-canvas":e.suckerCanvas,"sucker-area":e.suckerArea,onOpenSucker:e.openSucker,onSelectSucker:e.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),u(f,{name:"HEX",color:e.modelHex,onInputColor:e.inputHex},null,8,["color","onInputColor"]),u(f,{name:"RGBA",color:e.modelRgba,onInputColor:e.inputRgba},null,8,["color","onInputColor"]),u(S,{color:e.rgbaString,"colors-default":e.colorsDefault,"colors-history-key":e.colorsHistoryKey,onSelectColor:e.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),B(" custom options "),H(e.$slots,"default")],6)}A.render=Ve;A.__file="src/color/ColorPicker.vue";A.install=e=>{e.component(A.name,A)};const Ue={class:"color-input"},ze={class:"color-picker-wrapper"},Ye=g({__name:"ColorInput",props:{value:null},emits:["input","change"],setup(e,{emit:a}){const o=O(null),r=n=>{var i;return(i=o.value)==null?void 0:i.open(n)},t=({hex:n})=>{a("input",n),a("change",n)};return(n,i)=>(h(),C("div",Ue,[c("div",{class:"color-input-container",style:X({backgroundColor:e.value}),onClick:r},null,4),u(ke,{ref_key:"popover",ref:o},{header:j(()=>[te(" Pick a Color ")]),body:j(()=>[c("div",ze,[u(d(A),{color:e.value,theme:"light",onChangeColor:t},null,8,["color"])])]),_:1},512)]))}});const Z=L(Ye,[["__scopeId","data-v-0ab26bad"]]),je={class:"background-selector"},We=["selected"],Je=["selected"],qe=["value"],Xe=g({__name:"BackgroundSelector",props:{modelValue:null},emits:["update:modelValue"],setup(e,{emit:a}){const o=e,r=s=>a("update:modelValue",s),t=s=>{const l=s.options,p=l[l.selectedIndex].value;r(p==="color"?"#ffffff":"")},n=F(()=>P(o.modelValue)==="color"?o.modelValue:""),i=F(()=>o.modelValue);return(s,l)=>(h(),C("div",je,[c("select",{class:"background-type-select",onChange:l[0]||(l[0]=p=>t(p.target))},[c("option",{value:"color",selected:d(P)(e.modelValue)==="color"}," Color ",8,We),c("option",{value:"image",selected:d(P)(e.modelValue)==="hosted-image"||d(P)(e.modelValue)==="external-image"}," Image ",8,Je)],32),d(P)(e.modelValue)==="color"?(h(),m(Z,{key:0,value:d(n),class:"input-container color",onChange:r},null,8,["value"])):(h(),C("input",{key:1,value:d(i),class:"image-input",type:"text",onInput:l[1]||(l[1]=p=>r(p.target.value))},null,40,qe))]))}});const Ze=L(Xe,[["__scopeId","data-v-2d6b0e05"]]),Qe=e=>{try{return new URL(e),!0}catch{return!1}},b=e=>(ne("data-v-0f97b45f"),e=e(),ie(),e),ea={key:1,class:"workspace-style"},aa=b(()=>c("h1",null,"Workspace Style",-1)),oa={class:"logo-property"},ta=["src"],na={class:"logo-input-container"},ia=b(()=>c("div",{class:"instructions"},[c("p",null,"SVG or transparent PNG recommended. GIF, JPG also supported.")],-1)),ra=b(()=>c("div",{class:"logo-label"},"Logo url",-1)),sa={class:"logo-input"},la={class:"content-row"},ua={class:"property column"},ca=b(()=>c("div",{class:"property-label"},"Brand Name",-1)),da={class:"content-row"},ha={class:"property column"},Sa=b(()=>c("div",{class:"property-label"},"Select font",-1)),pa={class:"property column"},ma=b(()=>c("div",{class:"property-label"},"Main color",-1)),ga={class:"content-row"},va={class:"property column"},fa=b(()=>c("div",{class:"property-label"},"Background",-1)),ya=b(()=>c("h2",null,"Preview",-1)),Ca=g({__name:"StyleEditor",setup(e){const{result:a,loading:o}=re(()=>se.get()),r=F(()=>{var t,n,i;return!a.value||!a.value.logoUrl?"":Qe((t=a.value)==null?void 0:t.logoUrl)?(n=a.value)==null?void 0:n.logoUrl:(i=a.value)!=null&&i.logoUrl?`/_editor/api/assets/${a.value.logoUrl}`:""});return(t,n)=>d(o)||!d(a)?(h(),m(le,{key:0})):(h(),C("div",ea,[aa,c("div",oa,[d(a).logoUrl?(h(),C("img",{key:0,src:d(r),class:"logo-image"},null,8,ta)):B("",!0),c("div",na,[ia,ra,c("div",sa,[$(c("input",{"onUpdate:modelValue":n[0]||(n[0]=i=>d(a).logoUrl=i),class:"property-input",type:"text"},null,512),[[R,d(a).logoUrl]])])])]),c("div",la,[c("div",ua,[ca,$(c("input",{"onUpdate:modelValue":n[1]||(n[1]=i=>d(a).brandName=i),class:"property-input",type:"text"},null,512),[[R,d(a).brandName]])])]),c("div",da,[c("div",ha,[Sa,u(me,{modelValue:d(a).fontFamily,"onUpdate:modelValue":n[2]||(n[2]=i=>d(a).fontFamily=i)},null,8,["modelValue"])]),c("div",pa,[ma,u(Z,{value:d(a).mainColor,onInput:n[3]||(n[3]=i=>d(a).mainColor=i),onChange:n[4]||(n[4]=i=>d(a).mainColor=d(a).mainColor)},null,8,["value"])])]),c("div",ga,[c("div",va,[fa,u(Ze,{modelValue:d(a).theme,"onUpdate:modelValue":n[5]||(n[5]=i=>d(a).theme=i)},null,8,["modelValue"])])]),ya,u(ce,{workspace:d(a)},null,8,["workspace"]),u(de,{model:d(a)},null,8,["model"])]))}});const Ta=L(Ca,[["__scopeId","data-v-0f97b45f"]]);export{Ta as default}; -//# sourceMappingURL=StyleEditor.c9fef8ca.js.map +//# sourceMappingURL=StyleEditor.ec27cc19.js.map diff --git a/abstra_statics/dist/assets/Tab.1de0ecf6.js b/abstra_statics/dist/assets/Tab.1de0ecf6.js new file mode 100644 index 0000000000..d98048dd35 --- /dev/null +++ b/abstra_statics/dist/assets/Tab.1de0ecf6.js @@ -0,0 +1,2 @@ +import{d as b,v as h,y as g,K as T,o as y,b as o,c,x as _,z as u,B as r,D as p,F as k,L as I,aa as w,a as D,G as $,t as A,U as C,N as x,q as m,ab as B,W as M,ac as N}from"./registerWidgets.89616af0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="7fc61149-c914-4e9c-87a4-6cb4915ebe1d",s._sentryDebugIdIdentifier="sentry-dbid-7fc61149-c914-4e9c-87a4-6cb4915ebe1d")}catch{}})();const S={class:"tab-menu"},E={class:"tabs"},U={key:0,class:"group"},V={class:"group"},z=["onClick"],F={key:1,class:"group"},L={class:"content"},j=b({__name:"TabMenuUnderline",setup(s){const e=h([]),n=g(),d=t=>{const f=i=>i==t;e.forEach((i,a)=>{i.isActive=f(a)})},l=T(()=>e.findIndex(t=>t.isActive));return w("addTab",t=>{e.push(t)}),y(()=>{d(0)}),(t,f)=>{const i=D("icon");return o(),c("div",S,[_("div",E,[u(n).left?(o(),c("div",U,[r(t.$slots,"left",{},void 0,!0)])):p("",!0),_("div",V,[(o(!0),c(k,null,I(e,(a,v)=>(o(),c("button",{key:a.title,class:$(["form-tab",u(l)==v&&"active"]),onClick:K=>d(v)},[a.icon?(o(),A(i,{key:0,path:a.icon,fill:"#8692A5",width:"10",height:"10"},null,8,["path"])):p("",!0),C(" "+x(a.title),1)],10,z))),128))]),u(n).right?(o(),c("div",F,[r(t.$slots,"right",{},void 0,!0)])):p("",!0)]),_("div",L,[r(t.$slots,"default",{},void 0,!0)])])}}});const H=m(j,[["__scopeId","data-v-60b2affa"]]),q={class:"tab"},G=b({__name:"Tab",props:{title:null,icon:null},setup(s){const e=s,n=h({isActive:!1,title:e.title,icon:e.icon}),d=B("addTab");return y(()=>{d(n)}),(l,t)=>M((o(),c("div",q,[r(l.$slots,"default",{},void 0,!0)],512)),[[N,n.isActive]])}});const J=m(G,[["__scopeId","data-v-9c2e92c2"]]);export{H as T,J as a}; +//# sourceMappingURL=Tab.1de0ecf6.js.map diff --git a/abstra_statics/dist/assets/Tab.55e05bca.js b/abstra_statics/dist/assets/Tab.55e05bca.js deleted file mode 100644 index 5f81c3c0e1..0000000000 --- a/abstra_statics/dist/assets/Tab.55e05bca.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as b,v as h,y as g,K as T,o as y,b as a,c,x as _,z as u,B as r,D as p,F as k,L as I,aa as w,a as D,G as $,t as A,U as C,N as x,q as m,ab as B,W as M,ac as N}from"./registerWidgets.ca6243ef.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="80719d3a-9405-46c1-ab6c-1e16c661656a",s._sentryDebugIdIdentifier="sentry-dbid-80719d3a-9405-46c1-ab6c-1e16c661656a")}catch{}})();const S={class:"tab-menu"},E={class:"tabs"},U={key:0,class:"group"},V={class:"group"},z=["onClick"],F={key:1,class:"group"},L={class:"content"},j=b({__name:"TabMenuUnderline",setup(s){const e=h([]),o=g(),d=t=>{const v=i=>i==t;e.forEach((i,n)=>{i.isActive=v(n)})},l=T(()=>e.findIndex(t=>t.isActive));return w("addTab",t=>{e.push(t)}),y(()=>{d(0)}),(t,v)=>{const i=D("icon");return a(),c("div",S,[_("div",E,[u(o).left?(a(),c("div",U,[r(t.$slots,"left",{},void 0,!0)])):p("",!0),_("div",V,[(a(!0),c(k,null,I(e,(n,f)=>(a(),c("button",{key:n.title,class:$(["form-tab",u(l)==f&&"active"]),onClick:K=>d(f)},[n.icon?(a(),A(i,{key:0,path:n.icon,fill:"#8692A5",width:"10",height:"10"},null,8,["path"])):p("",!0),C(" "+x(n.title),1)],10,z))),128))]),u(o).right?(a(),c("div",F,[r(t.$slots,"right",{},void 0,!0)])):p("",!0)]),_("div",L,[r(t.$slots,"default",{},void 0,!0)])])}}});const H=m(j,[["__scopeId","data-v-60b2affa"]]),q={class:"tab"},G=b({__name:"Tab",props:{title:null,icon:null},setup(s){const e=s,o=h({isActive:!1,title:e.title,icon:e.icon}),d=B("addTab");return y(()=>{d(o)}),(l,t)=>M((a(),c("div",q,[r(l.$slots,"default",{},void 0,!0)],512)),[[N,o.isActive]])}});const J=m(G,[["__scopeId","data-v-9c2e92c2"]]);export{H as T,J as a}; -//# sourceMappingURL=Tab.55e05bca.js.map diff --git a/abstra_statics/dist/assets/TableEditor.cf8a13f0.js b/abstra_statics/dist/assets/TableEditor.440cab96.js similarity index 66% rename from abstra_statics/dist/assets/TableEditor.cf8a13f0.js rename to abstra_statics/dist/assets/TableEditor.440cab96.js index 15b84308c6..c3b7290aec 100644 --- a/abstra_statics/dist/assets/TableEditor.cf8a13f0.js +++ b/abstra_statics/dist/assets/TableEditor.440cab96.js @@ -1,2 +1,2 @@ -import{a as S}from"./asyncComputed.3cb2e10b.js";import{d as B,H as q,b as e,c as n,x as t,W as h,Z as x,F as k,L as w,t as I,z as d,I as R,D as T,X as z,N as $,a3 as H,e as m,U as M,O as J,Q as K,q as Q,r as D,ad as U,w as C,J as W}from"./registerWidgets.ca6243ef.js";import{T as A}from"./tables.94b40ff0.js";import{L}from"./CircularLoading.5630a601.js";import{T as X,a as E}from"./Tab.55e05bca.js";import{B as Z}from"./BackButton.6790f37d.js";import{D as G,r as F,C as P,g as Y,i as ee}from"./icons.11151937.js";import{D as te}from"./DocsButton.b174b81b.js";import{S as le}from"./SaveButton.e379ab16.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./lottie.9d24e472.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[o]="bb764d2d-0a40-40f1-a557-60b2c365403e",l._sentryDebugIdIdentifier="sentry-dbid-bb764d2d-0a40-40f1-a557-60b2c365403e")}catch{}})();const N=l=>(J("data-v-36a6e10a"),l=l(),K(),l),ae={class:"table-settings"},ne=N(()=>t("label",null,"Name",-1)),oe={class:"table-field"},se={class:"columns"},ue=N(()=>t("label",null,"Columns",-1)),de=["onUpdate:modelValue"],re=["onUpdate:modelValue"],ie=["onUpdate:modelValue"],ce=["onUpdate:modelValue","disabled"],pe=N(()=>t("label",null,"Not null",-1)),me=["onClick"],be=B({__name:"TableSettings",props:{table:null},setup(l){var b;const o=l,{result:c}=S(()=>A.dbTypes()),g=q();(b=o.table)==null||b.onUpdate(()=>{g.replace({name:"tableEditor",params:{tableName:o.table.name}})});function v(p){confirm(`Are you sure you want to delete column "${p}"?`)&&o.table.deleteColumn(p)}function u(){if(!c.value)return;const p=c.value[0].type,_=prompt("Enter column name");!_||o.table.addColumn(_,p)}return(p,_)=>(e(),n("div",ae,[ne,t("div",oe,[h(t("input",{"onUpdate:modelValue":_[0]||(_[0]=a=>l.table.name=a),class:"table-name"},null,512),[[x,l.table.name]])]),t("div",se,[ue,(e(!0),n(k,null,w(l.table.getColumns(),a=>(e(),n("div",{key:a.id,class:"column"},[a.primary_key?(e(),I(R,{key:0,class:"column-primary-key",path:d(G)},null,8,["path"])):T("",!0),d(c)?h((e(),n("select",{key:1,"onUpdate:modelValue":i=>a.type=i,class:"column-type"},[(e(!0),n(k,null,w(d(c),i=>(e(),n("option",{key:i.type},$(i.type),1))),128))],8,de)),[[z,a.type]]):T("",!0),h(t("input",{"onUpdate:modelValue":i=>a.name=i,class:"column-name",placeholder:"Column name"},null,8,re),[[x,a.name]]),h(t("input",{"onUpdate:modelValue":i=>a.default=i,class:"column-default",placeholder:"Default value"},null,8,ie),[[x,a.default]]),h(t("input",{"onUpdate:modelValue":i=>a.not_null=i,type:"checkbox",disabled:!a.default},null,8,ce),[[H,a.not_null]]),pe,a.primary_key?T("",!0):(e(),n("button",{key:2,class:"button delete",onClick:i=>v(a.name)},[m(R,{path:d(F)},null,8,["path"])],8,me))]))),128)),t("button",{class:"button add",onClick:_[1]||(_[1]=a=>u())},[m(R,{path:d(P)},null,8,["path"]),M(" Add Column")])])]))}});const _e=Q(be,[["__scopeId","data-v-36a6e10a"]]),ve={class:"table-data"},ye={class:"column-header"},fe={class:"column-name"},he=t("th",null,null,-1),ke={key:1},we=["open"],ge={key:0,class:"editing-row-content"},Ce={class:"editing-row-header"},$e=["onUpdate:modelValue"],Te={key:0,class:"row-error"},Ve=B({__name:"TableData",props:{table:null},setup(l){const o=l,{result:c,loading:g,refetch:v}=S(()=>o.table.select()),u=D(null),b=D(null),p=D(null);function _(){!o.table||(u.value={},p.value=null,b.value=null)}function a(r){return Object.keys(r).reduce((V,s)=>{var y;return(y=o.table.getColumns().find(f=>f.name===s))!=null&&y.primary_key?{[s]:r[s]}:V},{})}async function i(){if(!(!o.table||!u.value))if(p.value){const r=await o.table.updateRow(a(p.value),u.value);r.type==="update-row:error"?b.value=r.reason:(u.value=null,p.value=null,b.value=null,v())}else{const r=await o.table.insertRow(u.value);r.type==="insert-row:error"?b.value=r.reason:(u.value=null,p.value=null,b.value=null,v())}}function O(r){!o.table||(u.value={...r},p.value={...r},b.value=null)}async function j(r){confirm("Are you sure you want to delete this row?")&&(await o.table.deleteRow(a(r)),v())}return(r,V)=>(e(),n("div",ve,[t("button",{class:"add-row",onClick:_},"Add Row"),t("table",null,[t("thead",null,[t("tr",null,[(e(!0),n(k,null,w(l.table.getColumns(),s=>(e(),n("th",{key:s.id},[t("div",ye,[t("div",fe,$(s.name),1)])]))),128)),he])]),d(g)?(e(),I(L,{key:0})):(e(),n("tbody",ke,[(e(!0),n(k,null,w(d(c),(s,y)=>(e(),n("tr",{key:y},[(e(!0),n(k,null,w(l.table.getColumns(),f=>(e(),n("td",{key:f.id},$(s[f.name]),1))),128)),t("td",null,[m(U,{class:"delete-row",path:d(F),onClick:f=>j(s)},null,8,["path","onClick"]),m(U,{class:"edit-row",path:d(Y),onClick:f=>O(s)},null,8,["path","onClick"])])]))),128))]))]),t("dialog",{class:"editing-row-container",open:!!u.value},[u.value?(e(),n("div",ge,[t("div",Ce,[M(" New Row "),m(U,{path:d(ee),class:"close",onClick:V[0]||(V[0]=s=>u.value=null)},null,8,["path"])]),(e(!0),n(k,null,w(l.table.getColumns(),s=>(e(),n("div",{key:s.id,class:"column"},[t("label",null,$(s.name),1),h(t("input",{"onUpdate:modelValue":y=>u.value[s.name]=y,type:"text"},null,8,$e),[[x,u.value[s.name]]])]))),128)),t("button",{class:"button save",onClick:i},"Save"),b.value?(e(),n("div",Te,$(b.value),1)):T("",!0)])):T("",!0)],8,we)]))}});const Fe=B({__name:"TableEditor",setup(l){const o=W(),{result:c,loading:g}=S(()=>A.get(o.params.tableName));return(v,u)=>d(g)||!d(c)?(e(),I(L,{key:0})):(e(),I(X,{key:1,class:"editor"},{left:C(()=>[m(Z,{link:"/_editor/tables"})]),right:C(()=>[m(te,{path:"tables/overview"}),m(le,{model:d(c)},null,8,["model"])]),default:C(()=>[m(E,{title:"Table data"},{default:C(()=>[m(Ve,{table:d(c)},null,8,["table"])]),_:1}),m(E,{title:"Settings"},{default:C(()=>[m(_e,{table:d(c)},null,8,["table"])]),_:1})]),_:1}))}});export{Fe as default}; -//# sourceMappingURL=TableEditor.cf8a13f0.js.map +import{a as S}from"./asyncComputed.8ac91a75.js";import{d as B,H as q,b as e,c as n,x as t,W as h,Z as x,F as k,L as w,t as I,z as d,I as R,D as T,X as z,N as $,a3 as H,e as m,U as M,O as J,Q as K,q as Q,r as D,ad as U,w as C,J as W}from"./registerWidgets.89616af0.js";import{T as A}from"./tables.b83ad23f.js";import{L}from"./CircularLoading.0fb686c0.js";import{T as X,a as E}from"./Tab.1de0ecf6.js";import{B as Z}from"./BackButton.6e480dd1.js";import{D as G,r as F,C as P,g as Y,i as ee}from"./icons.9cfdae6d.js";import{D as te}from"./DocsButton.f9b71025.js";import{S as le}from"./SaveButton.c0a67dea.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./lottie.fc57e5ac.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[o]="681319e6-9b8e-472a-a2c1-2c9f854192e1",l._sentryDebugIdIdentifier="sentry-dbid-681319e6-9b8e-472a-a2c1-2c9f854192e1")}catch{}})();const N=l=>(J("data-v-36a6e10a"),l=l(),K(),l),ae={class:"table-settings"},ne=N(()=>t("label",null,"Name",-1)),oe={class:"table-field"},se={class:"columns"},ue=N(()=>t("label",null,"Columns",-1)),de=["onUpdate:modelValue"],re=["onUpdate:modelValue"],ie=["onUpdate:modelValue"],ce=["onUpdate:modelValue","disabled"],pe=N(()=>t("label",null,"Not null",-1)),me=["onClick"],_e=B({__name:"TableSettings",props:{table:null},setup(l){var _;const o=l,{result:c}=S(()=>A.dbTypes()),g=q();(_=o.table)==null||_.onUpdate(()=>{g.replace({name:"tableEditor",params:{tableName:o.table.name}})});function v(p){confirm(`Are you sure you want to delete column "${p}"?`)&&o.table.deleteColumn(p)}function u(){if(!c.value)return;const p=c.value[0].type,b=prompt("Enter column name");!b||o.table.addColumn(b,p)}return(p,b)=>(e(),n("div",ae,[ne,t("div",oe,[h(t("input",{"onUpdate:modelValue":b[0]||(b[0]=a=>l.table.name=a),class:"table-name"},null,512),[[x,l.table.name]])]),t("div",se,[ue,(e(!0),n(k,null,w(l.table.getColumns(),a=>(e(),n("div",{key:a.id,class:"column"},[a.primary_key?(e(),I(R,{key:0,class:"column-primary-key",path:d(G)},null,8,["path"])):T("",!0),d(c)?h((e(),n("select",{key:1,"onUpdate:modelValue":i=>a.type=i,class:"column-type"},[(e(!0),n(k,null,w(d(c),i=>(e(),n("option",{key:i.type},$(i.type),1))),128))],8,de)),[[z,a.type]]):T("",!0),h(t("input",{"onUpdate:modelValue":i=>a.name=i,class:"column-name",placeholder:"Column name"},null,8,re),[[x,a.name]]),h(t("input",{"onUpdate:modelValue":i=>a.default=i,class:"column-default",placeholder:"Default value"},null,8,ie),[[x,a.default]]),h(t("input",{"onUpdate:modelValue":i=>a.not_null=i,type:"checkbox",disabled:!a.default},null,8,ce),[[H,a.not_null]]),pe,a.primary_key?T("",!0):(e(),n("button",{key:2,class:"button delete",onClick:i=>v(a.name)},[m(R,{path:d(F)},null,8,["path"])],8,me))]))),128)),t("button",{class:"button add",onClick:b[1]||(b[1]=a=>u())},[m(R,{path:d(P)},null,8,["path"]),M(" Add Column")])])]))}});const be=Q(_e,[["__scopeId","data-v-36a6e10a"]]),ve={class:"table-data"},ye={class:"column-header"},fe={class:"column-name"},he=t("th",null,null,-1),ke={key:1},we=["open"],ge={key:0,class:"editing-row-content"},Ce={class:"editing-row-header"},$e=["onUpdate:modelValue"],Te={key:0,class:"row-error"},Ve=B({__name:"TableData",props:{table:null},setup(l){const o=l,{result:c,loading:g,refetch:v}=S(()=>o.table.select()),u=D(null),_=D(null),p=D(null);function b(){!o.table||(u.value={},p.value=null,_.value=null)}function a(r){return Object.keys(r).reduce((V,s)=>{var y;return(y=o.table.getColumns().find(f=>f.name===s))!=null&&y.primary_key?{[s]:r[s]}:V},{})}async function i(){if(!(!o.table||!u.value))if(p.value){const r=await o.table.updateRow(a(p.value),u.value);r.type==="update-row:error"?_.value=r.reason:(u.value=null,p.value=null,_.value=null,v())}else{const r=await o.table.insertRow(u.value);r.type==="insert-row:error"?_.value=r.reason:(u.value=null,p.value=null,_.value=null,v())}}function O(r){!o.table||(u.value={...r},p.value={...r},_.value=null)}async function j(r){confirm("Are you sure you want to delete this row?")&&(await o.table.deleteRow(a(r)),v())}return(r,V)=>(e(),n("div",ve,[t("button",{class:"add-row",onClick:b},"Add Row"),t("table",null,[t("thead",null,[t("tr",null,[(e(!0),n(k,null,w(l.table.getColumns(),s=>(e(),n("th",{key:s.id},[t("div",ye,[t("div",fe,$(s.name),1)])]))),128)),he])]),d(g)?(e(),I(L,{key:0})):(e(),n("tbody",ke,[(e(!0),n(k,null,w(d(c),(s,y)=>(e(),n("tr",{key:y},[(e(!0),n(k,null,w(l.table.getColumns(),f=>(e(),n("td",{key:f.id},$(s[f.name]),1))),128)),t("td",null,[m(U,{class:"delete-row",path:d(F),onClick:f=>j(s)},null,8,["path","onClick"]),m(U,{class:"edit-row",path:d(Y),onClick:f=>O(s)},null,8,["path","onClick"])])]))),128))]))]),t("dialog",{class:"editing-row-container",open:!!u.value},[u.value?(e(),n("div",ge,[t("div",Ce,[M(" New Row "),m(U,{path:d(ee),class:"close",onClick:V[0]||(V[0]=s=>u.value=null)},null,8,["path"])]),(e(!0),n(k,null,w(l.table.getColumns(),s=>(e(),n("div",{key:s.id,class:"column"},[t("label",null,$(s.name),1),h(t("input",{"onUpdate:modelValue":y=>u.value[s.name]=y,type:"text"},null,8,$e),[[x,u.value[s.name]]])]))),128)),t("button",{class:"button save",onClick:i},"Save"),_.value?(e(),n("div",Te,$(_.value),1)):T("",!0)])):T("",!0)],8,we)]))}});const Fe=B({__name:"TableEditor",setup(l){const o=W(),{result:c,loading:g}=S(()=>A.get(o.params.tableName));return(v,u)=>d(g)||!d(c)?(e(),I(L,{key:0})):(e(),I(X,{key:1,class:"editor"},{left:C(()=>[m(Z,{link:"/_editor/tables"})]),right:C(()=>[m(te,{path:"tables/overview"}),m(le,{model:d(c)},null,8,["model"])]),default:C(()=>[m(E,{title:"Table data"},{default:C(()=>[m(Ve,{table:d(c)},null,8,["table"])]),_:1}),m(E,{title:"Settings"},{default:C(()=>[m(be,{table:d(c)},null,8,["table"])]),_:1})]),_:1}))}});export{Fe as default}; +//# sourceMappingURL=TableEditor.440cab96.js.map diff --git a/abstra_statics/dist/assets/Tables.3387e003.js b/abstra_statics/dist/assets/Tables.3387e003.js deleted file mode 100644 index aea9b6cf48..0000000000 --- a/abstra_statics/dist/assets/Tables.3387e003.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as y,K as _,b as g,t as T,z as d,H as w}from"./registerWidgets.ca6243ef.js";import{f as C,g as h,h as k}from"./icons.11151937.js";import{a as D}from"./asyncComputed.3cb2e10b.js";import{T as b}from"./tables.94b40ff0.js";import{R as I}from"./RuntimeList.1bf51451.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";import"./DropdownMenu.162e22a4.js";import"./CircularLoading.5630a601.js";import"./lottie.9d24e472.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="5e8b8cab-0495-4c37-aeae-9c34fd96c0bb",n._sentryDebugIdIdentifier="sentry-dbid-5e8b8cab-0495-4c37-aeae-9c34fd96c0bb")}catch{}})();const H=y({__name:"Tables",setup(n){const o=w(),{loading:c,result:l,refetch:r}=D(()=>b.list()),i=({key:e})=>o.push({path:`/_editor/table/${encodeURIComponent(e)}`}),u=async({key:e})=>{var t,a;await((a=(t=l.value)==null?void 0:t.find(s=>s.name===e))==null?void 0:a.duplicate()),r()},m=async()=>{const e=await b.create();i({key:e.name})},p=async({key:e})=>{var t,a;confirm("Are you sure you want to delete this table?")&&(await((a=(t=l.value)==null?void 0:t.find(s=>s.name===e))==null?void 0:a.delete()),r())},f=_(()=>{var e,t;return{columns:[{name:"Table Name"},{name:"Table Actions"}],rows:(t=(e=l.value)==null?void 0:e.map(a=>({key:a.name,cells:[{text:a.name,classes:["title","centered"],link:`/_editor/table/${encodeURIComponent(a.name)}`},{text:"",classes:["centered"],actions:[{icon:C,label:"Delete",onClick:p,dangerous:!0},{icon:h,label:"Edit Table",onClick:i},{icon:k,label:"Duplicate",onClick:u}]}]})))!=null?t:[]}});return(e,t)=>(g(),T(I,{loading:d(c),title:"Database Tables",description:"Create and manage your database tables here.","create-button-text":"Create Table","empty-title":"No tables here yet",table:d(f),onCreate:m},null,8,["loading","table"]))}});export{H as default}; -//# sourceMappingURL=Tables.3387e003.js.map diff --git a/abstra_statics/dist/assets/Tables.e6b943f2.js b/abstra_statics/dist/assets/Tables.e6b943f2.js new file mode 100644 index 0000000000..ebb657eed1 --- /dev/null +++ b/abstra_statics/dist/assets/Tables.e6b943f2.js @@ -0,0 +1,2 @@ +import{d as y,K as _,b as g,t as T,z as d,H as w}from"./registerWidgets.89616af0.js";import{f as C,g as h,h as k}from"./icons.9cfdae6d.js";import{a as D}from"./asyncComputed.8ac91a75.js";import{T as u}from"./tables.b83ad23f.js";import{R as I}from"./RuntimeList.097a29c4.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";import"./DropdownMenu.8f7fc9d3.js";import"./CircularLoading.0fb686c0.js";import"./lottie.fc57e5ac.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="fdf502ce-e938-413d-a6b1-512989dd9f5c",n._sentryDebugIdIdentifier="sentry-dbid-fdf502ce-e938-413d-a6b1-512989dd9f5c")}catch{}})();const H=y({__name:"Tables",setup(n){const o=w(),{loading:r,result:l,refetch:i}=D(()=>u.list()),c=({key:e})=>o.push({path:`/_editor/table/${encodeURIComponent(e)}`}),m=async({key:e})=>{var t,a;await((a=(t=l.value)==null?void 0:t.find(s=>s.name===e))==null?void 0:a.duplicate()),i()},b=async()=>{const e=await u.create();c({key:e.name})},p=async({key:e})=>{var t,a;confirm("Are you sure you want to delete this table?")&&(await((a=(t=l.value)==null?void 0:t.find(s=>s.name===e))==null?void 0:a.delete()),i())},f=_(()=>{var e,t;return{columns:[{name:"Table Name"},{name:"Table Actions"}],rows:(t=(e=l.value)==null?void 0:e.map(a=>({key:a.name,cells:[{text:a.name,classes:["title","centered"],link:`/_editor/table/${encodeURIComponent(a.name)}`},{text:"",classes:["centered"],actions:[{icon:C,label:"Delete",onClick:p,dangerous:!0},{icon:h,label:"Edit Table",onClick:c},{icon:k,label:"Duplicate",onClick:m}]}]})))!=null?t:[]}});return(e,t)=>(g(),T(I,{loading:d(r),title:"Database Tables",description:"Create and manage your database tables here.","create-button-text":"Create Table","empty-title":"No tables here yet",table:d(f),onCreate:b},null,8,["loading","table"]))}});export{H as default}; +//# sourceMappingURL=Tables.e6b943f2.js.map diff --git a/abstra_statics/dist/assets/Tooltip.8c336607.js b/abstra_statics/dist/assets/Tooltip.1f768a3e.js similarity index 56% rename from abstra_statics/dist/assets/Tooltip.8c336607.js rename to abstra_statics/dist/assets/Tooltip.1f768a3e.js index 6ee21ff098..c7279c0df3 100644 --- a/abstra_statics/dist/assets/Tooltip.8c336607.js +++ b/abstra_statics/dist/assets/Tooltip.1f768a3e.js @@ -1,2 +1,2 @@ -import{d as y,r as d,K as x,b as g,c as b,B as m,x as p,N as v,A as B,z as w,q as D}from"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="88c31fec-2709-4e14-a0da-7627a1ea0d7f",t._sentryDebugIdIdentifier="sentry-dbid-88c31fec-2709-4e14-a0da-7627a1ea0d7f")}catch{}})();const k={class:"text"},I=y({__name:"Tooltip",props:{text:{type:String,required:!0},left:{type:Number},top:{type:Number},fixed:{type:Boolean,default:!1}},setup(t){const e=t,s=d(Date.now()),c=()=>{s.value=Date.now()},n=d(null),f=()=>{var r,l,i;const o=(r=n.value)==null?void 0:r.getBoundingClientRect();if(!o)return{};const{x:a,y:_}=o;return s.value,{position:"fixed",top:`${_+((l=e.top)!=null?l:0)}px`,left:`${a+((i=e.left)!=null?i:0)}px`}},u=x(()=>{var o;return e.fixed?f():{left:`${(o=e.left)!=null?o:-14}px`,...e.top?{top:`${e.top}px`}:{}}});return(o,a)=>(g(),b("div",{ref_key:"tooltipBox",ref:n,class:"tooltip-box",onMouseenter:c},[m(o.$slots,"default",{},void 0,!0),p("div",{class:"tooltip",style:B(w(u))},[p("span",k,v(t.text),1)],4)],544))}});const $=D(I,[["__scopeId","data-v-74636348"]]);export{$ as T}; -//# sourceMappingURL=Tooltip.8c336607.js.map +import{d as b,r as d,K as y,b as x,c as g,B as m,x as p,N as v,A as B,z as w,q as D}from"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="2951f3b9-bb7a-403d-b29d-eba077ace843",t._sentryDebugIdIdentifier="sentry-dbid-2951f3b9-bb7a-403d-b29d-eba077ace843")}catch{}})();const k={class:"text"},I=b({__name:"Tooltip",props:{text:{type:String,required:!0},left:{type:Number},top:{type:Number},fixed:{type:Boolean,default:!1}},setup(t){const e=t,s=d(Date.now()),c=()=>{s.value=Date.now()},n=d(null),f=()=>{var r,l,i;const o=(r=n.value)==null?void 0:r.getBoundingClientRect();if(!o)return{};const{x:a,y:_}=o;return s.value,{position:"fixed",top:`${_+((l=e.top)!=null?l:0)}px`,left:`${a+((i=e.left)!=null?i:0)}px`}},u=y(()=>{var o;return e.fixed?f():{left:`${(o=e.left)!=null?o:-14}px`,...e.top?{top:`${e.top}px`}:{}}});return(o,a)=>(x(),g("div",{ref_key:"tooltipBox",ref:n,class:"tooltip-box",onMouseenter:c},[m(o.$slots,"default",{},void 0,!0),p("div",{class:"tooltip",style:B(w(u))},[p("span",k,v(t.text),1)],4)],544))}});const $=D(I,[["__scopeId","data-v-74636348"]]);export{$ as T}; +//# sourceMappingURL=Tooltip.1f768a3e.js.map diff --git a/abstra_statics/dist/assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js b/abstra_statics/dist/assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js similarity index 92% rename from abstra_statics/dist/assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js rename to abstra_statics/dist/assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js index a0e20f4382..6c4da70b96 100644 --- a/abstra_statics/dist/assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js +++ b/abstra_statics/dist/assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js @@ -1,2 +1,2 @@ -var le=Object.defineProperty;var ie=(s,e,t)=>e in s?le(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var L=(s,e,t)=>(ie(s,typeof e!="symbol"?e+"":e,t),t);import{d as T,v as K,K as q,H as ue,b as d,c as h,z as c,W as F,Z as P,x as n,D as M,N as I,e as C,ad as ce,U as J,O as W,Q as Y,q as j,r as _,a2 as G,ae as de,o as Q,Y as Z,I as S,G as R,A as pe,F as ve,L as he,af as fe,J as me,a as ge,t as _e,ag as ye,ah as we}from"./registerWidgets.ca6243ef.js";import{p as be,n as z,o as H,q as N,r as ke}from"./icons.11151937.js";import{a as V}from"./asyncComputed.3cb2e10b.js";import{F as Ce}from"./forms.38d7da0a.js";import{D as Se}from"./dashes.9f1aca90.js";import{H as Ie}from"./hooks.d7d78397.js";import{J as O}from"./jobs.2ad85710.js";import{W as $e}from"./workspaces.25055240.js";import{u as D}from"./uuid.f763745d.js";import{L as xe}from"./login.bbc5e7c0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="2e012bed-9fba-4755-ab5a-478507e0d508",s._sentryDebugIdIdentifier="sentry-dbid-2e012bed-9fba-4755-ab5a-478507e0d508")}catch{}})();const X=s=>(W("data-v-0dfc8705"),s=s(),Y(),s),Ee={class:"runtime-settings"},Le={key:0,class:"field"},Re=X(()=>n("div",{class:"label"},"Path",-1)),Me={class:"field"},De=X(()=>n("div",{class:"label"},"Code",-1)),Te={class:"input-row"},Ue={key:1,class:"root-path loading"},Ae={class:"path-feedback"},Be={key:1,class:"error"},Fe=T({__name:"RuntimeCommonSettings",props:{runtime:null},setup(s){const e=s,t=K({pathError:null}),{result:o}=V(()=>$e.get()),l=()=>{!o.value||!e.runtime.file||o.value.openFile(e.runtime.file)},g=q(()=>{var a;return(a=e.runtime.file)!=null&&a.endsWith(".py")?null:"It should be a .py file"}),p=()=>{!o.value||!y.value||o.value.openFile(".")},i=ue(),{result:y}=V(()=>fetch("/_editor/api/workspace/root-path").then(a=>a.text()));return e.runtime.onUpdate(a=>{if(e.runtime instanceof O||!a||!("path"in a)||!(a!=null&&a.path))return;const u=[{runtime:Ce,basePath:"form"},{runtime:Ie,basePath:"hook"},{runtime:Se,basePath:"dash"}].find(w=>e.runtime instanceof w.runtime);if(!u)throw new Error(`Unknown runtime type ${e.runtime}`);i.push({path:`/_editor/${u.basePath}/${encodeURIComponent(a.path)}`})}),(a,v)=>(d(),h("div",Ee,[s.runtime instanceof c(O)?M("",!0):(d(),h("div",Le,[Re,F(n("input",{"onUpdate:modelValue":v[0]||(v[0]=u=>s.runtime.path=u),class:"path-input",type:"text"},null,512),[[P,s.runtime.path]])])),n("div",Me,[De,n("div",Te,[c(y)?(d(),h("button",{key:0,class:"root-path",onClick:v[1]||(v[1]=u=>p())},I(c(y)),1)):(d(),h("span",Ue," Loading... ")),F(n("input",{"onUpdate:modelValue":v[2]||(v[2]=u=>s.runtime.file=u),type:"text"},null,512),[[P,s.runtime.file]]),n("button",{class:"open-file-icon",onClick:v[3]||(v[3]=u=>l())},[C(ce,{path:c(be)},null,8,["path"]),J(" Open in editor ")])]),n("div",Ae,I(c(g)),1)]),t.pathError?(d(),h("div",Be,I(t.pathError),1)):M("",!0)]))}});const ct=j(Fe,[["__scopeId","data-v-0dfc8705"]]);class ee{constructor(){L(this,"logState",K({log:[]}));L(this,"_listeners",{})}static create(){return new ee}get logs(){return this.logState.log}log(e,t){if(e.type!=="restart"&&e.log.trim()==="")return;const o=t?this.logs.find(l=>l.id===t):null;return o?Object.assign(o,e):this.logs.push({...e,id:t||D()}),this.notifyListeners(e),t}clear(){this.logState.log=[]}listen(e){const t=D();return this._listeners[t]=e,t}unlisten(e){delete this._listeners[e]}notifyListeners(e){Object.values(this._listeners).forEach(t=>t(e))}}class Pe{static async*sendMessage(e,t){var g;const l=(g=(await fetch("/_editor/api/ai/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:e,runtime:t})})).body)==null?void 0:g.getReader();if(!l)throw new Error("No response body");for(;;){const p=await l.read();if(p.done)break;yield new TextDecoder().decode(p.value)}}}const ze=s=>(W("data-v-09991f14"),s=s(),Y(),s),He={class:"smart-console"},Ne={class:"header"},Ve={class:"left"},Oe={class:"right"},Ke={class:"cli"},qe={class:"left"},Je=ze(()=>n("div",{class:"entry ai-output"}," Hello there! I'm both an output console and AI assistant. You can ask me anything. ",-1)),We={key:1,class:"local-entry"},Ye={class:"input"},je=["pointer-events","onKeydown"],Ge={class:"right"},Qe=T({__name:"SmartConsole",props:{inputEnabled:{type:Boolean},formCode:null,runtime:null,logService:null},emits:["eval-request","clear-terminal","restart","enter"],setup(s,{emit:e}){const t=s,o=_(""),l=_(null),g=me(),p=_(!1),i=_(!1),y=()=>{t.logService.clear(),e("restart")},a=()=>{w.value=w.value==="assistant"?"debugger":"assistant"};function v(r){switch(r.type){case"ai-input":return{role:"user",content:r.log};case"ai-output":return{role:"assistant",content:r.log};case"stderr":case"stdout":return{role:"user",content:r.log};case"restart":return{role:"user",content:"-- new session --"};default:throw new Error(`Unknown log type: ${r.type}`)}}G(g,()=>{t.logService.clear(),e("clear-terminal")});const u=_(null),w=_("assistant"),te=async r=>{var f;if(r.preventDefault(),o.value=((f=u.value)==null?void 0:f.innerText)||"",r.shiftKey){document.execCommand("insertLineBreak");return}u.value&&(u.value.innerText=""),w.value==="assistant"?await se():await ne()},se=async()=>{var f;if(e("enter",o.value),t.logService.log({type:"ai-input",log:o.value}),o.value="",!i.value){t.logService.log({type:"stderr",log:"Please login to use the AI assistant."});return}p.value=!0;const r={role:"user",content:(f=t.formCode)!=null?f:""};try{const k=D();let m="";const x=Pe.sendMessage([r,...t.logService.logs.map(E=>v(E)),{role:"user",content:o.value}],t.runtime);for await(const E of x)m+=E,t.logService.log({type:"ai-output",log:m},k)}catch(k){t.logService.log({type:"ai-output",log:"Sorry, I don't know how to answer that."}),console.error(k),ye(k)}finally{p.value=!1}},ne=async()=>{o.value&&(t.logService.log({type:"eval-input",log:`>>> ${o.value}`}),e("eval-request",o.value),o.value="")},oe=()=>{t.logService.clear()};t.logService.listen(async r=>{r.type!=="restart"&&(b.value=!0,await de(),l.value&&(l.value.scrollTop=l.value.scrollHeight))});const b=_(!1),U=_(400),ae=q(()=>({height:`${U.value}px`})),$=_(!1),re=()=>$.value=!0,A=r=>{!$.value||(U.value=document.body.clientHeight-r.clientY)},B=()=>$.value=!1;return Q(()=>{document.addEventListener("mousemove",A),document.addEventListener("mouseup",B),xe.get().then(r=>i.value=!!r)}),Z(()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",B)}),(r,f)=>{const k=ge("Markdown");return d(),h("div",He,[n("div",Ne,[n("div",Ve,[C(S,{path:w.value==="assistant"?c(z):c(H)},null,8,["path"]),J(" Smart Console ")]),n("div",Oe,[n("div",{class:"changes-container"},[n("button",{class:"header-button",onClick:y},"Restart")]),n("div",{class:"toggle-button",onClick:f[0]||(f[0]=m=>b.value=!b.value)},[C(S,{class:R(["icon",{open:b.value}]),path:c(N),fill:"#fff"},null,8,["class","path"])])])]),b.value?(d(),h("div",{key:0,class:"terminal",style:pe(c(ae))},[n("div",{class:"resize-handler",onMousedown:re},null,32),n("div",Ke,[n("div",qe,[n("div",{ref_key:"entriesContainer",ref:l,class:"entries"},[Je,(d(!0),h(ve,null,he(t.logService.logs,(m,x)=>(d(),h("div",{key:x,class:R([m.type,"entry"])},[m.type==="ai-output"?(d(),_e(k,{key:0,source:m.log},null,8,["source"])):(d(),h("div",We,I(m.type==="restart"?"-- restarted --":m.log),1))],2))),128))],512),n("div",Ye,[C(S,{class:R(["icon",{open:b.value}]),path:c(N)},null,8,["class","path"]),n("div",{ref_key:"inputRef",ref:u,class:"input-text",contenteditable:"","pointer-events":p.value?"none":"auto",placeholder:"Ask AI anything",onKeydown:fe(te,["enter"])},null,40,je)])]),n("div",Ge,[n("div",{class:"icons",onClick:oe},[C(S,{class:"icon",path:c(ke)},null,8,["path"])]),n("div",null,[C(S,{class:"icon clickable",path:w.value==="assistant"?c(z):c(H),onClick:f[1]||(f[1]=m=>a())},null,8,["path"])])])])],4)):M("",!0)])}}});const dt=j(Qe,[["__scopeId","data-v-09991f14"]]),Ze={class:"unsaved-changes-handler"},pt=T({__name:"UnsavedChangesHandler",props:{hasChanges:{type:Boolean}},setup(s){const e=s,t="You have unsaved changes. Are you sure you want to leave?",o=i=>(i=i||window.event,i&&(i.returnValue=t),t),l=()=>{window.addEventListener("beforeunload",o)};we((i,y,a)=>{if(!e.hasChanges)return a();confirm(t)?a():a(!1)});const g=()=>window.removeEventListener("beforeunload",o),p=i=>i?l():g();return G(()=>e.hasChanges,p),Q(()=>p(e.hasChanges)),Z(g),(i,y)=>(d(),h("div",Ze))}});export{ee as L,ct as R,dt as S,pt as _}; -//# sourceMappingURL=UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js.map +var le=Object.defineProperty;var ie=(s,e,t)=>e in s?le(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var L=(s,e,t)=>(ie(s,typeof e!="symbol"?e+"":e,t),t);import{d as T,v as K,K as q,H as ue,b as d,c as h,z as c,W as F,Z as P,x as n,D as M,N as I,e as C,ad as ce,U as J,O as W,Q as Y,q as j,r as _,a2 as G,ae as de,o as Q,Y as Z,I as S,G as R,A as pe,F as ve,L as he,af as fe,J as me,a as ge,t as _e,ag as ye,ah as we}from"./registerWidgets.89616af0.js";import{p as be,n as z,o as H,q as N,r as ke}from"./icons.9cfdae6d.js";import{a as V}from"./asyncComputed.8ac91a75.js";import{F as Ce}from"./forms.59430d62.js";import{D as Se}from"./dashes.f8616397.js";import{H as Ie}from"./hooks.6e1e253e.js";import{J as O}from"./jobs.310261dd.js";import{W as $e}from"./workspaces.621b79ad.js";import{u as D}from"./uuid.d6201508.js";import{L as xe}from"./login.6c1df514.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="b068daeb-2199-48f9-a534-2e713fef07c5",s._sentryDebugIdIdentifier="sentry-dbid-b068daeb-2199-48f9-a534-2e713fef07c5")}catch{}})();const X=s=>(W("data-v-0dfc8705"),s=s(),Y(),s),Ee={class:"runtime-settings"},Le={key:0,class:"field"},Re=X(()=>n("div",{class:"label"},"Path",-1)),Me={class:"field"},De=X(()=>n("div",{class:"label"},"Code",-1)),Te={class:"input-row"},Ue={key:1,class:"root-path loading"},Ae={class:"path-feedback"},Be={key:1,class:"error"},Fe=T({__name:"RuntimeCommonSettings",props:{runtime:null},setup(s){const e=s,t=K({pathError:null}),{result:o}=V(()=>$e.get()),l=()=>{!o.value||!e.runtime.file||o.value.openFile(e.runtime.file)},g=q(()=>{var a;return(a=e.runtime.file)!=null&&a.endsWith(".py")?null:"It should be a .py file"}),p=()=>{!o.value||!y.value||o.value.openFile(".")},i=ue(),{result:y}=V(()=>fetch("/_editor/api/workspace/root-path").then(a=>a.text()));return e.runtime.onUpdate(a=>{if(e.runtime instanceof O||!a||!("path"in a)||!(a!=null&&a.path))return;const u=[{runtime:Ce,basePath:"form"},{runtime:Ie,basePath:"hook"},{runtime:Se,basePath:"dash"}].find(w=>e.runtime instanceof w.runtime);if(!u)throw new Error(`Unknown runtime type ${e.runtime}`);i.push({path:`/_editor/${u.basePath}/${encodeURIComponent(a.path)}`})}),(a,v)=>(d(),h("div",Ee,[s.runtime instanceof c(O)?M("",!0):(d(),h("div",Le,[Re,F(n("input",{"onUpdate:modelValue":v[0]||(v[0]=u=>s.runtime.path=u),class:"path-input",type:"text"},null,512),[[P,s.runtime.path]])])),n("div",Me,[De,n("div",Te,[c(y)?(d(),h("button",{key:0,class:"root-path",onClick:v[1]||(v[1]=u=>p())},I(c(y)),1)):(d(),h("span",Ue," Loading... ")),F(n("input",{"onUpdate:modelValue":v[2]||(v[2]=u=>s.runtime.file=u),type:"text"},null,512),[[P,s.runtime.file]]),n("button",{class:"open-file-icon",onClick:v[3]||(v[3]=u=>l())},[C(ce,{path:c(be)},null,8,["path"]),J(" Open in editor ")])]),n("div",Ae,I(c(g)),1)]),t.pathError?(d(),h("div",Be,I(t.pathError),1)):M("",!0)]))}});const ct=j(Fe,[["__scopeId","data-v-0dfc8705"]]);class ee{constructor(){L(this,"logState",K({log:[]}));L(this,"_listeners",{})}static create(){return new ee}get logs(){return this.logState.log}log(e,t){if(e.type!=="restart"&&e.log.trim()==="")return;const o=t?this.logs.find(l=>l.id===t):null;return o?Object.assign(o,e):this.logs.push({...e,id:t||D()}),this.notifyListeners(e),t}clear(){this.logState.log=[]}listen(e){const t=D();return this._listeners[t]=e,t}unlisten(e){delete this._listeners[e]}notifyListeners(e){Object.values(this._listeners).forEach(t=>t(e))}}class Pe{static async*sendMessage(e,t){var g;const l=(g=(await fetch("/_editor/api/ai/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:e,runtime:t})})).body)==null?void 0:g.getReader();if(!l)throw new Error("No response body");for(;;){const p=await l.read();if(p.done)break;yield new TextDecoder().decode(p.value)}}}const ze=s=>(W("data-v-09991f14"),s=s(),Y(),s),He={class:"smart-console"},Ne={class:"header"},Ve={class:"left"},Oe={class:"right"},Ke={class:"cli"},qe={class:"left"},Je=ze(()=>n("div",{class:"entry ai-output"}," Hello there! I'm both an output console and AI assistant. You can ask me anything. ",-1)),We={key:1,class:"local-entry"},Ye={class:"input"},je=["pointer-events","onKeydown"],Ge={class:"right"},Qe=T({__name:"SmartConsole",props:{inputEnabled:{type:Boolean},formCode:null,runtime:null,logService:null},emits:["eval-request","clear-terminal","restart","enter"],setup(s,{emit:e}){const t=s,o=_(""),l=_(null),g=me(),p=_(!1),i=_(!1),y=()=>{t.logService.clear(),e("restart")},a=()=>{w.value=w.value==="assistant"?"debugger":"assistant"};function v(r){switch(r.type){case"ai-input":return{role:"user",content:r.log};case"ai-output":return{role:"assistant",content:r.log};case"stderr":case"stdout":return{role:"user",content:r.log};case"restart":return{role:"user",content:"-- new session --"};default:throw new Error(`Unknown log type: ${r.type}`)}}G(g,()=>{t.logService.clear(),e("clear-terminal")});const u=_(null),w=_("assistant"),te=async r=>{var f;if(r.preventDefault(),o.value=((f=u.value)==null?void 0:f.innerText)||"",r.shiftKey){document.execCommand("insertLineBreak");return}u.value&&(u.value.innerText=""),w.value==="assistant"?await se():await ne()},se=async()=>{var f;if(e("enter",o.value),t.logService.log({type:"ai-input",log:o.value}),o.value="",!i.value){t.logService.log({type:"stderr",log:"Please login to use the AI assistant."});return}p.value=!0;const r={role:"user",content:(f=t.formCode)!=null?f:""};try{const k=D();let m="";const x=Pe.sendMessage([r,...t.logService.logs.map(E=>v(E)),{role:"user",content:o.value}],t.runtime);for await(const E of x)m+=E,t.logService.log({type:"ai-output",log:m},k)}catch(k){t.logService.log({type:"ai-output",log:"Sorry, I don't know how to answer that."}),console.error(k),ye(k)}finally{p.value=!1}},ne=async()=>{o.value&&(t.logService.log({type:"eval-input",log:`>>> ${o.value}`}),e("eval-request",o.value),o.value="")},oe=()=>{t.logService.clear()};t.logService.listen(async r=>{r.type!=="restart"&&(b.value=!0,await de(),l.value&&(l.value.scrollTop=l.value.scrollHeight))});const b=_(!1),U=_(400),ae=q(()=>({height:`${U.value}px`})),$=_(!1),re=()=>$.value=!0,A=r=>{!$.value||(U.value=document.body.clientHeight-r.clientY)},B=()=>$.value=!1;return Q(()=>{document.addEventListener("mousemove",A),document.addEventListener("mouseup",B),xe.get().then(r=>i.value=!!r)}),Z(()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",B)}),(r,f)=>{const k=ge("Markdown");return d(),h("div",He,[n("div",Ne,[n("div",Ve,[C(S,{path:w.value==="assistant"?c(z):c(H)},null,8,["path"]),J(" Smart Console ")]),n("div",Oe,[n("div",{class:"changes-container"},[n("button",{class:"header-button",onClick:y},"Restart")]),n("div",{class:"toggle-button",onClick:f[0]||(f[0]=m=>b.value=!b.value)},[C(S,{class:R(["icon",{open:b.value}]),path:c(N),fill:"#fff"},null,8,["class","path"])])])]),b.value?(d(),h("div",{key:0,class:"terminal",style:pe(c(ae))},[n("div",{class:"resize-handler",onMousedown:re},null,32),n("div",Ke,[n("div",qe,[n("div",{ref_key:"entriesContainer",ref:l,class:"entries"},[Je,(d(!0),h(ve,null,he(t.logService.logs,(m,x)=>(d(),h("div",{key:x,class:R([m.type,"entry"])},[m.type==="ai-output"?(d(),_e(k,{key:0,source:m.log},null,8,["source"])):(d(),h("div",We,I(m.type==="restart"?"-- restarted --":m.log),1))],2))),128))],512),n("div",Ye,[C(S,{class:R(["icon",{open:b.value}]),path:c(N)},null,8,["class","path"]),n("div",{ref_key:"inputRef",ref:u,class:"input-text",contenteditable:"","pointer-events":p.value?"none":"auto",placeholder:"Ask AI anything",onKeydown:fe(te,["enter"])},null,40,je)])]),n("div",Ge,[n("div",{class:"icons",onClick:oe},[C(S,{class:"icon",path:c(ke)},null,8,["path"])]),n("div",null,[C(S,{class:"icon clickable",path:w.value==="assistant"?c(z):c(H),onClick:f[1]||(f[1]=m=>a())},null,8,["path"])])])])],4)):M("",!0)])}}});const dt=j(Qe,[["__scopeId","data-v-09991f14"]]),Ze={class:"unsaved-changes-handler"},pt=T({__name:"UnsavedChangesHandler",props:{hasChanges:{type:Boolean}},setup(s){const e=s,t="You have unsaved changes. Are you sure you want to leave?",o=i=>(i=i||window.event,i&&(i.returnValue=t),t),l=()=>{window.addEventListener("beforeunload",o)};we((i,y,a)=>{if(!e.hasChanges)return a();confirm(t)?a():a(!1)});const g=()=>window.removeEventListener("beforeunload",o),p=i=>i?l():g();return G(()=>e.hasChanges,p),Q(()=>p(e.hasChanges)),Z(g),(i,y)=>(d(),h("div",Ze))}});export{ee as L,ct as R,dt as S,pt as _}; +//# sourceMappingURL=UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js.map diff --git a/abstra_statics/dist/assets/WidgetPreview.c18ef298.js b/abstra_statics/dist/assets/WidgetPreview.6ebb6ff1.js similarity index 69% rename from abstra_statics/dist/assets/WidgetPreview.c18ef298.js rename to abstra_statics/dist/assets/WidgetPreview.6ebb6ff1.js index 68b59652f5..1dda76d837 100644 --- a/abstra_statics/dist/assets/WidgetPreview.c18ef298.js +++ b/abstra_statics/dist/assets/WidgetPreview.6ebb6ff1.js @@ -1,2 +1,2 @@ -import{_ as w}from"./ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js";import{W as v,S as h}from"./WidgetsFrame.8af89817.js";import{d as k,b as t,t as a,w as W,J as I,D as l,x as f,c as u,L as p,a8 as B,F as _,ao as D,l as q,m as x,q as S}from"./registerWidgets.ca6243ef.js";import"./colors.4425ff79.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="128872b6-3e24-4441-b735-d2ba6caca820",o._sentryDebugIdIdentifier="sentry-dbid-128872b6-3e24-4441-b735-d2ba6caca820")}catch{}})();const A={class:"form"},C={class:"form-wrapper"},L={key:0,class:"buttons"},P=k({__name:"WidgetPreview",setup(o){const s=I();function i(e){return q[e]||x[e]||null}function c(e){try{const n=JSON.parse(e);return n.component=i(n.type),n.response=new D,n.component?n:null}catch{return null}}function m(){const e=s.query.widget;return Array.isArray(e)?e.map(c).filter(Boolean):[c(e)]}function y(){return s.query.steps==="true"}function d(){const e=s.query.button;return e?Array.isArray(e)?e:[e]:[]}const g=e=>({name:e,isDefault:!1,isFocused:!1,focusOnButton:()=>{},addKeydownListener:()=>{},setElement:()=>{}});return(e,n)=>(t(),a(v,{"main-color":"#d14056",class:"preview",theme:"#fbfbfb",runtime:"dash","font-family":"Inter"},{default:W(()=>[y()?(t(),a(h,{key:0,"steps-info":{current:2,total:3}})):l("",!0),f("div",A,[f("div",C,[(t(!0),u(_,null,p(m(),(r,b)=>(t(),u("div",{key:b,class:"widget"},[(t(),a(B(r.component),{data:r.props,response:r.response},null,8,["data","response"]))]))),128))]),d().length?(t(),u("div",L,[(t(!0),u(_,null,p(d(),r=>(t(),a(w,{key:r,action:g(r)},null,8,["action"]))),128))])):l("",!0)])]),_:1}))}});const J=S(P,[["__scopeId","data-v-f3f8afa8"]]);export{J as default}; -//# sourceMappingURL=WidgetPreview.c18ef298.js.map +import{_ as w}from"./ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js";import{W as v,S as h}from"./WidgetsFrame.2b06573d.js";import{d as k,b as t,t as a,w as W,J as I,D as f,x as l,c as u,L as p,a8 as B,F as _,ao as D,l as q,m as x,q as S}from"./registerWidgets.89616af0.js";import"./colors.bc71fdf2.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="9bd68d72-16c0-4af9-abfb-19d6119f8f71",o._sentryDebugIdIdentifier="sentry-dbid-9bd68d72-16c0-4af9-abfb-19d6119f8f71")}catch{}})();const A={class:"form"},C={class:"form-wrapper"},L={key:0,class:"buttons"},P=k({__name:"WidgetPreview",setup(o){const s=I();function i(e){return q[e]||x[e]||null}function c(e){try{const n=JSON.parse(e);return n.component=i(n.type),n.response=new D,n.component?n:null}catch{return null}}function m(){const e=s.query.widget;return Array.isArray(e)?e.map(c).filter(Boolean):[c(e)]}function y(){return s.query.steps==="true"}function d(){const e=s.query.button;return e?Array.isArray(e)?e:[e]:[]}const g=e=>({name:e,isDefault:!1,isFocused:!1,focusOnButton:()=>{},addKeydownListener:()=>{},setElement:()=>{}});return(e,n)=>(t(),a(v,{"main-color":"#d14056",class:"preview",theme:"#fbfbfb",runtime:"dash","font-family":"Inter"},{default:W(()=>[y()?(t(),a(h,{key:0,"steps-info":{current:2,total:3}})):f("",!0),l("div",A,[l("div",C,[(t(!0),u(_,null,p(m(),(r,b)=>(t(),u("div",{key:b,class:"widget"},[(t(),a(B(r.component),{data:r.props,response:r.response},null,8,["data","response"]))]))),128))]),d().length?(t(),u("div",L,[(t(!0),u(_,null,p(d(),r=>(t(),a(w,{key:r,action:g(r)},null,8,["action"]))),128))])):f("",!0)])]),_:1}))}});const J=S(P,[["__scopeId","data-v-f3f8afa8"]]);export{J as default}; +//# sourceMappingURL=WidgetPreview.6ebb6ff1.js.map diff --git a/abstra_statics/dist/assets/WidgetsFrame.2b06573d.js b/abstra_statics/dist/assets/WidgetsFrame.2b06573d.js new file mode 100644 index 0000000000..1ef6a895ce --- /dev/null +++ b/abstra_statics/dist/assets/WidgetsFrame.2b06573d.js @@ -0,0 +1,2 @@ +import{d as y,K as h,b as r,c,x as l,F as b,L as k,G as v,N as C,z as i,D as F,q as g,ak as d,v as I,o as S,a2 as D,B as L,A as O}from"./registerWidgets.89616af0.js";import{l as w,a as p,b as R,D as $,c as A,i as T,d as U,e as W,L as f,f as _}from"./colors.bc71fdf2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f658b307-8702-464d-aca1-593dcfcf80ca",e._sentryDebugIdIdentifier="sentry-dbid-f658b307-8702-464d-aca1-593dcfcf80ca")}catch{}})();const q={key:0,class:"p-steps p-component"},x={class:"p-steps-list"},E={class:"p-menuitem-link"},N={class:"p-steps-number"},z=y({__name:"Steps",props:{stepsInfo:{type:Object,default:null}},setup(e){const t=e,s=h(()=>t.stepsInfo?Array(t.stepsInfo.total).fill(null).map(()=>({label:"",to:""})):[]);return(u,m)=>e.stepsInfo?(r(),c("nav",q,[l("ol",x,[(r(!0),c(b,null,k(i(s),(n,o)=>(r(),c("li",{key:o,class:v(["p-steps-item",{"p-highlight":o+1===e.stepsInfo.current}])},[l("span",E,[l("span",N,C(o+1),1)])],2))),128))])])):F("",!0)}});const X=g(z,[["__scopeId","data-v-c6d9488a"]]),B=e=>`https://fonts.googleapis.com/css2?family=${e.split(" ").join("+")}:wght@300;400;500;700;900&display=swap`;function G(e){return e.startsWith("#")||e.match(/^(rgb|hsl)/)}function H(e){try{return new URL(e),!0}catch{return!1}}function j(e){return H(e)?{backgroundImage:`url(${e})`,backgroundSize:"cover"}:G(e)?{backgroundColor:e}:{backgroundColor:"/_assets/background"}}const K=["theme"],M=["href"],V=y({__name:"WidgetsFrame",props:{theme:{type:String,required:!0},mainColor:{type:String,required:!0},fontFamily:{type:String,required:!0},runtime:{type:String,required:!0,validator:e=>["form","dash"].includes(e)}},setup(e){const t=e,s=d(()=>B(t.fontFamily)),u=d(()=>(typeof document<"u"&&document.documentElement.style.setProperty("--ac-global-font-family",t.fontFamily),{"--color-main":t.mainColor,"--color-main-light":w(t.mainColor,.15),"--color-main-hover":p(t.mainColor),"--color-main-active":p(t.mainColor),"--color-secondary":"transparent","--color-secondary-lighter":"transparent","--color-secondary-darker":"transparent","--button-font-color-main":R(t.mainColor),"--font-family":t.fontFamily,...j(t.theme)})),m=d(()=>t.runtime==="dash"?$:A),n=I({"--font-color":m.value,"--background-color":"transparent"}),o=async()=>{const a=T(t.theme)?await U(t.theme):W(t.theme);n["--font-color"]=a?f:_,n["--background-color"]=a?_:f};return S(o),D(()=>t.theme,o),(a,P)=>(r(),c("div",{class:"frame background-theme",theme:e.theme,style:O({...i(u),...i(n)})},[l("link",{href:i(s),rel:"stylesheet"},null,8,M),L(a.$slots,"default",{},void 0,!0)],12,K))}});const Y=g(V,[["__scopeId","data-v-ca2408ab"]]);export{X as S,Y as W}; +//# sourceMappingURL=WidgetsFrame.2b06573d.js.map diff --git a/abstra_statics/dist/assets/WidgetsFrame.8af89817.js b/abstra_statics/dist/assets/WidgetsFrame.8af89817.js deleted file mode 100644 index 5511b09a09..0000000000 --- a/abstra_statics/dist/assets/WidgetsFrame.8af89817.js +++ /dev/null @@ -1,2 +0,0 @@ -import{d as y,K as h,b as r,c as l,x as c,F as b,L as k,G as v,N as C,z as i,D as F,q as g,ak as d,v as I,o as S,a2 as D,B as L,A as O}from"./registerWidgets.ca6243ef.js";import{l as w,a as p,b as R,D as $,c as A,i as T,d as U,e as W,L as f,f as _}from"./colors.4425ff79.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c5dd1990-9a0f-4a3d-8207-fa2813110f8c",e._sentryDebugIdIdentifier="sentry-dbid-c5dd1990-9a0f-4a3d-8207-fa2813110f8c")}catch{}})();const q={key:0,class:"p-steps p-component"},x={class:"p-steps-list"},E={class:"p-menuitem-link"},N={class:"p-steps-number"},z=y({__name:"Steps",props:{stepsInfo:{type:Object,default:null}},setup(e){const t=e,s=h(()=>t.stepsInfo?Array(t.stepsInfo.total).fill(null).map(()=>({label:"",to:""})):[]);return(u,m)=>e.stepsInfo?(r(),l("nav",q,[c("ol",x,[(r(!0),l(b,null,k(i(s),(n,o)=>(r(),l("li",{key:o,class:v(["p-steps-item",{"p-highlight":o+1===e.stepsInfo.current}])},[c("span",E,[c("span",N,C(o+1),1)])],2))),128))])])):F("",!0)}});const X=g(z,[["__scopeId","data-v-c6d9488a"]]),B=e=>`https://fonts.googleapis.com/css2?family=${e.split(" ").join("+")}:wght@300;400;500;700;900&display=swap`;function G(e){return e.startsWith("#")||e.match(/^(rgb|hsl)/)}function H(e){try{return new URL(e),!0}catch{return!1}}function j(e){return H(e)?{backgroundImage:`url(${e})`,backgroundSize:"cover"}:G(e)?{backgroundColor:e}:{backgroundColor:"/_assets/background"}}const K=["theme"],M=["href"],V=y({__name:"WidgetsFrame",props:{theme:{type:String,required:!0},mainColor:{type:String,required:!0},fontFamily:{type:String,required:!0},runtime:{type:String,required:!0,validator:e=>["form","dash"].includes(e)}},setup(e){const t=e,s=d(()=>B(t.fontFamily)),u=d(()=>(typeof document<"u"&&document.documentElement.style.setProperty("--ac-global-font-family",t.fontFamily),{"--color-main":t.mainColor,"--color-main-light":w(t.mainColor,.15),"--color-main-hover":p(t.mainColor),"--color-main-active":p(t.mainColor),"--color-secondary":"transparent","--color-secondary-lighter":"transparent","--color-secondary-darker":"transparent","--button-font-color-main":R(t.mainColor),"--font-family":t.fontFamily,...j(t.theme)})),m=d(()=>t.runtime==="dash"?$:A),n=I({"--font-color":m.value,"--background-color":"transparent"}),o=async()=>{const a=T(t.theme)?await U(t.theme):W(t.theme);n["--font-color"]=a?f:_,n["--background-color"]=a?_:f};return S(o),D(()=>t.theme,o),(a,P)=>(r(),l("div",{class:"frame background-theme",theme:e.theme,style:O({...i(u),...i(n)})},[c("link",{href:i(s),rel:"stylesheet"},null,8,M),L(a.$slots,"default",{},void 0,!0)],12,K))}});const Y=g(V,[["__scopeId","data-v-ca2408ab"]]);export{X as S,Y as W}; -//# sourceMappingURL=WidgetsFrame.8af89817.js.map diff --git a/abstra_statics/dist/assets/Workspace.cceaede0.js b/abstra_statics/dist/assets/Workspace.4a9a4e8f.js similarity index 70% rename from abstra_statics/dist/assets/Workspace.cceaede0.js rename to abstra_statics/dist/assets/Workspace.4a9a4e8f.js index 496f042a5b..6a3c8eb155 100644 --- a/abstra_statics/dist/assets/Workspace.cceaede0.js +++ b/abstra_statics/dist/assets/Workspace.4a9a4e8f.js @@ -1,4 +1,4 @@ -import{d as g,H as S,J as B,r as x,K as A,b as o,c as t,F as y,L as v,x as c,N as k,G as w,e as r,I,D as f,t as j,w as T,z as _,q as h,O as L,Q as D,a as N}from"./registerWidgets.ca6243ef.js";import{d as O,w as W,a as E,b as F,c as R,m as K,e as P}from"./icons.11151937.js";import{T as V}from"./Tooltip.8c336607.js";import{_ as z}from"./logo.084e5d7c.js";import{a as G}from"./asyncComputed.3cb2e10b.js";import{W as H}from"./workspaces.25055240.js";import{L as $}from"./login.bbc5e7c0.js";import{D as M}from"./DocsButton.b174b81b.js";import"./activeRecord.11b7d185.js";import"./pubsub.581c075e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2116ace-3ab5-42fe-82ca-4a35db69c7c6",e._sentryDebugIdIdentifier="sentry-dbid-f2116ace-3ab5-42fe-82ca-4a35db69c7c6")}catch{}})();const q={class:"sidebar"},J={class:"section-name"},Q=["onClick"],U={class:"item-name"},X={key:0,class:"tag soon"},Y={key:1,class:"tag beta"},Z={key:2,class:"tag cloud"},ee=g({__name:"Sidebar",setup(e){var p;const n=S(),i=B(),a=x((p=i.name)!=null?p:"forms"),u=A(()=>[{name:"Runtime",items:[{name:"Forms",icon:O,path:"forms"},{name:"Hooks",icon:W,path:"hooks"},{name:"Dashes",icon:E,path:"dashes",beta:!0}]},{name:"Resources",items:[{name:"Tables",icon:F,path:"tables",beta:!0}]},{name:"Settings",items:[{name:"Style",icon:R,path:"style"},{name:"Sidebar",icon:K,path:"sidebar"}]}]),m=l=>{l.unavailable||(n.push(l.path),a.value=l.path)};return(l,b)=>(o(),t("div",q,[(o(!0),t(y,null,v(_(u),d=>(o(),t("div",{key:d.name,class:"section"},[c("span",J,k(d.name),1),(o(!0),t(y,null,v(d.items,s=>(o(),t("div",{key:s.name,role:"button",class:w(["item",{active:a.value===s.path,disabled:s.unavailable||d.cloud}]),tabindex:"0",onClick:ve=>m(s)},[r(I,{class:w(["icon",{disabled:s.unavailable,active:a.value===s.path}]),path:s.icon,width:"20",height:"20"},null,8,["class","path"]),c("span",U,k(s.name),1),s.unavailable?(o(),t("span",X,"SOON")):f("",!0),s.beta?(o(),t("span",Y,"BETA")):f("",!0),s.cloud?(o(),t("span",Z,"CLOUD")):f("",!0),s.warning?(o(),j(V,{key:3,class:"warning",text:s.warning,fixed:!0,top:18,left:18},{default:T(()=>[r(I,{path:_(P),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):f("",!0)],10,Q))),128))]))),128))]))}});const oe=h(ee,[["__scopeId","data-v-50de59cf"]]);const te={},C=e=>(L("data-v-ccfb70ef"),e=e(),D(),e),se={class:"logo"},ae=C(()=>c("img",{src:z,alt:"Abstra cloud logo"},null,-1)),ne=C(()=>c("span",null," Abstra ",-1)),ce=[ae,ne];function re(e,n){return o(),t("div",se,ce)}const le=h(te,[["render",re],["__scopeId","data-v-ccfb70ef"]]),ie={key:0,class:"login-block"},de={key:1,class:"login-block"},_e=["href"],ue={key:1,class:"button"},pe={key:2,class:"login-block"},be=g({__name:"LoginBlock",setup(e){const n=x(!1),{loading:i,result:a,refetch:u}=G(()=>$.get());async function m(){const b=prompt(`Login to our console at https://cloud.abstra.io and get an API Key to deploy your Projects. +import{d as g,H as S,J as B,r as x,K as A,b as o,c as t,F as y,L as v,x as c,N as k,G as w,e as r,I,D as h,t as j,w as T,z as _,q as f,O as L,Q as D,a as N}from"./registerWidgets.89616af0.js";import{d as O,w as W,a as E,b as F,c as R,m as K,e as P}from"./icons.9cfdae6d.js";import{T as V}from"./Tooltip.1f768a3e.js";import{_ as z}from"./logo.084e5d7c.js";import{a as G}from"./asyncComputed.8ac91a75.js";import{W as H}from"./workspaces.621b79ad.js";import{L as $}from"./login.6c1df514.js";import{D as M}from"./DocsButton.f9b71025.js";import"./activeRecord.3d3c7835.js";import"./pubsub.d7600aa1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b07a9487-4fb1-4625-9937-1e8429ee2766",e._sentryDebugIdIdentifier="sentry-dbid-b07a9487-4fb1-4625-9937-1e8429ee2766")}catch{}})();const q={class:"sidebar"},J={class:"section-name"},Q=["onClick"],U={class:"item-name"},X={key:0,class:"tag soon"},Y={key:1,class:"tag beta"},Z={key:2,class:"tag cloud"},ee=g({__name:"Sidebar",setup(e){var p;const n=S(),i=B(),a=x((p=i.name)!=null?p:"forms"),u=A(()=>[{name:"Runtime",items:[{name:"Forms",icon:O,path:"forms"},{name:"Hooks",icon:W,path:"hooks"},{name:"Dashes",icon:E,path:"dashes",beta:!0}]},{name:"Resources",items:[{name:"Tables",icon:F,path:"tables",beta:!0}]},{name:"Settings",items:[{name:"Style",icon:R,path:"style"},{name:"Sidebar",icon:K,path:"sidebar"}]}]),m=l=>{l.unavailable||(n.push(l.path),a.value=l.path)};return(l,b)=>(o(),t("div",q,[(o(!0),t(y,null,v(_(u),d=>(o(),t("div",{key:d.name,class:"section"},[c("span",J,k(d.name),1),(o(!0),t(y,null,v(d.items,s=>(o(),t("div",{key:s.name,role:"button",class:w(["item",{active:a.value===s.path,disabled:s.unavailable||d.cloud}]),tabindex:"0",onClick:ve=>m(s)},[r(I,{class:w(["icon",{disabled:s.unavailable,active:a.value===s.path}]),path:s.icon,width:"20",height:"20"},null,8,["class","path"]),c("span",U,k(s.name),1),s.unavailable?(o(),t("span",X,"SOON")):h("",!0),s.beta?(o(),t("span",Y,"BETA")):h("",!0),s.cloud?(o(),t("span",Z,"CLOUD")):h("",!0),s.warning?(o(),j(V,{key:3,class:"warning",text:s.warning,fixed:!0,top:18,left:18},{default:T(()=>[r(I,{path:_(P),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):h("",!0)],10,Q))),128))]))),128))]))}});const oe=f(ee,[["__scopeId","data-v-50de59cf"]]);const te={},C=e=>(L("data-v-ccfb70ef"),e=e(),D(),e),se={class:"logo"},ae=C(()=>c("img",{src:z,alt:"Abstra cloud logo"},null,-1)),ne=C(()=>c("span",null," Abstra ",-1)),ce=[ae,ne];function re(e,n){return o(),t("div",se,ce)}const le=f(te,[["render",re],["__scopeId","data-v-ccfb70ef"]]),ie={key:0,class:"login-block"},de={key:1,class:"login-block"},_e=["href"],ue={key:1,class:"button"},pe={key:2,class:"login-block"},be=g({__name:"LoginBlock",setup(e){const n=x(!1),{loading:i,result:a,refetch:u}=G(()=>$.get());async function m(){const b=prompt(`Login to our console at https://cloud.abstra.io and get an API Key to deploy your Projects. -Enter your API Key here:`);!b||(await $.create(b),u())}async function p(){!a.value||(await a.value.delete(),u())}async function l(){!a.value||(n.value=!0,confirm("Are you sure you want to deploy this project to Abstra Cloud?")&&(await H.deploy(),window.open(`https://cloud.abstra.io/projects/${a.value.projectId}/builds`,"_blank")),n.value=!1)}return(b,d)=>_(i)?(o(),t("div",ie,"loading...")):_(a)?(o(),t("div",de,[c("a",{class:"button",href:`https://cloud.abstra.io/projects/${_(a).projectId}`,target:"_blank"},"Go to console ",8,_e),n.value?(o(),t("button",ue,"Deploying...")):(o(),t("button",{key:0,class:"button",onClick:l},"Deploy")),c("button",{class:"button",onClick:p},"Logout")])):(o(),t("div",pe,[c("button",{class:"button",onClick:m},"Login to deploy")]))}});const fe=h(be,[["__scopeId","data-v-d5de8b44"]]),he=e=>(L("data-v-77e07499"),e=e(),D(),e),me=he(()=>c("div",{class:"grow"},null,-1)),ye={class:"workspace"},ge=g({__name:"Workspace",setup(e){return(n,i)=>{const a=N("router-view");return o(),t(y,null,[c("nav",null,[r(le),me,r(M),r(fe)]),c("div",ye,[r(oe,{class:"sidebar"}),r(a)])],64)}}});const Ae=h(ge,[["__scopeId","data-v-77e07499"]]);export{Ae as default}; -//# sourceMappingURL=Workspace.cceaede0.js.map +Enter your API Key here:`);!b||(await $.create(b),u())}async function p(){!a.value||(await a.value.delete(),u())}async function l(){!a.value||(n.value=!0,confirm("Are you sure you want to deploy this project to Abstra Cloud?")&&(await H.deploy(),window.open(`https://cloud.abstra.io/projects/${a.value.projectId}/builds`,"_blank")),n.value=!1)}return(b,d)=>_(i)?(o(),t("div",ie,"loading...")):_(a)?(o(),t("div",de,[c("a",{class:"button",href:`https://cloud.abstra.io/projects/${_(a).projectId}`,target:"_blank"},"Go to console ",8,_e),n.value?(o(),t("button",ue,"Deploying...")):(o(),t("button",{key:0,class:"button",onClick:l},"Deploy")),c("button",{class:"button",onClick:p},"Logout")])):(o(),t("div",pe,[c("button",{class:"button",onClick:m},"Login to deploy")]))}});const he=f(be,[["__scopeId","data-v-d5de8b44"]]),fe=e=>(L("data-v-77e07499"),e=e(),D(),e),me=fe(()=>c("div",{class:"grow"},null,-1)),ye={class:"workspace"},ge=g({__name:"Workspace",setup(e){return(n,i)=>{const a=N("router-view");return o(),t(y,null,[c("nav",null,[r(le),me,r(M),r(he)]),c("div",ye,[r(oe,{class:"sidebar"}),r(a)])],64)}}});const Ae=f(ge,[["__scopeId","data-v-77e07499"]]);export{Ae as default}; +//# sourceMappingURL=Workspace.4a9a4e8f.js.map diff --git a/abstra_statics/dist/assets/activeRecord.11b7d185.js b/abstra_statics/dist/assets/activeRecord.11b7d185.js deleted file mode 100644 index b2d3411f01..0000000000 --- a/abstra_statics/dist/assets/activeRecord.11b7d185.js +++ /dev/null @@ -1,2 +0,0 @@ -var h=Object.defineProperty;var r=(s,t,e)=>t in s?h(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var a=(s,t,e)=>(r(s,typeof t!="symbol"?t+"":t,e),e);import{P as u}from"./pubsub.581c075e.js";import{R as c,S as g}from"./registerWidgets.ca6243ef.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="64741640-bc42-4601-88f7-81baa0a757ba",s._sentryDebugIdIdentifier="sentry-dbid-64741640-bc42-4601-88f7-81baa0a757ba")}catch{}})();class n{constructor(t,e,i){a(this,"initialState");a(this,"_changes");a(this,"api");a(this,"idKey");a(this,"pubsub");this.initialState=e,this._changes=c({}),this.api=t,this.idKey=i,this.pubsub=new u}static create(t,e,i=null){return g(new n(t,e,i))}get changes(){return this._changes.value}get(t){var e;return(e=this.changes[t])!=null?e:this.initialState[t]}set(t,e){this._changes.value={...this.changes,[t]:e}}async save(){if(Object.keys(this.changes).length===0)return;this.initialState=await this.api.update(this.idKey?this.initialState[this.idKey]:null,this.changes);const t={...this.changes};this._changes.value={},this.pubsub.publish("update",t)}hasChanges(){return Object.keys(this.changes).length>0}get state(){return{...this.initialState,...this.changes}}}export{n as A}; -//# sourceMappingURL=activeRecord.11b7d185.js.map diff --git a/abstra_statics/dist/assets/activeRecord.3d3c7835.js b/abstra_statics/dist/assets/activeRecord.3d3c7835.js new file mode 100644 index 0000000000..4669dc9d5f --- /dev/null +++ b/abstra_statics/dist/assets/activeRecord.3d3c7835.js @@ -0,0 +1,2 @@ +var h=Object.defineProperty;var c=(s,t,e)=>t in s?h(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var i=(s,t,e)=>(c(s,typeof t!="symbol"?t+"":t,e),e);import{P as r}from"./pubsub.d7600aa1.js";import{R as u,S as g}from"./registerWidgets.89616af0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="270f4c52-a024-42c6-975c-d35791275fcd",s._sentryDebugIdIdentifier="sentry-dbid-270f4c52-a024-42c6-975c-d35791275fcd")}catch{}})();class n{constructor(t,e,a){i(this,"initialState");i(this,"_changes");i(this,"api");i(this,"idKey");i(this,"pubsub");this.initialState=e,this._changes=u({}),this.api=t,this.idKey=a,this.pubsub=new r}static create(t,e,a=null){return g(new n(t,e,a))}get changes(){return this._changes.value}get(t){var e;return(e=this.changes[t])!=null?e:this.initialState[t]}set(t,e){this._changes.value={...this.changes,[t]:e}}async save(){if(Object.keys(this.changes).length===0)return;this.initialState=await this.api.update(this.idKey?this.initialState[this.idKey]:null,this.changes);const t={...this.changes};this._changes.value={},this.pubsub.publish("update",t)}hasChanges(){return Object.keys(this.changes).length>0}get state(){return{...this.initialState,...this.changes}}}export{n as A}; +//# sourceMappingURL=activeRecord.3d3c7835.js.map diff --git a/abstra_statics/dist/assets/asyncComputed.3cb2e10b.js b/abstra_statics/dist/assets/asyncComputed.3cb2e10b.js deleted file mode 100644 index d73910d07c..0000000000 --- a/abstra_statics/dist/assets/asyncComputed.3cb2e10b.js +++ /dev/null @@ -1,2 +0,0 @@ -import{R as c,K as t}from"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="bd455f03-3e08-4dd5-9cb3-055c68f7d4dd",r._sentryDebugIdIdentifier="sentry-dbid-bd455f03-3e08-4dd5-9cb3-055c68f7d4dd")}catch{}})();const i=r=>{const e=c({loading:!0,result:null,error:null}),n=l=>(e.value={loading:!1,result:l,error:null},l),d=l=>{e.value={loading:!1,result:null,error:l}},o=()=>{e.value={loading:!0,result:null,error:null},r().then(n).catch(d)};o();const s=t(()=>e.value.loading),u=t(()=>e.value.result),a=t(()=>e.value.error);return{loading:s,result:u,error:a,refetch:o}};export{i as a}; -//# sourceMappingURL=asyncComputed.3cb2e10b.js.map diff --git a/abstra_statics/dist/assets/asyncComputed.8ac91a75.js b/abstra_statics/dist/assets/asyncComputed.8ac91a75.js new file mode 100644 index 0000000000..9135137aa2 --- /dev/null +++ b/abstra_statics/dist/assets/asyncComputed.8ac91a75.js @@ -0,0 +1,2 @@ +import{R as d,K as t}from"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="a7813ff3-dff8-46e5-89f4-bfb3c86063ff",r._sentryDebugIdIdentifier="sentry-dbid-a7813ff3-dff8-46e5-89f4-bfb3c86063ff")}catch{}})();const i=r=>{const e=d({loading:!0,result:null,error:null}),n=l=>(e.value={loading:!1,result:l,error:null},l),s=l=>{e.value={loading:!1,result:null,error:l}},o=()=>{e.value={loading:!0,result:null,error:null},r().then(n).catch(s)};o();const u=t(()=>e.value.loading),f=t(()=>e.value.result),a=t(()=>e.value.error);return{loading:u,result:f,error:a,refetch:o}};export{i as a}; +//# sourceMappingURL=asyncComputed.8ac91a75.js.map diff --git a/abstra_statics/dist/assets/broker.a62f2378.js b/abstra_statics/dist/assets/broker.67106cf5.js similarity index 83% rename from abstra_statics/dist/assets/broker.a62f2378.js rename to abstra_statics/dist/assets/broker.67106cf5.js index 294fca8911..43a9504a97 100644 --- a/abstra_statics/dist/assets/broker.a62f2378.js +++ b/abstra_statics/dist/assets/broker.67106cf5.js @@ -1,3 +1,3 @@ -var ae=Object.defineProperty;var ie=(r,e,n)=>e in r?ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var u=(r,e,n)=>(ie(r,typeof e!="symbol"?e+"":e,n),n);import{d as L,b as f,c as y,x as E,z as T,N as U,D as P,q as C,a as le,t as w,B as ue,r as N,w as re,U as ce,V as $,a4 as de,K as F,a2 as he,v as Q,a5 as X,a6 as fe,a7 as pe,o as me,Y as ve,G as Z,e as R,F as ee,L as te,a8 as ge,a9 as ye}from"./registerWidgets.ca6243ef.js";import{p as j}from"./passwordlessManager.0ab78ba0.js";import{j as we,k as be}from"./icons.11151937.js";import{_ as _e}from"./ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js";import{P as ke}from"./Passwordless.65114c07.js";import{e as Ee,R as Pe}from"./executeJs.c3858a9c.js";import{W as Ie}from"./WidgetsFrame.8af89817.js";import{L as De}from"./CircularLoading.5630a601.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="790e89d8-eacb-45f6-a517-f2ec5265ee0d",r._sentryDebugIdIdentifier="sentry-dbid-790e89d8-eacb-45f6-a517-f2ec5265ee0d")}catch{}})();const xe={key:0,class:"hint"},Le={class:"icon",viewBox:"0 0 24 24",style:{width:"20px",height:"20px"}},Ce=["d"],Se={class:"hint-content"},Ae=L({__name:"WidgetHint",props:{hint:null},setup(r){return(e,n)=>r.hint?(f(),y("div",xe,[(f(),y("svg",Le,[E("path",{d:T(we)},null,8,Ce)])),E("div",Se,U(r.hint),1)])):P("",!0)}});const We=C(Ae,[["__scopeId","data-v-419a518f"]]),Be={class:"outline-button"},Fe=L({__name:"OutlineButton",props:{iconPath:null,noShadow:{type:Boolean},status:null},setup(r){return(e,n)=>{const t=le("icon");return f(),y("button",Be,[r.iconPath?(f(),w(t,{key:0,path:r.iconPath,fill:"#fff",class:"icon"},null,8,["path"])):P("",!0),ue(e.$slots,"default",{},void 0,!0)])}}});const Re=C(Fe,[["__scopeId","data-v-d16448de"]]),je=L({__name:"FormAutoFill",props:{broker:null,form:null},setup(r){const e=r,n=window.__runs||(window.__runs={previous:[],current:[]});e.broker.on("start",()=>{n.previous=n.current,n.current=[]});const t=N(null);function o(){for(const h in n.current){const c=n.previous[h],i=n.current[h];if(!c||c.type!==i.type||c.type=="form"&&!$.exports.isEqual(c.widgets,i.widgets)||c.type=="form-response"&&!$.exports.isEqual(c.payload,i.payload))return null}const a=n.previous[n.current.length];if((a==null?void 0:a.type)!=="form-response")return null;t.value=a}function d(){const a=t.value;a&&e.broker.send(a)}return e.broker.on("form",a=>{n.current.push(a),o()}),e.broker.on("form-response",a=>{n.current.push(a),t.value=null}),(a,h)=>t.value?(f(),w(Re,{key:0,"icon-path":T(be),class:"form-auto-fill-btn",onClick:d},{default:re(()=>[ce(" Repeat last answer ")]),_:1},8,["icon-path"])):P("",!0)}});const Oe=C(je,[["__scopeId","data-v-9590d96b"]]);class _{constructor(e,n){u(this,"element",null);this.name=e,this.isDefault=n}static fromDto(e){return typeof e=="string"?new _(e,!1):new _(e.name,e.is_default)}setElement(e){e instanceof HTMLElement&&(this.element=e)}get isFocused(){return this.element===document.activeElement}focusOnButton(){var e;(e=this.element)==null||e.focus()}addKeydownListener(e){var n;(n=this.element)==null||n.addEventListener("keydown",e)}}class H{constructor(e){this.form=e}static from(e){return new H(e)}get startAction(){var e;return[_.fromDto((e=this.form.startButtonText)!=null?e:"Start")]}get restartAction(){var n;const e=(n=this.form.restartButtonText)!=null?n:"Restart";return this.form.allowRestart?[_.fromDto(e)]:[]}fromPageActionsDto(e){return e.filter(n=>!!n).map(n=>_.fromDto(n))}}async function Ue(r){window.should_ask_before_leave=!1,window.location.href=r.url}const Ne={redirect:Ue,"execute-js":Ee};class V{constructor(e,n){u(this,"loading",!1);u(this,"endedByPage",!1);u(this,"reactivePollInterval",null);u(this,"programEnded",!1);u(this,"widgetError",()=>{this.newPageDefinition({widgets:[{type:"error"}],actions:[],fullWidth:!1,hasError:!1,steps:null})});u(this,"widgetEnd",()=>{this.endedByPage||this.newPageDefinition({widgets:[{type:"end"}],actions:this.pageActionFactory.restartAction,fullWidth:!1,hasError:!1,steps:null})});u(this,"sendUser",e=>{this.broker.send({type:"auth:saved-jwt",jwt:e.jwt}),this.broker.send({type:"metadata",payload:{authenticated_user:e.claims.email}})});u(this,"sendBrowserTryDisconnect",()=>{this.broker.send({type:"browser:try-disconnect"})});u(this,"newPageDefinitionListener",()=>{});u(this,"updatePageDefinitionListener",()=>{});u(this,"onReactivePollListener",()=>{});u(this,"onErrorListener",()=>{});u(this,"onExitListener",()=>{});u(this,"onStartAuthListener");u(this,"onEndAuthListener");u(this,"onBadAuthListener");this.broker=e,this.pageActionFactory=n}static create(e,n){const t=new V(e,n);return t.broker.onClose(()=>{if(t.programEnded)return;const o="Connection with service closed before program ended";t.widgetError(),t.error(o)}),t.broker.on("form",({widgets:o,actions:d,buttonText:a,endProgram:h,reactivePollingInterval:c,steps:i})=>{t.loading=!1,t.newPageDefinition({widgets:o,actions:t.pageActionFactory.fromPageActionsDto(a?[a]:d!=null?d:[]),fullWidth:o.some(v=>"fullWidth"in v&&v.fullWidth),hasError:!1,steps:i}),c&&(t.reactivePollInterval=setInterval(t.onReactivePollListener,c*1e3)),h&&(t.endedByPage=!0,t.broker.send({type:"form-response",payload:{},secrets:[]}))}),t.broker.on("action",async({action:o})=>{var h;let d=null,a;try{const{type:c}=o;d=(h=await Ne[c](o))!=null?h:null}catch(c){a=c.message}t.broker.send({type:"action-response",value:d,errorMessage:a})}),t.broker.on("auth:require-info",()=>{t.newPageDefinition({widgets:[],actions:[],fullWidth:!1,hasError:!1,steps:null}),t.onStartAuthListener&&t.onStartAuthListener()}),t.broker.on("auth:valid-jwt",()=>{t.onEndAuthListener&&t.onEndAuthListener()}),t.broker.on("auth:invalid-jwt",()=>{console.warn("invalid jwt"),t.onBadAuthListener&&t.onBadAuthListener()}),t.broker.on("program:connection-error",o=>{t.widgetError(),t.error(o)}),t.broker.on("program:end",o=>{t.programEnded=!0,o.exitCode||o.exception?(t.widgetError(),t.error(o)):(t.widgetEnd(),t.exit(o))}),t.broker.on("program:disconnect",o=>{t.exit(o)}),t.broker.on("not-enough-credits",()=>{t.error({error:"not-enough-credits"}),t.programEnded=!0}),t.broker.on("heartbeat",()=>{t.broker.resetHeartbeatCounter()}),t.broker.on("user-response-event",({widgets:o,validation:d})=>{t.updatePageDefinition({widgets:o,validation:{message:d.message,status:d.status},fullWidth:o.some(a=>"fullWidth"in a&&a.fullWidth)})}),t}next(e,n,t,o){if((de(Object.values(e))||!t)&&(n==null?void 0:n.name)!=="Back"){this.updatePageDefinition({hasError:!0});return}this.reactivePollInterval&&clearInterval(this.reactivePollInterval);const a={};Object.keys(e).forEach(h=>{a[h]=e[h].value}),this.loading=!0,this.broker.send({type:"form-response",payload:a,action:n==null?void 0:n.name,secrets:o}),this.newPageDefinition({widgets:[],fullWidth:!1,hasError:!1,actions:[],steps:null})}sendUserEvent(e,n){const t={};Object.keys(e).forEach(o=>{t[o]=e[o].value}),this.broker.send({type:"user-event",payload:t,secrets:n})}init(e){this.broker.resetState(),this.newPageDefinition({widgets:[],actions:[],fullWidth:!1,hasError:!1,steps:null}),this.broker.connect(e!=null?e:{})}newPageDefinition(e){this.newPageDefinitionListener(e)}updatePageDefinition(e){this.loading||this.updatePageDefinitionListener(e)}listenToNewPageDefinition(e){this.newPageDefinitionListener=e}listenToPageDefinitionUpdate(e){this.updatePageDefinitionListener=e}onReactivePoll(e){this.onReactivePollListener=e}error(e){this.reactivePollInterval&&clearInterval(this.reactivePollInterval),this.onErrorListener(e)}onError(e){this.onErrorListener=e}exit(e){this.reactivePollInterval&&clearInterval(this.reactivePollInterval),this.onExitListener(e)}onExit(e){this.onExitListener=e}onStartAuth(e){this.onStartAuthListener=e}onEndAuth(e){this.onEndAuthListener=e}onBadAuth(e){this.onBadAuthListener=e}}const $e={key:0,class:"form-wrapper"},Te=["id"],He={key:0,class:"span-error"},Ve={key:1,class:"loading-wrapper"},Me={class:"span-error"},qe={class:"buttons"},ze=L({__name:"FormRunner",props:{form:{type:Object,required:!0},params:Object,isPreview:Boolean,enableAutoFocus:{type:Boolean,required:!0},broker:{type:Object,required:!0}},emits:["log","error","exit","navigate","logout","start"],setup(r,{expose:e,emit:n}){const t=r,o=N(null),d=F(()=>H.from(t.form)),a=s=>n("navigate",s),h=()=>{i.value={widgets:[{type:"start"}],actions:d.value.startAction,fullWidth:!1,hasError:!1,steps:null}};he(()=>t.form,()=>{var s;((s=i.value.widgets[0])==null?void 0:s.type)=="start"&&h()});const c=Q({user:null,authenticating:!1}),i=N({widgets:[],fullWidth:!1,hasError:!1,actions:[],steps:null}),v=Q({responses:{},formState:"idle"}),S=F(()=>i.value.widgets.reduce((s,l)=>("key"in l&&(s[l.key]=v.responses[l.key]),s),{})),A=F(()=>i.value.widgets.filter(s=>"secret"in s).reduce((s,l)=>"key"in l&&"secret"in l?[...s,{key:l.key,secret:l.secret}]:s,[]));M();function M(){c.user=j.getUser()}const se=()=>{j.removeUser(),M(),n("logout")},p=V.create(t.broker,d.value);p.onError(s=>{var l;if(n("error",s),v.formState="error",s.error==="not-enough-credits"){(l=o.value)==null||l.open(),h();return}}),p.onExit(s=>{n("exit",s),v.formState="over"}),p.onStartAuth(()=>{c.user?p.sendUser(c.user):c.authenticating=!0}),p.onEndAuth(()=>{c.authenticating=!1}),p.onBadAuth(()=>{j.removeUser(),c.user=null,c.authenticating=!0}),p.onReactivePoll(()=>{p.sendUserEvent(S.value,A.value)});const oe=s=>{c.user=s,p.sendUser(s)};p.listenToNewPageDefinition(s=>{var l,g;i.value=s,X.init(t.enableAutoFocus,()=>I()),v.responses=fe((g=(l=i.value)==null?void 0:l.widgets)!=null?g:[])}),p.listenToPageDefinitionUpdate(s=>{var l,g;i.value={...i.value,...s},v.responses=pe((g=(l=i.value)==null?void 0:l.widgets)!=null?g:[],v.responses)});const q=s=>{var l;if(!(v.formState!=="running"||t.isPreview||!((l=window.should_ask_before_leave)==null||l)))return p.sendBrowserTryDisconnect(),s.preventDefault(),s.returnValue="Are you sure?",""};me(async()=>{window.addEventListener("beforeunload",q),h(),X.init(t.enableAutoFocus,s=>I(s)),t.form.autoStart&&W()}),ve(()=>{t.broker.close(),window.removeEventListener("beforeunload",q)});const I=s=>{var l,g;if(v.formState!=="running")return W();p.next(S.value,s,(g=(l=i.value.validation)==null?void 0:l.status)!=null?g:!0,A.value)},W=async()=>{p.init(t.params),v.formState="running",n("start")},D=s=>ye(s.type)?v.responses[s.key]:null;function z(s,l,g){if(p.sendUserEvent(S.value,g),l===i.value.widgets.length-1&&["multiple-choice-input","cards-input"].includes(i.value.widgets[l].type)&&i.value.actions.filter(x=>!!x).length===0&&s.value!==null&&(!$.exports.isArray(s.value)||s.value.length)){I();return}}return e({run:W}),(s,l)=>(f(),w(Ie,{class:Z([{preview:r.isPreview},"runner"]),"main-color":r.form.mainColor,theme:r.form.theme,"font-family":r.form.fontFamily,runtime:"form"},{default:re(()=>{var g,x;return[r.isPreview?(f(),w(Oe,{key:0,class:"auto-fill-btn",broker:r.broker,form:r.form,style:{"z-index":1}},null,8,["broker","form"])):P("",!0),R(Pe,{ref_key:"runtimeCommonsRef",ref:o,runtime:r.form,"full-width":i.value.fullWidth,"steps-info":i.value.steps,"is-preview":r.isPreview,"user-email":(g=c.user)==null?void 0:g.claims.email,type:"forms",onLogout:se,onNavigate:a},null,8,["runtime","full-width","steps-info","is-preview","user-email"]),E("main",null,[c.authenticating?(f(),w(ke,{key:1,class:"form-auth",onDone:oe})):(f(),y("div",{key:0,class:Z(["form",{"full-width":i.value.fullWidth}])},[i.value.widgets.length>0?(f(),y("div",$e,[(f(!0),y(ee,null,te(i.value.widgets,(m,k)=>{var J,G,K,Y;return f(),y("div",{id:m.type+k,key:(J=m.key)!=null?J:m.type+k,class:"widget"},[(f(),w(ge(m.type),{data:m,response:D(m),form:r.form,page:i.value,"has-error":((G=D(m))==null?void 0:G.isInvalid())&&i.value.hasError,runtime:"form",onChange:B=>z(B,k,T(A)),onSetInitialValue:B=>z(B,k)},null,40,["data","response","form","page","has-error","onChange","onSetInitialValue"])),R(We,{hint:"hint"in m?m.hint:null},null,8,["hint"]),((K=D(m))==null?void 0:K.isInvalid())&&i.value.hasError?(f(),y("span",He,U((Y=D(m))==null?void 0:Y.errorMessages().join(` -`)),1)):P("",!0)],8,Te)}),128))])):(f(),y("div",Ve,[R(De)])),E("span",Me,U((x=i.value.validation)==null?void 0:x.message),1),E("div",qe,[(f(!0),y(ee,null,te(i.value.actions,m=>(f(),w(_e,{key:m.name,action:m,onNext:k=>I(m)},null,8,["action","onNext"]))),128))])],2))])]}),_:1},8,["class","main-color","theme","font-family"]))}});const st=C(ze,[["__scopeId","data-v-468c1eb1"]]);function Je(r){return r.type==="form"&&r.payload?{...r,type:"form-response"}:r.type==="user-event"&&r.widgets?{...r,type:"user-response-event"}:r}const Ge=[WebSocket.CLOSING,WebSocket.CLOSED];function ne(r,e){const n=r[e.type];if(!n){console.warn("no callback for",e.type);return}n.forEach(t=>t(e))}const b=class{constructor(e){u(this,"formPath",null);u(this,"ws",null);u(this,"callbacks",{"form-response":[],"user-response-event":[],start:[],"auth:info":[],"auth:saved-jwt":[],"auth:restart":[],"auth:validate-token":[],"auth:resend-token":[],heartbeat:[],metadata:[],"executed-by":[],"action-response":[],"user-event":[],"program:end":[],"program:disconnect":[],"program:connection-error":[],stderr:[],stdout:[],form:[],action:[],"not-enough-credits":[],"auth:require-info":[],"auth:expecting-token":[],"auth:token-expired":[],"auth:invalid-token":[],"auth:invalid-jwt":[],"auth:valid-token":[],"auth:valid-jwt":[],"browser:disconnect":[],"browser:try-disconnect":[]});u(this,"onCloseCallbacks",[]);u(this,"heartbeatCounter",0);u(this,"heartbeatInterval");u(this,"params",{});var n;"formPath"in e&&(this.formPath=(n=e.formPath)!=null?n:null)}static create(e){return b._instance&&b._instance.close(),b._instance=new b(e),b._instance}get url(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/_socket?formPath=${encodeURIComponent(this.formPath)}`}resetState(){this.close()}resetHeartbeatCounter(){this.heartbeatCounter=0}on(e,n){this.callbacks[e].push(n)}clearWSEvents(){!this.ws||(clearInterval(this.heartbeatInterval),this.ws.onclose=()=>{},this.ws.onerror=()=>{},this.ws.onmessage=()=>{})}async connect(e,n=1){if(!(n>3))return this.params=e!=null?e:this.params,new Promise(t=>{this.clearWSEvents(),this.ws=new WebSocket(this.url),this.ws.onopen=()=>{t(),this.resetHeartbeatCounter(),this.send({type:"start",params:this.params})};let o=!1;const d=()=>{o||(o=!0)};this.ws.onclose=a=>{if(a.code===1006||!a.wasClean)return d();clearInterval(this.heartbeatInterval),this.onCloseCallbacks.forEach(h=>h())},this.ws.onerror=()=>d(),this.ws.onmessage=a=>{const h=JSON.parse(a.data);ne(this.callbacks,Je(h))},this.heartbeatInterval=setInterval(()=>{if(!(!this.ws||this.ws.readyState!==this.ws.OPEN)){if(this.heartbeatCounter++,this.heartbeatCounter>3)return this.ws.onclose=()=>{},clearInterval(this.heartbeatInterval),d();this.send({type:"heartbeat"})}},2e3)}).catch(()=>{this.connect(this.params,n+1)})}onClose(e){this.onCloseCallbacks.push(e)}close(){if(!this.ws){console.warn("no websocket to close");return}this.clearWSEvents(),this.ws.close()}async send(e){if(!this.ws){console.warn("no websocket to send");return}Ge.includes(this.ws.readyState)&&await this.connect(),this.ws.send(JSON.stringify(e)),ne(this.callbacks,e)}};let O=b;u(O,"_instance");export{st as F,O as R}; -//# sourceMappingURL=broker.a62f2378.js.map +var ae=Object.defineProperty;var ie=(r,e,n)=>e in r?ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var u=(r,e,n)=>(ie(r,typeof e!="symbol"?e+"":e,n),n);import{d as L,b as f,c as y,x as E,z as T,N as U,D as P,q as C,a as le,t as w,B as ue,r as N,w as re,U as ce,V as $,a4 as he,K as F,a2 as de,v as Q,a5 as X,a6 as fe,a7 as pe,o as me,Y as ve,G as Z,e as R,F as ee,L as te,a8 as ge,a9 as ye}from"./registerWidgets.89616af0.js";import{p as j}from"./passwordlessManager.884221ca.js";import{j as we,k as be}from"./icons.9cfdae6d.js";import{_ as _e}from"./ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js";import{P as ke}from"./Passwordless.ac83d40c.js";import{e as Ee,R as Pe}from"./executeJs.dfd1b55f.js";import{W as Ie}from"./WidgetsFrame.2b06573d.js";import{L as De}from"./CircularLoading.0fb686c0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="e84267ef-51f6-4088-812c-581b9e0f5912",r._sentryDebugIdIdentifier="sentry-dbid-e84267ef-51f6-4088-812c-581b9e0f5912")}catch{}})();const xe={key:0,class:"hint"},Le={class:"icon",viewBox:"0 0 24 24",style:{width:"20px",height:"20px"}},Ce=["d"],Se={class:"hint-content"},Ae=L({__name:"WidgetHint",props:{hint:null},setup(r){return(e,n)=>r.hint?(f(),y("div",xe,[(f(),y("svg",Le,[E("path",{d:T(we)},null,8,Ce)])),E("div",Se,U(r.hint),1)])):P("",!0)}});const We=C(Ae,[["__scopeId","data-v-419a518f"]]),Be={class:"outline-button"},Fe=L({__name:"OutlineButton",props:{iconPath:null,noShadow:{type:Boolean},status:null},setup(r){return(e,n)=>{const t=le("icon");return f(),y("button",Be,[r.iconPath?(f(),w(t,{key:0,path:r.iconPath,fill:"#fff",class:"icon"},null,8,["path"])):P("",!0),ue(e.$slots,"default",{},void 0,!0)])}}});const Re=C(Fe,[["__scopeId","data-v-d16448de"]]),je=L({__name:"FormAutoFill",props:{broker:null,form:null},setup(r){const e=r,n=window.__runs||(window.__runs={previous:[],current:[]});e.broker.on("start",()=>{n.previous=n.current,n.current=[]});const t=N(null);function o(){for(const d in n.current){const c=n.previous[d],i=n.current[d];if(!c||c.type!==i.type||c.type=="form"&&!$.exports.isEqual(c.widgets,i.widgets)||c.type=="form-response"&&!$.exports.isEqual(c.payload,i.payload))return null}const a=n.previous[n.current.length];if((a==null?void 0:a.type)!=="form-response")return null;t.value=a}function h(){const a=t.value;a&&e.broker.send(a)}return e.broker.on("form",a=>{n.current.push(a),o()}),e.broker.on("form-response",a=>{n.current.push(a),t.value=null}),(a,d)=>t.value?(f(),w(Re,{key:0,"icon-path":T(be),class:"form-auto-fill-btn",onClick:h},{default:re(()=>[ce(" Repeat last answer ")]),_:1},8,["icon-path"])):P("",!0)}});const Oe=C(je,[["__scopeId","data-v-9590d96b"]]);class _{constructor(e,n){u(this,"element",null);this.name=e,this.isDefault=n}static fromDto(e){return typeof e=="string"?new _(e,!1):new _(e.name,e.is_default)}setElement(e){e instanceof HTMLElement&&(this.element=e)}get isFocused(){return this.element===document.activeElement}focusOnButton(){var e;(e=this.element)==null||e.focus()}addKeydownListener(e){var n;(n=this.element)==null||n.addEventListener("keydown",e)}}class H{constructor(e){this.form=e}static from(e){return new H(e)}get startAction(){var e;return[_.fromDto((e=this.form.startButtonText)!=null?e:"Start")]}get restartAction(){var n;const e=(n=this.form.restartButtonText)!=null?n:"Restart";return this.form.allowRestart?[_.fromDto(e)]:[]}fromPageActionsDto(e){return e.filter(n=>!!n).map(n=>_.fromDto(n))}}async function Ue(r){window.should_ask_before_leave=!1,window.location.href=r.url}const Ne={redirect:Ue,"execute-js":Ee};class V{constructor(e,n){u(this,"loading",!1);u(this,"endedByPage",!1);u(this,"reactivePollInterval",null);u(this,"programEnded",!1);u(this,"widgetError",()=>{this.newPageDefinition({widgets:[{type:"error"}],actions:[],fullWidth:!1,hasError:!1,steps:null})});u(this,"widgetEnd",()=>{this.endedByPage||this.newPageDefinition({widgets:[{type:"end"}],actions:this.pageActionFactory.restartAction,fullWidth:!1,hasError:!1,steps:null})});u(this,"sendUser",e=>{this.broker.send({type:"auth:saved-jwt",jwt:e.jwt}),this.broker.send({type:"metadata",payload:{authenticated_user:e.claims.email}})});u(this,"sendBrowserTryDisconnect",()=>{this.broker.send({type:"browser:try-disconnect"})});u(this,"newPageDefinitionListener",()=>{});u(this,"updatePageDefinitionListener",()=>{});u(this,"onReactivePollListener",()=>{});u(this,"onErrorListener",()=>{});u(this,"onExitListener",()=>{});u(this,"onStartAuthListener");u(this,"onEndAuthListener");u(this,"onBadAuthListener");this.broker=e,this.pageActionFactory=n}static create(e,n){const t=new V(e,n);return t.broker.onClose(()=>{if(t.programEnded)return;const o="Connection with service closed before program ended";t.widgetError(),t.error(o)}),t.broker.on("form",({widgets:o,actions:h,buttonText:a,endProgram:d,reactivePollingInterval:c,steps:i})=>{t.loading=!1,t.newPageDefinition({widgets:o,actions:t.pageActionFactory.fromPageActionsDto(a?[a]:h!=null?h:[]),fullWidth:o.some(v=>"fullWidth"in v&&v.fullWidth),hasError:!1,steps:i}),c&&(t.reactivePollInterval=setInterval(t.onReactivePollListener,c*1e3)),d&&(t.endedByPage=!0,t.broker.send({type:"form-response",payload:{},secrets:[]}))}),t.broker.on("action",async({action:o})=>{var d;let h=null,a;try{const{type:c}=o;h=(d=await Ne[c](o))!=null?d:null}catch(c){a=c.message}t.broker.send({type:"action-response",value:h,errorMessage:a})}),t.broker.on("auth:require-info",()=>{t.newPageDefinition({widgets:[],actions:[],fullWidth:!1,hasError:!1,steps:null}),t.onStartAuthListener&&t.onStartAuthListener()}),t.broker.on("auth:valid-jwt",()=>{t.onEndAuthListener&&t.onEndAuthListener()}),t.broker.on("auth:invalid-jwt",()=>{console.warn("invalid jwt"),t.onBadAuthListener&&t.onBadAuthListener()}),t.broker.on("program:connection-error",o=>{t.widgetError(),t.error(o)}),t.broker.on("program:end",o=>{t.programEnded=!0,o.exitCode||o.exception?(t.widgetError(),t.error(o)):(t.widgetEnd(),t.exit(o))}),t.broker.on("program:disconnect",o=>{t.exit(o)}),t.broker.on("not-enough-credits",()=>{t.error({error:"not-enough-credits"}),t.programEnded=!0}),t.broker.on("heartbeat",()=>{t.broker.resetHeartbeatCounter()}),t.broker.on("user-response-event",({widgets:o,validation:h})=>{t.updatePageDefinition({widgets:o,validation:{message:h.message,status:h.status},fullWidth:o.some(a=>"fullWidth"in a&&a.fullWidth)})}),t}next(e,n,t,o){if((he(Object.values(e))||!t)&&(n==null?void 0:n.name)!=="Back"){this.updatePageDefinition({hasError:!0});return}this.reactivePollInterval&&clearInterval(this.reactivePollInterval);const a={};Object.keys(e).forEach(d=>{a[d]=e[d].value}),this.loading=!0,this.broker.send({type:"form-response",payload:a,action:n==null?void 0:n.name,secrets:o}),this.newPageDefinition({widgets:[],fullWidth:!1,hasError:!1,actions:[],steps:null})}sendUserEvent(e,n){const t={};Object.keys(e).forEach(o=>{t[o]=e[o].value}),this.broker.send({type:"user-event",payload:t,secrets:n})}init(e){this.broker.resetState(),this.newPageDefinition({widgets:[],actions:[],fullWidth:!1,hasError:!1,steps:null}),this.broker.connect(e!=null?e:{})}newPageDefinition(e){this.newPageDefinitionListener(e)}updatePageDefinition(e){this.loading||this.updatePageDefinitionListener(e)}listenToNewPageDefinition(e){this.newPageDefinitionListener=e}listenToPageDefinitionUpdate(e){this.updatePageDefinitionListener=e}onReactivePoll(e){this.onReactivePollListener=e}error(e){this.reactivePollInterval&&clearInterval(this.reactivePollInterval),this.onErrorListener(e)}onError(e){this.onErrorListener=e}exit(e){this.reactivePollInterval&&clearInterval(this.reactivePollInterval),this.onExitListener(e)}onExit(e){this.onExitListener=e}onStartAuth(e){this.onStartAuthListener=e}onEndAuth(e){this.onEndAuthListener=e}onBadAuth(e){this.onBadAuthListener=e}}const $e={key:0,class:"form-wrapper"},Te=["id"],He={key:0,class:"span-error"},Ve={key:1,class:"loading-wrapper"},Me={class:"span-error"},qe={class:"buttons"},ze=L({__name:"FormRunner",props:{form:{type:Object,required:!0},params:Object,isPreview:Boolean,enableAutoFocus:{type:Boolean,required:!0},broker:{type:Object,required:!0}},emits:["log","error","exit","navigate","logout","start"],setup(r,{expose:e,emit:n}){const t=r,o=N(null),h=F(()=>H.from(t.form)),a=s=>n("navigate",s),d=()=>{i.value={widgets:[{type:"start"}],actions:h.value.startAction,fullWidth:!1,hasError:!1,steps:null}};de(()=>t.form,()=>{var s;((s=i.value.widgets[0])==null?void 0:s.type)=="start"&&d()});const c=Q({user:null,authenticating:!1}),i=N({widgets:[],fullWidth:!1,hasError:!1,actions:[],steps:null}),v=Q({responses:{},formState:"idle"}),S=F(()=>i.value.widgets.reduce((s,l)=>("key"in l&&(s[l.key]=v.responses[l.key]),s),{})),A=F(()=>i.value.widgets.filter(s=>"secret"in s).reduce((s,l)=>"key"in l&&"secret"in l?[...s,{key:l.key,secret:l.secret}]:s,[]));M();function M(){c.user=j.getUser()}const se=()=>{j.removeUser(),M(),n("logout")},p=V.create(t.broker,h.value);p.onError(s=>{var l;if(n("error",s),v.formState="error",s.error==="not-enough-credits"){(l=o.value)==null||l.open(),d();return}}),p.onExit(s=>{n("exit",s),v.formState="over"}),p.onStartAuth(()=>{c.user?p.sendUser(c.user):c.authenticating=!0}),p.onEndAuth(()=>{c.authenticating=!1}),p.onBadAuth(()=>{j.removeUser(),c.user=null,c.authenticating=!0}),p.onReactivePoll(()=>{p.sendUserEvent(S.value,A.value)});const oe=s=>{c.user=s,p.sendUser(s)};p.listenToNewPageDefinition(s=>{var l,g;i.value=s,X.init(t.enableAutoFocus,()=>I()),v.responses=fe((g=(l=i.value)==null?void 0:l.widgets)!=null?g:[])}),p.listenToPageDefinitionUpdate(s=>{var l,g;i.value={...i.value,...s},v.responses=pe((g=(l=i.value)==null?void 0:l.widgets)!=null?g:[],v.responses)});const q=s=>{var l;if(!(v.formState!=="running"||t.isPreview||!((l=window.should_ask_before_leave)==null||l)))return p.sendBrowserTryDisconnect(),s.preventDefault(),s.returnValue="Are you sure?",""};me(async()=>{window.addEventListener("beforeunload",q),d(),X.init(t.enableAutoFocus,s=>I(s)),t.form.autoStart&&W()}),ve(()=>{t.broker.close(),window.removeEventListener("beforeunload",q)});const I=s=>{var l,g;if(v.formState!=="running")return W();p.next(S.value,s,(g=(l=i.value.validation)==null?void 0:l.status)!=null?g:!0,A.value)},W=async()=>{p.init(t.params),v.formState="running",n("start")},D=s=>ye(s.type)?v.responses[s.key]:null;function z(s,l,g){if(p.sendUserEvent(S.value,g),l===i.value.widgets.length-1&&["multiple-choice-input","cards-input"].includes(i.value.widgets[l].type)&&i.value.actions.filter(x=>!!x).length===0&&s.value!==null&&(!$.exports.isArray(s.value)||s.value.length)){I();return}}return e({run:W}),(s,l)=>(f(),w(Ie,{class:Z([{preview:r.isPreview},"runner"]),"main-color":r.form.mainColor,theme:r.form.theme,"font-family":r.form.fontFamily,runtime:"form"},{default:re(()=>{var g,x;return[r.isPreview?(f(),w(Oe,{key:0,class:"auto-fill-btn",broker:r.broker,form:r.form,style:{"z-index":1}},null,8,["broker","form"])):P("",!0),R(Pe,{ref_key:"runtimeCommonsRef",ref:o,runtime:r.form,"full-width":i.value.fullWidth,"steps-info":i.value.steps,"is-preview":r.isPreview,"user-email":(g=c.user)==null?void 0:g.claims.email,type:"forms",onLogout:se,onNavigate:a},null,8,["runtime","full-width","steps-info","is-preview","user-email"]),E("main",null,[c.authenticating?(f(),w(ke,{key:1,class:"form-auth",onDone:oe})):(f(),y("div",{key:0,class:Z(["form",{"full-width":i.value.fullWidth}])},[i.value.widgets.length>0?(f(),y("div",$e,[(f(!0),y(ee,null,te(i.value.widgets,(m,k)=>{var J,G,K,Y;return f(),y("div",{id:m.type+k,key:(J=m.key)!=null?J:m.type+k,class:"widget"},[(f(),w(ge(m.type),{data:m,response:D(m),form:r.form,page:i.value,"has-error":((G=D(m))==null?void 0:G.isInvalid())&&i.value.hasError,runtime:"form",onChange:B=>z(B,k,T(A)),onSetInitialValue:B=>z(B,k)},null,40,["data","response","form","page","has-error","onChange","onSetInitialValue"])),R(We,{hint:"hint"in m?m.hint:null},null,8,["hint"]),((K=D(m))==null?void 0:K.isInvalid())&&i.value.hasError?(f(),y("span",He,U((Y=D(m))==null?void 0:Y.errorMessages().join(` +`)),1)):P("",!0)],8,Te)}),128))])):(f(),y("div",Ve,[R(De)])),E("span",Me,U((x=i.value.validation)==null?void 0:x.message),1),E("div",qe,[(f(!0),y(ee,null,te(i.value.actions,m=>(f(),w(_e,{key:m.name,action:m,onNext:k=>I(m)},null,8,["action","onNext"]))),128))])],2))])]}),_:1},8,["class","main-color","theme","font-family"]))}});const st=C(ze,[["__scopeId","data-v-468c1eb1"]]);function Je(r){return r.type==="form"&&r.payload?{...r,type:"form-response"}:r.type==="user-event"&&r.widgets?{...r,type:"user-response-event"}:r}const Ge=[WebSocket.CLOSING,WebSocket.CLOSED];function ne(r,e){const n=r[e.type];if(!n){console.warn("no callback for",e.type);return}n.forEach(t=>t(e))}const b=class{constructor(e){u(this,"formPath",null);u(this,"ws",null);u(this,"callbacks",{"form-response":[],"user-response-event":[],start:[],"auth:info":[],"auth:saved-jwt":[],"auth:restart":[],"auth:validate-token":[],"auth:resend-token":[],heartbeat:[],metadata:[],"executed-by":[],"action-response":[],"user-event":[],"program:end":[],"program:disconnect":[],"program:connection-error":[],stderr:[],stdout:[],form:[],action:[],"not-enough-credits":[],"auth:require-info":[],"auth:expecting-token":[],"auth:token-expired":[],"auth:invalid-token":[],"auth:invalid-jwt":[],"auth:valid-token":[],"auth:valid-jwt":[],"browser:disconnect":[],"browser:try-disconnect":[]});u(this,"onCloseCallbacks",[]);u(this,"heartbeatCounter",0);u(this,"heartbeatInterval");u(this,"params",{});var n;"formPath"in e&&(this.formPath=(n=e.formPath)!=null?n:null)}static create(e){return b._instance&&b._instance.close(),b._instance=new b(e),b._instance}get url(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/_socket?formPath=${encodeURIComponent(this.formPath)}`}resetState(){this.close()}resetHeartbeatCounter(){this.heartbeatCounter=0}on(e,n){this.callbacks[e].push(n)}clearWSEvents(){!this.ws||(clearInterval(this.heartbeatInterval),this.ws.onclose=()=>{},this.ws.onerror=()=>{},this.ws.onmessage=()=>{})}async connect(e,n=1){if(!(n>3))return this.params=e!=null?e:this.params,new Promise(t=>{this.clearWSEvents(),this.ws=new WebSocket(this.url),this.ws.onopen=()=>{t(),this.resetHeartbeatCounter(),this.send({type:"start",params:this.params})};let o=!1;const h=()=>{o||(o=!0)};this.ws.onclose=a=>{if(a.code===1006||!a.wasClean)return h();clearInterval(this.heartbeatInterval),this.onCloseCallbacks.forEach(d=>d())},this.ws.onerror=()=>h(),this.ws.onmessage=a=>{const d=JSON.parse(a.data);ne(this.callbacks,Je(d))},this.heartbeatInterval=setInterval(()=>{if(!(!this.ws||this.ws.readyState!==this.ws.OPEN)){if(this.heartbeatCounter++,this.heartbeatCounter>3)return this.ws.onclose=()=>{},clearInterval(this.heartbeatInterval),h();this.send({type:"heartbeat"})}},2e3)}).catch(()=>{this.connect(this.params,n+1)})}onClose(e){this.onCloseCallbacks.push(e)}close(){if(!this.ws){console.warn("no websocket to close");return}this.clearWSEvents(),this.ws.close()}async send(e){if(!this.ws){console.warn("no websocket to send");return}Ge.includes(this.ws.readyState)&&await this.connect(),this.ws.send(JSON.stringify(e)),ne(this.callbacks,e)}};let O=b;u(O,"_instance");export{st as F,O as R}; +//# sourceMappingURL=broker.67106cf5.js.map diff --git a/abstra_statics/dist/assets/build.5096fbe2.js b/abstra_statics/dist/assets/build.5096fbe2.js deleted file mode 100644 index cd200be3f6..0000000000 --- a/abstra_statics/dist/assets/build.5096fbe2.js +++ /dev/null @@ -1,2 +0,0 @@ -var i=Object.defineProperty;var o=(r,t,e)=>t in r?i(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var d=(r,t,e)=>(o(r,typeof t!="symbol"?t+"":t,e),e);import{C as a}from"./gateway.fa3322de.js";import{A as u}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="dbc2a92a-756d-4434-98f3-06bbf0c075e2",r._sentryDebugIdIdentifier="sentry-dbid-dbc2a92a-756d-4434-98f3-06bbf0c075e2")}catch{}})();class h{constructor(){d(this,"urlPath","builds")}async create(t){return a.post(`projects/${t.projectId}/${this.urlPath}`,{})}async delete(t){await a.delete(`${this.urlPath}/${t}`)}async list(t){return a.get(`projects/${t}/${this.urlPath}`)}async get(t){return a.get(`${this.urlPath}/${t}`)}async update(t,e){return a.patch(`${this.urlPath}/${t}`,e)}async duplicate(t){return a.post(`${this.urlPath}/${t}/duplicate`,{})}async download(t){return a.get(`${this.urlPath}/${t}/download`)}}const s=new h;class n{constructor(t){d(this,"record");this.record=u.create(s,t,"id")}static async list(t){return(await s.list(t)).map(c=>new n(c))}static async create(t){const e=await s.create({projectId:t});return new n(e)}static async get(t){const e=await s.get(t);return new n(e)}async delete(){await s.delete(this.id)}async save(){this.record.save()}hasChanges(){return this.record.hasChanges()}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}async duplicate(){return await s.duplicate(this.id)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get projectId(){return this.record.get("projectId")}get createdAt(){return new Date(this.record.get("createdAt"))}get status(){return this.record.get("status")}get log(){return this.record.get("log")}async download(){const{url:t}=await s.download(this.id);window.open(t,"_blank")}}export{n as B}; -//# sourceMappingURL=build.5096fbe2.js.map diff --git a/abstra_statics/dist/assets/build.ac459472.js b/abstra_statics/dist/assets/build.ac459472.js new file mode 100644 index 0000000000..1259f6da0e --- /dev/null +++ b/abstra_statics/dist/assets/build.ac459472.js @@ -0,0 +1,2 @@ +var i=Object.defineProperty;var o=(r,t,e)=>t in r?i(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var c=(r,t,e)=>(o(r,typeof t!="symbol"?t+"":t,e),e);import{C as s}from"./gateway.0deebb85.js";import{A as u}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1f722eba-52c3-4ccc-8b72-2e2326d8bef6",r._sentryDebugIdIdentifier="sentry-dbid-1f722eba-52c3-4ccc-8b72-2e2326d8bef6")}catch{}})();class h{constructor(){c(this,"urlPath","builds")}async create(t){return s.post(`projects/${t.projectId}/${this.urlPath}`,{})}async delete(t){await s.delete(`${this.urlPath}/${t}`)}async list(t){return s.get(`projects/${t}/${this.urlPath}`)}async get(t){return s.get(`${this.urlPath}/${t}`)}async update(t,e){return s.patch(`${this.urlPath}/${t}`,e)}async duplicate(t){return s.post(`${this.urlPath}/${t}/duplicate`,{})}async download(t){return s.get(`${this.urlPath}/${t}/download`)}}const a=new h;class n{constructor(t){c(this,"record");this.record=u.create(a,t,"id")}static async list(t){return(await a.list(t)).map(d=>new n(d))}static async create(t){const e=await a.create({projectId:t});return new n(e)}static async get(t){const e=await a.get(t);return new n(e)}async delete(){await a.delete(this.id)}async save(){this.record.save()}hasChanges(){return this.record.hasChanges()}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}async duplicate(){return await a.duplicate(this.id)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get projectId(){return this.record.get("projectId")}get createdAt(){return new Date(this.record.get("createdAt"))}get status(){return this.record.get("status")}get log(){return this.record.get("log")}async download(){const{url:t}=await a.download(this.id);window.open(t,"_blank")}}export{n as B}; +//# sourceMappingURL=build.ac459472.js.map diff --git a/abstra_statics/dist/assets/colors.4425ff79.js b/abstra_statics/dist/assets/colors.bc71fdf2.js similarity index 94% rename from abstra_statics/dist/assets/colors.4425ff79.js rename to abstra_statics/dist/assets/colors.bc71fdf2.js index f37ebade78..ccd59a413b 100644 --- a/abstra_statics/dist/assets/colors.4425ff79.js +++ b/abstra_statics/dist/assets/colors.bc71fdf2.js @@ -1,2 +1,2 @@ -import"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="a0afd4d2-43dc-4ceb-b6bc-ceed3564f902",e._sentryDebugIdIdentifier="sentry-dbid-a0afd4d2-43dc-4ceb-b6bc-ceed3564f902")}catch{}})();const _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},x="#000",A="#272D35",C="#ffffff",I="#1b1b23";function w(e,r){const{r:n,g:t,b:a,usePound:i}=h(e);return b(g(n,-r),g(t,-r),g(a,-r),i)}function g(e,r){const n=e*(100+r*100)/100;return n>255?255:n<0?0:Math.round(n)}const L=(e,r)=>p(w(p(e),r)),F=e=>{if(q(e))return d(e);const r=_[e.toLowerCase()];if(!r)return!1;const[n,t,a]=r;return d(b(n,t,a))},E=e=>d(e)?C:I,M=e=>d(e)?L(e,.1):w(e,.1);function d(e){const{r,g:n,b:t}=h(e);return r*.299+n*.587+t*.114<186}function h(e){let r=!1;e[0]=="#"&&(e=e.slice(1),r=!0);const n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:n&255,usePound:r}}function p(e){const{r,g:n,b:t,usePound:a}=h(e);return b(255-r,255-n,255-t,a)}const b=(e,r,n,t=!0)=>(t?"#":"")+(n|r<<8|e<<16).toString(16).padStart(6,"0");function q(e){if(e.length>9)return!1;const r=e.startsWith("#")?e.slice(1):e;return/[0-9A-Fa-f]{6}/g.test(r)}function T(e){return/https?:\/\/[^\s]+/g.test(e)}const c={};function H(e){return e in c||(c[e]=new Promise(r=>{const n=document.createElement("img");n.src=e,n.crossOrigin="Anonymous",n.style.display="none",document.body.appendChild(n);let t=0;n.onload=()=>{const{width:a,height:i}=n,o=document.createElement("canvas");o.width=a,o.height=i;const u=o.getContext("2d");if(!u)return r(!1);u.drawImage(n,0,0);const v=u.getImageData(0,0,o.width,o.height),{data:s}=v;let m,f,y,k;for(let l=0,O=s.length;l255?255:n<0?0:Math.round(n)}const L=(e,r)=>p(w(p(e),r)),F=e=>{if(q(e))return d(e);const r=_[e.toLowerCase()];if(!r)return!1;const[n,t,a]=r;return d(b(n,t,a))},E=e=>d(e)?C:I,M=e=>d(e)?L(e,.1):w(e,.1);function d(e){const{r,g:n,b:t}=h(e);return r*.299+n*.587+t*.114<186}function h(e){let r=!1;e[0]=="#"&&(e=e.slice(1),r=!0);const n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:n&255,usePound:r}}function p(e){const{r,g:n,b:t,usePound:a}=h(e);return b(255-r,255-n,255-t,a)}const b=(e,r,n,t=!0)=>(t?"#":"")+(n|r<<8|e<<16).toString(16).padStart(6,"0");function q(e){if(e.length>9)return!1;const r=e.startsWith("#")?e.slice(1):e;return/[0-9A-Fa-f]{6}/g.test(r)}function T(e){return/https?:\/\/[^\s]+/g.test(e)}const c={};function H(e){return e in c||(c[e]=new Promise(r=>{const n=document.createElement("img");n.src=e,n.crossOrigin="Anonymous",n.style.display="none",document.body.appendChild(n);let t=0;n.onload=()=>{const{width:a,height:i}=n,o=document.createElement("canvas");o.width=a,o.height=i;const u=o.getContext("2d");if(!u)return r(!1);u.drawImage(n,0,0);const v=u.getImageData(0,0,o.width,o.height),{data:s}=v;let m,f,y,k;for(let l=0,O=s.length;lt in r?o(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var c=(r,t,e)=>(u(r,typeof t!="symbol"?t+"":t,e),e);import{A as h}from"./activeRecord.11b7d185.js";import{C as a}from"./gateway.fa3322de.js";import{b as g}from"./index.a86d8064.js";import"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="68f3d3e9-62f3-4bea-9c3d-133f44484d90",r._sentryDebugIdIdentifier="sentry-dbid-68f3d3e9-62f3-4bea-9c3d-133f44484d90")}catch{}})();class y{constructor(){c(this,"urlPath","connectors")}async create(t){return a.post(`projects/${t.projectId}/${this.urlPath}`,t)}async delete(t){await a.delete(`${this.urlPath}/${t}`)}async list(t){return a.get(`projects/${t}/${this.urlPath}`)}async get(t){return a.get(`${this.urlPath}/${t}`)}async update(t,e){return a.patch(`${this.urlPath}/${t}`,e)}async test(t,e,s){return await a.post(`${this.urlPath}/${t}/test`,{method:e,params:s})}}const n=new y;class i{constructor(t){c(this,"record");this.record=h.create(n,t,"id")}static async list(t){return(await n.list(t)).map(s=>new i(s))}static async create(t,e,s){const d=await n.create({projectId:t,name:e,type:s});return new i(d)}static async get(t){const e=await n.get(t);return new i(e)}async delete(){await n.delete(this.id)}async test(t,e){return await n.test(this.id,t,e)}async save(){this.record.save()}hasChanges(){return this.record.hasChanges()}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get projectId(){return this.record.get("projectId")}get type(){return this.record.get("type")}get settings(){return new Proxy(this.record.get("settings"),{set:(t,e,s)=>(t[e]=s,this.record.set("settings",t),!0)})}get schema(){return g.schema[this.type]}}export{i as C}; -//# sourceMappingURL=connector.d9ae500d.js.map +var o=Object.defineProperty;var u=(r,t,e)=>t in r?o(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var i=(r,t,e)=>(u(r,typeof t!="symbol"?t+"":t,e),e);import{A as h}from"./activeRecord.3d3c7835.js";import{C as a}from"./gateway.0deebb85.js";import{b as g}from"./index.dae46ea1.js";import"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="3d61cb19-561b-4567-887c-c57d1eafd87c",r._sentryDebugIdIdentifier="sentry-dbid-3d61cb19-561b-4567-887c-c57d1eafd87c")}catch{}})();class y{constructor(){i(this,"urlPath","connectors")}async create(t){return a.post(`projects/${t.projectId}/${this.urlPath}`,t)}async delete(t){await a.delete(`${this.urlPath}/${t}`)}async list(t){return a.get(`projects/${t}/${this.urlPath}`)}async get(t){return a.get(`${this.urlPath}/${t}`)}async update(t,e){return a.patch(`${this.urlPath}/${t}`,e)}async test(t,e,s){return await a.post(`${this.urlPath}/${t}/test`,{method:e,params:s})}}const n=new y;class c{constructor(t){i(this,"record");this.record=h.create(n,t,"id")}static async list(t){return(await n.list(t)).map(s=>new c(s))}static async create(t,e,s){const d=await n.create({projectId:t,name:e,type:s});return new c(d)}static async get(t){const e=await n.get(t);return new c(e)}async delete(){await n.delete(this.id)}async test(t,e){return await n.test(this.id,t,e)}async save(){this.record.save()}hasChanges(){return this.record.hasChanges()}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get projectId(){return this.record.get("projectId")}get type(){return this.record.get("type")}get settings(){return new Proxy(this.record.get("settings"),{set:(t,e,s)=>(t[e]=s,this.record.set("settings",t),!0)})}get schema(){return g.schema[this.type]}}export{c as C}; +//# sourceMappingURL=connector.8528d309.js.map diff --git a/abstra_statics/dist/assets/console.138f0d87.js b/abstra_statics/dist/assets/console.138f0d87.js new file mode 100644 index 0000000000..830fc502c0 --- /dev/null +++ b/abstra_statics/dist/assets/console.138f0d87.js @@ -0,0 +1,2 @@ +import{q as i,a as s,b as _,c as p,e as c,f as m,g as d,_ as t,h as u,T as h,i as l,P as g,C as E,M as v,I as f,s as I,j as a,k as b,l as w,m as y,n as D}from"./registerWidgets.89616af0.js";import{p as A}from"./passwordlessManager.884221ca.js";import{u as P}from"./index.d40cd19f.js";import"./pubsub.d7600aa1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="7d6f8510-0412-4de7-b9b6-fa03f3aa0a96",e._sentryDebugIdIdentifier="sentry-dbid-7d6f8510-0412-4de7-b9b6-fa03f3aa0a96")}catch{}})();const T={},V={style:{height:"100vh","box-sizing":"border-box",width:"100%"}};function R(e,o){const n=s("router-view");return _(),p("div",V,[c(n)])}const L=i(T,[["render",R]]),r=m({history:d("/"),routes:[{path:"/widget-preview",name:"widget-preview",meta:{allowUnauthenticated:!0},component:()=>t(()=>import("./WidgetPreview.6ebb6ff1.js"),["assets/WidgetPreview.6ebb6ff1.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/WidgetsFrame.2b06573d.js","assets/colors.bc71fdf2.js","assets/WidgetsFrame.701a818b.css","assets/WidgetPreview.83bab6c7.css"])},{path:"/login",name:"login",meta:{allowUnauthenticated:!0},component:()=>t(()=>import("./Login.04e589a7.js"),["assets/Login.04e589a7.js","assets/Passwordless.ac83d40c.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/CircularLoading.f81b57b4.css","assets/icons.9cfdae6d.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/Passwordless.86ac0c56.css","assets/Navbar.dbea5082.js","assets/logo.084e5d7c.js","assets/asyncComputed.8ac91a75.js","assets/Navbar.a5a179d1.css","assets/member.f4131337.js","assets/gateway.0deebb85.js","assets/activeRecord.3d3c7835.js","assets/Login.8e4eb3db.css"])},{path:"/",name:"home",redirect:{name:"organizations"}},{path:"/organizations",name:"organizations",component:()=>t(()=>import("./Organizations.86d96323.js"),["assets/Organizations.86d96323.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/organization.682269f4.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/Navbar.dbea5082.js","assets/logo.084e5d7c.js","assets/Navbar.a5a179d1.css","assets/Organizations.07de1b82.css"])},{path:"/organizations/:organizationId",name:"organization",component:()=>t(()=>import("./Organization.8d378a9c.js"),["assets/Organization.8d378a9c.js","assets/Sidebar.8babb822.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/Tooltip.1f768a3e.js","assets/Tooltip.63c4352e.css","assets/Sidebar.054bea37.css","assets/Navbar.dbea5082.js","assets/logo.084e5d7c.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/asyncComputed.8ac91a75.js","assets/Navbar.a5a179d1.css","assets/gateway.0deebb85.js","assets/organization.682269f4.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/Organization.b3fd9094.css"]),redirect:{name:"projects"},children:[{path:"projects",name:"projects",component:()=>t(()=>import("./Projects.51ccea2f.js"),["assets/Projects.51ccea2f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/project.a27ed749.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/activeRecord.3d3c7835.js","assets/organization.682269f4.js","assets/index.dae46ea1.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css"])},{path:"settings",name:"organization-settings",component:()=>t(()=>import("./OrganizationSettings.46e64732.js"),["assets/OrganizationSettings.46e64732.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])},{path:"members",name:"members",component:()=>t(()=>import("./Members.f5d95bd4.js"),["assets/Members.f5d95bd4.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.8ac91a75.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/member.f4131337.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css"])}]},{path:"/projects/:projectId",name:"project",component:()=>t(()=>import("./Project.03df7c29.js"),["assets/Project.03df7c29.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.8ac91a75.js","assets/project.a27ed749.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/activeRecord.3d3c7835.js","assets/organization.682269f4.js","assets/index.dae46ea1.js","assets/Navbar.dbea5082.js","assets/logo.084e5d7c.js","assets/Navbar.a5a179d1.css","assets/Sidebar.8babb822.js","assets/icons.9cfdae6d.js","assets/Tooltip.1f768a3e.js","assets/Tooltip.63c4352e.css","assets/Sidebar.054bea37.css","assets/Project.efdfb078.css"]),redirect:{name:"builds"},children:[{path:"builds",name:"builds",component:()=>t(()=>import("./Builds.dbfd5324.js"),["assets/Builds.dbfd5324.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.8ac91a75.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/build.ac459472.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/icons.9cfdae6d.js","assets/index.b048d0fb.js","assets/index.d40cd19f.js","assets/Builds.f9eaf052.css"])},{path:"connectors",name:"connectors",component:()=>t(()=>import("./Connectors.f3069a96.js"),["assets/Connectors.f3069a96.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/index.dae46ea1.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/connector.8528d309.js","assets/activeRecord.3d3c7835.js","assets/asyncComputed.8ac91a75.js","assets/icons.9cfdae6d.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css"])},{path:"api-keys",name:"api-keys",component:()=>t(()=>import("./ApiKeys.5ce6c5c7.js"),["assets/ApiKeys.5ce6c5c7.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.8ac91a75.js","assets/project.a27ed749.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/activeRecord.3d3c7835.js","assets/member.f4131337.js","assets/index.dae46ea1.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/icons.9cfdae6d.js","assets/index.b048d0fb.js","assets/ApiKeys.1adf158a.css"])},{path:"logs",name:"logs",component:()=>t(()=>import("./Logs.6a1222af.js"),["assets/Logs.6a1222af.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/build.ac459472.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/asyncComputed.8ac91a75.js","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/index.b048d0fb.js","assets/Logs.a17321ed.css"])},{path:"settings",name:"project-settings",component:()=>t(()=>import("./ProjectSettings.007fec14.js"),["assets/ProjectSettings.007fec14.js","assets/asyncComputed.8ac91a75.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/project.a27ed749.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/index.d40cd19f.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/icons.9cfdae6d.js","assets/ProjectSettings.b8d779fa.css"])},{path:"env-vars",name:"env-vars",component:()=>t(()=>import("./EnvVars.38d91162.js"),["assets/EnvVars.38d91162.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.8ac91a75.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/activeRecord.3d3c7835.js","assets/index.dae46ea1.js","assets/CrudView.7ced9145.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.10cfcfe7.js","assets/lottie.fc57e5ac.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/icons.9cfdae6d.js"])}]},{path:"/connectors/:connectorId",name:"connectorEditor",component:()=>t(()=>import("./ConnectorEditor.7b329188.js"),["assets/ConnectorEditor.7b329188.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/index.dae46ea1.js","assets/gateway.0deebb85.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/connector.8528d309.js","assets/activeRecord.3d3c7835.js","assets/asyncComputed.8ac91a75.js","assets/BackButton.6e480dd1.js","assets/BackButton.40348456.css","assets/SaveButton.c0a67dea.js","assets/icons.9cfdae6d.js","assets/SaveButton.c5392044.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/ConnectorEditor.93911b56.css"])}],scrollBehavior(e){if(e.hash)return{el:e.hash}}});r.beforeEach(async(e,o)=>{P(e,o);const n=A.getUser();if(!e.meta.allowUnauthenticated&&!n){await r.push({name:"login"});return}});(async()=>{const e=u({render:()=>b(L)});h.init(),l(e,r),e.use(r),e.use(g),e.mount("#app"),e.component("VSelect",E),e.component("Markdown",v),e.component("Icon",f),e.component("Message",I),a(e,w),a(e,y),a(e,D)})();export{r}; +//# sourceMappingURL=console.138f0d87.js.map diff --git a/abstra_statics/dist/assets/console.470f1cee.js b/abstra_statics/dist/assets/console.470f1cee.js deleted file mode 100644 index 4f09ac09ea..0000000000 --- a/abstra_statics/dist/assets/console.470f1cee.js +++ /dev/null @@ -1,2 +0,0 @@ -import{q as i,a as s,b as _,c as p,e as c,f as m,g as d,_ as t,h as u,T as h,i as l,P as g,C as E,M as v,I,s as f,j as a,k as b,l as w,m as y,n as D}from"./registerWidgets.ca6243ef.js";import{p as A}from"./passwordlessManager.0ab78ba0.js";import{u as P}from"./index.a2df0371.js";import"./pubsub.581c075e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="c09ef97c-c048-49e6-aaed-35400602b47b",e._sentryDebugIdIdentifier="sentry-dbid-c09ef97c-c048-49e6-aaed-35400602b47b")}catch{}})();const T={},V={style:{height:"100vh","box-sizing":"border-box",width:"100%"}};function R(e,o){const n=s("router-view");return _(),p("div",V,[c(n)])}const L=i(T,[["render",R]]),r=m({history:d("/"),routes:[{path:"/widget-preview",name:"widget-preview",meta:{allowUnauthenticated:!0},component:()=>t(()=>import("./WidgetPreview.c18ef298.js"),["assets/WidgetPreview.c18ef298.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/WidgetsFrame.8af89817.js","assets/colors.4425ff79.js","assets/WidgetsFrame.701a818b.css","assets/WidgetPreview.83bab6c7.css"])},{path:"/login",name:"login",meta:{allowUnauthenticated:!0},component:()=>t(()=>import("./Login.7b25d743.js"),["assets/Login.7b25d743.js","assets/Passwordless.65114c07.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/CircularLoading.f81b57b4.css","assets/icons.11151937.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/Passwordless.86ac0c56.css","assets/Navbar.41c99d51.js","assets/logo.084e5d7c.js","assets/asyncComputed.3cb2e10b.js","assets/Navbar.a5a179d1.css","assets/member.f1e6c466.js","assets/gateway.fa3322de.js","assets/activeRecord.11b7d185.js","assets/Login.8e4eb3db.css"])},{path:"/",name:"home",redirect:{name:"organizations"}},{path:"/organizations",name:"organizations",component:()=>t(()=>import("./Organizations.cd10673b.js"),["assets/Organizations.cd10673b.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/organization.007992e9.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/Navbar.41c99d51.js","assets/logo.084e5d7c.js","assets/Navbar.a5a179d1.css","assets/Organizations.07de1b82.css"])},{path:"/organizations/:organizationId",name:"organization",component:()=>t(()=>import("./Organization.bebd813e.js"),["assets/Organization.bebd813e.js","assets/Sidebar.e123944a.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/Tooltip.8c336607.js","assets/Tooltip.63c4352e.css","assets/Sidebar.054bea37.css","assets/Navbar.41c99d51.js","assets/logo.084e5d7c.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/asyncComputed.3cb2e10b.js","assets/Navbar.a5a179d1.css","assets/gateway.fa3322de.js","assets/organization.007992e9.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/Organization.b3fd9094.css"]),redirect:{name:"projects"},children:[{path:"projects",name:"projects",component:()=>t(()=>import("./Projects.ad9a8254.js"),["assets/Projects.ad9a8254.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/project.f2b2a33c.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/activeRecord.11b7d185.js","assets/organization.007992e9.js","assets/index.a86d8064.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css"])},{path:"settings",name:"organization-settings",component:()=>t(()=>import("./OrganizationSettings.0d13a7d8.js"),["assets/OrganizationSettings.0d13a7d8.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])},{path:"members",name:"members",component:()=>t(()=>import("./Members.79c4954a.js"),["assets/Members.79c4954a.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.3cb2e10b.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/member.f1e6c466.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css"])}]},{path:"/projects/:projectId",name:"project",component:()=>t(()=>import("./Project.9a23c33c.js"),["assets/Project.9a23c33c.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.3cb2e10b.js","assets/project.f2b2a33c.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/activeRecord.11b7d185.js","assets/organization.007992e9.js","assets/index.a86d8064.js","assets/Navbar.41c99d51.js","assets/logo.084e5d7c.js","assets/Navbar.a5a179d1.css","assets/Sidebar.e123944a.js","assets/icons.11151937.js","assets/Tooltip.8c336607.js","assets/Tooltip.63c4352e.css","assets/Sidebar.054bea37.css","assets/Project.efdfb078.css"]),redirect:{name:"builds"},children:[{path:"builds",name:"builds",component:()=>t(()=>import("./Builds.5fd3279d.js"),["assets/Builds.5fd3279d.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.3cb2e10b.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/build.5096fbe2.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/icons.11151937.js","assets/index.b048d0fb.js","assets/index.a2df0371.js","assets/Builds.f9eaf052.css"])},{path:"connectors",name:"connectors",component:()=>t(()=>import("./Connectors.a8ae7e7e.js"),["assets/Connectors.a8ae7e7e.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/index.a86d8064.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/connector.d9ae500d.js","assets/activeRecord.11b7d185.js","assets/asyncComputed.3cb2e10b.js","assets/icons.11151937.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css"])},{path:"api-keys",name:"api-keys",component:()=>t(()=>import("./ApiKeys.2e963cde.js"),["assets/ApiKeys.2e963cde.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.3cb2e10b.js","assets/project.f2b2a33c.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/activeRecord.11b7d185.js","assets/member.f1e6c466.js","assets/index.a86d8064.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/icons.11151937.js","assets/index.b048d0fb.js","assets/ApiKeys.1adf158a.css"])},{path:"logs",name:"logs",component:()=>t(()=>import("./Logs.9b4c6324.js"),["assets/Logs.9b4c6324.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/build.5096fbe2.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/asyncComputed.3cb2e10b.js","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/index.b048d0fb.js","assets/Logs.a17321ed.css"])},{path:"settings",name:"project-settings",component:()=>t(()=>import("./ProjectSettings.9fb2e75f.js"),["assets/ProjectSettings.9fb2e75f.js","assets/asyncComputed.3cb2e10b.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/project.f2b2a33c.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/index.a2df0371.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/icons.11151937.js","assets/ProjectSettings.b8d779fa.css"])},{path:"env-vars",name:"env-vars",component:()=>t(()=>import("./EnvVars.bb060638.js"),["assets/EnvVars.bb060638.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.3cb2e10b.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/activeRecord.11b7d185.js","assets/index.a86d8064.js","assets/CrudView.bd13f7e1.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/LoadingIndicator.a271d3bb.js","assets/lottie.9d24e472.js","assets/LoadingIndicator.f4d31167.css","assets/CrudView.47836ec6.css","assets/icons.11151937.js"])}]},{path:"/connectors/:connectorId",name:"connectorEditor",component:()=>t(()=>import("./ConnectorEditor.c3a62ef9.js"),["assets/ConnectorEditor.c3a62ef9.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/index.a86d8064.js","assets/gateway.fa3322de.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/connector.d9ae500d.js","assets/activeRecord.11b7d185.js","assets/asyncComputed.3cb2e10b.js","assets/BackButton.6790f37d.js","assets/BackButton.40348456.css","assets/SaveButton.e379ab16.js","assets/icons.11151937.js","assets/SaveButton.c5392044.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/ConnectorEditor.93911b56.css"])}],scrollBehavior(e){if(e.hash)return{el:e.hash}}});r.beforeEach(async(e,o)=>{P(e,o);const n=A.getUser();if(!e.meta.allowUnauthenticated&&!n){await r.push({name:"login"});return}});(async()=>{const e=u({render:()=>b(L)});h.init(),l(e,r),e.use(r),e.use(g),e.mount("#app"),e.component("VSelect",E),e.component("Markdown",v),e.component("Icon",I),e.component("Message",f),a(e,w),a(e,y),a(e,D)})();export{r}; -//# sourceMappingURL=console.470f1cee.js.map diff --git a/abstra_statics/dist/assets/cssMode.84f7d84d.js b/abstra_statics/dist/assets/cssMode.a07fb68f.js similarity index 99% rename from abstra_statics/dist/assets/cssMode.84f7d84d.js rename to abstra_statics/dist/assets/cssMode.a07fb68f.js index 12d61a05bf..1554fe354e 100644 --- a/abstra_statics/dist/assets/cssMode.84f7d84d.js +++ b/abstra_statics/dist/assets/cssMode.a07fb68f.js @@ -1,4 +1,4 @@ -var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var E=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3540ff6a-0287-4228-9814-a22d3fd39a39",e._sentryDebugIdIdentifier="sentry-dbid-3540ff6a-0287-4228-9814-a22d3fd39a39")}catch{}})();/*!----------------------------------------------------------------------------- +var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var E=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2ae28be1-bc42-420d-865f-86b7e81297ce",e._sentryDebugIdIdentifier="sentry-dbid-2ae28be1-bc42-420d-865f-86b7e81297ce")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license @@ -7,4 +7,4 @@ var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,config `,a==="\r"&&t+10&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets},e.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return k.create(0,n);for(;rn?t=a:r=a+1}var o=r-1;return k.create(o,n-i[o])},e.prototype.offsetAt=function(n){var i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;var r=i[n.line],t=n.line+1"u"}e.undefined=r;function t(f){return f===!0||f===!1}e.boolean=t;function a(f){return n.call(f)==="[object String]"}e.string=a;function o(f){return n.call(f)==="[object Number]"}e.number=o;function u(f,A,N){return n.call(f)==="[object Number]"&&A<=f&&f<=N}e.numberRange=u;function g(f){return n.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}e.integer=g;function d(f){return n.call(f)==="[object Number]"&&0<=f&&f<=2147483647}e.uinteger=d;function v(f){return n.call(f)==="[object Function]"}e.func=v;function w(f){return f!==null&&typeof f=="object"}e.objectLiteral=w;function b(f,A){return Array.isArray(f)&&f.every(A)}e.typedArray=b})(s||(s={}));var $e=class{constructor(e,n,i){E(this,"_disposables",[]);E(this,"_listener",Object.create(null));this._languageId=e,this._worker=n;const r=a=>{let o=a.getLanguageId();if(o!==this._languageId)return;let u;this._listener[a.uri.toString()]=a.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(a.uri,o),500)}),this._doValidate(a.uri,o)},t=a=>{c.editor.setModelMarkers(a,this._languageId,[]);let o=a.uri.toString(),u=this._listener[o];u&&(u.dispose(),delete this._listener[o])};this._disposables.push(c.editor.onDidCreateModel(r)),this._disposables.push(c.editor.onWillDisposeModel(t)),this._disposables.push(c.editor.onDidChangeModelLanguage(a=>{t(a.model),r(a.model)})),this._disposables.push(i(a=>{c.editor.getModels().forEach(o=>{o.getLanguageId()===this._languageId&&(t(o),r(o))})})),this._disposables.push({dispose:()=>{c.editor.getModels().forEach(t);for(let a in this._listener)this._listener[a].dispose()}}),c.editor.getModels().forEach(r)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,n){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{const r=i.map(a=>Qe(e,a));let t=c.editor.getModel(e);t&&t.getLanguageId()===n&&c.editor.setModelMarkers(t,n,r)}).then(void 0,i=>{console.error(i)})}};function qe(e){switch(e){case I.Error:return c.MarkerSeverity.Error;case I.Warning:return c.MarkerSeverity.Warning;case I.Information:return c.MarkerSeverity.Info;case I.Hint:return c.MarkerSeverity.Hint;default:return c.MarkerSeverity.Info}}function Qe(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:qe(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}var Ge=class{constructor(e,n){this._worker=e,this._triggerCharacters=n}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.doComplete(t.toString(),y(n))).then(a=>{if(!a)return;const o=e.getWordUntilPosition(n),u=new c.Range(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn),g=a.items.map(d=>{const v={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:Ze(d.command),range:u,kind:Ye(d.kind)};return d.textEdit&&(Je(d.textEdit)?v.range={insert:m(d.textEdit.insert),replace:m(d.textEdit.replace)}:v.range=m(d.textEdit.range),v.insertText=d.textEdit.newText),d.additionalTextEdits&&(v.additionalTextEdits=d.additionalTextEdits.map(j)),d.insertTextFormat===G.Snippet&&(v.insertTextRules=c.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:a.isIncomplete,suggestions:g}})}};function y(e){if(!!e)return{character:e.column-1,line:e.lineNumber-1}}function Me(e){if(!!e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function m(e){if(!!e)return new c.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Je(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function Ye(e){const n=c.languages.CompletionItemKind;switch(e){case l.Text:return n.Text;case l.Method:return n.Method;case l.Function:return n.Function;case l.Constructor:return n.Constructor;case l.Field:return n.Field;case l.Variable:return n.Variable;case l.Class:return n.Class;case l.Interface:return n.Interface;case l.Module:return n.Module;case l.Property:return n.Property;case l.Unit:return n.Unit;case l.Value:return n.Value;case l.Enum:return n.Enum;case l.Keyword:return n.Keyword;case l.Snippet:return n.Snippet;case l.Color:return n.Color;case l.File:return n.File;case l.Reference:return n.Reference}return n.Property}function j(e){if(!!e)return{range:m(e.range),text:e.newText}}function Ze(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ke=class{constructor(e){this._worker=e}provideHover(e,n,i){let r=e.uri;return this._worker(r).then(t=>t.doHover(r.toString(),y(n))).then(t=>{if(!!t)return{range:m(t.range),contents:tt(t.contents)}})}};function et(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function De(e){return typeof e=="string"?{value:e}:et(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function tt(e){if(!!e)return Array.isArray(e)?e.map(De):[De(e)]}var rt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDocumentHighlights(r.toString(),y(n))).then(t=>{if(!!t)return t.map(a=>({range:m(a.range),kind:nt(a.kind)}))})}};function nt(e){switch(e){case P.Read:return c.languages.DocumentHighlightKind.Read;case P.Write:return c.languages.DocumentHighlightKind.Write;case P.Text:return c.languages.DocumentHighlightKind.Text}return c.languages.DocumentHighlightKind.Text}var it=class{constructor(e){this._worker=e}provideDefinition(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDefinition(r.toString(),y(n))).then(t=>{if(!!t)return[Te(t)]})}};function Te(e){return{uri:c.Uri.parse(e.uri),range:m(e.range)}}var at=class{constructor(e){this._worker=e}provideReferences(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.findReferences(t.toString(),y(n))).then(a=>{if(!!a)return a.map(Te)})}},ot=class{constructor(e){this._worker=e}provideRenameEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.doRename(t.toString(),y(n),i)).then(a=>st(a))}};function st(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=c.Uri.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:m(t.range),text:t.newText}})}return{edits:n}}var ut=class{constructor(e){this._worker=e}provideDocumentSymbols(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentSymbols(i.toString())).then(r=>{if(!!r)return r.map(t=>({name:t.name,detail:"",containerName:t.containerName,kind:ct(t.kind),range:m(t.location.range),selectionRange:m(t.location.range),tags:[]}))})}};function ct(e){let n=c.languages.SymbolKind;switch(e){case h.File:return n.Array;case h.Module:return n.Module;case h.Namespace:return n.Namespace;case h.Package:return n.Package;case h.Class:return n.Class;case h.Method:return n.Method;case h.Property:return n.Property;case h.Field:return n.Field;case h.Constructor:return n.Constructor;case h.Enum:return n.Enum;case h.Interface:return n.Interface;case h.Function:return n.Function;case h.Variable:return n.Variable;case h.Constant:return n.Constant;case h.String:return n.String;case h.Number:return n.Number;case h.Boolean:return n.Boolean;case h.Array:return n.Array}return n.Function}var wt=class{constructor(e){this._worker=e}provideLinks(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentLinks(i.toString())).then(r=>{if(!!r)return{links:r.map(t=>({range:m(t.range),url:t.target}))}})}},dt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.format(r.toString(),null,Se(n)).then(a=>{if(!(!a||a.length===0))return a.map(j)}))}},ft=class{constructor(e){this._worker=e}provideDocumentRangeFormattingEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.format(t.toString(),Me(n),Se(i)).then(o=>{if(!(!o||o.length===0))return o.map(j)}))}};function Se(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var gt=class{constructor(e){this._worker=e}provideDocumentColors(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentColors(i.toString())).then(r=>{if(!!r)return r.map(t=>({color:t.color,range:m(t.range)}))})}provideColorPresentations(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getColorPresentations(r.toString(),n.color,Me(n.range))).then(t=>{if(!!t)return t.map(a=>{let o={label:a.label};return a.textEdit&&(o.textEdit=j(a.textEdit)),a.additionalTextEdits&&(o.additionalTextEdits=a.additionalTextEdits.map(j)),o})})}},lt=class{constructor(e){this._worker=e}provideFoldingRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getFoldingRanges(r.toString(),n)).then(t=>{if(!!t)return t.map(a=>{const o={start:a.startLine+1,end:a.endLine+1};return typeof a.kind<"u"&&(o.kind=ht(a.kind)),o})})}};function ht(e){switch(e){case D.Comment:return c.languages.FoldingRangeKind.Comment;case D.Imports:return c.languages.FoldingRangeKind.Imports;case D.Region:return c.languages.FoldingRangeKind.Region}}var vt=class{constructor(e){this._worker=e}provideSelectionRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getSelectionRanges(r.toString(),n.map(y))).then(t=>{if(!!t)return t.map(a=>{const o=[];for(;a;)o.push({range:m(a.range)}),a=a.parent;return o})})}};function kt(e){const n=[],i=[],r=new Xe(e);n.push(r);const t=(...o)=>r.getLanguageServiceWorker(...o);function a(){const{languageId:o,modeConfiguration:u}=e;Fe(i),u.completionItems&&i.push(c.languages.registerCompletionItemProvider(o,new Ge(t,["/","-",":"]))),u.hovers&&i.push(c.languages.registerHoverProvider(o,new Ke(t))),u.documentHighlights&&i.push(c.languages.registerDocumentHighlightProvider(o,new rt(t))),u.definitions&&i.push(c.languages.registerDefinitionProvider(o,new it(t))),u.references&&i.push(c.languages.registerReferenceProvider(o,new at(t))),u.documentSymbols&&i.push(c.languages.registerDocumentSymbolProvider(o,new ut(t))),u.rename&&i.push(c.languages.registerRenameProvider(o,new ot(t))),u.colors&&i.push(c.languages.registerColorProvider(o,new gt(t))),u.foldingRanges&&i.push(c.languages.registerFoldingRangeProvider(o,new lt(t))),u.diagnostics&&i.push(new $e(o,t,e.onDidChange)),u.selectionRanges&&i.push(c.languages.registerSelectionRangeProvider(o,new vt(t))),u.documentFormattingEdits&&i.push(c.languages.registerDocumentFormattingEditProvider(o,new dt(t))),u.documentRangeFormattingEdits&&i.push(c.languages.registerDocumentRangeFormattingEditProvider(o,new ft(t)))}return a(),n.push(Pe(i)),Pe(n)}function Pe(e){return{dispose:()=>Fe(e)}}function Fe(e){for(;e.length;)e.pop().dispose()}export{Ge as CompletionAdapter,it as DefinitionAdapter,$e as DiagnosticsAdapter,gt as DocumentColorAdapter,dt as DocumentFormattingEditProvider,rt as DocumentHighlightAdapter,wt as DocumentLinkAdapter,ft as DocumentRangeFormattingEditProvider,ut as DocumentSymbolAdapter,lt as FoldingRangeAdapter,Ke as HoverAdapter,at as ReferenceAdapter,ot as RenameAdapter,vt as SelectionRangeAdapter,Xe as WorkerManager,y as fromPosition,Me as fromRange,kt as setupMode,m as toRange,j as toTextEdit}; -//# sourceMappingURL=cssMode.84f7d84d.js.map +//# sourceMappingURL=cssMode.a07fb68f.js.map diff --git a/abstra_statics/dist/assets/dashes.9f1aca90.js b/abstra_statics/dist/assets/dashes.f8616397.js similarity index 90% rename from abstra_statics/dist/assets/dashes.9f1aca90.js rename to abstra_statics/dist/assets/dashes.f8616397.js index 16f7290c08..56a64d14ca 100644 --- a/abstra_statics/dist/assets/dashes.9f1aca90.js +++ b/abstra_statics/dist/assets/dashes.f8616397.js @@ -1,2 +1,2 @@ -var l=Object.defineProperty;var u=(s,t,r)=>t in s?l(s,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[t]=r;var d=(s,t,r)=>(u(s,typeof t!="symbol"?t+"":t,r),r);import{A as w}from"./activeRecord.11b7d185.js";import{d as y,w as c}from"./runnerData.170ae941.js";import"./registerWidgets.ca6243ef.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="f9653939-dab9-413d-b14f-72fda6344cb0",s._sentryDebugIdIdentifier="sentry-dbid-f9653939-dab9-413d-b14f-72fda6344cb0")}catch{}})();function p(s){return Object.entries(s).reduce((t,[r,o])=>{var n;if(o.type in c){const e=o;if(!e.id)throw new Error("Widget must have an id");return{...t,[r]:{events:e.events,id:e.id,props:e.props,position:{rowStart:e.rowStart,rowEnd:e.rowEnd,colStart:e.colStart,colEnd:e.colEnd},type:e.type,variable:(n=e.variable)!=null?n:null}}}else{const e=o;return{...t,[r]:{id:e.id,props:e.props,row:e.row,height:e.height,type:e.type,slot:p(e.slot),order:e.order}}}},{})}function h(s){return Object.entries(s).reduce((t,[r,o])=>{var n;if(o.type in c){const e=o;return{...t,[r]:{id:e.id,name:e.id,type:e.type,colStart:e.position.colStart,colEnd:e.position.colEnd,rowStart:e.position.rowStart,rowEnd:e.position.rowEnd,props:e.props,events:e.events,variable:(n=e.variable)!=null?n:void 0}}}else{const e=o;return{...t,[r]:{id:e.id,type:e.type,row:e.row,height:e.height,order:0,props:e.props,slot:h(e.slot)}}}},{})}class f{async list(){return await(await fetch("/_editor/api/dashes")).json()}async create(){return await(await fetch("/_editor/api/dashes",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(t){return await(await fetch(`/_editor/api/dashes/${t}`)).json()}async update(t,r){return await(await fetch(`/_editor/api/dashes/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).json()}async delete(t){await fetch(`/_editor/api/dashes/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async duplicate(t){return await(await fetch(`/_editor/api/dashes/${t}/duplicate`,{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async addVariableToCode(t,r){await fetch(`/_editor/api/dashes/${t}/add-variable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variable:r})})}}const a=new f;class i{constructor(t){d(this,"record");this.record=w.create(a,t,"path")}static from(t){return new i(t)}static async list(){return(await a.list()).map(r=>new i(r))}static async create(){const t=await a.create();return new i(t)}static async get(t){const r=await a.get(t);return new i(r)}get path(){return this.record.get("path")}set path(t){this.record.set("path",t)}get file(){return this.record.get("file")}set file(t){this.record.set("file",t)}get title(){return this.record.get("title")}set title(t){this.record.set("title",t)}get layout(){const t=this.record.get("layout");return{version:"0.2",props:t.props,slot:h(t.slot)}}set layout(t){if(t.version==="0.1")throw new Error("TODO: convert 0.1 to 0.2");const r={version:"0.2",props:t.props,slot:p(t.slot)};this.record.set("layout",r)}async save(){await this.record.save()}onUpdate(t){this.record.pubsub.subscribe("update",t)}hasChanges(){return this.record.hasChanges()}async delete(){await a.delete(this.path)}async duplicate(){const t=await a.duplicate(this.path);return new i(t)}async addVariableToCode(t){await a.addVariableToCode(this.path,t)}get rootSlot(){if(this.layout.version==="0.1")throw new Error("TODO: convert 0.1 to 0.2");return this.layout.slot}makeRunnerData(t,r){return{...t.makeRunnerData(),id:this.path,path:this.path,title:this.title,layout:y(r!=null?r:this.layout),workspaceName:"Untitled Workspace",runtimeType:"dash"}}get routeName(){return"dash"}}export{i as D}; -//# sourceMappingURL=dashes.9f1aca90.js.map +var l=Object.defineProperty;var u=(s,t,r)=>t in s?l(s,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[t]=r;var d=(s,t,r)=>(u(s,typeof t!="symbol"?t+"":t,r),r);import{A as w}from"./activeRecord.3d3c7835.js";import{d as y,w as c}from"./runnerData.bd24d7de.js";import"./registerWidgets.89616af0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="d09c4e95-b0c5-4e41-9cef-6ed102bbef73",s._sentryDebugIdIdentifier="sentry-dbid-d09c4e95-b0c5-4e41-9cef-6ed102bbef73")}catch{}})();function p(s){return Object.entries(s).reduce((t,[r,o])=>{var n;if(o.type in c){const e=o;if(!e.id)throw new Error("Widget must have an id");return{...t,[r]:{events:e.events,id:e.id,props:e.props,position:{rowStart:e.rowStart,rowEnd:e.rowEnd,colStart:e.colStart,colEnd:e.colEnd},type:e.type,variable:(n=e.variable)!=null?n:null}}}else{const e=o;return{...t,[r]:{id:e.id,props:e.props,row:e.row,height:e.height,type:e.type,slot:p(e.slot),order:e.order}}}},{})}function h(s){return Object.entries(s).reduce((t,[r,o])=>{var n;if(o.type in c){const e=o;return{...t,[r]:{id:e.id,name:e.id,type:e.type,colStart:e.position.colStart,colEnd:e.position.colEnd,rowStart:e.position.rowStart,rowEnd:e.position.rowEnd,props:e.props,events:e.events,variable:(n=e.variable)!=null?n:void 0}}}else{const e=o;return{...t,[r]:{id:e.id,type:e.type,row:e.row,height:e.height,order:0,props:e.props,slot:h(e.slot)}}}},{})}class f{async list(){return await(await fetch("/_editor/api/dashes")).json()}async create(){return await(await fetch("/_editor/api/dashes",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(t){return await(await fetch(`/_editor/api/dashes/${t}`)).json()}async update(t,r){return await(await fetch(`/_editor/api/dashes/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).json()}async delete(t){await fetch(`/_editor/api/dashes/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async duplicate(t){return await(await fetch(`/_editor/api/dashes/${t}/duplicate`,{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async addVariableToCode(t,r){await fetch(`/_editor/api/dashes/${t}/add-variable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variable:r})})}}const a=new f;class i{constructor(t){d(this,"record");this.record=w.create(a,t,"path")}static from(t){return new i(t)}static async list(){return(await a.list()).map(r=>new i(r))}static async create(){const t=await a.create();return new i(t)}static async get(t){const r=await a.get(t);return new i(r)}get path(){return this.record.get("path")}set path(t){this.record.set("path",t)}get file(){return this.record.get("file")}set file(t){this.record.set("file",t)}get title(){return this.record.get("title")}set title(t){this.record.set("title",t)}get layout(){const t=this.record.get("layout");return{version:"0.2",props:t.props,slot:h(t.slot)}}set layout(t){if(t.version==="0.1")throw new Error("TODO: convert 0.1 to 0.2");const r={version:"0.2",props:t.props,slot:p(t.slot)};this.record.set("layout",r)}async save(){await this.record.save()}onUpdate(t){this.record.pubsub.subscribe("update",t)}hasChanges(){return this.record.hasChanges()}async delete(){await a.delete(this.path)}async duplicate(){const t=await a.duplicate(this.path);return new i(t)}async addVariableToCode(t){await a.addVariableToCode(this.path,t)}get rootSlot(){if(this.layout.version==="0.1")throw new Error("TODO: convert 0.1 to 0.2");return this.layout.slot}makeRunnerData(t,r){return{...t.makeRunnerData(),id:this.path,path:this.path,title:this.title,layout:y(r!=null?r:this.layout),workspaceName:"Untitled Workspace",runtimeType:"dash"}}get routeName(){return"dash"}}export{i as D}; +//# sourceMappingURL=dashes.f8616397.js.map diff --git a/abstra_statics/dist/assets/editor.16e28ae9.js b/abstra_statics/dist/assets/editor.16e28ae9.js new file mode 100644 index 0000000000..745f6c0631 --- /dev/null +++ b/abstra_statics/dist/assets/editor.16e28ae9.js @@ -0,0 +1,2 @@ +import{r as _,d as m,o as p,a as d,b as c,c as h,e as l,f as b,g as u,_ as t,h as E,T as v,i as A,P as f,C as P,M as I,I as D,s as w,j as a,k as T,l as y,m as V,n as R}from"./registerWidgets.89616af0.js";import{u as L}from"./index.d40cd19f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="10802a83-80e1-4010-97ba-68437b3fc76b",e._sentryDebugIdIdentifier="sentry-dbid-10802a83-80e1-4010-97ba-68437b3fc76b")}catch{}})();const s=_(!1),g=()=>{window.innerWidth<780?s.value=!0:s.value=!1},O={style:{height:"100vh","box-sizing":"border-box",width:"100%"}},k=m({__name:"App",setup(e){return p(()=>{window.addEventListener("resize",g)}),(o,n)=>{const i=d("router-view");return c(),h("div",O,[l(i)])}}});const r=b({history:u("/"),routes:[{path:"/_editor/",name:"app",component:()=>t(()=>import("./Home.3eaff566.js"),["assets/Home.3eaff566.js","assets/Modal.73e976a2.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/Modal.5aaf8eba.css","assets/Home.1c04d83a.css"]),redirect:{name:"workspace"},children:[{path:"",name:"workspace",component:()=>t(()=>import("./Workspace.4a9a4e8f.js"),["assets/Workspace.4a9a4e8f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/Tooltip.1f768a3e.js","assets/Tooltip.63c4352e.css","assets/logo.084e5d7c.js","assets/asyncComputed.8ac91a75.js","assets/workspaces.621b79ad.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/login.6c1df514.js","assets/DocsButton.f9b71025.js","assets/DocsButton.d2184c76.css","assets/Workspace.b7d4a3bf.css"]),redirect:()=>({name:"forms"}),children:[{path:"forms",name:"forms",component:()=>t(()=>import("./Forms.b27f8e52.js"),["assets/Forms.b27f8e52.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/forms.59430d62.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/RuntimeList.097a29c4.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Forms"}},{path:"dashes",name:"dashes",component:()=>t(()=>import("./Dashes.8a9fc0d5.js"),["assets/Dashes.8a9fc0d5.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/dashes.f8616397.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/runnerData.bd24d7de.js","assets/RuntimeList.097a29c4.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Dashes"}},{path:"jobs",name:"jobs",component:()=>t(()=>import("./Jobs.a895bf8c.js"),["assets/Jobs.a895bf8c.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/jobs.310261dd.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/RuntimeList.097a29c4.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Jobs"}},{path:"hooks",name:"hooks",component:()=>t(()=>import("./Hooks.c2164fb8.js"),["assets/Hooks.c2164fb8.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/hooks.6e1e253e.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/RuntimeList.097a29c4.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Hooks"}},{path:"tables",name:"tables",component:()=>t(()=>import("./Tables.e6b943f2.js"),["assets/Tables.e6b943f2.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/tables.b83ad23f.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/RuntimeList.097a29c4.js","assets/DropdownMenu.8f7fc9d3.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Tables"}},{path:"style",name:"style",component:()=>t(()=>import("./StyleEditor.ec27cc19.js"),["assets/StyleEditor.ec27cc19.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.8ac91a75.js","assets/workspaces.621b79ad.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/icons.9cfdae6d.js","assets/SidebarPreview.e7347f81.js","assets/PlayerNavbar.2a5ed820.js","assets/PlayerNavbar.adff8b48.css","assets/runnerData.bd24d7de.js","assets/colors.bc71fdf2.js","assets/SidebarPreview.12212654.css","assets/SaveButton.c0a67dea.js","assets/SaveButton.c5392044.css","assets/StyleEditor.b552686c.css"]),meta:{title:"Abstra - Style"}},{path:"sidebar",name:"sidebar",component:()=>t(()=>import("./SidebarEditor.6edb80a9.js"),["assets/SidebarEditor.6edb80a9.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/workspaces.621b79ad.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/asyncComputed.8ac91a75.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/SaveButton.c0a67dea.js","assets/icons.9cfdae6d.js","assets/SaveButton.c5392044.css","assets/SidebarPreview.e7347f81.js","assets/PlayerNavbar.2a5ed820.js","assets/PlayerNavbar.adff8b48.css","assets/runnerData.bd24d7de.js","assets/colors.bc71fdf2.js","assets/SidebarPreview.12212654.css","assets/SidebarEditor.f65d95bf.css"]),meta:{title:"Abstra - Sidebar"}}]},{path:"form/:formPath",name:"editor",component:()=>t(()=>import("./FormEditor.f707e99b.js"),["assets/FormEditor.f707e99b.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/Error.d0c3932f.js","assets/Error.5cfc41d8.css","assets/broker.67106cf5.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/icons.9cfdae6d.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js","assets/Passwordless.ac83d40c.js","assets/Passwordless.86ac0c56.css","assets/executeJs.dfd1b55f.js","assets/PlayerNavbar.2a5ed820.js","assets/PlayerNavbar.adff8b48.css","assets/index.d40cd19f.js","assets/WidgetsFrame.2b06573d.js","assets/colors.bc71fdf2.js","assets/WidgetsFrame.701a818b.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/broker.5f3abad8.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js","assets/asyncComputed.8ac91a75.js","assets/forms.59430d62.js","assets/activeRecord.3d3c7835.js","assets/dashes.f8616397.js","assets/runnerData.bd24d7de.js","assets/hooks.6e1e253e.js","assets/jobs.310261dd.js","assets/workspaces.621b79ad.js","assets/uuid.d6201508.js","assets/login.6c1df514.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/Tab.1de0ecf6.js","assets/Tab.68f29dcc.css","assets/BackButton.6e480dd1.js","assets/BackButton.40348456.css","assets/SaveButton.c0a67dea.js","assets/SaveButton.c5392044.css","assets/DocsButton.f9b71025.js","assets/DocsButton.d2184c76.css","assets/PreviewButton.4d9be351.js","assets/PreviewButton.52324bbf.css","assets/FormEditor.6172d866.css"]),meta:{title:"Abstra - Smart Form Editor"}},{path:"form/:formPath/preview",name:"form-preview",component:()=>t(()=>import("./FormPreview.203b2e5a.js"),["assets/FormPreview.203b2e5a.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/Error.d0c3932f.js","assets/Error.5cfc41d8.css","assets/broker.67106cf5.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/icons.9cfdae6d.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js","assets/Passwordless.ac83d40c.js","assets/Passwordless.86ac0c56.css","assets/executeJs.dfd1b55f.js","assets/PlayerNavbar.2a5ed820.js","assets/PlayerNavbar.adff8b48.css","assets/index.d40cd19f.js","assets/WidgetsFrame.2b06573d.js","assets/colors.bc71fdf2.js","assets/WidgetsFrame.701a818b.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/broker.5f3abad8.css","assets/BackButton.fb83d4bd.js","assets/BackButton.dd542746.css","assets/asyncComputed.8ac91a75.js","assets/forms.59430d62.js","assets/activeRecord.3d3c7835.js","assets/workspaces.621b79ad.js","assets/FormPreview.6d0d0d3a.css"]),meta:{title:"Abstra - Smart Form Preview"}},{path:"job/:jobId",name:"jobEditor",component:()=>t(()=>import("./JobEditor.2e1f22b7.js"),["assets/JobEditor.2e1f22b7.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/Tab.1de0ecf6.js","assets/Tab.68f29dcc.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/asyncComputed.8ac91a75.js","assets/jobs.310261dd.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/SaveButton.c0a67dea.js","assets/icons.9cfdae6d.js","assets/SaveButton.c5392044.css","assets/BackButton.6e480dd1.js","assets/BackButton.40348456.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js","assets/forms.59430d62.js","assets/dashes.f8616397.js","assets/runnerData.bd24d7de.js","assets/hooks.6e1e253e.js","assets/workspaces.621b79ad.js","assets/uuid.d6201508.js","assets/login.6c1df514.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/DocsButton.f9b71025.js","assets/DocsButton.d2184c76.css","assets/JobEditor.d8bbc89c.css"]),meta:{title:"Abstra - Job Editor"}},{path:"dash/:dashPath",name:"dashEditor",component:()=>t(()=>import("./DashEditor.d2eeb2dd.js"),["assets/DashEditor.d2eeb2dd.js","assets/index.d40cd19f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/Tab.1de0ecf6.js","assets/Tab.68f29dcc.css","assets/DashPlayer.2457a054.js","assets/runnerData.bd24d7de.js","assets/executeJs.dfd1b55f.js","assets/PlayerNavbar.2a5ed820.js","assets/icons.9cfdae6d.js","assets/PlayerNavbar.adff8b48.css","assets/WidgetsFrame.2b06573d.js","assets/colors.bc71fdf2.js","assets/WidgetsFrame.701a818b.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/Passwordless.ac83d40c.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/Passwordless.86ac0c56.css","assets/DashPlayer.ef4a798d.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js","assets/asyncComputed.8ac91a75.js","assets/forms.59430d62.js","assets/activeRecord.3d3c7835.js","assets/dashes.f8616397.js","assets/hooks.6e1e253e.js","assets/jobs.310261dd.js","assets/workspaces.621b79ad.js","assets/uuid.d6201508.js","assets/login.6c1df514.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/BackButton.6e480dd1.js","assets/BackButton.40348456.css","assets/SaveButton.c0a67dea.js","assets/SaveButton.c5392044.css","assets/PreviewButton.4d9be351.js","assets/PreviewButton.52324bbf.css","assets/DocsButton.f9b71025.js","assets/DocsButton.d2184c76.css","assets/DashEditor.3a6ec511.css"]),meta:{title:"Abstra - Dash Editor"}},{path:"dash/:dashPath/preview",name:"dashPreview",component:()=>t(()=>import("./DashPreview.3bf93e31.js"),["assets/DashPreview.3bf93e31.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/DashPlayer.2457a054.js","assets/runnerData.bd24d7de.js","assets/executeJs.dfd1b55f.js","assets/PlayerNavbar.2a5ed820.js","assets/icons.9cfdae6d.js","assets/PlayerNavbar.adff8b48.css","assets/index.d40cd19f.js","assets/WidgetsFrame.2b06573d.js","assets/colors.bc71fdf2.js","assets/WidgetsFrame.701a818b.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/Passwordless.ac83d40c.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/Passwordless.86ac0c56.css","assets/DashPlayer.ef4a798d.css","assets/BackButton.fb83d4bd.js","assets/BackButton.dd542746.css","assets/asyncComputed.8ac91a75.js","assets/dashes.f8616397.js","assets/activeRecord.3d3c7835.js","assets/workspaces.621b79ad.js","assets/DashPreview.999196e0.css"]),meta:{title:"Abstra - Dash Editor"}},{path:"hook/:hookPath",name:"hookEditor",component:()=>t(()=>import("./HookEditor.58a2f578.js"),["assets/HookEditor.58a2f578.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/Tab.1de0ecf6.js","assets/Tab.68f29dcc.css","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.ad1532da.js","assets/icons.9cfdae6d.js","assets/asyncComputed.8ac91a75.js","assets/forms.59430d62.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/dashes.f8616397.js","assets/runnerData.bd24d7de.js","assets/hooks.6e1e253e.js","assets/jobs.310261dd.js","assets/workspaces.621b79ad.js","assets/uuid.d6201508.js","assets/login.6c1df514.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/BackButton.6e480dd1.js","assets/BackButton.40348456.css","assets/SaveButton.c0a67dea.js","assets/SaveButton.c5392044.css","assets/DocsButton.f9b71025.js","assets/DocsButton.d2184c76.css","assets/HookEditor.1c22dc94.css"]),meta:{title:"Abstra - Hook Editor"}},{path:"table/:tableName",name:"tableEditor",component:()=>t(()=>import("./TableEditor.440cab96.js"),["assets/TableEditor.440cab96.js","assets/asyncComputed.8ac91a75.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/tables.b83ad23f.js","assets/activeRecord.3d3c7835.js","assets/pubsub.d7600aa1.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/Tab.1de0ecf6.js","assets/Tab.68f29dcc.css","assets/BackButton.6e480dd1.js","assets/BackButton.40348456.css","assets/icons.9cfdae6d.js","assets/DocsButton.f9b71025.js","assets/DocsButton.d2184c76.css","assets/SaveButton.c0a67dea.js","assets/SaveButton.c5392044.css","assets/TableEditor.66877c31.css"]),meta:{title:"Abstra - Table Editor"}}]}],scrollBehavior(e){if(e.hash)return{el:e.hash}}});r.beforeEach(async(e,o)=>{L(e,o)});(async()=>{const e=E({render:()=>T(k)});v.init(),A(e,r),e.use(r),e.use(f),e.mount("#app"),e.component("VSelect",P),e.component("Markdown",I),e.component("Icon",D),e.component("Message",w),a(e,y),a(e,V),a(e,R)})(); +//# sourceMappingURL=editor.16e28ae9.js.map diff --git a/abstra_statics/dist/assets/editor.b03c2e3e.js b/abstra_statics/dist/assets/editor.b03c2e3e.js deleted file mode 100644 index e64f34fa4e..0000000000 --- a/abstra_statics/dist/assets/editor.b03c2e3e.js +++ /dev/null @@ -1,2 +0,0 @@ -import{r as _,d as m,o as p,a as d,b as c,c as h,e as l,f as b,g as u,_ as t,h as E,T as f,i as v,P as A,C as P,M as I,I as D,s as w,j as a,k as T,l as y,m as V,n as R}from"./registerWidgets.ca6243ef.js";import{u as L}from"./index.a2df0371.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="f92c2501-5bf2-4e60-bc85-54b71f6e17ff",e._sentryDebugIdIdentifier="sentry-dbid-f92c2501-5bf2-4e60-bc85-54b71f6e17ff")}catch{}})();const s=_(!1),g=()=>{window.innerWidth<780?s.value=!0:s.value=!1},O={style:{height:"100vh","box-sizing":"border-box",width:"100%"}},k=m({__name:"App",setup(e){return p(()=>{window.addEventListener("resize",g)}),(o,n)=>{const i=d("router-view");return c(),h("div",O,[l(i)])}}});const r=b({history:u("/"),routes:[{path:"/_editor/",name:"app",component:()=>t(()=>import("./Home.6d7eef5e.js"),["assets/Home.6d7eef5e.js","assets/Modal.2f8d0c91.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/Modal.5aaf8eba.css","assets/Home.1c04d83a.css"]),redirect:{name:"workspace"},children:[{path:"",name:"workspace",component:()=>t(()=>import("./Workspace.cceaede0.js"),["assets/Workspace.cceaede0.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/Tooltip.8c336607.js","assets/Tooltip.63c4352e.css","assets/logo.084e5d7c.js","assets/asyncComputed.3cb2e10b.js","assets/workspaces.25055240.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/login.bbc5e7c0.js","assets/DocsButton.b174b81b.js","assets/DocsButton.d2184c76.css","assets/Workspace.b7d4a3bf.css"]),redirect:()=>({name:"forms"}),children:[{path:"forms",name:"forms",component:()=>t(()=>import("./Forms.bc146527.js"),["assets/Forms.bc146527.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/forms.38d7da0a.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/RuntimeList.1bf51451.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Forms"}},{path:"dashes",name:"dashes",component:()=>t(()=>import("./Dashes.d14ad66a.js"),["assets/Dashes.d14ad66a.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/dashes.9f1aca90.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/runnerData.170ae941.js","assets/RuntimeList.1bf51451.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Dashes"}},{path:"jobs",name:"jobs",component:()=>t(()=>import("./Jobs.626e2a1c.js"),["assets/Jobs.626e2a1c.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/jobs.2ad85710.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/RuntimeList.1bf51451.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Jobs"}},{path:"hooks",name:"hooks",component:()=>t(()=>import("./Hooks.d41656c0.js"),["assets/Hooks.d41656c0.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/hooks.d7d78397.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/RuntimeList.1bf51451.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Hooks"}},{path:"tables",name:"tables",component:()=>t(()=>import("./Tables.3387e003.js"),["assets/Tables.3387e003.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/tables.94b40ff0.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/RuntimeList.1bf51451.js","assets/DropdownMenu.162e22a4.js","assets/DropdownMenu.4f69c722.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/RuntimeList.bab136d4.css"]),meta:{title:"Abstra - Tables"}},{path:"style",name:"style",component:()=>t(()=>import("./StyleEditor.c9fef8ca.js"),["assets/StyleEditor.c9fef8ca.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/asyncComputed.3cb2e10b.js","assets/workspaces.25055240.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/icons.11151937.js","assets/SidebarPreview.dacadfbc.js","assets/PlayerNavbar.e3146994.js","assets/PlayerNavbar.adff8b48.css","assets/runnerData.170ae941.js","assets/colors.4425ff79.js","assets/SidebarPreview.12212654.css","assets/SaveButton.e379ab16.js","assets/SaveButton.c5392044.css","assets/StyleEditor.b552686c.css"]),meta:{title:"Abstra - Style"}},{path:"sidebar",name:"sidebar",component:()=>t(()=>import("./SidebarEditor.689be76e.js"),["assets/SidebarEditor.689be76e.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/workspaces.25055240.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/asyncComputed.3cb2e10b.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/SaveButton.e379ab16.js","assets/icons.11151937.js","assets/SaveButton.c5392044.css","assets/SidebarPreview.dacadfbc.js","assets/PlayerNavbar.e3146994.js","assets/PlayerNavbar.adff8b48.css","assets/runnerData.170ae941.js","assets/colors.4425ff79.js","assets/SidebarPreview.12212654.css","assets/SidebarEditor.f65d95bf.css"]),meta:{title:"Abstra - Sidebar"}}]},{path:"form/:formPath",name:"editor",component:()=>t(()=>import("./FormEditor.bc98641f.js"),["assets/FormEditor.bc98641f.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/Error.11930ed4.js","assets/Error.5cfc41d8.css","assets/broker.a62f2378.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/icons.11151937.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js","assets/Passwordless.65114c07.js","assets/Passwordless.86ac0c56.css","assets/executeJs.c3858a9c.js","assets/PlayerNavbar.e3146994.js","assets/PlayerNavbar.adff8b48.css","assets/index.a2df0371.js","assets/WidgetsFrame.8af89817.js","assets/colors.4425ff79.js","assets/WidgetsFrame.701a818b.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/broker.5f3abad8.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js","assets/asyncComputed.3cb2e10b.js","assets/forms.38d7da0a.js","assets/activeRecord.11b7d185.js","assets/dashes.9f1aca90.js","assets/runnerData.170ae941.js","assets/hooks.d7d78397.js","assets/jobs.2ad85710.js","assets/workspaces.25055240.js","assets/uuid.f763745d.js","assets/login.bbc5e7c0.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/Tab.55e05bca.js","assets/Tab.68f29dcc.css","assets/BackButton.6790f37d.js","assets/BackButton.40348456.css","assets/SaveButton.e379ab16.js","assets/SaveButton.c5392044.css","assets/DocsButton.b174b81b.js","assets/DocsButton.d2184c76.css","assets/PreviewButton.fc12f428.js","assets/PreviewButton.52324bbf.css","assets/FormEditor.6172d866.css"]),meta:{title:"Abstra - Smart Form Editor"}},{path:"form/:formPath/preview",name:"form-preview",component:()=>t(()=>import("./FormPreview.32564b37.js"),["assets/FormPreview.32564b37.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/Error.11930ed4.js","assets/Error.5cfc41d8.css","assets/broker.a62f2378.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/icons.11151937.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js","assets/Passwordless.65114c07.js","assets/Passwordless.86ac0c56.css","assets/executeJs.c3858a9c.js","assets/PlayerNavbar.e3146994.js","assets/PlayerNavbar.adff8b48.css","assets/index.a2df0371.js","assets/WidgetsFrame.8af89817.js","assets/colors.4425ff79.js","assets/WidgetsFrame.701a818b.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/broker.5f3abad8.css","assets/BackButton.1cd8c02a.js","assets/BackButton.dd542746.css","assets/asyncComputed.3cb2e10b.js","assets/forms.38d7da0a.js","assets/activeRecord.11b7d185.js","assets/workspaces.25055240.js","assets/FormPreview.6d0d0d3a.css"]),meta:{title:"Abstra - Smart Form Preview"}},{path:"job/:jobId",name:"jobEditor",component:()=>t(()=>import("./JobEditor.b0e3148a.js"),["assets/JobEditor.b0e3148a.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/Tab.55e05bca.js","assets/Tab.68f29dcc.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/asyncComputed.3cb2e10b.js","assets/jobs.2ad85710.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/SaveButton.e379ab16.js","assets/icons.11151937.js","assets/SaveButton.c5392044.css","assets/BackButton.6790f37d.js","assets/BackButton.40348456.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js","assets/forms.38d7da0a.js","assets/dashes.9f1aca90.js","assets/runnerData.170ae941.js","assets/hooks.d7d78397.js","assets/workspaces.25055240.js","assets/uuid.f763745d.js","assets/login.bbc5e7c0.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/DocsButton.b174b81b.js","assets/DocsButton.d2184c76.css","assets/JobEditor.d8bbc89c.css"]),meta:{title:"Abstra - Job Editor"}},{path:"dash/:dashPath",name:"dashEditor",component:()=>t(()=>import("./DashEditor.84c221ab.js"),["assets/DashEditor.84c221ab.js","assets/index.a2df0371.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/Tab.55e05bca.js","assets/Tab.68f29dcc.css","assets/DashPlayer.6a8897dd.js","assets/runnerData.170ae941.js","assets/executeJs.c3858a9c.js","assets/PlayerNavbar.e3146994.js","assets/icons.11151937.js","assets/PlayerNavbar.adff8b48.css","assets/WidgetsFrame.8af89817.js","assets/colors.4425ff79.js","assets/WidgetsFrame.701a818b.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/Passwordless.65114c07.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/Passwordless.86ac0c56.css","assets/DashPlayer.ef4a798d.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js","assets/asyncComputed.3cb2e10b.js","assets/forms.38d7da0a.js","assets/activeRecord.11b7d185.js","assets/dashes.9f1aca90.js","assets/hooks.d7d78397.js","assets/jobs.2ad85710.js","assets/workspaces.25055240.js","assets/uuid.f763745d.js","assets/login.bbc5e7c0.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/BackButton.6790f37d.js","assets/BackButton.40348456.css","assets/SaveButton.e379ab16.js","assets/SaveButton.c5392044.css","assets/PreviewButton.fc12f428.js","assets/PreviewButton.52324bbf.css","assets/DocsButton.b174b81b.js","assets/DocsButton.d2184c76.css","assets/DashEditor.3a6ec511.css"]),meta:{title:"Abstra - Dash Editor"}},{path:"dash/:dashPath/preview",name:"dashPreview",component:()=>t(()=>import("./DashPreview.a29719ea.js"),["assets/DashPreview.a29719ea.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/DashPlayer.6a8897dd.js","assets/runnerData.170ae941.js","assets/executeJs.c3858a9c.js","assets/PlayerNavbar.e3146994.js","assets/icons.11151937.js","assets/PlayerNavbar.adff8b48.css","assets/index.a2df0371.js","assets/WidgetsFrame.8af89817.js","assets/colors.4425ff79.js","assets/WidgetsFrame.701a818b.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/Passwordless.65114c07.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/Passwordless.86ac0c56.css","assets/DashPlayer.ef4a798d.css","assets/BackButton.1cd8c02a.js","assets/BackButton.dd542746.css","assets/asyncComputed.3cb2e10b.js","assets/dashes.9f1aca90.js","assets/activeRecord.11b7d185.js","assets/workspaces.25055240.js","assets/DashPreview.999196e0.css"]),meta:{title:"Abstra - Dash Editor"}},{path:"hook/:hookPath",name:"hookEditor",component:()=>t(()=>import("./HookEditor.446d4a64.js"),["assets/HookEditor.446d4a64.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/Tab.55e05bca.js","assets/Tab.68f29dcc.css","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.32dee0be.js","assets/icons.11151937.js","assets/asyncComputed.3cb2e10b.js","assets/forms.38d7da0a.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/dashes.9f1aca90.js","assets/runnerData.170ae941.js","assets/hooks.d7d78397.js","assets/jobs.2ad85710.js","assets/workspaces.25055240.js","assets/uuid.f763745d.js","assets/login.bbc5e7c0.js","assets/UnsavedChangesHandler.6c0ea770.css","assets/BackButton.6790f37d.js","assets/BackButton.40348456.css","assets/SaveButton.e379ab16.js","assets/SaveButton.c5392044.css","assets/DocsButton.b174b81b.js","assets/DocsButton.d2184c76.css","assets/HookEditor.1c22dc94.css"]),meta:{title:"Abstra - Hook Editor"}},{path:"table/:tableName",name:"tableEditor",component:()=>t(()=>import("./TableEditor.cf8a13f0.js"),["assets/TableEditor.cf8a13f0.js","assets/asyncComputed.3cb2e10b.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/tables.94b40ff0.js","assets/activeRecord.11b7d185.js","assets/pubsub.581c075e.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/Tab.55e05bca.js","assets/Tab.68f29dcc.css","assets/BackButton.6790f37d.js","assets/BackButton.40348456.css","assets/icons.11151937.js","assets/DocsButton.b174b81b.js","assets/DocsButton.d2184c76.css","assets/SaveButton.e379ab16.js","assets/SaveButton.c5392044.css","assets/TableEditor.66877c31.css"]),meta:{title:"Abstra - Table Editor"}}]}],scrollBehavior(e){if(e.hash)return{el:e.hash}}});r.beforeEach(async(e,o)=>{L(e,o)});(async()=>{const e=E({render:()=>T(k)});f.init(),v(e,r),e.use(r),e.use(A),e.mount("#app"),e.component("VSelect",P),e.component("Markdown",I),e.component("Icon",D),e.component("Message",w),a(e,y),a(e,V),a(e,R)})(); -//# sourceMappingURL=editor.b03c2e3e.js.map diff --git a/abstra_statics/dist/assets/editor.main.71e27b19.js b/abstra_statics/dist/assets/editor.main.1c8cebfc.js similarity index 99% rename from abstra_statics/dist/assets/editor.main.71e27b19.js rename to abstra_statics/dist/assets/editor.main.1c8cebfc.js index c90a7cf11a..ea88376a23 100644 --- a/abstra_statics/dist/assets/editor.main.71e27b19.js +++ b/abstra_statics/dist/assets/editor.main.1c8cebfc.js @@ -1,4 +1,4 @@ -var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var qt=(o,e,t)=>(N8(o,typeof e!="symbol"?e+"":e,t),t);import{_ as ue}from"./registerWidgets.ca6243ef.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="8574e5af-bca7-4635-8591-499f3299134a",o._sentryDebugIdIdentifier="sentry-dbid-8574e5af-bca7-4635-8591-499f3299134a")}catch{}})();globalThis&&globalThis.__awaiter;let T8=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function A8(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),T8&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function p(o,e,...t){return A8(e,t)}var Ow;const Vf="en";let U0=!1,$0=!1,h0=!1,TO=!1,sI=!1,oI=!1,q_,u0=Vf,M8,Cl;const ni=typeof self=="object"?self:typeof global=="object"?global:{};let Sn;typeof ni.vscode<"u"&&typeof ni.vscode.process<"u"?Sn=ni.vscode.process:typeof process<"u"&&(Sn=process);const R8=typeof((Ow=Sn==null?void 0:Sn.versions)===null||Ow===void 0?void 0:Ow.electron)=="string",O8=R8&&(Sn==null?void 0:Sn.type)==="renderer";if(typeof navigator=="object"&&!O8)Cl=navigator.userAgent,U0=Cl.indexOf("Windows")>=0,$0=Cl.indexOf("Macintosh")>=0,oI=(Cl.indexOf("Macintosh")>=0||Cl.indexOf("iPad")>=0||Cl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h0=Cl.indexOf("Linux")>=0,sI=!0,p({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),q_=Vf,u0=q_;else if(typeof Sn=="object"){U0=Sn.platform==="win32",$0=Sn.platform==="darwin",h0=Sn.platform==="linux",h0&&!!Sn.env.SNAP&&Sn.env.SNAP_REVISION,Sn.env.CI||Sn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,q_=Vf,u0=Vf;const o=Sn.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];q_=e.locale,u0=t||Vf,M8=e._translationsConfigFile}catch{}TO=!0}else console.error("Unable to resolve platform.");const Yi=U0,Ge=$0,dn=h0,jo=TO,Sc=sI,P8=sI&&typeof ni.importScripts=="function",Ur=oI,$r=Cl,F8=u0,B8=typeof ni.postMessage=="function"&&!ni.importScripts,AO=(()=>{if(B8){const o=[];ni.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i{const i=++e;o.push({id:i,callback:t}),ni.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),Os=$0||oI?2:U0?1:3;let yT=!0,LT=!1;function MO(){if(!LT){LT=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,yT=new Uint16Array(o.buffer)[0]===(2<<8)+1}return yT}const RO=!!($r&&$r.indexOf("Chrome")>=0),W8=!!($r&&$r.indexOf("Firefox")>=0),V8=!!(!RO&&$r&&$r.indexOf("Safari")>=0),H8=!!($r&&$r.indexOf("Edg/")>=0);$r&&$r.indexOf("Android")>=0;var je;(function(o){function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(S){yield S}o.single=n;function s(S){return S||t}o.from=s;function r(S){return!S||S[Symbol.iterator]().next().done===!0}o.isEmpty=r;function a(S){return S[Symbol.iterator]().next().value}o.first=a;function l(S,k){for(const x of S)if(k(x))return!0;return!1}o.some=l;function c(S,k){for(const x of S)if(k(x))return x}o.find=c;function*d(S,k){for(const x of S)k(x)&&(yield x)}o.filter=d;function*h(S,k){let x=0;for(const y of S)yield k(y,x++)}o.map=h;function*u(...S){for(const k of S)for(const x of k)yield x}o.concat=u;function*g(S){for(const k of S)for(const x of k)yield x}o.concatNested=g;function f(S,k,x){let y=x;for(const D of S)y=k(y,D);return y}o.reduce=f;function _(S,k){let x=0;for(const y of S)k(y,x++)}o.forEach=_;function*b(S,k,x=S.length){for(k<0&&(k+=S.length),x<0?x+=S.length:x>S.length&&(x=S.length);ky===D){const y=S[Symbol.iterator](),D=k[Symbol.iterator]();for(;;){const I=y.next(),O=D.next();if(I.done!==O.done)return!1;if(I.done)return!0;if(!x(I.value,O.value))return!1}}o.equals=w})(je||(je={}));class Gt{constructor(e){this.element=e,this.next=Gt.Undefined,this.prev=Gt.Undefined}}Gt.Undefined=new Gt(void 0);class Dn{constructor(){this._first=Gt.Undefined,this._last=Gt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Gt.Undefined}clear(){let e=this._first;for(;e!==Gt.Undefined;){const t=e.next;e.prev=Gt.Undefined,e.next=Gt.Undefined,e=t}this._first=Gt.Undefined,this._last=Gt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Gt(e);if(this._first===Gt.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Gt.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Gt.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Gt.Undefined&&e.next!==Gt.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Gt.Undefined&&e.next===Gt.Undefined?(this._first=Gt.Undefined,this._last=Gt.Undefined):e.next===Gt.Undefined?(this._last=this._last.prev,this._last.next=Gt.Undefined):e.prev===Gt.Undefined&&(this._first=this._first.next,this._first.prev=Gt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Gt.Undefined;)yield e.element,e=e.next}}const OO="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function z8(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of OO)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const rI=z8();function PO(o){let e=rI;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const FO=new Dn;FO.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Mp(o,e,t,i,n){if(n||(n=je.first(FO)),t.length>n.maxLen){let c=o-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,o+n.maxLen/2),Mp(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){const d=r-n.windowSize*c;e.lastIndex=Math.max(0,d);const h=U8(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){const c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function U8(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}function Ts(o,e=0){return o[o.length-(1+e)]}function $8(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function Ss(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;it(o[i],e))}function K8(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function BO(o,e){let t=0,i=o.length;if(i===0)return 0;for(;t=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o!!e)}function WO(o){return!Array.isArray(o)||o.length===0}function rn(o){return Array.isArray(o)&&o.length>0}function Qa(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function j0(o,e){const t=q8(o,e);if(t!==-1)return o[t]}function q8(o,e){for(let t=o.length-1;t>=0;t--){const i=o[t];if(e(i))return t}return-1}function VO(o,e){return o.length>0?o[0]:e}function Cn(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;ne;n--)i.push(n);return i}function RC(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function Pw(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function G_(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function kT(o,e){for(const t of e)o.push(t)}function lI(o){return Array.isArray(o)?o:[o]}function G8(o,e,t){const i=HO(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r0}o.isGreaterThan=t;function i(n){return n===0}o.isNeitherLessOrGreaterThan=i,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(IT||(IT={}));function op(o,e){return(t,i)=>e(o(t),o(i))}const Z8=(o,e)=>o-e;function zO(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i0&&(t=n)}return t}function UO(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i=0&&(t=n)}return t}function Y8(o,e){return zO(o,(t,i)=>-e(t,i))}class Rp{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}function $O(o){return Array.isArray(o)}function Un(o){return typeof o=="string"}function Hn(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function Q8(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function tc(o){return typeof o=="number"&&!isNaN(o)}function ET(o){return!!o&&typeof o[Symbol.iterator]=="function"}function jO(o){return o===!0||o===!1}function Xn(o){return typeof o>"u"}function X8(o){return!ms(o)}function ms(o){return Xn(o)||o===null}function pt(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Z_(o){if(ms(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function K0(o){return typeof o=="function"}function J8(o,e){const t=Math.min(o.length,e.length);for(let i=0;ifunction(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}function Wn(o){return o===null?void 0:o}function OC(o,e="Unreachable"){throw new Error(e)}function La(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.keys(o).forEach(t=>{o[t]&&typeof o[t]=="object"?e[t]=La(o[t]):e[t]=o[t]}),e}function n6(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(KO.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!Q8(n)&&e.push(n)}}return o}const KO=Object.prototype.hasOwnProperty;function qO(o,e){return $y(o,e,new Set)}function $y(o,e,t){if(ms(o))return o;const i=e(o);if(typeof i<"u")return i;if($O(o)){const n=[];for(const s of o)n.push($y(s,e,t));return n}if(Hn(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)KO.call(o,s)&&(n[s]=$y(o[s],e,t));return t.delete(o),n}return o}function Jr(o,e,t=!0){return Hn(o)?(Hn(e)&&Object.keys(e).forEach(i=>{i in o?t&&(Hn(o[i])&&Hn(e[i])?Jr(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function $s(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t"u"?this.defaultValue:e}compute(e,t,i){return i}}function we(o,e){return typeof o>"u"?e:o==="false"?!1:Boolean(o)}class Qe extends uh{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return we(e,this.defaultValue)}}function jy(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Tt extends uh{constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}static clampedInt(e,t,i,n){return jy(e,t,i,n)}validate(e){return Tt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class Ar extends uh{constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(Ar.float(e,this.defaultValue))}}class Yn extends uh{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Yn.string(e,this.defaultValue)}}function Ki(o,e,t){return typeof o!="string"||t.indexOf(o)===-1?e:o}class vi extends uh{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return Ki(e,this.defaultValue,this._allowedValues)}}class ff extends fi{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function s6(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class o6 extends fi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),p("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:p("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class r6 extends fi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:we(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:we(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function a6(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Hi;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(Hi||(Hi={}));function l6(o){switch(o){case"line":return Hi.Line;case"block":return Hi.Block;case"underline":return Hi.Underline;case"line-thin":return Hi.LineThin;case"block-outline":return Hi.BlockOutline;case"underline-thin":return Hi.UnderlineThin}}class c6 extends Vg{constructor(){super(130)}compute(e,t,i){const n=["monaco-editor"];return t.get(35)&&n.push(t.get(35)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(68)==="default"?n.push("mouse-default"):t.get(68)==="copy"&&n.push("mouse-copy"),t.get(102)&&n.push("showUnused"),t.get(128)&&n.push("showDeprecated"),n.join(" ")}}class d6 extends Qe{constructor(){super(33,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class h6 extends fi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(37,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Ge},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:p("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:we(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ki(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ki(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:we(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:we(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:we(t.loop,this.defaultValue.loop)}}}class _s extends fi{constructor(){super(47,"fontLigatures",_s.OFF,{anyOf:[{type:"boolean",description:p("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?_s.OFF:e==="true"?_s.ON:e:Boolean(e)?_s.ON:_s.OFF}}_s.OFF='"liga" off, "calt" off';_s.ON='"liga" on, "calt" on';class u6 extends Vg{constructor(){super(46)}compute(e,t,i){return e.fontInfo}}class g6 extends uh{constructor(){super(48,"fontSize",ts.fontSize,{type:"number",minimum:6,maximum:100,default:ts.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(e){const t=Ar.float(e,this.defaultValue);return t===0?ts.fontSize:Ar.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class kr extends fi{constructor(){super(49,"fontWeight",ts.fontWeight,{anyOf:[{type:"number",minimum:kr.MINIMUM_VALUE,maximum:kr.MAXIMUM_VALUE,errorMessage:p("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:kr.SUGGESTION_VALUES}],default:ts.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Tt.clampedInt(e,ts.fontWeight,kr.MINIMUM_VALUE,kr.MAXIMUM_VALUE))}}kr.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];kr.MINIMUM_VALUE=1;kr.MAXIMUM_VALUE=1e3;class f6 extends fi{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(53,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:p("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:p("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:p("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:p("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:p("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Ki(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Ki(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Ki(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Ki(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Ki(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Ki(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Yn.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Yn.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Yn.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Yn.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Yn.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class p6 extends fi{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(55,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:we(t.enabled,this.defaultValue.enabled),delay:Tt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:we(t.sticky,this.defaultValue.sticky),above:we(t.above,this.defaultValue.above)}}}class Eu extends Vg{constructor(){super(133)}compute(e,t,i){return Eu.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:s}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,_=e.minimap.side,b=e.verticalScrollbarWidth,v=e.viewLineCount,C=e.remainingWidth,w=e.isViewportWrapping,S=h?2:3;let k=Math.floor(s*n);const x=k/s;let y=!1,D=!1,I=S*u,O=u/s,F=1;if(f==="fill"||f==="fit"){const{typicalViewportLineCount:xe,extraLinesBeyondLastLine:He,desiredRatio:Mt,minimapLineCount:yt}=Eu.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:d,height:n,lineHeight:l,pixelRatio:s});if(v/yt>1)y=!0,D=!0,u=1,I=1,O=u/s;else{let me=!1,Nt=u+1;if(f==="fit"){const Fi=Math.ceil((v+He)*I);w&&a&&C<=t.stableFitRemainingWidth?(me=!0,Nt=t.stableFitMaxMinimapScale):me=Fi>k}if(f==="fill"||me){y=!0;const Fi=u;I=Math.min(l*s,Math.max(1,Math.floor(1/Mt))),w&&a&&C<=t.stableFitRemainingWidth&&(Nt=t.stableFitMaxMinimapScale),u=Math.min(Nt,Math.max(1,Math.floor(I/S))),u>Fi&&(F=Math.min(2,u/Fi)),O=u/s/F,k=Math.ceil(Math.max(xe,v+He)*I),w?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=C,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const z=Math.floor(g*O),j=Math.min(z,Math.max(0,Math.floor((C-b-2)*O/(c+O)))+wl);let re=Math.floor(s*j);const he=re/s;re=Math.floor(re*F);const Se=h?1:2,ye=_==="left"?0:i-j-b;return{renderMinimap:Se,minimapLeft:ye,minimapWidth:j,minimapHeightIsEditorHeight:y,minimapIsSampling:D,minimapScale:u,minimapLineHeight:I,minimapCanvasInnerWidth:re,minimapCanvasInnerHeight:k,minimapCanvasOuterWidth:he,minimapCanvasOuterHeight:x}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,h=e.get(125),u=h==="inherit"?e.get(124):h,g=u==="inherit"?e.get(120):u,f=e.get(123),_=e.get(2),b=t.isDominatedByLongLines,v=e.get(52),C=e.get(62).renderType!==0,w=e.get(63),S=e.get(96),k=e.get(67),x=e.get(94),y=x.verticalScrollbarSize,D=x.verticalHasArrows,I=x.arrowSize,O=x.horizontalScrollbarSize,F=e.get(60),z=e.get(39),j=e.get(101)!=="never";let re;if(typeof F=="string"&&/^\d+(\.\d+)?ch$/.test(F)){const xo=parseFloat(F.substr(0,F.length-2));re=Tt.clampedInt(xo*a,0,0,1e3)}else re=Tt.clampedInt(F,0,0,1e3);z&&j&&(re+=16);let he=0;if(C){const xo=Math.max(r,w);he=Math.round(xo*l)}let Se=0;v&&(Se=s);let ye=0,xe=ye+Se,He=xe+he,Mt=He+re;const yt=i-Se-he-re;let ve=!1,me=!1,Nt=-1;_!==2&&(u==="inherit"&&b?(ve=!0,me=!0):g==="on"||g==="bounded"?me=!0:g==="wordWrapColumn"&&(Nt=f));const Fi=Eu._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:S,minimap:k,verticalScrollbarWidth:y,viewLineCount:d,remainingWidth:yt,isViewportWrapping:me},t.memory||new ZO);Fi.renderMinimap!==0&&Fi.minimapLeft===0&&(ye+=Fi.minimapWidth,xe+=Fi.minimapWidth,He+=Fi.minimapWidth,Mt+=Fi.minimapWidth);const In=yt-Fi.minimapWidth,ko=Math.max(1,Math.floor((In-y-2)/a)),oa=D?I:0;return me&&(Nt=Math.max(1,ko),g==="bounded"&&(Nt=Math.min(Nt,f))),{width:i,height:n,glyphMarginLeft:ye,glyphMarginWidth:Se,lineNumbersLeft:xe,lineNumbersWidth:he,decorationsLeft:He,decorationsWidth:re,contentLeft:Mt,contentWidth:In,minimap:Fi,viewportColumn:ko,isWordWrapMinified:ve,isViewportWrapping:me,wrappingColumn:Nt,verticalScrollbarWidth:y,horizontalScrollbarHeight:O,overviewRuler:{top:oa,width:y,height:n-2*oa,right:0}}}}class m6 extends fi{constructor(){const e={enabled:!0};super(59,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:p("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:we(e.enabled,this.defaultValue.enabled)}}}class _6 extends fi{constructor(){const e={stickyScroll:{enabled:!1}};super(34,"experimental",e,{"editor.experimental.stickyScroll.enabled":{type:"boolean",default:e.stickyScroll.enabled,description:p("editor.experimental.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")}})}validate(e){var t;return!e||typeof e!="object"?this.defaultValue:{stickyScroll:{enabled:we((t=e.stickyScroll)===null||t===void 0?void 0:t.enabled,this.defaultValue.stickyScroll.enabled)}}}}class b6 extends fi{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p("editor.inlayHints.on","Inlay hints are enabled"),p("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding `Ctrl+Alt`"),p("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding `Ctrl+Alt`"),p("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:p("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Ki(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Tt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Yn.string(t.fontFamily,this.defaultValue.fontFamily),padding:we(t.padding,this.defaultValue.padding)}}}class v6 extends Ar{constructor(){super(61,"lineHeight",ts.lineHeight,e=>Ar.clamp(e,0,150),{markdownDescription:p("lineHeight",`Controls the line height. +var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var qt=(o,e,t)=>(N8(o,typeof e!="symbol"?e+"":e,t),t);import{_ as ue}from"./registerWidgets.89616af0.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="76cab482-361f-4a42-b418-c21d7d2aef83",o._sentryDebugIdIdentifier="sentry-dbid-76cab482-361f-4a42-b418-c21d7d2aef83")}catch{}})();globalThis&&globalThis.__awaiter;let T8=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function A8(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),T8&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function p(o,e,...t){return A8(e,t)}var Ow;const Vf="en";let U0=!1,$0=!1,h0=!1,TO=!1,sI=!1,oI=!1,q_,u0=Vf,M8,Cl;const ni=typeof self=="object"?self:typeof global=="object"?global:{};let Sn;typeof ni.vscode<"u"&&typeof ni.vscode.process<"u"?Sn=ni.vscode.process:typeof process<"u"&&(Sn=process);const R8=typeof((Ow=Sn==null?void 0:Sn.versions)===null||Ow===void 0?void 0:Ow.electron)=="string",O8=R8&&(Sn==null?void 0:Sn.type)==="renderer";if(typeof navigator=="object"&&!O8)Cl=navigator.userAgent,U0=Cl.indexOf("Windows")>=0,$0=Cl.indexOf("Macintosh")>=0,oI=(Cl.indexOf("Macintosh")>=0||Cl.indexOf("iPad")>=0||Cl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h0=Cl.indexOf("Linux")>=0,sI=!0,p({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),q_=Vf,u0=q_;else if(typeof Sn=="object"){U0=Sn.platform==="win32",$0=Sn.platform==="darwin",h0=Sn.platform==="linux",h0&&!!Sn.env.SNAP&&Sn.env.SNAP_REVISION,Sn.env.CI||Sn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,q_=Vf,u0=Vf;const o=Sn.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];q_=e.locale,u0=t||Vf,M8=e._translationsConfigFile}catch{}TO=!0}else console.error("Unable to resolve platform.");const Yi=U0,Ge=$0,dn=h0,jo=TO,Sc=sI,P8=sI&&typeof ni.importScripts=="function",Ur=oI,$r=Cl,F8=u0,B8=typeof ni.postMessage=="function"&&!ni.importScripts,AO=(()=>{if(B8){const o=[];ni.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i{const i=++e;o.push({id:i,callback:t}),ni.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),Os=$0||oI?2:U0?1:3;let yT=!0,LT=!1;function MO(){if(!LT){LT=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,yT=new Uint16Array(o.buffer)[0]===(2<<8)+1}return yT}const RO=!!($r&&$r.indexOf("Chrome")>=0),W8=!!($r&&$r.indexOf("Firefox")>=0),V8=!!(!RO&&$r&&$r.indexOf("Safari")>=0),H8=!!($r&&$r.indexOf("Edg/")>=0);$r&&$r.indexOf("Android")>=0;var je;(function(o){function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(S){yield S}o.single=n;function s(S){return S||t}o.from=s;function r(S){return!S||S[Symbol.iterator]().next().done===!0}o.isEmpty=r;function a(S){return S[Symbol.iterator]().next().value}o.first=a;function l(S,k){for(const x of S)if(k(x))return!0;return!1}o.some=l;function c(S,k){for(const x of S)if(k(x))return x}o.find=c;function*d(S,k){for(const x of S)k(x)&&(yield x)}o.filter=d;function*h(S,k){let x=0;for(const y of S)yield k(y,x++)}o.map=h;function*u(...S){for(const k of S)for(const x of k)yield x}o.concat=u;function*g(S){for(const k of S)for(const x of k)yield x}o.concatNested=g;function f(S,k,x){let y=x;for(const D of S)y=k(y,D);return y}o.reduce=f;function _(S,k){let x=0;for(const y of S)k(y,x++)}o.forEach=_;function*b(S,k,x=S.length){for(k<0&&(k+=S.length),x<0?x+=S.length:x>S.length&&(x=S.length);ky===D){const y=S[Symbol.iterator](),D=k[Symbol.iterator]();for(;;){const I=y.next(),O=D.next();if(I.done!==O.done)return!1;if(I.done)return!0;if(!x(I.value,O.value))return!1}}o.equals=w})(je||(je={}));class Gt{constructor(e){this.element=e,this.next=Gt.Undefined,this.prev=Gt.Undefined}}Gt.Undefined=new Gt(void 0);class Dn{constructor(){this._first=Gt.Undefined,this._last=Gt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Gt.Undefined}clear(){let e=this._first;for(;e!==Gt.Undefined;){const t=e.next;e.prev=Gt.Undefined,e.next=Gt.Undefined,e=t}this._first=Gt.Undefined,this._last=Gt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Gt(e);if(this._first===Gt.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Gt.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Gt.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Gt.Undefined&&e.next!==Gt.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Gt.Undefined&&e.next===Gt.Undefined?(this._first=Gt.Undefined,this._last=Gt.Undefined):e.next===Gt.Undefined?(this._last=this._last.prev,this._last.next=Gt.Undefined):e.prev===Gt.Undefined&&(this._first=this._first.next,this._first.prev=Gt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Gt.Undefined;)yield e.element,e=e.next}}const OO="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function z8(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of OO)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const rI=z8();function PO(o){let e=rI;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const FO=new Dn;FO.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Mp(o,e,t,i,n){if(n||(n=je.first(FO)),t.length>n.maxLen){let c=o-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,o+n.maxLen/2),Mp(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){const d=r-n.windowSize*c;e.lastIndex=Math.max(0,d);const h=U8(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){const c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function U8(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}function Ts(o,e=0){return o[o.length-(1+e)]}function $8(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function Ss(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;it(o[i],e))}function K8(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function BO(o,e){let t=0,i=o.length;if(i===0)return 0;for(;t=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o!!e)}function WO(o){return!Array.isArray(o)||o.length===0}function rn(o){return Array.isArray(o)&&o.length>0}function Qa(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function j0(o,e){const t=q8(o,e);if(t!==-1)return o[t]}function q8(o,e){for(let t=o.length-1;t>=0;t--){const i=o[t];if(e(i))return t}return-1}function VO(o,e){return o.length>0?o[0]:e}function Cn(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;ne;n--)i.push(n);return i}function RC(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function Pw(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function G_(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function kT(o,e){for(const t of e)o.push(t)}function lI(o){return Array.isArray(o)?o:[o]}function G8(o,e,t){const i=HO(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r0}o.isGreaterThan=t;function i(n){return n===0}o.isNeitherLessOrGreaterThan=i,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(IT||(IT={}));function op(o,e){return(t,i)=>e(o(t),o(i))}const Z8=(o,e)=>o-e;function zO(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i0&&(t=n)}return t}function UO(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i=0&&(t=n)}return t}function Y8(o,e){return zO(o,(t,i)=>-e(t,i))}class Rp{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}function $O(o){return Array.isArray(o)}function Un(o){return typeof o=="string"}function Hn(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function Q8(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function tc(o){return typeof o=="number"&&!isNaN(o)}function ET(o){return!!o&&typeof o[Symbol.iterator]=="function"}function jO(o){return o===!0||o===!1}function Xn(o){return typeof o>"u"}function X8(o){return!ms(o)}function ms(o){return Xn(o)||o===null}function pt(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Z_(o){if(ms(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function K0(o){return typeof o=="function"}function J8(o,e){const t=Math.min(o.length,e.length);for(let i=0;ifunction(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}function Wn(o){return o===null?void 0:o}function OC(o,e="Unreachable"){throw new Error(e)}function La(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.keys(o).forEach(t=>{o[t]&&typeof o[t]=="object"?e[t]=La(o[t]):e[t]=o[t]}),e}function n6(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(KO.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!Q8(n)&&e.push(n)}}return o}const KO=Object.prototype.hasOwnProperty;function qO(o,e){return $y(o,e,new Set)}function $y(o,e,t){if(ms(o))return o;const i=e(o);if(typeof i<"u")return i;if($O(o)){const n=[];for(const s of o)n.push($y(s,e,t));return n}if(Hn(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)KO.call(o,s)&&(n[s]=$y(o[s],e,t));return t.delete(o),n}return o}function Jr(o,e,t=!0){return Hn(o)?(Hn(e)&&Object.keys(e).forEach(i=>{i in o?t&&(Hn(o[i])&&Hn(e[i])?Jr(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function $s(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t"u"?this.defaultValue:e}compute(e,t,i){return i}}function we(o,e){return typeof o>"u"?e:o==="false"?!1:Boolean(o)}class Qe extends uh{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return we(e,this.defaultValue)}}function jy(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Tt extends uh{constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}static clampedInt(e,t,i,n){return jy(e,t,i,n)}validate(e){return Tt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class Ar extends uh{constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(Ar.float(e,this.defaultValue))}}class Yn extends uh{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Yn.string(e,this.defaultValue)}}function Ki(o,e,t){return typeof o!="string"||t.indexOf(o)===-1?e:o}class vi extends uh{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return Ki(e,this.defaultValue,this._allowedValues)}}class ff extends fi{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function s6(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class o6 extends fi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),p("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:p("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class r6 extends fi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:we(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:we(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function a6(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Hi;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(Hi||(Hi={}));function l6(o){switch(o){case"line":return Hi.Line;case"block":return Hi.Block;case"underline":return Hi.Underline;case"line-thin":return Hi.LineThin;case"block-outline":return Hi.BlockOutline;case"underline-thin":return Hi.UnderlineThin}}class c6 extends Vg{constructor(){super(130)}compute(e,t,i){const n=["monaco-editor"];return t.get(35)&&n.push(t.get(35)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(68)==="default"?n.push("mouse-default"):t.get(68)==="copy"&&n.push("mouse-copy"),t.get(102)&&n.push("showUnused"),t.get(128)&&n.push("showDeprecated"),n.join(" ")}}class d6 extends Qe{constructor(){super(33,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class h6 extends fi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(37,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Ge},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:p("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:we(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ki(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ki(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:we(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:we(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:we(t.loop,this.defaultValue.loop)}}}class _s extends fi{constructor(){super(47,"fontLigatures",_s.OFF,{anyOf:[{type:"boolean",description:p("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?_s.OFF:e==="true"?_s.ON:e:Boolean(e)?_s.ON:_s.OFF}}_s.OFF='"liga" off, "calt" off';_s.ON='"liga" on, "calt" on';class u6 extends Vg{constructor(){super(46)}compute(e,t,i){return e.fontInfo}}class g6 extends uh{constructor(){super(48,"fontSize",ts.fontSize,{type:"number",minimum:6,maximum:100,default:ts.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(e){const t=Ar.float(e,this.defaultValue);return t===0?ts.fontSize:Ar.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class kr extends fi{constructor(){super(49,"fontWeight",ts.fontWeight,{anyOf:[{type:"number",minimum:kr.MINIMUM_VALUE,maximum:kr.MAXIMUM_VALUE,errorMessage:p("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:kr.SUGGESTION_VALUES}],default:ts.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Tt.clampedInt(e,ts.fontWeight,kr.MINIMUM_VALUE,kr.MAXIMUM_VALUE))}}kr.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];kr.MINIMUM_VALUE=1;kr.MAXIMUM_VALUE=1e3;class f6 extends fi{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(53,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:p("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:p("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:p("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:p("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:p("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Ki(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Ki(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Ki(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Ki(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Ki(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Ki(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Yn.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Yn.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Yn.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Yn.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Yn.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class p6 extends fi{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(55,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:we(t.enabled,this.defaultValue.enabled),delay:Tt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:we(t.sticky,this.defaultValue.sticky),above:we(t.above,this.defaultValue.above)}}}class Eu extends Vg{constructor(){super(133)}compute(e,t,i){return Eu.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:s}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,_=e.minimap.side,b=e.verticalScrollbarWidth,v=e.viewLineCount,C=e.remainingWidth,w=e.isViewportWrapping,S=h?2:3;let k=Math.floor(s*n);const x=k/s;let y=!1,D=!1,I=S*u,O=u/s,F=1;if(f==="fill"||f==="fit"){const{typicalViewportLineCount:xe,extraLinesBeyondLastLine:He,desiredRatio:Mt,minimapLineCount:yt}=Eu.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:d,height:n,lineHeight:l,pixelRatio:s});if(v/yt>1)y=!0,D=!0,u=1,I=1,O=u/s;else{let me=!1,Nt=u+1;if(f==="fit"){const Fi=Math.ceil((v+He)*I);w&&a&&C<=t.stableFitRemainingWidth?(me=!0,Nt=t.stableFitMaxMinimapScale):me=Fi>k}if(f==="fill"||me){y=!0;const Fi=u;I=Math.min(l*s,Math.max(1,Math.floor(1/Mt))),w&&a&&C<=t.stableFitRemainingWidth&&(Nt=t.stableFitMaxMinimapScale),u=Math.min(Nt,Math.max(1,Math.floor(I/S))),u>Fi&&(F=Math.min(2,u/Fi)),O=u/s/F,k=Math.ceil(Math.max(xe,v+He)*I),w?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=C,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const z=Math.floor(g*O),j=Math.min(z,Math.max(0,Math.floor((C-b-2)*O/(c+O)))+wl);let re=Math.floor(s*j);const he=re/s;re=Math.floor(re*F);const Se=h?1:2,ye=_==="left"?0:i-j-b;return{renderMinimap:Se,minimapLeft:ye,minimapWidth:j,minimapHeightIsEditorHeight:y,minimapIsSampling:D,minimapScale:u,minimapLineHeight:I,minimapCanvasInnerWidth:re,minimapCanvasInnerHeight:k,minimapCanvasOuterWidth:he,minimapCanvasOuterHeight:x}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,h=e.get(125),u=h==="inherit"?e.get(124):h,g=u==="inherit"?e.get(120):u,f=e.get(123),_=e.get(2),b=t.isDominatedByLongLines,v=e.get(52),C=e.get(62).renderType!==0,w=e.get(63),S=e.get(96),k=e.get(67),x=e.get(94),y=x.verticalScrollbarSize,D=x.verticalHasArrows,I=x.arrowSize,O=x.horizontalScrollbarSize,F=e.get(60),z=e.get(39),j=e.get(101)!=="never";let re;if(typeof F=="string"&&/^\d+(\.\d+)?ch$/.test(F)){const xo=parseFloat(F.substr(0,F.length-2));re=Tt.clampedInt(xo*a,0,0,1e3)}else re=Tt.clampedInt(F,0,0,1e3);z&&j&&(re+=16);let he=0;if(C){const xo=Math.max(r,w);he=Math.round(xo*l)}let Se=0;v&&(Se=s);let ye=0,xe=ye+Se,He=xe+he,Mt=He+re;const yt=i-Se-he-re;let ve=!1,me=!1,Nt=-1;_!==2&&(u==="inherit"&&b?(ve=!0,me=!0):g==="on"||g==="bounded"?me=!0:g==="wordWrapColumn"&&(Nt=f));const Fi=Eu._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:S,minimap:k,verticalScrollbarWidth:y,viewLineCount:d,remainingWidth:yt,isViewportWrapping:me},t.memory||new ZO);Fi.renderMinimap!==0&&Fi.minimapLeft===0&&(ye+=Fi.minimapWidth,xe+=Fi.minimapWidth,He+=Fi.minimapWidth,Mt+=Fi.minimapWidth);const In=yt-Fi.minimapWidth,ko=Math.max(1,Math.floor((In-y-2)/a)),oa=D?I:0;return me&&(Nt=Math.max(1,ko),g==="bounded"&&(Nt=Math.min(Nt,f))),{width:i,height:n,glyphMarginLeft:ye,glyphMarginWidth:Se,lineNumbersLeft:xe,lineNumbersWidth:he,decorationsLeft:He,decorationsWidth:re,contentLeft:Mt,contentWidth:In,minimap:Fi,viewportColumn:ko,isWordWrapMinified:ve,isViewportWrapping:me,wrappingColumn:Nt,verticalScrollbarWidth:y,horizontalScrollbarHeight:O,overviewRuler:{top:oa,width:y,height:n-2*oa,right:0}}}}class m6 extends fi{constructor(){const e={enabled:!0};super(59,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:p("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:we(e.enabled,this.defaultValue.enabled)}}}class _6 extends fi{constructor(){const e={stickyScroll:{enabled:!1}};super(34,"experimental",e,{"editor.experimental.stickyScroll.enabled":{type:"boolean",default:e.stickyScroll.enabled,description:p("editor.experimental.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")}})}validate(e){var t;return!e||typeof e!="object"?this.defaultValue:{stickyScroll:{enabled:we((t=e.stickyScroll)===null||t===void 0?void 0:t.enabled,this.defaultValue.stickyScroll.enabled)}}}}class b6 extends fi{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p("editor.inlayHints.on","Inlay hints are enabled"),p("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding `Ctrl+Alt`"),p("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding `Ctrl+Alt`"),p("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:p("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Ki(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Tt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Yn.string(t.fontFamily,this.defaultValue.fontFamily),padding:we(t.padding,this.defaultValue.padding)}}}class v6 extends Ar{constructor(){super(61,"lineHeight",ts.lineHeight,e=>Ar.clamp(e,0,150),{markdownDescription:p("lineHeight",`Controls the line height. - Use 0 to automatically compute the line height from the font size. - Values between 0 and 8 will be used as a multiplier with the font size. - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class C6 extends fi{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(67,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:p("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:we(t.enabled,this.defaultValue.enabled),autohide:we(t.autohide,this.defaultValue.autohide),size:Ki(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ki(t.side,this.defaultValue.side,["right","left"]),showSlider:Ki(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:we(t.renderCharacters,this.defaultValue.renderCharacters),scale:Tt.clampedInt(t.scale,1,1,3),maxColumn:Tt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function w6(o){return o==="ctrlCmd"?Ge?"metaKey":"ctrlKey":"altKey"}class S6 extends fi{constructor(){super(77,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Tt.clampedInt(t.top,0,0,1e3),bottom:Tt.clampedInt(t.bottom,0,0,1e3)}}}class y6 extends fi{constructor(){const e={enabled:!0,cycle:!1};super(78,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:we(t.enabled,this.defaultValue.enabled),cycle:we(t.cycle,this.defaultValue.cycle)}}}class L6 extends Vg{constructor(){super(131)}compute(e,t,i){return e.pixelRatio}}class D6 extends fi{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p("on","Quick suggestions show inside the suggest widget"),p("inline","Quick suggestions show as ghost text"),p("off","Quick suggestions are disabled")]}];super(81,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:p("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const c=e?"on":"off";return{comments:c,strings:c,other:c}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let r,a,l;return typeof t=="boolean"?r=t?"on":"off":r=Ki(t,this.defaultValue.other,s),typeof i=="boolean"?a=i?"on":"off":a=Ki(i,this.defaultValue.comments,s),typeof n=="boolean"?l=n?"on":"off":l=Ki(n,this.defaultValue.strings,s),{other:r,comments:a,strings:l}}}class k6 extends fi{constructor(){super(62,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p("lineNumbers.off","Line numbers are not rendered."),p("lineNumbers.on","Line numbers are rendered as absolute number."),p("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),p("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:p("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function q0(o){const e=o.get(89);return e==="editable"?o.get(83):e!=="on"}class x6 extends fi{constructor(){const e=[],t={type:"number",description:p("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(93,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:p("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:p("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if(typeof i=="number")t.push({column:Tt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:Tt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}function NT(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}class I6 extends fi{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(94,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),p("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),p("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),p("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),p("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:p("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:p("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:p("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=Tt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Tt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Tt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:NT(t.vertical,this.defaultValue.vertical),horizontal:NT(t.horizontal,this.defaultValue.horizontal),useShadows:we(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:we(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:we(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:we(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:we(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Tt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Tt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:we(t.scrollByPage,this.defaultValue.scrollByPage)}}}const gs="inUntrustedWorkspace",On={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class E6 extends fi{constructor(){const e={nonBasicASCII:gs,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:gs,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(115,"unicodeHighlight",e,{[On.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,gs],default:e.nonBasicASCII,description:p("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[On.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:p("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[On.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:p("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[On.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,gs],default:e.includeComments,description:p("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[On.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,gs],default:e.includeStrings,description:p("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[On.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:p("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[On.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:p("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&($s(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&($s(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new rp(n.newValue,!0):n}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:Nu(t.nonBasicASCII,gs,[!0,!1,gs]),invisibleCharacters:we(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:we(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Nu(t.includeComments,gs,[!0,!1,gs]),includeStrings:Nu(t.includeStrings,gs,[!0,!1,gs]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const i={};for(const[n,s]of Object.entries(e))s===!0&&(i[n]=!0);return i}}class N6 extends fi{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(57,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:p("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:we(t.enabled,this.defaultValue.enabled),mode:Ki(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class T6 extends fi{constructor(){const e={enabled:sn.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:sn.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:p("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:we(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:we(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class A6 extends fi{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairs.true","Enables bracket pair guides."),p("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),p("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:p("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),p("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),p("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:p("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:p("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:p("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[p("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),p("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),p("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:p("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Nu(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Nu(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:we(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:we(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Nu(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Nu(o,e,t){const i=t.indexOf(o);return i===-1?e:t[i]}class M6 extends fi{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(108,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),p("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:p("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:p("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:p("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:p("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:p("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:p("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:p("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:p("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:p("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Ki(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:we(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:we(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:we(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:we(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:we(t.showIcons,this.defaultValue.showIcons),showStatusBar:we(t.showStatusBar,this.defaultValue.showStatusBar),preview:we(t.preview,this.defaultValue.preview),previewMode:Ki(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:we(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:we(t.showMethods,this.defaultValue.showMethods),showFunctions:we(t.showFunctions,this.defaultValue.showFunctions),showConstructors:we(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:we(t.showDeprecated,this.defaultValue.showDeprecated),showFields:we(t.showFields,this.defaultValue.showFields),showVariables:we(t.showVariables,this.defaultValue.showVariables),showClasses:we(t.showClasses,this.defaultValue.showClasses),showStructs:we(t.showStructs,this.defaultValue.showStructs),showInterfaces:we(t.showInterfaces,this.defaultValue.showInterfaces),showModules:we(t.showModules,this.defaultValue.showModules),showProperties:we(t.showProperties,this.defaultValue.showProperties),showEvents:we(t.showEvents,this.defaultValue.showEvents),showOperators:we(t.showOperators,this.defaultValue.showOperators),showUnits:we(t.showUnits,this.defaultValue.showUnits),showValues:we(t.showValues,this.defaultValue.showValues),showConstants:we(t.showConstants,this.defaultValue.showConstants),showEnums:we(t.showEnums,this.defaultValue.showEnums),showEnumMembers:we(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:we(t.showKeywords,this.defaultValue.showKeywords),showWords:we(t.showWords,this.defaultValue.showWords),showColors:we(t.showColors,this.defaultValue.showColors),showFiles:we(t.showFiles,this.defaultValue.showFiles),showReferences:we(t.showReferences,this.defaultValue.showReferences),showFolders:we(t.showFolders,this.defaultValue.showFolders),showTypeParameters:we(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:we(t.showSnippets,this.defaultValue.showSnippets),showUsers:we(t.showUsers,this.defaultValue.showUsers),showIssues:we(t.showIssues,this.defaultValue.showIssues)}}}class R6 extends fi{constructor(){super(104,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:we(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class O6 extends Vg{constructor(){super(132)}compute(e,t,i){return t.get(83)?!0:e.tabFocusMode}}function P6(o){switch(o){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class F6 extends Vg{constructor(){super(134)}compute(e,t,i){const n=t.get(133);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class B6 extends fi{constructor(){const e={enabled:!0};super(32,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:we(e.enabled,this.defaultValue.enabled)}}}const W6="Consolas, 'Courier New', monospace",V6="Menlo, Monaco, 'Courier New', monospace",H6="'Droid Sans Mono', 'monospace', monospace",ts={fontFamily:Ge?V6:dn?H6:W6,fontWeight:"normal",fontSize:Ge?12:14,lineHeight:0,letterSpacing:0},ru=[];function te(o){return ru[o.id]=o,o}const nr={acceptSuggestionOnCommitCharacter:te(new Qe(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`; `) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:te(new vi(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:p("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:te(new o6),accessibilityPageSize:te(new Tt(3,"accessibilityPageSize",10,1,1073741824,{description:p("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:te(new Yn(4,"ariaLabel",p("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:te(new vi(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),p("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:p("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:te(new vi(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:te(new vi(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:te(new vi(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),p("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:p("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:te(new ff(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],s6,{enumDescriptions:[p("editor.autoIndent.none","The editor will not insert indentation automatically."),p("editor.autoIndent.keep","The editor will keep the current line's indentation."),p("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),p("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),p("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:p("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:te(new Qe(10,"automaticLayout",!1)),autoSurround:te(new vi(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),p("editor.autoSurround.quotes","Surround with quotes but not brackets."),p("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:p("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:te(new T6),bracketPairGuides:te(new A6),stickyTabStops:te(new Qe(106,"stickyTabStops",!1,{description:p("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:te(new Qe(14,"codeLens",!0,{description:p("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:te(new Yn(15,"codeLensFontFamily","",{description:p("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:te(new Tt(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:te(new Qe(17,"colorDecorators",!0,{description:p("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:te(new Qe(18,"columnSelection",!1,{description:p("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:te(new r6),contextmenu:te(new Qe(20,"contextmenu",!0)),copyWithSyntaxHighlighting:te(new Qe(21,"copyWithSyntaxHighlighting",!0,{description:p("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:te(new ff(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],a6,{description:p("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:te(new Qe(23,"cursorSmoothCaretAnimation",!1,{description:p("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:te(new ff(24,"cursorStyle",Hi.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],l6,{description:p("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:te(new Tt(25,"cursorSurroundingLines",0,0,1073741824,{description:p("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:te(new vi(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),p("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:p("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:te(new Tt(27,"cursorWidth",0,0,1073741824,{markdownDescription:p("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:te(new Qe(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:te(new Qe(29,"disableMonospaceOptimizations",!1)),domReadOnly:te(new Qe(30,"domReadOnly",!1)),dragAndDrop:te(new Qe(31,"dragAndDrop",!0,{description:p("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:te(new d6),dropIntoEditor:te(new B6),experimental:te(new _6),extraEditorClassName:te(new Yn(35,"extraEditorClassName","")),fastScrollSensitivity:te(new Ar(36,"fastScrollSensitivity",5,o=>o<=0?5:o,{markdownDescription:p("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:te(new h6),fixedOverflowWidgets:te(new Qe(38,"fixedOverflowWidgets",!1)),folding:te(new Qe(39,"folding",!0,{description:p("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:te(new vi(40,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),p("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:p("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:te(new Qe(41,"foldingHighlight",!0,{description:p("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:te(new Qe(42,"foldingImportsByDefault",!1,{description:p("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:te(new Tt(43,"foldingMaximumRegions",5e3,10,65e3,{description:p("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:te(new Qe(44,"unfoldOnClickAfterEndOfLine",!1,{description:p("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:te(new Yn(45,"fontFamily",ts.fontFamily,{description:p("fontFamily","Controls the font family.")})),fontInfo:te(new u6),fontLigatures2:te(new _s),fontSize:te(new g6),fontWeight:te(new kr),formatOnPaste:te(new Qe(50,"formatOnPaste",!1,{description:p("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:te(new Qe(51,"formatOnType",!1,{description:p("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:te(new Qe(52,"glyphMargin",!0,{description:p("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:te(new f6),hideCursorInOverviewRuler:te(new Qe(54,"hideCursorInOverviewRuler",!1,{description:p("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:te(new p6),inDiffEditor:te(new Qe(56,"inDiffEditor",!1)),letterSpacing:te(new Ar(58,"letterSpacing",ts.letterSpacing,o=>Ar.clamp(o,-5,20),{description:p("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:te(new m6),lineDecorationsWidth:te(new uh(60,"lineDecorationsWidth",10)),lineHeight:te(new v6),lineNumbers:te(new k6),lineNumbersMinChars:te(new Tt(63,"lineNumbersMinChars",5,1,300)),linkedEditing:te(new Qe(64,"linkedEditing",!1,{description:p("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:te(new Qe(65,"links",!0,{description:p("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:te(new vi(66,"matchBrackets","always",["always","near","never"],{description:p("matchBrackets","Highlight matching brackets.")})),minimap:te(new C6),mouseStyle:te(new vi(68,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:te(new Ar(69,"mouseWheelScrollSensitivity",1,o=>o===0?1:o,{markdownDescription:p("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:te(new Qe(70,"mouseWheelZoom",!1,{markdownDescription:p("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:te(new Qe(71,"multiCursorMergeOverlapping",!0,{description:p("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:te(new ff(72,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],w6,{markdownEnumDescriptions:[p("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:p({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:te(new vi(73,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p("multiCursorPaste.spread","Each cursor pastes a single line of the text."),p("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:p("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:te(new Qe(74,"occurrencesHighlight",!0,{description:p("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:te(new Qe(75,"overviewRulerBorder",!0,{description:p("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:te(new Tt(76,"overviewRulerLanes",3,0,3)),padding:te(new S6),parameterHints:te(new y6),peekWidgetDefaultFocus:te(new vi(79,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),p("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:p("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:te(new Qe(80,"definitionLinkOpensInPeek",!1,{description:p("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:te(new D6),quickSuggestionsDelay:te(new Tt(82,"quickSuggestionsDelay",10,0,1073741824,{description:p("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:te(new Qe(83,"readOnly",!1)),renameOnType:te(new Qe(84,"renameOnType",!1,{description:p("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:p("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:te(new Qe(85,"renderControlCharacters",!0,{description:p("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:te(new Qe(86,"renderFinalNewline",!0,{description:p("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:te(new vi(87,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:p("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:te(new Qe(88,"renderLineHighlightOnlyWhenFocus",!1,{description:p("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:te(new vi(89,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:te(new vi(90,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),p("renderWhitespace.selection","Render whitespace characters only on selected text."),p("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:p("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:te(new Tt(91,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:te(new Qe(92,"roundedSelection",!0,{description:p("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:te(new x6),scrollbar:te(new I6),scrollBeyondLastColumn:te(new Tt(95,"scrollBeyondLastColumn",4,0,1073741824,{description:p("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:te(new Qe(96,"scrollBeyondLastLine",!0,{description:p("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:te(new Qe(97,"scrollPredominantAxis",!0,{description:p("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:te(new Qe(98,"selectionClipboard",!0,{description:p("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:dn})),selectionHighlight:te(new Qe(99,"selectionHighlight",!0,{description:p("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:te(new Qe(100,"selectOnLineNumbers",!0)),showFoldingControls:te(new vi(101,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[p("showFoldingControls.always","Always show the folding controls."),p("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),p("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:p("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:te(new Qe(102,"showUnused",!0,{description:p("showUnused","Controls fading out of unused code.")})),showDeprecated:te(new Qe(128,"showDeprecated",!0,{description:p("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:te(new b6),snippetSuggestions:te(new vi(103,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),p("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),p("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),p("snippetSuggestions.none","Do not show snippet suggestions.")],description:p("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:te(new R6),smoothScrolling:te(new Qe(105,"smoothScrolling",!1,{description:p("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:te(new Tt(107,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:te(new M6),inlineSuggest:te(new N6),suggestFontSize:te(new Tt(109,"suggestFontSize",0,0,1e3,{markdownDescription:p("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:te(new Tt(110,"suggestLineHeight",0,0,1e3,{markdownDescription:p("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:te(new Qe(111,"suggestOnTriggerCharacters",!0,{description:p("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:te(new vi(112,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p("suggestSelection.first","Always select the first suggestion."),p("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),p("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:p("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:te(new vi(113,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),p("tabCompletion.off","Disable tab completions."),p("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:p("tabCompletion","Enables tab completions.")})),tabIndex:te(new Tt(114,"tabIndex",0,-1,1073741824)),unicodeHighlight:te(new E6),unusualLineTerminators:te(new vi(116,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),p("unusualLineTerminators.off","Unusual line terminators are ignored."),p("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:p("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:te(new Qe(117,"useShadowDOM",!0)),useTabStops:te(new Qe(118,"useTabStops",!0,{description:p("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:te(new Yn(119,"wordSeparators",OO,{description:p("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:te(new vi(120,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),p({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:p({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:te(new Yn(121,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:te(new Yn(122,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:te(new Tt(123,"wordWrapColumn",80,1,1073741824,{markdownDescription:p({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:te(new vi(124,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:te(new vi(125,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:te(new ff(126,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],P6,{enumDescriptions:[p("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),p("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),p("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),p("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:p("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:te(new vi(127,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[p("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),p("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:p("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:te(new c6),pixelRatio:te(new L6),tabFocusMode:te(new O6),layoutInfo:te(new Eu),wrappingInfo:te(new F6)};class z6{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Xu.isErrorNoTelemetry(e)?new Xu(e.message+` @@ -50,7 +50,7 @@ var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,config `+e.normalizeIndentation(l.afterEnter),0,g,!0)}}}return Pt._typeCommand(n,` `+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;nPt.shiftIndent(e,a),unshiftIndent:a=>Pt.unshiftIndent(e,a)},e.languageConfigurationService);if(r===null)return null;if(r!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?Pt._typeCommand(new L(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):Pt._typeCommand(new L(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let r=0,a=i.length;r2?d.charCodeAt(c.column-2):0)===92&&u)return!1;if(e.autoClosingOvertype==="auto"){let f=!1;for(let _=0,b=n.length;_t.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!r&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let r=null;for(const a of s)if(r===null||a.open.length>r.open.length){let l=!0;for(const c of i)if(t.getValueInRange(new L(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(r=a)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const r of n)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!s||r.open.length>s.open.length)&&(s=r);return s}static _getAutoClosingPairClose(e,t,i,n,s){const r=Ll(n),a=r?e.autoClosingQuotes:e.autoClosingBrackets,l=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if(a==="never")return null;for(const f of i)if(!f.isEmpty())return null;const c=i.map(f=>{const _=f.getPosition();return s?{lineNumber:_.lineNumber,beforeColumn:_.column-n.length,afterColumn:_.column}:{lineNumber:_.lineNumber,beforeColumn:_.column,afterColumn:_.column}}),d=this._findAutoClosingPairOpen(e,t,c.map(f=>new B(f.lineNumber,f.beforeColumn)),n);if(!d)return null;const h=this._findContainedAutoClosingPair(e,d),u=h?h.close:"";let g=!0;for(const f of c){const{lineNumber:_,beforeColumn:b,afterColumn:v}=f,C=t.getLineContent(_),w=C.substring(0,b-1),S=C.substring(v-1);if(S.startsWith(u)||(g=!1),S.length>0){const D=S.charAt(0);if(!Pt._isBeforeClosingBrace(e,S)&&!l(D))return null}if(d.open.length===1&&(n==="'"||n==='"')&&a!=="always"){const D=Ys(e.wordSeparators);if(w.length>0){const I=w.charCodeAt(w.length-1);if(D.get(I)===0)return null}}if(!t.tokenization.isCheapToTokenize(_))return null;t.tokenization.forceTokenization(_);const k=t.tokenization.getLineTokens(_),x=HC(k,b-1);if(!d.shouldAutoClose(x,b-x.firstCharOffset))return null;const y=d.findNeutralCharacter();if(y){const D=t.tokenization.getTokenTypeIfInsertingCharacter(_,b,y);if(!d.isOK(D))return null}}return g?d.close.substring(0,d.close.length-u.length):d.close}static _runAutoClosingOpenCharType(e,t,i,n,s,r,a){const l=[];for(let c=0,d=n.length;cnew zi(new L(u.positionLineNumber,u.positionColumn,u.positionLineNumber,u.positionColumn+1),"",!1));return new An(4,h,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const d=this._getAutoClosingPairClose(t,i,s,l,!0);return d!==null?this._runAutoClosingOpenCharType(e,t,i,s,l,!0,d):null}static typeWithInterceptors(e,t,i,n,s,r,a){if(!e&&a===` `){const d=[];for(let h=0,u=s.length;h{const n=t.get(ct).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{const n=document.activeElement;return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(ct).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}var Ei;(function(o){class e extends ti{constructor(C){super(C),this._minimalReveal=C.minimalReveal,this._inSelectionMode=C.inSelectionMode}runCoreEditorCommand(C,w){C.model.pushStackElement(),C.setCursorStates(w.source,3,[Wi.moveTo(C,C.getPrimaryCursorState(),this._inSelectionMode,w.position,w.viewPosition)])&&C.revealPrimaryCursor(w.source,!0,this._minimalReveal)}}o.MoveTo=ee(new e({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),o.MoveToSelect=ee(new e({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class t extends ti{runCoreEditorCommand(C,w){C.model.pushStackElement();const S=this._getColumnSelectResult(C,C.getPrimaryCursorState(),C.getCursorColumnSelectData(),w);C.setCursorStates(w.source,3,S.viewStates.map(k=>$e.fromViewState(k))),C.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:S.fromLineNumber,fromViewVisualColumn:S.fromVisualColumn,toViewLineNumber:S.toLineNumber,toViewVisualColumn:S.toVisualColumn}),S.reversed?C.revealTopMostCursor(w.source):C.revealBottomMostCursor(w.source)}}o.ColumnSelect=ee(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(v,C,w,S){const k=v.model.validatePosition(S.position),x=v.coordinatesConverter.validateViewPosition(new B(S.viewPosition.lineNumber,S.viewPosition.column),k),y=S.doColumnSelect?w.fromViewLineNumber:x.lineNumber,D=S.doColumnSelect?w.fromViewVisualColumn:S.mouseColumn-1;return Xc.columnSelect(v.cursorConfig,v,y,D,x.lineNumber,S.mouseColumn-1)}}),o.CursorColumnSelectLeft=ee(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(v,C,w,S){return Xc.columnSelectLeft(v.cursorConfig,v,w)}}),o.CursorColumnSelectRight=ee(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(v,C,w,S){return Xc.columnSelectRight(v.cursorConfig,v,w)}});class i extends t{constructor(C){super(C),this._isPaged=C.isPaged}_getColumnSelectResult(C,w,S,k){return Xc.columnSelectUp(C.cursorConfig,C,S,this._isPaged)}}o.CursorColumnSelectUp=ee(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3600,linux:{primary:0}}})),o.CursorColumnSelectPageUp=ee(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3595,linux:{primary:0}}}));class n extends t{constructor(C){super(C),this._isPaged=C.isPaged}_getColumnSelectResult(C,w,S,k){return Xc.columnSelectDown(C.cursorConfig,C,S,this._isPaged)}}o.CursorColumnSelectDown=ee(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3602,linux:{primary:0}}})),o.CursorColumnSelectPageDown=ee(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends ti{constructor(){super({id:"cursorMove",precondition:void 0,description:yv.description})}runCoreEditorCommand(C,w){const S=yv.parse(w);!S||this._runCursorMove(C,w.source,S)}_runCursorMove(C,w,S){C.model.pushStackElement(),C.setCursorStates(w,3,s._move(C,C.getCursorStates(),S)),C.revealPrimaryCursor(w,!0)}static _move(C,w,S){const k=S.select,x=S.value;switch(S.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Wi.simpleMove(C,w,S.direction,k,x,S.unit);case 11:case 13:case 12:case 14:return Wi.viewportMove(C,w,S.direction,k,x);default:return null}}}o.CursorMoveImpl=s,o.CursorMove=ee(new s);class r extends ti{constructor(C){super(C),this._staticArgs=C.args}runCoreEditorCommand(C,w){let S=this._staticArgs;this._staticArgs.value===-1&&(S={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:w.pageSize||C.cursorConfig.pageSize}),C.model.pushStackElement(),C.setCursorStates(w.source,3,Wi.simpleMove(C,C.getCursorStates(),S.direction,S.select,S.value,S.unit)),C.revealPrimaryCursor(w.source,!0)}}o.CursorLeft=ee(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),o.CursorLeftSelect=ee(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1039}})),o.CursorRight=ee(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),o.CursorRightSelect=ee(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1041}})),o.CursorUp=ee(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),o.CursorUpSelect=ee(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),o.CursorPageUp=ee(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:11}})),o.CursorPageUpSelect=ee(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1035}})),o.CursorDown=ee(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),o.CursorDownSelect=ee(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),o.CursorPageDown=ee(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:12}})),o.CursorPageDownSelect=ee(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1036}})),o.CreateCursor=ee(new class extends ti{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(v,C){let w;C.wholeLine?w=Wi.line(v,v.getPrimaryCursorState(),!1,C.position,C.viewPosition):w=Wi.moveTo(v,v.getPrimaryCursorState(),!1,C.position,C.viewPosition);const S=v.getCursorStates();if(S.length>1){const k=w.modelState?w.modelState.position:null,x=w.viewState?w.viewState.position:null;for(let y=0,D=S.length;yx&&(k=x);const y=new L(k,1,k,v.model.getLineMaxColumn(k));let D=0;if(w.at)switch(w.at){case Cu.RawAtArgument.Top:D=3;break;case Cu.RawAtArgument.Center:D=1;break;case Cu.RawAtArgument.Bottom:D=4;break}const I=v.coordinatesConverter.convertModelRangeToViewRange(y);v.revealRange(C.source,!1,I,D,0)}}),o.SelectAll=new class extends pD{constructor(){super(gz)}runDOMCommand(){Ls&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(v,C,w){const S=C._getViewModel();!S||this.runCoreEditorCommand(S,w)}runCoreEditorCommand(v,C){v.model.pushStackElement(),v.setCursorStates("keyboard",3,[Wi.selectAll(v,v.getPrimaryCursorState())])}},o.SetSelection=ee(new class extends ti{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(v,C){v.model.pushStackElement(),v.setCursorStates(C.source,3,[$e.fromModelSelection(C.selection)])}})})(Ei||(Ei={}));const Sj=se.and(N.textInputFocus,N.columnSelection);function Gg(o,e){as.registerKeybindingRule({id:o,primary:e,when:Sj,weight:rt+1})}Gg(Ei.CursorColumnSelectLeft.id,1039);Gg(Ei.CursorColumnSelectRight.id,1041);Gg(Ei.CursorColumnSelectUp.id,1040);Gg(Ei.CursorColumnSelectPageUp.id,1035);Gg(Ei.CursorColumnSelectDown.id,1042);Gg(Ei.CursorColumnSelectPageDown.id,1036);function G2(o){return o.register(),o}var Wu;(function(o){class e extends xi{runEditorCommand(i,n,s){const r=n._getViewModel();!r||this.runCoreEditingCommand(n,r,s||{})}}o.CoreEditingCommand=e,o.LineBreakInsert=ee(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:N.writable,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Pt.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),o.Outdent=ee(new class extends e{constructor(){super({id:"outdent",precondition:N.writable,kbOpts:{weight:rt,kbExpr:se.and(N.editorTextFocus,N.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Pt.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.Tab=ee(new class extends e{constructor(){super({id:"tab",precondition:N.writable,kbOpts:{weight:rt,kbExpr:se.and(N.editorTextFocus,N.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Pt.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.DeleteLeft=ee(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,i,n){const[s,r]=Vd.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(2)}}),o.DeleteRight=ee(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,i,n){const[s,r]=Vd.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(3)}}),o.Undo=new class extends pD{constructor(){super(w4)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(83)===!0))return i.getModel().undo()}},o.Redo=new class extends pD{constructor(){super(S4)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(83)===!0))return i.getModel().redo()}}})(Wu||(Wu={}));class Z2 extends c1{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(ct).getFocusedCodeEditor();!i||i.trigger("keyboard",this._handlerId,t)}}function _h(o,e){G2(new Z2("default:"+o,o)),G2(new Z2(o,o,e))}_h("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});_h("replacePreviousChar");_h("compositionType");_h("compositionStart");_h("compositionEnd");_h("paste");_h("cut");class yj{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ei.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Ei.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Ei.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ei.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ei.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Ei.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Ei.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Ei.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Ei.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Ei.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Ei.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Ei.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Ei.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Ei.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class w1{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return w1.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}var gS;class Q4{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,r=0;for(let l=i;l<=n;l++){const c=l-this._rendLineNumberStart;e<=l&&l<=t&&(r===0?(s=c,r=1):r++)}if(e=n&&a<=s&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(this.getCount()===0)return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const r=[];for(let h=0;hi)continue;const l=Math.max(t,a.fromLineNumber),c=Math.min(i,a.toLineNumber);for(let d=l;d<=c;d++){const h=d-this._rendLineNumberStart;this._lines[h].onTokensChanged(),n=!0}}return n}}class X4{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new Q4(()=>this._host.createVisibleLine())}_createDomNode(){const e=Je(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(133)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){const r=t,a=Math.min(i,s.rendLineNumberStart-1);r<=a&&(this._insertLinesBefore(s,r,a,n,t),s.linesLength+=a-r+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,r),s.linesLength-=r)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const r=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-r+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const r=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){const c=r+l;a[l].layoutLine(c,n[c-s])}}_insertLinesBefore(e,t,i,n,s){const r=[];let a=0;for(let l=t;l<=i;l++)r[a++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;a--){const l=e.lines[a];n[a]&&(l.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Ta._ttPolicy&&(t=Ta._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;so});Ta._sb=nc(1e5);class J4 extends Is{constructor(e){super(e),this._visibleLines=new X4(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ei.shouldRender());for(let i=0,n=t.length;i'),n.appendASCIIString(s),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Dj extends J4{constructor(e){super(e);const i=this._context.configuration.options.get(133);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(133);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class kj extends J4{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(133);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),an(this.domNode,t.get(46))}onConfigurationChanged(e){const t=this._context.configuration.options;an(this.domNode,t.get(46));const i=t.get(133);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class yf{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class xj extends Is{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Je(document.createElement("div")),qr.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Je(document.createElement("div")),qr.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new Ij(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n){this._widgets[e.getId()].setPosition(t,i,n),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class Ij{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Je(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(133);this._fixedOverflowWidgets=n.get(38),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(61),this._range=null,this._viewRange=null,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(61),e.hasChanged(133)){const i=t.get(133);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range,this._affinity)}_setPosition(e,t){var i;if(this._range=e,this._viewRange=null,this._affinity=t,this._range){const n=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(n.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(n.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(n,(i=this._affinity)!==null&&i!==void 0?i:void 0))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t,i){this._setPosition(e,i),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n,s){const r=e.top,a=r,l=t.top+this._lineHeight,c=s.viewportHeight-l,d=r-n,h=a>=n,u=l,g=c>=n;let f=e.left,_=t.left;return f+i>s.scrollLeft+s.viewportWidth&&(f=s.scrollLeft+s.viewportWidth-i),_+i>s.scrollLeft+s.viewportWidth&&(_=s.scrollLeft+s.viewportWidth-i),fr){const l=a-(r-n);a-=l,i-=l}if(a=b,w=d+n<=h.height-v;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(c,b),aboveLeft:g,fitsBelow:w,belowTop:d,belowLeft:_}:{fitsAbove:C,aboveTop:r,aboveLeft:u,fitsBelow:w,belowTop:a,belowLeft:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new yf(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let i=t[0],n=t[0];for(const h of t)h.lineNumbern.lineNumber&&(n=h);let s=1073741824;for(const h of i.ranges)h.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&fS(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&fS(this._actual.afterRender,this._actual,this._renderData.position)}}function fS(o,e,...t){try{return o.call(e,...t)}catch{return null}}class e5 extends qg{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._renderLineHighlight=t.get(87),this._renderLineHighlightOnlyWhenFocus=t.get(88),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new oe(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(n=>n.positionLineNumber);t.sort((n,s)=>n-s),Ss(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every(n=>n.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._lineHeight=t.get(61),this._renderLineHighlight=t.get(87),this._renderLineHighlightOnlyWhenFocus=t.get(88),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let r=0;const a=[];for(let l=i;l<=n;l++){const c=l-i;for(;r=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Ej extends e5{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class Nj extends e5{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Et((o,e)=>{const t=o.getColor(W4);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||o.defines(j2)){const i=o.getColor(j2);i&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),cn(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class Tj extends qg{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;const d=l.options.className,h=c.options.className;return dh?1:L.compareRangesUsingStarts(l.range,c.range)});const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=r;l++){const c=l-s;a[c]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',h=Math.max(c.range.startLineNumber,s),u=Math.min(c.range.endLineNumber,r);for(let g=h;g<=u;g++){const f=g-s;i[f]+=d}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber;let r=null,a=!1,l=null;for(let c=0,d=t.length;c';a[u]+=b}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class yo extends H{onclick(e,t){this._register(G(e,ae.CLICK,i=>t(new Mr(i))))}onmousedown(e,t){this._register(G(e,ae.MOUSE_DOWN,i=>t(new Mr(i))))}onmouseover(e,t){this._register(G(e,ae.MOUSE_OVER,i=>t(new Mr(i))))}onmouseleave(e,t){this._register(G(e,ae.MOUSE_LEAVE,i=>t(new Mr(i))))}onkeydown(e,t){this._register(G(e,ae.KEY_DOWN,i=>t(new Rt(i))))}onkeyup(e,t){this._register(G(e,ae.KEY_UP,i=>t(new Rt(i))))}oninput(e,t){this._register(G(e,ae.INPUT,t))}onblur(e,t){this._register(G(e,ae.BLUR,t))}onfocus(e,t){this._register(G(e,ae.FOCUS,t))}ignoreGesture(e){ft.ignoreTarget(e)}}const ug=11;class Aj extends yo{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=ug+"px",this.domNode.style.height=ug+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new jg),this._register(ki(this.bgDomNode,ae.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(ki(this.domNode,ae.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new r_),this._pointerdownScheduleRepeatTimer=this._register(new xs)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class Mj extends H{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new xs)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}const Rj=140;class t5 extends yo{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Mj(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new jg),this._shouldRender=!0,this.domNode=Je(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(G(this.domNode.domNode,ae.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){const t=this._register(new Aj(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Je(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(G(this.slider.domNode,ae.POINTER_DOWN,s=>{s.button===0&&(s.preventDefault(),this._sliderPointerDown(s))})),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){!this._shouldRender||(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{const s=on(this.domNode.domNode);t=e.pageX-s.left,i=e.pageY-s.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>{const r=this._sliderOrthogonalPointerPosition(s),a=Math.abs(r-i);if(Yi&&a>Rj){this._setDesiredScrollPositionNow(n.getScrollPosition());return}const c=this._sliderPointerPosition(s)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const Oj=20;class nm{constructor(e,t,i,n,s,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new nm(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(Oj,Math.floor(i*a/n))),d=(a-c)/(n-i),h=s*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=nm._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new sg(null,1,0))}),this._createArrow({className:"scra",icon:m.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:r,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new sg(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class Fj extends t5{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new nm(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const r=(t.arrowSize-ug)/2,a=(t.verticalScrollbarSize-ug)/2;this._createArrow({className:"scra",icon:m.scrollbarButtonUp,top:r,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new sg(null,0,1))}),this._createArrow({className:"scra",icon:m.scrollbarButtonDown,top:void 0,left:a,bottom:r,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new sg(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class Dv{constructor(e,t,i,n,s,r,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,i=i|0,n=n|0,s=s|0,r=r|0,a=a|0),this.rawScrollLeft=n,this.rawScrollTop=a,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),a+s>r&&(a=r-s),a<0&&(a=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=r,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new Dv(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Dv(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:r,scrollHeightChanged:a,scrollTopChanged:l}}}class f_ extends H{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new R),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Dv(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),(i=this._smoothScrolling)===null||i===void 0||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new sm(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=sm.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class Y2{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function pS(o,e){const t=e-o;return function(i){return o+t*Vj(i)}}function Bj(o,e,t){return function(i){return i2.5*i){let s,r;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}mD.INSTANCE=new mD;class fE extends yo{constructor(e,t,i){super(),this._onScroll=this._register(new R),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new R),e.style.overflow="hidden",this._options=Uj(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Fj(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new Pj(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Je(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Je(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Je(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,s=>this._onMouseOver(s)),this.onmouseleave(this._listenOnDomNode,s=>this._onMouseLeave(s)),this._hideTimeout=this._register(new xs),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=nt(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Ge&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=nt(this._mouseWheelToDispose),e)){const i=n=>{this._onMouseWheel(new sg(n))};this._mouseWheelToDispose.push(G(this._listenOnDomNode,ae.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){const t=mD.INSTANCE;{const s=window.devicePixelRatio/_P();Yi||dn?t.accept(Date.now(),e.deltaX/s,e.deltaY/s):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(s)>=Math.abs(r)?r=0:s=0),this._options.flipAxes&&([s,r]=[r,s]);const a=!Ge&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!r&&(r=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(r=r*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(s){const d=Q2*s,h=l.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(c,h)}if(r){const d=Q2*r,h=l.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(c,h)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!!this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Hj)}}class i5 extends fE{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new f_({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>Jo(n)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class pE extends fE{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class p_ extends fE{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new f_({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>Jo(n)});super(e,t,i),this._register(i),this._element=e,this.onScroll(n=>{n.scrollTopChanged&&(this._element.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this._element.scrollLeft=n.scrollLeft)}),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function Uj(o){const e={lazyRender:typeof o.lazyRender<"u"?o.lazyRender:!1,className:typeof o.className<"u"?o.className:"",useShadows:typeof o.useShadows<"u"?o.useShadows:!0,handleMouseWheel:typeof o.handleMouseWheel<"u"?o.handleMouseWheel:!0,flipAxes:typeof o.flipAxes<"u"?o.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof o.consumeMouseWheelIfScrollbarIsNeeded<"u"?o.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof o.alwaysConsumeMouseWheel<"u"?o.alwaysConsumeMouseWheel:!1,scrollYToX:typeof o.scrollYToX<"u"?o.scrollYToX:!1,mouseWheelScrollSensitivity:typeof o.mouseWheelScrollSensitivity<"u"?o.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof o.fastScrollSensitivity<"u"?o.fastScrollSensitivity:5,scrollPredominantAxis:typeof o.scrollPredominantAxis<"u"?o.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof o.mouseWheelSmoothScroll<"u"?o.mouseWheelSmoothScroll:!0,arrowSize:typeof o.arrowSize<"u"?o.arrowSize:11,listenOnDomNode:typeof o.listenOnDomNode<"u"?o.listenOnDomNode:null,horizontal:typeof o.horizontal<"u"?o.horizontal:1,horizontalScrollbarSize:typeof o.horizontalScrollbarSize<"u"?o.horizontalScrollbarSize:10,horizontalSliderSize:typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:0,horizontalHasArrows:typeof o.horizontalHasArrows<"u"?o.horizontalHasArrows:!1,vertical:typeof o.vertical<"u"?o.vertical:1,verticalScrollbarSize:typeof o.verticalScrollbarSize<"u"?o.verticalScrollbarSize:10,verticalHasArrows:typeof o.verticalHasArrows<"u"?o.verticalHasArrows:!1,verticalSliderSize:typeof o.verticalSliderSize<"u"?o.verticalSliderSize:0,scrollByPage:typeof o.scrollByPage<"u"?o.scrollByPage:!1};return e.horizontalSliderSize=typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof o.verticalSliderSize<"u"?o.verticalSliderSize:e.verticalScrollbarSize,Ge&&(e.className+=" mac"),e}class $j extends Is{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,r=s.get(94),a=s.get(69),l=s.get(36),c=s.get(97),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+fv(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new pE(t.domNode,d,this._context.viewLayout.getScrollable())),qr.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Je(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(u,g,f)=>{const _={};if(g){const b=u.scrollTop;b&&(_.scrollTop=this._context.viewLayout.getCurrentScrollTop()+b,u.scrollTop=0)}if(f){const b=u.scrollLeft;b&&(_.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+b,u.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(_,1)};this._register(G(i.domNode,"scroll",u=>h(i.domNode,!0,!0))),this._register(G(t.domNode,"scroll",u=>h(t.domNode,!0,!1))),this._register(G(n.domNode,"scroll",u=>h(n.domNode,!0,!1))),this._register(G(this.scrollbarDomNode.domNode,"scroll",u=>h(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(133);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(67).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}onConfigurationChanged(e){if(e.hasChanged(94)||e.hasChanged(69)||e.hasChanged(36)){const t=this._context.configuration.options,i=t.get(94),n=t.get(69),s=t.get(36),r=t.get(97),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(a)}return e.hasChanged(133)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+fv(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}Et((o,e)=>{const t=o.getColor(Kg);t&&e.addRule(` +`);else{a--;const l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new L(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s{const n=t.get(ct).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{const n=document.activeElement;return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(ct).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}var Ei;(function(o){class e extends ti{constructor(C){super(C),this._minimalReveal=C.minimalReveal,this._inSelectionMode=C.inSelectionMode}runCoreEditorCommand(C,w){C.model.pushStackElement(),C.setCursorStates(w.source,3,[Wi.moveTo(C,C.getPrimaryCursorState(),this._inSelectionMode,w.position,w.viewPosition)])&&C.revealPrimaryCursor(w.source,!0,this._minimalReveal)}}o.MoveTo=ee(new e({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),o.MoveToSelect=ee(new e({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class t extends ti{runCoreEditorCommand(C,w){C.model.pushStackElement();const S=this._getColumnSelectResult(C,C.getPrimaryCursorState(),C.getCursorColumnSelectData(),w);C.setCursorStates(w.source,3,S.viewStates.map(k=>$e.fromViewState(k))),C.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:S.fromLineNumber,fromViewVisualColumn:S.fromVisualColumn,toViewLineNumber:S.toLineNumber,toViewVisualColumn:S.toVisualColumn}),S.reversed?C.revealTopMostCursor(w.source):C.revealBottomMostCursor(w.source)}}o.ColumnSelect=ee(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(v,C,w,S){const k=v.model.validatePosition(S.position),x=v.coordinatesConverter.validateViewPosition(new B(S.viewPosition.lineNumber,S.viewPosition.column),k),y=S.doColumnSelect?w.fromViewLineNumber:x.lineNumber,D=S.doColumnSelect?w.fromViewVisualColumn:S.mouseColumn-1;return Xc.columnSelect(v.cursorConfig,v,y,D,x.lineNumber,S.mouseColumn-1)}}),o.CursorColumnSelectLeft=ee(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(v,C,w,S){return Xc.columnSelectLeft(v.cursorConfig,v,w)}}),o.CursorColumnSelectRight=ee(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(v,C,w,S){return Xc.columnSelectRight(v.cursorConfig,v,w)}});class i extends t{constructor(C){super(C),this._isPaged=C.isPaged}_getColumnSelectResult(C,w,S,k){return Xc.columnSelectUp(C.cursorConfig,C,S,this._isPaged)}}o.CursorColumnSelectUp=ee(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3600,linux:{primary:0}}})),o.CursorColumnSelectPageUp=ee(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3595,linux:{primary:0}}}));class n extends t{constructor(C){super(C),this._isPaged=C.isPaged}_getColumnSelectResult(C,w,S,k){return Xc.columnSelectDown(C.cursorConfig,C,S,this._isPaged)}}o.CursorColumnSelectDown=ee(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3602,linux:{primary:0}}})),o.CursorColumnSelectPageDown=ee(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends ti{constructor(){super({id:"cursorMove",precondition:void 0,description:yv.description})}runCoreEditorCommand(C,w){const S=yv.parse(w);!S||this._runCursorMove(C,w.source,S)}_runCursorMove(C,w,S){C.model.pushStackElement(),C.setCursorStates(w,3,s._move(C,C.getCursorStates(),S)),C.revealPrimaryCursor(w,!0)}static _move(C,w,S){const k=S.select,x=S.value;switch(S.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Wi.simpleMove(C,w,S.direction,k,x,S.unit);case 11:case 13:case 12:case 14:return Wi.viewportMove(C,w,S.direction,k,x);default:return null}}}o.CursorMoveImpl=s,o.CursorMove=ee(new s);class r extends ti{constructor(C){super(C),this._staticArgs=C.args}runCoreEditorCommand(C,w){let S=this._staticArgs;this._staticArgs.value===-1&&(S={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:w.pageSize||C.cursorConfig.pageSize}),C.model.pushStackElement(),C.setCursorStates(w.source,3,Wi.simpleMove(C,C.getCursorStates(),S.direction,S.select,S.value,S.unit)),C.revealPrimaryCursor(w.source,!0)}}o.CursorLeft=ee(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),o.CursorLeftSelect=ee(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1039}})),o.CursorRight=ee(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),o.CursorRightSelect=ee(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1041}})),o.CursorUp=ee(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),o.CursorUpSelect=ee(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),o.CursorPageUp=ee(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:11}})),o.CursorPageUpSelect=ee(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1035}})),o.CursorDown=ee(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),o.CursorDownSelect=ee(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),o.CursorPageDown=ee(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:12}})),o.CursorPageDownSelect=ee(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1036}})),o.CreateCursor=ee(new class extends ti{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(v,C){let w;C.wholeLine?w=Wi.line(v,v.getPrimaryCursorState(),!1,C.position,C.viewPosition):w=Wi.moveTo(v,v.getPrimaryCursorState(),!1,C.position,C.viewPosition);const S=v.getCursorStates();if(S.length>1){const k=w.modelState?w.modelState.position:null,x=w.viewState?w.viewState.position:null;for(let y=0,D=S.length;yx&&(k=x);const y=new L(k,1,k,v.model.getLineMaxColumn(k));let D=0;if(w.at)switch(w.at){case Cu.RawAtArgument.Top:D=3;break;case Cu.RawAtArgument.Center:D=1;break;case Cu.RawAtArgument.Bottom:D=4;break}const I=v.coordinatesConverter.convertModelRangeToViewRange(y);v.revealRange(C.source,!1,I,D,0)}}),o.SelectAll=new class extends pD{constructor(){super(gz)}runDOMCommand(){Ls&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(v,C,w){const S=C._getViewModel();!S||this.runCoreEditorCommand(S,w)}runCoreEditorCommand(v,C){v.model.pushStackElement(),v.setCursorStates("keyboard",3,[Wi.selectAll(v,v.getPrimaryCursorState())])}},o.SetSelection=ee(new class extends ti{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(v,C){v.model.pushStackElement(),v.setCursorStates(C.source,3,[$e.fromModelSelection(C.selection)])}})})(Ei||(Ei={}));const Sj=se.and(N.textInputFocus,N.columnSelection);function Gg(o,e){as.registerKeybindingRule({id:o,primary:e,when:Sj,weight:rt+1})}Gg(Ei.CursorColumnSelectLeft.id,1039);Gg(Ei.CursorColumnSelectRight.id,1041);Gg(Ei.CursorColumnSelectUp.id,1040);Gg(Ei.CursorColumnSelectPageUp.id,1035);Gg(Ei.CursorColumnSelectDown.id,1042);Gg(Ei.CursorColumnSelectPageDown.id,1036);function G2(o){return o.register(),o}var Wu;(function(o){class e extends xi{runEditorCommand(i,n,s){const r=n._getViewModel();!r||this.runCoreEditingCommand(n,r,s||{})}}o.CoreEditingCommand=e,o.LineBreakInsert=ee(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:N.writable,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Pt.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),o.Outdent=ee(new class extends e{constructor(){super({id:"outdent",precondition:N.writable,kbOpts:{weight:rt,kbExpr:se.and(N.editorTextFocus,N.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Pt.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.Tab=ee(new class extends e{constructor(){super({id:"tab",precondition:N.writable,kbOpts:{weight:rt,kbExpr:se.and(N.editorTextFocus,N.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Pt.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.DeleteLeft=ee(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,i,n){const[s,r]=Vd.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(2)}}),o.DeleteRight=ee(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:rt,kbExpr:N.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,i,n){const[s,r]=Vd.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(3)}}),o.Undo=new class extends pD{constructor(){super(w4)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(83)===!0))return i.getModel().undo()}},o.Redo=new class extends pD{constructor(){super(S4)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(83)===!0))return i.getModel().redo()}}})(Wu||(Wu={}));class Z2 extends c1{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(ct).getFocusedCodeEditor();!i||i.trigger("keyboard",this._handlerId,t)}}function _h(o,e){G2(new Z2("default:"+o,o)),G2(new Z2(o,o,e))}_h("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});_h("replacePreviousChar");_h("compositionType");_h("compositionStart");_h("compositionEnd");_h("paste");_h("cut");class yj{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ei.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Ei.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Ei.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ei.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ei.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Ei.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Ei.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Ei.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Ei.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Ei.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Ei.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Ei.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Ei.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Ei.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class w1{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return w1.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}var gS;class Q4{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,r=0;for(let l=i;l<=n;l++){const c=l-this._rendLineNumberStart;e<=l&&l<=t&&(r===0?(s=c,r=1):r++)}if(e=n&&a<=s&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(this.getCount()===0)return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const r=[];for(let h=0;hi)continue;const l=Math.max(t,a.fromLineNumber),c=Math.min(i,a.toLineNumber);for(let d=l;d<=c;d++){const h=d-this._rendLineNumberStart;this._lines[h].onTokensChanged(),n=!0}}return n}}class X4{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new Q4(()=>this._host.createVisibleLine())}_createDomNode(){const e=Je(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(133)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){const r=t,a=Math.min(i,s.rendLineNumberStart-1);r<=a&&(this._insertLinesBefore(s,r,a,n,t),s.linesLength+=a-r+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,r),s.linesLength-=r)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const r=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-r+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const r=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){const c=r+l;a[l].layoutLine(c,n[c-s])}}_insertLinesBefore(e,t,i,n,s){const r=[];let a=0;for(let l=t;l<=i;l++)r[a++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;a--){const l=e.lines[a];n[a]&&(l.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Ta._ttPolicy&&(t=Ta._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;so});Ta._sb=nc(1e5);class J4 extends Is{constructor(e){super(e),this._visibleLines=new X4(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ei.shouldRender());for(let i=0,n=t.length;i'),n.appendASCIIString(s),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Dj extends J4{constructor(e){super(e);const i=this._context.configuration.options.get(133);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(133);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class kj extends J4{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(133);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),an(this.domNode,t.get(46))}onConfigurationChanged(e){const t=this._context.configuration.options;an(this.domNode,t.get(46));const i=t.get(133);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class yf{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class xj extends Is{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Je(document.createElement("div")),qr.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Je(document.createElement("div")),qr.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new Ij(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n){this._widgets[e.getId()].setPosition(t,i,n),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class Ij{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Je(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(133);this._fixedOverflowWidgets=n.get(38),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(61),this._range=null,this._viewRange=null,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(61),e.hasChanged(133)){const i=t.get(133);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range,this._affinity)}_setPosition(e,t){var i;if(this._range=e,this._viewRange=null,this._affinity=t,this._range){const n=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(n.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(n.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(n,(i=this._affinity)!==null&&i!==void 0?i:void 0))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t,i){this._setPosition(e,i),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n,s){const r=e.top,a=r,l=t.top+this._lineHeight,c=s.viewportHeight-l,d=r-n,h=a>=n,u=l,g=c>=n;let f=e.left,_=t.left;return f+i>s.scrollLeft+s.viewportWidth&&(f=s.scrollLeft+s.viewportWidth-i),_+i>s.scrollLeft+s.viewportWidth&&(_=s.scrollLeft+s.viewportWidth-i),fr){const l=a-(r-n);a-=l,i-=l}if(a=b,w=d+n<=h.height-v;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(c,b),aboveLeft:g,fitsBelow:w,belowTop:d,belowLeft:_}:{fitsAbove:C,aboveTop:r,aboveLeft:u,fitsBelow:w,belowTop:a,belowLeft:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new yf(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let i=t[0],n=t[0];for(const h of t)h.lineNumbern.lineNumber&&(n=h);let s=1073741824;for(const h of i.ranges)h.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&fS(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&fS(this._actual.afterRender,this._actual,this._renderData.position)}}function fS(o,e,...t){try{return o.call(e,...t)}catch{return null}}class eF extends qg{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._renderLineHighlight=t.get(87),this._renderLineHighlightOnlyWhenFocus=t.get(88),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new oe(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(n=>n.positionLineNumber);t.sort((n,s)=>n-s),Ss(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every(n=>n.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._lineHeight=t.get(61),this._renderLineHighlight=t.get(87),this._renderLineHighlightOnlyWhenFocus=t.get(88),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let r=0;const a=[];for(let l=i;l<=n;l++){const c=l-i;for(;r=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Ej extends eF{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class Nj extends eF{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Et((o,e)=>{const t=o.getColor(W4);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||o.defines(j2)){const i=o.getColor(j2);i&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),cn(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class Tj extends qg{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;const d=l.options.className,h=c.options.className;return dh?1:L.compareRangesUsingStarts(l.range,c.range)});const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=r;l++){const c=l-s;a[c]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',h=Math.max(c.range.startLineNumber,s),u=Math.min(c.range.endLineNumber,r);for(let g=h;g<=u;g++){const f=g-s;i[f]+=d}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber;let r=null,a=!1,l=null;for(let c=0,d=t.length;c';a[u]+=b}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class yo extends H{onclick(e,t){this._register(G(e,ae.CLICK,i=>t(new Mr(i))))}onmousedown(e,t){this._register(G(e,ae.MOUSE_DOWN,i=>t(new Mr(i))))}onmouseover(e,t){this._register(G(e,ae.MOUSE_OVER,i=>t(new Mr(i))))}onmouseleave(e,t){this._register(G(e,ae.MOUSE_LEAVE,i=>t(new Mr(i))))}onkeydown(e,t){this._register(G(e,ae.KEY_DOWN,i=>t(new Rt(i))))}onkeyup(e,t){this._register(G(e,ae.KEY_UP,i=>t(new Rt(i))))}oninput(e,t){this._register(G(e,ae.INPUT,t))}onblur(e,t){this._register(G(e,ae.BLUR,t))}onfocus(e,t){this._register(G(e,ae.FOCUS,t))}ignoreGesture(e){ft.ignoreTarget(e)}}const ug=11;class Aj extends yo{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=ug+"px",this.domNode.style.height=ug+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new jg),this._register(ki(this.bgDomNode,ae.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(ki(this.domNode,ae.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new r_),this._pointerdownScheduleRepeatTimer=this._register(new xs)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class Mj extends H{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new xs)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}const Rj=140;class tF extends yo{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Mj(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new jg),this._shouldRender=!0,this.domNode=Je(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(G(this.domNode.domNode,ae.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){const t=this._register(new Aj(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Je(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(G(this.slider.domNode,ae.POINTER_DOWN,s=>{s.button===0&&(s.preventDefault(),this._sliderPointerDown(s))})),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){!this._shouldRender||(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{const s=on(this.domNode.domNode);t=e.pageX-s.left,i=e.pageY-s.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>{const r=this._sliderOrthogonalPointerPosition(s),a=Math.abs(r-i);if(Yi&&a>Rj){this._setDesiredScrollPositionNow(n.getScrollPosition());return}const c=this._sliderPointerPosition(s)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const Oj=20;class nm{constructor(e,t,i,n,s,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new nm(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(Oj,Math.floor(i*a/n))),d=(a-c)/(n-i),h=s*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=nm._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new sg(null,1,0))}),this._createArrow({className:"scra",icon:m.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:r,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new sg(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class Fj extends tF{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new nm(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const r=(t.arrowSize-ug)/2,a=(t.verticalScrollbarSize-ug)/2;this._createArrow({className:"scra",icon:m.scrollbarButtonUp,top:r,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new sg(null,0,1))}),this._createArrow({className:"scra",icon:m.scrollbarButtonDown,top:void 0,left:a,bottom:r,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new sg(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class Dv{constructor(e,t,i,n,s,r,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,i=i|0,n=n|0,s=s|0,r=r|0,a=a|0),this.rawScrollLeft=n,this.rawScrollTop=a,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),a+s>r&&(a=r-s),a<0&&(a=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=r,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new Dv(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Dv(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:r,scrollHeightChanged:a,scrollTopChanged:l}}}class f_ extends H{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new R),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Dv(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),(i=this._smoothScrolling)===null||i===void 0||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new sm(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=sm.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class Y2{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function pS(o,e){const t=e-o;return function(i){return o+t*Vj(i)}}function Bj(o,e,t){return function(i){return i2.5*i){let s,r;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}mD.INSTANCE=new mD;class fE extends yo{constructor(e,t,i){super(),this._onScroll=this._register(new R),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new R),e.style.overflow="hidden",this._options=Uj(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Fj(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new Pj(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Je(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Je(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Je(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,s=>this._onMouseOver(s)),this.onmouseleave(this._listenOnDomNode,s=>this._onMouseLeave(s)),this._hideTimeout=this._register(new xs),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=nt(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Ge&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=nt(this._mouseWheelToDispose),e)){const i=n=>{this._onMouseWheel(new sg(n))};this._mouseWheelToDispose.push(G(this._listenOnDomNode,ae.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){const t=mD.INSTANCE;{const s=window.devicePixelRatio/_P();Yi||dn?t.accept(Date.now(),e.deltaX/s,e.deltaY/s):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(s)>=Math.abs(r)?r=0:s=0),this._options.flipAxes&&([s,r]=[r,s]);const a=!Ge&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!r&&(r=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(r=r*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(s){const d=Q2*s,h=l.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(c,h)}if(r){const d=Q2*r,h=l.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(c,h)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!!this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Hj)}}class iF extends fE{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new f_({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>Jo(n)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class pE extends fE{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class p_ extends fE{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new f_({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>Jo(n)});super(e,t,i),this._register(i),this._element=e,this.onScroll(n=>{n.scrollTopChanged&&(this._element.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this._element.scrollLeft=n.scrollLeft)}),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function Uj(o){const e={lazyRender:typeof o.lazyRender<"u"?o.lazyRender:!1,className:typeof o.className<"u"?o.className:"",useShadows:typeof o.useShadows<"u"?o.useShadows:!0,handleMouseWheel:typeof o.handleMouseWheel<"u"?o.handleMouseWheel:!0,flipAxes:typeof o.flipAxes<"u"?o.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof o.consumeMouseWheelIfScrollbarIsNeeded<"u"?o.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof o.alwaysConsumeMouseWheel<"u"?o.alwaysConsumeMouseWheel:!1,scrollYToX:typeof o.scrollYToX<"u"?o.scrollYToX:!1,mouseWheelScrollSensitivity:typeof o.mouseWheelScrollSensitivity<"u"?o.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof o.fastScrollSensitivity<"u"?o.fastScrollSensitivity:5,scrollPredominantAxis:typeof o.scrollPredominantAxis<"u"?o.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof o.mouseWheelSmoothScroll<"u"?o.mouseWheelSmoothScroll:!0,arrowSize:typeof o.arrowSize<"u"?o.arrowSize:11,listenOnDomNode:typeof o.listenOnDomNode<"u"?o.listenOnDomNode:null,horizontal:typeof o.horizontal<"u"?o.horizontal:1,horizontalScrollbarSize:typeof o.horizontalScrollbarSize<"u"?o.horizontalScrollbarSize:10,horizontalSliderSize:typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:0,horizontalHasArrows:typeof o.horizontalHasArrows<"u"?o.horizontalHasArrows:!1,vertical:typeof o.vertical<"u"?o.vertical:1,verticalScrollbarSize:typeof o.verticalScrollbarSize<"u"?o.verticalScrollbarSize:10,verticalHasArrows:typeof o.verticalHasArrows<"u"?o.verticalHasArrows:!1,verticalSliderSize:typeof o.verticalSliderSize<"u"?o.verticalSliderSize:0,scrollByPage:typeof o.scrollByPage<"u"?o.scrollByPage:!1};return e.horizontalSliderSize=typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof o.verticalSliderSize<"u"?o.verticalSliderSize:e.verticalScrollbarSize,Ge&&(e.className+=" mac"),e}class $j extends Is{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,r=s.get(94),a=s.get(69),l=s.get(36),c=s.get(97),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+fv(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new pE(t.domNode,d,this._context.viewLayout.getScrollable())),qr.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Je(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(u,g,f)=>{const _={};if(g){const b=u.scrollTop;b&&(_.scrollTop=this._context.viewLayout.getCurrentScrollTop()+b,u.scrollTop=0)}if(f){const b=u.scrollLeft;b&&(_.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+b,u.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(_,1)};this._register(G(i.domNode,"scroll",u=>h(i.domNode,!0,!0))),this._register(G(t.domNode,"scroll",u=>h(t.domNode,!0,!1))),this._register(G(n.domNode,"scroll",u=>h(n.domNode,!0,!1))),this._register(G(this.scrollbarDomNode.domNode,"scroll",u=>h(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(133);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(67).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}onConfigurationChanged(e){if(e.hasChanged(94)||e.hasChanged(69)||e.hasChanged(36)){const t=this._context.configuration.options,i=t.get(94),n=t.get(69),s=t.get(36),r=t.get(97),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(a)}return e.hasChanged(133)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+fv(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}Et((o,e)=>{const t=o.getColor(Kg);t&&e.addRule(` .monaco-scrollable-element > .shadow.top { box-shadow: ${t} 0 6px 6px -6px inset; } @@ -74,18 +74,18 @@ var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,config .monaco-scrollable-element > .scrollbar > .slider.active { background: ${s}; } - `)});class kv{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class mE extends qg{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=[]}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className',c=[];for(let d=t;d<=i;d++){const h=d-t,u=n[h];u.length===0?c[h]="":c[h]='
=this._renderResult.length?"":this._renderResult[i]}}class n5 extends H{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function S1(o,e){let t=0,i=0;const n=o.length;for(;in)throw new Error("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(s&&s.offSide);let a=-2,l=-1,c=-2,d=-1;const h=y=>{if(a!==-1&&(a===-2||a>y-1)){a=-1,l=-1;for(let D=y-2;D>=0;D--){const I=this._computeIndentLevel(D);if(I>=0){a=D,l=I;break}}}if(c===-2){c=-1,d=-1;for(let D=y;D=0){c=D,d=I;break}}}};let u=-2,g=-1,f=-2,_=-1;const b=y=>{if(u===-2){u=-1,g=-1;for(let D=y-2;D>=0;D--){const I=this._computeIndentLevel(D);if(I>=0){u=D,g=I;break}}}if(f!==-1&&(f===-2||f=0){f=D,_=I;break}}}};let v=0,C=!0,w=0,S=!0,k=0,x=0;for(let y=0;C||S;y++){const D=e-y,I=e+y;y>1&&(D<1||D1&&(I>n||I>i)&&(S=!1),y>5e4&&(C=!1,S=!1);let O=-1;if(C&&D>=1){const z=this._computeIndentLevel(D-1);z>=0?(c=D-1,d=z,O=Math.ceil(z/this.textModel.getOptions().indentSize)):(h(D),O=this._getIndentLevelForWhitespaceLine(r,l,d))}let F=-1;if(S&&I<=n){const z=this._computeIndentLevel(I-1);z>=0?(u=I-1,g=z,F=Math.ceil(z/this.textModel.getOptions().indentSize)):(b(I),F=this._getIndentLevelForWhitespaceLine(r,g,_))}if(y===0){x=O;continue}if(y===1){if(I<=n&&F>=0&&x+1===F){C=!1,v=I,w=I,k=F;continue}if(D>=1&&O>=0&&O-1===x){S=!1,v=D,w=D,k=O;continue}if(v=e,w=e,k=x,k===0)return{startLineNumber:v,endLineNumber:w,indent:k}}C&&(O>=k?v=D:C=!1),S&&(F>=k?w=I:S=!1)}return{startLineNumber:v,endLineNumber:w,indent:k}}getLinesBracketGuides(e,t,i,n){var s;const r=[];for(let u=e;u<=t;u++)r.push([]);const a=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new L(e,1,t,this.textModel.getLineMaxColumn(t)));let c;if(i&&l.length>0){const u=(e<=i.lineNumber&&i.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(L.fromPositions(i))).filter(g=>L.strictContainsPosition(g.range,i));c=(s=j0(u,g=>a))===null||s===void 0?void 0:s.range}const d=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,h=new s5;for(const u of l){if(!u.closingBracketRange)continue;const g=c&&u.range.equalsRange(c);if(!g&&!n.includeInactive)continue;const f=h.getInlineClassName(u.nestingLevel,u.nestingLevelOfEqualBracketType,d)+(n.highlightActive&&g?" "+h.activeClassName:""),_=u.openingBracketRange.getStartPosition(),b=u.closingBracketRange.getStartPosition(),v=n.horizontalGuides===bd.Enabled||n.horizontalGuides===bd.EnabledForActive&&g;if(u.range.startLineNumber===u.range.endLineNumber){v&&r[u.range.startLineNumber-e].push(new hd(-1,u.openingBracketRange.getEndPosition().column,f,new up(!1,b.column),-1,-1));continue}const C=this.getVisibleColumnFromPosition(b),w=this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()),S=Math.min(w,C,u.minVisibleColumnIndentation+1);let k=!1;kn(this.textModel.getLineContent(u.closingBracketRange.startLineNumber))=e&&w>S&&r[_.lineNumber-e].push(new hd(S,-1,f,new up(!1,_.column),-1,-1)),b.lineNumber<=t&&C>S&&r[b.lineNumber-e].push(new hd(S,-1,f,new up(!k,b.column),-1,-1)))}for(const u of r)u.sort((g,f)=>g.visibleColumn-f.visibleColumn);return r}getVisibleColumnFromPosition(e){return Ci.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(s&&s.offSide),a=new Array(t-e+1);let l=-2,c=-1,d=-2,h=-1;for(let u=e;u<=t;u++){const g=u-e,f=this._computeIndentLevel(u-1);if(f>=0){l=u-1,c=f,a[g]=Math.ceil(f/n.indentSize);continue}if(l===-2){l=-1,c=-1;for(let _=u-2;_>=0;_--){const b=this._computeIndentLevel(_);if(b>=0){l=_,c=b;break}}}if(d!==-1&&(d===-2||d=0){d=_,h=b;break}}}a[g]=this._getIndentLevelForWhitespaceLine(r,c,h)}return a}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return t===-1||i===-1?0:tl||this._maxIndentLeft>0&&w>this._maxIndentLeft)break;const S=C.horizontalLine?C.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",k=C.horizontalLine?((s=(n=e.visibleRangeForPosition(new B(g,C.horizontalLine.endColumn)))===null||n===void 0?void 0:n.left)!==null&&s!==void 0?s:w+this._spaceWidth)-w:this._spaceWidth;b+=`
`}u[f]=b}this._renderResult=u}getGuidesByLine(e,t,i){const n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?bd.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?bd.EnabledForActive:bd.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let r=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){const h=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=h.startLineNumber,a=h.endLineNumber,l=h.indent}const{indentSize:c}=this._context.viewModel.model.getOptions(),d=[];for(let h=e;h<=t;h++){const u=new Array;d.push(u);const g=n?n[h-e]:[],f=new Rp(g),_=s?s[h-e]:[];for(let b=1;b<=_;b++){const v=(b-1)*c+1,C=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||g.length===0)&&r<=h&&h<=a&&b===l;u.push(...f.takeWhile(S=>S.visibleColumn!0)||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ub(o){if(!(o&&o.isTransparent()))return o}Et((o,e)=>{const t=o.getColor(u_);t&&e.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${t} inset; }`);const i=o.getColor(g_)||t;i&&e.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=[{bracketColor:U4,guideColor:K$,guideColorActive:X$},{bracketColor:$4,guideColor:q$,guideColorActive:J$},{bracketColor:j4,guideColor:G$,guideColorActive:ej},{bracketColor:K4,guideColor:Z$,guideColorActive:tj},{bracketColor:q4,guideColor:Y$,guideColorActive:ij},{bracketColor:G4,guideColor:Q$,guideColorActive:nj}],s=new s5,r=n.map(a=>{var l,c;const d=o.getColor(a.bracketColor),h=o.getColor(a.guideColor),u=o.getColor(a.guideColorActive),g=ub((l=ub(h))!==null&&l!==void 0?l:d==null?void 0:d.transparent(.3)),f=ub((c=ub(u))!==null&&c!==void 0?c:d);if(!(!g||!f))return{guideColor:g,guideColorActive:f}}).filter(X8);if(r.length>0){for(let a=0;a<30;a++){const l=r[a%r.length];e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});class Gj{constructor(){this._currentVisibleRange=new L(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Zj{constructor(e,t,i,n,s,r,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Yj{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new mt(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new Gj,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Ir(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(134)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(46),n=t.get(134),s=t.get(133);return this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(91),this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),an(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(133)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new z2(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Zj(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Yj(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new B(n,1);const s=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const l=this._context.viewModel.getLineMinColumn(n);return ai?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=L.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let r=0;const a=new H2(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new B(n.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let h=n.startLineNumber;h<=n.endLineNumber;h++){if(hd)continue;const u=h===n.startLineNumber?n.startColumn:1,g=h===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(h),f=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h,u,g,a);if(!!f){if(t&&hthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new H2(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new c$(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let r=t;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth())}return s&&t===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const r=this._visibleLines.getVisibleLine(s);if(r.needsMonospaceFontCheck()){const a=r.getWidth();a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),dn&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let _=s[0].startLineNumber,b=s[0].endLineNumber;for(let v=1,C=s.length;vl){if(!d)return-1;f=h}else if(r===5||r===6)if(r===6&&a<=h&&u<=c)f=a;else{const _=Math.max(5*this._lineHeight,l*.2),b=h-_,v=u-l;f=Math.max(v,b)}else if(r===1||r===2)if(r===2&&a<=h&&u<=c)f=a;else{const _=(h+u)/2;f=Math.max(0,_-l/2)}else f=this._computeMinimumScrolling(a,c,h,u,r===3,r===4);return f}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let s=1073741824,r=0;if(e.type==="range"){const l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;for(const c of l.ranges)s=Math.min(s,Math.round(c.left)),r=Math.max(r,Math.round(c.left+c.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const c=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!c)return null;for(const d of c.ranges)s=Math.min(s,Math.round(d.left)),r=Math.max(r,Math.round(d.left+d.width))}return e.minimalReveal||(s=Math.max(0,s-y1.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),e.type==="selections"&&r-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,s,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,s,r){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,r=!!r;const a=t-e;if(n-it)return Math.max(0,n-a)}else return i;return e}}y1.HORIZONTAL_EXTRA_PX=30;class Qj extends mE{constructor(e){super(),this._context=e;const i=this._context.configuration.options.get(133);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(133);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=t.length;s
',l=[];for(let c=t;c<=i;c++){const d=c-t,h=n[d];let u="";for(let g=0,f=h.length;g';s[a]=c}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class Us{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Us._clamp(e),this.g=Us._clamp(t),this.b=Us._clamp(i),this.a=Us._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}Us.Empty=new Us(0,0,0,0);class m_ extends H{constructor(){super(),this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Wt.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new m_),this._INSTANCE}_updateColorMap(){const e=Wt.getColorMap();if(!e){this._colors=[Us.Empty],this._backgroundIsLight=!0;return}this._colors=[Us.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}m_._INSTANCE=null;const Jj=(()=>{const o=[];for(let e=32;e<=126;e++)o.push(e);return o.push(65533),o})(),eK=(o,e)=>(o-=32,o<0||o>96?e<=2?(o+96)%96:96-1:o);class om{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=om.soften(e,12/15),this.charDataLight=om.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+f>e.height){console.warn("bad render request outside image data");return}const _=d?this.charDataLight:this.charDataNormal,b=eK(n,c),v=e.width*4,C=a.r,w=a.g,S=a.b,k=s.r-C,x=s.g-w,y=s.b-S,D=Math.max(r,l),I=e.data;let O=b*u*g,F=i*v+t*4;for(let z=0;ze.width||i+h>e.height){console.warn("bad render request outside image data");return}const u=e.width*4,g=.5*(s/255),f=r.r,_=r.g,b=r.b,v=n.r-f,C=n.g-_,w=n.b-b,S=f+v*g,k=_+C*g,x=b+w*g,y=Math.max(s,a),D=e.data;let I=i*u+t*4;for(let O=0;O{const e=new Uint8ClampedArray(o.length/2);for(let t=0;t>1]=X2[o[t]]<<4|X2[o[t+1]]&15;return e},eA={1:Xa(()=>J2("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Xa(()=>J2("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class gp{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return eA[e]?i=new om(eA[e](),e):i=gp.createFromSampleData(gp.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height=`${16}px`,t.height=16,t.width=96*10,t.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold ${16}px ${e}`,i.textBaseline="middle";let n=0;for(const s of Jj)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=gp._downsample(e,t);return new om(n,t)}static _downsampleChar(e,t,i,n,s){const r=1*s,a=2*s;let l=n,c=0;for(let d=0;d0){const c=255/l;for(let d=0;dgp.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=rm._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=rm._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(UU);return i?new Us(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor($U);return t?Us._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class fp{constructor(e,t,i,n,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,s,r,a,l,c,d,h){const u=e.pixelRatio,g=e.minimapLineHeight,f=Math.floor(e.canvasInnerHeight/g),_=e.lineHeight;if(e.minimapHeightIsEditorHeight){const k=l*e.lineHeight+(e.scrollBeyondLastLine?s-e.lineHeight:0),x=Math.max(1,Math.floor(s*s/k)),y=Math.max(0,e.minimapHeight-x),D=y/(d-s),I=c*D,O=y>0,F=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new fp(c,d,O,D,I,x,1,Math.min(a,F))}let b;if(r&&i!==a){const k=i-t+1;b=Math.floor(k*g/u)}else{const k=s/_;b=Math.floor(k*g/u)}let v;e.scrollBeyondLastLine?v=(a-1)*g/u:v=Math.max(0,a*g/u-b),v=Math.min(e.minimapHeight-b,v);const C=v/(d-s),w=c*C;let S=0;if(e.scrollBeyondLastLine&&(S=s/_-1),f>=a+S){const x=a,y=v>0;return new fp(c,d,y,C,w,b,1,x)}else{let k=Math.max(1,Math.floor(t-w*u/g));h&&h.scrollHeight===d&&(h.scrollTop>c&&(k=Math.min(k,h.startLineNumber)),h.scrollTopxv.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n1){for(let S=0,k=a-1;S0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=am.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,r=t-e+1;s{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.button===0&&this._lastRenderData){const c=on(this._slider.domNode),d=c.top+c.height/2;this._startSliderDragging(i,d,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,r=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY;let l=Math.floor(r/s)+this._lastRenderData.renderedLayout.startLineNumber;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new jg,this._sliderPointerDownListener=ki(this._slider.domNode,ae.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ft.addTarget(this._domNode.domNode),this._sliderTouchStartListener=G(this._domNode.domNode,xt.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=G(this._domNode.domNode,xt.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=ki(this._domNode.domNode,xt.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(r,a)=>{const l=Math.abs(a-n);if(Yi&&l>tK){this._model.setScrollTop(i.scrollTop);return}const c=r-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(c))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>s(r.pageY,r.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new _E(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(B2),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=fp.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(L.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((u,g)=>(u.options.zIndex||0)-(g.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,r=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,n,s);const d=new iA(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,d,e,r),this._renderDecorationsLineHighlights(c,i,d,e,r);const h=new iA(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,h,e,r,l,a,n),this._renderDecorationsHighlights(c,i,h,e,r,l,a,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,a=0;for(const l of t){const c=Math.max(n.startLineNumber,l.startLineNumber),d=Math.min(n.endLineNumber,l.endLineNumber);if(c>d)continue;for(let g=c;g<=d;g++)i.set(g,!0);const h=(c-n.startLineNumber)*s,u=(d-n.startLineNumber)*s+s;a>=h||(a>r&&e.fillRect(wl,r,e.canvas.width,a-r),r=h),a=u}a>r&&e.fillRect(wl,r,e.canvas.width,a-r)}_renderDecorationsLineHighlights(e,t,i,n,s){const r=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],c=l.options.minimap;if(!c||c.position!==js.Inline)continue;const d=Math.max(n.startLineNumber,l.range.startLineNumber),h=Math.min(n.endLineNumber,l.range.endLineNumber);if(d>h)continue;const u=c.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=r.get(u.toString());g||(g=u.transparent(.5).toString(),r.set(u.toString(),g)),e.fillStyle=g;for(let f=d;f<=h;f++){if(i.has(f))continue;i.set(f,!0);const _=(d-n.startLineNumber)*s;e.fillRect(wl,_,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,r,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of t){const d=Math.max(n.startLineNumber,c.startLineNumber),h=Math.min(n.endLineNumber,c.endLineNumber);if(!(d>h))for(let u=d;u<=h;u++)this.renderDecorationOnLine(e,i,c,this._selectionColor,n,u,s,s,r,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,r,a,l){for(const c of t){const d=c.options.minimap;if(!d)continue;const h=Math.max(n.startLineNumber,c.range.startLineNumber),u=Math.min(n.endLineNumber,c.range.endLineNumber);if(h>u)continue;const g=d.getColor(this._theme.value);if(!(!g||g.isTransparent()))for(let f=h;f<=u;f++)switch(d.position){case js.Inline:this.renderDecorationOnLine(e,i,c.range,g,n,f,s,s,r,a,l);continue;case js.Gutter:{const _=(f-n.startLineNumber)*s,b=2;this.renderDecoration(e,g,b,_,iK,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,r,a,l,c,d,h){const u=(r-s.startLineNumber)*l;if(u+a<0||u>this._model.options.canvasInnerHeight)return;const{startLineNumber:g,endLineNumber:f}=i,_=g===r?i.startColumn:1,b=f===r?i.endColumn:this._model.getLineMaxColumn(r),v=this.getXOffsetForPosition(t,r,_,c,d,h),C=this.getXOffsetForPosition(t,r,b,c,d,h);this.renderDecoration(e,n,v,u,C-v,a)}getXOffsetForPosition(e,t,i,n,s,r){if(i===1)return wl;if((i-1)*s>=r)return r;let l=e.get(t);if(!l){const c=this._model.getLineContent(t);l=[wl];let d=wl;for(let h=1;h=r){l[h]=r;break}l[h]=f,d=f}e.set(t,l)}return i-1k?Math.floor((n-k)/2):0,y=u.a/255,D=new Us(Math.round((u.r-h.r)*y+h.r),Math.round((u.g-h.g)*y+h.g),Math.round((u.b-h.b)*y+h.b),255);let I=0;const O=[];for(let he=0,Se=i-t+1;he=0&&OC)return;const z=b.charCodeAt(k);if(z===9){const j=u-(k+x)%u;x+=j-1,S+=j*r}else if(z===32)S+=r;else{const j=ic(z)?2:1;for(let re=0;reC)return}}}}}class iA{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}Et((o,e)=>{const t=o.getColor(jU);t&&e.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${t}; }`);const i=o.getColor(KU);i&&e.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${i}; }`);const n=o.getColor(qU);n&&e.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${n}; }`);const s=o.getColor(Kg);s&&e.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});class sK extends Is{constructor(e){super(e);const i=this._context.configuration.options.get(133);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=Je(document.createElement("div")),qr.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(133);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=Je(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?!1:(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(e.preference===null){t.setTop("");return}if(e.preference===0)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===1){const i=t.domNode.clientHeight;t.setTop(this._editorHeight-i-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===2&&(t.setTop(0),t.domNode.style.right="50%")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i=3){const s=Math.floor(n/3),r=Math.floor(n/3),a=n-s-r,l=e,c=l+s,d=l+s+a;return[[0,l,c,l,d,l,c,l],[0,s,a,s+a,r,s+a+r,a+r,s+a+r]]}else if(i===2){const s=Math.floor(n/2),r=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,r,s+r,s+r,s+r]]}else{const s=e,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class rK extends Is{constructor(e){super(e),this._domNode=Je(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Wt.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new oK(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(F=t-c),D=F-c,I=F+c}D>C+1||k!==b?(w!==0&&d.fillRect(h[b],v,u[b],C-v),b=k,v=D,C=I):I>C&&(C=I)}d.fillRect(h[b],v,u[b],C-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){const g=2*this._settings.pixelRatio|0,f=g/2|0,_=this._settings.x[7],b=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let v=-100,C=-100;for(let w=0,S=this._cursorPositions.length;wt&&(x=t-f);const y=x-f,D=y+g;y>C+1?(w!==0&&d.fillRect(_,v,b,C-v),v=y,C=D):D>C&&(C=D)}d.fillRect(_,v,b,C-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,t),d.stroke(),d.moveTo(0,0),d.lineTo(e,0),d.stroke())}}class nA{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class lm{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(_=i-b);const v=d.color;let C=this._color2Id[v];C||(C=++this._lastAssignedId,this._color2Id[v]=C,this._id2Color[C]=v);const w=new nA(_-b,_+b,C);d.setColorZone(w),a.push(w)}return this._colorZonesInvalid=!1,a.sort(nA.compare),a}}class lK extends h_{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Je(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new aK(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(61)),this._zoneManager.setPixelRatio(i.get(131)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(61)&&(this._zoneManager.setLineHeight(t.get(61)),this._render()),e.hasChanged(131)&&(this._zoneManager.setPixelRatio(t.get(131)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,r=0,a=0;for(const l of t){const c=l.colorId,d=l.from,h=l.to;c!==s?(e.fillRect(0,r,n,a-r),s=c,e.fillStyle=i[s],r=d,a=h):a>=d?a=Math.max(a,h):(e.fillRect(0,r,n,a-r),r=d,a=h)}e.fillRect(0,r,n,a-r)}}class cK extends Is{constructor(e){super(e),this.domNode=Je(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(93),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(93),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const a=Je(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),r--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const t=o.getColor(T$);t&&e.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${t} inset; }`)});class dK extends Is{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const i=this._context.configuration.options.get(94);this._useShadows=i.useShadows,this._domNode=Je(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(133);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(94);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Et((o,e)=>{const t=o.getColor(Kg);t&&e.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${t} 0 6px 6px -6px inset; }`)});class hK{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class uK{constructor(e,t){this.lineNumber=e,this.ranges=t}}function gK(o){return new hK(o)}function fK(o){return new uK(o.lineNumber,o.ranges.map(gK))}class Zt extends qg{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(61),this._roundedSelection=t.get(92),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(61),this._roundedSelection=t.get(92),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,r=null;if(i&&i.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!s&&c=0;c--)i[c].lineNumber===l&&(r=i[c].ranges[0]);s&&!s.startStyle&&(s=null),r&&!r.startStyle&&(r=null)}for(let a=0,l=t.length;a0){const f=t[a-1].ranges[0].left,_=t[a-1].ranges[0].left+t[a-1].ranges[0].width;gb(d-f)f&&(u.top=1),gb(h-_)'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=n[0].lineNumber,c=n[n.length-1].lineNumber;for(let d=0,h=n.length;d1,c)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([r,a])=>r+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Zt.SELECTION_CLASS_NAME="selected-text";Zt.SELECTION_TOP_LEFT="top-left-radius";Zt.SELECTION_BOTTOM_LEFT="bottom-left-radius";Zt.SELECTION_TOP_RIGHT="top-right-radius";Zt.SELECTION_BOTTOM_RIGHT="bottom-right-radius";Zt.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";Zt.ROUNDED_PIECE_WIDTH=10;Et((o,e)=>{const t=o.getColor(Wa);t&&e.addRule(`.monaco-editor .focused .selected-text { background-color: ${t}; }`);const i=o.getColor(sE);i&&e.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const n=o.getColor(jz);n&&!n.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function gb(o){return o<0?-o:o}class sA{constructor(e,t,i,n,s,r){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=s,this.textContentClassName=r}}class oA{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(46);this._cursorStyle=t.get(24),this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Je(document.createElement("div")),this._domNode.setClassName(`cursor ${_d}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),an(this._domNode,i),this._domNode.setDisplay("none"),this._position=new B(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(46);return this._cursorStyle=t.get(24),this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),an(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=EB(i,t-1);return[new B(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===Hi.Line||this._cursorStyle===Hi.LineThin){const u=e.visibleRangeForPosition(i);if(!u||u.outsideRenderedLine)return null;let g;this._cursorStyle===Hi.Line?(g=k2(this._lineCursorWidth>0?this._lineCursorWidth:2),g>2&&(t=n)):g=k2(1);let f=u.left;g>=2&&f>=1&&(f-=1);const _=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new sA(_,f,g,this._lineHeight,t,"")}const s=e.linesVisibleRangesForRange(new L(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!s||s.length===0)return null;const r=s[0];if(r.outsideRenderedLine||r.ranges.length===0)return null;const a=r.ranges[0],l=n===" "?this._typicalHalfwidthCharacterWidth:a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let c="";if(this._cursorStyle===Hi.Block){const u=this._context.viewModel.getViewLineData(i.lineNumber);t=n;const g=u.tokens.findTokenIndexAtOffset(i.column-1);c=u.tokens.getClassName(g)}let d=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return(this._cursorStyle===Hi.Underline||this._cursorStyle===Hi.UnderlineThin)&&(d+=this._lineHeight-2,h=2),new sA(d,a.left,l,h,t,c)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${_d} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class cm extends Is{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(83),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new oA(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Je(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new xs,this._cursorFlatBlinkInterval=new r_,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(83),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const i=this._secondaryCursors.length-t.length;for(let n=0;n{for(let n=0,s=e.ranges.length;n{this._isVisible?this._hide():this._show()},cm.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},cm.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Hi.Line:e+=" cursor-line-style";break;case Hi.Block:e+=" cursor-block-style";break;case Hi.Underline:e+=" cursor-underline-style";break;case Hi.LineThin:e+=" cursor-line-thin-style";break;case Hi.BlockOutline:e+=" cursor-block-outline-style";break;case Hi.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=o.getColor(V4);if(t){let i=o.getColor(E$);i||(i=t.opposite()),e.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${t}; }`),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${i}; }`),cn(o.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const mS=()=>{throw new Error("Invalid change accessor")};class pK extends Is{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Je(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Je(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let r=0,a=s.length;r{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{!s||(t=this._removeZone(i,s)||t)},layoutZone:s=>{!s||(t=this._layoutZone(i,s)||t)}};mK(e,n),n.addZone=mS,n.removeZone=mS,n.layoutZone=mS}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:Je(t.domNode),marginDomNode:t.marginDomNode?Je(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){Te(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){Te(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of t)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const s=Object.keys(this._zones);for(let r=0,a=s.length;r{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new p$(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new B(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const t=this._context.configuration.options.get(133);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(130)+" "+fv(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=n4(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){SK(()=>this._actualRender())}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!jI(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new vK(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new a$(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new B(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?w1.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new lK(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i;let n=e.position&&e.position.range||null;if(n===null){const r=e.position?e.position.position:null;r!==null&&(n=new L(r.lineNumber,r.column,r.lineNumber,r.column))}const s=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,n,s,(i=(t=e.position)===null||t===void 0?void 0:t.positionAffinity)!==null&&i!==void 0?i:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}function SK(o){try{return o()}catch(e){Te(e)}}class Ev{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Vi(new L(1,1,1,1),0,new B(1,1),0),new Vi(new L(1,1,1,1),0,new B(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){!this._trackSelection||(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new $e(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return oe.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),r=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,n,i,r),l=this._validatePositionWithCache(e,s,n,a);return i.equals(r)&&n.equals(a)&&s.equals(l)?t:new Vi(L.fromPositions(a,l),t.selectionStartLeftoverVisibleColumns+n.column-a.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=Ev._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),a=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new Vi(n,s,r,a)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Vi(n,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Vi(n,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new B(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new B(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new L(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Vi(r,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class rA{constructor(e){this.context=e,this.cursors=[new Ev(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return Y8(this.cursors,op(e=>e.viewState.position,B.compare)).viewState.position}getBottomMostViewPosition(){return UO(this.cursors,op(e=>e.viewState.position,B.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates($e.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const n=t-i;for(let s=0;s=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ii.selection,L.compareRangesUsingStarts));for(let i=0;ih&&_.index--;e.splice(h,1),t.splice(d,1),this._removeSecondaryCursor(h-1),i--}}}}class aA{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class yK{constructor(){this.changeType=1}}class er{constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}static applyInjectedText(e,t){if(!t||t.length===0)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new er(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new er(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}}class lA{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class LK{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class DK{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class kK{constructor(){this.changeType=5}}class Vu{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class WK{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class bE{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new bE(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class vE{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new vE(this.oldHasFocus,e.hasFocus)}}class CE{constructor(e,t,i,n,s,r,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=r,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new CE(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class VK{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class HK{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Nv{constructor(e,t,i,n,s,r,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=r,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s0){const e=this._cursors.getSelections();for(let t=0;tgg.MAX_CURSOR_COUNT&&(n=n.slice(0,gg.MAX_CURSOR_COUNT),s=!0);const r=pp.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,s,r){const a=this._cursors.getViewPositions();let l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=L.fromPositions(a[0],a[0]),e.emitViewEvent(new C0(t,i,l,c,n,s,r))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const s=$e.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,$e.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,$e.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const r=pp.from(this._model,this);if(r.equals(n))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new NK(l,a)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((c,d)=>!c.modelState.equals(n.cursorState[d].modelState))){const c=n?n.cursorState.map(h=>h.modelState.selection):null,d=n?n.modelVersionId:0;e.emitOutgoingEvent(new Nv(c,a,d,r.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=s.text.length-r[2].length-1,h=s.text.lastIndexOf(c,d-1);if(h===-1)return null;t.push([h,d])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(s)for(let h=0,u=s.length;h0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=pp.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){Te(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return cA.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new mp(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Pt.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s{const c=l.getPosition();return new oe(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,r,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Pt.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,r)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(Pt.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(Vd.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new An(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new An(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}gg.MAX_CURSOR_COUNT=1e4;class pp{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new pp(e.getVersionId(),t.getCursorStates())}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class ZK{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let r=0,a=n.trackedRanges.length;r0&&(r[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,r,c=>{const d=[];for(let g=0;gg.identifier.minor-f.identifier.minor,u=[];for(let g=0;g0?(d[g].sort(h),u[g]=t[g].computeCursorState(e.model,{getInverseEditOperations:()=>d[g],getTrackedSelection:f=>{const _=parseInt(f,10),b=e.model._getTrackedRange(e.trackedRanges[_]);return e.trackedRangesDirection[_]===0?new oe(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn):new oe(b.endLineNumber,b.endColumn,b.startLineNumber,b.startColumn)}})):u[g]=e.selectionsBefore[g];return u});a||(a=e.selectionsBefore);const l=[];for(const c in s)s.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,d)=>d-c);for(const c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{L.isEmpty(h)&&u===""||n.push({identifier:{major:t,minor:s++},range:h,text:u,forceMoveMarkers:g,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const d={addEditOperation:r,addTrackedEditOperation:(h,u,g)=>{a=!0,r(h,u,g)},trackSelection:(h,u)=>{const g=oe.liftSelection(h);let f;if(g.isEmpty())if(typeof u=="boolean")u?f=2:f=3;else{const v=e.model.getLineMaxColumn(g.startLineNumber);g.startColumn===v?f=2:f=3}else f=1;const _=e.trackedRanges.length,b=e.model._setTrackedRange(null,g,f);return e.trackedRanges[_]=b,e.trackedRangesDirection[_]=g.getDirection(),_.toString()}};try{i.getEditOperations(e.model,d)}catch(h){return Te(h),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-L.compareRangesUsingEnds(i.range,n.range));const t={};for(let i=1;is.identifier.major?r=n.identifier.major:r=s.identifier.major,t[r.toString()]=!0;for(let a=0;a0&&i--}}return t}}class YK{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class mp{constructor(e,t){this._original=mp._capture(e,t)}static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new YK(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}deduceOutcome(e,t){if(!this._original)return null;const i=mp._capture(e,t);if(!i||this._original.length!==i.length)return null;const n=[];for(let s=0,r=this._original.length;s=e}function Ph(o){return ii(o.lineNumber-1,o.column-1)}function ja(o,e){const t=o,i=Math.floor(t/ws),n=t-i*ws,s=e,r=Math.floor(s/ws),a=s-r*ws;return new L(i+1,n+1,r+1,a+1)}function nq(o){const e=jr(o);return ii(e.length-1,e[e.length-1].length)}class dA{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class sq{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(i=>wE.from(i))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):this.documentLength;return iq(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?ii(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):ii(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Zl(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?ii(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):ii(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(n===0){const r=1<0;)t=t.getChild(i-1);return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;nthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const s=this.lineTokens,r=s.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}const n=JK(e,t,this.lineIdx,this.lineCharOffset);return new Tl(n,0,-1,ui.getEmpty(),new eu(n))}}class dq{constructor(e,t){this.text=e,this._offset=mo,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+`| + `)});class kv{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class mE extends qg{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=[]}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className',c=[];for(let d=t;d<=i;d++){const h=d-t,u=n[h];u.length===0?c[h]="":c[h]='
=this._renderResult.length?"":this._renderResult[i]}}class nF extends H{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function S1(o,e){let t=0,i=0;const n=o.length;for(;in)throw new Error("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(s&&s.offSide);let a=-2,l=-1,c=-2,d=-1;const h=y=>{if(a!==-1&&(a===-2||a>y-1)){a=-1,l=-1;for(let D=y-2;D>=0;D--){const I=this._computeIndentLevel(D);if(I>=0){a=D,l=I;break}}}if(c===-2){c=-1,d=-1;for(let D=y;D=0){c=D,d=I;break}}}};let u=-2,g=-1,f=-2,_=-1;const b=y=>{if(u===-2){u=-1,g=-1;for(let D=y-2;D>=0;D--){const I=this._computeIndentLevel(D);if(I>=0){u=D,g=I;break}}}if(f!==-1&&(f===-2||f=0){f=D,_=I;break}}}};let v=0,C=!0,w=0,S=!0,k=0,x=0;for(let y=0;C||S;y++){const D=e-y,I=e+y;y>1&&(D<1||D1&&(I>n||I>i)&&(S=!1),y>5e4&&(C=!1,S=!1);let O=-1;if(C&&D>=1){const z=this._computeIndentLevel(D-1);z>=0?(c=D-1,d=z,O=Math.ceil(z/this.textModel.getOptions().indentSize)):(h(D),O=this._getIndentLevelForWhitespaceLine(r,l,d))}let F=-1;if(S&&I<=n){const z=this._computeIndentLevel(I-1);z>=0?(u=I-1,g=z,F=Math.ceil(z/this.textModel.getOptions().indentSize)):(b(I),F=this._getIndentLevelForWhitespaceLine(r,g,_))}if(y===0){x=O;continue}if(y===1){if(I<=n&&F>=0&&x+1===F){C=!1,v=I,w=I,k=F;continue}if(D>=1&&O>=0&&O-1===x){S=!1,v=D,w=D,k=O;continue}if(v=e,w=e,k=x,k===0)return{startLineNumber:v,endLineNumber:w,indent:k}}C&&(O>=k?v=D:C=!1),S&&(F>=k?w=I:S=!1)}return{startLineNumber:v,endLineNumber:w,indent:k}}getLinesBracketGuides(e,t,i,n){var s;const r=[];for(let u=e;u<=t;u++)r.push([]);const a=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new L(e,1,t,this.textModel.getLineMaxColumn(t)));let c;if(i&&l.length>0){const u=(e<=i.lineNumber&&i.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(L.fromPositions(i))).filter(g=>L.strictContainsPosition(g.range,i));c=(s=j0(u,g=>a))===null||s===void 0?void 0:s.range}const d=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,h=new sF;for(const u of l){if(!u.closingBracketRange)continue;const g=c&&u.range.equalsRange(c);if(!g&&!n.includeInactive)continue;const f=h.getInlineClassName(u.nestingLevel,u.nestingLevelOfEqualBracketType,d)+(n.highlightActive&&g?" "+h.activeClassName:""),_=u.openingBracketRange.getStartPosition(),b=u.closingBracketRange.getStartPosition(),v=n.horizontalGuides===bd.Enabled||n.horizontalGuides===bd.EnabledForActive&&g;if(u.range.startLineNumber===u.range.endLineNumber){v&&r[u.range.startLineNumber-e].push(new hd(-1,u.openingBracketRange.getEndPosition().column,f,new up(!1,b.column),-1,-1));continue}const C=this.getVisibleColumnFromPosition(b),w=this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()),S=Math.min(w,C,u.minVisibleColumnIndentation+1);let k=!1;kn(this.textModel.getLineContent(u.closingBracketRange.startLineNumber))=e&&w>S&&r[_.lineNumber-e].push(new hd(S,-1,f,new up(!1,_.column),-1,-1)),b.lineNumber<=t&&C>S&&r[b.lineNumber-e].push(new hd(S,-1,f,new up(!k,b.column),-1,-1)))}for(const u of r)u.sort((g,f)=>g.visibleColumn-f.visibleColumn);return r}getVisibleColumnFromPosition(e){return Ci.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(s&&s.offSide),a=new Array(t-e+1);let l=-2,c=-1,d=-2,h=-1;for(let u=e;u<=t;u++){const g=u-e,f=this._computeIndentLevel(u-1);if(f>=0){l=u-1,c=f,a[g]=Math.ceil(f/n.indentSize);continue}if(l===-2){l=-1,c=-1;for(let _=u-2;_>=0;_--){const b=this._computeIndentLevel(_);if(b>=0){l=_,c=b;break}}}if(d!==-1&&(d===-2||d=0){d=_,h=b;break}}}a[g]=this._getIndentLevelForWhitespaceLine(r,c,h)}return a}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return t===-1||i===-1?0:tl||this._maxIndentLeft>0&&w>this._maxIndentLeft)break;const S=C.horizontalLine?C.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",k=C.horizontalLine?((s=(n=e.visibleRangeForPosition(new B(g,C.horizontalLine.endColumn)))===null||n===void 0?void 0:n.left)!==null&&s!==void 0?s:w+this._spaceWidth)-w:this._spaceWidth;b+=`
`}u[f]=b}this._renderResult=u}getGuidesByLine(e,t,i){const n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?bd.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?bd.EnabledForActive:bd.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let r=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){const h=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=h.startLineNumber,a=h.endLineNumber,l=h.indent}const{indentSize:c}=this._context.viewModel.model.getOptions(),d=[];for(let h=e;h<=t;h++){const u=new Array;d.push(u);const g=n?n[h-e]:[],f=new Rp(g),_=s?s[h-e]:[];for(let b=1;b<=_;b++){const v=(b-1)*c+1,C=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||g.length===0)&&r<=h&&h<=a&&b===l;u.push(...f.takeWhile(S=>S.visibleColumn!0)||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ub(o){if(!(o&&o.isTransparent()))return o}Et((o,e)=>{const t=o.getColor(u_);t&&e.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${t} inset; }`);const i=o.getColor(g_)||t;i&&e.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=[{bracketColor:U4,guideColor:K$,guideColorActive:X$},{bracketColor:$4,guideColor:q$,guideColorActive:J$},{bracketColor:j4,guideColor:G$,guideColorActive:ej},{bracketColor:K4,guideColor:Z$,guideColorActive:tj},{bracketColor:q4,guideColor:Y$,guideColorActive:ij},{bracketColor:G4,guideColor:Q$,guideColorActive:nj}],s=new sF,r=n.map(a=>{var l,c;const d=o.getColor(a.bracketColor),h=o.getColor(a.guideColor),u=o.getColor(a.guideColorActive),g=ub((l=ub(h))!==null&&l!==void 0?l:d==null?void 0:d.transparent(.3)),f=ub((c=ub(u))!==null&&c!==void 0?c:d);if(!(!g||!f))return{guideColor:g,guideColorActive:f}}).filter(X8);if(r.length>0){for(let a=0;a<30;a++){const l=r[a%r.length];e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});class Gj{constructor(){this._currentVisibleRange=new L(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Zj{constructor(e,t,i,n,s,r,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Yj{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new mt(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new Gj,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Ir(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(134)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(46),n=t.get(134),s=t.get(133);return this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(91),this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),an(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(133)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new z2(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Zj(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Yj(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new B(n,1);const s=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const l=this._context.viewModel.getLineMinColumn(n);return ai?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=L.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let r=0;const a=new H2(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new B(n.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let h=n.startLineNumber;h<=n.endLineNumber;h++){if(hd)continue;const u=h===n.startLineNumber?n.startColumn:1,g=h===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(h),f=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h,u,g,a);if(!!f){if(t&&hthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new H2(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new c$(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let r=t;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth())}return s&&t===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const r=this._visibleLines.getVisibleLine(s);if(r.needsMonospaceFontCheck()){const a=r.getWidth();a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),dn&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let _=s[0].startLineNumber,b=s[0].endLineNumber;for(let v=1,C=s.length;vl){if(!d)return-1;f=h}else if(r===5||r===6)if(r===6&&a<=h&&u<=c)f=a;else{const _=Math.max(5*this._lineHeight,l*.2),b=h-_,v=u-l;f=Math.max(v,b)}else if(r===1||r===2)if(r===2&&a<=h&&u<=c)f=a;else{const _=(h+u)/2;f=Math.max(0,_-l/2)}else f=this._computeMinimumScrolling(a,c,h,u,r===3,r===4);return f}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let s=1073741824,r=0;if(e.type==="range"){const l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;for(const c of l.ranges)s=Math.min(s,Math.round(c.left)),r=Math.max(r,Math.round(c.left+c.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const c=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!c)return null;for(const d of c.ranges)s=Math.min(s,Math.round(d.left)),r=Math.max(r,Math.round(d.left+d.width))}return e.minimalReveal||(s=Math.max(0,s-y1.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),e.type==="selections"&&r-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,s,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,s,r){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,r=!!r;const a=t-e;if(n-it)return Math.max(0,n-a)}else return i;return e}}y1.HORIZONTAL_EXTRA_PX=30;class Qj extends mE{constructor(e){super(),this._context=e;const i=this._context.configuration.options.get(133);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(133);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=t.length;s
',l=[];for(let c=t;c<=i;c++){const d=c-t,h=n[d];let u="";for(let g=0,f=h.length;g';s[a]=c}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class Us{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Us._clamp(e),this.g=Us._clamp(t),this.b=Us._clamp(i),this.a=Us._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}Us.Empty=new Us(0,0,0,0);class m_ extends H{constructor(){super(),this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Wt.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new m_),this._INSTANCE}_updateColorMap(){const e=Wt.getColorMap();if(!e){this._colors=[Us.Empty],this._backgroundIsLight=!0;return}this._colors=[Us.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}m_._INSTANCE=null;const Jj=(()=>{const o=[];for(let e=32;e<=126;e++)o.push(e);return o.push(65533),o})(),eK=(o,e)=>(o-=32,o<0||o>96?e<=2?(o+96)%96:96-1:o);class om{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=om.soften(e,12/15),this.charDataLight=om.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+f>e.height){console.warn("bad render request outside image data");return}const _=d?this.charDataLight:this.charDataNormal,b=eK(n,c),v=e.width*4,C=a.r,w=a.g,S=a.b,k=s.r-C,x=s.g-w,y=s.b-S,D=Math.max(r,l),I=e.data;let O=b*u*g,F=i*v+t*4;for(let z=0;ze.width||i+h>e.height){console.warn("bad render request outside image data");return}const u=e.width*4,g=.5*(s/255),f=r.r,_=r.g,b=r.b,v=n.r-f,C=n.g-_,w=n.b-b,S=f+v*g,k=_+C*g,x=b+w*g,y=Math.max(s,a),D=e.data;let I=i*u+t*4;for(let O=0;O{const e=new Uint8ClampedArray(o.length/2);for(let t=0;t>1]=X2[o[t]]<<4|X2[o[t+1]]&15;return e},eA={1:Xa(()=>J2("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Xa(()=>J2("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class gp{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return eA[e]?i=new om(eA[e](),e):i=gp.createFromSampleData(gp.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height=`${16}px`,t.height=16,t.width=96*10,t.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold ${16}px ${e}`,i.textBaseline="middle";let n=0;for(const s of Jj)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=gp._downsample(e,t);return new om(n,t)}static _downsampleChar(e,t,i,n,s){const r=1*s,a=2*s;let l=n,c=0;for(let d=0;d0){const c=255/l;for(let d=0;dgp.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=rm._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=rm._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(UU);return i?new Us(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor($U);return t?Us._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class fp{constructor(e,t,i,n,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,s,r,a,l,c,d,h){const u=e.pixelRatio,g=e.minimapLineHeight,f=Math.floor(e.canvasInnerHeight/g),_=e.lineHeight;if(e.minimapHeightIsEditorHeight){const k=l*e.lineHeight+(e.scrollBeyondLastLine?s-e.lineHeight:0),x=Math.max(1,Math.floor(s*s/k)),y=Math.max(0,e.minimapHeight-x),D=y/(d-s),I=c*D,O=y>0,F=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new fp(c,d,O,D,I,x,1,Math.min(a,F))}let b;if(r&&i!==a){const k=i-t+1;b=Math.floor(k*g/u)}else{const k=s/_;b=Math.floor(k*g/u)}let v;e.scrollBeyondLastLine?v=(a-1)*g/u:v=Math.max(0,a*g/u-b),v=Math.min(e.minimapHeight-b,v);const C=v/(d-s),w=c*C;let S=0;if(e.scrollBeyondLastLine&&(S=s/_-1),f>=a+S){const x=a,y=v>0;return new fp(c,d,y,C,w,b,1,x)}else{let k=Math.max(1,Math.floor(t-w*u/g));h&&h.scrollHeight===d&&(h.scrollTop>c&&(k=Math.min(k,h.startLineNumber)),h.scrollTopxv.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n1){for(let S=0,k=a-1;S0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=am.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,r=t-e+1;s{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.button===0&&this._lastRenderData){const c=on(this._slider.domNode),d=c.top+c.height/2;this._startSliderDragging(i,d,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,r=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY;let l=Math.floor(r/s)+this._lastRenderData.renderedLayout.startLineNumber;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new jg,this._sliderPointerDownListener=ki(this._slider.domNode,ae.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ft.addTarget(this._domNode.domNode),this._sliderTouchStartListener=G(this._domNode.domNode,xt.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=G(this._domNode.domNode,xt.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=ki(this._domNode.domNode,xt.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(r,a)=>{const l=Math.abs(a-n);if(Yi&&l>tK){this._model.setScrollTop(i.scrollTop);return}const c=r-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(c))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>s(r.pageY,r.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new _E(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(B2),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=fp.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(L.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((u,g)=>(u.options.zIndex||0)-(g.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,r=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,n,s);const d=new iA(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,d,e,r),this._renderDecorationsLineHighlights(c,i,d,e,r);const h=new iA(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,h,e,r,l,a,n),this._renderDecorationsHighlights(c,i,h,e,r,l,a,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,a=0;for(const l of t){const c=Math.max(n.startLineNumber,l.startLineNumber),d=Math.min(n.endLineNumber,l.endLineNumber);if(c>d)continue;for(let g=c;g<=d;g++)i.set(g,!0);const h=(c-n.startLineNumber)*s,u=(d-n.startLineNumber)*s+s;a>=h||(a>r&&e.fillRect(wl,r,e.canvas.width,a-r),r=h),a=u}a>r&&e.fillRect(wl,r,e.canvas.width,a-r)}_renderDecorationsLineHighlights(e,t,i,n,s){const r=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],c=l.options.minimap;if(!c||c.position!==js.Inline)continue;const d=Math.max(n.startLineNumber,l.range.startLineNumber),h=Math.min(n.endLineNumber,l.range.endLineNumber);if(d>h)continue;const u=c.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=r.get(u.toString());g||(g=u.transparent(.5).toString(),r.set(u.toString(),g)),e.fillStyle=g;for(let f=d;f<=h;f++){if(i.has(f))continue;i.set(f,!0);const _=(d-n.startLineNumber)*s;e.fillRect(wl,_,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,r,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of t){const d=Math.max(n.startLineNumber,c.startLineNumber),h=Math.min(n.endLineNumber,c.endLineNumber);if(!(d>h))for(let u=d;u<=h;u++)this.renderDecorationOnLine(e,i,c,this._selectionColor,n,u,s,s,r,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,r,a,l){for(const c of t){const d=c.options.minimap;if(!d)continue;const h=Math.max(n.startLineNumber,c.range.startLineNumber),u=Math.min(n.endLineNumber,c.range.endLineNumber);if(h>u)continue;const g=d.getColor(this._theme.value);if(!(!g||g.isTransparent()))for(let f=h;f<=u;f++)switch(d.position){case js.Inline:this.renderDecorationOnLine(e,i,c.range,g,n,f,s,s,r,a,l);continue;case js.Gutter:{const _=(f-n.startLineNumber)*s,b=2;this.renderDecoration(e,g,b,_,iK,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,r,a,l,c,d,h){const u=(r-s.startLineNumber)*l;if(u+a<0||u>this._model.options.canvasInnerHeight)return;const{startLineNumber:g,endLineNumber:f}=i,_=g===r?i.startColumn:1,b=f===r?i.endColumn:this._model.getLineMaxColumn(r),v=this.getXOffsetForPosition(t,r,_,c,d,h),C=this.getXOffsetForPosition(t,r,b,c,d,h);this.renderDecoration(e,n,v,u,C-v,a)}getXOffsetForPosition(e,t,i,n,s,r){if(i===1)return wl;if((i-1)*s>=r)return r;let l=e.get(t);if(!l){const c=this._model.getLineContent(t);l=[wl];let d=wl;for(let h=1;h=r){l[h]=r;break}l[h]=f,d=f}e.set(t,l)}return i-1k?Math.floor((n-k)/2):0,y=u.a/255,D=new Us(Math.round((u.r-h.r)*y+h.r),Math.round((u.g-h.g)*y+h.g),Math.round((u.b-h.b)*y+h.b),255);let I=0;const O=[];for(let he=0,Se=i-t+1;he=0&&OC)return;const z=b.charCodeAt(k);if(z===9){const j=u-(k+x)%u;x+=j-1,S+=j*r}else if(z===32)S+=r;else{const j=ic(z)?2:1;for(let re=0;reC)return}}}}}class iA{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}Et((o,e)=>{const t=o.getColor(jU);t&&e.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${t}; }`);const i=o.getColor(KU);i&&e.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${i}; }`);const n=o.getColor(qU);n&&e.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${n}; }`);const s=o.getColor(Kg);s&&e.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});class sK extends Is{constructor(e){super(e);const i=this._context.configuration.options.get(133);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=Je(document.createElement("div")),qr.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(133);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=Je(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?!1:(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(e.preference===null){t.setTop("");return}if(e.preference===0)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===1){const i=t.domNode.clientHeight;t.setTop(this._editorHeight-i-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===2&&(t.setTop(0),t.domNode.style.right="50%")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i=3){const s=Math.floor(n/3),r=Math.floor(n/3),a=n-s-r,l=e,c=l+s,d=l+s+a;return[[0,l,c,l,d,l,c,l],[0,s,a,s+a,r,s+a+r,a+r,s+a+r]]}else if(i===2){const s=Math.floor(n/2),r=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,r,s+r,s+r,s+r]]}else{const s=e,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class rK extends Is{constructor(e){super(e),this._domNode=Je(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Wt.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new oK(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(F=t-c),D=F-c,I=F+c}D>C+1||k!==b?(w!==0&&d.fillRect(h[b],v,u[b],C-v),b=k,v=D,C=I):I>C&&(C=I)}d.fillRect(h[b],v,u[b],C-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){const g=2*this._settings.pixelRatio|0,f=g/2|0,_=this._settings.x[7],b=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let v=-100,C=-100;for(let w=0,S=this._cursorPositions.length;wt&&(x=t-f);const y=x-f,D=y+g;y>C+1?(w!==0&&d.fillRect(_,v,b,C-v),v=y,C=D):D>C&&(C=D)}d.fillRect(_,v,b,C-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,t),d.stroke(),d.moveTo(0,0),d.lineTo(e,0),d.stroke())}}class nA{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class lm{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(_=i-b);const v=d.color;let C=this._color2Id[v];C||(C=++this._lastAssignedId,this._color2Id[v]=C,this._id2Color[C]=v);const w=new nA(_-b,_+b,C);d.setColorZone(w),a.push(w)}return this._colorZonesInvalid=!1,a.sort(nA.compare),a}}class lK extends h_{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Je(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new aK(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(61)),this._zoneManager.setPixelRatio(i.get(131)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(61)&&(this._zoneManager.setLineHeight(t.get(61)),this._render()),e.hasChanged(131)&&(this._zoneManager.setPixelRatio(t.get(131)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,r=0,a=0;for(const l of t){const c=l.colorId,d=l.from,h=l.to;c!==s?(e.fillRect(0,r,n,a-r),s=c,e.fillStyle=i[s],r=d,a=h):a>=d?a=Math.max(a,h):(e.fillRect(0,r,n,a-r),r=d,a=h)}e.fillRect(0,r,n,a-r)}}class cK extends Is{constructor(e){super(e),this.domNode=Je(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(93),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(93),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const a=Je(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),r--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const t=o.getColor(T$);t&&e.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${t} inset; }`)});class dK extends Is{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const i=this._context.configuration.options.get(94);this._useShadows=i.useShadows,this._domNode=Je(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(133);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(94);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Et((o,e)=>{const t=o.getColor(Kg);t&&e.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${t} 0 6px 6px -6px inset; }`)});class hK{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class uK{constructor(e,t){this.lineNumber=e,this.ranges=t}}function gK(o){return new hK(o)}function fK(o){return new uK(o.lineNumber,o.ranges.map(gK))}class Zt extends qg{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(61),this._roundedSelection=t.get(92),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(61),this._roundedSelection=t.get(92),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,r=null;if(i&&i.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!s&&c=0;c--)i[c].lineNumber===l&&(r=i[c].ranges[0]);s&&!s.startStyle&&(s=null),r&&!r.startStyle&&(r=null)}for(let a=0,l=t.length;a0){const f=t[a-1].ranges[0].left,_=t[a-1].ranges[0].left+t[a-1].ranges[0].width;gb(d-f)f&&(u.top=1),gb(h-_)'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=n[0].lineNumber,c=n[n.length-1].lineNumber;for(let d=0,h=n.length;d1,c)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([r,a])=>r+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Zt.SELECTION_CLASS_NAME="selected-text";Zt.SELECTION_TOP_LEFT="top-left-radius";Zt.SELECTION_BOTTOM_LEFT="bottom-left-radius";Zt.SELECTION_TOP_RIGHT="top-right-radius";Zt.SELECTION_BOTTOM_RIGHT="bottom-right-radius";Zt.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";Zt.ROUNDED_PIECE_WIDTH=10;Et((o,e)=>{const t=o.getColor(Wa);t&&e.addRule(`.monaco-editor .focused .selected-text { background-color: ${t}; }`);const i=o.getColor(sE);i&&e.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const n=o.getColor(jz);n&&!n.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function gb(o){return o<0?-o:o}class sA{constructor(e,t,i,n,s,r){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=s,this.textContentClassName=r}}class oA{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(46);this._cursorStyle=t.get(24),this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Je(document.createElement("div")),this._domNode.setClassName(`cursor ${_d}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),an(this._domNode,i),this._domNode.setDisplay("none"),this._position=new B(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(46);return this._cursorStyle=t.get(24),this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),an(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=EB(i,t-1);return[new B(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===Hi.Line||this._cursorStyle===Hi.LineThin){const u=e.visibleRangeForPosition(i);if(!u||u.outsideRenderedLine)return null;let g;this._cursorStyle===Hi.Line?(g=k2(this._lineCursorWidth>0?this._lineCursorWidth:2),g>2&&(t=n)):g=k2(1);let f=u.left;g>=2&&f>=1&&(f-=1);const _=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new sA(_,f,g,this._lineHeight,t,"")}const s=e.linesVisibleRangesForRange(new L(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!s||s.length===0)return null;const r=s[0];if(r.outsideRenderedLine||r.ranges.length===0)return null;const a=r.ranges[0],l=n===" "?this._typicalHalfwidthCharacterWidth:a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let c="";if(this._cursorStyle===Hi.Block){const u=this._context.viewModel.getViewLineData(i.lineNumber);t=n;const g=u.tokens.findTokenIndexAtOffset(i.column-1);c=u.tokens.getClassName(g)}let d=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return(this._cursorStyle===Hi.Underline||this._cursorStyle===Hi.UnderlineThin)&&(d+=this._lineHeight-2,h=2),new sA(d,a.left,l,h,t,c)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${_d} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class cm extends Is{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(83),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new oA(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Je(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new xs,this._cursorFlatBlinkInterval=new r_,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(83),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const i=this._secondaryCursors.length-t.length;for(let n=0;n{for(let n=0,s=e.ranges.length;n{this._isVisible?this._hide():this._show()},cm.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},cm.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Hi.Line:e+=" cursor-line-style";break;case Hi.Block:e+=" cursor-block-style";break;case Hi.Underline:e+=" cursor-underline-style";break;case Hi.LineThin:e+=" cursor-line-thin-style";break;case Hi.BlockOutline:e+=" cursor-block-outline-style";break;case Hi.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=o.getColor(V4);if(t){let i=o.getColor(E$);i||(i=t.opposite()),e.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${t}; }`),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${i}; }`),cn(o.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const mS=()=>{throw new Error("Invalid change accessor")};class pK extends Is{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Je(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Je(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let r=0,a=s.length;r{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{!s||(t=this._removeZone(i,s)||t)},layoutZone:s=>{!s||(t=this._layoutZone(i,s)||t)}};mK(e,n),n.addZone=mS,n.removeZone=mS,n.layoutZone=mS}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:Je(t.domNode),marginDomNode:t.marginDomNode?Je(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){Te(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){Te(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of t)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const s=Object.keys(this._zones);for(let r=0,a=s.length;r{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new p$(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new B(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const t=this._context.configuration.options.get(133);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(130)+" "+fv(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=n4(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){SK(()=>this._actualRender())}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!jI(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new vK(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new a$(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new B(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?w1.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new lK(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i;let n=e.position&&e.position.range||null;if(n===null){const r=e.position?e.position.position:null;r!==null&&(n=new L(r.lineNumber,r.column,r.lineNumber,r.column))}const s=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,n,s,(i=(t=e.position)===null||t===void 0?void 0:t.positionAffinity)!==null&&i!==void 0?i:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}function SK(o){try{return o()}catch(e){Te(e)}}class Ev{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Vi(new L(1,1,1,1),0,new B(1,1),0),new Vi(new L(1,1,1,1),0,new B(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){!this._trackSelection||(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new $e(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return oe.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),r=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,n,i,r),l=this._validatePositionWithCache(e,s,n,a);return i.equals(r)&&n.equals(a)&&s.equals(l)?t:new Vi(L.fromPositions(a,l),t.selectionStartLeftoverVisibleColumns+n.column-a.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=Ev._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),a=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new Vi(n,s,r,a)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Vi(n,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Vi(n,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new B(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new B(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new L(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Vi(r,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class rA{constructor(e){this.context=e,this.cursors=[new Ev(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return Y8(this.cursors,op(e=>e.viewState.position,B.compare)).viewState.position}getBottomMostViewPosition(){return UO(this.cursors,op(e=>e.viewState.position,B.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates($e.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const n=t-i;for(let s=0;s=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ii.selection,L.compareRangesUsingStarts));for(let i=0;ih&&_.index--;e.splice(h,1),t.splice(d,1),this._removeSecondaryCursor(h-1),i--}}}}class aA{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class yK{constructor(){this.changeType=1}}class er{constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}static applyInjectedText(e,t){if(!t||t.length===0)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new er(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new er(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}}class lA{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class LK{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class DK{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class kK{constructor(){this.changeType=5}}class Vu{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class WK{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class bE{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new bE(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class vE{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new vE(this.oldHasFocus,e.hasFocus)}}class CE{constructor(e,t,i,n,s,r,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=r,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new CE(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class VK{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class HK{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Nv{constructor(e,t,i,n,s,r,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=r,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s0){const e=this._cursors.getSelections();for(let t=0;tgg.MAX_CURSOR_COUNT&&(n=n.slice(0,gg.MAX_CURSOR_COUNT),s=!0);const r=pp.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,s,r){const a=this._cursors.getViewPositions();let l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=L.fromPositions(a[0],a[0]),e.emitViewEvent(new C0(t,i,l,c,n,s,r))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const s=$e.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,$e.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,$e.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const r=pp.from(this._model,this);if(r.equals(n))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new NK(l,a)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((c,d)=>!c.modelState.equals(n.cursorState[d].modelState))){const c=n?n.cursorState.map(h=>h.modelState.selection):null,d=n?n.modelVersionId:0;e.emitOutgoingEvent(new Nv(c,a,d,r.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=s.text.length-r[2].length-1,h=s.text.lastIndexOf(c,d-1);if(h===-1)return null;t.push([h,d])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(s)for(let h=0,u=s.length;h0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=pp.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){Te(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return cA.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new mp(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Pt.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s{const c=l.getPosition();return new oe(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,r,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Pt.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,r)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(Pt.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(Vd.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new An(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new An(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}gg.MAX_CURSOR_COUNT=1e4;class pp{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new pp(e.getVersionId(),t.getCursorStates())}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class ZK{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let r=0,a=n.trackedRanges.length;r0&&(r[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,r,c=>{const d=[];for(let g=0;gg.identifier.minor-f.identifier.minor,u=[];for(let g=0;g0?(d[g].sort(h),u[g]=t[g].computeCursorState(e.model,{getInverseEditOperations:()=>d[g],getTrackedSelection:f=>{const _=parseInt(f,10),b=e.model._getTrackedRange(e.trackedRanges[_]);return e.trackedRangesDirection[_]===0?new oe(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn):new oe(b.endLineNumber,b.endColumn,b.startLineNumber,b.startColumn)}})):u[g]=e.selectionsBefore[g];return u});a||(a=e.selectionsBefore);const l=[];for(const c in s)s.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,d)=>d-c);for(const c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{L.isEmpty(h)&&u===""||n.push({identifier:{major:t,minor:s++},range:h,text:u,forceMoveMarkers:g,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const d={addEditOperation:r,addTrackedEditOperation:(h,u,g)=>{a=!0,r(h,u,g)},trackSelection:(h,u)=>{const g=oe.liftSelection(h);let f;if(g.isEmpty())if(typeof u=="boolean")u?f=2:f=3;else{const v=e.model.getLineMaxColumn(g.startLineNumber);g.startColumn===v?f=2:f=3}else f=1;const _=e.trackedRanges.length,b=e.model._setTrackedRange(null,g,f);return e.trackedRanges[_]=b,e.trackedRangesDirection[_]=g.getDirection(),_.toString()}};try{i.getEditOperations(e.model,d)}catch(h){return Te(h),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-L.compareRangesUsingEnds(i.range,n.range));const t={};for(let i=1;is.identifier.major?r=n.identifier.major:r=s.identifier.major,t[r.toString()]=!0;for(let a=0;a0&&i--}}return t}}class YK{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class mp{constructor(e,t){this._original=mp._capture(e,t)}static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new YK(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}deduceOutcome(e,t){if(!this._original)return null;const i=mp._capture(e,t);if(!i||this._original.length!==i.length)return null;const n=[];for(let s=0,r=this._original.length;s=e}function Ph(o){return ii(o.lineNumber-1,o.column-1)}function ja(o,e){const t=o,i=Math.floor(t/ws),n=t-i*ws,s=e,r=Math.floor(s/ws),a=s-r*ws;return new L(i+1,n+1,r+1,a+1)}function nq(o){const e=jr(o);return ii(e.length-1,e[e.length-1].length)}class dA{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class sq{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(i=>wE.from(i))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):this.documentLength;return iq(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?ii(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):ii(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Zl(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?ii(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):ii(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(n===0){const r=1<0;)t=t.getChild(i-1);return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;nthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const s=this.lineTokens,r=s.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}const n=JK(e,t,this.lineIdx,this.lineCharOffset);return new Tl(n,0,-1,ui.getEmpty(),new eu(n))}}class dq{constructor(e,t){this.text=e,this._offset=mo,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+`| `,"gi"):null,s=[];let r,a=0,l=0,c=0,d=0;const h=new Array;for(let f=0;f<60;f++)h.push(new Tl(ii(0,f),0,-1,ui.getEmpty(),new eu(ii(0,f))));const u=new Array;for(let f=0;f<60;f++)u.push(new Tl(ii(1,f),0,-1,ui.getEmpty(),new eu(ii(1,f))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const f=r.index,_=r[0];if(_===` -`)a++,l=f+1;else{if(c!==f){let b;if(d===a){const v=f-c;if(vhq(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function hq(o){let e=ys(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class d5{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=LE.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function uq(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e=2?h5(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())uA(i,n)<=uA(n,r)?(i=_S(i,n),n=r):n=_S(n,r);return _S(i,n)}function h5(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n=3?o[2]:null,e)}function uA(o,e){return Math.abs(o.listHeight-e.listHeight)}function _S(o,e){return o.listHeight===e.listHeight?Gr.create23(o,e,null,!1):o.listHeight>e.listHeight?gq(o,e):fq(e,o)}function gq(o,e){o=o.toMutable();let t=o;const i=new Array;let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Gr.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Gr.create23(o,n,null,!1):o}function fq(o,e){o=o.toMutable();let t=o;const i=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Gr.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Gr.create23(n,o,null,!1):o}class pq{constructor(e){this.lastOffset=mo,this.nextNodes=[e],this.offsets=[mo],this.idxs=[]}readLongestNodeAt(e,t){if(Hu(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Lf(this.nextNodes);if(!i)return;const n=Lf(this.offsets);if(Hu(e,n))return;if(Hu(n,e))if(Xt(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=bS(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=bS(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=Lf(this.offsets),t=Lf(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=Lf(this.nextNodes),n=bS(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(Xt(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function bS(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function Lf(o){return o.length>0?o[o.length-1]:void 0}function CD(o,e,t,i){return new mq(o,e,t,i).parseDocument()}class mq{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new pq(i):void 0,this.positionMapper=new sq(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(ui.getEmpty());return e||(e=Gr.getEmpty()),e}parseList(e){const t=new Array;for(;;){const n=this.tokenizer.peek();if(!n||n.kind===2&&n.bracketIds.intersects(e))break;const s=this.parseChild(e);s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?uq(t):h5(t,this.createImmutableLists)}parseChild(e){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!eq(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>Hu(s.length,i)?s.canBeReused(e):!1);if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new lq(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),n=this.parseList(i),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===t.bracketId||s.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),dm.create(t.astNode,n,s.astNode)):dm.create(t.astNode,n,null)}default:throw new Error("unexpected")}}}class _q extends H{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new R,this.denseKeyProvider=new l5,this.brackets=new d5(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,e.tokenization.backgroundTokenizationState===0){const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new dq(this.textModel.getValue(),i);this.initialAstWithoutTokens=CD(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):e.tokenization.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(i=>new dA(ii(i.fromLineNumber-1,0),ii(i.toLineNumber,0),ii(i.toLineNumber-i.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map(i=>{const n=L.lift(i.range);return new dA(Ph(n.getStartPosition()),Ph(n.getEndPosition()),nq(i.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new c5(this.textModel,this.brackets);return CD(s,e,n,i)}getBracketsInRange(e){const t=ii(e.startLineNumber-1,e.startColumn-1),i=ii(e.endLineNumber-1,e.endColumn-1),n=new Array,s=this.initialAstWithoutTokens||this.astWithTokens;return wD(s,mo,s.length,t,i,n,0,new Map),n}getBracketPairsInRange(e,t){const i=new Array,n=Ph(e.getStartPosition()),s=Ph(e.getEndPosition()),r=this.initialAstWithoutTokens||this.astWithTokens,a=new bq(i,t,this.textModel);return SD(r,mo,r.length,n,s,a,0,new Map),i}getFirstBracketAfter(e){const t=this.initialAstWithoutTokens||this.astWithTokens;return g5(t,mo,t.length,Ph(e))}getFirstBracketBefore(e){const t=this.initialAstWithoutTokens||this.astWithTokens;return u5(t,mo,t.length,Ph(e))}}function u5(o,e,t,i){if(o.kind===4||o.kind===2){const n=[];for(const s of o.children)t=Xt(e,s.length),n.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let s=n.length-1;s>=0;s--){const{nodeOffsetStart:r,nodeOffsetEnd:a}=n[s];if(Hu(r,i)){const l=u5(o.children[s],r,a,i);if(l)return l}}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=ja(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function g5(o,e,t,i){if(o.kind===4||o.kind===2){for(const n of o.children){if(t=Xt(e,n.length),Hu(i,t)){const s=g5(n,e,t,i);if(s)return s}e=t}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=ja(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function wD(o,e,t,i,n,s,r,a){if(!(r>200)){if(o.kind===4)for(const l of o.children)t=Xt(e,l.length),Fl(e,n)&&Gf(t,i)&&wD(l,e,t,i,n,s,r,a),e=t;else if(o.kind===2){let l=0;if(a){let c=a.get(o.openingBracket.text);c===void 0&&(c=0),l=c,c++,a.set(o.openingBracket.text,c)}{const c=o.openingBracket;if(t=Xt(e,c.length),Fl(e,n)&&Gf(t,i)){const d=ja(e,t);s.push(new mb(d,r,l,!o.closingBracket))}e=t}if(o.child){const c=o.child;t=Xt(e,c.length),Fl(e,n)&&Gf(t,i)&&wD(c,e,t,i,n,s,r+1,a),e=t}if(o.closingBracket){const c=o.closingBracket;if(t=Xt(e,c.length),Fl(e,n)&&Gf(t,i)){const d=ja(e,t);s.push(new mb(d,r,l,!1))}e=t}a==null||a.set(o.openingBracket.text,l)}else if(o.kind===3){const l=ja(e,t);s.push(new mb(l,r-1,0,!0))}else if(o.kind===1){const l=ja(e,t);s.push(new mb(l,r-1,0,!1))}}}class bq{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function SD(o,e,t,i,n,s,r,a){var l;if(!(r>200))if(o.kind===2){let c=0;if(a){let u=a.get(o.openingBracket.text);u===void 0&&(u=0),c=u,u++,a.set(o.openingBracket.text,u)}const d=Xt(e,o.openingBracket.length);let h=-1;if(s.includeMinIndentation&&(h=o.computeMinIndentation(e,s.textModel)),s.result.push(new XK(ja(e,t),ja(e,d),o.closingBracket?ja(Xt(d,((l=o.child)===null||l===void 0?void 0:l.length)||mo),t):void 0,r,c,o,h)),e=d,o.child){const u=o.child;t=Xt(e,u.length),Fl(e,n)&&Gf(t,i)&&SD(u,e,t,i,n,s,r+1,a)}a==null||a.set(o.openingBracket.text,c)}else{let c=e;for(const d of o.children){const h=c;c=Xt(c,d.length),Fl(h,n)&&Fl(i,c)&&SD(d,h,c,i,n,s,r,a)}}}class vq extends H{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new _n),this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(i=>{var n;(!i.languageId||((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.didLanguageChange(i.languageId)))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get canBuildAST(){return this.textModel.getValueLength()<=5e6}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new Q;this.bracketPairsTree.value=Cq(e.add(new _q(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!r)return null;const a=j0(this.getBracketPairsInRange(L.fromPositions(t,t))||[],l=>r.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{const r=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!a)return null;const l=a.textIsBracket[r];return l?_b(this._findMatchingBracketUp(l,n,vS(i))):null}}matchBracket(e,t){if(this.canBuildAST){const i=UO(this.getBracketPairsInRange(L.fromPositions(e,e)).filter(n=>n.closingBracketRange!==void 0&&(n.openingBracketRange.containsPosition(e)||n.closingBracketRange.containsPosition(e))),op(n=>n.openingBracketRange.containsPosition(e)?n.openingBracketRange:n.closingBracketRange,L.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{const i=vS(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),r=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let c=n-1;c>=0;c--){const d=t.getEndOffset(c);if(d<=a)break;if(mr(t.getStandardTokenType(c))||t.getLanguageId(c)!==r){a=d;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let c=n+1;c=l)break;if(mr(t.getStandardTokenType(c))||t.getLanguageId(c)!==r){l=d;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!mr(n.getStandardTokenType(r))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,n,a,r),d=null;for(;;){const h=lo.findNextBracketInRange(a.forwardRegex,i,s,l,c);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){const u=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),g=this._matchFoundBracket(h,a.textIsBracket[u],a.textIsOpenBracket[u],t);if(g){if(g instanceof Da)return null;d=g}}l=h.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){const l=r-1,c=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(l)).brackets;if(c&&!mr(n.getStandardTokenType(l))){const{searchStartOffset:d,searchEndOffset:h}=this._establishBracketSearchOffsets(e,n,c,l),u=lo.findPrevBracketInRange(c.reversedRegex,i,s,d,h);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){const g=s.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),f=this._matchFoundBracket(u,c.textIsBracket[g],c.textIsOpenBracket[g],t);if(f)return f instanceof Da?null:f}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof Da?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let r=-1,a=0;const l=(c,d,h,u)=>{for(;;){if(i&&++a%100===0&&!i())return Da.INSTANCE;const g=lo.findPrevBracketInRange(s,c,d,h,u);if(!g)break;const f=d.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(f)?r++:e.isClose(f)&&r--,r===0)return g;u=g.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){const d=this.textModel.tokenization.getLineTokens(c),h=d.getCount(),u=this.textModel.getLineContent(c);let g=h-1,f=u.length,_=u.length;c===t.lineNumber&&(g=d.findTokenIndexAtOffset(t.column-1),f=t.column-1,_=t.column-1);let b=!0;for(;g>=0;g--){const v=d.getLanguageId(g)===n&&!mr(d.getStandardTokenType(g));if(v)b?f=d.getStartOffset(g):(f=d.getStartOffset(g),_=d.getEndOffset(g));else if(b&&f!==_){const C=l(c,u,f,_);if(C)return C}b=v}if(b&&f!==_){const v=l(c,u,f,_);if(v)return v}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let r=1,a=0;const l=(d,h,u,g)=>{for(;;){if(i&&++a%100===0&&!i())return Da.INSTANCE;const f=lo.findNextBracketInRange(s,d,h,u,g);if(!f)break;const _=h.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(_)?r++:e.isClose(_)&&r--,r===0)return f;u=f.endColumn-1}return null},c=this.textModel.getLineCount();for(let d=t.lineNumber;d<=c;d++){const h=this.textModel.tokenization.getLineTokens(d),u=h.getCount(),g=this.textModel.getLineContent(d);let f=0,_=0,b=0;d===t.lineNumber&&(f=h.findTokenIndexAtOffset(t.column-1),_=t.column-1,b=t.column-1);let v=!0;for(;f=1;a--){const l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),d=this.textModel.getLineContent(a);let h=c-1,u=d.length,g=d.length;if(a===i.lineNumber){h=l.findTokenIndexAtOffset(i.column-1),u=i.column-1,g=i.column-1;const _=l.getLanguageId(h);n!==_&&(n=_,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let f=!0;for(;h>=0;h--){const _=l.getLanguageId(h);if(n!==_){if(s&&r&&f&&u!==g){const v=lo.findPrevBracketInRange(s.reversedRegex,a,d,u,g);if(v)return this._toFoundBracket(r,v);f=!1}n=_,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const b=!!s&&!mr(l.getStandardTokenType(h));if(b)f?u=l.getStartOffset(h):(u=l.getStartOffset(h),g=l.getEndOffset(h));else if(r&&s&&f&&u!==g){const v=lo.findPrevBracketInRange(s.reversedRegex,a,d,u,g);if(v)return this._toFoundBracket(r,v)}f=b}if(r&&s&&f&&u!==g){const _=lo.findPrevBracketInRange(s.reversedRegex,a,d,u,g);if(_)return this._toFoundBracket(r,_)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,r=null,a=null;for(let l=i.lineNumber;l<=n;l++){const c=this.textModel.tokenization.getLineTokens(l),d=c.getCount(),h=this.textModel.getLineContent(l);let u=0,g=0,f=0;if(l===i.lineNumber){u=c.findTokenIndexAtOffset(i.column-1),g=i.column-1,f=i.column-1;const b=c.getLanguageId(u);s!==b&&(s=b,r=this.languageConfigurationService.getLanguageConfiguration(s).brackets,a=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let _=!0;for(;u_.closingBracketRange!==void 0&&_.range.strictContainsRange(g));return f?[f.openingBracketRange,f.closingBracketRange]:null}const n=vS(t),s=this.textModel.getLineCount(),r=new Map;let a=[];const l=(g,f)=>{if(!r.has(g)){const _=[];for(let b=0,v=f?f.brackets.length:0;b{for(;;){if(n&&++c%100===0&&!n())return Da.INSTANCE;const C=lo.findNextBracketInRange(g.forwardRegex,f,_,b,v);if(!C)break;const w=_.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),S=g.textIsBracket[w];if(S&&(S.isOpen(w)?a[S.index]++:S.isClose(w)&&a[S.index]--,a[S.index]===-1))return this._matchFoundBracket(C,S,!1,n);b=C.endColumn-1}return null};let h=null,u=null;for(let g=i.lineNumber;g<=s;g++){const f=this.textModel.tokenization.getLineTokens(g),_=f.getCount(),b=this.textModel.getLineContent(g);let v=0,C=0,w=0;if(g===i.lineNumber){v=f.findTokenIndexAtOffset(i.column-1),C=i.column-1,w=i.column-1;const k=f.getLanguageId(v);h!==k&&(h=k,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,l(h,u))}let S=!0;for(;v<_;v++){const k=f.getLanguageId(v);if(h!==k){if(u&&S&&C!==w){const y=d(u,g,b,C,w);if(y)return _b(y);S=!1}h=k,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,l(h,u)}const x=!!u&&!mr(f.getStandardTokenType(v));if(x)S||(C=f.getStartOffset(v)),w=f.getEndOffset(v);else if(u&&S&&C!==w){const y=d(u,g,b,C,w);if(y)return _b(y)}S=x}if(u&&S&&C!==w){const k=d(u,g,b,C,w);if(k)return _b(k)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.textModel.getValueInRange(t);i=i.toLowerCase();const n=e.getBracketInfo(i);return n?{range:t,bracketInfo:n}:null}}function Cq(o,e){return{object:o,dispose:()=>e==null?void 0:e.dispose()}}function vS(o){if(typeof o>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=o}}class Da{constructor(){this._searchCanceledBrand=void 0}}Da.INSTANCE=new Da;function _b(o){return o instanceof Da?null:o}class wq extends H{constructor(e){super(),this.textModel=e,this.colorProvider=new f5,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i){if(t===void 0)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,s=this.textModel.bracketPairs.getBracketsInRange(e);for(const r of s)n.push({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range});return n}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new L(1,1,this.textModel.getLineCount(),1),e,t):[]}}class f5{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Et((o,e)=>{const t=[U4,$4,j4,K4,q4,G4],i=new f5;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${o.getColor(j$)}; }`);const n=t.map(s=>o.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}});function bb(o){return o.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class $i{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${bb(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${bb(this.oldText)}")`:`(replace@${this.oldPosition} "${bb(this.oldText)}" with "${bb(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;No(e,n,i),i+=4;for(let s=0;so.length)return!1;if(t){if(!vI(o,e))return!1;if(e.length===o.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,o.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),o.indexOf(e)===0}function m5(o){return o>=65&&o<=90||o>=97&&o<=122}function Lq(o,e=Yi){return e?m5(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}function _r(o){return Q0(o,!0)}class DE{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Bp(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===Me.file)return yD(_r(e),_r(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(pA(e.authority,t.authority))return yD(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return _e.joinPath(e,...t)}basenameOrAuthority(e){return Js(e)||e.authority}basename(e){return gi.basename(e.path)}extname(e){return gi.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Me.file?t=_e.file(sP(_r(e))).path:(t=gi.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===Me.file?t=_e.file(nP(_r(e))).path:t=gi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!pA(e.authority,t.authority))return;if(e.scheme===Me.file){const s=cB(_r(e),_r(t));return Yi?p5(s):s}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let s=0;for(const r=Math.min(i.length,n.length);sgA(i).length&&i[i.length-1]===t}else{const i=e.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Br){return mA(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Br){let i=!1;if(e.scheme===Me.file){const n=_r(e);i=n!==void 0&&n.length===gA(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=n.length===1&&n.charCodeAt(n.length-1)===47}return!i&&!mA(e,t)?e.with({path:e.path+"/"}):e}}const It=new DE(()=>!1);new DE(o=>o.scheme===Me.file?!dn:!0);new DE(o=>!0);const _5=It.isEqual.bind(It);It.isEqualOrParent.bind(It);It.getComparisonKey.bind(It);const Dq=It.basenameOrAuthority.bind(It),Js=It.basename.bind(It),kq=It.extname.bind(It),L1=It.dirname.bind(It),xq=It.joinPath.bind(It),Iq=It.normalizePath.bind(It),Eq=It.relativePath.bind(It),fA=It.resolvePath.bind(It);It.isAbsolutePath.bind(It);const pA=It.isEqualAuthority.bind(It),mA=It.hasTrailingPathSeparator.bind(It);It.removeTrailingPathSeparator.bind(It);It.addTrailingPathSeparator.bind(It);var cc;(function(o){o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(r=>{const[a,l]=r.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(o.META_DATA_MIME,s),i}o.parseMetaData=e})(cc||(cc={}));function Fh(o){return o.toString()}class Ni{constructor(e,t,i,n,s,r,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=r,this.changes=a}static create(e,t){const i=e.getAlternativeVersionId(),n=LD(e);return new Ni(i,i,n,n,t,t,[])}append(e,t,i,n,s){t.length>0&&(this.changes=Sq(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,i){if(No(e,t?t.length:0,i),i+=4,t)for(const n of t)No(e,n.selectionStartLineNumber,i),i+=4,No(e,n.selectionStartColumn,i),i+=4,No(e,n.positionLineNumber,i),i+=4,No(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Eo(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(_e.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Ni}append(e,t,i,n,s){this._data instanceof Ni&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Ni&&(this._data=this._data.serialize())}open(){this._data instanceof Ni||(this._data=Ni.deserialize(this._data))}undo(){if(_e.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ni&&(this._data=this._data.serialize());const e=Ni.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(_e.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ni&&(this._data=this._data.serialize());const e=Ni.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Ni&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Nq{constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const s=Fh(n.resource);this._editStackElementsMap.set(s,n)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Fh(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Fh(_e.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Fh(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const r=Fh(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Fh(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${Js(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function LD(o){return o.getEOL()===` -`?0:1}function ka(o){return o?o instanceof b5||o instanceof Nq:!1}class kE{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ka(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ka(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(ka(t)&&t.canAppend(this._model))return t;const i=new b5(p("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],LD(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),r=kE._computeCursorState(i,s),a=s.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),n.append(this._model,a.map(l=>l.textChange),LD(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Te(i),null}}}class Tq{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Aq(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(d===0){n.spacesDiff=h,h>0&&0<=l-1&&l-10?n++:S>1&&s++,Aq(r,a,b,w,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;const x=h.spacesDiff;x<=c&&d[x]++,r=b,a=w}let u=t;n!==s&&(u=n{const b=d[_];b>f&&(f=b,g=_)}),g===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function Mn(o){return(o.metadata&1)>>>0}function Lt(o,e){o.metadata=o.metadata&254|e<<0}function Zi(o){return(o.metadata&2)>>>1===1}function St(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function v5(o){return(o.metadata&4)>>>2===1}function bA(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function Mq(o){return(o.metadata&24)>>>3}function vA(o,e){o.metadata=o.metadata&231|e<<3}function Rq(o){return(o.metadata&32)>>>5===1}function CA(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class C5{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Lt(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,bA(this,!1),vA(this,1),CA(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,St(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;bA(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),vA(this,this.options.stickiness),CA(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Oe=new C5(null,0,0);Oe.parent=Oe;Oe.left=Oe;Oe.right=Oe;Lt(Oe,0);class CS{constructor(){this.root=Oe,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s){return this.root===Oe?[]:zq(this,e,t,i,n,s)}search(e,t,i){return this.root===Oe?[]:Hq(this,e,t,i)}collectNodesFromOwner(e){return Wq(this,e)}collectNodesPostOrder(){return Vq(this)}insert(e){wA(this,e),this._normalizeDeltaIfNecessary()}delete(e){SA(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){const s=Fq(this,e,e+t);for(let r=0,a=s.length;rt||i===1?!1:i===2?!0:e}function Pq(o,e,t,i,n){const s=Mq(o),r=s===0||s===2,a=s===1||s===2,l=t-e,c=i,d=Math.min(l,c),h=o.start;let u=!1;const g=o.end;let f=!1;e<=h&&g<=t&&Rq(o)&&(o.start=e,u=!0,o.end=e,f=!0);{const b=n?1:l>0?2:0;!u&&Bh(h,r,e,b)&&(u=!0),!f&&Bh(g,a,e,b)&&(f=!0)}if(d>0&&!n){const b=l>c?2:0;!u&&Bh(h,r,e+d,b)&&(u=!0),!f&&Bh(g,a,e+d,b)&&(f=!0)}{const b=n?1:0;!u&&Bh(h,r,t,b)&&(o.start=e+c,u=!0),!f&&Bh(g,a,t,b)&&(o.end=e+c,f=!0)}const _=c-l;u||(o.start=Math.max(0,h+_)),f||(o.end=Math.max(0,g+_)),o.start>o.end&&(o.end=o.start)}function Fq(o,e,t){let i=o.root,n=0,s=0,r=0,a=0;const l=[];let c=0;for(;i!==Oe;){if(Zi(i)){St(i.left,!1),St(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!Zi(i.left)){if(s=n+i.maxEnd,st){St(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(r,a,0),l[c++]=i),St(i,!0),i.right!==Oe&&!Zi(i.right)){n+=i.delta,i=i.right;continue}}return St(o.root,!1),l}function Bq(o,e,t,i){let n=o.root,s=0,r=0,a=0;const l=i-(t-e);for(;n!==Oe;){if(Zi(n)){St(n.left,!1),St(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),dc(n),n=n.parent;continue}if(!Zi(n.left)){if(r=s+n.maxEnd,rt){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(o.requestNormalizeDelta=!0),St(n,!0);continue}if(St(n,!0),n.right!==Oe&&!Zi(n.right)){s+=n.delta,n=n.right;continue}}St(o.root,!1)}function Wq(o,e){let t=o.root;const i=[];let n=0;for(;t!==Oe;){if(Zi(t)){St(t.left,!1),St(t.right,!1),t=t.parent;continue}if(t.left!==Oe&&!Zi(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),St(t,!0),t.right!==Oe&&!Zi(t.right)){t=t.right;continue}}return St(o.root,!1),i}function Vq(o){let e=o.root;const t=[];let i=0;for(;e!==Oe;){if(Zi(e)){St(e.left,!1),St(e.right,!1),e=e.parent;continue}if(e.left!==Oe&&!Zi(e.left)){e=e.left;continue}if(e.right!==Oe&&!Zi(e.right)){e=e.right;continue}t[i++]=e,St(e,!0)}return St(o.root,!1),t}function Hq(o,e,t,i){let n=o.root,s=0,r=0,a=0;const l=[];let c=0;for(;n!==Oe;){if(Zi(n)){St(n.left,!1),St(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(n.left!==Oe&&!Zi(n.left)){n=n.left;continue}r=s+n.start,a=s+n.end,n.setCachedOffsets(r,a,i);let d=!0;if(e&&n.ownerId&&n.ownerId!==e&&(d=!1),t&&v5(n)&&(d=!1),d&&(l[c++]=n),St(n,!0),n.right!==Oe&&!Zi(n.right)){s+=n.delta,n=n.right;continue}}return St(o.root,!1),l}function zq(o,e,t,i,n,s){let r=o.root,a=0,l=0,c=0,d=0;const h=[];let u=0;for(;r!==Oe;){if(Zi(r)){St(r.left,!1),St(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;continue}if(!Zi(r.left)){if(l=a+r.maxEnd,lt){St(r,!0);continue}if(d=a+r.end,d>=e){r.setCachedOffsets(c,d,s);let g=!0;i&&r.ownerId&&r.ownerId!==i&&(g=!1),n&&v5(r)&&(g=!1),g&&(h[u++]=r)}if(St(r,!0),r.right!==Oe&&!Zi(r.right)){a+=r.delta,r=r.right;continue}}return St(o.root,!1),h}function wA(o,e){if(o.root===Oe)return e.parent=Oe,e.left=Oe,e.right=Oe,Lt(e,0),o.root=e,o.root;Uq(o,e),Dl(e.parent);let t=e;for(;t!==o.root&&Mn(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;Mn(i)===1?(Lt(t.parent,0),Lt(i,0),Lt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,_p(o,t)),Lt(t.parent,0),Lt(t.parent.parent,1),bp(o,t.parent.parent))}else{const i=t.parent.parent.left;Mn(i)===1?(Lt(t.parent,0),Lt(i,0),Lt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,bp(o,t)),Lt(t.parent,0),Lt(t.parent.parent,1),_p(o,t.parent.parent))}return Lt(o.root,0),e}function Uq(o,e){let t=0,i=o.root;const n=e.start,s=e.end;for(;;)if(jq(n,s,i.start+t,i.end+t)<0)if(i.left===Oe){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===Oe){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=Oe,e.right=Oe,Lt(e,1)}function SA(o,e){let t,i;if(e.left===Oe?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Oe?(t=e.left,i=e):(i=$q(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(o.requestNormalizeDelta=!0)),i===o.root){o.root=t,Lt(t,0),e.detach(),wS(),dc(t),o.root.parent=Oe;return}const n=Mn(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,Lt(i,Mn(e)),e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Oe&&(i.left.parent=i),i.right!==Oe&&(i.right.parent=i)),e.detach(),n){Dl(t.parent),i!==e&&(Dl(i),Dl(i.parent)),wS();return}Dl(t),Dl(t.parent),i!==e&&(Dl(i),Dl(i.parent));let s;for(;t!==o.root&&Mn(t)===0;)t===t.parent.left?(s=t.parent.right,Mn(s)===1&&(Lt(s,0),Lt(t.parent,1),_p(o,t.parent),s=t.parent.right),Mn(s.left)===0&&Mn(s.right)===0?(Lt(s,1),t=t.parent):(Mn(s.right)===0&&(Lt(s.left,0),Lt(s,1),bp(o,s),s=t.parent.right),Lt(s,Mn(t.parent)),Lt(t.parent,0),Lt(s.right,0),_p(o,t.parent),t=o.root)):(s=t.parent.left,Mn(s)===1&&(Lt(s,0),Lt(t.parent,1),bp(o,t.parent),s=t.parent.left),Mn(s.left)===0&&Mn(s.right)===0?(Lt(s,1),t=t.parent):(Mn(s.left)===0&&(Lt(s.right,0),Lt(s,1),_p(o,s),s=t.parent.left),Lt(s,Mn(t.parent)),Lt(t.parent,0),Lt(s.left,0),bp(o,t.parent),t=o.root));Lt(t,0),wS()}function $q(o){for(;o.left!==Oe;)o=o.left;return o}function wS(){Oe.parent=Oe,Oe.delta=0,Oe.start=0,Oe.end=0}function _p(o,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Oe&&(t.left.parent=e),t.parent=e.parent,e.parent===Oe?o.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,dc(e),dc(t)}function bp(o,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(o.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Oe&&(t.right.parent=e),t.parent=e.parent,e.parent===Oe?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,dc(e),dc(t)}function w5(o){let e=o.end;if(o.left!==Oe){const t=o.left.maxEnd;t>e&&(e=t)}if(o.right!==Oe){const t=o.right.maxEnd+o.delta;t>e&&(e=t)}return e}function dc(o){o.maxEnd=w5(o)}function Dl(o){for(;o!==Oe;){const e=w5(o);if(o.maxEnd===e)return;o.maxEnd=e,o=o.parent}}function jq(o,e,t,i){return o===t?e-i:o-t}class DD{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Ie)return xE(this.right);let e=this;for(;e.parent!==Ie&&e.parent.left!==e;)e=e.parent;return e.parent===Ie?Ie:e.parent}prev(){if(this.left!==Ie)return S5(this.left);let e=this;for(;e.parent!==Ie&&e.parent.right!==e;)e=e.parent;return e.parent===Ie?Ie:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Ie=new DD(null,0);Ie.parent=Ie;Ie.left=Ie;Ie.right=Ie;Ie.color=0;function xE(o){for(;o.left!==Ie;)o=o.left;return o}function S5(o){for(;o.right!==Ie;)o=o.right;return o}function IE(o){return o===Ie?0:o.size_left+o.piece.length+IE(o.right)}function EE(o){return o===Ie?0:o.lf_left+o.piece.lineFeedCnt+EE(o.right)}function SS(){Ie.parent=Ie}function vp(o,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==Ie&&(t.left.parent=e),t.parent=e.parent,e.parent===Ie?o.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Cp(o,e){const t=e.left;e.left=t.right,t.right!==Ie&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===Ie?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function vb(o,e){let t,i;if(e.left===Ie?(i=e,t=i.right):e.right===Ie?(i=e,t=i.left):(i=xE(e.right),t=i.right),i===o.root){o.root=t,t.color=0,e.detach(),SS(),o.root.parent=Ie;return}const n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,Zf(o,t)):(i.parent===e?t.parent=i:t.parent=i.parent,Zf(o,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Ie&&(i.left.parent=i),i.right!==Ie&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,Zf(o,i)),e.detach(),t.parent.left===t){const r=IE(t),a=EE(t);if(r!==t.parent.size_left||a!==t.parent.lf_left){const l=r-t.parent.size_left,c=a-t.parent.lf_left;t.parent.size_left=r,t.parent.lf_left=a,ma(o,t.parent,l,c)}}if(Zf(o,t.parent),n){SS();return}let s;for(;t!==o.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,vp(o,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,Cp(o,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,vp(o,t.parent),t=o.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,Cp(o,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,vp(o,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,Cp(o,t.parent),t=o.root));t.color=0,SS()}function yA(o,e){for(Zf(o,e);e!==o.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,vp(o,e)),e.parent.color=0,e.parent.parent.color=1,Cp(o,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Cp(o,e)),e.parent.color=0,e.parent.parent.color=1,vp(o,e.parent.parent))}o.root.color=0}function ma(o,e,t,i){for(;e!==o.root&&e!==Ie;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function Zf(o,e){let t=0,i=0;if(e!==o.root){for(;e!==o.root&&e===e.parent.right;)e=e.parent;if(e!==o.root)for(e=e.parent,t=IE(e.left)-e.size_left,i=EE(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i;e!==o.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}const ca=65535;function y5(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class Kq{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Ca(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n126)&&(r=!1)}const a=new Kq(y5(o),i,n,s,r);return o.length=0,a}class qn{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class Jc{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Gq{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Ie&&e.iterate(e.root,i=>(i!==Ie&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Zq{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class Yq{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Jc("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Ie,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,r=e.length;s0){e[s].lineStarts||(e[s].lineStarts=Ca(e[s].buffer));const a=new qn(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,a)}this._searchCache=new Zq(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=ca,i=t-Math.floor(t/3),n=i*2;let s="",r=0;const a=[];if(this.iterate(this.root,l=>{const c=this.getNodeContent(l),d=c.length;if(r<=i||r+d0){const l=s.replace(/\r\n|\r|\n/g,e);a.push(new Jc(l,Ca(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Gq(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Ie;)if(n.left!==Ie&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+=s+t-1}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==Ie;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){const r=this.getOffsetAt(i+1,1),a=n-r;return new B(i+1,a+1)}return new B(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Ie){const s=this.getOffsetAt(i+1,1),r=n-e-s;return new B(i+1,r+1)}else t=t.right;return new B(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let r=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==Ie;){const a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=a.substring(l,l+t.remainder);break}else r+=a.substr(l,i.piece.length);i=i.next()}return r}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===Ie)return!0;const r=s.piece;let a=r.length;if(a===0)return!0;const l=this._buffers[r.bufferIndex].buffer,c=this._buffers[r.bufferIndex].lineStarts,d=r.start.line,h=r.end.line;let u=c[d]+r.start.column;if(n&&(l.charCodeAt(u)===10&&(u++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(d===h)return!this._EOLNormalized&&l.charCodeAt(u+a-1)===13?(n=!0,i+=l.substr(u,a-1)):i+=l.substr(u,a),!0;i+=this._EOLNormalized?l.substring(u,Math.max(u,c[d+1]-this._EOLLength)):l.substring(u,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let g=d+1;gS+f,t.reset(0)):(C=u.buffer,w=S=>S,t.reset(f));do if(b=t.next(C),b){if(w(b.index)>=_)return d;this.positionInBuffer(e,w(b.index)-g,v);const S=this.getLineFeedCnt(e.piece.bufferIndex,s,v),k=v.line===s.line?v.column-s.column+n:v.column+1,x=k+b[0].length;if(h[d++]=Gc(new L(i+S,k,i+S,x),b,l),w(b.index)+b[0].length>=_||d>=c)return d}while(b);return d}findMatchesLineByLine(e,t,i,n){const s=[];let r=0;const a=new du(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let d=this.positionInBuffer(l.node,l.remainder);const h=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,h,t,i,n,r,s),s;let u=e.startLineNumber,g=l.node;for(;g!==c.node;){const _=this.getLineFeedCnt(g.piece.bufferIndex,d,g.piece.end);if(_>=1){const v=this._buffers[g.piece.bufferIndex].lineStarts,C=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),w=v[d.line+_],S=u===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(g,a,u,S,d,this.positionInBuffer(g,w-C),t,i,n,r,s),r>=n)return s;u+=_}const b=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const v=this.getLineContent(u).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,a,v,e.endLineNumber,b,r,s,i,n),s}if(r=this._findMatchesInLine(t,a,this.getLineContent(u).substr(b),u,b,r,s,i,n),r>=n)return s;u++,l=this.nodeAt2(u,1),g=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(u===e.endLineNumber){const _=u===e.startLineNumber?e.startColumn-1:0,b=this.getLineContent(u).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,a,b,e.endLineNumber,_,r,s,i,n),s}const f=u===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(c.node,a,u,f,d,h,t,i,n,r,s),s}_findMatchesInLine(e,t,i,n,s,r,a,l,c){const d=e.wordSeparators;if(!l&&e.simpleSearch){const u=e.simpleSearch,g=u.length,f=i.length;let _=-g;for(;(_=i.indexOf(u,_+g))!==-1;)if((!d||FI(d,i,f,_,g))&&(a[r++]=new Vp(new L(n,_+1+s,n,_+1+g+s),null),r>=c))return r;return r}let h;t.reset(0);do if(h=t.next(i),h&&(a[r++]=Gc(new L(n,h.index+1+s,n,h.index+1+h[0].length+s),h,l),r>=c))return r;while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Ie){const{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,c=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&r+a.length===e&&t.lengthe){const d=[];let h=new qn(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){const _={line:h.start.line+1,column:0};h=new qn(h.bufferIndex,_,h.end,this.getLineFeedCnt(h.bufferIndex,_,h.end),h.length-1),t+=` +`)a++,l=f+1;else{if(c!==f){let b;if(d===a){const v=f-c;if(vhq(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function hq(o){let e=ys(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class dF{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=LE.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function uq(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e=2?hF(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())uA(i,n)<=uA(n,r)?(i=_S(i,n),n=r):n=_S(n,r);return _S(i,n)}function hF(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n=3?o[2]:null,e)}function uA(o,e){return Math.abs(o.listHeight-e.listHeight)}function _S(o,e){return o.listHeight===e.listHeight?Gr.create23(o,e,null,!1):o.listHeight>e.listHeight?gq(o,e):fq(e,o)}function gq(o,e){o=o.toMutable();let t=o;const i=new Array;let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Gr.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Gr.create23(o,n,null,!1):o}function fq(o,e){o=o.toMutable();let t=o;const i=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Gr.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Gr.create23(n,o,null,!1):o}class pq{constructor(e){this.lastOffset=mo,this.nextNodes=[e],this.offsets=[mo],this.idxs=[]}readLongestNodeAt(e,t){if(Hu(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Lf(this.nextNodes);if(!i)return;const n=Lf(this.offsets);if(Hu(e,n))return;if(Hu(n,e))if(Xt(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=bS(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=bS(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=Lf(this.offsets),t=Lf(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=Lf(this.nextNodes),n=bS(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(Xt(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function bS(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function Lf(o){return o.length>0?o[o.length-1]:void 0}function CD(o,e,t,i){return new mq(o,e,t,i).parseDocument()}class mq{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new pq(i):void 0,this.positionMapper=new sq(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(ui.getEmpty());return e||(e=Gr.getEmpty()),e}parseList(e){const t=new Array;for(;;){const n=this.tokenizer.peek();if(!n||n.kind===2&&n.bracketIds.intersects(e))break;const s=this.parseChild(e);s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?uq(t):hF(t,this.createImmutableLists)}parseChild(e){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!eq(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>Hu(s.length,i)?s.canBeReused(e):!1);if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new lq(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),n=this.parseList(i),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===t.bracketId||s.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),dm.create(t.astNode,n,s.astNode)):dm.create(t.astNode,n,null)}default:throw new Error("unexpected")}}}class _q extends H{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new R,this.denseKeyProvider=new lF,this.brackets=new dF(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,e.tokenization.backgroundTokenizationState===0){const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new dq(this.textModel.getValue(),i);this.initialAstWithoutTokens=CD(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):e.tokenization.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(i=>new dA(ii(i.fromLineNumber-1,0),ii(i.toLineNumber,0),ii(i.toLineNumber-i.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map(i=>{const n=L.lift(i.range);return new dA(Ph(n.getStartPosition()),Ph(n.getEndPosition()),nq(i.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new cF(this.textModel,this.brackets);return CD(s,e,n,i)}getBracketsInRange(e){const t=ii(e.startLineNumber-1,e.startColumn-1),i=ii(e.endLineNumber-1,e.endColumn-1),n=new Array,s=this.initialAstWithoutTokens||this.astWithTokens;return wD(s,mo,s.length,t,i,n,0,new Map),n}getBracketPairsInRange(e,t){const i=new Array,n=Ph(e.getStartPosition()),s=Ph(e.getEndPosition()),r=this.initialAstWithoutTokens||this.astWithTokens,a=new bq(i,t,this.textModel);return SD(r,mo,r.length,n,s,a,0,new Map),i}getFirstBracketAfter(e){const t=this.initialAstWithoutTokens||this.astWithTokens;return gF(t,mo,t.length,Ph(e))}getFirstBracketBefore(e){const t=this.initialAstWithoutTokens||this.astWithTokens;return uF(t,mo,t.length,Ph(e))}}function uF(o,e,t,i){if(o.kind===4||o.kind===2){const n=[];for(const s of o.children)t=Xt(e,s.length),n.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let s=n.length-1;s>=0;s--){const{nodeOffsetStart:r,nodeOffsetEnd:a}=n[s];if(Hu(r,i)){const l=uF(o.children[s],r,a,i);if(l)return l}}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=ja(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function gF(o,e,t,i){if(o.kind===4||o.kind===2){for(const n of o.children){if(t=Xt(e,n.length),Hu(i,t)){const s=gF(n,e,t,i);if(s)return s}e=t}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=ja(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function wD(o,e,t,i,n,s,r,a){if(!(r>200)){if(o.kind===4)for(const l of o.children)t=Xt(e,l.length),Fl(e,n)&&Gf(t,i)&&wD(l,e,t,i,n,s,r,a),e=t;else if(o.kind===2){let l=0;if(a){let c=a.get(o.openingBracket.text);c===void 0&&(c=0),l=c,c++,a.set(o.openingBracket.text,c)}{const c=o.openingBracket;if(t=Xt(e,c.length),Fl(e,n)&&Gf(t,i)){const d=ja(e,t);s.push(new mb(d,r,l,!o.closingBracket))}e=t}if(o.child){const c=o.child;t=Xt(e,c.length),Fl(e,n)&&Gf(t,i)&&wD(c,e,t,i,n,s,r+1,a),e=t}if(o.closingBracket){const c=o.closingBracket;if(t=Xt(e,c.length),Fl(e,n)&&Gf(t,i)){const d=ja(e,t);s.push(new mb(d,r,l,!1))}e=t}a==null||a.set(o.openingBracket.text,l)}else if(o.kind===3){const l=ja(e,t);s.push(new mb(l,r-1,0,!0))}else if(o.kind===1){const l=ja(e,t);s.push(new mb(l,r-1,0,!1))}}}class bq{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function SD(o,e,t,i,n,s,r,a){var l;if(!(r>200))if(o.kind===2){let c=0;if(a){let u=a.get(o.openingBracket.text);u===void 0&&(u=0),c=u,u++,a.set(o.openingBracket.text,u)}const d=Xt(e,o.openingBracket.length);let h=-1;if(s.includeMinIndentation&&(h=o.computeMinIndentation(e,s.textModel)),s.result.push(new XK(ja(e,t),ja(e,d),o.closingBracket?ja(Xt(d,((l=o.child)===null||l===void 0?void 0:l.length)||mo),t):void 0,r,c,o,h)),e=d,o.child){const u=o.child;t=Xt(e,u.length),Fl(e,n)&&Gf(t,i)&&SD(u,e,t,i,n,s,r+1,a)}a==null||a.set(o.openingBracket.text,c)}else{let c=e;for(const d of o.children){const h=c;c=Xt(c,d.length),Fl(h,n)&&Fl(i,c)&&SD(d,h,c,i,n,s,r,a)}}}class vq extends H{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new _n),this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(i=>{var n;(!i.languageId||((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.didLanguageChange(i.languageId)))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get canBuildAST(){return this.textModel.getValueLength()<=5e6}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new Q;this.bracketPairsTree.value=Cq(e.add(new _q(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!r)return null;const a=j0(this.getBracketPairsInRange(L.fromPositions(t,t))||[],l=>r.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{const r=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!a)return null;const l=a.textIsBracket[r];return l?_b(this._findMatchingBracketUp(l,n,vS(i))):null}}matchBracket(e,t){if(this.canBuildAST){const i=UO(this.getBracketPairsInRange(L.fromPositions(e,e)).filter(n=>n.closingBracketRange!==void 0&&(n.openingBracketRange.containsPosition(e)||n.closingBracketRange.containsPosition(e))),op(n=>n.openingBracketRange.containsPosition(e)?n.openingBracketRange:n.closingBracketRange,L.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{const i=vS(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),r=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let c=n-1;c>=0;c--){const d=t.getEndOffset(c);if(d<=a)break;if(mr(t.getStandardTokenType(c))||t.getLanguageId(c)!==r){a=d;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let c=n+1;c=l)break;if(mr(t.getStandardTokenType(c))||t.getLanguageId(c)!==r){l=d;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!mr(n.getStandardTokenType(r))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,n,a,r),d=null;for(;;){const h=lo.findNextBracketInRange(a.forwardRegex,i,s,l,c);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){const u=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),g=this._matchFoundBracket(h,a.textIsBracket[u],a.textIsOpenBracket[u],t);if(g){if(g instanceof Da)return null;d=g}}l=h.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){const l=r-1,c=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(l)).brackets;if(c&&!mr(n.getStandardTokenType(l))){const{searchStartOffset:d,searchEndOffset:h}=this._establishBracketSearchOffsets(e,n,c,l),u=lo.findPrevBracketInRange(c.reversedRegex,i,s,d,h);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){const g=s.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),f=this._matchFoundBracket(u,c.textIsBracket[g],c.textIsOpenBracket[g],t);if(f)return f instanceof Da?null:f}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof Da?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let r=-1,a=0;const l=(c,d,h,u)=>{for(;;){if(i&&++a%100===0&&!i())return Da.INSTANCE;const g=lo.findPrevBracketInRange(s,c,d,h,u);if(!g)break;const f=d.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(f)?r++:e.isClose(f)&&r--,r===0)return g;u=g.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){const d=this.textModel.tokenization.getLineTokens(c),h=d.getCount(),u=this.textModel.getLineContent(c);let g=h-1,f=u.length,_=u.length;c===t.lineNumber&&(g=d.findTokenIndexAtOffset(t.column-1),f=t.column-1,_=t.column-1);let b=!0;for(;g>=0;g--){const v=d.getLanguageId(g)===n&&!mr(d.getStandardTokenType(g));if(v)b?f=d.getStartOffset(g):(f=d.getStartOffset(g),_=d.getEndOffset(g));else if(b&&f!==_){const C=l(c,u,f,_);if(C)return C}b=v}if(b&&f!==_){const v=l(c,u,f,_);if(v)return v}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let r=1,a=0;const l=(d,h,u,g)=>{for(;;){if(i&&++a%100===0&&!i())return Da.INSTANCE;const f=lo.findNextBracketInRange(s,d,h,u,g);if(!f)break;const _=h.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(_)?r++:e.isClose(_)&&r--,r===0)return f;u=f.endColumn-1}return null},c=this.textModel.getLineCount();for(let d=t.lineNumber;d<=c;d++){const h=this.textModel.tokenization.getLineTokens(d),u=h.getCount(),g=this.textModel.getLineContent(d);let f=0,_=0,b=0;d===t.lineNumber&&(f=h.findTokenIndexAtOffset(t.column-1),_=t.column-1,b=t.column-1);let v=!0;for(;f=1;a--){const l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),d=this.textModel.getLineContent(a);let h=c-1,u=d.length,g=d.length;if(a===i.lineNumber){h=l.findTokenIndexAtOffset(i.column-1),u=i.column-1,g=i.column-1;const _=l.getLanguageId(h);n!==_&&(n=_,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let f=!0;for(;h>=0;h--){const _=l.getLanguageId(h);if(n!==_){if(s&&r&&f&&u!==g){const v=lo.findPrevBracketInRange(s.reversedRegex,a,d,u,g);if(v)return this._toFoundBracket(r,v);f=!1}n=_,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const b=!!s&&!mr(l.getStandardTokenType(h));if(b)f?u=l.getStartOffset(h):(u=l.getStartOffset(h),g=l.getEndOffset(h));else if(r&&s&&f&&u!==g){const v=lo.findPrevBracketInRange(s.reversedRegex,a,d,u,g);if(v)return this._toFoundBracket(r,v)}f=b}if(r&&s&&f&&u!==g){const _=lo.findPrevBracketInRange(s.reversedRegex,a,d,u,g);if(_)return this._toFoundBracket(r,_)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,r=null,a=null;for(let l=i.lineNumber;l<=n;l++){const c=this.textModel.tokenization.getLineTokens(l),d=c.getCount(),h=this.textModel.getLineContent(l);let u=0,g=0,f=0;if(l===i.lineNumber){u=c.findTokenIndexAtOffset(i.column-1),g=i.column-1,f=i.column-1;const b=c.getLanguageId(u);s!==b&&(s=b,r=this.languageConfigurationService.getLanguageConfiguration(s).brackets,a=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let _=!0;for(;u_.closingBracketRange!==void 0&&_.range.strictContainsRange(g));return f?[f.openingBracketRange,f.closingBracketRange]:null}const n=vS(t),s=this.textModel.getLineCount(),r=new Map;let a=[];const l=(g,f)=>{if(!r.has(g)){const _=[];for(let b=0,v=f?f.brackets.length:0;b{for(;;){if(n&&++c%100===0&&!n())return Da.INSTANCE;const C=lo.findNextBracketInRange(g.forwardRegex,f,_,b,v);if(!C)break;const w=_.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),S=g.textIsBracket[w];if(S&&(S.isOpen(w)?a[S.index]++:S.isClose(w)&&a[S.index]--,a[S.index]===-1))return this._matchFoundBracket(C,S,!1,n);b=C.endColumn-1}return null};let h=null,u=null;for(let g=i.lineNumber;g<=s;g++){const f=this.textModel.tokenization.getLineTokens(g),_=f.getCount(),b=this.textModel.getLineContent(g);let v=0,C=0,w=0;if(g===i.lineNumber){v=f.findTokenIndexAtOffset(i.column-1),C=i.column-1,w=i.column-1;const k=f.getLanguageId(v);h!==k&&(h=k,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,l(h,u))}let S=!0;for(;v<_;v++){const k=f.getLanguageId(v);if(h!==k){if(u&&S&&C!==w){const y=d(u,g,b,C,w);if(y)return _b(y);S=!1}h=k,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,l(h,u)}const x=!!u&&!mr(f.getStandardTokenType(v));if(x)S||(C=f.getStartOffset(v)),w=f.getEndOffset(v);else if(u&&S&&C!==w){const y=d(u,g,b,C,w);if(y)return _b(y)}S=x}if(u&&S&&C!==w){const k=d(u,g,b,C,w);if(k)return _b(k)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.textModel.getValueInRange(t);i=i.toLowerCase();const n=e.getBracketInfo(i);return n?{range:t,bracketInfo:n}:null}}function Cq(o,e){return{object:o,dispose:()=>e==null?void 0:e.dispose()}}function vS(o){if(typeof o>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=o}}class Da{constructor(){this._searchCanceledBrand=void 0}}Da.INSTANCE=new Da;function _b(o){return o instanceof Da?null:o}class wq extends H{constructor(e){super(),this.textModel=e,this.colorProvider=new fF,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i){if(t===void 0)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,s=this.textModel.bracketPairs.getBracketsInRange(e);for(const r of s)n.push({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range});return n}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new L(1,1,this.textModel.getLineCount(),1),e,t):[]}}class fF{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Et((o,e)=>{const t=[U4,$4,j4,K4,q4,G4],i=new fF;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${o.getColor(j$)}; }`);const n=t.map(s=>o.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}});function bb(o){return o.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class $i{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${bb(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${bb(this.oldText)}")`:`(replace@${this.oldPosition} "${bb(this.oldText)}" with "${bb(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;No(e,n,i),i+=4;for(let s=0;so.length)return!1;if(t){if(!vI(o,e))return!1;if(e.length===o.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,o.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),o.indexOf(e)===0}function mF(o){return o>=65&&o<=90||o>=97&&o<=122}function Lq(o,e=Yi){return e?mF(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}function _r(o){return Q0(o,!0)}class DE{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Bp(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===Me.file)return yD(_r(e),_r(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(pA(e.authority,t.authority))return yD(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return _e.joinPath(e,...t)}basenameOrAuthority(e){return Js(e)||e.authority}basename(e){return gi.basename(e.path)}extname(e){return gi.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Me.file?t=_e.file(sP(_r(e))).path:(t=gi.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===Me.file?t=_e.file(nP(_r(e))).path:t=gi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!pA(e.authority,t.authority))return;if(e.scheme===Me.file){const s=cB(_r(e),_r(t));return Yi?pF(s):s}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let s=0;for(const r=Math.min(i.length,n.length);sgA(i).length&&i[i.length-1]===t}else{const i=e.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Br){return mA(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Br){let i=!1;if(e.scheme===Me.file){const n=_r(e);i=n!==void 0&&n.length===gA(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=n.length===1&&n.charCodeAt(n.length-1)===47}return!i&&!mA(e,t)?e.with({path:e.path+"/"}):e}}const It=new DE(()=>!1);new DE(o=>o.scheme===Me.file?!dn:!0);new DE(o=>!0);const _F=It.isEqual.bind(It);It.isEqualOrParent.bind(It);It.getComparisonKey.bind(It);const Dq=It.basenameOrAuthority.bind(It),Js=It.basename.bind(It),kq=It.extname.bind(It),L1=It.dirname.bind(It),xq=It.joinPath.bind(It),Iq=It.normalizePath.bind(It),Eq=It.relativePath.bind(It),fA=It.resolvePath.bind(It);It.isAbsolutePath.bind(It);const pA=It.isEqualAuthority.bind(It),mA=It.hasTrailingPathSeparator.bind(It);It.removeTrailingPathSeparator.bind(It);It.addTrailingPathSeparator.bind(It);var cc;(function(o){o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(r=>{const[a,l]=r.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(o.META_DATA_MIME,s),i}o.parseMetaData=e})(cc||(cc={}));function Fh(o){return o.toString()}class Ni{constructor(e,t,i,n,s,r,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=r,this.changes=a}static create(e,t){const i=e.getAlternativeVersionId(),n=LD(e);return new Ni(i,i,n,n,t,t,[])}append(e,t,i,n,s){t.length>0&&(this.changes=Sq(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,i){if(No(e,t?t.length:0,i),i+=4,t)for(const n of t)No(e,n.selectionStartLineNumber,i),i+=4,No(e,n.selectionStartColumn,i),i+=4,No(e,n.positionLineNumber,i),i+=4,No(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Eo(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(_e.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Ni}append(e,t,i,n,s){this._data instanceof Ni&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Ni&&(this._data=this._data.serialize())}open(){this._data instanceof Ni||(this._data=Ni.deserialize(this._data))}undo(){if(_e.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ni&&(this._data=this._data.serialize());const e=Ni.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(_e.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ni&&(this._data=this._data.serialize());const e=Ni.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Ni&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Nq{constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const s=Fh(n.resource);this._editStackElementsMap.set(s,n)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Fh(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Fh(_e.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Fh(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const r=Fh(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Fh(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${Js(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function LD(o){return o.getEOL()===` +`?0:1}function ka(o){return o?o instanceof bF||o instanceof Nq:!1}class kE{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ka(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ka(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(ka(t)&&t.canAppend(this._model))return t;const i=new bF(p("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],LD(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),r=kE._computeCursorState(i,s),a=s.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),n.append(this._model,a.map(l=>l.textChange),LD(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Te(i),null}}}class Tq{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Aq(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(d===0){n.spacesDiff=h,h>0&&0<=l-1&&l-10?n++:S>1&&s++,Aq(r,a,b,w,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;const x=h.spacesDiff;x<=c&&d[x]++,r=b,a=w}let u=t;n!==s&&(u=n{const b=d[_];b>f&&(f=b,g=_)}),g===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function Mn(o){return(o.metadata&1)>>>0}function Lt(o,e){o.metadata=o.metadata&254|e<<0}function Zi(o){return(o.metadata&2)>>>1===1}function St(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function vF(o){return(o.metadata&4)>>>2===1}function bA(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function Mq(o){return(o.metadata&24)>>>3}function vA(o,e){o.metadata=o.metadata&231|e<<3}function Rq(o){return(o.metadata&32)>>>5===1}function CA(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class CF{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Lt(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,bA(this,!1),vA(this,1),CA(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,St(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;bA(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),vA(this,this.options.stickiness),CA(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Oe=new CF(null,0,0);Oe.parent=Oe;Oe.left=Oe;Oe.right=Oe;Lt(Oe,0);class CS{constructor(){this.root=Oe,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s){return this.root===Oe?[]:zq(this,e,t,i,n,s)}search(e,t,i){return this.root===Oe?[]:Hq(this,e,t,i)}collectNodesFromOwner(e){return Wq(this,e)}collectNodesPostOrder(){return Vq(this)}insert(e){wA(this,e),this._normalizeDeltaIfNecessary()}delete(e){SA(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){const s=Fq(this,e,e+t);for(let r=0,a=s.length;rt||i===1?!1:i===2?!0:e}function Pq(o,e,t,i,n){const s=Mq(o),r=s===0||s===2,a=s===1||s===2,l=t-e,c=i,d=Math.min(l,c),h=o.start;let u=!1;const g=o.end;let f=!1;e<=h&&g<=t&&Rq(o)&&(o.start=e,u=!0,o.end=e,f=!0);{const b=n?1:l>0?2:0;!u&&Bh(h,r,e,b)&&(u=!0),!f&&Bh(g,a,e,b)&&(f=!0)}if(d>0&&!n){const b=l>c?2:0;!u&&Bh(h,r,e+d,b)&&(u=!0),!f&&Bh(g,a,e+d,b)&&(f=!0)}{const b=n?1:0;!u&&Bh(h,r,t,b)&&(o.start=e+c,u=!0),!f&&Bh(g,a,t,b)&&(o.end=e+c,f=!0)}const _=c-l;u||(o.start=Math.max(0,h+_)),f||(o.end=Math.max(0,g+_)),o.start>o.end&&(o.end=o.start)}function Fq(o,e,t){let i=o.root,n=0,s=0,r=0,a=0;const l=[];let c=0;for(;i!==Oe;){if(Zi(i)){St(i.left,!1),St(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!Zi(i.left)){if(s=n+i.maxEnd,st){St(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(r,a,0),l[c++]=i),St(i,!0),i.right!==Oe&&!Zi(i.right)){n+=i.delta,i=i.right;continue}}return St(o.root,!1),l}function Bq(o,e,t,i){let n=o.root,s=0,r=0,a=0;const l=i-(t-e);for(;n!==Oe;){if(Zi(n)){St(n.left,!1),St(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),dc(n),n=n.parent;continue}if(!Zi(n.left)){if(r=s+n.maxEnd,rt){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(o.requestNormalizeDelta=!0),St(n,!0);continue}if(St(n,!0),n.right!==Oe&&!Zi(n.right)){s+=n.delta,n=n.right;continue}}St(o.root,!1)}function Wq(o,e){let t=o.root;const i=[];let n=0;for(;t!==Oe;){if(Zi(t)){St(t.left,!1),St(t.right,!1),t=t.parent;continue}if(t.left!==Oe&&!Zi(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),St(t,!0),t.right!==Oe&&!Zi(t.right)){t=t.right;continue}}return St(o.root,!1),i}function Vq(o){let e=o.root;const t=[];let i=0;for(;e!==Oe;){if(Zi(e)){St(e.left,!1),St(e.right,!1),e=e.parent;continue}if(e.left!==Oe&&!Zi(e.left)){e=e.left;continue}if(e.right!==Oe&&!Zi(e.right)){e=e.right;continue}t[i++]=e,St(e,!0)}return St(o.root,!1),t}function Hq(o,e,t,i){let n=o.root,s=0,r=0,a=0;const l=[];let c=0;for(;n!==Oe;){if(Zi(n)){St(n.left,!1),St(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(n.left!==Oe&&!Zi(n.left)){n=n.left;continue}r=s+n.start,a=s+n.end,n.setCachedOffsets(r,a,i);let d=!0;if(e&&n.ownerId&&n.ownerId!==e&&(d=!1),t&&vF(n)&&(d=!1),d&&(l[c++]=n),St(n,!0),n.right!==Oe&&!Zi(n.right)){s+=n.delta,n=n.right;continue}}return St(o.root,!1),l}function zq(o,e,t,i,n,s){let r=o.root,a=0,l=0,c=0,d=0;const h=[];let u=0;for(;r!==Oe;){if(Zi(r)){St(r.left,!1),St(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;continue}if(!Zi(r.left)){if(l=a+r.maxEnd,lt){St(r,!0);continue}if(d=a+r.end,d>=e){r.setCachedOffsets(c,d,s);let g=!0;i&&r.ownerId&&r.ownerId!==i&&(g=!1),n&&vF(r)&&(g=!1),g&&(h[u++]=r)}if(St(r,!0),r.right!==Oe&&!Zi(r.right)){a+=r.delta,r=r.right;continue}}return St(o.root,!1),h}function wA(o,e){if(o.root===Oe)return e.parent=Oe,e.left=Oe,e.right=Oe,Lt(e,0),o.root=e,o.root;Uq(o,e),Dl(e.parent);let t=e;for(;t!==o.root&&Mn(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;Mn(i)===1?(Lt(t.parent,0),Lt(i,0),Lt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,_p(o,t)),Lt(t.parent,0),Lt(t.parent.parent,1),bp(o,t.parent.parent))}else{const i=t.parent.parent.left;Mn(i)===1?(Lt(t.parent,0),Lt(i,0),Lt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,bp(o,t)),Lt(t.parent,0),Lt(t.parent.parent,1),_p(o,t.parent.parent))}return Lt(o.root,0),e}function Uq(o,e){let t=0,i=o.root;const n=e.start,s=e.end;for(;;)if(jq(n,s,i.start+t,i.end+t)<0)if(i.left===Oe){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===Oe){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=Oe,e.right=Oe,Lt(e,1)}function SA(o,e){let t,i;if(e.left===Oe?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Oe?(t=e.left,i=e):(i=$q(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(o.requestNormalizeDelta=!0)),i===o.root){o.root=t,Lt(t,0),e.detach(),wS(),dc(t),o.root.parent=Oe;return}const n=Mn(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,Lt(i,Mn(e)),e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Oe&&(i.left.parent=i),i.right!==Oe&&(i.right.parent=i)),e.detach(),n){Dl(t.parent),i!==e&&(Dl(i),Dl(i.parent)),wS();return}Dl(t),Dl(t.parent),i!==e&&(Dl(i),Dl(i.parent));let s;for(;t!==o.root&&Mn(t)===0;)t===t.parent.left?(s=t.parent.right,Mn(s)===1&&(Lt(s,0),Lt(t.parent,1),_p(o,t.parent),s=t.parent.right),Mn(s.left)===0&&Mn(s.right)===0?(Lt(s,1),t=t.parent):(Mn(s.right)===0&&(Lt(s.left,0),Lt(s,1),bp(o,s),s=t.parent.right),Lt(s,Mn(t.parent)),Lt(t.parent,0),Lt(s.right,0),_p(o,t.parent),t=o.root)):(s=t.parent.left,Mn(s)===1&&(Lt(s,0),Lt(t.parent,1),bp(o,t.parent),s=t.parent.left),Mn(s.left)===0&&Mn(s.right)===0?(Lt(s,1),t=t.parent):(Mn(s.left)===0&&(Lt(s.right,0),Lt(s,1),_p(o,s),s=t.parent.left),Lt(s,Mn(t.parent)),Lt(t.parent,0),Lt(s.left,0),bp(o,t.parent),t=o.root));Lt(t,0),wS()}function $q(o){for(;o.left!==Oe;)o=o.left;return o}function wS(){Oe.parent=Oe,Oe.delta=0,Oe.start=0,Oe.end=0}function _p(o,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Oe&&(t.left.parent=e),t.parent=e.parent,e.parent===Oe?o.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,dc(e),dc(t)}function bp(o,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(o.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Oe&&(t.right.parent=e),t.parent=e.parent,e.parent===Oe?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,dc(e),dc(t)}function wF(o){let e=o.end;if(o.left!==Oe){const t=o.left.maxEnd;t>e&&(e=t)}if(o.right!==Oe){const t=o.right.maxEnd+o.delta;t>e&&(e=t)}return e}function dc(o){o.maxEnd=wF(o)}function Dl(o){for(;o!==Oe;){const e=wF(o);if(o.maxEnd===e)return;o.maxEnd=e,o=o.parent}}function jq(o,e,t,i){return o===t?e-i:o-t}class DD{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Ie)return xE(this.right);let e=this;for(;e.parent!==Ie&&e.parent.left!==e;)e=e.parent;return e.parent===Ie?Ie:e.parent}prev(){if(this.left!==Ie)return SF(this.left);let e=this;for(;e.parent!==Ie&&e.parent.right!==e;)e=e.parent;return e.parent===Ie?Ie:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Ie=new DD(null,0);Ie.parent=Ie;Ie.left=Ie;Ie.right=Ie;Ie.color=0;function xE(o){for(;o.left!==Ie;)o=o.left;return o}function SF(o){for(;o.right!==Ie;)o=o.right;return o}function IE(o){return o===Ie?0:o.size_left+o.piece.length+IE(o.right)}function EE(o){return o===Ie?0:o.lf_left+o.piece.lineFeedCnt+EE(o.right)}function SS(){Ie.parent=Ie}function vp(o,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==Ie&&(t.left.parent=e),t.parent=e.parent,e.parent===Ie?o.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Cp(o,e){const t=e.left;e.left=t.right,t.right!==Ie&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===Ie?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function vb(o,e){let t,i;if(e.left===Ie?(i=e,t=i.right):e.right===Ie?(i=e,t=i.left):(i=xE(e.right),t=i.right),i===o.root){o.root=t,t.color=0,e.detach(),SS(),o.root.parent=Ie;return}const n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,Zf(o,t)):(i.parent===e?t.parent=i:t.parent=i.parent,Zf(o,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Ie&&(i.left.parent=i),i.right!==Ie&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,Zf(o,i)),e.detach(),t.parent.left===t){const r=IE(t),a=EE(t);if(r!==t.parent.size_left||a!==t.parent.lf_left){const l=r-t.parent.size_left,c=a-t.parent.lf_left;t.parent.size_left=r,t.parent.lf_left=a,ma(o,t.parent,l,c)}}if(Zf(o,t.parent),n){SS();return}let s;for(;t!==o.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,vp(o,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,Cp(o,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,vp(o,t.parent),t=o.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,Cp(o,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,vp(o,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,Cp(o,t.parent),t=o.root));t.color=0,SS()}function yA(o,e){for(Zf(o,e);e!==o.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,vp(o,e)),e.parent.color=0,e.parent.parent.color=1,Cp(o,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Cp(o,e)),e.parent.color=0,e.parent.parent.color=1,vp(o,e.parent.parent))}o.root.color=0}function ma(o,e,t,i){for(;e!==o.root&&e!==Ie;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function Zf(o,e){let t=0,i=0;if(e!==o.root){for(;e!==o.root&&e===e.parent.right;)e=e.parent;if(e!==o.root)for(e=e.parent,t=IE(e.left)-e.size_left,i=EE(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i;e!==o.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}const ca=65535;function yF(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class Kq{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Ca(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n126)&&(r=!1)}const a=new Kq(yF(o),i,n,s,r);return o.length=0,a}class qn{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class Jc{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Gq{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Ie&&e.iterate(e.root,i=>(i!==Ie&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Zq{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class Yq{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Jc("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Ie,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,r=e.length;s0){e[s].lineStarts||(e[s].lineStarts=Ca(e[s].buffer));const a=new qn(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,a)}this._searchCache=new Zq(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=ca,i=t-Math.floor(t/3),n=i*2;let s="",r=0;const a=[];if(this.iterate(this.root,l=>{const c=this.getNodeContent(l),d=c.length;if(r<=i||r+d0){const l=s.replace(/\r\n|\r|\n/g,e);a.push(new Jc(l,Ca(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Gq(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Ie;)if(n.left!==Ie&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+=s+t-1}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==Ie;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){const r=this.getOffsetAt(i+1,1),a=n-r;return new B(i+1,a+1)}return new B(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Ie){const s=this.getOffsetAt(i+1,1),r=n-e-s;return new B(i+1,r+1)}else t=t.right;return new B(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let r=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==Ie;){const a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=a.substring(l,l+t.remainder);break}else r+=a.substr(l,i.piece.length);i=i.next()}return r}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===Ie)return!0;const r=s.piece;let a=r.length;if(a===0)return!0;const l=this._buffers[r.bufferIndex].buffer,c=this._buffers[r.bufferIndex].lineStarts,d=r.start.line,h=r.end.line;let u=c[d]+r.start.column;if(n&&(l.charCodeAt(u)===10&&(u++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(d===h)return!this._EOLNormalized&&l.charCodeAt(u+a-1)===13?(n=!0,i+=l.substr(u,a-1)):i+=l.substr(u,a),!0;i+=this._EOLNormalized?l.substring(u,Math.max(u,c[d+1]-this._EOLLength)):l.substring(u,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let g=d+1;gS+f,t.reset(0)):(C=u.buffer,w=S=>S,t.reset(f));do if(b=t.next(C),b){if(w(b.index)>=_)return d;this.positionInBuffer(e,w(b.index)-g,v);const S=this.getLineFeedCnt(e.piece.bufferIndex,s,v),k=v.line===s.line?v.column-s.column+n:v.column+1,x=k+b[0].length;if(h[d++]=Gc(new L(i+S,k,i+S,x),b,l),w(b.index)+b[0].length>=_||d>=c)return d}while(b);return d}findMatchesLineByLine(e,t,i,n){const s=[];let r=0;const a=new du(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let d=this.positionInBuffer(l.node,l.remainder);const h=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,h,t,i,n,r,s),s;let u=e.startLineNumber,g=l.node;for(;g!==c.node;){const _=this.getLineFeedCnt(g.piece.bufferIndex,d,g.piece.end);if(_>=1){const v=this._buffers[g.piece.bufferIndex].lineStarts,C=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),w=v[d.line+_],S=u===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(g,a,u,S,d,this.positionInBuffer(g,w-C),t,i,n,r,s),r>=n)return s;u+=_}const b=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const v=this.getLineContent(u).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,a,v,e.endLineNumber,b,r,s,i,n),s}if(r=this._findMatchesInLine(t,a,this.getLineContent(u).substr(b),u,b,r,s,i,n),r>=n)return s;u++,l=this.nodeAt2(u,1),g=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(u===e.endLineNumber){const _=u===e.startLineNumber?e.startColumn-1:0,b=this.getLineContent(u).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,a,b,e.endLineNumber,_,r,s,i,n),s}const f=u===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(c.node,a,u,f,d,h,t,i,n,r,s),s}_findMatchesInLine(e,t,i,n,s,r,a,l,c){const d=e.wordSeparators;if(!l&&e.simpleSearch){const u=e.simpleSearch,g=u.length,f=i.length;let _=-g;for(;(_=i.indexOf(u,_+g))!==-1;)if((!d||FI(d,i,f,_,g))&&(a[r++]=new Vp(new L(n,_+1+s,n,_+1+g+s),null),r>=c))return r;return r}let h;t.reset(0);do if(h=t.next(i),h&&(a[r++]=Gc(new L(n,h.index+1+s,n,h.index+1+h[0].length+s),h,l),r>=c))return r;while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Ie){const{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,c=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&r+a.length===e&&t.lengthe){const d=[];let h=new qn(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){const _={line:h.start.line+1,column:0};h=new qn(h.bufferIndex,_,h.end,this.getLineFeedCnt(h.bufferIndex,_,h.end),h.length-1),t+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const _=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,_),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);const u=this.createNewPieces(t);h.length>0&&this.rbInsertRight(n,h);let g=n;for(let f=0;f=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` `);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let r=1;r=u)c=h+1;else break;return i?(i.line=h,i.column=l-g,null):{line:h,column:l-g}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tca){const d=[];for(;e.length>ca;){const u=e.charCodeAt(ca-1);let g;u===13||u>=55296&&u<=56319?(g=e.substring(0,ca-1),e=e.substring(ca-1)):(g=e.substring(0,ca),e=e.substring(ca));const f=Ca(g);d.push(new qn(this._buffers.length,{line:0,column:0},{line:f.length-1,column:g.length-f[f.length-1]},f.length-1,g.length)),this._buffers.push(new Jc(g,f))}const h=Ca(e);return d.push(new qn(this._buffers.length,{line:0,column:0},{line:h.length-1,column:e.length-h[h.length-1]},h.length-1,e.length)),this._buffers.push(new Jc(e,h)),d}let t=this._buffers[0].buffer.length;const i=Ca(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(h+l,h+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(d+l,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Ie;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(l,l+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Ie;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),c=l-n,d=a-s,h=i.length+d;e.piece=new qn(i.bufferIndex,i.start,r,l,h),ma(this,e,d,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),r=t,a=this.getLineFeedCnt(i.bufferIndex,r,i.end),l=this.offsetInBuffer(i.bufferIndex,r),c=a-n,d=s-l,h=i.length+d;e.piece=new qn(i.bufferIndex,r,i.end,a,h),ma(this,e,d,c)}shrinkNode(e,t,i){const n=e.piece,s=n.start,r=n.end,a=n.length,l=n.lineFeedCnt,c=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,c),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new qn(n.bufferIndex,n.start,c,d,h),ma(this,e,h-a,d-l);const u=new qn(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),g=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(g)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` `);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Ca(t,!1);for(let g=0;ge)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==Ie;)if(i.left!==Ie&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==Ie;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Ie||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Ie||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new qn(e.piece.bufferIndex,e.piece.start,s,a,r),ma(this,e,-1,-1),e.piece.length===0&&i.push(e);const l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new qn(t.piece.bufferIndex,l,t.piece.end,d,c),ma(this,t,-1,-1),t.piece.length===0&&i.push(t);const h=this.createNewPieces(`\r `);this.rbInsertRight(e,h[0]);for(let u=0;ub.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const g=this._doApplyEdits(l);let f=null;if(t&&h.length>0){h.sort((_,b)=>b.lineNumber-_.lineNumber),f=[];for(let _=0,b=h.length;_0&&h[_-1].lineNumber===v)continue;const C=h[_].oldContent,w=this.getLineContent(v);w.length===0||w===C||kn(w)!==-1||f.push(v)}}return this._onDidChangeContent.fire(),new eW(u,g,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new L(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const l=[];for(let g=0,f=e.length;g0&&l.push(_.text),r=b.endLineNumber,a=b.endColumn}const c=l.join(""),[d,h,u]=Hd(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(zu._sortOpsDescending);const t=[];for(let i=0;i0){const u=l.eolCount+1;u===1?h=new L(c,d,c,d+l.firstLineLength):h=new L(c,d,c+u-1,l.lastLineLength+1)}else h=new L(c,d,c,d);i=h.endLineNumber,n=h.endColumn,t.push(h),s=l}return t}static _sortOpsAscending(e,t){const i=L.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=L.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class Qq{constructor(e,t,i,n,s,r,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` @@ -94,7 +94,7 @@ var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,config `:` `}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r `&&(this._cr>0||this._lf>0)||t===` -`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=qq(this._tmpLineStarts,e);this.chunks.push(new Jc(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=eg(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=pP(e))}finish(e=!0){return this._finish(),new Qq(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Ca(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class Xq{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class yS{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new Xq(e,[t]))}finalize(){return this._tokens}}class LA{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const i=[];for(let n=0;n{const s=this._textModel.getLanguageId();n.changedLanguages.indexOf(s)!==-1&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}tokenizeViewport(e,t){const i=new yS;this._tokenizeViewport(i,e,t),this._tokenizationPart.setTokens(i.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(e){const t=new yS;this._updateTokensUntilLine(t,e),this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),r=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=Df(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,r,!0,i),l=new Di(a.tokens,r,this._languageIdCodec);if(l.getCount()===0)return 0;const c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const r=this._tokenizationStateStore.getBeginState(n-1);if(!r)return null;const a=this._textModel.getLineContent(n),l=a.substring(0,s-1)+i+a.substring(s-1+t),c=this._textModel.getLanguageIdAtPosition(n,0),d=Df(this._languageIdCodec,c,this._tokenizationStateStore.tokenizationSupport,l,!0,r);return new Di(d.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return e>t?!1:e=this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(e){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationStateStore)return;const i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),s=t-1;for(let r=this._tokenizationStateStore.invalidLineStartIndex;r<=s;r++){const a=this._textModel.getLineContent(r+1),l=this._tokenizationStateStore.getBeginState(r),c=Df(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,a,!0,l);e.add(r+1,c.tokens),this._tokenizationStateStore.setEndState(n,r,c.endState),r=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationStateStore||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(e,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(t);const s=[];let r=null;for(let c=t-1;n>1&&c>=1;c--){const d=this._textModel.getLineFirstNonWhitespaceColumn(c);if(d!==0&&d=0;c--)l=Df(this._languageIdCodec,a,this._tokenizationStateStore.tokenizationSupport,s[c],!1,l).endState;for(let c=t;c<=i;c++){const d=this._textModel.getLineContent(c),h=Df(this._languageIdCodec,a,this._tokenizationStateStore.tokenizationSupport,d,!0,l);e.add(c,h.tokens),this._tokenizationStateStore.markMustBeTokenized(c-1),l=h.endState}}}function tG(o,e){if(o.isTooLargeForTokenization())return[null,null];const t=Wt.get(e.getLanguageId());if(!t)return[null,null];let i;try{i=t.getInitialState()}catch(n){return Te(n),[null,null]}return[t,i]}function Df(o,e,t,i,n,s){let r=null;if(t)try{r=t.tokenizeEncoded(i,n,s.clone())}catch(a){Te(a)}return r||(r=qC(o.encodeLanguageId(e),s)),Di.convertToEndOffset(r.tokens,i.length),r}const wa=new Uint32Array(0).buffer;class Cr{static deleteBeginning(e,t){return e===null||e===wa?e:Cr.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===wa)return e;const i=Aa(e),n=i[i.length-2];return Cr.delete(e,t,n)}static delete(e,t,i){if(e===null||e===wa||t===i)return e;const n=Aa(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return wa;const r=Di.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,l=n[r<<1];if(id&&(n[c++]=f,n[c++]=n[(g<<1)+1],d=f)}if(c===n.length)return e;const u=new Uint32Array(c);return u.set(n.subarray(0,c),0),u.buffer}static append(e,t){if(t===wa)return e;if(e===wa)return t;if(e===null)return e;if(t===null)return null;const i=Aa(e),n=Aa(t),s=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let a=i.length;const l=i[i.length-2];for(let c=0;c>>1;let r=Di.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let a=r;a1&&(s=qi.getLanguageId(n[1])!==e),!s)return wa}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=DA(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Cr.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Cr.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len)){if(t===0){this._lineTokens[n]=Cr.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=Cr.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Cr.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}}function DA(o){return(o<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}class NE{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),r=t[t.length-1].getRange();if(!s||!r)return e;i=e.plusRange(s).plusRange(r)}let n=null;for(let s=0,r=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,r--;continue}if(a.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[l,c]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}c.isEmpty()||(this._pieces.splice(s,1,l,c),s++,r++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=RC(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;const i=this._pieces;if(i.length===0)return t;const n=NE._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const r=t.getCount(),a=s.getCount();let l=0;const c=[];let d=0,h=0;const u=(g,f)=>{g!==h&&(h=g,c[d++]=g,c[d++]=f)};for(let g=0;g>>0,C=~v>>>0;for(;lt)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(const r of this._pieces)r.acceptEdit(e,t,i,n,s)}}class Rv extends n5{constructor(e,t,i,n,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this.bracketPairsTextModelPart=n,this._languageId=s,this._onDidChangeLanguage=this._register(new R),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new R),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new R),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new R),this._tokens=new Mv(this._languageService.languageIdCodec),this._semanticTokens=new NE(this._languageService.languageIdCodec),this._tokenization=new eG(i,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange(r=>{r.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})}acceptEdit(e,t,i,n,s){this._tokens.acceptEdit(e,i,n),this._semanticTokens.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(e){this._tokenization.handleDidChangeContent(e)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(this._backgroundTokenizationState===2)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setTokens(e,t=!1){if(e.length!==0){const i=[];for(let n=0,s=e.length;n0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:i})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._textModel.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getTokenTypeIfInsertingCharacter(e,t,i){const n=this._textModel.validatePosition(new B(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this._textModel.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[r,a]=Rv._findLanguageBoundaries(n,s),l=Mp(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(r,a),r);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&r===t.column-1){const[c,d]=Rv._findLanguageBoundaries(n,s-1),h=Mp(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(c,d),c);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn)return h}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let s=e.getLineContent().length;for(let r=t,a=e.getCount();r=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LS=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function nG(o){const e=new L5;return e.acceptChunk(o),e.finish()}function sG(o){const e=new L5;let t;for(;typeof(t=o.read())=="string";)e.acceptChunk(t);return e.finish()}function kA(o,e){let t;return typeof o=="string"?t=nG(o):XB(o)?t=sG(o):t=o,t.create(e)}let Cb=0;const oG=999,rG=1e4;class aG{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const kf=()=>{throw new Error("Invalid change accessor")};let il=class Yf extends H{constructor(e,t,i,n=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new R),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new hG(u=>this.handleBeforeFireDecorationsChangedEvent(u))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new R),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new R),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new R),this._eventEmitter=this._register(new uG),this._deltaDecorationCallCnt=0,Cb++,this.id="$model"+Cb,this.isForSimpleWidget=i.isForSimpleWidget,typeof n>"u"||n===null?this._associatedResource=_e.parse("inmemory://model/"+Cb):this._associatedResource=n,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=kA(e,i.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Yf.resolveOptions(this._buffer,i),this._bracketPairs=this._register(new vq(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Kj(this,this._languageConfigurationService)),this._decorationProvider=this._register(new wq(this)),this._tokenizationTextModelPart=new Rv(this._languageService,this._languageConfigurationService,this,this._bracketPairs,t);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new L(1,1,d,this._buffer.getLineLength(d)+1),0);i.largeFileOptimizations?this._isTooLargeForTokenization=h>Yf.LARGE_FILE_SIZE_THRESHOLD||d>Yf.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=h>Yf.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=mP(Cb),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new xA,this._commandManager=new kE(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){const i=_A(e,t.tabSize,t.insertSpaces);return new p0({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new p0({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return qo(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new zu([],"",` +`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=qq(this._tmpLineStarts,e);this.chunks.push(new Jc(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=eg(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=pP(e))}finish(e=!0){return this._finish(),new Qq(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Ca(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class Xq{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class yS{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new Xq(e,[t]))}finalize(){return this._tokens}}class LA{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const i=[];for(let n=0;n{const s=this._textModel.getLanguageId();n.changedLanguages.indexOf(s)!==-1&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}tokenizeViewport(e,t){const i=new yS;this._tokenizeViewport(i,e,t),this._tokenizationPart.setTokens(i.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(e){const t=new yS;this._updateTokensUntilLine(t,e),this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),r=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=Df(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,r,!0,i),l=new Di(a.tokens,r,this._languageIdCodec);if(l.getCount()===0)return 0;const c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const r=this._tokenizationStateStore.getBeginState(n-1);if(!r)return null;const a=this._textModel.getLineContent(n),l=a.substring(0,s-1)+i+a.substring(s-1+t),c=this._textModel.getLanguageIdAtPosition(n,0),d=Df(this._languageIdCodec,c,this._tokenizationStateStore.tokenizationSupport,l,!0,r);return new Di(d.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return e>t?!1:e=this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(e){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationStateStore)return;const i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),s=t-1;for(let r=this._tokenizationStateStore.invalidLineStartIndex;r<=s;r++){const a=this._textModel.getLineContent(r+1),l=this._tokenizationStateStore.getBeginState(r),c=Df(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,a,!0,l);e.add(r+1,c.tokens),this._tokenizationStateStore.setEndState(n,r,c.endState),r=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationStateStore||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(e,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(t);const s=[];let r=null;for(let c=t-1;n>1&&c>=1;c--){const d=this._textModel.getLineFirstNonWhitespaceColumn(c);if(d!==0&&d=0;c--)l=Df(this._languageIdCodec,a,this._tokenizationStateStore.tokenizationSupport,s[c],!1,l).endState;for(let c=t;c<=i;c++){const d=this._textModel.getLineContent(c),h=Df(this._languageIdCodec,a,this._tokenizationStateStore.tokenizationSupport,d,!0,l);e.add(c,h.tokens),this._tokenizationStateStore.markMustBeTokenized(c-1),l=h.endState}}}function tG(o,e){if(o.isTooLargeForTokenization())return[null,null];const t=Wt.get(e.getLanguageId());if(!t)return[null,null];let i;try{i=t.getInitialState()}catch(n){return Te(n),[null,null]}return[t,i]}function Df(o,e,t,i,n,s){let r=null;if(t)try{r=t.tokenizeEncoded(i,n,s.clone())}catch(a){Te(a)}return r||(r=qC(o.encodeLanguageId(e),s)),Di.convertToEndOffset(r.tokens,i.length),r}const wa=new Uint32Array(0).buffer;class Cr{static deleteBeginning(e,t){return e===null||e===wa?e:Cr.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===wa)return e;const i=Aa(e),n=i[i.length-2];return Cr.delete(e,t,n)}static delete(e,t,i){if(e===null||e===wa||t===i)return e;const n=Aa(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return wa;const r=Di.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,l=n[r<<1];if(id&&(n[c++]=f,n[c++]=n[(g<<1)+1],d=f)}if(c===n.length)return e;const u=new Uint32Array(c);return u.set(n.subarray(0,c),0),u.buffer}static append(e,t){if(t===wa)return e;if(e===wa)return t;if(e===null)return e;if(t===null)return null;const i=Aa(e),n=Aa(t),s=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let a=i.length;const l=i[i.length-2];for(let c=0;c>>1;let r=Di.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let a=r;a1&&(s=qi.getLanguageId(n[1])!==e),!s)return wa}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=DA(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Cr.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Cr.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len)){if(t===0){this._lineTokens[n]=Cr.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=Cr.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Cr.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}}function DA(o){return(o<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}class NE{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),r=t[t.length-1].getRange();if(!s||!r)return e;i=e.plusRange(s).plusRange(r)}let n=null;for(let s=0,r=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,r--;continue}if(a.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[l,c]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}c.isEmpty()||(this._pieces.splice(s,1,l,c),s++,r++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=RC(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;const i=this._pieces;if(i.length===0)return t;const n=NE._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const r=t.getCount(),a=s.getCount();let l=0;const c=[];let d=0,h=0;const u=(g,f)=>{g!==h&&(h=g,c[d++]=g,c[d++]=f)};for(let g=0;g>>0,C=~v>>>0;for(;lt)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(const r of this._pieces)r.acceptEdit(e,t,i,n,s)}}class Rv extends nF{constructor(e,t,i,n,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this.bracketPairsTextModelPart=n,this._languageId=s,this._onDidChangeLanguage=this._register(new R),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new R),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new R),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new R),this._tokens=new Mv(this._languageService.languageIdCodec),this._semanticTokens=new NE(this._languageService.languageIdCodec),this._tokenization=new eG(i,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange(r=>{r.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})}acceptEdit(e,t,i,n,s){this._tokens.acceptEdit(e,i,n),this._semanticTokens.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(e){this._tokenization.handleDidChangeContent(e)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(this._backgroundTokenizationState===2)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setTokens(e,t=!1){if(e.length!==0){const i=[];for(let n=0,s=e.length;n0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:i})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._textModel.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getTokenTypeIfInsertingCharacter(e,t,i){const n=this._textModel.validatePosition(new B(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this._textModel.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[r,a]=Rv._findLanguageBoundaries(n,s),l=Mp(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(r,a),r);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&r===t.column-1){const[c,d]=Rv._findLanguageBoundaries(n,s-1),h=Mp(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(c,d),c);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn)return h}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let s=e.getLineContent().length;for(let r=t,a=e.getCount();r=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LS=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function nG(o){const e=new LF;return e.acceptChunk(o),e.finish()}function sG(o){const e=new LF;let t;for(;typeof(t=o.read())=="string";)e.acceptChunk(t);return e.finish()}function kA(o,e){let t;return typeof o=="string"?t=nG(o):XB(o)?t=sG(o):t=o,t.create(e)}let Cb=0;const oG=999,rG=1e4;class aG{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const kf=()=>{throw new Error("Invalid change accessor")};let il=class Yf extends H{constructor(e,t,i,n=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new R),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new hG(u=>this.handleBeforeFireDecorationsChangedEvent(u))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new R),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new R),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new R),this._eventEmitter=this._register(new uG),this._deltaDecorationCallCnt=0,Cb++,this.id="$model"+Cb,this.isForSimpleWidget=i.isForSimpleWidget,typeof n>"u"||n===null?this._associatedResource=_e.parse("inmemory://model/"+Cb):this._associatedResource=n,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=kA(e,i.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Yf.resolveOptions(this._buffer,i),this._bracketPairs=this._register(new vq(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Kj(this,this._languageConfigurationService)),this._decorationProvider=this._register(new wq(this)),this._tokenizationTextModelPart=new Rv(this._languageService,this._languageConfigurationService,this,this._bracketPairs,t);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new L(1,1,d,this._buffer.getLineLength(d)+1),0);i.largeFileOptimizations?this._isTooLargeForTokenization=h>Yf.LARGE_FILE_SIZE_THRESHOLD||d>Yf.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=h>Yf.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=mP(Cb),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new xA,this._commandManager=new kE(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){const i=_A(e,t.tabSize,t.insertSpaces);return new p0({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new p0({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return qo(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new zu([],"",` `,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=H.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new vd(e,t)))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:t,disposable:i}=kA(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:r,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new xA,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Vu([new yK],this._versionId,!1,!1),this._createContentChanged2(new L(1,1,s,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r `:` `;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Vu([new kK],this._versionId,!1,!1),this._createContentChanged2(new L(1,1,s,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=rG?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.indentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new p0({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const i=_A(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),Sv(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(fP.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new aG(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` @@ -103,17 +103,17 @@ var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,config `)<0){const c=new $c(e,i,n,s).parseSearchRequest();if(!c)return null;const d=this.getLineCount();let h=new L(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),u=this.findMatchesLineByLine(h,c,r,1);return J_.findNextMatch(this,new $c(e,i,n,s),a,r),u.length>0||(h=new L(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),u=this.findMatchesLineByLine(h,c,r,1),u.length>0)?u[0]:null}return J_.findNextMatch(this,new $c(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);return J_.findPreviousMatch(this,new $c(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` `?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Ww?e:new Ww(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(r.range),text:r.text}));let s=!0;if(e)for(let r=0,a=e.length;rl.endLineNumber,f=l.startLineNumber>u.endLineNumber;if(!g&&!f){c=!0;break}}if(!c){s=!1;break}}if(s)for(let r=0,a=this._trimAutoWhitespaceLines.length;rg.endLineNumber)&&!(l===g.startLineNumber&&g.startColumn===c&&g.isEmpty()&&f&&f.length>0&&f.charAt(0)===` `)&&!(l===g.startLineNumber&&g.startColumn===1&&g.isEmpty()&&f&&f.length>0&&f.charAt(f.length-1)===` -`)){d=!1;break}}if(d){const h=new L(l,1,l,c);t.push(new Ww(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,r.length!==0){for(let c=0,d=r.length;c=0;I--){const O=g+I,F=w+I;D.takeFromEndWhile(j=>j.lineNumber>F);const z=D.takeFromEndWhile(j=>j.lineNumber===F);a.push(new lA(O,this.getLineContent(F),z))}if(v<_){const I=g+v;a.push(new LK(I+1,f))}if(vye.lineNumberye.lineNumber===Se)}a.push(new DK(O+1,g+b,re,j))}l+=C}this._emitContentChangedEvent(new Vu(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=Array.from(e).map(n=>new lA(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new o5(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(s,EA(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){Te(s)}return i.addDecoration=kf,i.changeDecoration=kf,i.changeDecorationOptions=kf,i.removeDecoration=kf,i.deltaDecorations=kf,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),Te(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:IA[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),n.setOptions(IA[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){const s=this.getLineCount(),r=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a),c=new L(r,1,a,l),d=this._getDecorationsInRange(c,i,n);return kT(d,this._decorationProvider.getDecorationsInRange(c,i,n)),d}getDecorationsInRange(e,t=0,i=!1){const n=this.validateRange(e),s=this._getDecorationsInRange(n,t,i);return kT(s,this._decorationProvider.getDecorationsInRange(n,t,i)),s}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return er.fromDecorations(n).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,s,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!!(i.options.overviewRuler&&i.options.overviewRuler.color),s=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber)}if(i.options.before||t.before){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;const c=new Array(a);for(;ra.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,i,n){const s=e.getVersionId(),r=this._search(t,i,n,s);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const s=this._decorationsTree0.search(e,t,n),r=this._decorationsTree1.search(e,t,n),a=this._injectedTextDecorationsTree.search(e,t,n);return s.concat(r).concat(a)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){kS(e)?this._injectedTextDecorationsTree.insert(e):DS(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){kS(e)?this._injectedTextDecorationsTree.delete(e):DS(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){kS(e)?this._injectedTextDecorationsTree.resolveNode(e,t):DS(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function da(o){return o.replace(/[^a-z0-9\-_]/gi," ")}class k5{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class cG extends k5{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Zs.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class dG extends k5{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?W.fromHex(e):t.getColor(e.id)}}class zd{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof zd?e:new zd(e)}}class Ne{constructor(e){var t,i;this.description=e.description,this.blockClassName=e.blockClassName?da(e.blockClassName):null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?da(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new cG(e.overviewRuler):null,this.minimap=e.minimap?new dG(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?da(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?da(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?da(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?da(e.marginClassName):null,this.inlineClassName=e.inlineClassName?da(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?da(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?da(e.afterContentClassName):null,this.after=e.after?zd.from(e.after):null,this.before=e.before?zd.from(e.before):null,this.hideInCommentTokens=(t=e.hideInCommentTokens)!==null&&t!==void 0?t:!1,this.hideInStringTokens=(i=e.hideInStringTokens)!==null&&i!==void 0?i:!1}static register(e){return new Ne(e)}static createDynamic(e){return new Ne(e)}}Ne.EMPTY=Ne.register({description:"empty"});const IA=[Ne.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ne.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ne.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ne.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function EA(o){return o instanceof Ne?o:Ne.createDynamic(o)}class hG extends H{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new R),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const t={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(t)}(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!(e.minimap&&e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(e.overviewRuler&&e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class uG extends H{constructor(){super(),this._fastEmitter=this._register(new R),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new R),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}var gG=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const NA={getInitialState:()=>ng,tokenizeEncoded:(o,e,t)=>qC(0,t)};function fG(o,e,t){return gG(this,void 0,void 0,function*(){if(!t)return TA(e,o.languageIdCodec,NA);const i=yield Wt.getOrCreate(t);return TA(e,o.languageIdCodec,i||NA)})}function pG(o,e,t,i,n,s,r){let a="
",l=i,c=0,d=!0;for(let h=0,u=e.getCount();h0;)r&&d?(f+=" ",d=!1):(f+=" ",d=!0),b--;break}case 60:f+="<",d=!1;break;case 62:f+=">",d=!1;break;case 38:f+="&",d=!1;break;case 0:f+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:f+="\uFFFD",d=!1;break;case 13:f+="​",d=!1;break;case 32:r&&d?(f+=" ",d=!1):(f+=" ",d=!0);break;default:f+=String.fromCharCode(_),d=!1}}if(a+=`${f}`,g>n||l>=n)break}return a+="
",a}function TA(o,e,t){let i='
';const n=jr(o);let s=t.getInitialState();for(let r=0,a=n.length;r0&&(i+="
");const c=t.tokenizeEncoded(l,!0,s);Di.convertToEndOffset(c.tokens,l.length);const h=new Di(c.tokens,l,e).inflate();let u=0;for(let g=0,f=h.getCount();g${_I(l.substring(u,b))}`,u=b}s=c.endState}return i+="
",i}class mG{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class _G{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}class um{constructor(e,t,i,n){this._instanceId=mP(++um.INSTANCE_COUNT),this._pendingChanges=new mG,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,n=n|0,s=s|0,r=r|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new _G(l,n,s,r,a)),l},changeOneWhitespace:(n,s,r)=>{t=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const n=new Set;for(const l of i)n.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const r=l=>{const c=[];for(const d of l)if(!n.has(d.id)){if(s.has(d.id)){const h=s.get(d.id);d.afterLineNumber=h.newAfterLineNumber,d.height=h.newHeight}c.push(d)}return c},a=r(this._arr).concat(r(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=um.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i1?i=this._lineHeight*(e-1):i=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;const i=this._lineHeight*e,n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,i=this._lineHeight;let n=1,s=t;for(;n=a+i)n=r+1;else{if(e>=a)return r;s=r}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this._lineHeight,n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let r=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const l=this.getWhitespacesCount()|0;let c,d;a===-1?(a=l,d=r+1,c=0):(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let h=s,u=h;const g=5e5;let f=0;s>=g&&(f=Math.floor(s/g)*g,f=Math.floor(f/i)*i,u-=f);const _=[],b=e+(t-e)/2;let v=-1;for(let k=n;k<=r;k++){if(v===-1){const x=h,y=h+i;(x<=b&&bb)&&(v=k)}for(h+=i,_[k-n]=u,u+=i;d===k;)u+=c,h+=c,a++,a>=l?d=r+1:(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(h>=t){r=k;break}}v===-1&&(v=r);const C=this.getVerticalOffsetForLineNumber(r)|0;let w=n,S=r;return wt&&S--,{bigNumbersDelta:f,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:_,centeredLineNumber:v,completelyVisibleStartLineNumber:w,completelyVisibleEndLineNumber:S}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeight*t:i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t=a+l)t=r+1;else{if(e>=a)return r;i=r}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let r=i;r<=n;r++){const a=this.getVerticalOffsetForWhitespaceIndex(r),l=this.getHeightForWhitespaceIndex(r);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}}um.INSTANCE_COUNT=0;const bG=125;class Qf{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class vG extends H{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new R),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Qf(0,0,0,0),this._scrollable=this._register(new f_({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new bE(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class CG extends H{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(133),r=n.get(77);this._linesLayout=new um(t,n.get(61),r.top,r.bottom),this._scrollable=this._register(new vG(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Qf(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(105)?bG:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(61)&&this._linesLayout.setLineHeight(t.get(61)),e.hasChanged(77)){const i=t.get(77);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(133)){const i=t.get(133),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),a=r.contentWidth;this._scrollable.setScrollDimensions(new Qf(n,r.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(105)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(94);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(96)?s+=Math.max(0,t-n.get(61)-n.get(77).bottom):s+=this._getHorizontalScrollbarHeight(e,i),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Qf(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new u2(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new u2(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(134),n=t.get(46),s=t.get(133);if(i.isViewportWrapping){const r=t.get(67);return e>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?e+s.verticalScrollbarWidth:e}else{const r=t.get(95)*n.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+r+s.verticalScrollbarWidth,a)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Qf(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class wG{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let r;if(s.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new B(n.startLineNumber,1),0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new B(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);r=new L(a.lineNumber,a.column,l.lineNumber,l.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new $P(r,s),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e){const t=new L(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(t).inlineDecorations[0]}_getDecorationsInRange(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,q0(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,s=[];let r=0;const a=[];for(let l=i;l<=n;l++)a[l-i]=[];for(let l=0,c=t.length;lt===1)}function ME(o,e){return x5(o,e.range,t=>t===2)}function x5(o,e,t){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const n=o.tokenization.getLineTokens(i),s=i===e.startLineNumber,r=i===e.endLineNumber;let a=s?n.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(n.getStandardTokenType(a)))return!1;a++}}return!0}function xS(o,e){return o===null?e?Ov.INSTANCE:Pv.INSTANCE:new SG(o,e)}class SG{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let r;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((c,d)=>new er(0,0,c+1,this._projectionData.injectionOptions[d],0));r=er.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(r=AA(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,r,a){this._assertVisible();const l=this._projectionData,c=l.injectionOffsets,d=l.injectionOptions;let h=null;if(c){h=[];let g=0,f=0;for(let _=0;_0?l.breakOffsets[_-1]:0,C=l.breakOffsets[_];for(;fC)break;if(v0?l.wrappedTextIndentLength:0,D=y+Math.max(S-v,0),I=y+Math.min(k-v,C);D!==I&&b.push(new YV(D,I,x.inlineClassName,x.inlineClassNameAffectsLetterSpacing))}}if(k<=C)g+=w,f++;else break}}}let u;c?u=e.tokenization.getLineTokens(t).withInserted(c.map((g,f)=>({offset:g,text:d[f].content,tokenMetadata:Di.defaultTokenMetadata}))):u=e.tokenization.getLineTokens(t);for(let g=i;g0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,a=n.breakOffsets[i],l=e.sliceAndInflate(r,a,s);let c=l.getLineContent();i>0&&(c=AA(n.wrappedTextIndentLength)+c);const d=this._projectionData.getMinOutputOffset(i)+1,h=c.length+1,u=i+1=IS.length)for(let e=1;e<=o;e++)IS[e]=yG(e);return IS[o]}function yG(o){return new Array(o+1).join(" ")}class LG{constructor(e,t,i,n,s,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new kG(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,r=this.createLineBreaksComputer(),a=new Rp(er.fromDecorations(n));for(let _=0;_v.lineNumber===_+1);r.addRequest(i[_],b,t?t[_]:null)}const l=r.finalize(),c=[],d=this.hiddenAreasDecorationIds.map(_=>this.model.getDecorationRange(_)).sort(L.compareRangesUsingStarts);let h=1,u=0,g=-1,f=g+1=h&&b<=u,C=xS(l[_],!v);c[_]=C.getViewLineCount(),this.modelLineProjections[_]=C}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new gV(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(u=>this.model.validateRange(u)),i=DG(t),n=this.hiddenAreasDecorationIds.map(u=>this.model.getDecorationRange(u)).sort(L.compareRangesUsingStarts);if(i.length===n.length){let u=!1;for(let g=0;g({range:u,options:Ne.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);const r=i;let a=1,l=0,c=-1,d=c+1=a&&g<=l?this.modelLineProjections[u].isVisible()&&(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!1),f=!0):(h=!0,this.modelLineProjections[u].isVisible()||(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!0),f=!0)),f){const _=this.modelLineProjections[u].getViewLineCount();this.projectedModelLineLineCounts.setValue(u,_)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n;if(s&&r&&a&&l)return!1;const c=s&&r&&!a&&l;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let d=null;if(c){d=[];for(let h=0,u=this.modelLineProjections.length;h2&&!this.modelLineProjections[t-2].isVisible(),r=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const l=[],c=[];for(let d=0,h=n.length;dl?(d=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,h=d+l-1,f=h+1,_=f+(s-l)-1,c=!0):st?t:e|0}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new MA(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new B(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new B(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let r=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){const c=this.modelLineProjections[l-1];if(c.isVisible()){const d=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,h=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let u=d;u{if(g.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesAfterColumn).lineNumber>=d.modelLineWrappedLineIdx||g.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesBeforeOrAtColumn).lineNumberd.modelLineWrappedLineIdx)return}const _=this.convertModelPositionToViewPosition(d.modelLineNumber,g.horizontalLine.endColumn),b=this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.horizontalLine.endColumn);return b.lineNumber===d.modelLineWrappedLineIdx?new hd(g.visibleColumn,f,g.className,new up(g.horizontalLine.top,_.column),-1,-1):b.lineNumber!!g))}}return r}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const r=[],a=[],l=i.lineNumber-1,c=n.lineNumber-1;let d=null;for(let f=l;f<=c;f++){const _=this.modelLineProjections[f];if(_.isVisible()){const b=_.getViewLineNumberOfModelPosition(0,f===l?i.column:1),v=_.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(f+1)),C=v-b+1;let w=0;C>1&&_.getViewLineMinColumn(this.model,f+1,v)===1&&(w=b===0?1:2),r.push(C),a.push(w),d===null&&(d=new B(f+1,0))}else d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,f)),d=null)}d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const h=t-e+1,u=new Array(h);let g=0;for(let f=0,_=s.length;f<_;f++){let b=s[f];const v=Math.min(h-g,r[f]),C=a[f];let w;C===2?w=0:C===1?w=1:w=v;for(let S=0;St&&(f=!0,g=t-s+1),h.getViewLinesData(this.model,c+1,u,g,s-e,i,l),s+=g,f)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,r=n.remainder,a=this.modelLineProjections[s],l=a.getViewLineMinColumn(this.model,s+1,r),c=a.getViewLineMaxColumn(this.model,s+1,r);tc&&(t=c);const d=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new B(s+1,d)).equals(i)?new B(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new L(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new B(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new L(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new B(e,t)),s=n.lineNumber,r=n.column;let a=s-1,l=!1;for(;a>0&&!this.modelLineProjections[a].isVisible();)a--,l=!0;if(a===0&&!this.modelLineProjections[a].isVisible())return new B(1,1);const c=1+this.projectedModelLineLineCounts.getPrefixSum(a);let d;return l?d=this.modelLineProjections[a].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(a+1),i):d=this.modelLineProjections[s-1].getViewPositionOfModelPosition(c,r,i),d}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return L.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new L(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new L(n.lineNumber,1,s.lineNumber,s.column),t,i);let r=[];const a=n.lineNumber-1,l=s.lineNumber-1;let c=null;for(let g=a;g<=l;g++)if(this.modelLineProjections[g].isVisible())c===null&&(c=new B(g+1,g===a?n.column:1));else if(c!==null){const _=this.model.getLineMaxColumn(g);r=r.concat(this.model.getDecorationsInRange(new L(c.lineNumber,c.column,g,_),t,i)),c=null}c!==null&&(r=r.concat(this.model.getDecorationsInRange(new L(c.lineNumber,c.column,s.lineNumber,s.column),t,i)),c=null),r.sort((g,f)=>{const _=L.compareRangesUsingStarts(g.range,f.range);return _===0?g.idf.id?1:0:_});const d=[];let h=0,u=null;for(const g of r){const f=g.id;u!==f&&(u=f,d[h++]=g)}return d}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function DG(o){if(o.length===0)return[];const e=o.slice();e.sort(L.compareRangesUsingStarts);const t=[];let i=e[0].startLineNumber,n=e[0].endLineNumber;for(let s=1,r=e.length;sn+1?(t.push(new L(i,1,n,1)),i=a.startLineNumber,n=a.endLineNumber):a.endLineNumber>n&&(n=a.endLineNumber)}return t.push(new L(i,1,n,1)),t}class MA{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class RA{constructor(e,t){this.modelRange=e,this.viewLines=t}}class kG{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class xG{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new IG(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new _D(t,i)}onModelLinesInserted(e,t,i,n){return new bD(t,i)}onModelLineChanged(e,t,i){return[!1,new r5(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class EG extends H{constructor(e,t,i,n,s,r,a,l){if(super(),this.languageConfigurationService=a,this._themeService=l,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new BK,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new mt(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new mt(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=RE.create(this.model),this.model.isTooLargeForTokenization())this._lines=new xG(this.model);else{const c=this._configuration.options,d=c.get(46),h=c.get(127),u=c.get(134),g=c.get(126);this._lines=new LG(this._editorId,this.model,n,s,d,this.model.getOptions().tabSize,h,u.wrappingColumn,g)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new gg(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new CG(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),c.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new MK(c)),this._eventDispatcher.emitOutgoingEvent(new CE(c.oldScrollWidth,c.oldScrollLeft,c.oldScrollHeight,c.oldScrollTop,c.scrollWidth,c.scrollLeft,c.scrollHeight,c.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(c=>{this._eventDispatcher.emitOutgoingEvent(c)})),this._decorations=new wG(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const d=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(d,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(m_.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new PK)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new RK(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new L(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const n of i)this.model.tokenization.tokenizeViewport(n.startLineNumber,n.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new TK(e)),this._eventDispatcher.emitOutgoingEvent(new vE(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new xK)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new IK)}_onConfigurationChanged(e,t){let i=null;if(this._viewportStart.isValid){const d=new B(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber));i=this.coordinatesConverter.convertViewPositionToModelPosition(d)}let n=!1;const s=this._configuration.options,r=s.get(46),a=s.get(127),l=s.get(134),c=s.get(126);if(this._lines.setWrappingSettings(r,a,l.wrappingColumn,c)&&(e.emitViewEvent(new fb),e.emitViewEvent(new pb),e.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(83)&&(this._decorations.reset(),e.emitViewEvent(new Oh(null))),e.emitViewEvent(new EK(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const d=this.coordinatesConverter.convertModelPositionToViewPosition(i),h=this.viewLayout.getVerticalOffsetForLineNumber(d.lineNumber);this.viewLayout.setScrollPosition({scrollTop:h+this._viewportStart.startLineDelta},1)}Rh.shouldRecreate(t)&&(this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const i=this._eventDispatcher.beginEmitViewEvents();let n=!1,s=!1;const r=e instanceof vd?e.rawContentChangedEvent.changes:e.changes,a=e instanceof vd?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(const h of r)switch(h.changeType){case 4:{for(let u=0;u!_.ownerId||_.ownerId===this._editorId)),l.addRequest(g,f,null)}break}case 2:{let u=null;h.injectedText&&(u=h.injectedText.filter(g=>!g.ownerId||g.ownerId===this._editorId)),l.addRequest(h.detail,u,null);break}}const c=l.finalize(),d=new Rp(c);for(const h of r)switch(h.changeType){case 1:{this._lines.onModelFlushed(),i.emitViewEvent(new fb),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break}case 3:{const u=this._lines.onModelLinesDeleted(a,h.fromLineNumber,h.toLineNumber);u!==null&&(i.emitViewEvent(u),this.viewLayout.onLinesDeleted(u.fromLineNumber,u.toLineNumber)),n=!0;break}case 4:{const u=d.takeCount(h.detail.length),g=this._lines.onModelLinesInserted(a,h.fromLineNumber,h.toLineNumber,u);g!==null&&(i.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),n=!0;break}case 2:{const u=d.dequeue(),[g,f,_,b]=this._lines.onModelLineChanged(a,h.lineNumber,u);s=g,f&&i.emitViewEvent(f),_&&(i.emitViewEvent(_),this.viewLayout.onLinesInserted(_.fromLineNumber,_.toLineNumber)),b&&(i.emitViewEvent(b),this.viewLayout.onLinesDeleted(b.fromLineNumber,b.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!n&&s&&(i.emitViewEvent(new pb),i.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){const n=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:s+this._viewportStart.startLineDelta},1)}}try{const i=this._eventDispatcher.beginEmitViewEvents();e instanceof vd&&i.emitOutgoingEvent(new KK(e.contentChangedEvent)),this._cursor.onModelContentChanged(i,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new AK),this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new jK(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new $K(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new fb),t.emitViewEvent(new pb),t.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new qK(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Oh(e)),this._eventDispatcher.emitOutgoingEvent(new UK(e))}))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new fb),i.emitViewEvent(new pb),i.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new HK)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(133),t=this._configuration.options.get(61),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new L(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];const n=[];let s=0,r=t.startLineNumber,a=t.startColumn;const l=t.endLineNumber,c=t.endColumn;for(let d=0,h=i.length;dl||(r"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=kn(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Vr(this.getLineContent(e));return t===-1?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const n=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,n)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),r=this._lines.getViewLineData(e);return r.inlineDecorations&&(t=[...t,...r.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Ds(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,t,s,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new ZV(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,q0(this._configuration.options)),i=new NG;for(const n of t){const s=n.options,r=s.overviewRuler;if(!r)continue;const a=r.position;if(a===0)continue;const l=r.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(l,s.zIndex,c,d,a)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const i=t.options.overviewRuler;i&&i.invalidateCachedColor();const n=t.options.minimap;n&&n.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){const n=i?`\r -`:this.model.getEOL();e=e.slice(0),e.sort(L.compareRangesUsingStarts);let s=!1,r=!1;for(const l of e)l.isEmpty()?s=!0:r=!0;if(!r){if(!t)return"";const l=e.map(d=>d.startLineNumber);let c="";for(let d=0;d0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+n);return c}if(s&&t){const l=[];let c=0;for(const d of e){const h=d.startLineNumber;d.isEmpty()?h!==c&&l.push(this.model.getLineContent(h)):l.push(this.model.getValueInRange(d,i?2:0)),c=h}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Ks||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new L(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(46),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===ts.fontFamily;let c;return l?c=ts.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${ts.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,r)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const d=this.model.tokenization.getLineTokens(c),h=d.getLineContent(),u=c===i?n-1:0,g=c===s?r-1:h.length;h===""?l+="
":l+=pG(h,d.inflate(),t,u,g,a,Yi)}return l}_getColorMap(){const e=Wt.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new zK);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new C0(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new C0(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new C0(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new FK),this._eventDispatcher.emitOutgoingEvent(new VK))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class RE{constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}static create(e){const t=e._setTrackedRange(null,new L(1,1,1,1),1);return new RE(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new B(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new L(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),r=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=r-s}invalidate(){this._isValid=!1}}class NG{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const r=this._asMap[e];if(r){const a=r.data,l=a[a.length-3],c=a[a.length-1];if(l===s&&c+1>=i){n>c&&(a[a.length-1]=n);return}a.push(s,i,n)}else{const a=new jP(e,t,[s,i,n]);this._asMap[e]=a,this.asArray.push(a)}}}class k1{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}var gm;(function(o){o[o.Ignore=0]="Ignore",o[o.Info=1]="Info",o[o.Warning=2]="Warning",o[o.Error=3]="Error"})(gm||(gm={}));(function(o){const e="error",t="warning",i="warn",n="info",s="ignore";function r(l){return l?au(e,l)?o.Error:au(t,l)||au(i,l)?o.Warning:au(n,l)?o.Info:o.Ignore:o.Ignore}o.fromValue=r;function a(l){switch(l){case o.Error:return e;case o.Warning:return t;case o.Info:return n;default:return s}}o.toString=a})(gm||(gm={}));const Bt=gm;var I5=Bt;const di=Ye("notificationService");class TG{}class wp{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let n=this.breakOffsets[e]-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)n0?this.breakOffsets[s-1]:0,t===0)if(e<=r)n=s-1;else if(e>l)i=s+1;else break;else if(e=l)i=s+1;else break}let a=e-r;return s>0&&(a+=this.wrappedTextIndentLength),new wb(s,a)}normalizeOutputPosition(e,t,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(e>0&&t===this.getMinOutputOffset(e))return new wb(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){const n=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2){if(e===i.offsetInInputWithInjections+i.length&&OA(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(PA(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(OA(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,PA(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}OC()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;se)break;if(e<=l)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:r};n+=r}}}}function OA(o){return o==null?!0:o===Wo.Right||o===Wo.Both}function PA(o){return o==null?!0:o===Wo.Left||o===Wo.Both}class wb{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new B(e+this.outputLineIndex,this.outputOffset+1)}}class OE{constructor(e,t){this.classifier=new AG(e,t)}static create(e){return new OE(e.get(122),e.get(121))}createLineBreaksComputer(e,t,i,n){const s=[],r=[],a=[];return{addRequest:(l,c,d)=>{s.push(l),r.push(c),a.push(d)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let d=0,h=s.length;d=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let kD=[],xD=[];function MG(o,e,t,i,n,s,r){if(n===-1)return null;const a=t.length;if(a<=1)return null;const l=e.breakOffsets,c=e.breakOffsetsVisibleColumn,d=E5(t,i,n,s,r),h=n-d,u=kD,g=xD;let f=0,_=0,b=0,v=n;const C=l.length;let w=0;if(w>=0){let S=Math.abs(c[w]-v);for(;w+1=S)break;S=k,w++}}for(;wS&&(S=_,k=b);let x=0,y=0,D=0,I=0;if(k<=v){let F=k,z=S===0?0:t.charCodeAt(S-1),j=S===0?0:o.get(z),re=!0;for(let he=S;he_&&ID(z,j,ye,xe)&&(x=Se,y=F),F+=He,F>v){Se>_?(D=Se,I=F-He):(D=he+1,I=F),F-y>h&&(x=0),re=!1;break}z=ye,j=xe}if(re){f>0&&(u[f]=l[l.length-1],g[f]=c[l.length-1],f++);break}}if(x===0){let F=k,z=t.charCodeAt(S),j=o.get(z),re=!1;for(let he=S-1;he>=_;he--){const Se=he+1,ye=t.charCodeAt(he);if(ye===9){re=!0;break}let xe,He;if(Td(ye)?(he--,xe=0,He=2):(xe=o.get(ye),He=ic(ye)?s:1),F<=v){if(D===0&&(D=Se,I=F),F<=v-h)break;if(ID(ye,xe,z,j)){x=Se,y=F;break}}F-=He,z=ye,j=xe}if(x!==0){const he=h-(I-y);if(he<=i){const Se=t.charCodeAt(D);let ye;Li(Se)?ye=2:ye=Sp(Se,I,i,s),he-ye<0&&(x=0)}}if(re){w--;continue}}if(x===0&&(x=D,y=I),x<=_){const F=t.charCodeAt(_);Li(F)?(x=_+2,y=b+2):(x=_+1,y=b+Sp(F,b,i,s))}for(_=x,u[f]=x,b=y,g[f]=y,f++,v=y+h;w<0||w=O)break;O=F,w++}}return f===0?null:(u.length=f,g.length=f,kD=e.breakOffsets,xD=e.breakOffsetsVisibleColumn,e.breakOffsets=u,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=d,e)}function RG(o,e,t,i,n,s,r){const a=er.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(y=>y.options),c=t.map(y=>y.column-1)):(l=null,c=null),n===-1)return l?new wp(c,l,[a.length],[],0):null;const d=a.length;if(d<=1)return l?new wp(c,l,[a.length],[],0):null;const h=E5(a,i,n,s,r),u=n-h,g=[],f=[];let _=0,b=0,v=0,C=n,w=a.charCodeAt(0),S=o.get(w),k=Sp(w,0,i,s),x=1;Li(w)&&(k+=1,w=a.charCodeAt(1),S=o.get(w),x++);for(let y=x;yC&&((b===0||k-v>u)&&(b=D,v=k-F),g[_]=b,f[_]=v,_++,C=v+u,b=0),w=I,S=O}return _===0&&(!t||t.length===0)?null:(g[_]=d,f[_]=k,new wp(c,l,g,f,h))}function Sp(o,e,t,i){return o===9?t-e%t:ic(o)||o<32?i:1}function FA(o,e){return e-o%e}function ID(o,e,t,i){return t!==32&&(e===2&&i!==2||e!==1&&i===1||e===3&&i!==2||i===3&&e!==1)}function E5(o,e,t,i,n){let s=0;if(n!==0){const r=kn(o);if(r!==-1){for(let l=0;lt&&(s=0)}}return s}var ES;const NS=(ES=window.trustedTypes)===null||ES===void 0?void 0:ES.createPolicy("domLineBreaksComputer",{createHTML:o=>o});class PE{static create(){return new PE}constructor(){}createLineBreaksComputer(e,t,i,n){const s=[],r=[];return{addRequest:(a,l,c)=>{s.push(a),r.push(l)},finalize:()=>OG(s,e,t,i,n,r)}}}function OG(o,e,t,i,n,s){var r;function a(D){const I=s[D];if(I){const O=er.applyInjectedText(o[D],I),F=I.map(j=>j.options),z=I.map(j=>j.column-1);return new wp(z,F,[O.length],[],0)}else return null}if(i===-1){const D=[];for(let I=0,O=o.length;Il?(O=0,F=0):z=l-he}const j=I.substr(O),re=PG(j,F,t,z,g,h);f[D]=O,_[D]=F,b[D]=j,v[D]=re[0],C[D]=re[1]}const w=g.build(),S=(r=NS==null?void 0:NS.createHTML(w))!==null&&r!==void 0?r:w;u.innerHTML=S,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const k=document.createRange(),x=Array.prototype.slice.call(u.children,0),y=[];for(let D=0;Dxe.options),Se=ye.map(xe=>xe.column-1)):(he=null,Se=null),y[D]=new wp(Se,he,O,re,z)}return document.body.removeChild(u),y}function PG(o,e,t,i,n,s){if(s!==0){const u=String(s);n.appendASCIIString('
');const r=o.length;let a=e,l=0;const c=[],d=[];let h=0");for(let u=0;u"),c[u]=l,d[u]=a;const g=h;h=u+1"),c[o.length]=l,d[o.length]=a,n.appendASCIIString("
"),[c,d]}function FG(o,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{ED(o,n,i,0,null,t.length-1,null,s)}catch(r){return console.log(r),null}return s.length===0?null:(s.push(t.length),s)}function ED(o,e,t,i,n,s,r,a){if(i===s||(n=n||TS(o,e,t[i],t[i+1]),r=r||TS(o,e,t[s],t[s+1]),Math.abs(n[0].top-r[0].top)<=.1))return;if(i+1===s){a.push(s);return}const l=i+(s-i)/2|0,c=TS(o,e,t[l],t[l+1]);ED(o,e,t,i,n,l,c,a),ED(o,e,t,l,c,s,r,a)}function TS(o,e,t,i){return o.setStart(e[t/16384|0].firstChild,t%16384),o.setEnd(e[i/16384|0].firstChild,i%16384),o.getClientRects()}var BG=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ha=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},WG=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let VG=0;class HG{constructor(e,t,i,n,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s}dispose(){nt(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let pg=class tu extends H{constructor(e,t,i,n,s,r,a,l,c,d,h,u){super(),this.languageConfigurationService=h,this._deliveryQueue=new XO,this._onDidDispose=this._register(new R),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new BA({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new BA({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onWillType=this._onWillType.event,this._onDidType=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection();const g=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++VG,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,g,d)),this._register(this._configuration.onDidChange(b=>{this._onDidChangeConfiguration.fire(b);const v=this._configuration.options;if(b.hasChanged(133)){const C=v.get(133);this._onDidLayoutChange.fire(C)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new zG(this,this._contextKeyService)),this._register(new UG(this,this._contextKeyService,u)),this._instantiationService=n.createChild(new k1([Ee,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new $G(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let f;Array.isArray(i.contributions)?f=i.contributions:f=md.getEditorContributions();for(const b of f){if(this._contributions[b.id]){Te(new Error(`Cannot have two contributions with the same id ${b.id}`));continue}try{const v=this._instantiationService.createInstance(b.ctor,this);this._contributions[b.id]=v}catch(v){Te(v)}}md.getEditorActions().forEach(b=>{if(this._actions[b.id]){Te(new Error(`Cannot have two actions with the same id ${b.id}`));return}const v=new a5(b.id,b.label,b.alias,Wn(b.precondition),()=>this._instantiationService.invokeFunction(C=>Promise.resolve(b.runEditorCommand(C,this,null))),this._contextKeyService);this._actions[v.id]=v});const _=()=>!this._configuration.options.get(83)&&this._configuration.options.get(32).enabled;this._register(new iz(this._domElement,{onDragEnter:()=>{},onDragOver:b=>{if(!_())return;const v=this.getTargetAtClientPoint(b.clientX,b.clientY);v!=null&&v.position&&this.showDropIndicatorAt(v.position)},onDrop:b=>WG(this,void 0,void 0,function*(){if(!_()||(this.removeDropIndicator(),!b.dataTransfer))return;const v=this.getTargetAtClientPoint(b.clientX,b.clientY);v!=null&&v.position&&this._onDropIntoEditor.fire({position:v.position,event:b})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,i){return new aD(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return o_.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,r.length!==0){for(let c=0,d=r.length;c=0;I--){const O=g+I,F=w+I;D.takeFromEndWhile(j=>j.lineNumber>F);const z=D.takeFromEndWhile(j=>j.lineNumber===F);a.push(new lA(O,this.getLineContent(F),z))}if(v<_){const I=g+v;a.push(new LK(I+1,f))}if(vye.lineNumberye.lineNumber===Se)}a.push(new DK(O+1,g+b,re,j))}l+=C}this._emitContentChangedEvent(new Vu(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=Array.from(e).map(n=>new lA(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new oF(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(s,EA(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){Te(s)}return i.addDecoration=kf,i.changeDecoration=kf,i.changeDecorationOptions=kf,i.removeDecoration=kf,i.deltaDecorations=kf,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),Te(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:IA[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),n.setOptions(IA[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){const s=this.getLineCount(),r=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a),c=new L(r,1,a,l),d=this._getDecorationsInRange(c,i,n);return kT(d,this._decorationProvider.getDecorationsInRange(c,i,n)),d}getDecorationsInRange(e,t=0,i=!1){const n=this.validateRange(e),s=this._getDecorationsInRange(n,t,i);return kT(s,this._decorationProvider.getDecorationsInRange(n,t,i)),s}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return er.fromDecorations(n).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,s,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!!(i.options.overviewRuler&&i.options.overviewRuler.color),s=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber)}if(i.options.before||t.before){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;const c=new Array(a);for(;ra.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,i,n){const s=e.getVersionId(),r=this._search(t,i,n,s);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const s=this._decorationsTree0.search(e,t,n),r=this._decorationsTree1.search(e,t,n),a=this._injectedTextDecorationsTree.search(e,t,n);return s.concat(r).concat(a)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){kS(e)?this._injectedTextDecorationsTree.insert(e):DS(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){kS(e)?this._injectedTextDecorationsTree.delete(e):DS(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){kS(e)?this._injectedTextDecorationsTree.resolveNode(e,t):DS(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function da(o){return o.replace(/[^a-z0-9\-_]/gi," ")}class kF{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class cG extends kF{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Zs.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class dG extends kF{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?W.fromHex(e):t.getColor(e.id)}}class zd{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof zd?e:new zd(e)}}class Ne{constructor(e){var t,i;this.description=e.description,this.blockClassName=e.blockClassName?da(e.blockClassName):null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?da(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new cG(e.overviewRuler):null,this.minimap=e.minimap?new dG(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?da(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?da(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?da(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?da(e.marginClassName):null,this.inlineClassName=e.inlineClassName?da(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?da(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?da(e.afterContentClassName):null,this.after=e.after?zd.from(e.after):null,this.before=e.before?zd.from(e.before):null,this.hideInCommentTokens=(t=e.hideInCommentTokens)!==null&&t!==void 0?t:!1,this.hideInStringTokens=(i=e.hideInStringTokens)!==null&&i!==void 0?i:!1}static register(e){return new Ne(e)}static createDynamic(e){return new Ne(e)}}Ne.EMPTY=Ne.register({description:"empty"});const IA=[Ne.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ne.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ne.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ne.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function EA(o){return o instanceof Ne?o:Ne.createDynamic(o)}class hG extends H{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new R),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const t={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(t)}(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!(e.minimap&&e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(e.overviewRuler&&e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class uG extends H{constructor(){super(),this._fastEmitter=this._register(new R),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new R),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}var gG=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const NA={getInitialState:()=>ng,tokenizeEncoded:(o,e,t)=>qC(0,t)};function fG(o,e,t){return gG(this,void 0,void 0,function*(){if(!t)return TA(e,o.languageIdCodec,NA);const i=yield Wt.getOrCreate(t);return TA(e,o.languageIdCodec,i||NA)})}function pG(o,e,t,i,n,s,r){let a="
",l=i,c=0,d=!0;for(let h=0,u=e.getCount();h0;)r&&d?(f+=" ",d=!1):(f+=" ",d=!0),b--;break}case 60:f+="<",d=!1;break;case 62:f+=">",d=!1;break;case 38:f+="&",d=!1;break;case 0:f+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:f+="\uFFFD",d=!1;break;case 13:f+="​",d=!1;break;case 32:r&&d?(f+=" ",d=!1):(f+=" ",d=!0);break;default:f+=String.fromCharCode(_),d=!1}}if(a+=`${f}`,g>n||l>=n)break}return a+="
",a}function TA(o,e,t){let i='
';const n=jr(o);let s=t.getInitialState();for(let r=0,a=n.length;r0&&(i+="
");const c=t.tokenizeEncoded(l,!0,s);Di.convertToEndOffset(c.tokens,l.length);const h=new Di(c.tokens,l,e).inflate();let u=0;for(let g=0,f=h.getCount();g${_I(l.substring(u,b))}`,u=b}s=c.endState}return i+="
",i}class mG{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class _G{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}class um{constructor(e,t,i,n){this._instanceId=mP(++um.INSTANCE_COUNT),this._pendingChanges=new mG,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,n=n|0,s=s|0,r=r|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new _G(l,n,s,r,a)),l},changeOneWhitespace:(n,s,r)=>{t=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const n=new Set;for(const l of i)n.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const r=l=>{const c=[];for(const d of l)if(!n.has(d.id)){if(s.has(d.id)){const h=s.get(d.id);d.afterLineNumber=h.newAfterLineNumber,d.height=h.newHeight}c.push(d)}return c},a=r(this._arr).concat(r(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=um.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i1?i=this._lineHeight*(e-1):i=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;const i=this._lineHeight*e,n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,i=this._lineHeight;let n=1,s=t;for(;n=a+i)n=r+1;else{if(e>=a)return r;s=r}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this._lineHeight,n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let r=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const l=this.getWhitespacesCount()|0;let c,d;a===-1?(a=l,d=r+1,c=0):(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let h=s,u=h;const g=5e5;let f=0;s>=g&&(f=Math.floor(s/g)*g,f=Math.floor(f/i)*i,u-=f);const _=[],b=e+(t-e)/2;let v=-1;for(let k=n;k<=r;k++){if(v===-1){const x=h,y=h+i;(x<=b&&bb)&&(v=k)}for(h+=i,_[k-n]=u,u+=i;d===k;)u+=c,h+=c,a++,a>=l?d=r+1:(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(h>=t){r=k;break}}v===-1&&(v=r);const C=this.getVerticalOffsetForLineNumber(r)|0;let w=n,S=r;return wt&&S--,{bigNumbersDelta:f,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:_,centeredLineNumber:v,completelyVisibleStartLineNumber:w,completelyVisibleEndLineNumber:S}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeight*t:i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t=a+l)t=r+1;else{if(e>=a)return r;i=r}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let r=i;r<=n;r++){const a=this.getVerticalOffsetForWhitespaceIndex(r),l=this.getHeightForWhitespaceIndex(r);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}}um.INSTANCE_COUNT=0;const bG=125;class Qf{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class vG extends H{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new R),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Qf(0,0,0,0),this._scrollable=this._register(new f_({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new bE(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class CG extends H{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(133),r=n.get(77);this._linesLayout=new um(t,n.get(61),r.top,r.bottom),this._scrollable=this._register(new vG(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Qf(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(105)?bG:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(61)&&this._linesLayout.setLineHeight(t.get(61)),e.hasChanged(77)){const i=t.get(77);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(133)){const i=t.get(133),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),a=r.contentWidth;this._scrollable.setScrollDimensions(new Qf(n,r.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(105)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(94);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(96)?s+=Math.max(0,t-n.get(61)-n.get(77).bottom):s+=this._getHorizontalScrollbarHeight(e,i),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Qf(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new u2(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new u2(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(134),n=t.get(46),s=t.get(133);if(i.isViewportWrapping){const r=t.get(67);return e>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?e+s.verticalScrollbarWidth:e}else{const r=t.get(95)*n.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+r+s.verticalScrollbarWidth,a)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Qf(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class wG{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let r;if(s.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new B(n.startLineNumber,1),0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new B(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);r=new L(a.lineNumber,a.column,l.lineNumber,l.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new $P(r,s),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e){const t=new L(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(t).inlineDecorations[0]}_getDecorationsInRange(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,q0(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,s=[];let r=0;const a=[];for(let l=i;l<=n;l++)a[l-i]=[];for(let l=0,c=t.length;lt===1)}function ME(o,e){return xF(o,e.range,t=>t===2)}function xF(o,e,t){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const n=o.tokenization.getLineTokens(i),s=i===e.startLineNumber,r=i===e.endLineNumber;let a=s?n.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(n.getStandardTokenType(a)))return!1;a++}}return!0}function xS(o,e){return o===null?e?Ov.INSTANCE:Pv.INSTANCE:new SG(o,e)}class SG{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let r;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((c,d)=>new er(0,0,c+1,this._projectionData.injectionOptions[d],0));r=er.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(r=AA(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,r,a){this._assertVisible();const l=this._projectionData,c=l.injectionOffsets,d=l.injectionOptions;let h=null;if(c){h=[];let g=0,f=0;for(let _=0;_0?l.breakOffsets[_-1]:0,C=l.breakOffsets[_];for(;fC)break;if(v0?l.wrappedTextIndentLength:0,D=y+Math.max(S-v,0),I=y+Math.min(k-v,C);D!==I&&b.push(new YV(D,I,x.inlineClassName,x.inlineClassNameAffectsLetterSpacing))}}if(k<=C)g+=w,f++;else break}}}let u;c?u=e.tokenization.getLineTokens(t).withInserted(c.map((g,f)=>({offset:g,text:d[f].content,tokenMetadata:Di.defaultTokenMetadata}))):u=e.tokenization.getLineTokens(t);for(let g=i;g0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,a=n.breakOffsets[i],l=e.sliceAndInflate(r,a,s);let c=l.getLineContent();i>0&&(c=AA(n.wrappedTextIndentLength)+c);const d=this._projectionData.getMinOutputOffset(i)+1,h=c.length+1,u=i+1=IS.length)for(let e=1;e<=o;e++)IS[e]=yG(e);return IS[o]}function yG(o){return new Array(o+1).join(" ")}class LG{constructor(e,t,i,n,s,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new kG(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,r=this.createLineBreaksComputer(),a=new Rp(er.fromDecorations(n));for(let _=0;_v.lineNumber===_+1);r.addRequest(i[_],b,t?t[_]:null)}const l=r.finalize(),c=[],d=this.hiddenAreasDecorationIds.map(_=>this.model.getDecorationRange(_)).sort(L.compareRangesUsingStarts);let h=1,u=0,g=-1,f=g+1=h&&b<=u,C=xS(l[_],!v);c[_]=C.getViewLineCount(),this.modelLineProjections[_]=C}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new gV(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(u=>this.model.validateRange(u)),i=DG(t),n=this.hiddenAreasDecorationIds.map(u=>this.model.getDecorationRange(u)).sort(L.compareRangesUsingStarts);if(i.length===n.length){let u=!1;for(let g=0;g({range:u,options:Ne.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);const r=i;let a=1,l=0,c=-1,d=c+1=a&&g<=l?this.modelLineProjections[u].isVisible()&&(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!1),f=!0):(h=!0,this.modelLineProjections[u].isVisible()||(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!0),f=!0)),f){const _=this.modelLineProjections[u].getViewLineCount();this.projectedModelLineLineCounts.setValue(u,_)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n;if(s&&r&&a&&l)return!1;const c=s&&r&&!a&&l;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let d=null;if(c){d=[];for(let h=0,u=this.modelLineProjections.length;h2&&!this.modelLineProjections[t-2].isVisible(),r=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const l=[],c=[];for(let d=0,h=n.length;dl?(d=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,h=d+l-1,f=h+1,_=f+(s-l)-1,c=!0):st?t:e|0}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new MA(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new B(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new B(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let r=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){const c=this.modelLineProjections[l-1];if(c.isVisible()){const d=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,h=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let u=d;u{if(g.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesAfterColumn).lineNumber>=d.modelLineWrappedLineIdx||g.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesBeforeOrAtColumn).lineNumberd.modelLineWrappedLineIdx)return}const _=this.convertModelPositionToViewPosition(d.modelLineNumber,g.horizontalLine.endColumn),b=this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.horizontalLine.endColumn);return b.lineNumber===d.modelLineWrappedLineIdx?new hd(g.visibleColumn,f,g.className,new up(g.horizontalLine.top,_.column),-1,-1):b.lineNumber!!g))}}return r}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const r=[],a=[],l=i.lineNumber-1,c=n.lineNumber-1;let d=null;for(let f=l;f<=c;f++){const _=this.modelLineProjections[f];if(_.isVisible()){const b=_.getViewLineNumberOfModelPosition(0,f===l?i.column:1),v=_.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(f+1)),C=v-b+1;let w=0;C>1&&_.getViewLineMinColumn(this.model,f+1,v)===1&&(w=b===0?1:2),r.push(C),a.push(w),d===null&&(d=new B(f+1,0))}else d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,f)),d=null)}d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const h=t-e+1,u=new Array(h);let g=0;for(let f=0,_=s.length;f<_;f++){let b=s[f];const v=Math.min(h-g,r[f]),C=a[f];let w;C===2?w=0:C===1?w=1:w=v;for(let S=0;St&&(f=!0,g=t-s+1),h.getViewLinesData(this.model,c+1,u,g,s-e,i,l),s+=g,f)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,r=n.remainder,a=this.modelLineProjections[s],l=a.getViewLineMinColumn(this.model,s+1,r),c=a.getViewLineMaxColumn(this.model,s+1,r);tc&&(t=c);const d=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new B(s+1,d)).equals(i)?new B(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new L(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new B(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new L(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new B(e,t)),s=n.lineNumber,r=n.column;let a=s-1,l=!1;for(;a>0&&!this.modelLineProjections[a].isVisible();)a--,l=!0;if(a===0&&!this.modelLineProjections[a].isVisible())return new B(1,1);const c=1+this.projectedModelLineLineCounts.getPrefixSum(a);let d;return l?d=this.modelLineProjections[a].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(a+1),i):d=this.modelLineProjections[s-1].getViewPositionOfModelPosition(c,r,i),d}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return L.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new L(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new L(n.lineNumber,1,s.lineNumber,s.column),t,i);let r=[];const a=n.lineNumber-1,l=s.lineNumber-1;let c=null;for(let g=a;g<=l;g++)if(this.modelLineProjections[g].isVisible())c===null&&(c=new B(g+1,g===a?n.column:1));else if(c!==null){const _=this.model.getLineMaxColumn(g);r=r.concat(this.model.getDecorationsInRange(new L(c.lineNumber,c.column,g,_),t,i)),c=null}c!==null&&(r=r.concat(this.model.getDecorationsInRange(new L(c.lineNumber,c.column,s.lineNumber,s.column),t,i)),c=null),r.sort((g,f)=>{const _=L.compareRangesUsingStarts(g.range,f.range);return _===0?g.idf.id?1:0:_});const d=[];let h=0,u=null;for(const g of r){const f=g.id;u!==f&&(u=f,d[h++]=g)}return d}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function DG(o){if(o.length===0)return[];const e=o.slice();e.sort(L.compareRangesUsingStarts);const t=[];let i=e[0].startLineNumber,n=e[0].endLineNumber;for(let s=1,r=e.length;sn+1?(t.push(new L(i,1,n,1)),i=a.startLineNumber,n=a.endLineNumber):a.endLineNumber>n&&(n=a.endLineNumber)}return t.push(new L(i,1,n,1)),t}class MA{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class RA{constructor(e,t){this.modelRange=e,this.viewLines=t}}class kG{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class xG{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new IG(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new _D(t,i)}onModelLinesInserted(e,t,i,n){return new bD(t,i)}onModelLineChanged(e,t,i){return[!1,new rF(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class EG extends H{constructor(e,t,i,n,s,r,a,l){if(super(),this.languageConfigurationService=a,this._themeService=l,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new BK,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new mt(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new mt(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=RE.create(this.model),this.model.isTooLargeForTokenization())this._lines=new xG(this.model);else{const c=this._configuration.options,d=c.get(46),h=c.get(127),u=c.get(134),g=c.get(126);this._lines=new LG(this._editorId,this.model,n,s,d,this.model.getOptions().tabSize,h,u.wrappingColumn,g)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new gg(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new CG(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),c.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new MK(c)),this._eventDispatcher.emitOutgoingEvent(new CE(c.oldScrollWidth,c.oldScrollLeft,c.oldScrollHeight,c.oldScrollTop,c.scrollWidth,c.scrollLeft,c.scrollHeight,c.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(c=>{this._eventDispatcher.emitOutgoingEvent(c)})),this._decorations=new wG(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const d=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(d,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(m_.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new PK)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new RK(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new L(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const n of i)this.model.tokenization.tokenizeViewport(n.startLineNumber,n.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new TK(e)),this._eventDispatcher.emitOutgoingEvent(new vE(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new xK)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new IK)}_onConfigurationChanged(e,t){let i=null;if(this._viewportStart.isValid){const d=new B(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber));i=this.coordinatesConverter.convertViewPositionToModelPosition(d)}let n=!1;const s=this._configuration.options,r=s.get(46),a=s.get(127),l=s.get(134),c=s.get(126);if(this._lines.setWrappingSettings(r,a,l.wrappingColumn,c)&&(e.emitViewEvent(new fb),e.emitViewEvent(new pb),e.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(83)&&(this._decorations.reset(),e.emitViewEvent(new Oh(null))),e.emitViewEvent(new EK(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const d=this.coordinatesConverter.convertModelPositionToViewPosition(i),h=this.viewLayout.getVerticalOffsetForLineNumber(d.lineNumber);this.viewLayout.setScrollPosition({scrollTop:h+this._viewportStart.startLineDelta},1)}Rh.shouldRecreate(t)&&(this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const i=this._eventDispatcher.beginEmitViewEvents();let n=!1,s=!1;const r=e instanceof vd?e.rawContentChangedEvent.changes:e.changes,a=e instanceof vd?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(const h of r)switch(h.changeType){case 4:{for(let u=0;u!_.ownerId||_.ownerId===this._editorId)),l.addRequest(g,f,null)}break}case 2:{let u=null;h.injectedText&&(u=h.injectedText.filter(g=>!g.ownerId||g.ownerId===this._editorId)),l.addRequest(h.detail,u,null);break}}const c=l.finalize(),d=new Rp(c);for(const h of r)switch(h.changeType){case 1:{this._lines.onModelFlushed(),i.emitViewEvent(new fb),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break}case 3:{const u=this._lines.onModelLinesDeleted(a,h.fromLineNumber,h.toLineNumber);u!==null&&(i.emitViewEvent(u),this.viewLayout.onLinesDeleted(u.fromLineNumber,u.toLineNumber)),n=!0;break}case 4:{const u=d.takeCount(h.detail.length),g=this._lines.onModelLinesInserted(a,h.fromLineNumber,h.toLineNumber,u);g!==null&&(i.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),n=!0;break}case 2:{const u=d.dequeue(),[g,f,_,b]=this._lines.onModelLineChanged(a,h.lineNumber,u);s=g,f&&i.emitViewEvent(f),_&&(i.emitViewEvent(_),this.viewLayout.onLinesInserted(_.fromLineNumber,_.toLineNumber)),b&&(i.emitViewEvent(b),this.viewLayout.onLinesDeleted(b.fromLineNumber,b.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!n&&s&&(i.emitViewEvent(new pb),i.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){const n=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:s+this._viewportStart.startLineDelta},1)}}try{const i=this._eventDispatcher.beginEmitViewEvents();e instanceof vd&&i.emitOutgoingEvent(new KK(e.contentChangedEvent)),this._cursor.onModelContentChanged(i,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new AK),this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new jK(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new $K(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new fb),t.emitViewEvent(new pb),t.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Rh(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new qK(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Oh(e)),this._eventDispatcher.emitOutgoingEvent(new UK(e))}))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new fb),i.emitViewEvent(new pb),i.emitViewEvent(new Oh(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new HK)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(133),t=this._configuration.options.get(61),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new L(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];const n=[];let s=0,r=t.startLineNumber,a=t.startColumn;const l=t.endLineNumber,c=t.endColumn;for(let d=0,h=i.length;dl||(r"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=kn(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Vr(this.getLineContent(e));return t===-1?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const n=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,n)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),r=this._lines.getViewLineData(e);return r.inlineDecorations&&(t=[...t,...r.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Ds(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,t,s,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new ZV(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,q0(this._configuration.options)),i=new NG;for(const n of t){const s=n.options,r=s.overviewRuler;if(!r)continue;const a=r.position;if(a===0)continue;const l=r.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(l,s.zIndex,c,d,a)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const i=t.options.overviewRuler;i&&i.invalidateCachedColor();const n=t.options.minimap;n&&n.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){const n=i?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(L.compareRangesUsingStarts);let s=!1,r=!1;for(const l of e)l.isEmpty()?s=!0:r=!0;if(!r){if(!t)return"";const l=e.map(d=>d.startLineNumber);let c="";for(let d=0;d0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+n);return c}if(s&&t){const l=[];let c=0;for(const d of e){const h=d.startLineNumber;d.isEmpty()?h!==c&&l.push(this.model.getLineContent(h)):l.push(this.model.getValueInRange(d,i?2:0)),c=h}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Ks||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new L(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(46),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===ts.fontFamily;let c;return l?c=ts.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${ts.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,r)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const d=this.model.tokenization.getLineTokens(c),h=d.getLineContent(),u=c===i?n-1:0,g=c===s?r-1:h.length;h===""?l+="
":l+=pG(h,d.inflate(),t,u,g,a,Yi)}return l}_getColorMap(){const e=Wt.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new zK);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new C0(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new C0(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new C0(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new FK),this._eventDispatcher.emitOutgoingEvent(new VK))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class RE{constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}static create(e){const t=e._setTrackedRange(null,new L(1,1,1,1),1);return new RE(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new B(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new L(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),r=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=r-s}invalidate(){this._isValid=!1}}class NG{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const r=this._asMap[e];if(r){const a=r.data,l=a[a.length-3],c=a[a.length-1];if(l===s&&c+1>=i){n>c&&(a[a.length-1]=n);return}a.push(s,i,n)}else{const a=new jP(e,t,[s,i,n]);this._asMap[e]=a,this.asArray.push(a)}}}class k1{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}var gm;(function(o){o[o.Ignore=0]="Ignore",o[o.Info=1]="Info",o[o.Warning=2]="Warning",o[o.Error=3]="Error"})(gm||(gm={}));(function(o){const e="error",t="warning",i="warn",n="info",s="ignore";function r(l){return l?au(e,l)?o.Error:au(t,l)||au(i,l)?o.Warning:au(n,l)?o.Info:o.Ignore:o.Ignore}o.fromValue=r;function a(l){switch(l){case o.Error:return e;case o.Warning:return t;case o.Info:return n;default:return s}}o.toString=a})(gm||(gm={}));const Bt=gm;var IF=Bt;const di=Ye("notificationService");class TG{}class wp{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let n=this.breakOffsets[e]-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)n0?this.breakOffsets[s-1]:0,t===0)if(e<=r)n=s-1;else if(e>l)i=s+1;else break;else if(e=l)i=s+1;else break}let a=e-r;return s>0&&(a+=this.wrappedTextIndentLength),new wb(s,a)}normalizeOutputPosition(e,t,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(e>0&&t===this.getMinOutputOffset(e))return new wb(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){const n=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2){if(e===i.offsetInInputWithInjections+i.length&&OA(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(PA(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(OA(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,PA(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}OC()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;se)break;if(e<=l)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:r};n+=r}}}}function OA(o){return o==null?!0:o===Wo.Right||o===Wo.Both}function PA(o){return o==null?!0:o===Wo.Left||o===Wo.Both}class wb{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new B(e+this.outputLineIndex,this.outputOffset+1)}}class OE{constructor(e,t){this.classifier=new AG(e,t)}static create(e){return new OE(e.get(122),e.get(121))}createLineBreaksComputer(e,t,i,n){const s=[],r=[],a=[];return{addRequest:(l,c,d)=>{s.push(l),r.push(c),a.push(d)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let d=0,h=s.length;d=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let kD=[],xD=[];function MG(o,e,t,i,n,s,r){if(n===-1)return null;const a=t.length;if(a<=1)return null;const l=e.breakOffsets,c=e.breakOffsetsVisibleColumn,d=EF(t,i,n,s,r),h=n-d,u=kD,g=xD;let f=0,_=0,b=0,v=n;const C=l.length;let w=0;if(w>=0){let S=Math.abs(c[w]-v);for(;w+1=S)break;S=k,w++}}for(;wS&&(S=_,k=b);let x=0,y=0,D=0,I=0;if(k<=v){let F=k,z=S===0?0:t.charCodeAt(S-1),j=S===0?0:o.get(z),re=!0;for(let he=S;he_&&ID(z,j,ye,xe)&&(x=Se,y=F),F+=He,F>v){Se>_?(D=Se,I=F-He):(D=he+1,I=F),F-y>h&&(x=0),re=!1;break}z=ye,j=xe}if(re){f>0&&(u[f]=l[l.length-1],g[f]=c[l.length-1],f++);break}}if(x===0){let F=k,z=t.charCodeAt(S),j=o.get(z),re=!1;for(let he=S-1;he>=_;he--){const Se=he+1,ye=t.charCodeAt(he);if(ye===9){re=!0;break}let xe,He;if(Td(ye)?(he--,xe=0,He=2):(xe=o.get(ye),He=ic(ye)?s:1),F<=v){if(D===0&&(D=Se,I=F),F<=v-h)break;if(ID(ye,xe,z,j)){x=Se,y=F;break}}F-=He,z=ye,j=xe}if(x!==0){const he=h-(I-y);if(he<=i){const Se=t.charCodeAt(D);let ye;Li(Se)?ye=2:ye=Sp(Se,I,i,s),he-ye<0&&(x=0)}}if(re){w--;continue}}if(x===0&&(x=D,y=I),x<=_){const F=t.charCodeAt(_);Li(F)?(x=_+2,y=b+2):(x=_+1,y=b+Sp(F,b,i,s))}for(_=x,u[f]=x,b=y,g[f]=y,f++,v=y+h;w<0||w=O)break;O=F,w++}}return f===0?null:(u.length=f,g.length=f,kD=e.breakOffsets,xD=e.breakOffsetsVisibleColumn,e.breakOffsets=u,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=d,e)}function RG(o,e,t,i,n,s,r){const a=er.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(y=>y.options),c=t.map(y=>y.column-1)):(l=null,c=null),n===-1)return l?new wp(c,l,[a.length],[],0):null;const d=a.length;if(d<=1)return l?new wp(c,l,[a.length],[],0):null;const h=EF(a,i,n,s,r),u=n-h,g=[],f=[];let _=0,b=0,v=0,C=n,w=a.charCodeAt(0),S=o.get(w),k=Sp(w,0,i,s),x=1;Li(w)&&(k+=1,w=a.charCodeAt(1),S=o.get(w),x++);for(let y=x;yC&&((b===0||k-v>u)&&(b=D,v=k-F),g[_]=b,f[_]=v,_++,C=v+u,b=0),w=I,S=O}return _===0&&(!t||t.length===0)?null:(g[_]=d,f[_]=k,new wp(c,l,g,f,h))}function Sp(o,e,t,i){return o===9?t-e%t:ic(o)||o<32?i:1}function FA(o,e){return e-o%e}function ID(o,e,t,i){return t!==32&&(e===2&&i!==2||e!==1&&i===1||e===3&&i!==2||i===3&&e!==1)}function EF(o,e,t,i,n){let s=0;if(n!==0){const r=kn(o);if(r!==-1){for(let l=0;lt&&(s=0)}}return s}var ES;const NS=(ES=window.trustedTypes)===null||ES===void 0?void 0:ES.createPolicy("domLineBreaksComputer",{createHTML:o=>o});class PE{static create(){return new PE}constructor(){}createLineBreaksComputer(e,t,i,n){const s=[],r=[];return{addRequest:(a,l,c)=>{s.push(a),r.push(l)},finalize:()=>OG(s,e,t,i,n,r)}}}function OG(o,e,t,i,n,s){var r;function a(D){const I=s[D];if(I){const O=er.applyInjectedText(o[D],I),F=I.map(j=>j.options),z=I.map(j=>j.column-1);return new wp(z,F,[O.length],[],0)}else return null}if(i===-1){const D=[];for(let I=0,O=o.length;Il?(O=0,F=0):z=l-he}const j=I.substr(O),re=PG(j,F,t,z,g,h);f[D]=O,_[D]=F,b[D]=j,v[D]=re[0],C[D]=re[1]}const w=g.build(),S=(r=NS==null?void 0:NS.createHTML(w))!==null&&r!==void 0?r:w;u.innerHTML=S,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const k=document.createRange(),x=Array.prototype.slice.call(u.children,0),y=[];for(let D=0;Dxe.options),Se=ye.map(xe=>xe.column-1)):(he=null,Se=null),y[D]=new wp(Se,he,O,re,z)}return document.body.removeChild(u),y}function PG(o,e,t,i,n,s){if(s!==0){const u=String(s);n.appendASCIIString('
');const r=o.length;let a=e,l=0;const c=[],d=[];let h=0");for(let u=0;u"),c[u]=l,d[u]=a;const g=h;h=u+1"),c[o.length]=l,d[o.length]=a,n.appendASCIIString("
"),[c,d]}function FG(o,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{ED(o,n,i,0,null,t.length-1,null,s)}catch(r){return console.log(r),null}return s.length===0?null:(s.push(t.length),s)}function ED(o,e,t,i,n,s,r,a){if(i===s||(n=n||TS(o,e,t[i],t[i+1]),r=r||TS(o,e,t[s],t[s+1]),Math.abs(n[0].top-r[0].top)<=.1))return;if(i+1===s){a.push(s);return}const l=i+(s-i)/2|0,c=TS(o,e,t[l],t[l+1]);ED(o,e,t,i,n,l,c,a),ED(o,e,t,l,c,s,r,a)}function TS(o,e,t,i){return o.setStart(e[t/16384|0].firstChild,t%16384),o.setEnd(e[i/16384|0].firstChild,i%16384),o.getClientRects()}var BG=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ha=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},WG=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let VG=0;class HG{constructor(e,t,i,n,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s}dispose(){nt(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let pg=class tu extends H{constructor(e,t,i,n,s,r,a,l,c,d,h,u){super(),this.languageConfigurationService=h,this._deliveryQueue=new XO,this._onDidDispose=this._register(new R),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new BA({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new BA({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onWillType=this._onWillType.event,this._onDidType=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new R({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection();const g=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++VG,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,g,d)),this._register(this._configuration.onDidChange(b=>{this._onDidChangeConfiguration.fire(b);const v=this._configuration.options;if(b.hasChanged(133)){const C=v.get(133);this._onDidLayoutChange.fire(C)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new zG(this,this._contextKeyService)),this._register(new UG(this,this._contextKeyService,u)),this._instantiationService=n.createChild(new k1([Ee,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new $G(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let f;Array.isArray(i.contributions)?f=i.contributions:f=md.getEditorContributions();for(const b of f){if(this._contributions[b.id]){Te(new Error(`Cannot have two contributions with the same id ${b.id}`));continue}try{const v=this._instantiationService.createInstance(b.ctor,this);this._contributions[b.id]=v}catch(v){Te(v)}}md.getEditorActions().forEach(b=>{if(this._actions[b.id]){Te(new Error(`Cannot have two actions with the same id ${b.id}`));return}const v=new aF(b.id,b.label,b.alias,Wn(b.precondition),()=>this._instantiationService.invokeFunction(C=>Promise.resolve(b.runEditorCommand(C,this,null))),this._contextKeyService);this._actions[v.id]=v});const _=()=>!this._configuration.options.get(83)&&this._configuration.options.get(32).enabled;this._register(new iz(this._domElement,{onDragEnter:()=>{},onDragOver:b=>{if(!_())return;const v=this.getTargetAtClientPoint(b.clientX,b.clientY);v!=null&&v.position&&this.showDropIndicatorAt(v.position)},onDrop:b=>WG(this,void 0,void 0,function*(){if(!_()||(this.removeDropIndicator(),!b.dataTransfer))return;const v=this.getTargetAtClientPoint(b.clientX,b.clientY);v!=null&&v.position&&this._onDropIntoEditor.fire({position:v.position,event:b})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,i){return new aD(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return o_.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;tL.lift(i)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Ci.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(!!this._modelData){if(!B.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!L.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!B.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new L(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=oe.isISelection(e),n=L.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new oe(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!L.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(L.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(!!this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]);const n=t.contributionsState||{},s=Object.keys(this._contributions);for(let a=0,l=s.length;at.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run()).then(void 0,Te);return}!this._modelData||this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i)}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){!this._modelData||(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){!this._modelData||this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||t.length===0)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new L(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){!this._modelData||this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=md.getEditorCommand(t);return n?(i=i||{},i.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,Te)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(83)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(83)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(83))return!1;let n;return i?Array.isArray(i)?n=()=>i:n=i:n=()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){!this._modelData||this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){!this._modelData||this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new jG(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,q0(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,q0(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(133)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(133),s=tu._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:s,left:r,height:i.get(61)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){an(e,this._configuration.options.get(46))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount()),e.onBeforeAttached();const i=new EG(this._id,this._configuration,e,PE.create(),OE.create(this._configuration.options),r=>Jo(r),this.languageConfigurationService,this._themeService);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(r=>{switch(r.kind){case 0:this._onDidContentSizeChange.fire(r);break;case 1:this._editorTextFocus.setValue(r.hasFocus);break;case 2:this._onDidScrollChange.fire(r);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{r.reachedMaxCursorCount&&this._notificationService.warn(p("cursors.maximum","The number of cursors has been limited to {0}.",gg.MAX_CURSOR_COUNT));const a=[];for(let d=0,h=r.selections.length;d{this._paste("keyboard",s,r,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,a,l)=>{this._compositionType("keyboard",s,r,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,r,a,l)=>{const c={text:s,pasteOnNewLine:r,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:s=>{const r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,a,l)=>{if(a||l){const c={text:s,replacePrevCharCnt:r,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new w1(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new wK(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),options:tu.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};pg.dropIntoEditorDecorationOptions=Ne.register({description:"workbench-dnd-target",className:"dnd-target"});pg=BG([ha(3,Ae),ha(4,ct),ha(5,ci),ha(6,Ee),ha(7,Ct),ha(8,di),ha(9,al),ha(10,si),ha(11,de)],pg);class BA extends H{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new R(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new R(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class zG extends H{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=N.editorSimpleInput.bindTo(t),this._editorFocus=N.focus.bindTo(t),this._textInputFocus=N.textInputFocus.bindTo(t),this._editorTextFocus=N.editorTextFocus.bindTo(t),this._editorTabMovesFocus=N.tabMovesFocus.bindTo(t),this._editorReadonly=N.readOnly.bindTo(t),this._inDiffEditor=N.inDiffEditor.bindTo(t),this._editorColumnSelection=N.columnSelection.bindTo(t),this._hasMultipleSelections=N.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=N.hasNonEmptySelection.bindTo(t),this._canUndo=N.canUndo.bindTo(t),this._canRedo=N.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(132)),this._editorReadonly.set(e.get(83)),this._inDiffEditor.set(e.get(56)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class UG extends H{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=N.languageId.bindTo(t),this._hasCompletionItemProvider=N.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=N.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=N.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=N.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=N.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=N.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=N.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=N.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=N.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=N.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=N.hasReferenceProvider.bindTo(t),this._hasRenameProvider=N.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=N.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=N.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=N.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=N.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=N.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=N.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=N.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Me.walkThroughSnippet)})}}class $G extends H{constructor(e){super(),this._onChange=this._register(new R),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Od(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class jG{constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}get length(){return this._decorationIds.length}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(n=>{this._isChangingDecorations||e.call(t,n)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}}}const KG=encodeURIComponent("");function AS(o){return KG+encodeURIComponent(o.toString())+qG}const GG=encodeURIComponent('');function YG(o){return GG+encodeURIComponent(o.toString())+ZG}Et((o,e)=>{const t=o.getColor(x4);t&&e.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${t}; }`);const i=o.getColor(Or);i&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${AS(i)}") repeat-x bottom left; }`);const n=o.getColor(Tz);n&&e.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${n}; }`);const s=o.getColor(ag);s&&e.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const r=o.getColor(vs);r&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${AS(r)}") repeat-x bottom left; }`);const a=o.getColor(Az);a&&e.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=o.getColor(Cv);l&&e.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=o.getColor(zn);c&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${AS(c)}") repeat-x bottom left; }`);const d=o.getColor(Mz);d&&e.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${d}; }`);const h=o.getColor(Oz);h&&e.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=o.getColor(Rz);u&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${YG(u)}") no-repeat bottom left; }`);const g=o.getColor(F$);g&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const f=o.getColor(P$);f&&e.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${f}; }`);const _=o.getColor(Cs)||"inherit";e.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${_}}`)});class bt{constructor(e,t,i){const n=s=>this.emitter.fire(s);this.emitter=new R({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function ND(o){return o.preventDefault(),o.stopPropagation(),o}var Zg=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const QG=!1;var Fv;(function(o){o.North="north",o.South="south",o.East="east",o.West="west"})(Fv||(Fv={}));let XG=4;const JG=new R;let eZ=300;const tZ=new R;class FE{constructor(){this.disposables=new Q}get onPointerMove(){return this.disposables.add(new bt(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new bt(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Zg([pi],FE.prototype,"onPointerMove",null);Zg([pi],FE.prototype,"onPointerUp",null);class BE{constructor(e){this.el=e,this.disposables=new Q}get onPointerMove(){return this.disposables.add(new bt(this.el,xt.Change)).event}get onPointerUp(){return this.disposables.add(new bt(this.el,xt.End)).event}dispose(){this.disposables.dispose()}}Zg([pi],BE.prototype,"onPointerMove",null);Zg([pi],BE.prototype,"onPointerUp",null);class Bv{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Zg([pi],Bv.prototype,"onPointerMove",null);Zg([pi],Bv.prototype,"onPointerUp",null);const WA="pointer-events-disabled";class tn extends H{constructor(e,t,i){super(),this.hoverDelay=eZ,this.hoverDelayer=this._register(new Kr(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new R),this._onDidStart=this._register(new R),this._onDidChange=this._register(new R),this._onDidReset=this._register(new R),this._onDidEnd=this._register(new R),this.orthogonalStartSashDisposables=this._register(new Q),this.orthogonalStartDragHandleDisposables=this._register(new Q),this.orthogonalEndSashDisposables=this._register(new Q),this.orthogonalEndDragHandleDisposables=this._register(new Q),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=q(e,J(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Ge&&this.el.classList.add("mac");const n=this._register(new bt(this.el,"mousedown")).event;this._register(n(h=>this.onPointerStart(h,new FE),this));const s=this._register(new bt(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const r=this._register(new bt(this.el,"mouseenter")).event;this._register(r(()=>tn.onMouseEnter(this)));const a=this._register(new bt(this.el,"mouseleave")).event;this._register(a(()=>tn.onMouseLeave(this))),this._register(ft.addTarget(this.el));const l=ge.map(this._register(new bt(this.el,xt.Start)).event,h=>{var u;return Object.assign(Object.assign({},h),{target:(u=h.initialTarget)!==null&&u!==void 0?u:null})});this._register(l(h=>this.onPointerStart(h,new BE(this.el)),this));const c=this._register(new bt(this.el,xt.Tap)).event,d=ge.map(ge.filter(ge.debounce(c,(h,u)=>{var g;return{event:u,count:((g=h==null?void 0:h.count)!==null&&g!==void 0?g:0)+1}},250),({count:h})=>h===2),({event:h})=>{var u;return Object.assign(Object.assign({},h),{target:(u=h.initialTarget)!==null&&u!==void 0?u:null})});this._register(d(this.onPointerDoublePress,this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=XG,this._register(JG.event(h=>{this.size=h,this.layout()}))),this._register(tZ.event(h=>this.hoverDelay=h)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",QG),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=q(this.el,J(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Be(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new bt(this._orthogonalStartDragHandle,"mouseenter")).event(()=>tn.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new bt(this._orthogonalStartDragHandle,"mouseleave")).event(()=>tn.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=q(this.el,J(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Be(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new bt(this._orthogonalEndDragHandle,"mouseenter")).event(()=>tn.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new bt(this._orthogonalEndDragHandle,"mouseleave")).event(()=>tn.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){ut.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const f=this.getOrthogonalSash(e);f&&(i=!0,e.__orthogonalSashEvent=!0,f.onPointerStart(e,new Bv(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Bv(t))),!this.state)return;const n=JH("iframe");for(const f of n)f.classList.add(WA);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Qs(this.el),d=()=>{let f="";i?f="all-scroll":this.orientation===1?this.state===1?f="s-resize":this.state===2?f="n-resize":f=Ge?"row-resize":"ns-resize":this.state===1?f="e-resize":this.state===2?f="w-resize":f=Ge?"col-resize":"ew-resize",c.textContent=`* { cursor: ${f} !important; }`},h=new Q;d(),i||this.onDidEnablementChange.event(d,null,h);const u=f=>{ut.stop(f,!1);const _={startX:s,currentX:f.pageX,startY:r,currentY:f.pageY,altKey:a};this._onDidChange.fire(_)},g=f=>{ut.stop(f,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(const _ of n)_.classList.remove(WA)};t.onPointerMove(u,null,h),t.onPointerUp(g,null,h),h.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&tn.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&tn.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){tn.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){if(!(!e.target||!(e.target instanceof HTMLElement))&&e.target.classList.contains("orthogonal-drag-handle"))return e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}class hc{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(e.getScrollTop()!==0){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}}return new hc(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}const __={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Vn.text},Vc={CurrentDragAndDropData:void 0};var VA,HA;class iZ{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new Uu(new oZ(e,t))}static forStrings(){return new Uu(new iZ)}static forConfigKeys(){return new Uu(new nZ)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new Sb,this._root.segment=i.value());const s=[];for(n=this._root;;){const a=i.cmp(n.segment);if(a>0)n.left||(n.left=new Sb,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(a<0)n.right||(n.right=new Sb,n.right.segment=i.value()),s.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new Sb,n.mid.segment=i.value()),s.push([0,n]),n=n.mid;else break}const r=n.value;n.value=t,n.key=e;for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const c=l.balanceFactor();if(c<-1||c>1){const d=s[a][0],h=s[a+1][0];if(d===1&&h===1)s[a][1]=l.rotateLeft();else if(d===-1&&h===-1)s[a][1]=l.rotateRight();else if(d===1&&h===-1)l.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=l.rotateLeft();else if(d===-1&&h===1)l.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return r}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),s=[];let r=this._root;for(;r;){const a=n.cmp(r.segment);if(a>0)s.push([-1,r]),r=r.left;else if(a<0)s.push([1,r]),r=r.right;else if(n.hasNext())n.next(),s.push([0,r]),r=r.mid;else break}if(!!r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const a=this._min(r.right),{key:l,value:c,segment:d}=a;this._delete(a.key,!1),r.key=l,r.value=c,r.segment=d}else{const a=(i=r.left)!==null&&i!==void 0?i:r.right;if(s.length>0){const[l,c]=s[s.length-1];switch(l){case-1:c.left=a;break;case 0:c.mid=a;break;case 1:c.right=a;break}}else this._root=a}for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const c=l.balanceFactor();if(c>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),s[a][1]=l.rotateLeft()):c<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),s[a][1]=l.rotateRight()),a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){!e||(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}class rZ{constructor(e,t){this.uri=e,this.value=t}}class mn{constructor(e,t){this[VA]="ResourceMap",e instanceof mn?(this.map=new Map(e.map),this.toKey=t!=null?t:mn.defaultToKey):(this.map=new Map,this.toKey=e!=null?e:mn.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new rZ(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(VA=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}mn.defaultToKey=o=>o.toString();class aZ{constructor(){this[HA]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(!!i)return t!==0&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,i!==0&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(!!t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(HA=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const i=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const i=e.next,n=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Dc extends aZ{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}function WE(...o){return function(e,t){for(let i=0,n=o.length;i0?[{start:0,end:e.length}]:[]:null}function T5(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function A5(o,e){return TD(o.toLowerCase(),e.toLowerCase(),0,0)}function TD(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=TD(o,e,t+1,i+1))?zE({start:i,end:i+1},n):null}return TD(o,e,t,i+1)}function VE(o){return 97<=o&&o<=122}function I1(o){return 65<=o&&o<=90}function HE(o){return 48<=o&&o<=57}function M5(o){return o===32||o===9||o===10||o===13}const R5=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>R5.add(o.charCodeAt(0)));function Wv(o){return M5(o)||R5.has(o)}function lZ(o,e){return o===e||Wv(o)&&Wv(e)}function O5(o){return VE(o)||I1(o)||HE(o)}function zE(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function P5(o,e){for(let t=e;t0&&!O5(o.charCodeAt(t-1)))return t}return o.length}function AD(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=AD(o,e,t+1,i+1);!n&&(s=P5(e,s)).6}function hZ(o){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function uZ(o){let e=0,t=0,i=0,n=0;for(let s=0;s60)return null;const t=cZ(e);if(!hZ(t)){if(!dZ(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n0&&Wv(o.charCodeAt(t-1)))return t;return o.length}const fZ=WE(x1,F5,T5),pZ=WE(x1,F5,A5),zA=new Dc(1e4);function UA(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=zA.get(o);i||(i=new RegExp(DB(o),"i"),zA.set(o,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?pZ(o,e):fZ(o,e)}function mZ(o,e,t,i,n,s){const r=Math.min(13,o.length);for(;t"u")return[];const e=[],t=o[1];for(let i=o.length-1;i>1;i--){const n=o[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const Bl=128;function UE(){const o=[],e=[];for(let t=0;t<=Bl;t++)e[t]=0;for(let t=0;t<=Bl;t++)o.push(e.slice(0));return o}function W5(o){const e=[];for(let t=0;t<=o;t++)e[t]=0;return e}const V5=W5(2*Bl),RD=W5(2*Bl),ua=UE(),Hc=UE(),yb=UE();function Lb(o,e){if(e<0||e>=o.length)return!1;const t=o.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!yI(t)}}function $A(o,e){if(e<0||e>=o.length)return!1;switch(o.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function S0(o,e,t){return e[o]!==t[o]}function _Z(o,e,t,i,n,s,r=!1){for(;eBl?Bl:o.length,l=i.length>Bl?Bl:i.length;if(t>=a||s>=l||a-t>l-s||!_Z(e,t,a,n,s,l,!0))return;bZ(a,l,t,s,e,n);let c=1,d=1,h=t,u=s;const g=[!1];for(c=1,h=t;hC,I=D?Hc[c][d-1]+(ua[c][d-1]>0?-5:0):0,O=u>C+1&&ua[c][d-1]>0,F=O?Hc[c][d-2]+(ua[c][d-2]>0?-5:0):0;if(O&&(!D||F>=I)&&(!x||F>=y))Hc[c][d]=F,yb[c][d]=3,ua[c][d]=0;else if(D&&(!x||I>=y))Hc[c][d]=I,yb[c][d]=2,ua[c][d]=0;else if(x)Hc[c][d]=y,yb[c][d]=1,ua[c][d]=ua[c-1][d-1]+1;else throw new Error("not possible")}}if(!g[0]&&!r.firstMatchCanBeWeak)return;c--,d--;const f=[Hc[c][d],s];let _=0,b=0;for(;c>=1;){let C=d;do{const w=yb[c][C];if(w===3)C=C-2;else if(w===2)C=C-1;else break}while(C>=1);_>1&&e[t+c-1]===n[s+d-1]&&!S0(C+s-1,i,n)&&_+1>ua[c][C]&&(C=d),C===d?_++:_=1,b||(b=C),c--,d=C-1,f.push(d)}l===a&&r.boostFullMatch&&(f[0]+=2);const v=b-a;return f[0]-=v,f}function bZ(o,e,t,i,n,s){let r=o-1,a=e-1;for(;r>=t&&a>=i;)n[r]===s[a]&&(RD[r]=a,r--),a--}function vZ(o,e,t,i,n,s,r,a,l,c,d){if(e[t]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===t-i?h=o[t]===n[r]?7:5:S0(r,n,s)&&(r===0||!S0(r-1,n,s))?(h=o[t]===n[r]?7:5,u=!0):Lb(s,r)&&(r===0||!Lb(s,r-1))?h=5:(Lb(s,r-1)||$A(s,r-1))&&(h=5,u=!0),h>1&&t===i&&(d[0]=!0),u||(u=S0(r,n,s)||Lb(s,r-1)||$A(s,r-1)),t===i?r>l&&(h-=u?3:5):c?h+=u?2:0:h+=u?0:1,r+1===a&&(h-=u?3:5),h}function CZ(o,e,t,i,n,s,r){return wZ(o,e,t,i,n,s,!0,r)}function wZ(o,e,t,i,n,s,r,a){let l=mg(o,e,t,i,n,s,a);if(l&&!r)return l;if(o.length>=3){const c=Math.min(7,o.length-1);for(let d=t+1;dl[0])&&(l=u))}}}return l}function SZ(o,e){if(e+1>=o.length)return;const t=o[e],i=o[e+1];if(t!==i)return o.slice(0,e)+i+t+o.slice(e+2)}const yp="$(",jE=new RegExp(`\\$\\(${Ln.iconNameExpression}(?:${Ln.iconModifierExpression})?\\)`,"g"),yZ=new RegExp(Ln.iconNameCharacter),LZ=new RegExp(`(\\\\)?${jE.source}`,"g");function DZ(o){return o.replace(LZ,(e,t)=>t?e:`\\${e}`)}const kZ=new RegExp(`\\\\${jE.source}`,"g");function xZ(o){return o.replace(kZ,e=>`\\${e}`)}const IZ=new RegExp(`(\\s)?(\\\\)?${jE.source}(\\s)?`,"g");function KE(o){return o.indexOf(yp)===-1?o:o.replace(IZ,(e,t,i,n)=>i?e:t||n||"")}function Wh(o){const e=o.indexOf(yp);return e===-1?{text:o}:EZ(o,e)}function EZ(o,e){const t=[];let i="";function n(u){if(u){i+=u;for(const g of u)t.push(a)}}let s=-1,r="",a=0,l,c,d=e;const h=o.length;for(n(o.substr(0,e));d" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){!this._modelData||this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?tu._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?tu._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?tu._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e){var t;(t=this._modelData)===null||t===void 0||t.viewModel.setHiddenAreas(e.map(i=>L.lift(i)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Ci.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(!!this._modelData){if(!B.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!L.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!B.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new L(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=oe.isISelection(e),n=L.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new oe(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!L.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(L.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(!!this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]);const n=t.contributionsState||{},s=Object.keys(this._contributions);for(let a=0,l=s.length;at.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run()).then(void 0,Te);return}!this._modelData||this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i)}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){!this._modelData||(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){!this._modelData||this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||t.length===0)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new L(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){!this._modelData||this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=md.getEditorCommand(t);return n?(i=i||{},i.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,Te)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(83)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(83)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(83))return!1;let n;return i?Array.isArray(i)?n=()=>i:n=i:n=()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){!this._modelData||this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){!this._modelData||this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new jG(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,q0(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,q0(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(133)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(133),s=tu._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:s,left:r,height:i.get(61)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){an(e,this._configuration.options.get(46))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount()),e.onBeforeAttached();const i=new EG(this._id,this._configuration,e,PE.create(),OE.create(this._configuration.options),r=>Jo(r),this.languageConfigurationService,this._themeService);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(r=>{switch(r.kind){case 0:this._onDidContentSizeChange.fire(r);break;case 1:this._editorTextFocus.setValue(r.hasFocus);break;case 2:this._onDidScrollChange.fire(r);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{r.reachedMaxCursorCount&&this._notificationService.warn(p("cursors.maximum","The number of cursors has been limited to {0}.",gg.MAX_CURSOR_COUNT));const a=[];for(let d=0,h=r.selections.length;d{this._paste("keyboard",s,r,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,a,l)=>{this._compositionType("keyboard",s,r,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,r,a,l)=>{const c={text:s,pasteOnNewLine:r,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:s=>{const r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,a,l)=>{if(a||l){const c={text:s,replacePrevCharCnt:r,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new w1(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new wK(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),options:tu.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};pg.dropIntoEditorDecorationOptions=Ne.register({description:"workbench-dnd-target",className:"dnd-target"});pg=BG([ha(3,Ae),ha(4,ct),ha(5,ci),ha(6,Ee),ha(7,Ct),ha(8,di),ha(9,al),ha(10,si),ha(11,de)],pg);class BA extends H{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new R(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new R(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class zG extends H{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=N.editorSimpleInput.bindTo(t),this._editorFocus=N.focus.bindTo(t),this._textInputFocus=N.textInputFocus.bindTo(t),this._editorTextFocus=N.editorTextFocus.bindTo(t),this._editorTabMovesFocus=N.tabMovesFocus.bindTo(t),this._editorReadonly=N.readOnly.bindTo(t),this._inDiffEditor=N.inDiffEditor.bindTo(t),this._editorColumnSelection=N.columnSelection.bindTo(t),this._hasMultipleSelections=N.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=N.hasNonEmptySelection.bindTo(t),this._canUndo=N.canUndo.bindTo(t),this._canRedo=N.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(132)),this._editorReadonly.set(e.get(83)),this._inDiffEditor.set(e.get(56)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class UG extends H{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=N.languageId.bindTo(t),this._hasCompletionItemProvider=N.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=N.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=N.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=N.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=N.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=N.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=N.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=N.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=N.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=N.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=N.hasReferenceProvider.bindTo(t),this._hasRenameProvider=N.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=N.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=N.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=N.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=N.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=N.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=N.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=N.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Me.walkThroughSnippet)})}}class $G extends H{constructor(e){super(),this._onChange=this._register(new R),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Od(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class jG{constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}get length(){return this._decorationIds.length}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(n=>{this._isChangingDecorations||e.call(t,n)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}}}const KG=encodeURIComponent("");function AS(o){return KG+encodeURIComponent(o.toString())+qG}const GG=encodeURIComponent('');function YG(o){return GG+encodeURIComponent(o.toString())+ZG}Et((o,e)=>{const t=o.getColor(x4);t&&e.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${t}; }`);const i=o.getColor(Or);i&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${AS(i)}") repeat-x bottom left; }`);const n=o.getColor(Tz);n&&e.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${n}; }`);const s=o.getColor(ag);s&&e.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const r=o.getColor(vs);r&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${AS(r)}") repeat-x bottom left; }`);const a=o.getColor(Az);a&&e.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=o.getColor(Cv);l&&e.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=o.getColor(zn);c&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${AS(c)}") repeat-x bottom left; }`);const d=o.getColor(Mz);d&&e.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${d}; }`);const h=o.getColor(Oz);h&&e.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=o.getColor(Rz);u&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${YG(u)}") no-repeat bottom left; }`);const g=o.getColor(F$);g&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const f=o.getColor(P$);f&&e.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${f}; }`);const _=o.getColor(Cs)||"inherit";e.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${_}}`)});class bt{constructor(e,t,i){const n=s=>this.emitter.fire(s);this.emitter=new R({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function ND(o){return o.preventDefault(),o.stopPropagation(),o}var Zg=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const QG=!1;var Fv;(function(o){o.North="north",o.South="south",o.East="east",o.West="west"})(Fv||(Fv={}));let XG=4;const JG=new R;let eZ=300;const tZ=new R;class FE{constructor(){this.disposables=new Q}get onPointerMove(){return this.disposables.add(new bt(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new bt(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Zg([pi],FE.prototype,"onPointerMove",null);Zg([pi],FE.prototype,"onPointerUp",null);class BE{constructor(e){this.el=e,this.disposables=new Q}get onPointerMove(){return this.disposables.add(new bt(this.el,xt.Change)).event}get onPointerUp(){return this.disposables.add(new bt(this.el,xt.End)).event}dispose(){this.disposables.dispose()}}Zg([pi],BE.prototype,"onPointerMove",null);Zg([pi],BE.prototype,"onPointerUp",null);class Bv{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Zg([pi],Bv.prototype,"onPointerMove",null);Zg([pi],Bv.prototype,"onPointerUp",null);const WA="pointer-events-disabled";class tn extends H{constructor(e,t,i){super(),this.hoverDelay=eZ,this.hoverDelayer=this._register(new Kr(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new R),this._onDidStart=this._register(new R),this._onDidChange=this._register(new R),this._onDidReset=this._register(new R),this._onDidEnd=this._register(new R),this.orthogonalStartSashDisposables=this._register(new Q),this.orthogonalStartDragHandleDisposables=this._register(new Q),this.orthogonalEndSashDisposables=this._register(new Q),this.orthogonalEndDragHandleDisposables=this._register(new Q),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=q(e,J(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Ge&&this.el.classList.add("mac");const n=this._register(new bt(this.el,"mousedown")).event;this._register(n(h=>this.onPointerStart(h,new FE),this));const s=this._register(new bt(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const r=this._register(new bt(this.el,"mouseenter")).event;this._register(r(()=>tn.onMouseEnter(this)));const a=this._register(new bt(this.el,"mouseleave")).event;this._register(a(()=>tn.onMouseLeave(this))),this._register(ft.addTarget(this.el));const l=ge.map(this._register(new bt(this.el,xt.Start)).event,h=>{var u;return Object.assign(Object.assign({},h),{target:(u=h.initialTarget)!==null&&u!==void 0?u:null})});this._register(l(h=>this.onPointerStart(h,new BE(this.el)),this));const c=this._register(new bt(this.el,xt.Tap)).event,d=ge.map(ge.filter(ge.debounce(c,(h,u)=>{var g;return{event:u,count:((g=h==null?void 0:h.count)!==null&&g!==void 0?g:0)+1}},250),({count:h})=>h===2),({event:h})=>{var u;return Object.assign(Object.assign({},h),{target:(u=h.initialTarget)!==null&&u!==void 0?u:null})});this._register(d(this.onPointerDoublePress,this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=XG,this._register(JG.event(h=>{this.size=h,this.layout()}))),this._register(tZ.event(h=>this.hoverDelay=h)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",QG),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=q(this.el,J(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Be(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new bt(this._orthogonalStartDragHandle,"mouseenter")).event(()=>tn.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new bt(this._orthogonalStartDragHandle,"mouseleave")).event(()=>tn.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=q(this.el,J(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Be(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new bt(this._orthogonalEndDragHandle,"mouseenter")).event(()=>tn.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new bt(this._orthogonalEndDragHandle,"mouseleave")).event(()=>tn.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){ut.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const f=this.getOrthogonalSash(e);f&&(i=!0,e.__orthogonalSashEvent=!0,f.onPointerStart(e,new Bv(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Bv(t))),!this.state)return;const n=JH("iframe");for(const f of n)f.classList.add(WA);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Qs(this.el),d=()=>{let f="";i?f="all-scroll":this.orientation===1?this.state===1?f="s-resize":this.state===2?f="n-resize":f=Ge?"row-resize":"ns-resize":this.state===1?f="e-resize":this.state===2?f="w-resize":f=Ge?"col-resize":"ew-resize",c.textContent=`* { cursor: ${f} !important; }`},h=new Q;d(),i||this.onDidEnablementChange.event(d,null,h);const u=f=>{ut.stop(f,!1);const _={startX:s,currentX:f.pageX,startY:r,currentY:f.pageY,altKey:a};this._onDidChange.fire(_)},g=f=>{ut.stop(f,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(const _ of n)_.classList.remove(WA)};t.onPointerMove(u,null,h),t.onPointerUp(g,null,h),h.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&tn.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&tn.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){tn.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){if(!(!e.target||!(e.target instanceof HTMLElement))&&e.target.classList.contains("orthogonal-drag-handle"))return e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}class hc{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(e.getScrollTop()!==0){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}}return new hc(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}const __={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Vn.text},Vc={CurrentDragAndDropData:void 0};var VA,HA;class iZ{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new Uu(new oZ(e,t))}static forStrings(){return new Uu(new iZ)}static forConfigKeys(){return new Uu(new nZ)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new Sb,this._root.segment=i.value());const s=[];for(n=this._root;;){const a=i.cmp(n.segment);if(a>0)n.left||(n.left=new Sb,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(a<0)n.right||(n.right=new Sb,n.right.segment=i.value()),s.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new Sb,n.mid.segment=i.value()),s.push([0,n]),n=n.mid;else break}const r=n.value;n.value=t,n.key=e;for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const c=l.balanceFactor();if(c<-1||c>1){const d=s[a][0],h=s[a+1][0];if(d===1&&h===1)s[a][1]=l.rotateLeft();else if(d===-1&&h===-1)s[a][1]=l.rotateRight();else if(d===1&&h===-1)l.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=l.rotateLeft();else if(d===-1&&h===1)l.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return r}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),s=[];let r=this._root;for(;r;){const a=n.cmp(r.segment);if(a>0)s.push([-1,r]),r=r.left;else if(a<0)s.push([1,r]),r=r.right;else if(n.hasNext())n.next(),s.push([0,r]),r=r.mid;else break}if(!!r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const a=this._min(r.right),{key:l,value:c,segment:d}=a;this._delete(a.key,!1),r.key=l,r.value=c,r.segment=d}else{const a=(i=r.left)!==null&&i!==void 0?i:r.right;if(s.length>0){const[l,c]=s[s.length-1];switch(l){case-1:c.left=a;break;case 0:c.mid=a;break;case 1:c.right=a;break}}else this._root=a}for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const c=l.balanceFactor();if(c>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),s[a][1]=l.rotateLeft()):c<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),s[a][1]=l.rotateRight()),a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){!e||(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}class rZ{constructor(e,t){this.uri=e,this.value=t}}class mn{constructor(e,t){this[VA]="ResourceMap",e instanceof mn?(this.map=new Map(e.map),this.toKey=t!=null?t:mn.defaultToKey):(this.map=new Map,this.toKey=e!=null?e:mn.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new rZ(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(VA=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}mn.defaultToKey=o=>o.toString();class aZ{constructor(){this[HA]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(!!i)return t!==0&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,i!==0&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(!!t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(HA=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const i=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const i=e.next,n=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Dc extends aZ{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}function WE(...o){return function(e,t){for(let i=0,n=o.length;i0?[{start:0,end:e.length}]:[]:null}function TF(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function AF(o,e){return TD(o.toLowerCase(),e.toLowerCase(),0,0)}function TD(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=TD(o,e,t+1,i+1))?zE({start:i,end:i+1},n):null}return TD(o,e,t,i+1)}function VE(o){return 97<=o&&o<=122}function I1(o){return 65<=o&&o<=90}function HE(o){return 48<=o&&o<=57}function MF(o){return o===32||o===9||o===10||o===13}const RF=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>RF.add(o.charCodeAt(0)));function Wv(o){return MF(o)||RF.has(o)}function lZ(o,e){return o===e||Wv(o)&&Wv(e)}function OF(o){return VE(o)||I1(o)||HE(o)}function zE(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function PF(o,e){for(let t=e;t0&&!OF(o.charCodeAt(t-1)))return t}return o.length}function AD(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=AD(o,e,t+1,i+1);!n&&(s=PF(e,s)).6}function hZ(o){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function uZ(o){let e=0,t=0,i=0,n=0;for(let s=0;s60)return null;const t=cZ(e);if(!hZ(t)){if(!dZ(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n0&&Wv(o.charCodeAt(t-1)))return t;return o.length}const fZ=WE(x1,FF,TF),pZ=WE(x1,FF,AF),zA=new Dc(1e4);function UA(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=zA.get(o);i||(i=new RegExp(DB(o),"i"),zA.set(o,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?pZ(o,e):fZ(o,e)}function mZ(o,e,t,i,n,s){const r=Math.min(13,o.length);for(;t"u")return[];const e=[],t=o[1];for(let i=o.length-1;i>1;i--){const n=o[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const Bl=128;function UE(){const o=[],e=[];for(let t=0;t<=Bl;t++)e[t]=0;for(let t=0;t<=Bl;t++)o.push(e.slice(0));return o}function WF(o){const e=[];for(let t=0;t<=o;t++)e[t]=0;return e}const VF=WF(2*Bl),RD=WF(2*Bl),ua=UE(),Hc=UE(),yb=UE();function Lb(o,e){if(e<0||e>=o.length)return!1;const t=o.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!yI(t)}}function $A(o,e){if(e<0||e>=o.length)return!1;switch(o.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function S0(o,e,t){return e[o]!==t[o]}function _Z(o,e,t,i,n,s,r=!1){for(;eBl?Bl:o.length,l=i.length>Bl?Bl:i.length;if(t>=a||s>=l||a-t>l-s||!_Z(e,t,a,n,s,l,!0))return;bZ(a,l,t,s,e,n);let c=1,d=1,h=t,u=s;const g=[!1];for(c=1,h=t;hC,I=D?Hc[c][d-1]+(ua[c][d-1]>0?-5:0):0,O=u>C+1&&ua[c][d-1]>0,F=O?Hc[c][d-2]+(ua[c][d-2]>0?-5:0):0;if(O&&(!D||F>=I)&&(!x||F>=y))Hc[c][d]=F,yb[c][d]=3,ua[c][d]=0;else if(D&&(!x||I>=y))Hc[c][d]=I,yb[c][d]=2,ua[c][d]=0;else if(x)Hc[c][d]=y,yb[c][d]=1,ua[c][d]=ua[c-1][d-1]+1;else throw new Error("not possible")}}if(!g[0]&&!r.firstMatchCanBeWeak)return;c--,d--;const f=[Hc[c][d],s];let _=0,b=0;for(;c>=1;){let C=d;do{const w=yb[c][C];if(w===3)C=C-2;else if(w===2)C=C-1;else break}while(C>=1);_>1&&e[t+c-1]===n[s+d-1]&&!S0(C+s-1,i,n)&&_+1>ua[c][C]&&(C=d),C===d?_++:_=1,b||(b=C),c--,d=C-1,f.push(d)}l===a&&r.boostFullMatch&&(f[0]+=2);const v=b-a;return f[0]-=v,f}function bZ(o,e,t,i,n,s){let r=o-1,a=e-1;for(;r>=t&&a>=i;)n[r]===s[a]&&(RD[r]=a,r--),a--}function vZ(o,e,t,i,n,s,r,a,l,c,d){if(e[t]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===t-i?h=o[t]===n[r]?7:5:S0(r,n,s)&&(r===0||!S0(r-1,n,s))?(h=o[t]===n[r]?7:5,u=!0):Lb(s,r)&&(r===0||!Lb(s,r-1))?h=5:(Lb(s,r-1)||$A(s,r-1))&&(h=5,u=!0),h>1&&t===i&&(d[0]=!0),u||(u=S0(r,n,s)||Lb(s,r-1)||$A(s,r-1)),t===i?r>l&&(h-=u?3:5):c?h+=u?2:0:h+=u?0:1,r+1===a&&(h-=u?3:5),h}function CZ(o,e,t,i,n,s,r){return wZ(o,e,t,i,n,s,!0,r)}function wZ(o,e,t,i,n,s,r,a){let l=mg(o,e,t,i,n,s,a);if(l&&!r)return l;if(o.length>=3){const c=Math.min(7,o.length-1);for(let d=t+1;dl[0])&&(l=u))}}}return l}function SZ(o,e){if(e+1>=o.length)return;const t=o[e],i=o[e+1];if(t!==i)return o.slice(0,e)+i+t+o.slice(e+2)}const yp="$(",jE=new RegExp(`\\$\\(${Ln.iconNameExpression}(?:${Ln.iconModifierExpression})?\\)`,"g"),yZ=new RegExp(Ln.iconNameCharacter),LZ=new RegExp(`(\\\\)?${jE.source}`,"g");function DZ(o){return o.replace(LZ,(e,t)=>t?e:`\\${e}`)}const kZ=new RegExp(`\\\\${jE.source}`,"g");function xZ(o){return o.replace(kZ,e=>`\\${e}`)}const IZ=new RegExp(`(\\s)?(\\\\)?${jE.source}(\\s)?`,"g");function KE(o){return o.indexOf(yp)===-1?o:o.replace(IZ,(e,t,i,n)=>i?e:t||n||"")}function Wh(o){const e=o.indexOf(yp);return e===-1?{text:o}:EZ(o,e)}function EZ(o,e){const t=[];let i="";function n(u){if(u){i+=u;for(const g of u)t.push(a)}}let s=-1,r="",a=0,l,c,d=e;const h=o.length;for(n(o.substr(0,e));d" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ `:` `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=` -`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(ys(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function _g(o){return H5(o)?!o.value:Array.isArray(o)?o.every(_g):!0}function H5(o){return o instanceof Fn?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}function NZ(o){return o.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function kb(o){return o.replace(/"/g,""")}function MS(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function TZ(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(r));l&&e.push(`width="${a}"`),c&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}var OD=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function AZ(o,e){Un(e)?o.title=KE(e):e!=null&&e.markdownNotSupportedFallback?o.title=e.markdownNotSupportedFallback:o.removeAttribute("title")}class MZ{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return OD(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||Un(e)||e instanceof HTMLElement)s=e;else if(!K0(e.markdown))s=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Qi;const r=this._cancellationTokenSource.token;if(s=yield e.markdown(r),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(s,t,i)})}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(s,t)}n==null||n.dispose()}hasContent(e){return e?H5(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function z5(o,e,t,i){let n,s;const r=(h,u)=>{var g;h&&(s==null||s.dispose(),s=void 0),u&&(n==null||n.dispose(),n=void 0),(g=o.onDidHideHover)===null||g===void 0||g.call(o)},a=(h,u,g)=>new xs(()=>OD(this,void 0,void 0,function*(){(!s||s.isDisposed)&&(s=new MZ(o,g||e,h>0),yield s.update(t,u,i))}),h),l=()=>{if(n)return;const h=new Q,u=_=>r(!1,_.fromElement===e);h.add(G(e,ae.MOUSE_LEAVE,u,!0));const g=()=>r(!0,!0);h.add(G(e,ae.MOUSE_DOWN,g,!0));const f={targetElements:[e],dispose:()=>{}};if(o.placement===void 0||o.placement==="mouse"){const _=b=>{f.x=b.x+10,b.target instanceof HTMLElement&&b.target.classList.contains("action-label")&&r(!0,!0)};h.add(G(e,ae.MOUSE_MOVE,_,!0))}h.add(a(o.delay,!1,f)),n=h},c=G(e,ae.MOUSE_OVER,l,!0);return{show:h=>{r(!1,!0),a(0,h)},hide:()=>{r(!0,!0)},update:(h,u)=>OD(this,void 0,void 0,function*(){t=h,yield s==null?void 0:s.update(t,void 0,u)}),dispose:()=>{c.dispose(),r(!0,!0)}}}class Dr extends H{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof is&&this._register(t.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}get action(){return this._action}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new og)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(ft.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Ls&&this._register(G(e,ae.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(__.TEXT,this._action.label)}))),this._register(G(t,xt.Tap,n=>this.onClick(n,!0))),this._register(G(t,ae.MOUSE_DOWN,n=>{i||ut.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),Ge&&this._register(G(t,ae.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(G(t,ae.CLICK,n=>{ut.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(G(t,ae.DBLCLICK,n=>{ut.stop(n,!0)})),[ae.MOUSE_UP,ae.MOUSE_OUT].forEach(n=>{this._register(G(t,n,s=>{ut.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var i;ut.stop(e,!0);const n=ms(this._context)?!((i=this.options)===null||i===void 0)&&i.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.getAction().tooltip}updateTooltip(){var e;if(!this.element)return;const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=z5(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class fm extends Dr{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=q(this.element,J("a.action-label"))),this.label&&(this._action.id===ln.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(q(this.element,J("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}getTooltip(){let e=null;return this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=p({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e!=null?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var RZ=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Zr extends H{constructor(e,t={}){var i,n,s,r,a,l;super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new R),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new R({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new R),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new R),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(r=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&r!==void 0?r:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new og,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(h=>this._onDidRun.fire(h))),this._register(this._actionRunner.onBeforeRun(h=>this._onBeforeRun.fire(h))),this._actionIds=[],this.viewItems=[],this.viewItemDisposables=new Map,this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let c,d;switch(this._orientation){case 0:c=[15],d=[17];break;case 1:c=[16],d=[18],this.domNode.className+=" vertical";break}this._register(G(this.domNode,ae.KEY_DOWN,h=>{const u=new Rt(h);let g=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(u.equals(c[0])||u.equals(c[1]))?g=this.focusPrevious():d&&(u.equals(d[0])||u.equals(d[1]))?g=this.focusNext():u.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():u.equals(14)?g=this.focusFirst():u.equals(13)?g=this.focusLast():u.equals(2)&&f instanceof Dr&&f.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(u)?this._triggerKeys.keyDown?this.doTrigger(u):this.triggerKeyDown=!0:g=!1,g&&(u.preventDefault(),u.stopPropagation())})),this._register(G(this.domNode,ae.KEY_UP,h=>{const u=new Rt(h);this.isTriggerKeyEvent(u)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(u)),u.preventDefault(),u.stopPropagation()):(u.equals(2)||u.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(Od(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(Ru()===this.domNode||!Ga(Ru(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(i=>i instanceof Dr&&i.isEnabled());t instanceof Dr&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof Dr&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=tc(t.index)?t.index:null;i.forEach(s=>{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a;this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s)),a||(a=new fm(this.context,s,Object.assign({hoverDelegate:this.options.hoverDelegate},t))),this.options.allowContextMenu||this.viewItemDisposables.set(a,G(r,ae.CONTEXT_MENU,l=>{ut.stop(l,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(r),this.focusable&&a instanceof Dr&&this.viewItems.length===0&&a.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(a),this._actionIds.push(s.id)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this.viewItems.splice(n,0,a),this._actionIds.splice(n,0,s.id),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){nt(this.viewItems),this.viewItemDisposables.forEach(e=>e.dispose()),this.viewItemDisposables.clear(),this.viewItems=[],this._actionIds=[],Si(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}focus(e){let t=!1,i;if(e===void 0?t=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===ln.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===ln.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((n=this.viewItems[this.previouslyFocusedItem])===null||n===void 0||n.blur());const s=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(s){let r=!0;K0(s.focus)||(r=!1),this.options.focusOnlyEnabledItems&&K0(s.isEnabled)&&!s.isEnabled()&&(r=!1),s.action.id===ln.ID&&(r=!1),r?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof Dr){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}run(e,t){return RZ(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){nt(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}const OZ={IconContribution:"base.contributions.icons"};var jA;(function(o){function e(t,i){let n=t.defaults;for(;at.isThemeIcon(n);){const s=bh.getIcon(n.id);if(!s)return;n=s.defaults}return n}o.getDefinition=e})(jA||(jA={}));var KA;(function(o){function e(i){return{weight:i.weight,style:i.style,src:i.src.map(n=>({format:n.format,location:n.location.toString()}))}}o.toJSONObject=e;function t(i){const n=s=>Un(s)?s:void 0;if(i&&Array.isArray(i.src)&&i.src.every(s=>Un(s.format)&&Un(s.location)))return{weight:n(i.weight),style:n(i.style),src:i.src.map(s=>({format:s.format,location:_e.parse(s.location)}))}}o.fromJSONObject=t})(KA||(KA={}));class PZ{constructor(){this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:p("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:p("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Ln.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}const r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;const a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(s,r)=>s.id.localeCompare(r.id),t=s=>{for(;at.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(r=>!!r.description).sort(e))i.push(`||${s.id}|${at.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(r=>!at.isThemeIcon(r.defaults)).sort(e))i.push(`||${s.id}|`);return i.join(` -`)}}const bh=new PZ;zt.add(OZ.IconContribution,bh);function mi(o,e,t,i){return bh.registerIcon(o,e,t,i)}function U5(){return bh}function FZ(){for(const o of m.getAll())bh.registerIcon(o.id,o.definition,o.description)}FZ();const $5="vscode://schemas/icons",j5=zt.as(KC.JSONContribution);j5.registerSchema($5,bh.getIconSchema());const qA=new mt(()=>j5.notifySchemaChanged($5),200);bh.onDidChange(()=>{qA.isScheduled()||qA.schedule()});const K5=mi("widget-close",m.close,p("widgetClose","Icon for the close action in widgets."));mi("goto-previous-location",m.arrowUp,p("previousChangeIcon","Icon for goto previous editor location."));mi("goto-next-location",m.arrowDown,p("nextChangeIcon","Icon for goto next editor location."));at.modify(m.sync,"spin");at.modify(m.loading,"spin");var BZ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WZ=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},VZ=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},RS;const xb=3;class xf{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class OS{constructor(e){this.entries=e}}const HZ=mi("diff-review-insert",m.add,p("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),zZ=mi("diff-review-remove",m.remove,p("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),UZ=mi("diff-review-close",m.close,p("diffReviewCloseIcon","Icon for 'Close' in diff review."));let Vv=class Kc extends H{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=Je(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Je(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Zr(this.actionBarContainer.domNode)),this._actionBar.push(new is("diffreview.close",p("label.close","Close"),"close-diff-review "+at.asClassName(UZ),!0,()=>VZ(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=Je(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Je(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new p_(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(ki(this.domNode.domNode,"click",i=>{i.preventDefault();const n=o4(i.target,"diff-review-row");n&&this._goToRow(n)})),this._register(ki(this.domNode.domNode,"keydown",i=>{(i.equals(18)||i.equals(2066)||i.equals(530))&&(i.preventDefault(),this._goToRow(this._getNextRow())),(i.equals(16)||i.equals(2064)||i.equals(528))&&(i.preventDefault(),this._goToRow(this._getPrevRow())),(i.equals(9)||i.equals(2057)||i.equals(521)||i.equals(1033))&&(i.preventDefault(),this.hide()),(i.equals(10)||i.equals(3))&&(i.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n0){const D=e[c-1];D.originalEndLineNumber===0?S=D.originalStartLineNumber+1:S=D.originalEndLineNumber+1,D.modifiedEndLineNumber===0?k=D.modifiedStartLineNumber+1:k=D.modifiedEndLineNumber+1}let x=C-xb+1,y=w-xb+1;if(xS){const D=S-x;x=x+D,y=y+D}if(y>k){const D=k-y;x=x+D,y=y+D}b[v++]=new xf(C,x,w,y)}n[s++]=new OS(b)}let r=n[0].entries;const a=[];let l=0;for(let c=1,d=n.length;ch)&&(h=F),z!==0&&(u===0||zg)&&(g=j)}const f=document.createElement("div");f.className="diff-review-row";const _=document.createElement("div");_.className="diff-review-cell diff-review-summary";const b=h-d+1,v=g-u+1;_.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${d},${b} +${u},${v} @@`)),f.setAttribute("data-line",String(u));const C=y=>y===0?p("no_lines_changed","no lines changed"):y===1?p("one_line_changed","1 line changed"):p("more_lines_changed","{0} lines changed",y),w=C(b),S=C(v);f.setAttribute("aria-label",p({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,d,w,u,S)),f.appendChild(_),f.setAttribute("role","listitem"),c.appendChild(f);const k=t.get(61);let x=u;for(let y=0,D=l.length;yo});Vv=BZ([WZ(1,Ht)],Vv);Et((o,e)=>{const t=o.getColor(H4);t&&e.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${t}; }`);const i=o.getColor(Kg);i&&e.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)});class $Z extends ce{constructor(){super({id:"editor.action.diffReview.next",label:p("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:se.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=q5(e);i&&i.diffReviewNext()}}class jZ extends ce{constructor(){super({id:"editor.action.diffReview.prev",label:p("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:se.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=q5(e);i&&i.diffReviewPrev()}}function q5(o){const e=o.get(ct),t=e.listDiffEditors(),i=e.getActiveCodeEditor();if(!i)return null;for(let n=0,s=t.length;nn.modifiedStartLineNumber?p("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):p("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?p("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):p("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>PS(this,void 0,void 0,function*(){const _=new L(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),b=n.originalModel.getValueInRange(_);yield this._clipboardService.writeText(b)})));let h=0,u;n.originalEndLineNumber>n.modifiedStartLineNumber&&(u=new is("diff.clipboard.copyDeletedLineContent",d?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,()=>PS(this,void 0,void 0,function*(){const _=n.originalModel.getLineContent(n.originalStartLineNumber+h);if(_===""){const b=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(b===0?` +`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(ys(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function _g(o){return HF(o)?!o.value:Array.isArray(o)?o.every(_g):!0}function HF(o){return o instanceof Fn?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}function NZ(o){return o.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function kb(o){return o.replace(/"/g,""")}function MS(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function TZ(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(r));l&&e.push(`width="${a}"`),c&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}var OD=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function AZ(o,e){Un(e)?o.title=KE(e):e!=null&&e.markdownNotSupportedFallback?o.title=e.markdownNotSupportedFallback:o.removeAttribute("title")}class MZ{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return OD(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||Un(e)||e instanceof HTMLElement)s=e;else if(!K0(e.markdown))s=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Qi;const r=this._cancellationTokenSource.token;if(s=yield e.markdown(r),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(s,t,i)})}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(s,t)}n==null||n.dispose()}hasContent(e){return e?HF(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function zF(o,e,t,i){let n,s;const r=(h,u)=>{var g;h&&(s==null||s.dispose(),s=void 0),u&&(n==null||n.dispose(),n=void 0),(g=o.onDidHideHover)===null||g===void 0||g.call(o)},a=(h,u,g)=>new xs(()=>OD(this,void 0,void 0,function*(){(!s||s.isDisposed)&&(s=new MZ(o,g||e,h>0),yield s.update(t,u,i))}),h),l=()=>{if(n)return;const h=new Q,u=_=>r(!1,_.fromElement===e);h.add(G(e,ae.MOUSE_LEAVE,u,!0));const g=()=>r(!0,!0);h.add(G(e,ae.MOUSE_DOWN,g,!0));const f={targetElements:[e],dispose:()=>{}};if(o.placement===void 0||o.placement==="mouse"){const _=b=>{f.x=b.x+10,b.target instanceof HTMLElement&&b.target.classList.contains("action-label")&&r(!0,!0)};h.add(G(e,ae.MOUSE_MOVE,_,!0))}h.add(a(o.delay,!1,f)),n=h},c=G(e,ae.MOUSE_OVER,l,!0);return{show:h=>{r(!1,!0),a(0,h)},hide:()=>{r(!0,!0)},update:(h,u)=>OD(this,void 0,void 0,function*(){t=h,yield s==null?void 0:s.update(t,void 0,u)}),dispose:()=>{c.dispose(),r(!0,!0)}}}class Dr extends H{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof is&&this._register(t.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}get action(){return this._action}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new og)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(ft.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Ls&&this._register(G(e,ae.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(__.TEXT,this._action.label)}))),this._register(G(t,xt.Tap,n=>this.onClick(n,!0))),this._register(G(t,ae.MOUSE_DOWN,n=>{i||ut.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),Ge&&this._register(G(t,ae.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(G(t,ae.CLICK,n=>{ut.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(G(t,ae.DBLCLICK,n=>{ut.stop(n,!0)})),[ae.MOUSE_UP,ae.MOUSE_OUT].forEach(n=>{this._register(G(t,n,s=>{ut.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var i;ut.stop(e,!0);const n=ms(this._context)?!((i=this.options)===null||i===void 0)&&i.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.getAction().tooltip}updateTooltip(){var e;if(!this.element)return;const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=zF(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class fm extends Dr{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=q(this.element,J("a.action-label"))),this.label&&(this._action.id===ln.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(q(this.element,J("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}getTooltip(){let e=null;return this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=p({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e!=null?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var RZ=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Zr extends H{constructor(e,t={}){var i,n,s,r,a,l;super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new R),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new R({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new R),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new R),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(r=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&r!==void 0?r:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new og,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(h=>this._onDidRun.fire(h))),this._register(this._actionRunner.onBeforeRun(h=>this._onBeforeRun.fire(h))),this._actionIds=[],this.viewItems=[],this.viewItemDisposables=new Map,this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let c,d;switch(this._orientation){case 0:c=[15],d=[17];break;case 1:c=[16],d=[18],this.domNode.className+=" vertical";break}this._register(G(this.domNode,ae.KEY_DOWN,h=>{const u=new Rt(h);let g=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(u.equals(c[0])||u.equals(c[1]))?g=this.focusPrevious():d&&(u.equals(d[0])||u.equals(d[1]))?g=this.focusNext():u.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():u.equals(14)?g=this.focusFirst():u.equals(13)?g=this.focusLast():u.equals(2)&&f instanceof Dr&&f.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(u)?this._triggerKeys.keyDown?this.doTrigger(u):this.triggerKeyDown=!0:g=!1,g&&(u.preventDefault(),u.stopPropagation())})),this._register(G(this.domNode,ae.KEY_UP,h=>{const u=new Rt(h);this.isTriggerKeyEvent(u)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(u)),u.preventDefault(),u.stopPropagation()):(u.equals(2)||u.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(Od(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(Ru()===this.domNode||!Ga(Ru(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(i=>i instanceof Dr&&i.isEnabled());t instanceof Dr&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof Dr&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=tc(t.index)?t.index:null;i.forEach(s=>{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a;this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s)),a||(a=new fm(this.context,s,Object.assign({hoverDelegate:this.options.hoverDelegate},t))),this.options.allowContextMenu||this.viewItemDisposables.set(a,G(r,ae.CONTEXT_MENU,l=>{ut.stop(l,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(r),this.focusable&&a instanceof Dr&&this.viewItems.length===0&&a.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(a),this._actionIds.push(s.id)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this.viewItems.splice(n,0,a),this._actionIds.splice(n,0,s.id),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){nt(this.viewItems),this.viewItemDisposables.forEach(e=>e.dispose()),this.viewItemDisposables.clear(),this.viewItems=[],this._actionIds=[],Si(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}focus(e){let t=!1,i;if(e===void 0?t=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===ln.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===ln.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((n=this.viewItems[this.previouslyFocusedItem])===null||n===void 0||n.blur());const s=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(s){let r=!0;K0(s.focus)||(r=!1),this.options.focusOnlyEnabledItems&&K0(s.isEnabled)&&!s.isEnabled()&&(r=!1),s.action.id===ln.ID&&(r=!1),r?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof Dr){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}run(e,t){return RZ(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){nt(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}const OZ={IconContribution:"base.contributions.icons"};var jA;(function(o){function e(t,i){let n=t.defaults;for(;at.isThemeIcon(n);){const s=bh.getIcon(n.id);if(!s)return;n=s.defaults}return n}o.getDefinition=e})(jA||(jA={}));var KA;(function(o){function e(i){return{weight:i.weight,style:i.style,src:i.src.map(n=>({format:n.format,location:n.location.toString()}))}}o.toJSONObject=e;function t(i){const n=s=>Un(s)?s:void 0;if(i&&Array.isArray(i.src)&&i.src.every(s=>Un(s.format)&&Un(s.location)))return{weight:n(i.weight),style:n(i.style),src:i.src.map(s=>({format:s.format,location:_e.parse(s.location)}))}}o.fromJSONObject=t})(KA||(KA={}));class PZ{constructor(){this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:p("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:p("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Ln.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}const r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;const a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(s,r)=>s.id.localeCompare(r.id),t=s=>{for(;at.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(r=>!!r.description).sort(e))i.push(`||${s.id}|${at.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(r=>!at.isThemeIcon(r.defaults)).sort(e))i.push(`||${s.id}|`);return i.join(` +`)}}const bh=new PZ;zt.add(OZ.IconContribution,bh);function mi(o,e,t,i){return bh.registerIcon(o,e,t,i)}function UF(){return bh}function FZ(){for(const o of m.getAll())bh.registerIcon(o.id,o.definition,o.description)}FZ();const $F="vscode://schemas/icons",jF=zt.as(KC.JSONContribution);jF.registerSchema($F,bh.getIconSchema());const qA=new mt(()=>jF.notifySchemaChanged($F),200);bh.onDidChange(()=>{qA.isScheduled()||qA.schedule()});const KF=mi("widget-close",m.close,p("widgetClose","Icon for the close action in widgets."));mi("goto-previous-location",m.arrowUp,p("previousChangeIcon","Icon for goto previous editor location."));mi("goto-next-location",m.arrowDown,p("nextChangeIcon","Icon for goto next editor location."));at.modify(m.sync,"spin");at.modify(m.loading,"spin");var BZ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WZ=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},VZ=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},RS;const xb=3;class xf{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class OS{constructor(e){this.entries=e}}const HZ=mi("diff-review-insert",m.add,p("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),zZ=mi("diff-review-remove",m.remove,p("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),UZ=mi("diff-review-close",m.close,p("diffReviewCloseIcon","Icon for 'Close' in diff review."));let Vv=class Kc extends H{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=Je(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Je(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Zr(this.actionBarContainer.domNode)),this._actionBar.push(new is("diffreview.close",p("label.close","Close"),"close-diff-review "+at.asClassName(UZ),!0,()=>VZ(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=Je(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Je(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new p_(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(ki(this.domNode.domNode,"click",i=>{i.preventDefault();const n=o4(i.target,"diff-review-row");n&&this._goToRow(n)})),this._register(ki(this.domNode.domNode,"keydown",i=>{(i.equals(18)||i.equals(2066)||i.equals(530))&&(i.preventDefault(),this._goToRow(this._getNextRow())),(i.equals(16)||i.equals(2064)||i.equals(528))&&(i.preventDefault(),this._goToRow(this._getPrevRow())),(i.equals(9)||i.equals(2057)||i.equals(521)||i.equals(1033))&&(i.preventDefault(),this.hide()),(i.equals(10)||i.equals(3))&&(i.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n0){const D=e[c-1];D.originalEndLineNumber===0?S=D.originalStartLineNumber+1:S=D.originalEndLineNumber+1,D.modifiedEndLineNumber===0?k=D.modifiedStartLineNumber+1:k=D.modifiedEndLineNumber+1}let x=C-xb+1,y=w-xb+1;if(xS){const D=S-x;x=x+D,y=y+D}if(y>k){const D=k-y;x=x+D,y=y+D}b[v++]=new xf(C,x,w,y)}n[s++]=new OS(b)}let r=n[0].entries;const a=[];let l=0;for(let c=1,d=n.length;ch)&&(h=F),z!==0&&(u===0||zg)&&(g=j)}const f=document.createElement("div");f.className="diff-review-row";const _=document.createElement("div");_.className="diff-review-cell diff-review-summary";const b=h-d+1,v=g-u+1;_.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${d},${b} +${u},${v} @@`)),f.setAttribute("data-line",String(u));const C=y=>y===0?p("no_lines_changed","no lines changed"):y===1?p("one_line_changed","1 line changed"):p("more_lines_changed","{0} lines changed",y),w=C(b),S=C(v);f.setAttribute("aria-label",p({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,d,w,u,S)),f.appendChild(_),f.setAttribute("role","listitem"),c.appendChild(f);const k=t.get(61);let x=u;for(let y=0,D=l.length;yo});Vv=BZ([WZ(1,Ht)],Vv);Et((o,e)=>{const t=o.getColor(H4);t&&e.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${t}; }`);const i=o.getColor(Kg);i&&e.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)});class $Z extends ce{constructor(){super({id:"editor.action.diffReview.next",label:p("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:se.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=qF(e);i&&i.diffReviewNext()}}class jZ extends ce{constructor(){super({id:"editor.action.diffReview.prev",label:p("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:se.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=qF(e);i&&i.diffReviewPrev()}}function qF(o){const e=o.get(ct),t=e.listDiffEditors(),i=e.getActiveCodeEditor();if(!i)return null;for(let n=0,s=t.length;nn.modifiedStartLineNumber?p("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):p("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?p("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):p("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>PS(this,void 0,void 0,function*(){const _=new L(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),b=n.originalModel.getValueInRange(_);yield this._clipboardService.writeText(b)})));let h=0,u;n.originalEndLineNumber>n.modifiedStartLineNumber&&(u=new is("diff.clipboard.copyDeletedLineContent",d?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,()=>PS(this,void 0,void 0,function*(){const _=n.originalModel.getLineContent(n.originalStartLineNumber+h);if(_===""){const b=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(b===0?` `:`\r -`)}else yield this._clipboardService.writeText(_)})),c.push(u)),i.getOption(83)||c.push(new is("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>PS(this,void 0,void 0,function*(){const _=new L(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),b=n.originalModel.getValueInRange(_);if(n.modifiedEndLineNumber===0){const v=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,v,n.modifiedStartLineNumber,v),text:l+b}])}else{const v=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,v),text:b}])}})));const f=(_,b)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:_,y:b}),getActions:()=>(u&&(u.label=d?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+h)),c),autoSelectFirstItem:!0})};this._register(ki(this._diffActions,"mousedown",_=>{const{top:b,height:v}=on(this._diffActions),C=Math.floor(a/3);_.preventDefault(),f(_.posx,b+v+C)})),this._register(i.onMouseMove(_=>{_.target.type===8||_.target.type===5?_.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(_=>{!_.event.rightButton||(_.target.type===8||_.target.type===5)&&_.target.detail.viewZoneId===this._viewZoneId&&(_.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a),f(_.event.posx,_.event.posy+a))}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=on(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ga=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},FS;class GA{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const i of this._zones)t.removeZone(i)}),this._zones=[],this._zonesMap={},e.changeDecorations(t=>{this._decorations=t.deltaDecorations(this._decorations,[])})}apply(e,t,i,n){const s=n?hc.capture(e):null;e.changeViewZones(r=>{var a;for(const l of this._zones)r.removeZone(l);for(const l of this._inlineDiffMargins)l.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let l=0,c=i.zones.length;l{this._decorations=r.deltaDecorations(this._decorations,i.decorations)}),t==null||t.setZones(i.overviewZones)}}let ZZ=0;const YZ=mi("diff-insert",m.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),Z5=mi("diff-remove",m.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),ZA=(FS=window.trustedTypes)===null||FS===void 0?void 0:FS.createPolicy("diffEditorWidget",{createHTML:o=>o});let uc=class Xi extends H{constructor(e,t,i,n,s,r,a,l,c,d,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new R),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new R),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new R),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(e)),this._instantiationService=a.createChild(new k1([Ee,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=d,this._id=++ZZ,this._state=0,this._updatingDiffProgress=null,this._domElement=e,t=t||{},this._options=XA(t,{enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof t.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",t.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new mt(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=Xi._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Je(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(ki(this._overviewDomElement,ae.POINTER_DOWN,f=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(f)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new GA(h,n),this._modifiedEditorState=new GA(h,n),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new y4(this._containerDomElement,t.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),t.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(t,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(t,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(Vv,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Ma(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new QA(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange(f=>{this._strategy&&this._strategy.applyColors(f)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=Xi._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const g=md.getDiffEditorContributions();for(const f of g)try{this._register(a.createInstance(f.ctor,this))}catch(_){Te(_)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=fv(e.type),i}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){!this._options.renderOverviewRuler||(ap(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(46)&&this._updateDecorationsRunner.schedule(),s.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const n=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const r=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Xi.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:r,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),i}_createRightHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(46)&&this._updateDecorationsRunner.schedule(),s.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(i.onDidChangeModelOptions(s=>{s.tabSize&&this._updateDecorationsRunner.schedule()}));const n=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const r=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Xi.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:r,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),this._register(i.onMouseDown(s=>{var r,a;if(!s.event.rightButton&&s.target.position&&((r=s.target.element)===null||r===void 0?void 0:r.className.includes("arrow-revert-change"))){const l=s.target.position.lineNumber,c=(a=this._diffComputationResult)===null||a===void 0?void 0:a.changes.find(d=>d.modifiedStartLineNumber===l-1||d.modifiedStartLineNumber===l);c&&this.revertChange(c),s.event.stopPropagation(),this._updateDecorations();return}})),i}revertChange(e){const t=this._modifiedEditor,i=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!i||!n||!t)return;const s=e.originalEndLineNumber>0?new L(e.originalStartLineNumber,1,e.originalEndLineNumber,i.getLineMaxColumn(e.originalEndLineNumber)):null,r=s?i.getValueInRange(s):null,a=e.modifiedEndLineNumber>0?new L(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,n.getLineMaxColumn(e.modifiedEndLineNumber)):null,l=n.getEOL();if(e.originalEndLineNumber===0&&a){let c=a;e.modifiedStartLineNumber>1?c=a.setStartPosition(e.modifiedStartLineNumber-1,n.getLineMaxColumn(e.modifiedStartLineNumber-1)):e.modifiedEndLineNumberthis._beginUpdateDecorations(),Xi.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t?!0:!e||!t?!1:e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const e=this._originalEditor.getModel(),t=this._modifiedEditor.getModel();if(!e||!t)return;this._diffComputationToken++;const i=this._diffComputationToken,n=this._options.maxFileSize*1024*1024,s=r=>{const a=r.getValueLength();return n===0||a<=n};if(!s(e)||!s(t)){(!Xi._equals(e.uri,this._lastOriginalWarning)||!Xi._equals(t.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=t.uri,this._notificationService.warn(p("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(e.uri,t.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(r=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=r,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},r=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,this._options.renderMarginRevertIcon,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.dropIntoEditor={enabled:!t.readOnly},t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const t=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(t.ariaLabel=e.modifiedAriaLabel),t.wordWrapOverride1=this._options.diffWordWrap,t.revealHorizontalRightPadding=nr.revealHorizontalRightPadding.defaultValue+Xi.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=this._strategy.layout();this._originalDomNode.style.width=n+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-n+"px",this._modifiedDomNode.style.left=n+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-i+"px",this._overviewDomElement.style.width=Xi.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-Xi.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(Xi.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:n,height:t-i}),this._modifiedEditor.layout({width:e-n-(this._options.renderOverviewRuler?Xi.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-i,e,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),s=Math.max(0,n-2*0),r=i>0?s/i:0,a=Math.max(0,Math.floor(e.height*r)),l=Math.floor(t*r);return{height:a,top:l}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(i.length===0||e=l?n=r+1:(n=r,s=r)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.originalStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-i;return a<=s?n+Math.min(a,r):n+r-s+a}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.modifiedStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-n;return a<=r?i+Math.min(a,s):i+s-r+a}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};uc.ONE_OVERVIEW_WIDTH=15;uc.ENTIRE_DIFF_OVERVIEW_WIDTH=30;uc.UPDATE_DIFF_DECORATIONS_DELAY=200;uc=GZ([ga(3,cl),ga(4,to),ga(5,Ee),ga(6,Ae),ga(7,ct),ga(8,Ct),ga(9,di),ga(10,ll),ga(11,kc)],uc);class Y5 extends H{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(cU)||(e.getColor(I4)||cD).transparent(2),i=e.getColor(dU)||(e.getColor(E4)||dD).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,s,r){r=r.sort((d,h)=>d.afterLineNumber-h.afterLineNumber),s=s.sort((d,h)=>d.afterLineNumber-h.afterLineNumber);const a=this._getViewZones(e,s,r,i),l=this._getOriginalEditorDecorations(a,e,t,i),c=this._getModifiedEditorDecorations(a,e,t,i,n);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:c.decorations,overviewZones:c.overviewZones,zones:a.modified}}}}class YA{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexx.afterLineNumber-y.afterLineNumber,v=(x,y)=>{if(y.domNode===null&&x.length>0){const D=x[x.length-1];if(D.afterLineNumber===y.afterLineNumber&&D.domNode===null){D.heightInLines+=y.heightInLines;return}}x.push(y)},C=new YA(this._modifiedForeignVZ),w=new YA(this._originalForeignVZ);let S=1,k=1;for(let x=0,y=this._lineChanges.length;x<=y;x++){const D=x0?-1:0),g=D.modifiedStartLineNumber+(D.modifiedEndLineNumber>0?-1:0),h=D.originalEndLineNumber>0?ud._getViewLineCount(this._originalEditor,D.originalStartLineNumber,D.originalEndLineNumber):0,d=D.modifiedEndLineNumber>0?ud._getViewLineCount(this._modifiedEditor,D.modifiedStartLineNumber,D.modifiedEndLineNumber):0,f=Math.max(D.originalStartLineNumber,D.originalEndLineNumber),_=Math.max(D.modifiedStartLineNumber,D.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+d,f=u,_=g);let I=[],O=[];if(s){let j;D?D.originalEndLineNumber>0?j=D.originalStartLineNumber-S:j=D.modifiedStartLineNumber-k:j=r.getLineCount()-S+1;for(let re=0;rexe&&O.push({afterLineNumber:Se,heightInLines:ye-xe,domNode:null,marginDomNode:null})}D&&(S=(D.originalEndLineNumber>0?D.originalEndLineNumber:D.originalStartLineNumber)+1,k=(D.modifiedEndLineNumber>0?D.modifiedEndLineNumber:D.modifiedStartLineNumber)+1)}for(;C.current&&C.current.afterLineNumber<=_;){let j;C.current.afterLineNumber<=g?j=u-g+C.current.afterLineNumber:j=f;let re=null;D&&D.modifiedStartLineNumber<=C.current.afterLineNumber&&C.current.afterLineNumber<=D.modifiedEndLineNumber&&(re=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),I.push({afterLineNumber:j,heightInLines:C.current.height/t,domNode:null,marginDomNode:re}),C.advance()}for(;w.current&&w.current.afterLineNumber<=f;){let j;w.current.afterLineNumber<=u?j=g-u+w.current.afterLineNumber:j=_,O.push({afterLineNumber:j,heightInLines:w.current.height/e,domNode:null}),w.advance()}if(D!==null&&Hv(D)){const j=this._produceOriginalFromDiff(D,h,d);j&&I.push(j)}if(D!==null&&zv(D)){const j=this._produceModifiedFromDiff(D,h,d);j&&O.push(j)}let F=0,z=0;for(I=I.sort(b),O=O.sort(b);F=re.heightInLines?(j.heightInLines-=re.heightInLines,z++):(re.heightInLines-=j.heightInLines,F++)}for(;F(t.domNode||(t.domNode=J5()),t))}}function xa(o,e,t,i,n){return{range:new L(o,e,t,i),options:n}}const wn={arrowRevertChange:Ne.register({description:"diff-editor-arrow-revert-change",glyphMarginClassName:"arrow-revert-change "+at.asClassName(m.arrowRight)}),charDelete:Ne.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Ne.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Ne.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Ne.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Ne.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:Ne.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+at.asClassName(YZ),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:Ne.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:Ne.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+at.asClassName(Z5),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:Ne.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Ma extends Y5{constructor(e,t){super(e),this._disableSash=t===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new tn(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(i=>this._onSashDrag(i)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?uc.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*i);const s=Math.floor(.5*i);return n=this._disableSash?s:n||s,i>Ma.MINIMUM_EDITOR_WIDTH*2?(ni-Ma.MINIMUM_EDITOR_WIDTH&&(n=i-Ma.MINIMUM_EDITOR_WIDTH)):n=s,this._sashPosition!==n&&(this._sashPosition=n),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?uc.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new QZ(e,t,i,n,s).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const s=this._dataSource.getOriginalEditor(),r=String(this._removeColor),a={decorations:[],overviewZones:[]},l=s.getModel(),c=s._getViewModel();for(const d of t)if(zv(d)){a.decorations.push({range:new L(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824),options:n?wn.lineDeleteWithSign:wn.lineDelete}),(!Hv(d)||!d.charChanges)&&a.decorations.push(xa(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824,wn.charDeleteWholeLine));const h=pm(l,c,d.originalStartLineNumber,d.originalEndLineNumber);if(a.overviewZones.push(new lm(h.startLineNumber,h.endLineNumber,0,r)),d.charChanges){for(const u of d.charChanges)if(X5(u))if(i)for(let g=u.originalStartLineNumber;g<=u.originalEndLineNumber;g++){let f,_;g===u.originalStartLineNumber?f=u.originalStartColumn:f=l.getLineFirstNonWhitespaceColumn(g),g===u.originalEndLineNumber?_=u.originalEndColumn:_=l.getLineLastNonWhitespaceColumn(g),a.decorations.push(xa(g,f,g,_,wn.charDelete))}else a.decorations.push(xa(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn,wn.charDelete))}}return a}_getModifiedEditorDecorations(e,t,i,n,s){const r=this._dataSource.getModifiedEditor(),a=String(this._insertColor),l={decorations:[],overviewZones:[]},c=r.getModel(),d=r._getViewModel();for(const h of t){if(s)if(h.modifiedEndLineNumber>0)l.decorations.push({range:new L(h.modifiedStartLineNumber,1,h.modifiedStartLineNumber,1),options:wn.arrowRevertChange});else{const u=e.modified.find(g=>g.afterLineNumber===h.modifiedStartLineNumber);u&&(u.marginDomNode=eY())}if(Hv(h)){l.decorations.push({range:new L(h.modifiedStartLineNumber,1,h.modifiedEndLineNumber,1073741824),options:n?wn.lineInsertWithSign:wn.lineInsert}),(!zv(h)||!h.charChanges)&&l.decorations.push(xa(h.modifiedStartLineNumber,1,h.modifiedEndLineNumber,1073741824,wn.charInsertWholeLine));const u=pm(c,d,h.modifiedStartLineNumber,h.modifiedEndLineNumber);if(l.overviewZones.push(new lm(u.startLineNumber,u.endLineNumber,0,a)),h.charChanges){for(const g of h.charChanges)if(Q5(g))if(i)for(let f=g.modifiedStartLineNumber;f<=g.modifiedEndLineNumber;f++){let _,b;f===g.modifiedStartLineNumber?_=g.modifiedStartColumn:_=c.getLineFirstNonWhitespaceColumn(f),f===g.modifiedEndLineNumber?b=g.modifiedEndColumn:b=c.getLineLastNonWhitespaceColumn(f),l.decorations.push(xa(f,_,f,b,wn.charInsert))}else l.decorations.push(xa(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn,wn.charInsert))}}}return l}}Ma.MINIMUM_EDITOR_WIDTH=100;class QZ extends ud{constructor(e,t,i,n,s){super(e,t,i,n,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class QA extends Y5{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(i=>{this._decorationsLeft!==i.decorationsLeft&&(this._decorationsLeft=i.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const s=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new XZ(e,t,i,s,r,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const s=String(this._removeColor),r={decorations:[],overviewZones:[]},a=this._dataSource.getOriginalEditor(),l=a.getModel(),c=a._getViewModel();let d=0;for(const h of t)if(zv(h)){for(r.decorations.push({range:new L(h.originalStartLineNumber,1,h.originalEndLineNumber,1073741824),options:wn.lineDeleteMargin});d=h.originalStartLineNumber)break;d++}let u=0;if(d0,O=nc(1e4);let F=0,z=0,j=null;for(let Se=S.originalStartLineNumber;Se<=S.originalEndLineNumber;Se++){const ye=Se-S.originalStartLineNumber,xe=this._originalModel.tokenization.getLineTokens(Se),He=xe.getLineContent(),Mt=v[C++],yt=es.filter(D,Se,1,He.length+1);if(Mt){let ve=0;for(const Nt of Mt.breakOffsets){const Fi=xe.sliceAndInflate(ve,Nt,0),In=He.substring(ve,Nt);F=Math.max(F,this._renderOriginalLine(z++,In,Fi,es.extractWrapped(yt,ve,Nt),I,l,c,n,s,d,u,g,f,_,b,i,O,y)),ve=Nt}for(j||(j=[]);j.lengthw.afterLineNumber-S.afterLineNumber)}_renderOriginalLine(e,t,i,n,s,r,a,l,c,d,h,u,g,f,_,b,v,C){v.appendASCIIString('
');const w=Ds.isBasicASCII(t,r),S=Ds.containsRTL(t,w,a),k=a_(new Lc(l.isMonospace&&!c,l.canUseHalfwidthRightwardsArrow,t,!1,w,S,0,i,n,b,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,u,g,f,_!==_s.OFF,null),v);if(v.appendASCIIString("
"),this._renderIndicators){const x=document.createElement("div");x.className=`delete-sign ${at.asClassName(Z5)}`,x.setAttribute("style",`position:absolute;top:${e*d}px;width:${h}px;height:${d}px;right:0;`),C.appendChild(x)}return k.characterMapping.getHorizontalOffset(k.characterMapping.length)}}function JZ(o,e){return Ki(o,e,["off","on","inherit"])}function Hv(o){return o.modifiedEndLineNumber>0}function zv(o){return o.originalEndLineNumber>0}function Q5(o){return o.modifiedStartLineNumber===o.modifiedEndLineNumber?o.modifiedEndColumn-o.modifiedStartColumn>0:o.modifiedEndLineNumber-o.modifiedStartLineNumber>0}function X5(o){return o.originalStartLineNumber===o.originalEndLineNumber?o.originalEndColumn-o.originalStartColumn>0:o.originalEndLineNumber-o.originalStartLineNumber>0}function J5(){const o=document.createElement("div");return o.className="diagonal-fill",o}function eY(){const o=document.createElement("div");return o.className="arrow-revert-change "+at.asClassName(m.arrowRight),J("div",{},o)}function pm(o,e,t,i){const n=o.getLineCount();return t=Math.min(n,Math.max(1,t)),i=Math.min(n,Math.max(1,i)),e.coordinatesConverter.convertModelRangeToViewRange(new L(t,o.getLineMinColumn(t),i,o.getLineMaxColumn(i)))}function XA(o,e){return{enableSplitViewResizing:we(o.enableSplitViewResizing,e.enableSplitViewResizing),renderSideBySide:we(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:we(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:jy(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:jy(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:we(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:we(o.renderIndicators,e.renderIndicators),originalEditable:we(o.originalEditable,e.originalEditable),diffCodeLens:we(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:we(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:JZ(o.diffWordWrap,e.diffWordWrap)}}function tY(o,e){return{enableSplitViewResizing:o.enableSplitViewResizing!==e.enableSplitViewResizing,renderSideBySide:o.renderSideBySide!==e.renderSideBySide,renderMarginRevertIcon:o.renderMarginRevertIcon!==e.renderMarginRevertIcon,maxComputationTime:o.maxComputationTime!==e.maxComputationTime,maxFileSize:o.maxFileSize!==e.maxFileSize,ignoreTrimWhitespace:o.ignoreTrimWhitespace!==e.ignoreTrimWhitespace,renderIndicators:o.renderIndicators!==e.renderIndicators,originalEditable:o.originalEditable!==e.originalEditable,diffCodeLens:o.diffCodeLens!==e.diffCodeLens,renderOverviewRuler:o.renderOverviewRuler!==e.renderOverviewRuler,diffWordWrap:o.diffWordWrap!==e.diffWordWrap}}Et((o,e)=>{const t=o.getColor(I4);t&&e.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${t}; }`);const i=o.getColor(oU)||t;i&&e.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${i}; }`);const n=o.getColor(aU)||i;n&&(e.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${n}; }`),e.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${n}; }`));const s=o.getColor(E4);s&&e.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${s}; }`);const r=o.getColor(rU)||s;r&&e.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${r}; }`);const a=o.getColor(lU)||r;a&&(e.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),e.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=o.getColor(hU);l&&e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${cn(o.type)?"dashed":"solid"} ${l}; }`);const c=o.getColor(uU);c&&e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${cn(o.type)?"dashed":"solid"} ${c}; }`);const d=o.getColor(Kg);d&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${d}; }`);const h=o.getColor(gU);h&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${h}; }`);const u=o.getColor(rd);u&&e.addRule(` +`)}else yield this._clipboardService.writeText(_)})),c.push(u)),i.getOption(83)||c.push(new is("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>PS(this,void 0,void 0,function*(){const _=new L(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),b=n.originalModel.getValueInRange(_);if(n.modifiedEndLineNumber===0){const v=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,v,n.modifiedStartLineNumber,v),text:l+b}])}else{const v=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,v),text:b}])}})));const f=(_,b)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:_,y:b}),getActions:()=>(u&&(u.label=d?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+h)),c),autoSelectFirstItem:!0})};this._register(ki(this._diffActions,"mousedown",_=>{const{top:b,height:v}=on(this._diffActions),C=Math.floor(a/3);_.preventDefault(),f(_.posx,b+v+C)})),this._register(i.onMouseMove(_=>{_.target.type===8||_.target.type===5?_.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(_=>{!_.event.rightButton||(_.target.type===8||_.target.type===5)&&_.target.detail.viewZoneId===this._viewZoneId&&(_.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a),f(_.event.posx,_.event.posy+a))}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=on(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ga=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},FS;class GA{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const i of this._zones)t.removeZone(i)}),this._zones=[],this._zonesMap={},e.changeDecorations(t=>{this._decorations=t.deltaDecorations(this._decorations,[])})}apply(e,t,i,n){const s=n?hc.capture(e):null;e.changeViewZones(r=>{var a;for(const l of this._zones)r.removeZone(l);for(const l of this._inlineDiffMargins)l.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let l=0,c=i.zones.length;l{this._decorations=r.deltaDecorations(this._decorations,i.decorations)}),t==null||t.setZones(i.overviewZones)}}let ZZ=0;const YZ=mi("diff-insert",m.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),ZF=mi("diff-remove",m.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),ZA=(FS=window.trustedTypes)===null||FS===void 0?void 0:FS.createPolicy("diffEditorWidget",{createHTML:o=>o});let uc=class Xi extends H{constructor(e,t,i,n,s,r,a,l,c,d,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new R),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new R),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new R),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(e)),this._instantiationService=a.createChild(new k1([Ee,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=d,this._id=++ZZ,this._state=0,this._updatingDiffProgress=null,this._domElement=e,t=t||{},this._options=XA(t,{enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof t.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",t.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new mt(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=Xi._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Je(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(ki(this._overviewDomElement,ae.POINTER_DOWN,f=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(f)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new GA(h,n),this._modifiedEditorState=new GA(h,n),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new y4(this._containerDomElement,t.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),t.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(t,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(t,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(Vv,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Ma(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new QA(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange(f=>{this._strategy&&this._strategy.applyColors(f)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=Xi._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const g=md.getDiffEditorContributions();for(const f of g)try{this._register(a.createInstance(f.ctor,this))}catch(_){Te(_)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=fv(e.type),i}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){!this._options.renderOverviewRuler||(ap(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(46)&&this._updateDecorationsRunner.schedule(),s.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const n=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const r=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Xi.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:r,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),i}_createRightHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(46)&&this._updateDecorationsRunner.schedule(),s.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(i.onDidChangeModelOptions(s=>{s.tabSize&&this._updateDecorationsRunner.schedule()}));const n=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const r=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Xi.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:r,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),this._register(i.onMouseDown(s=>{var r,a;if(!s.event.rightButton&&s.target.position&&((r=s.target.element)===null||r===void 0?void 0:r.className.includes("arrow-revert-change"))){const l=s.target.position.lineNumber,c=(a=this._diffComputationResult)===null||a===void 0?void 0:a.changes.find(d=>d.modifiedStartLineNumber===l-1||d.modifiedStartLineNumber===l);c&&this.revertChange(c),s.event.stopPropagation(),this._updateDecorations();return}})),i}revertChange(e){const t=this._modifiedEditor,i=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!i||!n||!t)return;const s=e.originalEndLineNumber>0?new L(e.originalStartLineNumber,1,e.originalEndLineNumber,i.getLineMaxColumn(e.originalEndLineNumber)):null,r=s?i.getValueInRange(s):null,a=e.modifiedEndLineNumber>0?new L(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,n.getLineMaxColumn(e.modifiedEndLineNumber)):null,l=n.getEOL();if(e.originalEndLineNumber===0&&a){let c=a;e.modifiedStartLineNumber>1?c=a.setStartPosition(e.modifiedStartLineNumber-1,n.getLineMaxColumn(e.modifiedStartLineNumber-1)):e.modifiedEndLineNumberthis._beginUpdateDecorations(),Xi.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t?!0:!e||!t?!1:e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const e=this._originalEditor.getModel(),t=this._modifiedEditor.getModel();if(!e||!t)return;this._diffComputationToken++;const i=this._diffComputationToken,n=this._options.maxFileSize*1024*1024,s=r=>{const a=r.getValueLength();return n===0||a<=n};if(!s(e)||!s(t)){(!Xi._equals(e.uri,this._lastOriginalWarning)||!Xi._equals(t.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=t.uri,this._notificationService.warn(p("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(e.uri,t.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(r=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=r,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},r=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,this._options.renderMarginRevertIcon,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.dropIntoEditor={enabled:!t.readOnly},t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const t=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(t.ariaLabel=e.modifiedAriaLabel),t.wordWrapOverride1=this._options.diffWordWrap,t.revealHorizontalRightPadding=nr.revealHorizontalRightPadding.defaultValue+Xi.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=this._strategy.layout();this._originalDomNode.style.width=n+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-n+"px",this._modifiedDomNode.style.left=n+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-i+"px",this._overviewDomElement.style.width=Xi.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-Xi.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(Xi.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:n,height:t-i}),this._modifiedEditor.layout({width:e-n-(this._options.renderOverviewRuler?Xi.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-i,e,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),s=Math.max(0,n-2*0),r=i>0?s/i:0,a=Math.max(0,Math.floor(e.height*r)),l=Math.floor(t*r);return{height:a,top:l}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(i.length===0||e=l?n=r+1:(n=r,s=r)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.originalStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-i;return a<=s?n+Math.min(a,r):n+r-s+a}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.modifiedStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-n;return a<=r?i+Math.min(a,s):i+s-r+a}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};uc.ONE_OVERVIEW_WIDTH=15;uc.ENTIRE_DIFF_OVERVIEW_WIDTH=30;uc.UPDATE_DIFF_DECORATIONS_DELAY=200;uc=GZ([ga(3,cl),ga(4,to),ga(5,Ee),ga(6,Ae),ga(7,ct),ga(8,Ct),ga(9,di),ga(10,ll),ga(11,kc)],uc);class YF extends H{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(cU)||(e.getColor(I4)||cD).transparent(2),i=e.getColor(dU)||(e.getColor(E4)||dD).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,s,r){r=r.sort((d,h)=>d.afterLineNumber-h.afterLineNumber),s=s.sort((d,h)=>d.afterLineNumber-h.afterLineNumber);const a=this._getViewZones(e,s,r,i),l=this._getOriginalEditorDecorations(a,e,t,i),c=this._getModifiedEditorDecorations(a,e,t,i,n);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:c.decorations,overviewZones:c.overviewZones,zones:a.modified}}}}class YA{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexx.afterLineNumber-y.afterLineNumber,v=(x,y)=>{if(y.domNode===null&&x.length>0){const D=x[x.length-1];if(D.afterLineNumber===y.afterLineNumber&&D.domNode===null){D.heightInLines+=y.heightInLines;return}}x.push(y)},C=new YA(this._modifiedForeignVZ),w=new YA(this._originalForeignVZ);let S=1,k=1;for(let x=0,y=this._lineChanges.length;x<=y;x++){const D=x0?-1:0),g=D.modifiedStartLineNumber+(D.modifiedEndLineNumber>0?-1:0),h=D.originalEndLineNumber>0?ud._getViewLineCount(this._originalEditor,D.originalStartLineNumber,D.originalEndLineNumber):0,d=D.modifiedEndLineNumber>0?ud._getViewLineCount(this._modifiedEditor,D.modifiedStartLineNumber,D.modifiedEndLineNumber):0,f=Math.max(D.originalStartLineNumber,D.originalEndLineNumber),_=Math.max(D.modifiedStartLineNumber,D.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+d,f=u,_=g);let I=[],O=[];if(s){let j;D?D.originalEndLineNumber>0?j=D.originalStartLineNumber-S:j=D.modifiedStartLineNumber-k:j=r.getLineCount()-S+1;for(let re=0;rexe&&O.push({afterLineNumber:Se,heightInLines:ye-xe,domNode:null,marginDomNode:null})}D&&(S=(D.originalEndLineNumber>0?D.originalEndLineNumber:D.originalStartLineNumber)+1,k=(D.modifiedEndLineNumber>0?D.modifiedEndLineNumber:D.modifiedStartLineNumber)+1)}for(;C.current&&C.current.afterLineNumber<=_;){let j;C.current.afterLineNumber<=g?j=u-g+C.current.afterLineNumber:j=f;let re=null;D&&D.modifiedStartLineNumber<=C.current.afterLineNumber&&C.current.afterLineNumber<=D.modifiedEndLineNumber&&(re=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),I.push({afterLineNumber:j,heightInLines:C.current.height/t,domNode:null,marginDomNode:re}),C.advance()}for(;w.current&&w.current.afterLineNumber<=f;){let j;w.current.afterLineNumber<=u?j=g-u+w.current.afterLineNumber:j=_,O.push({afterLineNumber:j,heightInLines:w.current.height/e,domNode:null}),w.advance()}if(D!==null&&Hv(D)){const j=this._produceOriginalFromDiff(D,h,d);j&&I.push(j)}if(D!==null&&zv(D)){const j=this._produceModifiedFromDiff(D,h,d);j&&O.push(j)}let F=0,z=0;for(I=I.sort(b),O=O.sort(b);F=re.heightInLines?(j.heightInLines-=re.heightInLines,z++):(re.heightInLines-=j.heightInLines,F++)}for(;F(t.domNode||(t.domNode=JF()),t))}}function xa(o,e,t,i,n){return{range:new L(o,e,t,i),options:n}}const wn={arrowRevertChange:Ne.register({description:"diff-editor-arrow-revert-change",glyphMarginClassName:"arrow-revert-change "+at.asClassName(m.arrowRight)}),charDelete:Ne.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Ne.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Ne.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Ne.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Ne.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:Ne.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+at.asClassName(YZ),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:Ne.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:Ne.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+at.asClassName(ZF),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:Ne.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Ma extends YF{constructor(e,t){super(e),this._disableSash=t===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new tn(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(i=>this._onSashDrag(i)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?uc.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*i);const s=Math.floor(.5*i);return n=this._disableSash?s:n||s,i>Ma.MINIMUM_EDITOR_WIDTH*2?(ni-Ma.MINIMUM_EDITOR_WIDTH&&(n=i-Ma.MINIMUM_EDITOR_WIDTH)):n=s,this._sashPosition!==n&&(this._sashPosition=n),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?uc.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new QZ(e,t,i,n,s).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const s=this._dataSource.getOriginalEditor(),r=String(this._removeColor),a={decorations:[],overviewZones:[]},l=s.getModel(),c=s._getViewModel();for(const d of t)if(zv(d)){a.decorations.push({range:new L(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824),options:n?wn.lineDeleteWithSign:wn.lineDelete}),(!Hv(d)||!d.charChanges)&&a.decorations.push(xa(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824,wn.charDeleteWholeLine));const h=pm(l,c,d.originalStartLineNumber,d.originalEndLineNumber);if(a.overviewZones.push(new lm(h.startLineNumber,h.endLineNumber,0,r)),d.charChanges){for(const u of d.charChanges)if(XF(u))if(i)for(let g=u.originalStartLineNumber;g<=u.originalEndLineNumber;g++){let f,_;g===u.originalStartLineNumber?f=u.originalStartColumn:f=l.getLineFirstNonWhitespaceColumn(g),g===u.originalEndLineNumber?_=u.originalEndColumn:_=l.getLineLastNonWhitespaceColumn(g),a.decorations.push(xa(g,f,g,_,wn.charDelete))}else a.decorations.push(xa(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn,wn.charDelete))}}return a}_getModifiedEditorDecorations(e,t,i,n,s){const r=this._dataSource.getModifiedEditor(),a=String(this._insertColor),l={decorations:[],overviewZones:[]},c=r.getModel(),d=r._getViewModel();for(const h of t){if(s)if(h.modifiedEndLineNumber>0)l.decorations.push({range:new L(h.modifiedStartLineNumber,1,h.modifiedStartLineNumber,1),options:wn.arrowRevertChange});else{const u=e.modified.find(g=>g.afterLineNumber===h.modifiedStartLineNumber);u&&(u.marginDomNode=eY())}if(Hv(h)){l.decorations.push({range:new L(h.modifiedStartLineNumber,1,h.modifiedEndLineNumber,1073741824),options:n?wn.lineInsertWithSign:wn.lineInsert}),(!zv(h)||!h.charChanges)&&l.decorations.push(xa(h.modifiedStartLineNumber,1,h.modifiedEndLineNumber,1073741824,wn.charInsertWholeLine));const u=pm(c,d,h.modifiedStartLineNumber,h.modifiedEndLineNumber);if(l.overviewZones.push(new lm(u.startLineNumber,u.endLineNumber,0,a)),h.charChanges){for(const g of h.charChanges)if(QF(g))if(i)for(let f=g.modifiedStartLineNumber;f<=g.modifiedEndLineNumber;f++){let _,b;f===g.modifiedStartLineNumber?_=g.modifiedStartColumn:_=c.getLineFirstNonWhitespaceColumn(f),f===g.modifiedEndLineNumber?b=g.modifiedEndColumn:b=c.getLineLastNonWhitespaceColumn(f),l.decorations.push(xa(f,_,f,b,wn.charInsert))}else l.decorations.push(xa(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn,wn.charInsert))}}}return l}}Ma.MINIMUM_EDITOR_WIDTH=100;class QZ extends ud{constructor(e,t,i,n,s){super(e,t,i,n,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class QA extends YF{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(i=>{this._decorationsLeft!==i.decorationsLeft&&(this._decorationsLeft=i.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const s=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new XZ(e,t,i,s,r,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const s=String(this._removeColor),r={decorations:[],overviewZones:[]},a=this._dataSource.getOriginalEditor(),l=a.getModel(),c=a._getViewModel();let d=0;for(const h of t)if(zv(h)){for(r.decorations.push({range:new L(h.originalStartLineNumber,1,h.originalEndLineNumber,1073741824),options:wn.lineDeleteMargin});d=h.originalStartLineNumber)break;d++}let u=0;if(d0,O=nc(1e4);let F=0,z=0,j=null;for(let Se=S.originalStartLineNumber;Se<=S.originalEndLineNumber;Se++){const ye=Se-S.originalStartLineNumber,xe=this._originalModel.tokenization.getLineTokens(Se),He=xe.getLineContent(),Mt=v[C++],yt=es.filter(D,Se,1,He.length+1);if(Mt){let ve=0;for(const Nt of Mt.breakOffsets){const Fi=xe.sliceAndInflate(ve,Nt,0),In=He.substring(ve,Nt);F=Math.max(F,this._renderOriginalLine(z++,In,Fi,es.extractWrapped(yt,ve,Nt),I,l,c,n,s,d,u,g,f,_,b,i,O,y)),ve=Nt}for(j||(j=[]);j.lengthw.afterLineNumber-S.afterLineNumber)}_renderOriginalLine(e,t,i,n,s,r,a,l,c,d,h,u,g,f,_,b,v,C){v.appendASCIIString('
');const w=Ds.isBasicASCII(t,r),S=Ds.containsRTL(t,w,a),k=a_(new Lc(l.isMonospace&&!c,l.canUseHalfwidthRightwardsArrow,t,!1,w,S,0,i,n,b,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,u,g,f,_!==_s.OFF,null),v);if(v.appendASCIIString("
"),this._renderIndicators){const x=document.createElement("div");x.className=`delete-sign ${at.asClassName(ZF)}`,x.setAttribute("style",`position:absolute;top:${e*d}px;width:${h}px;height:${d}px;right:0;`),C.appendChild(x)}return k.characterMapping.getHorizontalOffset(k.characterMapping.length)}}function JZ(o,e){return Ki(o,e,["off","on","inherit"])}function Hv(o){return o.modifiedEndLineNumber>0}function zv(o){return o.originalEndLineNumber>0}function QF(o){return o.modifiedStartLineNumber===o.modifiedEndLineNumber?o.modifiedEndColumn-o.modifiedStartColumn>0:o.modifiedEndLineNumber-o.modifiedStartLineNumber>0}function XF(o){return o.originalStartLineNumber===o.originalEndLineNumber?o.originalEndColumn-o.originalStartColumn>0:o.originalEndLineNumber-o.originalStartLineNumber>0}function JF(){const o=document.createElement("div");return o.className="diagonal-fill",o}function eY(){const o=document.createElement("div");return o.className="arrow-revert-change "+at.asClassName(m.arrowRight),J("div",{},o)}function pm(o,e,t,i){const n=o.getLineCount();return t=Math.min(n,Math.max(1,t)),i=Math.min(n,Math.max(1,i)),e.coordinatesConverter.convertModelRangeToViewRange(new L(t,o.getLineMinColumn(t),i,o.getLineMaxColumn(i)))}function XA(o,e){return{enableSplitViewResizing:we(o.enableSplitViewResizing,e.enableSplitViewResizing),renderSideBySide:we(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:we(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:jy(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:jy(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:we(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:we(o.renderIndicators,e.renderIndicators),originalEditable:we(o.originalEditable,e.originalEditable),diffCodeLens:we(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:we(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:JZ(o.diffWordWrap,e.diffWordWrap)}}function tY(o,e){return{enableSplitViewResizing:o.enableSplitViewResizing!==e.enableSplitViewResizing,renderSideBySide:o.renderSideBySide!==e.renderSideBySide,renderMarginRevertIcon:o.renderMarginRevertIcon!==e.renderMarginRevertIcon,maxComputationTime:o.maxComputationTime!==e.maxComputationTime,maxFileSize:o.maxFileSize!==e.maxFileSize,ignoreTrimWhitespace:o.ignoreTrimWhitespace!==e.ignoreTrimWhitespace,renderIndicators:o.renderIndicators!==e.renderIndicators,originalEditable:o.originalEditable!==e.originalEditable,diffCodeLens:o.diffCodeLens!==e.diffCodeLens,renderOverviewRuler:o.renderOverviewRuler!==e.renderOverviewRuler,diffWordWrap:o.diffWordWrap!==e.diffWordWrap}}Et((o,e)=>{const t=o.getColor(I4);t&&e.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${t}; }`);const i=o.getColor(oU)||t;i&&e.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${i}; }`);const n=o.getColor(aU)||i;n&&(e.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${n}; }`),e.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${n}; }`));const s=o.getColor(E4);s&&e.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${s}; }`);const r=o.getColor(rU)||s;r&&e.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${r}; }`);const a=o.getColor(lU)||r;a&&(e.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),e.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=o.getColor(hU);l&&e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${cn(o.type)?"dashed":"solid"} ${l}; }`);const c=o.getColor(uU);c&&e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${cn(o.type)?"dashed":"solid"} ${c}; }`);const d=o.getColor(Kg);d&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${d}; }`);const h=o.getColor(gU);h&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${h}; }`);const u=o.getColor(rd);u&&e.addRule(` .monaco-diff-editor .diffViewport { background: ${u}; } @@ -136,10 +136,10 @@ var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,config ); background-size: 8px 8px; } - `)});var iY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},sY=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let PD=class extends H{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new R),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new R),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new R),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new R),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Dn,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}openCodeEditor(e,t,i){return sY(this,void 0,void 0,function*(){for(const n of this._codeEditorOpenHandlers){const s=yield n(e,t,i);if(s!==null)return s}return null})}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return Be(t)}};PD=iY([nY(0,Ct)],PD);var oY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},JA=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},rY=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Uv=class extends PD{constructor(e,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((i,n,s)=>rY(this,void 0,void 0,function*(){return n?this.doOpenEditor(n,i):null}))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===Me.http||s===Me.https)return d4(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};Uv=oY([JA(0,Ee),JA(1,Ct)],Uv);et(ct,Uv);const Yg=Ye("layoutService");var eF=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tF=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let $v=class{constructor(e){this._codeEditorService=e,this.onDidLayout=ge.None,this.offset={top:0,quickPickTop:0}}get dimension(){return this._dimension||(this._dimension=JC(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}};$v=eF([tF(0,ct)],$v);let FD=class extends $v{constructor(e,t){super(t),this._container=e}get hasContainer(){return!1}get container(){return this._container}};FD=eF([tF(1,ct)],FD);et(Yg,$v);const b_=Ye("dialogService");var aY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},eM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ib=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function Eb(o){return o.scheme===Me.file?o.fsPath:o.path}let iF=0;class Nb{constructor(e,t,i,n,s,r,a){this.id=++iF,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class tM{constructor(e,t){this.resourceLabel=e,this.reason=t}}class iM{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);const i=[];return e.length>0&&i.push(p({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(p({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` -`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class lY{constructor(e,t,i,n,s,r,a){this.id=++iF,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new iM),this.removedResources.has(t)||this.removedResources.set(t,new tM(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new iM),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new tM(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class nF{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` -`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new D5(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[n])&&(i=!1,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class BS{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Er){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){Te(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}_invokeWorkspacePrepare(e){return Ib(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return H.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?H.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(H.None);const i=e.actual.prepareUndoRedo();return i?hI(i)?t(i):i.then(n=>t(n)):t(H.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||sF);return new BS(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Tb(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new Tb}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(!!i){if(i===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return Ib(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const a=yield this._dialogService.show(Bt.Info,p("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[p({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),p("nok","Undo this File"),p("cancel","Cancel")],{cancelId:2});if(a.choice===2)return;if(a.choice===1)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,i,!1);if(l)return l.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return s.dispose(),r.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))})}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=p({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new BS([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();!r||r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof Er){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}_confirmAndContinueUndo(e,t,i){return Ib(this,void 0,void 0,function*(){if((yield this._dialogService.show(Bt.Info,p("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[p("confirmDifferentSource.yes","Yes"),p("confirmDifferentSource.no","No")],{cancelId:1})).choice!==1)return this._undo(e,t,!0)})}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();!r||r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,p({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,p({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,p({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return Ib(this,void 0,void 0,function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=p({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new BS([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();!r||r.groupId===e&&(!t||r.groupOrderqE(o,t))}function rF(o){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var hY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const no=Ye("ILanguageFeatureDebounceService");var jv;(function(o){const e=new WeakMap;let t=0;function i(n){let s=e.get(n);return s===void 0&&(s=++t,e.set(n,s)),s}o.of=i})(jv||(jv={}));class gY{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new Dc(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>ZC(jv.of(i),t),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?Zn(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new cY(6),this._cache.set(i,n));const s=Zn(n.update(t),this._min,this._max);return qE(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new oF;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return Zn(e,this._min,this._max)}}let WD=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,s,r;const a=(n=i==null?void 0:i.min)!==null&&n!==void 0?n:50,l=(s=i==null?void 0:i.max)!==null&&s!==void 0?s:Math.pow(a,2),c=(r=i==null?void 0:i.key)!==null&&r!==void 0?r:void 0,d=`${jv.of(e)},${a}${c?","+c:""}`;let h=this._data.get(d);return h||(h=new gY(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l),this._data.set(d,h)),h}_overallAverage(){const e=new oF;for(const t of this._data.values())e.update(t.default());return e.value}};WD=hY([uY(0,So)],WD);et(no,WD,!0);const v_=Ye("IWorkspaceEditService");class Qg{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Cd.is(t))return Cd.lift(t);if($u.is(t))return $u.lift(t);throw new Error("Unsupported edit")})}}class Cd extends Qg{constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}static is(e){return e instanceof Cd?!0:Hn(e)&&_e.isUri(e.resource)&&Hn(e.textEdit)}static lift(e){return e instanceof Cd?e:new Cd(e.resource,e.textEdit,e.versionId,e.metadata)}}class $u extends Qg{constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}static is(e){return e instanceof $u?!0:Hn(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof $u?e:new $u(e.oldResource,e.newResource,e.options,e.metadata)}}const GE=Object.freeze({id:"editor",order:5,type:"object",title:p("editorConfigurationTitle","Editor"),scope:5}),Kv=Object.assign(Object.assign({},GE),{properties:{"editor.tabSize":{type:"number",default:sn.tabSize,minimum:1,markdownDescription:p("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:sn.insertSpaces,markdownDescription:p("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:sn.detectIndentation,markdownDescription:p("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:sn.trimAutoWhitespace,description:p("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:sn.largeFileOptimizations,description:p("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:p("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[p("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),p("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),p("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:p("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[p("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),p("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),p("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:p("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:p("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:p("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:["array","null"],default:null,description:p("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:p("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:p("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:p("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:p("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:p("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:p("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:p("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:p("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function fY(o){return typeof o.type<"u"||typeof o.anyOf<"u"}for(const o of ru){const e=o.schema;if(typeof e<"u")if(fY(e))Kv.properties[`editor.${o.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(Kv.properties[t]=e[t])}let Ab=null;function aF(){return Ab===null&&(Ab=Object.create(null),Object.keys(Kv.properties).forEach(o=>{Ab[o]=!0})),Ab}function pY(o){return aF()[`editor.${o}`]||!1}function mY(o){return aF()[`diffEditor.${o}`]||!1}const _Y=zt.as(rl.Configuration);_Y.registerConfiguration(Kv);class Ft{static insert(e,t){return{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}class Qn{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.frozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?zT(this.contents,e):this.contents}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?zT(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=La(this.contents),i=La(this.overrides),n=[...this.keys];for(const s of e)if(!s.isEmpty()){this.mergeContents(t,s.contents);for(const r of s.overrides){const[a]=i.filter(l=>Ss(l.identifiers,r.identifiers));a?(this.mergeContents(a.contents,r.contents),a.keys.push(...r.keys),a.keys=Qa(a.keys)):i.push(La(r))}for(const r of s.keys)n.indexOf(r)===-1&&n.push(r)}return new Qn(t,n,i)}freeze(){return this.frozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const i={};for(const n of Qa([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n];const r=t[n];r&&(typeof s=="object"&&typeof r=="object"?(s=La(s),this.mergeContents(s,r)):s=r),i[n]=s}return new Qn(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&Hn(e[i])&&Hn(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=La(t[i])}}checkAndFreeze(e){return this.frozen&&!Object.isFrozen(e)?n6(e):e}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=s=>{s&&(i?this.mergeContents(i,s):i=La(s))};for(const s of this.overrides)Ss(s.identifiers,[e])?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),TI(this.contents,e,t,i=>{throw new Error(i)})}removeValue(e){this.removeKey(e)&&vW(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;iC.identifiers).flat()).filter(C=>n.getOverrideValue(e,C)!==void 0);return{defaultValue:a,policyValue:l,applicationValue:c,userValue:d,userLocalValue:h,userRemoteValue:u,workspaceValue:g,workspaceFolderValue:f,memoryValue:_,value:b,default:a!==void 0?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,policy:l!==void 0?{value:l}:void 0,application:c!==void 0?{value:c,override:t.overrideIdentifier?this.applicationConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:d!==void 0?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:h!==void 0?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:u!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:g!==void 0?{value:this._workspaceConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:f!==void 0?{value:s==null?void 0:s.freeze().getValue(e),override:t.overrideIdentifier?s==null?void 0:s.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:_!==void 0?{value:r.getValue(e),override:t.overrideIdentifier?r.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:v.length?v:void 0}}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),s=this.parseConfigurationModel(e.user),r=this.parseConfigurationModel(e.workspace),a=e.folders.reduce((l,c)=>(l.set(_e.revive(c[0]),this.parseConfigurationModel(c[1])),l),new mn);return new N1(t,i,n,s,new Qn,r,a,new Qn,new mn,!1)}static parseConfigurationModel(e){return new Qn(e.contents,e.keys,e.overrides).freeze()}}class bY{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const s=new Set;e.keys.forEach(a=>s.add(a)),e.overrides.forEach(([,a])=>a.forEach(l=>s.add(l))),this.affectedKeys=[...s.values()];const r=new Qn;this.affectedKeys.forEach(a=>r.setValue(a,{})),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=N1.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,s=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!$s(n,s)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i=kP({[t]:!0},()=>{}),n;for(;typeof i=="object"&&(n=Object.keys(i)[0]);){if(e=e[n],!e)return!1;i=i[n]}return!0}}const vY=/^(cursor|delete)/;class CY extends H{constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new R),this._currentChord=null,this._currentChordChecker=new r_,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=wu.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new xs,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ge.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(!!i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),null;const s=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,r,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(p("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=wu.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=wu.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getParts();return this._ignoreSingleModifiers=new wu(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,r=null;if(i){const[d]=e.getSingleModifierDispatchParts();s=d,r=d}else[s]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,r,s);return this._logService.trace("KeybindingService#dispatch",l,c==null?void 0:c.commandId),c&&c.enterChord?(n=!0,this._enterChordMode(s,l),this._log("+ Entering chord mode..."),n):(this._currentChord&&(!c||!c.commandId)&&(this._log(`+ Leaving chord mode: Nothing bound to "${this._currentChord.label} ${l}".`),this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:10*1e3}),n=!0),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(n=!0),this._log(`+ Invoking command ${c.commandId}.`),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,d=>this._notificationService.warn(d)),vY.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class wu{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}wu.EMPTY=new wu(null);const _i=Ye("keybindingService");class Lp{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const n of e){const s=n.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Lp.handleRemovals([].concat(e).concat(t));for(let n=0,s=this._keybindings.length;n"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;const r=s.keypressParts.length>1,a=t.keypressParts.length>1;r&&a&&s.keypressParts[1]!==t.keypressParts[1]||Lp.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t>"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i"u"||i.length===0)return null;if(i.length===1)return i[0];for(let n=i.length-1;n>=0;n--){const s=i[n];if(t.contextMatchesRules(s.when))return s}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(t!==null){const r=this._map.get(t);if(typeof r>"u")return this._log("\\ No keybinding entries."),null;n=[];for(let a=0,l=r.length;a"u")return this._log("\\ No keybinding entries."),null;n=r}const s=this._findCommand(e,n);return s?t===null&&s.keypressParts.length>1&&s.keypressParts[1]!==null?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${oM(s.when)}, source: ${rM(s)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${s.command}, when: ${oM(s.when)}, source: ${rM(s)}.`),{enterChord:!1,leaveChord:s.keypressParts.length>1,commandId:s.command,commandArgs:s.commandArgs,bubble:s.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(!!Lp._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function oM(o){return o?`${o.serialize()}`:"no when condition"}function rM(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}class aM{constructor(e,t,i,n,s,r,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?VD(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=VD(e.getSingleModifierDispatchParts())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=a}}function VD(o){const e=[];for(let t=0,i=o.length;tthis._getLabel(e))}getAriaLabel(){return wY.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:SY.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new lH(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class mm extends LY{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return sd.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":sd.toString(e.keyCode)}_getElectronAccelerator(e){return sd.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return mm.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=sd.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=pI[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof Md)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Md(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const i=VD(e.map(n=>this._resolveSimpleUserBinding(n)));return i.length>0?[new mm(new av(i),t)]:[]}}const bg=Ye("labelService"),_m=Ye("contextService");function lM(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&_e.isUri(e.uri)}function DY(o){if(o.configuration)return{id:o.id,configPath:o.configuration};if(o.folders.length===1)return{id:o.id,uri:o.folders[0].uri}}class kY{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const HD="code-workspace";p("codeWorkspace","Code Workspace");var hi;(function(o){o.noSelection=p("noSelection","No selection"),o.singleSelectionRange=p("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),o.singleSelection=p("singleSelection","Line {0}, Column {1}"),o.multiSelectionRange=p("multiSelectionRange","{0} selections ({1} characters selected)"),o.multiSelection=p("multiSelection","{0} selections"),o.emergencyConfOn=p("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),o.openingDocs=p("openingDocs","Now opening the Editor Accessibility documentation page."),o.readonlyDiffEditor=p("readonlyDiffEditor"," in a read-only pane of a diff editor."),o.editableDiffEditor=p("editableDiffEditor"," in a pane of a diff editor."),o.readonlyEditor=p("readonlyEditor"," in a read-only code editor"),o.editableEditor=p("editableEditor"," in a code editor"),o.changeConfigToOnMac=p("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),o.changeConfigToOnWinLinux=p("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),o.auto_on=p("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),o.auto_off=p("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),o.tabFocusModeOnMsg=p("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),o.tabFocusModeOnMsgNoKb=p("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),o.tabFocusModeOffMsg=p("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),o.tabFocusModeOffMsgNoKb=p("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),o.openDocMac=p("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),o.openDocWinLinux=p("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),o.outroMsg=p("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),o.showAccessibilityHelpAction=p("showAccessibilityHelpAction","Show Accessibility Help")})(hi||(hi={}));var zD;(function(o){o.inspectTokensAction=p("inspectTokens","Developer: Inspect Tokens")})(zD||(zD={}));var qv;(function(o){o.gotoLineActionLabel=p("gotoLineActionLabel","Go to Line/Column...")})(qv||(qv={}));var UD;(function(o){o.helpQuickAccessActionLabel=p("helpQuickAccess","Show all Quick Access Providers")})(UD||(UD={}));var Gv;(function(o){o.quickCommandActionLabel=p("quickCommandActionLabel","Command Palette"),o.quickCommandHelp=p("quickCommandActionHelp","Show And Run Commands")})(Gv||(Gv={}));var bm;(function(o){o.quickOutlineActionLabel=p("quickOutlineActionLabel","Go to Symbol..."),o.quickOutlineByCategoryActionLabel=p("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(bm||(bm={}));var Zv;(function(o){o.editorViewAccessibleLabel=p("editorViewAccessibleLabel","Editor content"),o.accessibilityHelpMessage=p("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(Zv||(Zv={}));var $D;(function(o){o.toggleHighContrast=p("toggleHighContrast","Toggle High Contrast Theme")})($D||($D={}));var jD;(function(o){o.bulkEditServiceSummary=p("bulkEditServiceSummary","Made {0} edits in {1} files")})(jD||(jD={}));const lF=Ye("workspaceTrustManagementService");var en;(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,r.start),l=Math.min(s.end,r.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){const a=[],l={start:s.start,end:Math.min(r.start,s.end)},c={start:Math.max(r.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}o.relativeComplement=n})(en||(en={}));var Wl;(function(o){o[o.AVOID=0]="AVOID",o[o.ALIGN=1]="ALIGN"})(Wl||(Wl={}));function Su(o,e,t){const i=t.mode===Wl.ALIGN?t.offset:t.offset+t.size,n=t.mode===Wl.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=o-i?i:e<=n?n-e:Math.max(o-e,0):e<=n?n-e:e<=o-i?i:0}class vg extends H{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=H.None,this.toDisposeOnSetContainer=H.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=J(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Pn(this.view),this.setContainer(e,t),this._register(Be(()=>this.setContainer(null,1)))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(i=this.shadowRootHostElement)===null||i===void 0||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=J(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=xY,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(J("slot"))}else this.container.appendChild(this.view);const n=new Q;vg.BUBBLE_UP_EVENTS.forEach(s=>{n.add(ki(this.container,s,r=>{this.onDOMEvent(r,!1)}))}),vg.BUBBLE_DOWN_EVENTS.forEach(s=>{n.add(ki(this.container,s,r=>{this.onDOMEvent(r,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){var t,i;this.isVisible()&&this.hide(),Si(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",bs(this.view),this.toDisposeOnClean=e.render(this.view)||H.None,this.delegate=e,this.doLayout(),(i=(t=this.delegate).focus)===null||i===void 0||i.call(t)}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(Ur&&$I.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(l4(e)){const h=on(e),u=KH(e);t={top:h.top*u,left:h.left*u,width:h.width*u,height:h.height*u}}else t={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const i=co(this.view),n=iD(this.view),s=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,c;if(a===0){const h={offset:t.top-window.pageYOffset,size:t.height,position:s===0?0:1},u={offset:t.left,size:t.width,position:r===0?0:1,mode:Wl.ALIGN};l=Su(window.innerHeight,n,h)+window.pageYOffset,en.intersects({start:l,end:l+n},{start:h.offset,end:h.offset+h.size})&&(u.mode=Wl.AVOID),c=Su(window.innerWidth,i,u)}else{const h={offset:t.left,size:t.width,position:r===0?0:1},u={offset:t.top,size:t.height,position:s===0?0:1,mode:Wl.ALIGN};c=Su(window.innerWidth,i,h),en.intersects({start:c,end:c+i},{start:h.offset,end:h.offset+h.size})&&(u.mode=Wl.AVOID),l=Su(window.innerHeight,n,u)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=on(this.container);this.view.style.top=`${l-(this.useFixedPosition?on(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?on(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Pn(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Ga(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}vg.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];vg.BUBBLE_DOWN_EVENTS=["click"];const xY=` + `)});var iY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},sY=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let PD=class extends H{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new R),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new R),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new R),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new R),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Dn,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}openCodeEditor(e,t,i){return sY(this,void 0,void 0,function*(){for(const n of this._codeEditorOpenHandlers){const s=yield n(e,t,i);if(s!==null)return s}return null})}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return Be(t)}};PD=iY([nY(0,Ct)],PD);var oY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},JA=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},rY=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Uv=class extends PD{constructor(e,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler((i,n,s)=>rY(this,void 0,void 0,function*(){return n?this.doOpenEditor(n,i):null}))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===Me.http||s===Me.https)return d4(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};Uv=oY([JA(0,Ee),JA(1,Ct)],Uv);et(ct,Uv);const Yg=Ye("layoutService");var e5=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},t5=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let $v=class{constructor(e){this._codeEditorService=e,this.onDidLayout=ge.None,this.offset={top:0,quickPickTop:0}}get dimension(){return this._dimension||(this._dimension=JC(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}};$v=e5([t5(0,ct)],$v);let FD=class extends $v{constructor(e,t){super(t),this._container=e}get hasContainer(){return!1}get container(){return this._container}};FD=e5([t5(1,ct)],FD);et(Yg,$v);const b_=Ye("dialogService");var aY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},eM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ib=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function Eb(o){return o.scheme===Me.file?o.fsPath:o.path}let i5=0;class Nb{constructor(e,t,i,n,s,r,a){this.id=++i5,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class tM{constructor(e,t){this.resourceLabel=e,this.reason=t}}class iM{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);const i=[];return e.length>0&&i.push(p({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(p({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class lY{constructor(e,t,i,n,s,r,a){this.id=++i5,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new iM),this.removedResources.has(t)||this.removedResources.set(t,new tM(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new iM),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new tM(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class n5{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new DF(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[n])&&(i=!1,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class BS{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Er){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){Te(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}_invokeWorkspacePrepare(e){return Ib(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return H.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?H.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(H.None);const i=e.actual.prepareUndoRedo();return i?hI(i)?t(i):i.then(n=>t(n)):t(H.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||s5);return new BS(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Tb(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new Tb}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(!!i){if(i===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return Ib(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const a=yield this._dialogService.show(Bt.Info,p("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[p({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),p("nok","Undo this File"),p("cancel","Cancel")],{cancelId:2});if(a.choice===2)return;if(a.choice===1)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,i,!1);if(l)return l.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return s.dispose(),r.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))})}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=p({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new BS([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();!r||r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof Er){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}_confirmAndContinueUndo(e,t,i){return Ib(this,void 0,void 0,function*(){if((yield this._dialogService.show(Bt.Info,p("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[p("confirmDifferentSource.yes","Yes"),p("confirmDifferentSource.no","No")],{cancelId:1})).choice!==1)return this._undo(e,t,!0)})}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();!r||r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,p({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,p({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,p({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return Ib(this,void 0,void 0,function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=p({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new BS([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();!r||r.groupId===e&&(!t||r.groupOrderqE(o,t))}function r5(o){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var hY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const no=Ye("ILanguageFeatureDebounceService");var jv;(function(o){const e=new WeakMap;let t=0;function i(n){let s=e.get(n);return s===void 0&&(s=++t,e.set(n,s)),s}o.of=i})(jv||(jv={}));class gY{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new Dc(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>ZC(jv.of(i),t),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?Zn(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new cY(6),this._cache.set(i,n));const s=Zn(n.update(t),this._min,this._max);return qE(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new o5;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return Zn(e,this._min,this._max)}}let WD=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,s,r;const a=(n=i==null?void 0:i.min)!==null&&n!==void 0?n:50,l=(s=i==null?void 0:i.max)!==null&&s!==void 0?s:Math.pow(a,2),c=(r=i==null?void 0:i.key)!==null&&r!==void 0?r:void 0,d=`${jv.of(e)},${a}${c?","+c:""}`;let h=this._data.get(d);return h||(h=new gY(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l),this._data.set(d,h)),h}_overallAverage(){const e=new o5;for(const t of this._data.values())e.update(t.default());return e.value}};WD=hY([uY(0,So)],WD);et(no,WD,!0);const v_=Ye("IWorkspaceEditService");class Qg{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Cd.is(t))return Cd.lift(t);if($u.is(t))return $u.lift(t);throw new Error("Unsupported edit")})}}class Cd extends Qg{constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}static is(e){return e instanceof Cd?!0:Hn(e)&&_e.isUri(e.resource)&&Hn(e.textEdit)}static lift(e){return e instanceof Cd?e:new Cd(e.resource,e.textEdit,e.versionId,e.metadata)}}class $u extends Qg{constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}static is(e){return e instanceof $u?!0:Hn(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof $u?e:new $u(e.oldResource,e.newResource,e.options,e.metadata)}}const GE=Object.freeze({id:"editor",order:5,type:"object",title:p("editorConfigurationTitle","Editor"),scope:5}),Kv=Object.assign(Object.assign({},GE),{properties:{"editor.tabSize":{type:"number",default:sn.tabSize,minimum:1,markdownDescription:p("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:sn.insertSpaces,markdownDescription:p("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:sn.detectIndentation,markdownDescription:p("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:sn.trimAutoWhitespace,description:p("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:sn.largeFileOptimizations,description:p("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:p("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[p("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),p("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),p("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:p("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[p("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),p("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),p("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:p("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:p("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:p("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:["array","null"],default:null,description:p("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:p("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:p("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:p("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:p("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:p("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:p("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:p("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:p("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function fY(o){return typeof o.type<"u"||typeof o.anyOf<"u"}for(const o of ru){const e=o.schema;if(typeof e<"u")if(fY(e))Kv.properties[`editor.${o.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(Kv.properties[t]=e[t])}let Ab=null;function a5(){return Ab===null&&(Ab=Object.create(null),Object.keys(Kv.properties).forEach(o=>{Ab[o]=!0})),Ab}function pY(o){return a5()[`editor.${o}`]||!1}function mY(o){return a5()[`diffEditor.${o}`]||!1}const _Y=zt.as(rl.Configuration);_Y.registerConfiguration(Kv);class Ft{static insert(e,t){return{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}class Qn{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.frozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?zT(this.contents,e):this.contents}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?zT(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=La(this.contents),i=La(this.overrides),n=[...this.keys];for(const s of e)if(!s.isEmpty()){this.mergeContents(t,s.contents);for(const r of s.overrides){const[a]=i.filter(l=>Ss(l.identifiers,r.identifiers));a?(this.mergeContents(a.contents,r.contents),a.keys.push(...r.keys),a.keys=Qa(a.keys)):i.push(La(r))}for(const r of s.keys)n.indexOf(r)===-1&&n.push(r)}return new Qn(t,n,i)}freeze(){return this.frozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const i={};for(const n of Qa([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n];const r=t[n];r&&(typeof s=="object"&&typeof r=="object"?(s=La(s),this.mergeContents(s,r)):s=r),i[n]=s}return new Qn(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&Hn(e[i])&&Hn(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=La(t[i])}}checkAndFreeze(e){return this.frozen&&!Object.isFrozen(e)?n6(e):e}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=s=>{s&&(i?this.mergeContents(i,s):i=La(s))};for(const s of this.overrides)Ss(s.identifiers,[e])?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),TI(this.contents,e,t,i=>{throw new Error(i)})}removeValue(e){this.removeKey(e)&&vW(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;iC.identifiers).flat()).filter(C=>n.getOverrideValue(e,C)!==void 0);return{defaultValue:a,policyValue:l,applicationValue:c,userValue:d,userLocalValue:h,userRemoteValue:u,workspaceValue:g,workspaceFolderValue:f,memoryValue:_,value:b,default:a!==void 0?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,policy:l!==void 0?{value:l}:void 0,application:c!==void 0?{value:c,override:t.overrideIdentifier?this.applicationConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:d!==void 0?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:h!==void 0?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:u!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:g!==void 0?{value:this._workspaceConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:f!==void 0?{value:s==null?void 0:s.freeze().getValue(e),override:t.overrideIdentifier?s==null?void 0:s.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:_!==void 0?{value:r.getValue(e),override:t.overrideIdentifier?r.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:v.length?v:void 0}}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),s=this.parseConfigurationModel(e.user),r=this.parseConfigurationModel(e.workspace),a=e.folders.reduce((l,c)=>(l.set(_e.revive(c[0]),this.parseConfigurationModel(c[1])),l),new mn);return new N1(t,i,n,s,new Qn,r,a,new Qn,new mn,!1)}static parseConfigurationModel(e){return new Qn(e.contents,e.keys,e.overrides).freeze()}}class bY{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const s=new Set;e.keys.forEach(a=>s.add(a)),e.overrides.forEach(([,a])=>a.forEach(l=>s.add(l))),this.affectedKeys=[...s.values()];const r=new Qn;this.affectedKeys.forEach(a=>r.setValue(a,{})),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=N1.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,s=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!$s(n,s)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i=kP({[t]:!0},()=>{}),n;for(;typeof i=="object"&&(n=Object.keys(i)[0]);){if(e=e[n],!e)return!1;i=i[n]}return!0}}const vY=/^(cursor|delete)/;class CY extends H{constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new R),this._currentChord=null,this._currentChordChecker=new r_,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=wu.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new xs,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ge.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(!!i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),null;const s=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,r,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(p("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=wu.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=wu.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getParts();return this._ignoreSingleModifiers=new wu(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,r=null;if(i){const[d]=e.getSingleModifierDispatchParts();s=d,r=d}else[s]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,r,s);return this._logService.trace("KeybindingService#dispatch",l,c==null?void 0:c.commandId),c&&c.enterChord?(n=!0,this._enterChordMode(s,l),this._log("+ Entering chord mode..."),n):(this._currentChord&&(!c||!c.commandId)&&(this._log(`+ Leaving chord mode: Nothing bound to "${this._currentChord.label} ${l}".`),this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:10*1e3}),n=!0),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(n=!0),this._log(`+ Invoking command ${c.commandId}.`),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,d=>this._notificationService.warn(d)),vY.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class wu{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}wu.EMPTY=new wu(null);const _i=Ye("keybindingService");class Lp{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const n of e){const s=n.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Lp.handleRemovals([].concat(e).concat(t));for(let n=0,s=this._keybindings.length;n"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;const r=s.keypressParts.length>1,a=t.keypressParts.length>1;r&&a&&s.keypressParts[1]!==t.keypressParts[1]||Lp.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t>"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i"u"||i.length===0)return null;if(i.length===1)return i[0];for(let n=i.length-1;n>=0;n--){const s=i[n];if(t.contextMatchesRules(s.when))return s}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(t!==null){const r=this._map.get(t);if(typeof r>"u")return this._log("\\ No keybinding entries."),null;n=[];for(let a=0,l=r.length;a"u")return this._log("\\ No keybinding entries."),null;n=r}const s=this._findCommand(e,n);return s?t===null&&s.keypressParts.length>1&&s.keypressParts[1]!==null?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${oM(s.when)}, source: ${rM(s)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${s.command}, when: ${oM(s.when)}, source: ${rM(s)}.`),{enterChord:!1,leaveChord:s.keypressParts.length>1,commandId:s.command,commandArgs:s.commandArgs,bubble:s.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(!!Lp._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function oM(o){return o?`${o.serialize()}`:"no when condition"}function rM(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}class aM{constructor(e,t,i,n,s,r,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?VD(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=VD(e.getSingleModifierDispatchParts())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=a}}function VD(o){const e=[];for(let t=0,i=o.length;tthis._getLabel(e))}getAriaLabel(){return wY.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:SY.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new lH(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class mm extends LY{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return sd.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":sd.toString(e.keyCode)}_getElectronAccelerator(e){return sd.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return mm.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=sd.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=pI[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof Md)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Md(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const i=VD(e.map(n=>this._resolveSimpleUserBinding(n)));return i.length>0?[new mm(new av(i),t)]:[]}}const bg=Ye("labelService"),_m=Ye("contextService");function lM(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&_e.isUri(e.uri)}function DY(o){if(o.configuration)return{id:o.id,configPath:o.configuration};if(o.folders.length===1)return{id:o.id,uri:o.folders[0].uri}}class kY{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const HD="code-workspace";p("codeWorkspace","Code Workspace");var hi;(function(o){o.noSelection=p("noSelection","No selection"),o.singleSelectionRange=p("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),o.singleSelection=p("singleSelection","Line {0}, Column {1}"),o.multiSelectionRange=p("multiSelectionRange","{0} selections ({1} characters selected)"),o.multiSelection=p("multiSelection","{0} selections"),o.emergencyConfOn=p("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),o.openingDocs=p("openingDocs","Now opening the Editor Accessibility documentation page."),o.readonlyDiffEditor=p("readonlyDiffEditor"," in a read-only pane of a diff editor."),o.editableDiffEditor=p("editableDiffEditor"," in a pane of a diff editor."),o.readonlyEditor=p("readonlyEditor"," in a read-only code editor"),o.editableEditor=p("editableEditor"," in a code editor"),o.changeConfigToOnMac=p("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),o.changeConfigToOnWinLinux=p("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),o.auto_on=p("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),o.auto_off=p("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),o.tabFocusModeOnMsg=p("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),o.tabFocusModeOnMsgNoKb=p("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),o.tabFocusModeOffMsg=p("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),o.tabFocusModeOffMsgNoKb=p("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),o.openDocMac=p("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),o.openDocWinLinux=p("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),o.outroMsg=p("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),o.showAccessibilityHelpAction=p("showAccessibilityHelpAction","Show Accessibility Help")})(hi||(hi={}));var zD;(function(o){o.inspectTokensAction=p("inspectTokens","Developer: Inspect Tokens")})(zD||(zD={}));var qv;(function(o){o.gotoLineActionLabel=p("gotoLineActionLabel","Go to Line/Column...")})(qv||(qv={}));var UD;(function(o){o.helpQuickAccessActionLabel=p("helpQuickAccess","Show all Quick Access Providers")})(UD||(UD={}));var Gv;(function(o){o.quickCommandActionLabel=p("quickCommandActionLabel","Command Palette"),o.quickCommandHelp=p("quickCommandActionHelp","Show And Run Commands")})(Gv||(Gv={}));var bm;(function(o){o.quickOutlineActionLabel=p("quickOutlineActionLabel","Go to Symbol..."),o.quickOutlineByCategoryActionLabel=p("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(bm||(bm={}));var Zv;(function(o){o.editorViewAccessibleLabel=p("editorViewAccessibleLabel","Editor content"),o.accessibilityHelpMessage=p("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(Zv||(Zv={}));var $D;(function(o){o.toggleHighContrast=p("toggleHighContrast","Toggle High Contrast Theme")})($D||($D={}));var jD;(function(o){o.bulkEditServiceSummary=p("bulkEditServiceSummary","Made {0} edits in {1} files")})(jD||(jD={}));const l5=Ye("workspaceTrustManagementService");var en;(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,r.start),l=Math.min(s.end,r.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){const a=[],l={start:s.start,end:Math.min(r.start,s.end)},c={start:Math.max(r.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}o.relativeComplement=n})(en||(en={}));var Wl;(function(o){o[o.AVOID=0]="AVOID",o[o.ALIGN=1]="ALIGN"})(Wl||(Wl={}));function Su(o,e,t){const i=t.mode===Wl.ALIGN?t.offset:t.offset+t.size,n=t.mode===Wl.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=o-i?i:e<=n?n-e:Math.max(o-e,0):e<=n?n-e:e<=o-i?i:0}class vg extends H{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=H.None,this.toDisposeOnSetContainer=H.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=J(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Pn(this.view),this.setContainer(e,t),this._register(Be(()=>this.setContainer(null,1)))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(i=this.shadowRootHostElement)===null||i===void 0||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=J(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=xY,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(J("slot"))}else this.container.appendChild(this.view);const n=new Q;vg.BUBBLE_UP_EVENTS.forEach(s=>{n.add(ki(this.container,s,r=>{this.onDOMEvent(r,!1)}))}),vg.BUBBLE_DOWN_EVENTS.forEach(s=>{n.add(ki(this.container,s,r=>{this.onDOMEvent(r,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){var t,i;this.isVisible()&&this.hide(),Si(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",bs(this.view),this.toDisposeOnClean=e.render(this.view)||H.None,this.delegate=e,this.doLayout(),(i=(t=this.delegate).focus)===null||i===void 0||i.call(t)}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(Ur&&$I.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(l4(e)){const h=on(e),u=KH(e);t={top:h.top*u,left:h.left*u,width:h.width*u,height:h.height*u}}else t={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const i=co(this.view),n=iD(this.view),s=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,c;if(a===0){const h={offset:t.top-window.pageYOffset,size:t.height,position:s===0?0:1},u={offset:t.left,size:t.width,position:r===0?0:1,mode:Wl.ALIGN};l=Su(window.innerHeight,n,h)+window.pageYOffset,en.intersects({start:l,end:l+n},{start:h.offset,end:h.offset+h.size})&&(u.mode=Wl.AVOID),c=Su(window.innerWidth,i,u)}else{const h={offset:t.left,size:t.width,position:r===0?0:1},u={offset:t.top,size:t.height,position:s===0?0:1,mode:Wl.ALIGN};c=Su(window.innerWidth,i,h),en.intersects({start:c,end:c+i},{start:h.offset,end:h.offset+h.size})&&(u.mode=Wl.AVOID),l=Su(window.innerHeight,n,u)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=on(this.container);this.view.style.top=`${l-(this.useFixedPosition?on(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?on(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Pn(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Ga(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}vg.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];vg.BUBBLE_DOWN_EVENTS=["click"];const xY=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @@ -184,7 +184,7 @@ var E8=Object.defineProperty;var N8=(o,e,t)=>e in o?E8(o,e,{enumerable:!0,config :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } -`;var IY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},EY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let KD=class extends H{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=H.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new vg(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?(t!==this.container||this.shadowRoot!==i)&&(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=Be(()=>{this.currentViewDisposable===n&&this.hideContextView()});return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};KD=IY([EY(0,Yg)],KD);var cM=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Mb="**",dM="/",y0="[/\\\\]",L0="[^/\\\\]",NY=/\//g;function hM(o,e){switch(o){case 0:return"";case 1:return`${L0}*?`;default:return`(?:${y0}|${L0}+${y0}${e?`|${y0}${L0}+`:""})*?`}}function uM(o,e){if(!o)return[];const t=[];let i=!1,n=!1,s="";for(const r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function cF(o){if(!o)return"";let e="";const t=uM(o,dM);if(t.every(i=>i===Mb))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===Mb){if(i)return;e+=hM(2,s===t.length-1)}else{let r=!1,a="",l=!1,c="";for(const d of n){if(d!=="}"&&r){a+=d;continue}if(l&&(d!=="]"||!c)){let h;d==="-"?h=d:(d==="^"||d==="!")&&!c?h="^":d===dM?h="":h=ys(d),c+=h;continue}switch(d){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{const u=`(?:${uM(a,",").map(g=>cF(g)).join("|")})`;e+=u,r=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=L0;continue;case"*":e+=hM(1);continue;default:e+=ys(d)}}sYE(a,e)).filter(a=>a!==zr),o),i=t.length;if(!i)return zr;if(i===1)return t[0];const n=function(a,l){for(let c=0,d=t.length;c!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function mM(o,e,t){const i=Br===gi.sep,n=i?o:o.replace(NY,Br),s=Br+n,r=gi.sep+o;let a;return t?a=function(l,c){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===o||l.endsWith(r)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===n||!i&&l===o)?e:null},a.allPaths=[(t?"*/":"./")+o],a}function VY(o){try{const e=new RegExp(`^${cF(o)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?o:null}}catch{return zr}}function HY(o,e,t){return!o||typeof e!="string"?!1:dF(o)(e,void 0,t)}function dF(o,e={}){if(!o)return fM;if(typeof o=="string"||zY(o)){const t=YE(o,e);if(t===zr)return fM;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return UY(o,e)}function zY(o){const e=o;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function UY(o,e){const t=hF(Object.getOwnPropertyNames(o).map(a=>$Y(a,o[a],e)).filter(a=>a!==zr)),i=t.length;if(!i)return zr;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(d,h){let u;for(let g=0,f=t.length;gcM(this,void 0,void 0,function*(){for(const g of u){const f=yield g;if(typeof f=="string")return f}return null}))():null},l=t.find(d=>!!d.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=t.reduce((d,h)=>h.allPaths?d.concat(h.allPaths):d,[]);return c.length&&(a.allPaths=c),a}const n=function(a,l,c){let d,h;for(let u=0,g=t.length;ucM(this,void 0,void 0,function*(){for(const u of h){const g=yield u;if(typeof g=="string")return g}return null}))():null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function $Y(o,e,t){if(e===!1)return zr;const i=YE(o,t);if(i===zr)return zr;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(r,a,l,c)=>{if(!c||!i(r,a))return null;const d=n.replace("$(basename)",l),h=c(d);return jL(h)?h.then(u=>u?o:null):h?o:null};return s.requiresSiblings=!0,s}}return i}function hF(o,e){const t=o.filter(a=>!!a.basenames);if(t.length<2)return o;const i=t.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let n;if(e){n=[];for(let a=0,l=i.length;a{const c=l.patterns;return c?a.concat(c):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let d;for(d=a.length;d>0;d--){const h=a.charCodeAt(d-1);if(h===47||h===92)break}l=a.substr(d)}const c=i.indexOf(l);return c!==-1?n[c]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const r=o.filter(a=>!a.basenames);return r.push(s),r}let Cg=[],QE=[],uF=[];function Rb(o,e=!1){jY(o,!1,e)}function jY(o,e,t){const i=KY(o,e);Cg.push(i),i.userConfigured?uF.push(i):QE.push(i),t&&!i.userConfigured&&Cg.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function KY(o,e){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:e,filenameLowercase:o.filename?o.filename.toLowerCase():void 0,extensionLowercase:o.extension?o.extension.toLowerCase():void 0,filepatternLowercase:o.filepattern?dF(o.filepattern.toLowerCase()):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(gi.sep)>=0:!1}}function qY(){Cg=Cg.filter(o=>o.userConfigured),QE=[]}function GY(o,e){return ZY(o,e).map(t=>t.id)}function ZY(o,e){let t;if(o)switch(o.scheme){case Me.file:t=o.fsPath;break;case Me.data:{t=cc.parseMetaData(o).get(cc.META_DATA_LABEL);break}case Me.vscodeNotebookCell:t=void 0;break;default:t=o.path}if(!t)return[{id:"unknown",mime:Vn.unknown}];t=t.toLowerCase();const i=fd(t),n=_M(t,i,uF);if(n)return[n,{id:Ks,mime:Vn.text}];const s=_M(t,i,QE);if(s)return[s,{id:Ks,mime:Vn.text}];if(e){const r=YY(e);if(r)return[r,{id:Ks,mime:Vn.text}]}return[{id:"unknown",mime:Vn.unknown}]}function _M(o,e,t){var i;let n,s,r;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?o:e;!((i=l.filepatternLowercase)===null||i===void 0)&&i.call(l,c)&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&e.endsWith(l.extensionLowercase)&&(r=l)}if(n)return n;if(s)return s;if(r)return r}function YY(o){if(LI(o)&&(o=o.substr(1)),o.length>0)for(let e=Cg.length-1;e>=0;e--){const t=Cg[e];if(!t.firstline)continue;const i=o.match(t.firstline);if(i&&i.length>0)return t}}const Ob=Object.prototype.hasOwnProperty,bM="vs.editor.nullLanguage";class QY{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(bM,0),this._register(Ks,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||bM}}class vm extends H{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new R),this.onDidChange=this._onDidChange.event,vm.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new QY,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(ig.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){vm.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},qY();const e=[].concat(ig.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),zt.as(rl.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Ob.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const a of t.extensions)Rb({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const a of t.filenames)Rb({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(const a of t.filenamePatterns)Rb({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);xB(l)||Rb({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){Te(l)}}e.aliases.push(i);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);const r=s!==null&&s.length>0;if(!(r&&s[0]===null)){const a=(r?s[0]:null)||i;(r||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?Ob.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Ob.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Ob.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:GY(e,t)}}vm.instanceCount=0;class Cm extends H{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new R),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new R({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,Cm.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new vm(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){Cm.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return VO(i,null)}createById(e){return new vM(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new vM(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ks),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),Wt.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}Cm.instanceCount=0;class vM{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new R({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}function CM(o){let e=o.definition;for(;e instanceof m;)e=e.definition;return`.codicon-${o.id}:before { content: '${e.fontCharacter}'; }`}const qD=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,VS=/(&)?(&)([^\s&])/g;var Yv;(function(o){o[o.Right=0]="Right",o[o.Left=1]="Left"})(Yv||(Yv={}));class ju extends Zr{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:1,actionViewItemProvider:a=>this.doGetActionViewItem(a,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Ge||dn?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Q),this.initializeOrUpdateStyleSheet(e,{}),this._register(ft.addTarget(n)),G(n,ae.KEY_DOWN,a=>{new Rt(a).equals(2)&&a.preventDefault()}),i.enableMnemonics&&this.menuDisposables.add(G(n,ae.KEY_DOWN,a=>{const l=a.key.toLocaleLowerCase();if(this.mnemonics.has(l)){ut.stop(a,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof wM&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(a)),c.length>1){const d=c.shift();d&&d.container&&(this.focusItemByElement(d.container),c.push(d)),this.mnemonics.set(l,c)}}})),dn&&this._register(G(n,ae.KEY_DOWN,a=>{const l=new Rt(a);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ut.stop(a,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ut.stop(a,!0))})),this._register(G(this.domNode,ae.MOUSE_OUT,a=>{const l=a.relatedTarget;Ga(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register(G(this.actionsList,ae.MOUSE_OVER,a=>{let l=a.target;if(!(!l||!Ga(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}})),this._register(ft.addTarget(this.actionsList)),this._register(G(this.actionsList,xt.Tap,a=>{let l=a.initialTarget;if(!(!l||!Ga(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}}));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new p_(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register(G(n,xt.Change,a=>{ut.stop(a,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-a.translationY})})),this._register(G(r,ae.MOUSE_UP,a=>{a.preventDefault()})),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(a=>{var l;return!((l=i.submenuIds)===null||l===void 0)&&l.has(a.id)?(console.warn(`Found submenu cycle: ${a.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>!(a instanceof HS)).forEach((a,l,c)=>{a.updatePositionInSet(l+1,c.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Gp(e)?this.styleSheet=Qs(e):(ju.globalStyleSheet||(ju.globalStyleSheet=Qs()),this.styleSheet=ju.globalStyleSheet)),this.styleSheet.textContent=JY(t,Gp(e))}style(e){const t=this.getContainer();this.initializeOrUpdateStyleSheet(t,e);const i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",s=e.borderColor?`1px solid ${e.borderColor}`:"",r="5px",a=e.shadowColor?`0 2px 8px ${e.shadowColor}`:"";t.style.outline=s,t.style.borderRadius=r,t.style.color=i,t.style.backgroundColor=n,t.style.boxShadow=a,this.viewItems&&this.viewItems.forEach(l=>{(l instanceof GD||l instanceof HS)&&l.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{!this.element||(this._register(G(this.element,ae.MOUSE_UP,n=>{if(ut.stop(n,!0),Ls){if(new Mr(n).rightButton)return;this.onClick(n)}else setTimeout(()=>{this.onClick(n)},0)})),this._register(G(this.element,ae.CONTEXT_MENU,n=>{ut.stop(n,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=q(this.element,J("a.action-menu-item")),this._action.id===ln.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=q(this.item,J("span.menu-item-check"+m.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=q(this.item,J("span.action-label")),this.options.label&&this.options.keybinding&&(q(this.item,J("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(!!this.label&&this.options.label){Si(this.label);let t=KE(this.getAction().label);if(t){const i=XY(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=qD.exec(t);if(n){t=_I(t),VS.lastIndex=0;let s=VS.exec(t);for(;s&&s[1];)s=VS.exec(t);const r=a=>a.replace(/&&/g,"&");s?this.label.append(WC(r(t.substr(0,s.index))," "),J("u",{"aria-hidden":"true"},s[3]),hP(r(t.substr(s.index+s[0].length))," ")):this.label.innerText=r(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.getAction().checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t?t.toString():"")}style(e){this.menuStyle=e,this.applyStyle()}}class wM extends GD{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new Q),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:Yv.Right,this.showScheduler=new mt(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new mt(()=>{this.element&&!Ga(Ru(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=q(this.item,J("span.submenu-indicator"+m.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(G(this.element,ae.KEY_UP,t=>{const i=new Rt(t);(i.equals(17)||i.equals(3))&&(ut.stop(t,!0),this.createSubmenu(!0))})),this._register(G(this.element,ae.KEY_DOWN,t=>{const i=new Rt(t);Ru()===this.item&&(i.equals(17)||i.equals(3))&&ut.stop(t,!0)})),this._register(G(this.element,ae.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(G(this.element,ae.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(G(this.element,ae.FOCUS_OUT,t=>{this.element&&!Ga(Ru(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){ut.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=Su(e.width,t.width,{position:n===Yv.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new Rt(c).equals(15)&&(ut.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(G(this.submenuContainer,ae.KEY_DOWN,c=>{new Rt(c).equals(15)&&ut.stop(c,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){var e;if(super.applyStyle(),!this.menuStyle)return;const i=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=i?`${i}`:""),(e=this.parentData.submenu)===null||e===void 0||e.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class HS extends fm{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function XY(o){const e=qD,t=e.exec(o);if(!t)return o;const i=!t[1];return o.replace(e,i?"$2$3":"").trim()}function JY(o,e){let t=` +`;var IY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},EY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let KD=class extends H{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=H.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new vg(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?(t!==this.container||this.shadowRoot!==i)&&(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=Be(()=>{this.currentViewDisposable===n&&this.hideContextView()});return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};KD=IY([EY(0,Yg)],KD);var cM=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Mb="**",dM="/",y0="[/\\\\]",L0="[^/\\\\]",NY=/\//g;function hM(o,e){switch(o){case 0:return"";case 1:return`${L0}*?`;default:return`(?:${y0}|${L0}+${y0}${e?`|${y0}${L0}+`:""})*?`}}function uM(o,e){if(!o)return[];const t=[];let i=!1,n=!1,s="";for(const r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function c5(o){if(!o)return"";let e="";const t=uM(o,dM);if(t.every(i=>i===Mb))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===Mb){if(i)return;e+=hM(2,s===t.length-1)}else{let r=!1,a="",l=!1,c="";for(const d of n){if(d!=="}"&&r){a+=d;continue}if(l&&(d!=="]"||!c)){let h;d==="-"?h=d:(d==="^"||d==="!")&&!c?h="^":d===dM?h="":h=ys(d),c+=h;continue}switch(d){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{const u=`(?:${uM(a,",").map(g=>c5(g)).join("|")})`;e+=u,r=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=L0;continue;case"*":e+=hM(1);continue;default:e+=ys(d)}}sYE(a,e)).filter(a=>a!==zr),o),i=t.length;if(!i)return zr;if(i===1)return t[0];const n=function(a,l){for(let c=0,d=t.length;c!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function mM(o,e,t){const i=Br===gi.sep,n=i?o:o.replace(NY,Br),s=Br+n,r=gi.sep+o;let a;return t?a=function(l,c){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===o||l.endsWith(r)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===n||!i&&l===o)?e:null},a.allPaths=[(t?"*/":"./")+o],a}function VY(o){try{const e=new RegExp(`^${c5(o)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?o:null}}catch{return zr}}function HY(o,e,t){return!o||typeof e!="string"?!1:d5(o)(e,void 0,t)}function d5(o,e={}){if(!o)return fM;if(typeof o=="string"||zY(o)){const t=YE(o,e);if(t===zr)return fM;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return UY(o,e)}function zY(o){const e=o;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function UY(o,e){const t=h5(Object.getOwnPropertyNames(o).map(a=>$Y(a,o[a],e)).filter(a=>a!==zr)),i=t.length;if(!i)return zr;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(d,h){let u;for(let g=0,f=t.length;gcM(this,void 0,void 0,function*(){for(const g of u){const f=yield g;if(typeof f=="string")return f}return null}))():null},l=t.find(d=>!!d.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=t.reduce((d,h)=>h.allPaths?d.concat(h.allPaths):d,[]);return c.length&&(a.allPaths=c),a}const n=function(a,l,c){let d,h;for(let u=0,g=t.length;ucM(this,void 0,void 0,function*(){for(const u of h){const g=yield u;if(typeof g=="string")return g}return null}))():null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function $Y(o,e,t){if(e===!1)return zr;const i=YE(o,t);if(i===zr)return zr;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(r,a,l,c)=>{if(!c||!i(r,a))return null;const d=n.replace("$(basename)",l),h=c(d);return jL(h)?h.then(u=>u?o:null):h?o:null};return s.requiresSiblings=!0,s}}return i}function h5(o,e){const t=o.filter(a=>!!a.basenames);if(t.length<2)return o;const i=t.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let n;if(e){n=[];for(let a=0,l=i.length;a{const c=l.patterns;return c?a.concat(c):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let d;for(d=a.length;d>0;d--){const h=a.charCodeAt(d-1);if(h===47||h===92)break}l=a.substr(d)}const c=i.indexOf(l);return c!==-1?n[c]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const r=o.filter(a=>!a.basenames);return r.push(s),r}let Cg=[],QE=[],u5=[];function Rb(o,e=!1){jY(o,!1,e)}function jY(o,e,t){const i=KY(o,e);Cg.push(i),i.userConfigured?u5.push(i):QE.push(i),t&&!i.userConfigured&&Cg.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function KY(o,e){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:e,filenameLowercase:o.filename?o.filename.toLowerCase():void 0,extensionLowercase:o.extension?o.extension.toLowerCase():void 0,filepatternLowercase:o.filepattern?d5(o.filepattern.toLowerCase()):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(gi.sep)>=0:!1}}function qY(){Cg=Cg.filter(o=>o.userConfigured),QE=[]}function GY(o,e){return ZY(o,e).map(t=>t.id)}function ZY(o,e){let t;if(o)switch(o.scheme){case Me.file:t=o.fsPath;break;case Me.data:{t=cc.parseMetaData(o).get(cc.META_DATA_LABEL);break}case Me.vscodeNotebookCell:t=void 0;break;default:t=o.path}if(!t)return[{id:"unknown",mime:Vn.unknown}];t=t.toLowerCase();const i=fd(t),n=_M(t,i,u5);if(n)return[n,{id:Ks,mime:Vn.text}];const s=_M(t,i,QE);if(s)return[s,{id:Ks,mime:Vn.text}];if(e){const r=YY(e);if(r)return[r,{id:Ks,mime:Vn.text}]}return[{id:"unknown",mime:Vn.unknown}]}function _M(o,e,t){var i;let n,s,r;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?o:e;!((i=l.filepatternLowercase)===null||i===void 0)&&i.call(l,c)&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&e.endsWith(l.extensionLowercase)&&(r=l)}if(n)return n;if(s)return s;if(r)return r}function YY(o){if(LI(o)&&(o=o.substr(1)),o.length>0)for(let e=Cg.length-1;e>=0;e--){const t=Cg[e];if(!t.firstline)continue;const i=o.match(t.firstline);if(i&&i.length>0)return t}}const Ob=Object.prototype.hasOwnProperty,bM="vs.editor.nullLanguage";class QY{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(bM,0),this._register(Ks,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||bM}}class vm extends H{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new R),this.onDidChange=this._onDidChange.event,vm.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new QY,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(ig.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){vm.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},qY();const e=[].concat(ig.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),zt.as(rl.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Ob.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const a of t.extensions)Rb({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const a of t.filenames)Rb({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(const a of t.filenamePatterns)Rb({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);xB(l)||Rb({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){Te(l)}}e.aliases.push(i);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);const r=s!==null&&s.length>0;if(!(r&&s[0]===null)){const a=(r?s[0]:null)||i;(r||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?Ob.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Ob.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Ob.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:GY(e,t)}}vm.instanceCount=0;class Cm extends H{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new R),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new R({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,Cm.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new vm(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){Cm.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return VO(i,null)}createById(e){return new vM(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new vM(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ks),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),Wt.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}Cm.instanceCount=0;class vM{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new R({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}function CM(o){let e=o.definition;for(;e instanceof m;)e=e.definition;return`.codicon-${o.id}:before { content: '${e.fontCharacter}'; }`}const qD=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,VS=/(&)?(&)([^\s&])/g;var Yv;(function(o){o[o.Right=0]="Right",o[o.Left=1]="Left"})(Yv||(Yv={}));class ju extends Zr{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:1,actionViewItemProvider:a=>this.doGetActionViewItem(a,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Ge||dn?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Q),this.initializeOrUpdateStyleSheet(e,{}),this._register(ft.addTarget(n)),G(n,ae.KEY_DOWN,a=>{new Rt(a).equals(2)&&a.preventDefault()}),i.enableMnemonics&&this.menuDisposables.add(G(n,ae.KEY_DOWN,a=>{const l=a.key.toLocaleLowerCase();if(this.mnemonics.has(l)){ut.stop(a,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof wM&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(a)),c.length>1){const d=c.shift();d&&d.container&&(this.focusItemByElement(d.container),c.push(d)),this.mnemonics.set(l,c)}}})),dn&&this._register(G(n,ae.KEY_DOWN,a=>{const l=new Rt(a);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ut.stop(a,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ut.stop(a,!0))})),this._register(G(this.domNode,ae.MOUSE_OUT,a=>{const l=a.relatedTarget;Ga(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register(G(this.actionsList,ae.MOUSE_OVER,a=>{let l=a.target;if(!(!l||!Ga(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}})),this._register(ft.addTarget(this.actionsList)),this._register(G(this.actionsList,xt.Tap,a=>{let l=a.initialTarget;if(!(!l||!Ga(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}}));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new p_(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register(G(n,xt.Change,a=>{ut.stop(a,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-a.translationY})})),this._register(G(r,ae.MOUSE_UP,a=>{a.preventDefault()})),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(a=>{var l;return!((l=i.submenuIds)===null||l===void 0)&&l.has(a.id)?(console.warn(`Found submenu cycle: ${a.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>!(a instanceof HS)).forEach((a,l,c)=>{a.updatePositionInSet(l+1,c.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Gp(e)?this.styleSheet=Qs(e):(ju.globalStyleSheet||(ju.globalStyleSheet=Qs()),this.styleSheet=ju.globalStyleSheet)),this.styleSheet.textContent=JY(t,Gp(e))}style(e){const t=this.getContainer();this.initializeOrUpdateStyleSheet(t,e);const i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",s=e.borderColor?`1px solid ${e.borderColor}`:"",r="5px",a=e.shadowColor?`0 2px 8px ${e.shadowColor}`:"";t.style.outline=s,t.style.borderRadius=r,t.style.color=i,t.style.backgroundColor=n,t.style.boxShadow=a,this.viewItems&&this.viewItems.forEach(l=>{(l instanceof GD||l instanceof HS)&&l.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{!this.element||(this._register(G(this.element,ae.MOUSE_UP,n=>{if(ut.stop(n,!0),Ls){if(new Mr(n).rightButton)return;this.onClick(n)}else setTimeout(()=>{this.onClick(n)},0)})),this._register(G(this.element,ae.CONTEXT_MENU,n=>{ut.stop(n,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=q(this.element,J("a.action-menu-item")),this._action.id===ln.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=q(this.item,J("span.menu-item-check"+m.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=q(this.item,J("span.action-label")),this.options.label&&this.options.keybinding&&(q(this.item,J("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(!!this.label&&this.options.label){Si(this.label);let t=KE(this.getAction().label);if(t){const i=XY(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=qD.exec(t);if(n){t=_I(t),VS.lastIndex=0;let s=VS.exec(t);for(;s&&s[1];)s=VS.exec(t);const r=a=>a.replace(/&&/g,"&");s?this.label.append(WC(r(t.substr(0,s.index))," "),J("u",{"aria-hidden":"true"},s[3]),hP(r(t.substr(s.index+s[0].length))," ")):this.label.innerText=r(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.getAction().checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t?t.toString():"")}style(e){this.menuStyle=e,this.applyStyle()}}class wM extends GD{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new Q),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:Yv.Right,this.showScheduler=new mt(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new mt(()=>{this.element&&!Ga(Ru(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=q(this.item,J("span.submenu-indicator"+m.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(G(this.element,ae.KEY_UP,t=>{const i=new Rt(t);(i.equals(17)||i.equals(3))&&(ut.stop(t,!0),this.createSubmenu(!0))})),this._register(G(this.element,ae.KEY_DOWN,t=>{const i=new Rt(t);Ru()===this.item&&(i.equals(17)||i.equals(3))&&ut.stop(t,!0)})),this._register(G(this.element,ae.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(G(this.element,ae.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(G(this.element,ae.FOCUS_OUT,t=>{this.element&&!Ga(Ru(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){ut.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=Su(e.width,t.width,{position:n===Yv.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new Rt(c).equals(15)&&(ut.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(G(this.submenuContainer,ae.KEY_DOWN,c=>{new Rt(c).equals(15)&&ut.stop(c,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){var e;if(super.applyStyle(),!this.menuStyle)return;const i=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=i?`${i}`:""),(e=this.parentData.submenu)===null||e===void 0||e.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class HS extends fm{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function XY(o){const e=qD,t=e.exec(o);if(!t)return o;const i=!t[1];return o.replace(e,i?"$2$3":"").trim()}function JY(o,e){let t=` .monaco-menu { font-size: 13px; border-radius: 5px; @@ -550,14 +550,14 @@ ${CM(m.menuSubmenu)} .monaco-scrollable-element > .scrollbar > .slider.active { background: ${r}; } - `)}return t}function Ao(o,e){const t=Object.create(null);for(const i in e){const n=e[i];n&&(t[i]=va(n,o))}return t}function XE(o,e,t){function i(){const n=Ao(o.getColorTheme(),e);typeof t=="function"?t(n):t.style(n)}return i(),o.onDidColorThemeChange(i)}function eQ(o,e,t){return XE(e,{badgeBackground:(t==null?void 0:t.badgeBackground)||gu,badgeForeground:(t==null?void 0:t.badgeForeground)||fu,badgeBorder:We},o)}function Ud(o,e,t){return XE(e,Object.assign(Object.assign({},A1),t||{}),o)}const A1={listFocusBackground:pU,listFocusForeground:mU,listFocusOutline:_U,listActiveSelectionBackground:Ua,listActiveSelectionForeground:Pr,listActiveSelectionIconForeground:$f,listFocusAndSelectionOutline:bU,listFocusAndSelectionBackground:Ua,listFocusAndSelectionForeground:Pr,listInactiveSelectionBackground:vU,listInactiveSelectionIconForeground:wU,listInactiveSelectionForeground:CU,listInactiveFocusBackground:SU,listInactiveFocusOutline:yU,listHoverBackground:LU,listHoverForeground:DU,listDropBackground:kU,listSelectionOutline:Ot,listHoverOutline:Ot,listFilterWidgetBackground:xU,listFilterWidgetOutline:IU,listFilterWidgetNoMatchesOutline:EU,listFilterWidgetShadow:NU,treeIndentGuidesStroke:TU,tableColumnsBorder:AU,tableOddRowsBackgroundColor:MU,inputActiveOptionBorder:_v,inputActiveOptionForeground:vv,inputActiveOptionBackground:bv,inputBackground:g1,inputForeground:f1,inputBorder:p1,inputValidationInfoBackground:ZI,inputValidationInfoForeground:YI,inputValidationInfoBorder:QI,inputValidationWarningBackground:XI,inputValidationWarningForeground:JI,inputValidationWarningBorder:eE,inputValidationErrorBackground:tE,inputValidationErrorForeground:iE,inputValidationErrorBorder:nE},tQ={shadowColor:Ho,borderColor:RU,foregroundColor:OU,backgroundColor:PU,selectionForegroundColor:FU,selectionBackgroundColor:BU,selectionBorderColor:WU,separatorColor:VU,scrollbarShadow:Kg,scrollbarSliderBackground:rd,scrollbarSliderHoverBackground:ad,scrollbarSliderActiveBackground:ld};function iQ(o,e,t){return XE(e,Object.assign(Object.assign({},tQ),t),o)}class nQ{constructor(e,t,i,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const n=l4(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{const r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(J(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",G(this.block,ae.MOUSE_DOWN,c=>c.stopPropagation()));const a=new Q,l=e.actionRunner||new og;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),i=new ju(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(iQ(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(G(window,ae.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(G(window,ae.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;const d=new Mr(c);let h=d.target;if(!d.rightButton){for(;h;){if(h===s)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),qo(a,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:s=>{var r;(r=e.onHide)===null||r===void 0||r.call(e,!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!ea(e.error)&&this.notificationService.error(e.error)}}var sQ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},If=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let ZD=class extends H{constructor(e,t,i,n,s){super(),this._onDidShowContextMenu=new R,this._onDidHideContextMenu=new R,this.contextMenuHandler=new nQ(i,e,t,n,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;(i=e.onHide)===null||i===void 0||i.call(e,t),this._onDidHideContextMenu.fire()}})),Ol.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};ZD=sQ([If(0,sr),If(1,di),If(2,vh),If(3,_i),If(4,Ct)],ZD);function Qv(o){let e=JSON.parse(o);return e=YD(e),e}function YD(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return _e.revive(o);case 2:return new RegExp(o.source,o.flags);case 14:return new Date(o.source)}if(o instanceof UC||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jv=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},ed=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let QD=class{constructor(e){this._commandService=e}open(e,t){return ed(this,void 0,void 0,function*(){if(!qE(e,Me.command))return!1;if(!(t!=null&&t.allowCommands))return!0;typeof e=="string"&&(e=_e.parse(e));let i=[];try{i=Qv(decodeURIComponent(e.query))}catch{try{i=Qv(e.query)}catch{}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0})}};QD=JE([Jv(0,ci)],QD);let XD=class{constructor(e){this._editorService=e}open(e,t){return ed(this,void 0,void 0,function*(){typeof e=="string"&&(e=_e.parse(e));const{selection:i,uri:n}=rF(e);return e=n,e.scheme===Me.file&&(e=Iq(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:t!=null&&t.fromUserGesture?Xv.USER:Xv.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};XD=JE([Jv(0,ct)],XD);let JD=class{constructor(e,t){this._openers=new Dn,this._validators=new Dn,this._resolvers=new Dn,this._resolvedUriTargets=new mn(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Dn,this._defaultExternalOpener={openExternal:i=>ed(this,void 0,void 0,function*(){return sM(i,Me.http,Me.https)?d4(i):window.location.href=i,!0})},this._openers.push({open:(i,n)=>ed(this,void 0,void 0,function*(){return(n==null?void 0:n.openExternal)||sM(i,Me.mailto,Me.http,Me.https,Me.vsls)?(yield this._doOpenExternal(i,n),!0):!1})}),this._openers.push(new QD(t)),this._openers.push(new XD(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return ed(this,void 0,void 0,function*(){const n=typeof e=="string"?_e.parse(e):e,s=(i=this._resolvedUriTargets.get(n))!==null&&i!==void 0?i:e;for(const r of this._validators)if(!(yield r.shouldOpen(s,t)))return!1;for(const r of this._openers)if(yield r.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return ed(this,void 0,void 0,function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return ed(this,void 0,void 0,function*(){const i=typeof e=="string"?_e.parse(e):e;let n;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t!=null&&t.allowContributedOpeners){const r=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(yield a.openExternal(s,{sourceUri:i,preferredOpenerId:r},ze.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},ze.None)})}dispose(){this._validators.clear()}};JD=JE([Jv(0,ct),Jv(1,ci)],JD);var Vt;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(Vt||(Vt={}));(function(o){function e(r,a){return a-r}o.compare=e;const t=Object.create(null);t[o.Error]=p("sev.error","Error"),t[o.Warning]=p("sev.warning","Warning"),t[o.Info]=p("sev.info","Info");function i(r){return t[r]||""}o.toString=i;function n(r){switch(r){case Bt.Error:return o.Error;case Bt.Warning:return o.Warning;case Bt.Info:return o.Info;case Bt.Ignore:return o.Hint}}o.fromSeverity=n;function s(r){switch(r){case o.Error:return Bt.Error;case o.Warning:return Bt.Warning;case o.Info:return Bt.Info;case o.Hint:return Bt.Ignore}}o.toSeverity=s})(Vt||(Vt={}));var eC;(function(o){const e="";function t(n){return i(n,!0)}o.makeKey=t;function i(n,s){const r=[e];return n.source?r.push(n.source.replace("\xA6","\\\xA6")):r.push(e),n.code?typeof n.code=="string"?r.push(n.code.replace("\xA6","\\\xA6")):r.push(n.code.value.replace("\xA6","\\\xA6")):r.push(e),n.severity!==void 0&&n.severity!==null?r.push(Vt.toString(n.severity)):r.push(e),n.message&&s?r.push(n.message.replace("\xA6","\\\xA6")):r.push(e),n.startLineNumber!==void 0&&n.startLineNumber!==null?r.push(n.startLineNumber.toString()):r.push(e),n.startColumn!==void 0&&n.startColumn!==null?r.push(n.startColumn.toString()):r.push(e),n.endLineNumber!==void 0&&n.endLineNumber!==null?r.push(n.endLineNumber.toString()):r.push(e),n.endColumn!==void 0&&n.endColumn!==null?r.push(n.endColumn.toString()):r.push(e),r.push(e),r.join("\xA6")}o.makeKeyOptionalMessage=i})(eC||(eC={}));const na=Ye("markerService");var oQ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class rQ extends H{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Be(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let s=0;sthis._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new rQ(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Me.inMemory||e.uri.scheme===Me.internal||e.uri.scheme===Me.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500}),i=t.map(n=>({range:this._createDecorationRange(e.model,n),options:this._createDecorationOption(n)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=L.lift(t);if(t.severity===Vt.Hint&&!this._hasMarkerTag(t,1)&&!this._hasMarkerTag(t,2)&&(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){const n=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);if(n===1||i.endColumn>=n)return i;const s=e.getWordAtPosition(i.getStartPosition());s&&(i=new L(i.startLineNumber,s.startColumn,i.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0:!1}};ek=oQ([SM(0,Ut),SM(1,na)],ek);class Dp{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new Dp(e,new tC(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new L(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new Dp(this._startLineNumber,n),new Dp(this._startLineNumber+r,s)]}applyEdit(e,t){const[i,n,s]=Hd(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new B(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const s=i-t;this._startLineNumber-=s;return}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const s=-t;this._startLineNumber-=s,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(t===0&&i===0)return;const r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();r>=a+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,s)}}class tC{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)i=n-1;else{let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let a=n;for(;ae||u===e&&f>=t)&&(ue||f===e&&b>=t){if(fs?_-=s-i:_=i;else if(g===t&&f===i)if(g===n&&_>s)_-=s-i;else{d=!0;continue}else if(gs)g===t?(f=i,_=f+(_-s)):(f=0,_=f+(_-s));else{d=!0;continue}else if(g>n){if(l===0&&!d){c=a;break}g-=l}else if(g===n&&f>=s)e&&g===0&&(f+=e,_+=e),g-=l,f-=s-i,_-=s-i;else throw new Error("Not possible!");const v=4*c;r[v]=g,r[v+1]=f,r[v+2]=_,r[v+3]=b,c++}this._tokenCount=c}acceptInsertText(e,t,i,n,s,r){const a=i===0&&n===1&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),l=this._tokens,c=this._tokenCount;for(let d=0;d=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zS=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let tk=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new Ia}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let r;if(s)r=s.metadata,this._logService.getLevel()===Vo.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${qi.getForeground(r)}, fontStyle ${qi.getFontStyle(r).toString(2)}`);else{let a=this._legend.tokenTypes[e];const l=[];if(a){let c=t;for(let h=0;c>0&&h>1;c>0&&this._logService.getLevel()===Vo.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const d=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(typeof d>"u")r=2147483647;else{if(r=0,typeof d.italic<"u"){const h=(d.italic?1:0)<<11;r|=h|1}if(typeof d.bold<"u"){const h=(d.bold?2:0)<<11;r|=h|2}if(typeof d.underline<"u"){const h=(d.underline?4:0)<<11;r|=h|4}if(typeof d.strikethrough<"u"){const h=(d.strikethrough?8:0)<<11;r|=h|8}if(d.foreground){const h=d.foreground<<15;r|=h|16}r===0&&(r=2147483647)}}else this._logService.getLevel()===Vo.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n,r),this._logService.getLevel()===Vo.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${qi.getForeground(r)}, fontStyle ${qi.getFontStyle(r).toString(2)}`)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};tk=aQ([zS(1,Ct),zS(2,Ht),zS(3,So)],tk);function gF(o,e,t){const i=o.data,n=o.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),r=[];let a=0,l=1,c=0;for(;ad&&i[5*C]===0;)C--;if(C-1===d){let w=h;for(;w+1x)e.warnOverlappingSemanticTokens(k,x+1);else{const F=e.getMetadata(I,O,t);F!==2147483647&&(f===0&&(f=k),u[g]=k-f,u[g+1]=x,u[g+2]=D,u[g+3]=F,g+=4,_=k,b=D)}l=k,c=x,a++}g!==u.length&&(u=u.subarray(0,g));const v=Dp.create(f,u);r.push(v)}return r}class lQ{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class Ia{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=Ia._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=Ia._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?t[0]:[]}function _F(o,e,t,i,n){return gc(this,void 0,void 0,function*(){const s=gQ(o,e),r=yield Promise.all(s.map(a=>gc(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?i:null,n)}catch(d){c=d,l=null}return(!l||!M1(l)&&!pF(l))&&(l=null),new uQ(a,l,c)})));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null})}function fQ(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:null}class pQ{constructor(e,t){this.provider=e,this.tokens=t}}function mQ(o,e){return o.has(e)}function bF(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:[]}function eN(o,e,t,i){return gc(this,void 0,void 0,function*(){const n=bF(o,e),s=yield Promise.all(n.map(r=>gc(this,void 0,void 0,function*(){let a;try{a=yield r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){Pi(l),a=null}return(!a||!M1(a))&&(a=null),new pQ(r,a)})));for(const r of s)if(r.tokens)return r;return s.length>0?s[0]:null})}Xe.registerCommand("_provideDocumentSemanticTokensLegend",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t]=e;pt(t instanceof _e);const i=o.get(Ut).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(de),s=fQ(n,i);return s?s[0].getLegend():o.get(ci).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));Xe.registerCommand("_provideDocumentSemanticTokens",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t]=e;pt(t instanceof _e);const i=o.get(Ut).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(de);if(!mF(n,i))return o.get(ci).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const s=yield _F(n,i,null,null,ze.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!M1(a))return;const l=fF({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l}));Xe.registerCommand("_provideDocumentRangeSemanticTokensLegend",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t,i]=e;pt(t instanceof _e);const n=o.get(Ut).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(de),r=bF(s,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!L.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=yield eN(s,n,L.lift(i),ze.None);if(!!a)return a.provider.getLegend()}));Xe.registerCommand("_provideDocumentRangeSemanticTokens",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t,i]=e;pt(t instanceof _e),pt(L.isIRange(i));const n=o.get(Ut).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(de),r=yield eN(s,n,L.lift(i),ze.None);if(!(!r||!r.tokens))return fF({id:0,type:"full",data:r.tokens.data})}));var tN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yn=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function bl(o){return o.toString()}function LM(o){const e=new YC,t=o.createSnapshot();let i;for(;i=t.read();)e.update(i);return e.digest()}class _Q{constructor(e,t,i){this._modelEventListeners=new Q,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageId)),this.model.setMode(e.languageId)}}const bQ=dn||Ge?1:2;class vQ{constructor(e,t,i,n,s,r,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=a,this.alternativeVersionId=l}}let iC=class Xf extends H{constructor(e,t,i,n,s,r,a,l,c){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new R),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new R),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new R),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new CQ(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new nk(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,c))}static _readModelOptions(e,t){var i;let n=sn.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const g=parseInt(e.editor.tabSize,10);isNaN(g)||(n=g),n<1&&(n=1)}let s=n;if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const g=parseInt(e.editor.indentSize,10);isNaN(g)||(s=g),s<1&&(s=1)}let r=sn.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(r=e.editor.insertSpaces==="false"?!1:Boolean(e.editor.insertSpaces));let a=bQ;const l=e.eol;l===`\r + `)}return t}function Ao(o,e){const t=Object.create(null);for(const i in e){const n=e[i];n&&(t[i]=va(n,o))}return t}function XE(o,e,t){function i(){const n=Ao(o.getColorTheme(),e);typeof t=="function"?t(n):t.style(n)}return i(),o.onDidColorThemeChange(i)}function eQ(o,e,t){return XE(e,{badgeBackground:(t==null?void 0:t.badgeBackground)||gu,badgeForeground:(t==null?void 0:t.badgeForeground)||fu,badgeBorder:We},o)}function Ud(o,e,t){return XE(e,Object.assign(Object.assign({},A1),t||{}),o)}const A1={listFocusBackground:pU,listFocusForeground:mU,listFocusOutline:_U,listActiveSelectionBackground:Ua,listActiveSelectionForeground:Pr,listActiveSelectionIconForeground:$f,listFocusAndSelectionOutline:bU,listFocusAndSelectionBackground:Ua,listFocusAndSelectionForeground:Pr,listInactiveSelectionBackground:vU,listInactiveSelectionIconForeground:wU,listInactiveSelectionForeground:CU,listInactiveFocusBackground:SU,listInactiveFocusOutline:yU,listHoverBackground:LU,listHoverForeground:DU,listDropBackground:kU,listSelectionOutline:Ot,listHoverOutline:Ot,listFilterWidgetBackground:xU,listFilterWidgetOutline:IU,listFilterWidgetNoMatchesOutline:EU,listFilterWidgetShadow:NU,treeIndentGuidesStroke:TU,tableColumnsBorder:AU,tableOddRowsBackgroundColor:MU,inputActiveOptionBorder:_v,inputActiveOptionForeground:vv,inputActiveOptionBackground:bv,inputBackground:g1,inputForeground:f1,inputBorder:p1,inputValidationInfoBackground:ZI,inputValidationInfoForeground:YI,inputValidationInfoBorder:QI,inputValidationWarningBackground:XI,inputValidationWarningForeground:JI,inputValidationWarningBorder:eE,inputValidationErrorBackground:tE,inputValidationErrorForeground:iE,inputValidationErrorBorder:nE},tQ={shadowColor:Ho,borderColor:RU,foregroundColor:OU,backgroundColor:PU,selectionForegroundColor:FU,selectionBackgroundColor:BU,selectionBorderColor:WU,separatorColor:VU,scrollbarShadow:Kg,scrollbarSliderBackground:rd,scrollbarSliderHoverBackground:ad,scrollbarSliderActiveBackground:ld};function iQ(o,e,t){return XE(e,Object.assign(Object.assign({},tQ),t),o)}class nQ{constructor(e,t,i,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const n=l4(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{const r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(J(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",G(this.block,ae.MOUSE_DOWN,c=>c.stopPropagation()));const a=new Q,l=e.actionRunner||new og;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),i=new ju(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(iQ(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(G(window,ae.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(G(window,ae.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;const d=new Mr(c);let h=d.target;if(!d.rightButton){for(;h;){if(h===s)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),qo(a,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:s=>{var r;(r=e.onHide)===null||r===void 0||r.call(e,!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!ea(e.error)&&this.notificationService.error(e.error)}}var sQ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},If=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let ZD=class extends H{constructor(e,t,i,n,s){super(),this._onDidShowContextMenu=new R,this._onDidHideContextMenu=new R,this.contextMenuHandler=new nQ(i,e,t,n,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;(i=e.onHide)===null||i===void 0||i.call(e,t),this._onDidHideContextMenu.fire()}})),Ol.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};ZD=sQ([If(0,sr),If(1,di),If(2,vh),If(3,_i),If(4,Ct)],ZD);function Qv(o){let e=JSON.parse(o);return e=YD(e),e}function YD(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return _e.revive(o);case 2:return new RegExp(o.source,o.flags);case 14:return new Date(o.source)}if(o instanceof UC||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jv=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},ed=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let QD=class{constructor(e){this._commandService=e}open(e,t){return ed(this,void 0,void 0,function*(){if(!qE(e,Me.command))return!1;if(!(t!=null&&t.allowCommands))return!0;typeof e=="string"&&(e=_e.parse(e));let i=[];try{i=Qv(decodeURIComponent(e.query))}catch{try{i=Qv(e.query)}catch{}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0})}};QD=JE([Jv(0,ci)],QD);let XD=class{constructor(e){this._editorService=e}open(e,t){return ed(this,void 0,void 0,function*(){typeof e=="string"&&(e=_e.parse(e));const{selection:i,uri:n}=r5(e);return e=n,e.scheme===Me.file&&(e=Iq(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:t!=null&&t.fromUserGesture?Xv.USER:Xv.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};XD=JE([Jv(0,ct)],XD);let JD=class{constructor(e,t){this._openers=new Dn,this._validators=new Dn,this._resolvers=new Dn,this._resolvedUriTargets=new mn(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Dn,this._defaultExternalOpener={openExternal:i=>ed(this,void 0,void 0,function*(){return sM(i,Me.http,Me.https)?d4(i):window.location.href=i,!0})},this._openers.push({open:(i,n)=>ed(this,void 0,void 0,function*(){return(n==null?void 0:n.openExternal)||sM(i,Me.mailto,Me.http,Me.https,Me.vsls)?(yield this._doOpenExternal(i,n),!0):!1})}),this._openers.push(new QD(t)),this._openers.push(new XD(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return ed(this,void 0,void 0,function*(){const n=typeof e=="string"?_e.parse(e):e,s=(i=this._resolvedUriTargets.get(n))!==null&&i!==void 0?i:e;for(const r of this._validators)if(!(yield r.shouldOpen(s,t)))return!1;for(const r of this._openers)if(yield r.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return ed(this,void 0,void 0,function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return ed(this,void 0,void 0,function*(){const i=typeof e=="string"?_e.parse(e):e;let n;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t!=null&&t.allowContributedOpeners){const r=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(yield a.openExternal(s,{sourceUri:i,preferredOpenerId:r},ze.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},ze.None)})}dispose(){this._validators.clear()}};JD=JE([Jv(0,ct),Jv(1,ci)],JD);var Vt;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(Vt||(Vt={}));(function(o){function e(r,a){return a-r}o.compare=e;const t=Object.create(null);t[o.Error]=p("sev.error","Error"),t[o.Warning]=p("sev.warning","Warning"),t[o.Info]=p("sev.info","Info");function i(r){return t[r]||""}o.toString=i;function n(r){switch(r){case Bt.Error:return o.Error;case Bt.Warning:return o.Warning;case Bt.Info:return o.Info;case Bt.Ignore:return o.Hint}}o.fromSeverity=n;function s(r){switch(r){case o.Error:return Bt.Error;case o.Warning:return Bt.Warning;case o.Info:return Bt.Info;case o.Hint:return Bt.Ignore}}o.toSeverity=s})(Vt||(Vt={}));var eC;(function(o){const e="";function t(n){return i(n,!0)}o.makeKey=t;function i(n,s){const r=[e];return n.source?r.push(n.source.replace("\xA6","\\\xA6")):r.push(e),n.code?typeof n.code=="string"?r.push(n.code.replace("\xA6","\\\xA6")):r.push(n.code.value.replace("\xA6","\\\xA6")):r.push(e),n.severity!==void 0&&n.severity!==null?r.push(Vt.toString(n.severity)):r.push(e),n.message&&s?r.push(n.message.replace("\xA6","\\\xA6")):r.push(e),n.startLineNumber!==void 0&&n.startLineNumber!==null?r.push(n.startLineNumber.toString()):r.push(e),n.startColumn!==void 0&&n.startColumn!==null?r.push(n.startColumn.toString()):r.push(e),n.endLineNumber!==void 0&&n.endLineNumber!==null?r.push(n.endLineNumber.toString()):r.push(e),n.endColumn!==void 0&&n.endColumn!==null?r.push(n.endColumn.toString()):r.push(e),r.push(e),r.join("\xA6")}o.makeKeyOptionalMessage=i})(eC||(eC={}));const na=Ye("markerService");var oQ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class rQ extends H{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Be(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let s=0;sthis._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new rQ(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Me.inMemory||e.uri.scheme===Me.internal||e.uri.scheme===Me.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500}),i=t.map(n=>({range:this._createDecorationRange(e.model,n),options:this._createDecorationOption(n)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=L.lift(t);if(t.severity===Vt.Hint&&!this._hasMarkerTag(t,1)&&!this._hasMarkerTag(t,2)&&(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){const n=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);if(n===1||i.endColumn>=n)return i;const s=e.getWordAtPosition(i.getStartPosition());s&&(i=new L(i.startLineNumber,s.startColumn,i.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0:!1}};ek=oQ([SM(0,Ut),SM(1,na)],ek);class Dp{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new Dp(e,new tC(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new L(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new Dp(this._startLineNumber,n),new Dp(this._startLineNumber+r,s)]}applyEdit(e,t){const[i,n,s]=Hd(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new B(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const s=i-t;this._startLineNumber-=s;return}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const s=-t;this._startLineNumber-=s,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(t===0&&i===0)return;const r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();r>=a+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,s)}}class tC{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)i=n-1;else{let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let a=n;for(;ae||u===e&&f>=t)&&(ue||f===e&&b>=t){if(fs?_-=s-i:_=i;else if(g===t&&f===i)if(g===n&&_>s)_-=s-i;else{d=!0;continue}else if(gs)g===t?(f=i,_=f+(_-s)):(f=0,_=f+(_-s));else{d=!0;continue}else if(g>n){if(l===0&&!d){c=a;break}g-=l}else if(g===n&&f>=s)e&&g===0&&(f+=e,_+=e),g-=l,f-=s-i,_-=s-i;else throw new Error("Not possible!");const v=4*c;r[v]=g,r[v+1]=f,r[v+2]=_,r[v+3]=b,c++}this._tokenCount=c}acceptInsertText(e,t,i,n,s,r){const a=i===0&&n===1&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),l=this._tokens,c=this._tokenCount;for(let d=0;d=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zS=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let tk=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new Ia}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let r;if(s)r=s.metadata,this._logService.getLevel()===Vo.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${qi.getForeground(r)}, fontStyle ${qi.getFontStyle(r).toString(2)}`);else{let a=this._legend.tokenTypes[e];const l=[];if(a){let c=t;for(let h=0;c>0&&h>1;c>0&&this._logService.getLevel()===Vo.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const d=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(typeof d>"u")r=2147483647;else{if(r=0,typeof d.italic<"u"){const h=(d.italic?1:0)<<11;r|=h|1}if(typeof d.bold<"u"){const h=(d.bold?2:0)<<11;r|=h|2}if(typeof d.underline<"u"){const h=(d.underline?4:0)<<11;r|=h|4}if(typeof d.strikethrough<"u"){const h=(d.strikethrough?8:0)<<11;r|=h|8}if(d.foreground){const h=d.foreground<<15;r|=h|16}r===0&&(r=2147483647)}}else this._logService.getLevel()===Vo.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n,r),this._logService.getLevel()===Vo.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${qi.getForeground(r)}, fontStyle ${qi.getFontStyle(r).toString(2)}`)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};tk=aQ([zS(1,Ct),zS(2,Ht),zS(3,So)],tk);function g5(o,e,t){const i=o.data,n=o.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),r=[];let a=0,l=1,c=0;for(;ad&&i[5*C]===0;)C--;if(C-1===d){let w=h;for(;w+1x)e.warnOverlappingSemanticTokens(k,x+1);else{const F=e.getMetadata(I,O,t);F!==2147483647&&(f===0&&(f=k),u[g]=k-f,u[g+1]=x,u[g+2]=D,u[g+3]=F,g+=4,_=k,b=D)}l=k,c=x,a++}g!==u.length&&(u=u.subarray(0,g));const v=Dp.create(f,u);r.push(v)}return r}class lQ{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class Ia{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=Ia._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=Ia._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?t[0]:[]}function _5(o,e,t,i,n){return gc(this,void 0,void 0,function*(){const s=gQ(o,e),r=yield Promise.all(s.map(a=>gc(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?i:null,n)}catch(d){c=d,l=null}return(!l||!M1(l)&&!p5(l))&&(l=null),new uQ(a,l,c)})));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null})}function fQ(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:null}class pQ{constructor(e,t){this.provider=e,this.tokens=t}}function mQ(o,e){return o.has(e)}function b5(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:[]}function eN(o,e,t,i){return gc(this,void 0,void 0,function*(){const n=b5(o,e),s=yield Promise.all(n.map(r=>gc(this,void 0,void 0,function*(){let a;try{a=yield r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){Pi(l),a=null}return(!a||!M1(a))&&(a=null),new pQ(r,a)})));for(const r of s)if(r.tokens)return r;return s.length>0?s[0]:null})}Xe.registerCommand("_provideDocumentSemanticTokensLegend",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t]=e;pt(t instanceof _e);const i=o.get(Ut).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(de),s=fQ(n,i);return s?s[0].getLegend():o.get(ci).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));Xe.registerCommand("_provideDocumentSemanticTokens",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t]=e;pt(t instanceof _e);const i=o.get(Ut).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(de);if(!m5(n,i))return o.get(ci).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const s=yield _5(n,i,null,null,ze.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!M1(a))return;const l=f5({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l}));Xe.registerCommand("_provideDocumentRangeSemanticTokensLegend",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t,i]=e;pt(t instanceof _e);const n=o.get(Ut).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(de),r=b5(s,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!L.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=yield eN(s,n,L.lift(i),ze.None);if(!!a)return a.provider.getLegend()}));Xe.registerCommand("_provideDocumentRangeSemanticTokens",(o,...e)=>gc(void 0,void 0,void 0,function*(){const[t,i]=e;pt(t instanceof _e),pt(L.isIRange(i));const n=o.get(Ut).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(de),r=yield eN(s,n,L.lift(i),ze.None);if(!(!r||!r.tokens))return f5({id:0,type:"full",data:r.tokens.data})}));var tN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yn=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function bl(o){return o.toString()}function LM(o){const e=new YC,t=o.createSnapshot();let i;for(;i=t.read();)e.update(i);return e.digest()}class _Q{constructor(e,t,i){this._modelEventListeners=new Q,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageId)),this.model.setMode(e.languageId)}}const bQ=dn||Ge?1:2;class vQ{constructor(e,t,i,n,s,r,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=a,this.alternativeVersionId=l}}let iC=class Xf extends H{constructor(e,t,i,n,s,r,a,l,c){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new R),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new R),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new R),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new CQ(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new nk(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,c))}static _readModelOptions(e,t){var i;let n=sn.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const g=parseInt(e.editor.tabSize,10);isNaN(g)||(n=g),n<1&&(n=1)}let s=n;if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const g=parseInt(e.editor.indentSize,10);isNaN(g)||(s=g),s<1&&(s=1)}let r=sn.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(r=e.editor.insertSpaces==="false"?!1:Boolean(e.editor.insertSpaces));let a=bQ;const l=e.eol;l===`\r `?a=2:l===` `&&(a=1);let c=sn.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:Boolean(e.editor.trimAutoWhitespace));let d=sn.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(d=e.editor.detectIndentation==="false"?!1:Boolean(e.editor.detectIndentation));let h=sn.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(h=e.editor.largeFileOptimizations==="false"?!1:Boolean(e.editor.largeFileOptimizations));let u=sn.bracketPairColorizationOptions;return((i=e.editor)===null||i===void 0?void 0:i.bracketPairColorization)&&typeof e.editor.bracketPairColorization=="object"&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:r,detectIndentation:d,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:h,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:Os===3||Os===2?` `:`\r -`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=this._modelCreationOptionsByLanguageAndResource[e+t];if(!n){const s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),r=this._getEOL(t,e);n=Xf._readModelOptions({editor:s,eol:r},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let i=0,n=t.length;ie){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=new il(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(bl(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),h=LM(r)===c.sha1;if(h||c.sharesUndoRedoStack){for(const u of d.past)ka(u)&&u.matchesResource(i)&&u.setModel(r);for(const u of d.future)ka(u)&&u.matchesResource(i)&&u.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,u=>ka(u)&&u.matchesResource(i)),h&&(r._overwriteVersionId(c.versionId),r._overwriteAlternativeVersionId(c.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=bl(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new _Q(r,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageId,i,n),this.setMode(s.model,t)):s=this._createModelData(e,Ks,i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const i=this._models[bl(e.uri)];!i||i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||l.future.length>0){for(const c of l.past)ka(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)ka(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=Xf.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!n&&r>a){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>ka(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new vQ(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,LM(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);Xf._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}};iC.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;iC=tN([yn(0,ot),yn(1,VP),yn(2,Ct),yn(3,So),yn(4,D1),yn(5,Ht),yn(6,si),yn(7,no),yn(8,de)],iC);const iN="editor.semanticHighlighting";function ik(o,e,t){var i;const n=(i=t.getValue(iN,{overrideIdentifier:o.getLanguageId(),resource:o.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}let nk=class extends H{constructor(e,t,i,n,s,r){super(),this._watchers=Object.create(null),this._semanticStyling=e;const a=d=>{this._watchers[d.uri.toString()]=new wm(d,this._semanticStyling,i,s,r)},l=(d,h)=>{h.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(const d of t.getModels()){const h=this._watchers[d.uri.toString()];ik(d,i,n)?h||a(d):h&&l(d,h)}};this._register(t.onModelAdded(d=>{ik(d,i,n)&&a(d)})),this._register(t.onModelRemoved(d=>{const h=this._watchers[d.uri.toString()];h&&l(d,h)})),this._register(n.onDidChangeConfiguration(d=>{d.affectsConfiguration(iN)&&c()})),this._register(i.onDidColorThemeChange(c))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};nk=tN([yn(1,Ut),yn(2,Ct),yn(3,ot),yn(4,no),yn(5,de)],nk);class CQ extends H{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new tk(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class wQ{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let wm=class qc extends H{constructor(e,t,i,n,s){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=t,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:qc.REQUEST_MIN_DELAY,max:qc.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new mt(()=>this._fetchDocumentSemanticTokensNow(),qc.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const r=()=>{nt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};r(),this._register(this._provider.onDidChange(()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!mF(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}const e=new Qi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=_F(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const s=[],r=this._model.onDidChangeContent(l=>{s.push(l)}),a=new $n(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:c,tokens:d}=l,h=this._semanticStyling.get(c);this._setDocumentSemanticTokens(c,d||null,h,s)}},l=>{l&&(ea(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||Te(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),s.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(pF(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const u of t.edits)a+=(u.data?u.data.length:0)-u.deleteCount;const l=s.data,c=new Uint32Array(l.length+a);let d=l.length,h=c.length;for(let u=t.edits.length-1;u>=0;u--){const g=t.edits[u];if(g.start>l.length){i.warnInvalidEditStart(s.resultId,t.resultId,u,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const f=d-(g.start+g.deleteCount);f>0&&(qc._copy(l,d-f,c,h-f,f),h-=f),g.data&&(qc._copy(g.data,0,c,h-g.data.length,g.data.length),h-=g.data.length),d=g.start}d>0&&qc._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(M1(t)){this._currentDocumentResponse=new wQ(e,t.resultId,t.data);const a=gF(t,i,this._model.getLanguageId());if(n.length>0)for(const l of n)for(const c of a)for(const d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};wm.REQUEST_MIN_DELAY=300;wm.REQUEST_MAX_DELAY=2e3;wm=tN([yn(2,Ct),yn(3,no),yn(4,de)],wm);const SQ=new RegExp(`(\\\\)?\\$\\((${Ln.iconNameExpression}(?:${Ln.iconModifierExpression})?)\\)`,"g");function wd(o){const e=new Array;let t,i=0,n=0;for(;(t=SQ.exec(o))!==null;){n=t.index||0,e.push(o.substring(i,n)),i=(t.index||0)+t[0].length;const[,s,r]=t;e.push(s?`$(${r})`:yQ({id:r}))}return i{this._register(G(this._element,i,n=>{if(!this.enabled){ut.stop(n);return}this._onDidClick.fire(n)}))}),this._register(G(this._element,ae.KEY_DOWN,i=>{const n=new Rt(i);let s=!1;this.enabled&&(n.equals(3)||n.equals(10))?(this._onDidClick.fire(i),s=!0):n.equals(9)&&(this._element.blur(),s=!0),s&&ut.stop(n,!0)})),this._register(G(this._element,ae.MOUSE_OVER,i=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(G(this._element,ae.MOUSE_OUT,i=>{this.applyStyles()})),this.focusTracker=this._register(Od(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.setHoverBackground()})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.applyStyles()})),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?oc(this._element,...wd(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}const DQ={badgeBackground:W.fromHex("#4D4D4D"),badgeForeground:W.fromHex("#FFFFFF")};class sk{constructor(e,t){this.count=0,this.options=t||Object.create(null),Jr(this.options,DQ,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=q(e,J(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Vs(this.countFormat,this.count),this.element.title=Vs(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}const kM="done",xM="active",US="infinite",$S="infinite-long-running",IM="discrete",kQ={progressBarBackground:W.fromHex("#0E70C0")};class R1 extends H{constructor(e,t){super(),this.options=t||Object.create(null),Jr(this.options,kQ,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new mt(()=>bs(this.element),0)),this.longRunningScheduler=this._register(new mt(()=>this.infiniteLongRunning(),R1.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(xM,US,$S,IM),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(kM),this.element.classList.contains(US)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(IM,kM,$S),this.element.classList.add(xM,US),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add($S)}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}R1.LONG_RUNNING_INFINITE_THRESHOLD=1e4;class nN{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const vF=new nN("id#");const jS={},xQ=new nN("quick-input-button-icon-");function ok(o){if(!o)return;let e;const t=o.dark.toString();return jS[t]?e=jS[t]:(e=xQ.nextId(),nD(`.${e}, .hc-light .${e}`,`background-image: ${Pd(o.light||o.dark)}`),nD(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${Pd(o.dark)}`),jS[t]=e),e}const IQ={ctrlCmd:!1,alt:!1};var Sm;(function(o){o[o.Blur=1]="Blur",o[o.Gesture=2]="Gesture",o[o.Other=3]="Other"})(Sm||(Sm={}));var To;(function(o){o[o.NONE=0]="NONE",o[o.FIRST=1]="FIRST",o[o.SECOND=2]="SECOND",o[o.LAST=3]="LAST"})(To||(To={}));function EQ(o,e={}){const t=sN(e);return t.textContent=o,t}function CF(o,e={}){const t=sN(e);return wF(t,TQ(o,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function sN(o){const e=o.inline?"span":"div",t=document.createElement(e);return o.className&&(t.className=o.className),t}class NQ{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function wF(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(ki(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{wF(n,s,t,i)})}function TQ(o,e){const t={type:1,children:[]};let i=0,n=t;const s=[],r=new NQ(o);for(;!r.eos();){let a=r.next();const l=a==="\\"&&rk(r.peek(),e)!==0;if(l&&(a=r.next()),!l&&AQ(a,e)&&a===r.peek()){r.advance(),n.type===2&&(n=s.pop());const c=rk(a,e);if(n.type===c||n.type===5&&c===6)n=s.pop();else{const d={type:c,children:[]};c===5&&(d.index=i,i++),n.children.push(d),s.push(n),n=d}}else if(a===` -`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function AQ(o,e){return rk(o,e)!==0}function rk(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class MQ{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class RQ{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new MQ(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const Ef=J,OQ={inputBackground:W.fromHex("#3C3C3C"),inputForeground:W.fromHex("#CCCCCC"),inputValidationInfoBorder:W.fromHex("#55AAFF"),inputValidationInfoBackground:W.fromHex("#063B49"),inputValidationWarningBorder:W.fromHex("#B89500"),inputValidationWarningBackground:W.fromHex("#352A05"),inputValidationErrorBorder:W.fromHex("#BE1100"),inputValidationErrorBackground:W.fromHex("#5A1D1D")};class SF extends yo{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new R),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new R),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),Jr(this.options,OQ,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=q(e,Ef(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=q(this.element,Ef(".ibwrapper"));if(this.input=q(r,Ef(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=q(r,Ef("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new i5(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),q(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new bt(document,"selectionchange")),l=ge.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Zr(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:iD(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return co(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const i=parseFloat(this.mirror.style.paddingLeft||"")||0,n=parseFloat(this.mirror.style.paddingRight||"")||0;t=i+n}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=co(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=q(n,Ef(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?CF(this.message.content,s):EQ(this.message.content,s);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background?a.background.toString():"",r.style.color=a.foreground?a.foreground.toString():"",r.style.border=a.border?`1px solid ${a.border}`:"",q(e,r),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=p("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=p("alertWarningMessage","Warning: {0}",this.message.content):i=p("alertInfoMessage","Info: {0}",this.message.content),Gi(i),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText="\xA0",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=iD(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class yF extends SF{constructor(e,t,i){const n=p({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),s=` or \u21C5 ${n}`,r=` (\u21C5 ${n})`;super(e,t,i),this._onDidFocus=this._register(new R),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new R),this.onDidBlur=this._onDidBlur.event,this.history=new RQ(i.history,100);const a=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){const l=this.placeholder.endsWith(")")?s:r,c=this.placeholder+l;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=c:this.setPlaceHolder(c)}};this.observer=new MutationObserver((l,c)=>{l.forEach(d=>{d.target.textContent||a()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>a()),this.onblur(this.input,()=>{const l=c=>{if(this.placeholder.endsWith(c)){const d=this.placeholder.slice(0,this.placeholder.length-c.length);return i.showPlaceholderOnFocus?this.placeholder=d:this.setPlaceHolder(d),!0}else return!1};l(r)||l(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,dv(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,dv(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}const PQ=J;class FQ extends H{constructor(e){super(),this.parent=e,this.onKeyDown=t=>G(this.inputBox.inputElement,ae.KEY_DOWN,i=>{t(new Rt(i))}),this.onMouseDown=t=>G(this.inputBox.inputElement,ae.MOUSE_DOWN,i=>{t(new Mr(i))}),this.onDidChange=t=>this.inputBox.onDidChange(t),this.container=q(this.parent,PQ(".quick-input-box")),this.inputBox=this._register(new SF(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Bt.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Bt.Info?1:e===Bt.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Bt.Info?1:e===Bt.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class $d{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(i=t==null?void 0:t.supportIcons)!==null&&i!==void 0?i:!1,this.domNode=q(e,J("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=$d.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&$s(this.highlights,t))&&(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n=s===`\r -`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"\u23CE"})}}class KS{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class nC extends H{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new KS(q(e,J(".monaco-icon-label")))),this.labelContainer=q(this.domNode.element,J(".monaco-icon-label-container"));const i=q(this.labelContainer,J("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new KS(q(this.labelContainer,J("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new VQ(i,!!t.supportIcons):this.nameNode=new BQ(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new $d(q(this.descriptionContainer.element,J("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new KS(q(this.descriptionContainer.element,J("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof $d?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)AZ(e,t);else{const n=z5(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class BQ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=q(this.container,J("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:i,end:i+n.length},r=t.map(a=>en.intersect(s,a)).filter(a=>!en.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}class VQ{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new $d(q(this.container,J("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=WQ(e,i,t==null?void 0:t.matches);for(let s=0;s{const o=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});new $l(()=>({collator:new Intl.Collator(void 0,{numeric:!0})}));new $l(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function HQ(o,e,t=!1){const i=o||"",n=e||"",s=EM.value.collator.compare(i,n);return EM.value.collatorIsNumeric&&s===0&&i!==n?in.length)return 1}return 0}var LF=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$Q=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const br=J;class jQ{constructor(e){this.hidden=!1,this._onChecked=new R,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class C_{get templateId(){return C_.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=q(e,br(".quick-input-list-entry"));const i=q(t.entry,br("label.quick-input-list-label"));t.toDisposeTemplate.push(ki(i,ae.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=q(i,br("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(ki(t.checkbox,ae.CHANGE,c=>{t.element.checked=t.checkbox.checked}));const n=q(i,br(".quick-input-list-rows")),s=q(n,br(".quick-input-list-row")),r=q(n,br(".quick-input-list-row"));t.label=new nC(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=q(s,br(".quick-input-list-entry-keybinding"));t.keybinding=new oN(a,Os);const l=q(r,br(".quick-input-list-label-meta"));return t.detail=new nC(l,{supportHighlights:!0,supportIcons:!0}),t.separator=q(t.entry,br(".quick-input-list-separator")),t.actionBar=new Zr(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=nt(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(c=>i.checkbox.checked=c));const{labelHighlights:n,descriptionHighlights:s,detailHighlights:r}=e,a=Object.create(null);a.matches=n||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),e.saneDetail&&i.detail.setLabel(e.saneDetail,void 0,{matches:r,title:e.saneDetail}),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((c,d)=>{let h=c.iconClass||(c.iconPath?ok(c.iconPath):void 0);c.alwaysVisible&&(h=h?`${h} always-visible`:"always-visible");const u=new is(`id-${d}`,"",h,!0,()=>$Q(this,void 0,void 0,function*(){e.fireButtonTriggered({button:c,item:e.item})}));return u.tooltip=c.tooltip||"",u}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=nt(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=nt(e.toDisposeElement),e.toDisposeTemplate=nt(e.toDisposeTemplate)}}C_.ID="listelement";class KQ{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return C_.ID}}var oi;(function(o){o[o.First=1]="First",o[o.Second=2]="Second",o[o.Last=3]="Last",o[o.Next=4]="Next",o[o.Previous=5]="Previous",o[o.NextPage=6]="NextPage",o[o.PreviousPage=7]="PreviousPage"})(oi||(oi={}));class rN{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new R,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new R,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new R,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new R,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new R,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new R,this.onKeyDown=this._onKeyDown.event,this._onLeave=new R,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=q(this.parent,br(".quick-input-list"));const n=new KQ,s=new ZQ;this.list=i.createList("QuickInput",this.container,n,[new C_],{identityProvider:{getId:r=>r.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(r=>{const a=new Rt(r);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(Ge?r.metaKey:r.ctrlKey)&&this.list.setFocus(Cn(this.list.length));break;case 16:{const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break}case 18:{const l=this.list.getFocus();l.length===1&&l[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(a)})),this.disposables.push(this.list.onMouseDown(r=>{r.browserEvent.button!==2&&r.browserEvent.preventDefault()})),this.disposables.push(G(this.container,ae.CLICK,r=>{(r.x||r.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(r=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(r=>{typeof r.index=="number"&&(r.browserEvent.preventDefault(),this.list.setSelection([r.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ge.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return ge.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=nt(this.elementDisposables);const t=i=>this.fireButtonTriggered(i);this.inputElements=e,this.elements=e.reduce((i,n,s)=>{var r,a,l;if(n.type!=="separator"){const c=s&&e[s-1],d=n.label&&n.label.replace(/\r?\n/g," "),h=Wh(d).text.trim(),u=n.meta&&n.meta.replace(/\r?\n/g," "),g=n.description&&n.description.replace(/\r?\n/g," "),f=n.detail&&n.detail.replace(/\r?\n/g," "),_=n.ariaLabel||[d,g,f].map(v=>bB(v)).filter(v=>!!v).join(", "),b=this.parent.classList.contains("show-checkboxes");i.push(new jQ({hasCheckbox:b,index:s,item:n,saneLabel:d,saneSortLabel:h,saneMeta:u,saneAriaLabel:_,saneDescription:g,saneDetail:f,labelHighlights:(r=n.highlights)===null||r===void 0?void 0:r.label,descriptionHighlights:(a=n.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=n.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:c&&c.type==="separator"?c:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===oi.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=oi.First),e===oi.Previous&&this.list.getFocus()[0]===0&&(e=oi.Last),e===oi.Second&&this.list.length<2&&(e=oi.First),e){case oi.First:this.list.focusFirst();break;case oi.Second:this.list.focusNth(1);break;case oi.Last:this.list.focusLast();break;case oi.Next:this.list.focusNext();break;case oi.Previous:this.list.focusPrevious();break;case oi.NextPage:this.list.focusNextPage();break;case oi.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const s=n.index&&this.inputElements[n.index-1];n.separator=s&&s.type==="separator"?s:void 0});else{let n;this.elements.forEach(s=>{let r;this.matchOnLabelMode==="fuzzy"?r=this.matchOnLabel?Wn(Db(e,Wh(s.saneLabel))):void 0:r=this.matchOnLabel?Wn(qQ(t,Wh(s.saneLabel))):void 0;const a=this.matchOnDescription?Wn(Db(e,Wh(s.saneDescription||""))):void 0,l=this.matchOnDetail?Wn(Db(e,Wh(s.saneDetail||""))):void 0,c=this.matchOnMeta?Wn(Db(e,Wh(s.saneMeta||""))):void 0;if(r||a||l||c?(s.labelHighlights=r,s.descriptionHighlights=a,s.detailHighlights=l,s.hidden=!1):(s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=!s.item.alwaysShow),s.separator=void 0,!this.sortByLabel){const d=s.index&&this.inputElements[s.index-1];n=d&&d.type==="separator"?d:n,n&&!s.hidden&&(s.separator=n,n=void 0)}})}const i=this.elements.filter(n=>!n.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();i.sort((s,r)=>GQ(s,r,n))}return this.elementsToIndexes=i.reduce((n,s,r)=>(n.set(s.item,r),n),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=nt(this.elementDisposables),this.disposables=nt(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}LF([pi],rN.prototype,"onDidChangeFocus",null);LF([pi],rN.prototype,"onDidChangeSelection",null);function qQ(o,e){const{text:t,iconOffsets:i}=e;if(!i||i.length===0)return NM(o,t);const n=WC(t," "),s=t.length-n.length,r=NM(o,n);if(r)for(const a of r){const l=i[a.start+s]+s;a.start+=l,a.end+=l}return r}function NM(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t!==-1?[{start:t,end:t+o.length}]:null}function GQ(o,e,t){const i=o.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:zQ(o.saneSortLabel,e.saneSortLabel,t)}class ZQ{getWidgetAriaLabel(){return p("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!!e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var TM=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const ds=J,ak={iconClass:m.quickInputBack.classNames,tooltip:p("quickInput.back","Back"),handle:-1};class O1 extends H{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=O1.noPromptMessage,this._severity=Bt.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new R),this.onDidHideEmitter=this._register(new R),this.onDisposeEmitter=this._register(new R),this.visibleDisposables=this._register(new Q),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Ur;this._ignoreFocusOut=e&&!Ur,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){!this.visible||this.ui.hide()}didHide(e=Sm.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new xs,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const n=this.buttons.filter(r=>r===ak);this.ui.leftActionBar.push(n.map((r,a)=>{const l=new is(`id-${a}`,"",r.iconClass||ok(r.iconPath),!0,()=>TM(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const s=this.buttons.filter(r=>r!==ak);this.ui.rightActionBar.push(s.map((r,a)=>{const l=new is(`id-${a}`,"",r.iconClass||ok(r.iconPath),!0,()=>TM(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,oc(this.ui.message,...wd(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?p("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Bt.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}O1.noPromptMessage=p("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class ym extends O1{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new R),this.onWillAcceptEmitter=this._register(new R),this.onDidAcceptEmitter=this._register(new R),this.onDidCustomEmitter=this._register(new R),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?To.NONE:To.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new R),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new R),this.onDidTriggerItemButtonEmitter=this._register(new R),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?IQ:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(oi.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(oi.Next),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(oi.Previous):this.ui.list.focus(oi.Last),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 12:this.ui.list.focus(oi.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 11:this.ui.list.focus(oi.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(oi.First),ut.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(oi.Last),ut.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Ss(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Ss(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&Ss(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return G(this.ui.container,ae.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Rt(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const[a,l]=r.getParts();return l?!1:a.shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&i===6||a.ctrlKey&&i===5||a.metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(n||(n=this.placeholder||ym.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case To.NONE:this._itemActivation=To.FIRST;break;case To.SECOND:this.ui.list.focus(oi.Second),this._itemActivation=To.FIRST;break;case To.LAST:this.ui.list.focus(oi.Last),this._itemActivation=To.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(oi.First)),this.keepScrollPosition&&(this.scrollTop=e)}}ym.DEFAULT_ARIA_LABEL=p("quickInputBox.ariaLabel","Type to narrow down results.");class P1 extends H{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new R),this.onDidCustomEmitter=this._register(new R),this.onDidTriggerButtonEmitter=this._register(new R),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new R),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new R),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(G(window,ae.KEY_DOWN,e,!0)),this._register(G(window,ae.KEY_UP,e,!0)),this._register(G(window,ae.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=q(this.parentElement,ds(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Qs(e),i=q(e,ds(".quick-input-titlebar")),n=this._register(new Zr(i));n.domNode.classList.add("quick-input-left-action-bar");const s=q(i,ds(".quick-input-title")),r=this._register(new Zr(i));r.domNode.classList.add("quick-input-right-action-bar");const a=q(e,ds(".quick-input-description")),l=q(e,ds(".quick-input-header")),c=q(l,ds("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",p("quickInput.checkAll","Toggle all checkboxes")),this._register(ki(c,ae.CHANGE,O=>{const F=c.checked;y.setAllVisibleChecked(F)})),this._register(G(c,ae.CLICK,O=>{(O.x||O.y)&&g.setFocus()}));const d=q(l,ds(".quick-input-description")),h=q(l,ds(".quick-input-and-message")),u=q(h,ds(".quick-input-filter")),g=this._register(new FQ(u));g.setAttribute("aria-describedby",`${this.idPrefix}message`);const f=q(u,ds(".quick-input-visible-count"));f.setAttribute("aria-live","polite"),f.setAttribute("aria-atomic","true");const _=new sk(f,{countFormat:p({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),b=q(u,ds(".quick-input-count"));b.setAttribute("aria-live","polite");const v=new sk(b,{countFormat:p({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),C=q(l,ds(".quick-input-action")),w=new DM(C);w.label=p("ok","OK"),this._register(w.onDidClick(O=>{this.onDidAcceptEmitter.fire()}));const S=q(l,ds(".quick-input-action")),k=new DM(S);k.label=p("custom","Custom"),this._register(k.onDidClick(O=>{this.onDidCustomEmitter.fire()}));const x=q(h,ds(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new rN(e,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked(O=>{c.checked=O})),this._register(y.onChangedVisibleCount(O=>{_.setCount(O)})),this._register(y.onChangedCheckedCount(O=>{v.setCount(O)})),this._register(y.onLeave(()=>{setTimeout(()=>{g.setFocus(),this.controller instanceof ym&&this.controller.canSelectMany&&y.clearFocus()},0)})),this._register(y.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const D=new R1(e);D.getContainer().classList.add("quick-input-progress");const I=Od(e);return this._register(I),this._register(G(e,ae.FOCUS,O=>{this.previousFocusElement=O.relatedTarget instanceof HTMLElement?O.relatedTarget:void 0},!0)),this._register(I.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Sm.Blur),this.previousFocusElement=void 0})),this._register(G(e,ae.FOCUS,O=>{g.setFocus()})),this._register(G(e,ae.KEY_DOWN,O=>{const F=new Rt(O);switch(F.keyCode){case 3:ut.stop(O,!0),this.onDidAcceptEmitter.fire();break;case 9:ut.stop(O,!0),this.hide(Sm.Gesture);break;case 2:if(!F.altKey&&!F.ctrlKey&&!F.metaKey){const z=[".action-label.codicon"];e.classList.contains("show-checkboxes")?z.push("input"):z.push("input[type=text]"),this.getUI().list.isDisplayed()&&z.push(".monaco-list");const j=e.querySelectorAll(z.join(", "));F.shiftKey&&F.target===j[0]?(ut.stop(O,!0),j[j.length-1].focus()):!F.shiftKey&&F.target===j[j.length-1]&&(ut.stop(O,!0),j[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:s,description1:a,description2:d,rightActionBar:r,checkAll:c,filterContainer:u,inputBox:g,visibleCountContainer:f,visibleCount:_,countContainer:b,count:v,okContainer:C,ok:w,message:x,customButtonContainer:S,customButton:k,list:y,progressBar:D,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:O=>this.show(O),hide:()=>this.hide(),setVisibilities:O=>this.setVisibilities(O),setComboboxAccessibility:O=>this.setComboboxAccessibility(O),setEnabled:O=>this.setEnabled(O),setContextKey:O=>this.options.setContextKey(O)},this.updateStyles(),this.ui}pick(e,t={},i=ze.None){return new Promise((n,s)=>{let r=d=>{var h;r=n,(h=t.onKeyMods)===null||h===void 0||h.call(t,a.keyMods),n(d)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick();let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const d=a.activeItems[0];d&&(r(d),a.hide())}}),a.onDidChangeActive(d=>{const h=d[0];h&&t.onDidFocus&&t.onDidFocus(h)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){const h=d[0];h&&(r(h),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},d),{removeItem:()=>{const h=a.items.indexOf(d.item);if(h!==-1){const u=a.items.slice(),g=u.splice(h,1),f=a.activeItems.filter(b=>b!==g[0]),_=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=u,f&&(a.activeItems=f),a.keepScrollPosition=_}}}))),a.onDidChangeValue(d=>{l&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{nt(c),r(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,h])=>{l=h,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(u=>u.type!=="separator"&&u.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,d=>{s(d),a.hide()})})}createQuickPick(){const e=this.getUI();return new ym(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Bt.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),oc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();ak.tooltip=n?p("quickInput.backWithKeybinding","Back ({0})",n):p("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(!((t=this.ui)===null||t===void 0)&&t.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!n){let s=this.previousFocusElement;for(;s&&!s.offsetParent;)s=Wn(s.parentElement);s!=null&&s.offsetParent?(s.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,P1.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const a=r.join(` -`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}P1.MAX_WIDTH=600;class YQ{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class Vh extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function AM(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.ende.concat(t),[]))}class MM{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,s=AM({start:0,end:e},this.groups),r=AM({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:lk(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=XQ(s,a,r),this._size=this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const s=n.range.end-n.range.start,r=i+s*n.size;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var xc=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const gr={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class w_{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class tX{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class iX{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class Lo{constructor(e,t,i,n=gr){var s,r,a,l,c,d,h,u,g,f;if(this.virtualDelegate=t,this.domId=`list_id_${++Lo.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Kr(50),this.splicing=!1,this.dragOverAnimationStopDisposable=H.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=H.None,this.onDragLeaveTimeout=H.None,this.disposables=new Q,this._onDidChangeContentHeight=new R,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new MM;for(const b of i)this.renderers.set(b.templateId,b);this.cache=this.disposables.add(new eX(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=(s=n.horizontalScrolling)!==null&&s!==void 0?s:gr.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof n.additionalScrollHeight>"u"?0:n.additionalScrollHeight,this.accessibilityProvider=new sX(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((r=n.transformOptimization)!==null&&r!==void 0?r:gr.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(ft.addTarget(this.rowsContainer)),this.scrollable=new f_({forceIntegerValues:!0,smoothScrollDuration:(a=n.smoothScrolling)!==null&&a!==void 0&&a?125:0,scheduleAtNextAnimationFrame:b=>Jo(b)}),this.scrollableElement=this.disposables.add(new pE(this.rowsContainer,{alwaysConsumeMouseWheel:(l=n.alwaysConsumeMouseWheel)!==null&&l!==void 0?l:gr.alwaysConsumeMouseWheel,horizontal:1,vertical:(c=n.verticalScrollMode)!==null&&c!==void 0?c:gr.verticalScrollMode,useShadows:(d=n.useShadows)!==null&&d!==void 0?d:gr.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(G(this.rowsContainer,xt.Change,b=>this.onTouchChange(b))),this.disposables.add(G(this.scrollableElement.getDomNode(),"scroll",b=>b.target.scrollTop=0)),this.disposables.add(G(this.domNode,"dragover",b=>this.onDragOver(this.toDragEvent(b)))),this.disposables.add(G(this.domNode,"drop",b=>this.onDrop(this.toDragEvent(b)))),this.disposables.add(G(this.domNode,"dragleave",b=>this.onDragLeave(this.toDragEvent(b)))),this.disposables.add(G(this.domNode,"dragend",b=>this.onDragEnd(b))),this.setRowLineHeight=(h=n.setRowLineHeight)!==null&&h!==void 0?h:gr.setRowLineHeight,this.setRowHeight=(u=n.setRowHeight)!==null&&u!==void 0?u:gr.setRowHeight,this.supportDynamicHeights=(g=n.supportDynamicHeights)!==null&&g!==void 0?g:gr.supportDynamicHeights,this.dnd=(f=n.dnd)!==null&&f!==void 0?f:gr.dnd,this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:oS(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){e.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling),e.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=en.intersect(n,s),a=new Map;for(let x=r.end-1;x>=r.start;x--){const y=this.items[x];if(y.dragStartDisposable.dispose(),y.checkedDisposable.dispose(),y.row){let D=a.get(y.templateId);D||(D=[],a.set(y.templateId,D));const I=this.renderers.get(y.templateId);I&&I.disposeElement&&I.disposeElement(y.element,x,y.row.templateData,y.size),D.push(y.row)}y.row=null}const l={start:e+t,end:this.items.length},c=en.intersect(l,n),d=en.relativeComplement(l,n),h=i.map(x=>({id:String(this.itemId++),element:x,templateId:this.virtualDelegate.getTemplateId(x),size:this.virtualDelegate.getHeight(x),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(x),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:H.None,checkedDisposable:H.None}));let u;e===0&&t>=this.items.length?(this.rangeMap=new MM,this.rangeMap.splice(0,0,h),u=this.items,this.items=h):(this.rangeMap.splice(e,t,h),u=this.items.splice(e,t,...h));const g=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=lk(c,g),b=en.intersect(f,_);for(let x=b.start;xlk(x,g)),S=[{start:e,end:e+i.length},...C].map(x=>en.intersect(f,x)),k=this.getNextToLastElement(S);for(const x of S)for(let y=x.start;yx.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Jo(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10})}rerender(){if(!!this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:typeof e=="number"?e:qH(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:oS(this.domNode)})}render(e,t,i,n,s,r=!1){const a=this.getRenderRange(t,i),l=en.relativeComplement(a,e),c=en.relativeComplement(e,a),d=this.getNextToLastElement(l);if(r){const h=en.intersect(e,a);for(let u=h.start;un.row.domNode.setAttribute("aria-checked",String(!!d));c(r.value),n.checkedDisposable=r.onDidChange(c)}n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);a==null||a.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=G(n.row.domNode,"dragstart",c=>this.onDragStart(n.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Ls?"-moz-fit-content":"fit-content",e.width=oS(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return ge.map(this.disposables.add(new bt(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return ge.map(this.disposables.add(new bt(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return ge.filter(ge.map(this.disposables.add(new bt(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return ge.map(this.disposables.add(new bt(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return ge.map(this.disposables.add(new bt(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return ge.any(ge.map(this.disposables.add(new bt(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),ge.map(this.disposables.add(new bt(this.domNode,xt.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return ge.map(this.disposables.add(new bt(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return ge.map(this.disposables.add(new bt(this.rowsContainer,xt.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,s;if(!i.dataTransfer)return;const r=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(__.TEXT,t),i.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(r,i)),typeof a>"u"&&(a=String(r.length));const l=J(".monaco-drag-image");l.textContent=a,document.body.appendChild(l),i.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>document.body.removeChild(l),0)}this.currentDragData=new w_(r),Vc.CurrentDragAndDropData=new tX(r),(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Vc.CurrentDragAndDropData&&Vc.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Vc.CurrentDragAndDropData)this.currentDragData=Vc.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new iX}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof i=="boolean"?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof i!="boolean"&&i.effect===0?"copy":"move";let n;if(typeof i!="boolean"&&i.feedback?n=i.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=Qa(n).filter(s=>s>=-1&&ss-r),n=n[0]===-1?[-1]:n,nX(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Be(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const s of n){const r=this.items[s];r.dropTarget=!0,(t=r.row)===null||t===void 0||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Be(()=>{var s;for(const r of n){const a=this.items[r];a.dropTarget=!1,(s=a.row)===null||s===void 0||s.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Ad(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((i=(t=this.dnd).onDragLeave)===null||i===void 0||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Vc.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Vc.CurrentDragAndDropData=void 0,(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=H.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=s4(this.domNode).top;this.dragOverAnimationDisposable=ez(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Ad(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,r;e===this.elementTop(n.start)?(s=n.start,r=0):n.end-n.start>1&&(s=n.start+1,r=this.elementTop(s)-e);let a=0;for(;;){const l=this.getRenderRange(e,t);let c=!1;for(let d=l.start;d=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RM=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class oX{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}class sC{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new R,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new oX(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,r=e+t,a=[...this.sortedIndexes.filter(c=>cc?d+e:-1).filter(c=>c!==-1),...this.sortedIndexes.filter(c=>c>=r).map(c=>c+s)],l=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&l>0){const c=(n=this.sortedIndexes.find(d=>d>=e))!==null&&n!==void 0?n:l-1;a.push(Math.min(c,l-1))}this.renderer.splice(e,t,i.length),this._set(a,a),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(PM),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=ck(s,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return aI(this.sortedIndexes,e,PM)>=0}dispose(){nt(this._onChange)}}wh([pi],sC.prototype,"renderer",null);class rX extends sC{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class qS{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map(()=>!1));const n=this.trait.get().map(r=>this.identityProvider.getId(this.view.element(r)).toString()),s=i.map(r=>n.indexOf(this.identityProvider.getId(r).toString())>-1);this.trait.splice(e,t,s)}}function jd(o){return o.tagName==="INPUT"||o.tagName==="TEXTAREA"}function yu(o){return o.classList.contains("monaco-editor")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:yu(o.parentElement)}function DF(o){return o.tagName==="A"&&o.classList.contains("monaco-button")||o.tagName==="DIV"&&o.classList.contains("monaco-button-dropdown")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:DF(o.parentElement)}class kF{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new Q,this.multipleSelectionDisposables=new Q,this.onKeyDown.filter(n=>n.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===9).on(this.onEscape,this,this.disposables),i.multipleSelectionSupport!==!1&&this.onKeyDown.filter(n=>(Ge?n.metaKey:n.ctrlKey)&&n.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return this.disposables.add(ge.chain(this.disposables.add(new bt(this.view.domNode,"keydown")).event).filter(e=>!jd(e.target)).map(e=>new Rt(e)))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter(t=>(Ge?t.metaKey:t.ctrlKey)&&t.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Cn(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}wh([pi],kF.prototype,"onKeyDown",null);var Yl;(function(o){o[o.Automatic=0]="Automatic",o[o.Trigger=1]="Trigger"})(Yl||(Yl={}));var Lu;(function(o){o[o.Idle=0]="Idle",o[o.Typing=1]="Typing"})(Lu||(Lu={}));const aX=new class{mightProducePrintableCharacter(o){return o.ctrlKey||o.metaKey||o.altKey?!1:o.keyCode>=31&&o.keyCode<=56||o.keyCode>=21&&o.keyCode<=30||o.keyCode>=93&&o.keyCode<=102||o.keyCode>=80&&o.keyCode<=90}};class lX{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=Lu.Idle,this.mode=Yl.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Q,this.disposables=new Q,this.updateOptions(e.options)}updateOptions(e){var t,i;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(i=e.typeNavigationMode)!==null&&i!==void 0?i:Yl.Automatic}enable(){if(this.enabled)return;let e=!1;const t=this.enabledDisposables.add(ge.chain(this.enabledDisposables.add(new bt(this.view.domNode,"keydown")).event)).filter(s=>!jd(s.target)).filter(()=>this.mode===Yl.Automatic||this.triggered).map(s=>new Rt(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(ND).map(s=>s.browserEvent.key).event,i=ge.debounce(t,()=>null,800,void 0,void 0,this.enabledDisposables);ge.reduce(ge.any(t,i),(s,r)=>r===null?null:(s||"")+r,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Gi(i)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Lu.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Lu.Idle?1:0;this.state=Lu.Typing;for(let s=0;s"u"||x1(e,l)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class cX{constructor(e,t){this.list=e,this.view=t,this.disposables=new Q,this.disposables.add(ge.chain(this.disposables.add(new bt(t.domNode,"keydown")).event)).filter(n=>!jd(n.target)).map(n=>new Rt(n)).filter(n=>n.keyCode===2&&!n.ctrlKey&&!n.metaKey&&!n.shiftKey&&!n.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=window.getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function xF(o){return Ge?o.browserEvent.metaKey:o.browserEvent.ctrlKey}function IF(o){return o.browserEvent.shiftKey}function dX(o){return o instanceof MouseEvent&&o.button===2}const OM={isSelectionSingleChangeEvent:xF,isSelectionRangeChangeEvent:IF};class EF{constructor(e){this.list=e,this.disposables=new Q,this._onPointer=new R,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||OM),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ft.addTarget(e.getHTMLElement()))),ge.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||OM))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){yu(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(yu(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||jd(e.browserEvent.target)||yu(e.browserEvent.target))return;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(e))return this.changeSelection(e);if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),dX(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(jd(e.browserEvent.target)||yu(e.browserEvent.target)||this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof i>"u"){const d=this.list.getFocus()[0];i=d!=null?d:t,this.list.setAnchor(i)}const n=Math.min(i,t),s=Math.max(i,t),r=Cn(n,s+1),a=this.list.getSelection(),l=gX(ck(a,[i]),i);if(l.length===0)return;const c=ck(r,fX(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(r=>r!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class NF{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):Ge||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionOutline&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { outline-color: ${e.listFocusAndSelectionOutline} !important; }`),e.listFocusAndSelectionBackground&&i.push(` +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=this._modelCreationOptionsByLanguageAndResource[e+t];if(!n){const s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),r=this._getEOL(t,e);n=Xf._readModelOptions({editor:s,eol:r},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let i=0,n=t.length;ie){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=new il(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(bl(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),h=LM(r)===c.sha1;if(h||c.sharesUndoRedoStack){for(const u of d.past)ka(u)&&u.matchesResource(i)&&u.setModel(r);for(const u of d.future)ka(u)&&u.matchesResource(i)&&u.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,u=>ka(u)&&u.matchesResource(i)),h&&(r._overwriteVersionId(c.versionId),r._overwriteAlternativeVersionId(c.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=bl(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new _Q(r,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageId,i,n),this.setMode(s.model,t)):s=this._createModelData(e,Ks,i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const i=this._models[bl(e.uri)];!i||i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||l.future.length>0){for(const c of l.past)ka(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)ka(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=Xf.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!n&&r>a){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>ka(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new vQ(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,LM(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);Xf._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}};iC.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;iC=tN([yn(0,ot),yn(1,VP),yn(2,Ct),yn(3,So),yn(4,D1),yn(5,Ht),yn(6,si),yn(7,no),yn(8,de)],iC);const iN="editor.semanticHighlighting";function ik(o,e,t){var i;const n=(i=t.getValue(iN,{overrideIdentifier:o.getLanguageId(),resource:o.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}let nk=class extends H{constructor(e,t,i,n,s,r){super(),this._watchers=Object.create(null),this._semanticStyling=e;const a=d=>{this._watchers[d.uri.toString()]=new wm(d,this._semanticStyling,i,s,r)},l=(d,h)=>{h.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(const d of t.getModels()){const h=this._watchers[d.uri.toString()];ik(d,i,n)?h||a(d):h&&l(d,h)}};this._register(t.onModelAdded(d=>{ik(d,i,n)&&a(d)})),this._register(t.onModelRemoved(d=>{const h=this._watchers[d.uri.toString()];h&&l(d,h)})),this._register(n.onDidChangeConfiguration(d=>{d.affectsConfiguration(iN)&&c()})),this._register(i.onDidColorThemeChange(c))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};nk=tN([yn(1,Ut),yn(2,Ct),yn(3,ot),yn(4,no),yn(5,de)],nk);class CQ extends H{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new tk(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class wQ{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let wm=class qc extends H{constructor(e,t,i,n,s){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=t,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:qc.REQUEST_MIN_DELAY,max:qc.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new mt(()=>this._fetchDocumentSemanticTokensNow(),qc.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const r=()=>{nt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};r(),this._register(this._provider.onDidChange(()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!m5(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}const e=new Qi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=_5(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const s=[],r=this._model.onDidChangeContent(l=>{s.push(l)}),a=new $n(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:c,tokens:d}=l,h=this._semanticStyling.get(c);this._setDocumentSemanticTokens(c,d||null,h,s)}},l=>{l&&(ea(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||Te(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),s.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(p5(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const u of t.edits)a+=(u.data?u.data.length:0)-u.deleteCount;const l=s.data,c=new Uint32Array(l.length+a);let d=l.length,h=c.length;for(let u=t.edits.length-1;u>=0;u--){const g=t.edits[u];if(g.start>l.length){i.warnInvalidEditStart(s.resultId,t.resultId,u,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const f=d-(g.start+g.deleteCount);f>0&&(qc._copy(l,d-f,c,h-f,f),h-=f),g.data&&(qc._copy(g.data,0,c,h-g.data.length,g.data.length),h-=g.data.length),d=g.start}d>0&&qc._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(M1(t)){this._currentDocumentResponse=new wQ(e,t.resultId,t.data);const a=g5(t,i,this._model.getLanguageId());if(n.length>0)for(const l of n)for(const c of a)for(const d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};wm.REQUEST_MIN_DELAY=300;wm.REQUEST_MAX_DELAY=2e3;wm=tN([yn(2,Ct),yn(3,no),yn(4,de)],wm);const SQ=new RegExp(`(\\\\)?\\$\\((${Ln.iconNameExpression}(?:${Ln.iconModifierExpression})?)\\)`,"g");function wd(o){const e=new Array;let t,i=0,n=0;for(;(t=SQ.exec(o))!==null;){n=t.index||0,e.push(o.substring(i,n)),i=(t.index||0)+t[0].length;const[,s,r]=t;e.push(s?`$(${r})`:yQ({id:r}))}return i{this._register(G(this._element,i,n=>{if(!this.enabled){ut.stop(n);return}this._onDidClick.fire(n)}))}),this._register(G(this._element,ae.KEY_DOWN,i=>{const n=new Rt(i);let s=!1;this.enabled&&(n.equals(3)||n.equals(10))?(this._onDidClick.fire(i),s=!0):n.equals(9)&&(this._element.blur(),s=!0),s&&ut.stop(n,!0)})),this._register(G(this._element,ae.MOUSE_OVER,i=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(G(this._element,ae.MOUSE_OUT,i=>{this.applyStyles()})),this.focusTracker=this._register(Od(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.setHoverBackground()})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.applyStyles()})),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?oc(this._element,...wd(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}const DQ={badgeBackground:W.fromHex("#4D4D4D"),badgeForeground:W.fromHex("#FFFFFF")};class sk{constructor(e,t){this.count=0,this.options=t||Object.create(null),Jr(this.options,DQ,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=q(e,J(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Vs(this.countFormat,this.count),this.element.title=Vs(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}const kM="done",xM="active",US="infinite",$S="infinite-long-running",IM="discrete",kQ={progressBarBackground:W.fromHex("#0E70C0")};class R1 extends H{constructor(e,t){super(),this.options=t||Object.create(null),Jr(this.options,kQ,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new mt(()=>bs(this.element),0)),this.longRunningScheduler=this._register(new mt(()=>this.infiniteLongRunning(),R1.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(xM,US,$S,IM),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(kM),this.element.classList.contains(US)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(IM,kM,$S),this.element.classList.add(xM,US),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add($S)}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}R1.LONG_RUNNING_INFINITE_THRESHOLD=1e4;class nN{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const v5=new nN("id#");const jS={},xQ=new nN("quick-input-button-icon-");function ok(o){if(!o)return;let e;const t=o.dark.toString();return jS[t]?e=jS[t]:(e=xQ.nextId(),nD(`.${e}, .hc-light .${e}`,`background-image: ${Pd(o.light||o.dark)}`),nD(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${Pd(o.dark)}`),jS[t]=e),e}const IQ={ctrlCmd:!1,alt:!1};var Sm;(function(o){o[o.Blur=1]="Blur",o[o.Gesture=2]="Gesture",o[o.Other=3]="Other"})(Sm||(Sm={}));var To;(function(o){o[o.NONE=0]="NONE",o[o.FIRST=1]="FIRST",o[o.SECOND=2]="SECOND",o[o.LAST=3]="LAST"})(To||(To={}));function EQ(o,e={}){const t=sN(e);return t.textContent=o,t}function C5(o,e={}){const t=sN(e);return w5(t,TQ(o,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function sN(o){const e=o.inline?"span":"div",t=document.createElement(e);return o.className&&(t.className=o.className),t}class NQ{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function w5(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(ki(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{w5(n,s,t,i)})}function TQ(o,e){const t={type:1,children:[]};let i=0,n=t;const s=[],r=new NQ(o);for(;!r.eos();){let a=r.next();const l=a==="\\"&&rk(r.peek(),e)!==0;if(l&&(a=r.next()),!l&&AQ(a,e)&&a===r.peek()){r.advance(),n.type===2&&(n=s.pop());const c=rk(a,e);if(n.type===c||n.type===5&&c===6)n=s.pop();else{const d={type:c,children:[]};c===5&&(d.index=i,i++),n.children.push(d),s.push(n),n=d}}else if(a===` +`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function AQ(o,e){return rk(o,e)!==0}function rk(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class MQ{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class RQ{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new MQ(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const Ef=J,OQ={inputBackground:W.fromHex("#3C3C3C"),inputForeground:W.fromHex("#CCCCCC"),inputValidationInfoBorder:W.fromHex("#55AAFF"),inputValidationInfoBackground:W.fromHex("#063B49"),inputValidationWarningBorder:W.fromHex("#B89500"),inputValidationWarningBackground:W.fromHex("#352A05"),inputValidationErrorBorder:W.fromHex("#BE1100"),inputValidationErrorBackground:W.fromHex("#5A1D1D")};class S5 extends yo{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new R),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new R),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),Jr(this.options,OQ,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=q(e,Ef(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=q(this.element,Ef(".ibwrapper"));if(this.input=q(r,Ef(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=q(r,Ef("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new iF(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),q(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new bt(document,"selectionchange")),l=ge.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Zr(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:iD(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return co(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const i=parseFloat(this.mirror.style.paddingLeft||"")||0,n=parseFloat(this.mirror.style.paddingRight||"")||0;t=i+n}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=co(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=q(n,Ef(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?C5(this.message.content,s):EQ(this.message.content,s);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background?a.background.toString():"",r.style.color=a.foreground?a.foreground.toString():"",r.style.border=a.border?`1px solid ${a.border}`:"",q(e,r),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=p("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=p("alertWarningMessage","Warning: {0}",this.message.content):i=p("alertInfoMessage","Info: {0}",this.message.content),Gi(i),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText="\xA0",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=iD(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class y5 extends S5{constructor(e,t,i){const n=p({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),s=` or \u21C5 ${n}`,r=` (\u21C5 ${n})`;super(e,t,i),this._onDidFocus=this._register(new R),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new R),this.onDidBlur=this._onDidBlur.event,this.history=new RQ(i.history,100);const a=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){const l=this.placeholder.endsWith(")")?s:r,c=this.placeholder+l;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=c:this.setPlaceHolder(c)}};this.observer=new MutationObserver((l,c)=>{l.forEach(d=>{d.target.textContent||a()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>a()),this.onblur(this.input,()=>{const l=c=>{if(this.placeholder.endsWith(c)){const d=this.placeholder.slice(0,this.placeholder.length-c.length);return i.showPlaceholderOnFocus?this.placeholder=d:this.setPlaceHolder(d),!0}else return!1};l(r)||l(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,dv(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,dv(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}const PQ=J;class FQ extends H{constructor(e){super(),this.parent=e,this.onKeyDown=t=>G(this.inputBox.inputElement,ae.KEY_DOWN,i=>{t(new Rt(i))}),this.onMouseDown=t=>G(this.inputBox.inputElement,ae.MOUSE_DOWN,i=>{t(new Mr(i))}),this.onDidChange=t=>this.inputBox.onDidChange(t),this.container=q(this.parent,PQ(".quick-input-box")),this.inputBox=this._register(new S5(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Bt.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Bt.Info?1:e===Bt.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Bt.Info?1:e===Bt.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class $d{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(i=t==null?void 0:t.supportIcons)!==null&&i!==void 0?i:!1,this.domNode=q(e,J("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=$d.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&$s(this.highlights,t))&&(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n=s===`\r +`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"\u23CE"})}}class KS{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class nC extends H{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new KS(q(e,J(".monaco-icon-label")))),this.labelContainer=q(this.domNode.element,J(".monaco-icon-label-container"));const i=q(this.labelContainer,J("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new KS(q(this.labelContainer,J("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new VQ(i,!!t.supportIcons):this.nameNode=new BQ(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new $d(q(this.descriptionContainer.element,J("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new KS(q(this.descriptionContainer.element,J("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof $d?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)AZ(e,t);else{const n=zF(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class BQ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=q(this.container,J("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:i,end:i+n.length},r=t.map(a=>en.intersect(s,a)).filter(a=>!en.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}class VQ{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new $d(q(this.container,J("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=WQ(e,i,t==null?void 0:t.matches);for(let s=0;s{const o=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});new $l(()=>({collator:new Intl.Collator(void 0,{numeric:!0})}));new $l(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function HQ(o,e,t=!1){const i=o||"",n=e||"",s=EM.value.collator.compare(i,n);return EM.value.collatorIsNumeric&&s===0&&i!==n?in.length)return 1}return 0}var L5=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$Q=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const br=J;class jQ{constructor(e){this.hidden=!1,this._onChecked=new R,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class C_{get templateId(){return C_.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=q(e,br(".quick-input-list-entry"));const i=q(t.entry,br("label.quick-input-list-label"));t.toDisposeTemplate.push(ki(i,ae.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=q(i,br("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(ki(t.checkbox,ae.CHANGE,c=>{t.element.checked=t.checkbox.checked}));const n=q(i,br(".quick-input-list-rows")),s=q(n,br(".quick-input-list-row")),r=q(n,br(".quick-input-list-row"));t.label=new nC(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=q(s,br(".quick-input-list-entry-keybinding"));t.keybinding=new oN(a,Os);const l=q(r,br(".quick-input-list-label-meta"));return t.detail=new nC(l,{supportHighlights:!0,supportIcons:!0}),t.separator=q(t.entry,br(".quick-input-list-separator")),t.actionBar=new Zr(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=nt(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(c=>i.checkbox.checked=c));const{labelHighlights:n,descriptionHighlights:s,detailHighlights:r}=e,a=Object.create(null);a.matches=n||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),e.saneDetail&&i.detail.setLabel(e.saneDetail,void 0,{matches:r,title:e.saneDetail}),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((c,d)=>{let h=c.iconClass||(c.iconPath?ok(c.iconPath):void 0);c.alwaysVisible&&(h=h?`${h} always-visible`:"always-visible");const u=new is(`id-${d}`,"",h,!0,()=>$Q(this,void 0,void 0,function*(){e.fireButtonTriggered({button:c,item:e.item})}));return u.tooltip=c.tooltip||"",u}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=nt(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=nt(e.toDisposeElement),e.toDisposeTemplate=nt(e.toDisposeTemplate)}}C_.ID="listelement";class KQ{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return C_.ID}}var oi;(function(o){o[o.First=1]="First",o[o.Second=2]="Second",o[o.Last=3]="Last",o[o.Next=4]="Next",o[o.Previous=5]="Previous",o[o.NextPage=6]="NextPage",o[o.PreviousPage=7]="PreviousPage"})(oi||(oi={}));class rN{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new R,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new R,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new R,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new R,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new R,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new R,this.onKeyDown=this._onKeyDown.event,this._onLeave=new R,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=q(this.parent,br(".quick-input-list"));const n=new KQ,s=new ZQ;this.list=i.createList("QuickInput",this.container,n,[new C_],{identityProvider:{getId:r=>r.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(r=>{const a=new Rt(r);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(Ge?r.metaKey:r.ctrlKey)&&this.list.setFocus(Cn(this.list.length));break;case 16:{const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break}case 18:{const l=this.list.getFocus();l.length===1&&l[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(a)})),this.disposables.push(this.list.onMouseDown(r=>{r.browserEvent.button!==2&&r.browserEvent.preventDefault()})),this.disposables.push(G(this.container,ae.CLICK,r=>{(r.x||r.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(r=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(r=>{typeof r.index=="number"&&(r.browserEvent.preventDefault(),this.list.setSelection([r.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ge.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return ge.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=nt(this.elementDisposables);const t=i=>this.fireButtonTriggered(i);this.inputElements=e,this.elements=e.reduce((i,n,s)=>{var r,a,l;if(n.type!=="separator"){const c=s&&e[s-1],d=n.label&&n.label.replace(/\r?\n/g," "),h=Wh(d).text.trim(),u=n.meta&&n.meta.replace(/\r?\n/g," "),g=n.description&&n.description.replace(/\r?\n/g," "),f=n.detail&&n.detail.replace(/\r?\n/g," "),_=n.ariaLabel||[d,g,f].map(v=>bB(v)).filter(v=>!!v).join(", "),b=this.parent.classList.contains("show-checkboxes");i.push(new jQ({hasCheckbox:b,index:s,item:n,saneLabel:d,saneSortLabel:h,saneMeta:u,saneAriaLabel:_,saneDescription:g,saneDetail:f,labelHighlights:(r=n.highlights)===null||r===void 0?void 0:r.label,descriptionHighlights:(a=n.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=n.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:c&&c.type==="separator"?c:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===oi.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=oi.First),e===oi.Previous&&this.list.getFocus()[0]===0&&(e=oi.Last),e===oi.Second&&this.list.length<2&&(e=oi.First),e){case oi.First:this.list.focusFirst();break;case oi.Second:this.list.focusNth(1);break;case oi.Last:this.list.focusLast();break;case oi.Next:this.list.focusNext();break;case oi.Previous:this.list.focusPrevious();break;case oi.NextPage:this.list.focusNextPage();break;case oi.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const s=n.index&&this.inputElements[n.index-1];n.separator=s&&s.type==="separator"?s:void 0});else{let n;this.elements.forEach(s=>{let r;this.matchOnLabelMode==="fuzzy"?r=this.matchOnLabel?Wn(Db(e,Wh(s.saneLabel))):void 0:r=this.matchOnLabel?Wn(qQ(t,Wh(s.saneLabel))):void 0;const a=this.matchOnDescription?Wn(Db(e,Wh(s.saneDescription||""))):void 0,l=this.matchOnDetail?Wn(Db(e,Wh(s.saneDetail||""))):void 0,c=this.matchOnMeta?Wn(Db(e,Wh(s.saneMeta||""))):void 0;if(r||a||l||c?(s.labelHighlights=r,s.descriptionHighlights=a,s.detailHighlights=l,s.hidden=!1):(s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=!s.item.alwaysShow),s.separator=void 0,!this.sortByLabel){const d=s.index&&this.inputElements[s.index-1];n=d&&d.type==="separator"?d:n,n&&!s.hidden&&(s.separator=n,n=void 0)}})}const i=this.elements.filter(n=>!n.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();i.sort((s,r)=>GQ(s,r,n))}return this.elementsToIndexes=i.reduce((n,s,r)=>(n.set(s.item,r),n),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=nt(this.elementDisposables),this.disposables=nt(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}L5([pi],rN.prototype,"onDidChangeFocus",null);L5([pi],rN.prototype,"onDidChangeSelection",null);function qQ(o,e){const{text:t,iconOffsets:i}=e;if(!i||i.length===0)return NM(o,t);const n=WC(t," "),s=t.length-n.length,r=NM(o,n);if(r)for(const a of r){const l=i[a.start+s]+s;a.start+=l,a.end+=l}return r}function NM(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t!==-1?[{start:t,end:t+o.length}]:null}function GQ(o,e,t){const i=o.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:zQ(o.saneSortLabel,e.saneSortLabel,t)}class ZQ{getWidgetAriaLabel(){return p("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!!e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var TM=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const ds=J,ak={iconClass:m.quickInputBack.classNames,tooltip:p("quickInput.back","Back"),handle:-1};class O1 extends H{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=O1.noPromptMessage,this._severity=Bt.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new R),this.onDidHideEmitter=this._register(new R),this.onDisposeEmitter=this._register(new R),this.visibleDisposables=this._register(new Q),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Ur;this._ignoreFocusOut=e&&!Ur,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){!this.visible||this.ui.hide()}didHide(e=Sm.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new xs,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const n=this.buttons.filter(r=>r===ak);this.ui.leftActionBar.push(n.map((r,a)=>{const l=new is(`id-${a}`,"",r.iconClass||ok(r.iconPath),!0,()=>TM(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const s=this.buttons.filter(r=>r!==ak);this.ui.rightActionBar.push(s.map((r,a)=>{const l=new is(`id-${a}`,"",r.iconClass||ok(r.iconPath),!0,()=>TM(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,oc(this.ui.message,...wd(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?p("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Bt.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}O1.noPromptMessage=p("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class ym extends O1{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new R),this.onWillAcceptEmitter=this._register(new R),this.onDidAcceptEmitter=this._register(new R),this.onDidCustomEmitter=this._register(new R),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?To.NONE:To.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new R),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new R),this.onDidTriggerItemButtonEmitter=this._register(new R),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?IQ:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(oi.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(oi.Next),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(oi.Previous):this.ui.list.focus(oi.Last),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 12:this.ui.list.focus(oi.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 11:this.ui.list.focus(oi.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ut.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(oi.First),ut.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(oi.Last),ut.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Ss(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Ss(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&Ss(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return G(this.ui.container,ae.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Rt(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const[a,l]=r.getParts();return l?!1:a.shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&i===6||a.ctrlKey&&i===5||a.metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(n||(n=this.placeholder||ym.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case To.NONE:this._itemActivation=To.FIRST;break;case To.SECOND:this.ui.list.focus(oi.Second),this._itemActivation=To.FIRST;break;case To.LAST:this.ui.list.focus(oi.Last),this._itemActivation=To.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(oi.First)),this.keepScrollPosition&&(this.scrollTop=e)}}ym.DEFAULT_ARIA_LABEL=p("quickInputBox.ariaLabel","Type to narrow down results.");class P1 extends H{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new R),this.onDidCustomEmitter=this._register(new R),this.onDidTriggerButtonEmitter=this._register(new R),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new R),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new R),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(G(window,ae.KEY_DOWN,e,!0)),this._register(G(window,ae.KEY_UP,e,!0)),this._register(G(window,ae.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=q(this.parentElement,ds(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Qs(e),i=q(e,ds(".quick-input-titlebar")),n=this._register(new Zr(i));n.domNode.classList.add("quick-input-left-action-bar");const s=q(i,ds(".quick-input-title")),r=this._register(new Zr(i));r.domNode.classList.add("quick-input-right-action-bar");const a=q(e,ds(".quick-input-description")),l=q(e,ds(".quick-input-header")),c=q(l,ds("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",p("quickInput.checkAll","Toggle all checkboxes")),this._register(ki(c,ae.CHANGE,O=>{const F=c.checked;y.setAllVisibleChecked(F)})),this._register(G(c,ae.CLICK,O=>{(O.x||O.y)&&g.setFocus()}));const d=q(l,ds(".quick-input-description")),h=q(l,ds(".quick-input-and-message")),u=q(h,ds(".quick-input-filter")),g=this._register(new FQ(u));g.setAttribute("aria-describedby",`${this.idPrefix}message`);const f=q(u,ds(".quick-input-visible-count"));f.setAttribute("aria-live","polite"),f.setAttribute("aria-atomic","true");const _=new sk(f,{countFormat:p({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),b=q(u,ds(".quick-input-count"));b.setAttribute("aria-live","polite");const v=new sk(b,{countFormat:p({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),C=q(l,ds(".quick-input-action")),w=new DM(C);w.label=p("ok","OK"),this._register(w.onDidClick(O=>{this.onDidAcceptEmitter.fire()}));const S=q(l,ds(".quick-input-action")),k=new DM(S);k.label=p("custom","Custom"),this._register(k.onDidClick(O=>{this.onDidCustomEmitter.fire()}));const x=q(h,ds(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new rN(e,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked(O=>{c.checked=O})),this._register(y.onChangedVisibleCount(O=>{_.setCount(O)})),this._register(y.onChangedCheckedCount(O=>{v.setCount(O)})),this._register(y.onLeave(()=>{setTimeout(()=>{g.setFocus(),this.controller instanceof ym&&this.controller.canSelectMany&&y.clearFocus()},0)})),this._register(y.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const D=new R1(e);D.getContainer().classList.add("quick-input-progress");const I=Od(e);return this._register(I),this._register(G(e,ae.FOCUS,O=>{this.previousFocusElement=O.relatedTarget instanceof HTMLElement?O.relatedTarget:void 0},!0)),this._register(I.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Sm.Blur),this.previousFocusElement=void 0})),this._register(G(e,ae.FOCUS,O=>{g.setFocus()})),this._register(G(e,ae.KEY_DOWN,O=>{const F=new Rt(O);switch(F.keyCode){case 3:ut.stop(O,!0),this.onDidAcceptEmitter.fire();break;case 9:ut.stop(O,!0),this.hide(Sm.Gesture);break;case 2:if(!F.altKey&&!F.ctrlKey&&!F.metaKey){const z=[".action-label.codicon"];e.classList.contains("show-checkboxes")?z.push("input"):z.push("input[type=text]"),this.getUI().list.isDisplayed()&&z.push(".monaco-list");const j=e.querySelectorAll(z.join(", "));F.shiftKey&&F.target===j[0]?(ut.stop(O,!0),j[j.length-1].focus()):!F.shiftKey&&F.target===j[j.length-1]&&(ut.stop(O,!0),j[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:s,description1:a,description2:d,rightActionBar:r,checkAll:c,filterContainer:u,inputBox:g,visibleCountContainer:f,visibleCount:_,countContainer:b,count:v,okContainer:C,ok:w,message:x,customButtonContainer:S,customButton:k,list:y,progressBar:D,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:O=>this.show(O),hide:()=>this.hide(),setVisibilities:O=>this.setVisibilities(O),setComboboxAccessibility:O=>this.setComboboxAccessibility(O),setEnabled:O=>this.setEnabled(O),setContextKey:O=>this.options.setContextKey(O)},this.updateStyles(),this.ui}pick(e,t={},i=ze.None){return new Promise((n,s)=>{let r=d=>{var h;r=n,(h=t.onKeyMods)===null||h===void 0||h.call(t,a.keyMods),n(d)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick();let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const d=a.activeItems[0];d&&(r(d),a.hide())}}),a.onDidChangeActive(d=>{const h=d[0];h&&t.onDidFocus&&t.onDidFocus(h)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){const h=d[0];h&&(r(h),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},d),{removeItem:()=>{const h=a.items.indexOf(d.item);if(h!==-1){const u=a.items.slice(),g=u.splice(h,1),f=a.activeItems.filter(b=>b!==g[0]),_=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=u,f&&(a.activeItems=f),a.keepScrollPosition=_}}}))),a.onDidChangeValue(d=>{l&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{nt(c),r(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,h])=>{l=h,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(u=>u.type!=="separator"&&u.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,d=>{s(d),a.hide()})})}createQuickPick(){const e=this.getUI();return new ym(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Bt.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),oc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();ak.tooltip=n?p("quickInput.backWithKeybinding","Back ({0})",n):p("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(!((t=this.ui)===null||t===void 0)&&t.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!n){let s=this.previousFocusElement;for(;s&&!s.offsetParent;)s=Wn(s.parentElement);s!=null&&s.offsetParent?(s.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,P1.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const a=r.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}P1.MAX_WIDTH=600;class YQ{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class Vh extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function AM(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.ende.concat(t),[]))}class MM{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,s=AM({start:0,end:e},this.groups),r=AM({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:lk(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=XQ(s,a,r),this._size=this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const s=n.range.end-n.range.start,r=i+s*n.size;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var xc=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const gr={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class w_{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class tX{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class iX{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class Lo{constructor(e,t,i,n=gr){var s,r,a,l,c,d,h,u,g,f;if(this.virtualDelegate=t,this.domId=`list_id_${++Lo.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Kr(50),this.splicing=!1,this.dragOverAnimationStopDisposable=H.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=H.None,this.onDragLeaveTimeout=H.None,this.disposables=new Q,this._onDidChangeContentHeight=new R,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new MM;for(const b of i)this.renderers.set(b.templateId,b);this.cache=this.disposables.add(new eX(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=(s=n.horizontalScrolling)!==null&&s!==void 0?s:gr.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof n.additionalScrollHeight>"u"?0:n.additionalScrollHeight,this.accessibilityProvider=new sX(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((r=n.transformOptimization)!==null&&r!==void 0?r:gr.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(ft.addTarget(this.rowsContainer)),this.scrollable=new f_({forceIntegerValues:!0,smoothScrollDuration:(a=n.smoothScrolling)!==null&&a!==void 0&&a?125:0,scheduleAtNextAnimationFrame:b=>Jo(b)}),this.scrollableElement=this.disposables.add(new pE(this.rowsContainer,{alwaysConsumeMouseWheel:(l=n.alwaysConsumeMouseWheel)!==null&&l!==void 0?l:gr.alwaysConsumeMouseWheel,horizontal:1,vertical:(c=n.verticalScrollMode)!==null&&c!==void 0?c:gr.verticalScrollMode,useShadows:(d=n.useShadows)!==null&&d!==void 0?d:gr.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(G(this.rowsContainer,xt.Change,b=>this.onTouchChange(b))),this.disposables.add(G(this.scrollableElement.getDomNode(),"scroll",b=>b.target.scrollTop=0)),this.disposables.add(G(this.domNode,"dragover",b=>this.onDragOver(this.toDragEvent(b)))),this.disposables.add(G(this.domNode,"drop",b=>this.onDrop(this.toDragEvent(b)))),this.disposables.add(G(this.domNode,"dragleave",b=>this.onDragLeave(this.toDragEvent(b)))),this.disposables.add(G(this.domNode,"dragend",b=>this.onDragEnd(b))),this.setRowLineHeight=(h=n.setRowLineHeight)!==null&&h!==void 0?h:gr.setRowLineHeight,this.setRowHeight=(u=n.setRowHeight)!==null&&u!==void 0?u:gr.setRowHeight,this.supportDynamicHeights=(g=n.supportDynamicHeights)!==null&&g!==void 0?g:gr.supportDynamicHeights,this.dnd=(f=n.dnd)!==null&&f!==void 0?f:gr.dnd,this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:oS(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){e.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling),e.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=en.intersect(n,s),a=new Map;for(let x=r.end-1;x>=r.start;x--){const y=this.items[x];if(y.dragStartDisposable.dispose(),y.checkedDisposable.dispose(),y.row){let D=a.get(y.templateId);D||(D=[],a.set(y.templateId,D));const I=this.renderers.get(y.templateId);I&&I.disposeElement&&I.disposeElement(y.element,x,y.row.templateData,y.size),D.push(y.row)}y.row=null}const l={start:e+t,end:this.items.length},c=en.intersect(l,n),d=en.relativeComplement(l,n),h=i.map(x=>({id:String(this.itemId++),element:x,templateId:this.virtualDelegate.getTemplateId(x),size:this.virtualDelegate.getHeight(x),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(x),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:H.None,checkedDisposable:H.None}));let u;e===0&&t>=this.items.length?(this.rangeMap=new MM,this.rangeMap.splice(0,0,h),u=this.items,this.items=h):(this.rangeMap.splice(e,t,h),u=this.items.splice(e,t,...h));const g=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=lk(c,g),b=en.intersect(f,_);for(let x=b.start;xlk(x,g)),S=[{start:e,end:e+i.length},...C].map(x=>en.intersect(f,x)),k=this.getNextToLastElement(S);for(const x of S)for(let y=x.start;yx.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Jo(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10})}rerender(){if(!!this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:typeof e=="number"?e:qH(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:oS(this.domNode)})}render(e,t,i,n,s,r=!1){const a=this.getRenderRange(t,i),l=en.relativeComplement(a,e),c=en.relativeComplement(e,a),d=this.getNextToLastElement(l);if(r){const h=en.intersect(e,a);for(let u=h.start;un.row.domNode.setAttribute("aria-checked",String(!!d));c(r.value),n.checkedDisposable=r.onDidChange(c)}n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);a==null||a.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=G(n.row.domNode,"dragstart",c=>this.onDragStart(n.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Ls?"-moz-fit-content":"fit-content",e.width=oS(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return ge.map(this.disposables.add(new bt(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return ge.map(this.disposables.add(new bt(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return ge.filter(ge.map(this.disposables.add(new bt(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return ge.map(this.disposables.add(new bt(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return ge.map(this.disposables.add(new bt(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return ge.any(ge.map(this.disposables.add(new bt(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),ge.map(this.disposables.add(new bt(this.domNode,xt.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return ge.map(this.disposables.add(new bt(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return ge.map(this.disposables.add(new bt(this.rowsContainer,xt.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,s;if(!i.dataTransfer)return;const r=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(__.TEXT,t),i.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(r,i)),typeof a>"u"&&(a=String(r.length));const l=J(".monaco-drag-image");l.textContent=a,document.body.appendChild(l),i.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>document.body.removeChild(l),0)}this.currentDragData=new w_(r),Vc.CurrentDragAndDropData=new tX(r),(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Vc.CurrentDragAndDropData&&Vc.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Vc.CurrentDragAndDropData)this.currentDragData=Vc.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new iX}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof i=="boolean"?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof i!="boolean"&&i.effect===0?"copy":"move";let n;if(typeof i!="boolean"&&i.feedback?n=i.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=Qa(n).filter(s=>s>=-1&&ss-r),n=n[0]===-1?[-1]:n,nX(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Be(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const s of n){const r=this.items[s];r.dropTarget=!0,(t=r.row)===null||t===void 0||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Be(()=>{var s;for(const r of n){const a=this.items[r];a.dropTarget=!1,(s=a.row)===null||s===void 0||s.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Ad(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((i=(t=this.dnd).onDragLeave)===null||i===void 0||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Vc.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Vc.CurrentDragAndDropData=void 0,(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=H.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=s4(this.domNode).top;this.dragOverAnimationDisposable=ez(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Ad(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,r;e===this.elementTop(n.start)?(s=n.start,r=0):n.end-n.start>1&&(s=n.start+1,r=this.elementTop(s)-e);let a=0;for(;;){const l=this.getRenderRange(e,t);let c=!1;for(let d=l.start;d=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RM=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class oX{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}class sC{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new R,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new oX(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,r=e+t,a=[...this.sortedIndexes.filter(c=>cc?d+e:-1).filter(c=>c!==-1),...this.sortedIndexes.filter(c=>c>=r).map(c=>c+s)],l=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&l>0){const c=(n=this.sortedIndexes.find(d=>d>=e))!==null&&n!==void 0?n:l-1;a.push(Math.min(c,l-1))}this.renderer.splice(e,t,i.length),this._set(a,a),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(PM),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=ck(s,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return aI(this.sortedIndexes,e,PM)>=0}dispose(){nt(this._onChange)}}wh([pi],sC.prototype,"renderer",null);class rX extends sC{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class qS{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map(()=>!1));const n=this.trait.get().map(r=>this.identityProvider.getId(this.view.element(r)).toString()),s=i.map(r=>n.indexOf(this.identityProvider.getId(r).toString())>-1);this.trait.splice(e,t,s)}}function jd(o){return o.tagName==="INPUT"||o.tagName==="TEXTAREA"}function yu(o){return o.classList.contains("monaco-editor")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:yu(o.parentElement)}function D5(o){return o.tagName==="A"&&o.classList.contains("monaco-button")||o.tagName==="DIV"&&o.classList.contains("monaco-button-dropdown")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:D5(o.parentElement)}class k5{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new Q,this.multipleSelectionDisposables=new Q,this.onKeyDown.filter(n=>n.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===9).on(this.onEscape,this,this.disposables),i.multipleSelectionSupport!==!1&&this.onKeyDown.filter(n=>(Ge?n.metaKey:n.ctrlKey)&&n.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return this.disposables.add(ge.chain(this.disposables.add(new bt(this.view.domNode,"keydown")).event).filter(e=>!jd(e.target)).map(e=>new Rt(e)))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter(t=>(Ge?t.metaKey:t.ctrlKey)&&t.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Cn(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}wh([pi],k5.prototype,"onKeyDown",null);var Yl;(function(o){o[o.Automatic=0]="Automatic",o[o.Trigger=1]="Trigger"})(Yl||(Yl={}));var Lu;(function(o){o[o.Idle=0]="Idle",o[o.Typing=1]="Typing"})(Lu||(Lu={}));const aX=new class{mightProducePrintableCharacter(o){return o.ctrlKey||o.metaKey||o.altKey?!1:o.keyCode>=31&&o.keyCode<=56||o.keyCode>=21&&o.keyCode<=30||o.keyCode>=93&&o.keyCode<=102||o.keyCode>=80&&o.keyCode<=90}};class lX{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=Lu.Idle,this.mode=Yl.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Q,this.disposables=new Q,this.updateOptions(e.options)}updateOptions(e){var t,i;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(i=e.typeNavigationMode)!==null&&i!==void 0?i:Yl.Automatic}enable(){if(this.enabled)return;let e=!1;const t=this.enabledDisposables.add(ge.chain(this.enabledDisposables.add(new bt(this.view.domNode,"keydown")).event)).filter(s=>!jd(s.target)).filter(()=>this.mode===Yl.Automatic||this.triggered).map(s=>new Rt(s)).filter(s=>e||this.keyboardNavigationEventFilter(s)).filter(s=>this.delegate.mightProducePrintableCharacter(s)).forEach(ND).map(s=>s.browserEvent.key).event,i=ge.debounce(t,()=>null,800,void 0,void 0,this.enabledDisposables);ge.reduce(ge.any(t,i),(s,r)=>r===null?null:(s||"")+r,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Gi(i)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Lu.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Lu.Idle?1:0;this.state=Lu.Typing;for(let s=0;s"u"||x1(e,l)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class cX{constructor(e,t){this.list=e,this.view=t,this.disposables=new Q,this.disposables.add(ge.chain(this.disposables.add(new bt(t.domNode,"keydown")).event)).filter(n=>!jd(n.target)).map(n=>new Rt(n)).filter(n=>n.keyCode===2&&!n.ctrlKey&&!n.metaKey&&!n.shiftKey&&!n.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=window.getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function x5(o){return Ge?o.browserEvent.metaKey:o.browserEvent.ctrlKey}function I5(o){return o.browserEvent.shiftKey}function dX(o){return o instanceof MouseEvent&&o.button===2}const OM={isSelectionSingleChangeEvent:x5,isSelectionRangeChangeEvent:I5};class E5{constructor(e){this.list=e,this.disposables=new Q,this._onPointer=new R,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||OM),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ft.addTarget(e.getHTMLElement()))),ge.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||OM))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){yu(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(yu(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||jd(e.browserEvent.target)||yu(e.browserEvent.target))return;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(e))return this.changeSelection(e);if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),dX(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(jd(e.browserEvent.target)||yu(e.browserEvent.target)||this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof i>"u"){const d=this.list.getFocus()[0];i=d!=null?d:t,this.list.setAnchor(i)}const n=Math.min(i,t),s=Math.max(i,t),r=Cn(n,s+1),a=this.list.getSelection(),l=gX(ck(a,[i]),i);if(l.length===0)return;const c=ck(r,fX(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(r=>r!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class N5{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):Ge||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionOutline&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { outline-color: ${e.listFocusAndSelectionOutline} !important; }`),e.listFocusAndSelectionBackground&&i.push(` .monaco-drag-image, .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } `),e.listFocusAndSelectionForeground&&i.push(` @@ -582,15 +582,15 @@ ${CM(m.menuSubmenu)} background-color: ${e.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=i.join(` -`)}}const hX={listFocusBackground:W.fromHex("#7FB0D0"),listActiveSelectionBackground:W.fromHex("#0E639C"),listActiveSelectionForeground:W.fromHex("#FFFFFF"),listActiveSelectionIconForeground:W.fromHex("#FFFFFF"),listFocusAndSelectionOutline:W.fromHex("#90C2F9"),listFocusAndSelectionBackground:W.fromHex("#094771"),listFocusAndSelectionForeground:W.fromHex("#FFFFFF"),listInactiveSelectionBackground:W.fromHex("#3F3F46"),listInactiveSelectionIconForeground:W.fromHex("#FFFFFF"),listHoverBackground:W.fromHex("#2A2D2E"),listDropBackground:W.fromHex("#383B3D"),treeIndentGuidesStroke:W.fromHex("#a9a9a9"),tableColumnsBorder:W.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:W.fromHex("#cccccc").transparent(.04)},uX={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function gX(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]o-e;class pX{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let r=0;for(const a of this.renderers)(s=a.disposeElement)===null||s===void 0||s.call(a,e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class mX{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class _X{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,r;(r=(s=this.dnd).onDragLeave)===null||r===void 0||r.call(s,e,t,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class rr{constructor(e,t,i,n,s=uX){var r,a,l,c;this.user=e,this._options=s,this.focus=new sC("focused"),this.anchor=new sC("anchor"),this.eventBufferer=new gI,this._ariaLabel="",this.disposables=new Q,this._onDidDispose=new R,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new rX(d!=="listbox"),Jr(s,hX,!1);const h=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(h.push(new mX(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(g=>new pX(g.templateId,[...h,g]));const u=Object.assign(Object.assign({},s),{dnd:s.dnd&&new _X(this,s.dnd)});if(this.view=new Lo(t,i,n,u),this.view.domNode.setAttribute("role",d),s.styleController)this.styleController=s.styleController(this.view.domId);else{const g=Qs(this.view.domNode);this.styleController=new NF(g,this.view.domId)}if(this.spliceable=new YQ([new qS(this.focus,this.view,s.identityProvider),new qS(this.selection,this.view,s.identityProvider),new qS(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new cX(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new kF(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const g=s.keyboardNavigationDelegate||aX;this.typeNavigationController=new lX(this,this.view,s.keyboardNavigationLabelProvider,(c=s.keyboardNavigationEventFilter)!==null&&c!==void 0?c:()=>!0,g),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return ge.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return ge.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=this.disposables.add(ge.chain(this.disposables.add(new bt(this.view.domNode,"keydown")).event)).map(s=>new Rt(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(ND).filter(()=>!1).event,i=this.disposables.add(ge.chain(this.disposables.add(new bt(this.view.domNode,"keyup")).event)).forEach(()=>e=!1).map(s=>new Rt(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(ND).map(({browserEvent:s})=>{const r=this.getFocus(),a=r.length?r[0]:void 0,l=typeof a<"u"?this.view.element(a):void 0,c=typeof a<"u"?this.view.domElement(a):this.view.domNode;return{index:a,element:l,anchor:c,browserEvent:s}}).event,n=this.disposables.add(ge.chain(this.view.onContextMenu)).filter(s=>!e).map(({element:s,index:r,browserEvent:a})=>({element:s,index:r,anchor:{x:a.pageX+1,y:a.pageY},browserEvent:a})).event;return ge.any(t,i,n)}get onKeyDown(){return this.disposables.add(new bt(this.view.domNode,"keydown")).event}get onDidFocus(){return ge.signal(this.disposables.add(new bt(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new EF(this)}updateOptions(e={}){var t,i;this._options=Object.assign(Object.assign({},this._options),e),(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(i=this.keyboardController)===null||i===void 0||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new Vh(this.user,`Invalid start index: ${e}`);if(t<0)throw new Vh(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new Vh(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new Vh(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return VO(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new Vh(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}focusNextPage(e,t){return RM(this,void 0,void 0,function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.getFocus()[0];if(n!==i&&(n===void 0||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let r=s+this.view.renderHeight;i>n&&(r-=this.view.elementHeight(i)),this.view.setScrollTop(r),this.view.getScrollTop()!==s&&(this.setFocus([]),yield sc(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return RM(this,void 0,void 0,function*(){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.getFocus()[0];if(s!==i&&(s===void 0||s>=i)){const r=this.findNextIndex(i,!1,t);r>-1&&s!==r?this.setFocus([r],e):this.setFocus([i],e)}else{const r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&(this.setFocus([]),yield sc(0),yield this.focusPreviousPage(e,t))}})}focusLast(e,t){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(this.length===0)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new Vh(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(tc(t)){const r=s-this.view.renderHeight;this.view.setScrollTop(r*Zn(t,0,1)+n)}else{const r=n+s,a=i+this.view.renderHeight;n=a||(n=a&&s>=this.view.renderHeight?this.view.setScrollTop(n):r>=a&&this.view.setScrollTop(r-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}wh([pi],rr.prototype,"onDidChangeFocus",null);wh([pi],rr.prototype,"onDidChangeSelection",null);wh([pi],rr.prototype,"onContextMenu",null);wh([pi],rr.prototype,"onKeyDown",null);wh([pi],rr.prototype,"onDidFocus",null);class bX{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:H.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const r=new Qi,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(l=>this.renderer.renderElement(l,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class vX{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function CX(o,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new vX(o,e.accessibilityProvider)})}class wX{constructor(e,t,i,n,s={}){const r=()=>this.model,a=n.map(l=>new bX(l,r));this.list=new rr(e,t,i,a,CX(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ge.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return ge.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return ge.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Cn(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}const SX={separatorBorder:W.transparent};class TF{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var i,n;e!==this.visible&&(e?(this.size=Zn(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e),(n=(i=this.view).setVisible)===null||n===void 0||n.call(i,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class yX extends TF{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class LX extends TF{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var Sa;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(Sa||(Sa={}));var oC;(function(o){o.Distribute={type:"distribute"};function e(i){return{type:"split",index:i}}o.Split=e;function t(i){return{type:"invisible",cachedVisibleSize:i}}o.Invisible=t})(oC||(oC={}));class AF extends H{constructor(e,t={}){var i,n,s,r,a;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Sa.Idle,this._onDidSashChange=this._register(new R),this._onDidSashReset=this._register(new R),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(i=t.orientation)!==null&&i!==void 0?i:0,this.inverseAltBehavior=(n=t.inverseAltBehavior)!==null&&n!==void 0?n:!1,this.proportionalLayout=(s=t.proportionalLayout)!==null&&s!==void 0?s:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=q(this.el,J(".sash-container")),this.viewContainer=J(".split-view-container"),this.scrollable=new f_({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:Jo}),this.scrollableElement=this._register(new pE(this.viewContainer,{vertical:this.orientation===0?(r=t.scrollbarVisibility)!==null&&r!==void 0?r:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(l=>{this.viewContainer.scrollTop=l.scrollTop,this.viewContainer.scrollLeft=l.scrollLeft})),q(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||SX),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((l,c)=>{const d=Xn(l.visible)||l.visible?l.size:{type:"invisible",cachedVisibleSize:l.size},h=l.view;this.doAddView(h,d,c,!0)}),this.contentSize=this.viewItems.reduce((l,c)=>l+c.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let n=0;nthis.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=qo(G(document.body,"keydown",a=>r(this.sashDragState.current,a.altKey)),G(document.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(a,l)=>{const c=this.viewItems.map(f=>f.size);let d=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){const _=this.viewItems[n];d=(_.minimumSize-_.size)/2,h=(_.maximumSize-_.size)/2}else{const _=this.viewItems[n+1];d=(_.size-_.maximumSize)/2,h=(_.size-_.minimumSize)/2}let u,g;if(!l){const f=Cn(n,-1),_=Cn(n+1,this.viewItems.length),b=f.reduce((D,I)=>D+(this.viewItems[I].minimumSize-c[I]),0),v=f.reduce((D,I)=>D+(this.viewItems[I].viewMaximumSize-c[I]),0),C=_.length===0?Number.POSITIVE_INFINITY:_.reduce((D,I)=>D+(c[I]-this.viewItems[I].minimumSize),0),w=_.length===0?Number.NEGATIVE_INFINITY:_.reduce((D,I)=>D+(c[I]-this.viewItems[I].viewMaximumSize),0),S=Math.max(b,w),k=Math.min(C,v),x=this.findFirstSnapIndex(f),y=this.findFirstSnapIndex(_);if(typeof x=="number"){const D=this.viewItems[x],I=Math.floor(D.viewMinimumSize/2);u={index:x,limitDelta:D.visible?S-I:S+I,size:D.size}}if(typeof y=="number"){const D=this.viewItems[y],I=Math.floor(D.viewMinimumSize/2);g={index:y,limitDelta:D.visible?k+I:k-I,size:D.size}}}this.sashDragState={start:a,current:a,index:n,sizes:c,minDelta:d,maxDelta:h,alt:l,snapBefore:u,snapAfter:g,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:r,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const d=e-i,h=this.resize(t,d,n,void 0,void 0,r,a,l,c);if(s){const u=t===this.sashItems.length-1,g=this.viewItems.map(w=>w.size),f=u?t:t+1,_=this.viewItems[f],b=_.size-_.maximumSize,v=_.size-_.minimumSize,C=u?t-1:t+1;this.resize(C,-h,g,void 0,void 0,b,v)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Zn(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==Sa.Idle)throw new Error("Cant modify splitview");if(this.state=Sa.Busy,e<0||e>=this.viewItems.length)return;const i=Cn(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),r=this.viewItems[e];t=Math.round(t),t=Zn(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,s),this.state=Sa.Idle}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=Zn(i,a.minimumSize,a.maximumSize);const n=Cn(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.relayout(s,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==Sa.Idle)throw new Error("Cant modify splitview");this.state=Sa.Busy;const s=J(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const r=e.onDidChange(u=>this.onViewChange(d,u)),a=Be(()=>this.viewContainer.removeChild(s)),l=qo(r,a);let c;typeof t=="number"?c=t:t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize;const d=this.orientation===0?new yX(s,e,c,l):new LX(s,e,c,l);if(this.viewItems.splice(i,0,d),this.viewItems.length>1){const u={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},g=this.orientation===0?new tn(this.sashContainer,{getHorizontalSashTop:D=>this.getSashPosition(D),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},u),{orientation:1})):new tn(this.sashContainer,{getVerticalSashLeft:D=>this.getSashPosition(D),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},u),{orientation:0})),f=this.orientation===0?D=>({sash:g,start:D.startY,current:D.currentY,alt:D.altKey}):D=>({sash:g,start:D.startX,current:D.currentX,alt:D.altKey}),b=ge.map(g.onDidStart,f)(this.onSashStart,this),C=ge.map(g.onDidChange,f)(this.onSashChange,this),S=ge.map(g.onDidEnd,()=>this.sashItems.findIndex(D=>D.sash===g))(this.onSashEnd,this),k=g.onDidReset(()=>{const D=this.sashItems.findIndex(j=>j.sash===g),I=Cn(D,-1),O=Cn(D+1,this.viewItems.length),F=this.findFirstSnapIndex(I),z=this.findFirstSnapIndex(O);typeof F=="number"&&!this.viewItems[F].visible||typeof z=="number"&&!this.viewItems[z].visible||this._onDidSashReset.fire(D)}),x=qo(b,C,S,k,g),y={sash:g,disposable:x};this.sashItems.splice(i-1,0,y)}s.appendChild(e.element);let h;typeof t!="number"&&t.type==="split"&&(h=[t.index]),n||this.relayout([i],h),this.state=Sa.Idle,!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(d=>d.size),n,s,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=Cn(e,-1),h=Cn(e+1,this.viewItems.length);if(s)for(const y of s)Pw(d,y),Pw(h,y);if(n)for(const y of n)G_(d,y),G_(h,y);const u=d.map(y=>this.viewItems[y]),g=d.map(y=>i[y]),f=h.map(y=>this.viewItems[y]),_=h.map(y=>i[y]),b=d.reduce((y,D)=>y+(this.viewItems[D].minimumSize-i[D]),0),v=d.reduce((y,D)=>y+(this.viewItems[D].maximumSize-i[D]),0),C=h.length===0?Number.POSITIVE_INFINITY:h.reduce((y,D)=>y+(i[D]-this.viewItems[D].minimumSize),0),w=h.length===0?Number.NEGATIVE_INFINITY:h.reduce((y,D)=>y+(i[D]-this.viewItems[D].maximumSize),0),S=Math.max(b,w,r),k=Math.min(C,v,a);let x=!1;if(l){const y=this.viewItems[l.index],D=t>=l.limitDelta;x=D!==y.visible,y.setVisible(D,l.size)}if(!x&&c){const y=this.viewItems[c.index],D=ta+l.size,0);let i=this.size-t;const n=Cn(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);for(const a of r)Pw(n,a);for(const a of s)G_(n,a);typeof e=="number"&&G_(n,e);for(let a=0;i!==0&&at+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const r=n.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:C&&t[l]&&(a0)return;if(!i.visible&&i.snap)return t}}dispose(){super.dispose(),nt(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}class S_{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=S_.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const r=n.get(s.templateId);if(!r)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(r)}}renderTemplate(e){const t=q(e,J(".monaco-table-tr")),i=[],n=[];for(let r=0;rnew kX(d,h)),l={size:a.reduce((d,h)=>d+h.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new AF(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new S_(n,s,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new rr(e,this.domNode,DX(i),[c],r)),ge.any(...a.map(d=>d.onDidLayout))(([d,h])=>c.layoutColumn(d,h),null,this.disposables),this.splitview.onDidSashReset(d=>{const h=n.reduce((g,f)=>g+f.weight,0),u=n[d].weight/h*this.cachedWidth;this.splitview.resizeView(d,u)},null,this.disposables),this.styleElement=Qs(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { +`)}}const hX={listFocusBackground:W.fromHex("#7FB0D0"),listActiveSelectionBackground:W.fromHex("#0E639C"),listActiveSelectionForeground:W.fromHex("#FFFFFF"),listActiveSelectionIconForeground:W.fromHex("#FFFFFF"),listFocusAndSelectionOutline:W.fromHex("#90C2F9"),listFocusAndSelectionBackground:W.fromHex("#094771"),listFocusAndSelectionForeground:W.fromHex("#FFFFFF"),listInactiveSelectionBackground:W.fromHex("#3F3F46"),listInactiveSelectionIconForeground:W.fromHex("#FFFFFF"),listHoverBackground:W.fromHex("#2A2D2E"),listDropBackground:W.fromHex("#383B3D"),treeIndentGuidesStroke:W.fromHex("#a9a9a9"),tableColumnsBorder:W.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:W.fromHex("#cccccc").transparent(.04)},uX={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function gX(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]o-e;class pX{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let r=0;for(const a of this.renderers)(s=a.disposeElement)===null||s===void 0||s.call(a,e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class mX{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class _X{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,r;(r=(s=this.dnd).onDragLeave)===null||r===void 0||r.call(s,e,t,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class rr{constructor(e,t,i,n,s=uX){var r,a,l,c;this.user=e,this._options=s,this.focus=new sC("focused"),this.anchor=new sC("anchor"),this.eventBufferer=new gI,this._ariaLabel="",this.disposables=new Q,this._onDidDispose=new R,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new rX(d!=="listbox"),Jr(s,hX,!1);const h=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(h.push(new mX(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(g=>new pX(g.templateId,[...h,g]));const u=Object.assign(Object.assign({},s),{dnd:s.dnd&&new _X(this,s.dnd)});if(this.view=new Lo(t,i,n,u),this.view.domNode.setAttribute("role",d),s.styleController)this.styleController=s.styleController(this.view.domId);else{const g=Qs(this.view.domNode);this.styleController=new N5(g,this.view.domId)}if(this.spliceable=new YQ([new qS(this.focus,this.view,s.identityProvider),new qS(this.selection,this.view,s.identityProvider),new qS(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new cX(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new k5(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const g=s.keyboardNavigationDelegate||aX;this.typeNavigationController=new lX(this,this.view,s.keyboardNavigationLabelProvider,(c=s.keyboardNavigationEventFilter)!==null&&c!==void 0?c:()=>!0,g),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return ge.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return ge.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=this.disposables.add(ge.chain(this.disposables.add(new bt(this.view.domNode,"keydown")).event)).map(s=>new Rt(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(ND).filter(()=>!1).event,i=this.disposables.add(ge.chain(this.disposables.add(new bt(this.view.domNode,"keyup")).event)).forEach(()=>e=!1).map(s=>new Rt(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(ND).map(({browserEvent:s})=>{const r=this.getFocus(),a=r.length?r[0]:void 0,l=typeof a<"u"?this.view.element(a):void 0,c=typeof a<"u"?this.view.domElement(a):this.view.domNode;return{index:a,element:l,anchor:c,browserEvent:s}}).event,n=this.disposables.add(ge.chain(this.view.onContextMenu)).filter(s=>!e).map(({element:s,index:r,browserEvent:a})=>({element:s,index:r,anchor:{x:a.pageX+1,y:a.pageY},browserEvent:a})).event;return ge.any(t,i,n)}get onKeyDown(){return this.disposables.add(new bt(this.view.domNode,"keydown")).event}get onDidFocus(){return ge.signal(this.disposables.add(new bt(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new E5(this)}updateOptions(e={}){var t,i;this._options=Object.assign(Object.assign({},this._options),e),(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(i=this.keyboardController)===null||i===void 0||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new Vh(this.user,`Invalid start index: ${e}`);if(t<0)throw new Vh(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new Vh(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new Vh(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return VO(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new Vh(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}focusNextPage(e,t){return RM(this,void 0,void 0,function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.getFocus()[0];if(n!==i&&(n===void 0||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let r=s+this.view.renderHeight;i>n&&(r-=this.view.elementHeight(i)),this.view.setScrollTop(r),this.view.getScrollTop()!==s&&(this.setFocus([]),yield sc(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return RM(this,void 0,void 0,function*(){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.getFocus()[0];if(s!==i&&(s===void 0||s>=i)){const r=this.findNextIndex(i,!1,t);r>-1&&s!==r?this.setFocus([r],e):this.setFocus([i],e)}else{const r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&(this.setFocus([]),yield sc(0),yield this.focusPreviousPage(e,t))}})}focusLast(e,t){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(this.length===0)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new Vh(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(tc(t)){const r=s-this.view.renderHeight;this.view.setScrollTop(r*Zn(t,0,1)+n)}else{const r=n+s,a=i+this.view.renderHeight;n=a||(n=a&&s>=this.view.renderHeight?this.view.setScrollTop(n):r>=a&&this.view.setScrollTop(r-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}wh([pi],rr.prototype,"onDidChangeFocus",null);wh([pi],rr.prototype,"onDidChangeSelection",null);wh([pi],rr.prototype,"onContextMenu",null);wh([pi],rr.prototype,"onKeyDown",null);wh([pi],rr.prototype,"onDidFocus",null);class bX{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:H.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const r=new Qi,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(l=>this.renderer.renderElement(l,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class vX{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function CX(o,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new vX(o,e.accessibilityProvider)})}class wX{constructor(e,t,i,n,s={}){const r=()=>this.model,a=n.map(l=>new bX(l,r));this.list=new rr(e,t,i,a,CX(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ge.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return ge.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return ge.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Cn(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}const SX={separatorBorder:W.transparent};class T5{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var i,n;e!==this.visible&&(e?(this.size=Zn(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e),(n=(i=this.view).setVisible)===null||n===void 0||n.call(i,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class yX extends T5{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class LX extends T5{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var Sa;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(Sa||(Sa={}));var oC;(function(o){o.Distribute={type:"distribute"};function e(i){return{type:"split",index:i}}o.Split=e;function t(i){return{type:"invisible",cachedVisibleSize:i}}o.Invisible=t})(oC||(oC={}));class A5 extends H{constructor(e,t={}){var i,n,s,r,a;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Sa.Idle,this._onDidSashChange=this._register(new R),this._onDidSashReset=this._register(new R),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(i=t.orientation)!==null&&i!==void 0?i:0,this.inverseAltBehavior=(n=t.inverseAltBehavior)!==null&&n!==void 0?n:!1,this.proportionalLayout=(s=t.proportionalLayout)!==null&&s!==void 0?s:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=q(this.el,J(".sash-container")),this.viewContainer=J(".split-view-container"),this.scrollable=new f_({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:Jo}),this.scrollableElement=this._register(new pE(this.viewContainer,{vertical:this.orientation===0?(r=t.scrollbarVisibility)!==null&&r!==void 0?r:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(l=>{this.viewContainer.scrollTop=l.scrollTop,this.viewContainer.scrollLeft=l.scrollLeft})),q(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||SX),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((l,c)=>{const d=Xn(l.visible)||l.visible?l.size:{type:"invisible",cachedVisibleSize:l.size},h=l.view;this.doAddView(h,d,c,!0)}),this.contentSize=this.viewItems.reduce((l,c)=>l+c.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let n=0;nthis.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=qo(G(document.body,"keydown",a=>r(this.sashDragState.current,a.altKey)),G(document.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(a,l)=>{const c=this.viewItems.map(f=>f.size);let d=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){const _=this.viewItems[n];d=(_.minimumSize-_.size)/2,h=(_.maximumSize-_.size)/2}else{const _=this.viewItems[n+1];d=(_.size-_.maximumSize)/2,h=(_.size-_.minimumSize)/2}let u,g;if(!l){const f=Cn(n,-1),_=Cn(n+1,this.viewItems.length),b=f.reduce((D,I)=>D+(this.viewItems[I].minimumSize-c[I]),0),v=f.reduce((D,I)=>D+(this.viewItems[I].viewMaximumSize-c[I]),0),C=_.length===0?Number.POSITIVE_INFINITY:_.reduce((D,I)=>D+(c[I]-this.viewItems[I].minimumSize),0),w=_.length===0?Number.NEGATIVE_INFINITY:_.reduce((D,I)=>D+(c[I]-this.viewItems[I].viewMaximumSize),0),S=Math.max(b,w),k=Math.min(C,v),x=this.findFirstSnapIndex(f),y=this.findFirstSnapIndex(_);if(typeof x=="number"){const D=this.viewItems[x],I=Math.floor(D.viewMinimumSize/2);u={index:x,limitDelta:D.visible?S-I:S+I,size:D.size}}if(typeof y=="number"){const D=this.viewItems[y],I=Math.floor(D.viewMinimumSize/2);g={index:y,limitDelta:D.visible?k+I:k-I,size:D.size}}}this.sashDragState={start:a,current:a,index:n,sizes:c,minDelta:d,maxDelta:h,alt:l,snapBefore:u,snapAfter:g,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:r,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const d=e-i,h=this.resize(t,d,n,void 0,void 0,r,a,l,c);if(s){const u=t===this.sashItems.length-1,g=this.viewItems.map(w=>w.size),f=u?t:t+1,_=this.viewItems[f],b=_.size-_.maximumSize,v=_.size-_.minimumSize,C=u?t-1:t+1;this.resize(C,-h,g,void 0,void 0,b,v)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Zn(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==Sa.Idle)throw new Error("Cant modify splitview");if(this.state=Sa.Busy,e<0||e>=this.viewItems.length)return;const i=Cn(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),r=this.viewItems[e];t=Math.round(t),t=Zn(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,s),this.state=Sa.Idle}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=Zn(i,a.minimumSize,a.maximumSize);const n=Cn(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.relayout(s,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==Sa.Idle)throw new Error("Cant modify splitview");this.state=Sa.Busy;const s=J(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const r=e.onDidChange(u=>this.onViewChange(d,u)),a=Be(()=>this.viewContainer.removeChild(s)),l=qo(r,a);let c;typeof t=="number"?c=t:t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize;const d=this.orientation===0?new yX(s,e,c,l):new LX(s,e,c,l);if(this.viewItems.splice(i,0,d),this.viewItems.length>1){const u={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},g=this.orientation===0?new tn(this.sashContainer,{getHorizontalSashTop:D=>this.getSashPosition(D),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},u),{orientation:1})):new tn(this.sashContainer,{getVerticalSashLeft:D=>this.getSashPosition(D),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},u),{orientation:0})),f=this.orientation===0?D=>({sash:g,start:D.startY,current:D.currentY,alt:D.altKey}):D=>({sash:g,start:D.startX,current:D.currentX,alt:D.altKey}),b=ge.map(g.onDidStart,f)(this.onSashStart,this),C=ge.map(g.onDidChange,f)(this.onSashChange,this),S=ge.map(g.onDidEnd,()=>this.sashItems.findIndex(D=>D.sash===g))(this.onSashEnd,this),k=g.onDidReset(()=>{const D=this.sashItems.findIndex(j=>j.sash===g),I=Cn(D,-1),O=Cn(D+1,this.viewItems.length),F=this.findFirstSnapIndex(I),z=this.findFirstSnapIndex(O);typeof F=="number"&&!this.viewItems[F].visible||typeof z=="number"&&!this.viewItems[z].visible||this._onDidSashReset.fire(D)}),x=qo(b,C,S,k,g),y={sash:g,disposable:x};this.sashItems.splice(i-1,0,y)}s.appendChild(e.element);let h;typeof t!="number"&&t.type==="split"&&(h=[t.index]),n||this.relayout([i],h),this.state=Sa.Idle,!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(d=>d.size),n,s,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=Cn(e,-1),h=Cn(e+1,this.viewItems.length);if(s)for(const y of s)Pw(d,y),Pw(h,y);if(n)for(const y of n)G_(d,y),G_(h,y);const u=d.map(y=>this.viewItems[y]),g=d.map(y=>i[y]),f=h.map(y=>this.viewItems[y]),_=h.map(y=>i[y]),b=d.reduce((y,D)=>y+(this.viewItems[D].minimumSize-i[D]),0),v=d.reduce((y,D)=>y+(this.viewItems[D].maximumSize-i[D]),0),C=h.length===0?Number.POSITIVE_INFINITY:h.reduce((y,D)=>y+(i[D]-this.viewItems[D].minimumSize),0),w=h.length===0?Number.NEGATIVE_INFINITY:h.reduce((y,D)=>y+(i[D]-this.viewItems[D].maximumSize),0),S=Math.max(b,w,r),k=Math.min(C,v,a);let x=!1;if(l){const y=this.viewItems[l.index],D=t>=l.limitDelta;x=D!==y.visible,y.setVisible(D,l.size)}if(!x&&c){const y=this.viewItems[c.index],D=ta+l.size,0);let i=this.size-t;const n=Cn(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);for(const a of r)Pw(n,a);for(const a of s)G_(n,a);typeof e=="number"&&G_(n,e);for(let a=0;i!==0&&at+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const r=n.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:C&&t[l]&&(a0)return;if(!i.visible&&i.snap)return t}}dispose(){super.dispose(),nt(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}class S_{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=S_.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const r=n.get(s.templateId);if(!r)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(r)}}renderTemplate(e){const t=q(e,J(".monaco-table-tr")),i=[],n=[];for(let r=0;rnew kX(d,h)),l={size:a.reduce((d,h)=>d+h.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new A5(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new S_(n,s,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new rr(e,this.domNode,DX(i),[c],r)),ge.any(...a.map(d=>d.onDidLayout))(([d,h])=>c.layoutColumn(d,h),null,this.disposables),this.splitview.onDidSashReset(d=>{const h=n.reduce((g,f)=>g+f.weight,0),u=n[d].weight/h*this.cachedWidth;this.splitview.resizeView(d,u)},null,this.disposables),this.styleElement=Qs(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=t.join(` -`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}F1.InstanceCount=0;const xX={inputActiveOptionBorder:W.fromHex("#007ACC00"),inputActiveOptionForeground:W.fromHex("#FFFFFF"),inputActiveOptionBackground:W.fromHex("#0E639C50")};class y_ extends yo{constructor(e){super(),this._onChange=this._register(new R),this.onChange=this._onChange.event,this._onKeyDown=this._register(new R),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},xX),e),this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Ln.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const IX=p("caseDescription","Match Case"),EX=p("wordsDescription","Match Whole Word"),NX=p("regexDescription","Use Regular Expression");class MF extends y_{constructor(e){super({icon:m.caseSensitive,title:IX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class RF extends y_{constructor(e){super({icon:m.wholeWord,title:EX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class OF extends y_{constructor(e){super({icon:m.regex,title:NX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}const TX=p("defaultLabel","input");class AX extends yo{constructor(e,t,i,n){var s;super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalToggles=[],this._onDidOptionChange=this._register(new R),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new R),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new R),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new R),this._onKeyUp=this._register(new R),this._onCaseSensitiveKeyDown=this._register(new R),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new R),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||TX,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const r=n.appendCaseSensitiveLabel||"",a=n.appendWholeWordsLabel||"",l=n.appendRegexLabel||"",c=n.history||[],d=!!n.flexibleHeight,h=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new yF(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:c,showHistoryHint:n.showHistoryHint,flexibleHeight:d,flexibleWidth:h,flexibleMaxHeight:u})),this.regex=this._register(new OF({appendTitle:l,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new RF({appendTitle:a,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new MF({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)}));const g=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){const _=g.indexOf(document.activeElement);if(_>=0){let b=-1;f.equals(17)?b=(_+1)%g.length:f.equals(15)&&(_===0?b=g.length-1:b=_-1),f.equals(9)?(g[_].blur(),this.inputBox.focus()):b>=0&&g[b].focus(),ut.stop(f,!0)}}}),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this._showOptionButtons||(this.caseSensitive.domNode.style.display="none",this.wholeWords.domNode.style.display="none",this.regex.domNode.style.display="none");for(const f of(s=n==null?void 0:n.additionalToggles)!==null&&s!==void 0?s:[])this._register(f),this.controls.appendChild(f.domNode),this._register(f.onChange(_=>{this._onDidOptionChange.fire(_),!_&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(f);this.additionalToggles.length>0&&(this.controls.style.display="block"),this.inputBox.paddingRight=(this._showOptionButtons?this.caseSensitive.width()+this.wholeWords.width()+this.regex.width():0)+this.additionalToggles.reduce((f,_)=>f+_.width(),0),this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(G(this.inputBox.inputElement,"compositionstart",f=>{this.imeSessionInProgress=!0})),this._register(G(this.inputBox.inputElement,"compositionend",f=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,f=>this._onKeyDown.fire(f)),this.onkeyup(this.inputBox.inputElement,f=>this._onKeyUp.fire(f)),this.oninput(this.inputBox.inputElement,f=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,f=>this._onMouseDown.fire(f))}get onDidChange(){return this.inputBox.onDidChange}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);for(const i of this.additionalToggles)i.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var gd;(function(o){o[o.Unknown=0]="Unknown",o[o.Twistie=1]="Twistie",o[o.Element=2]="Element",o[o.Filter=3]="Filter"})(gd||(gd={}));class Ws extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class aN{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function lN(o){return typeof o=="object"&&"visibility"in o&&"data"in o}function Lm(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}function GS(o){return typeof o.collapsible=="boolean"}class MX{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new gI,this._onDidChangeCollapseState=new R,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new R,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new R,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Kr(RP),this.collapseByDefault=typeof n.collapseByDefault>"u"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren>"u"?!1:n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=je.empty(),n={}){if(e.length===0)throw new Ws(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,r){var a;n===void 0&&(n=je.empty()),r===void 0&&(r=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,i,n,s);const c=[...n],d=t[t.length-1],h=new xr({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,d),...c,...l.children.slice(d+i)].map(b=>e.getId(b.element).toString())}).ComputeDiff(!1);if(h.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,i,c,s);const u=t.slice(0,-1),g=(b,v,C)=>{if(r>0)for(let w=0;wC.originalStart-v.originalStart))g(f,_,f-(b.originalStart+b.originalLength)),f=b.originalStart,_=b.modifiedStart-d,this.spliceSimple([...u,f],b.originalLength,je.slice(c,_,_+b.modifiedLength),s);g(f,_,f)}spliceSimple(e,t,i=je.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:c,visible:d}=this.getParentNodeWithListIndex(e),h=[],u=je.map(i,y=>this.createTreeNode(y,a,a.visible?1:0,c,h,n)),g=e[e.length-1],f=a.children.length>0;let _=0;for(let y=g;y>=0&&yr.getId(y.element).toString())):a.lastDiffIds=a.children.map(y=>r.getId(y.element).toString()):a.lastDiffIds=void 0;let S=0;for(const y of w)y.visible&&S++;if(S!==0)for(let y=g+b.length;yD+(I.visible?I.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,C-y),this.list.splice(l,y,h)}if(w.length>0&&s){const y=D=>{s(D),D.children.forEach(y)};w.forEach(y)}this._onDidSplice.fire({insertedNodes:b,deletedNodes:w});const k=a.children.length>0;f!==k&&this.setCollapsible(e.slice(0,-1),k);let x=a;for(;x;){if(x.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}x=x.parent}}rerender(e){if(e.length===0)throw new Ws(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!GS(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return r}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const r=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=r-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(GS(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!GS(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,r){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);const c=e.children||je.empty(),d=n&&l!==0&&!a.collapsed,h=je.map(c,f=>this.createTreeNode(f,a,l,d,s,r));let u=0,g=1;for(const f of h)a.children.push(f),g+=f.renderNodeCount,f.visible&&(f.visibleChildIndex=u++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=l===2?u>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=g):(a.renderNodeCount=0,n&&s.pop()),r==null||r(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,s,i,n&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):lN(i)?(e.filterData=i.data,Lm(i.visibility)):(e.filterData=void 0,Lm(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new Ws(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new Ws(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new Ws(this.user,"Invalid tree location");for(let l=0;lt.element)),this.data=e}}function ZS(o){return o instanceof w_?new OX(o):o}class PX{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=H.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,ZS(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(ZS(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return r;if(a&&typeof r!="boolean"&&r.autoExpand&&(this.autoExpandDisposable=Ad(()=>{const u=this.modelProvider(),g=u.getNodeLocation(t);u.isCollapsed(g)&&u.setCollapsed(g,!1),this.autoExpandNode=void 0},500)),typeof r=="boolean"||!r.accept||typeof r.bubble>"u"||r.feedback){if(!s){const u=typeof r=="boolean"?r:r.accept,g=typeof r=="boolean"?void 0:r.effect;return{accept:u,effect:g,feedback:[i]}}return r}if(r.bubble===1){const u=this.modelProvider(),g=u.getNodeLocation(t),f=u.getParentNodeLocation(g),_=u.getNode(f),b=f&&u.getListIndex(f);return this.onDragOver(e,_,b,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),h=l.getListRenderCount(c);return Object.assign(Object.assign({},r),{feedback:Cn(d,d+h)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(ZS(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}}function FX(o,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new PX(o,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(t){const i=o(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}})})}class cN{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;(n=(i=this.delegate).setDynamicHeight)===null||n===void 0||n.call(i,e.element,t)}}var Dm;(function(o){o.None="none",o.OnHover="onHover",o.Always="always"})(Dm||(Dm={}));class BX{constructor(e,t=[]){this._elements=t,this.disposables=new Q,this.onDidChange=ge.forEach(e,i=>this._elements=i,this.disposables)}get elements(){return this._elements}dispose(){this.disposables.dispose()}}class km{constructor(e,t,i,n,s={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=km.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new RX,this.activeIndentNodes=new Set,this.indentGuidesDisposable=H.None,this.disposables=new Q,this.templateId=e.templateId,this.updateOptions(s),ge.map(i,a=>a.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(r=e.onDidChangeTwistieState)===null||r===void 0||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"&&(this.indent=Zn(e.indent,0,40)),typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==Dm.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const i=new Q;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=q(e,J(".monaco-tl-row")),i=q(t,J(".monaco-tl-indent")),n=q(t,J(".monaco-tl-twistie")),s=q(t,J(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:H.None,templateData:r}}renderElement(e,t,i,n){typeof n=="number"&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const s=km.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${s}px`,i.indent.style.width=`${s+this.indent-16}px`,this.renderTwistie(e,i),typeof n=="number"&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var s,r;i.indentGuidesDisposable.dispose(),(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,e,t,i.templateData,n),typeof n=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);!t||this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);!t||(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...m.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...m.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Si(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new Q,n=this.modelProvider();let s=e;for(;;){const r=n.getNodeLocation(s),a=n.getParentNodeLocation(r);if(!a)break;const l=n.getNode(a),c=J(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add(Be(()=>this.renderedIndentGuides.delete(l,c))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(n=>{const s=i.getNodeLocation(n);try{const r=i.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):r&&t.add(i.getNode(r))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),nt(this.disposables)}}km.DefaultIndent=8;class WX{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Q,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}filter(e,t){let i=1;if(this._filter){const r=this._filter.filter(e,t);if(typeof r=="boolean"?i=r?1:0:lN(r)?i=Lm(r.visibility):i=r,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Zo.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const r of s){const a=r&&r.toString();if(typeof a>"u")return{data:Zo.Default,visibility:i};const l=mg(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,s.length===1?{data:l,visibility:i}:{data:{label:a,score:l},visibility:i}}return this.tree.findMode===Fr.Filter?2:{data:Zo.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){nt(this.disposables)}}var Fr;(function(o){o[o.Highlight=0]="Highlight",o[o.Filter=1]="Filter"})(Fr||(Fr={}));class VX{constructor(e,t,i,n,s){var r;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=s,this._pattern="",this.width=0,this._onDidChangeMode=new R,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangePattern=new R,this._onDidChangeOpenState=new R,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new Q,this.disposables=new Q,this._mode=(r=e.options.defaultFindMode)!==null&&r!==void 0?r:Fr.Highlight,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t;const i=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&i?(e=this.widget)===null||e===void 0||e.showMessage({type:2,content:p("not found","No elements found.")}):(t=this.widget)===null||t===void 0||t.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===Fr.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Zo.isDefault(e.filterData)}style(e){var t;this.styles=e,(t=this.widget)===null||t===void 0||t.style(e)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function FM(o){let e=gd.Unknown;return rS(o.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=gd.Twistie:rS(o.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=gd.Element:rS(o.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=gd.Filter),{browserEvent:o.browserEvent,element:o.element?o.element.element:null,target:e}}function D0(o,e){e(o),o.children.forEach(t=>D0(t,e))}class YS{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new R,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(t!=null&&t.__forceEvent)&&Ss(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const l=this.createNodeSet(),c=d=>l.delete(d);t.forEach(d=>D0(d,c)),this.set([...l.values()]);return}const i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>D0(l,n));const s=new Map,r=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>D0(l,r));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!i.has(c))a.push(l);else{const h=s.get(c);h&&a.push(h)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class HX extends EF{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(DF(e.browserEvent.target)||jd(e.browserEvent.target)||yu(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,s&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const r=this.tree.model,a=r.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),r.setCollapsed(a,void 0,l),s&&n)return}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(e)}}class zX extends rr{constructor(e,t,i,n,s,r,a,l){super(e,t,i,n,l),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=a}createMouseController(e){return new HX(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let r;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(r=e+l)}),n.length>0&&super.setFocus(Qa([...super.getFocus(),...n])),s.length>0&&super.setSelection(Qa([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class PF{constructor(e,t,i,n,s={}){var r;this._user=e,this._options=s,this.eventBufferer=new gI,this.onDidChangeFindOpenState=ge.None,this.disposables=new Q,this._onWillRefilter=new R,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new R;const a=new cN(i),l=new AT,c=new AT,d=this.disposables.add(new BX(c.event));this.renderers=n.map(g=>new km(g,()=>this.model,l.event,d,s));for(const g of this.renderers)this.disposables.add(g);let h;s.keyboardNavigationLabelProvider&&(h=new WX(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:h}),this.disposables.add(h)),this.focus=new YS(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new YS(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new YS(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new zX(e,t,a,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},FX(()=>this.model,s)),{tree:this})),this.model=this.createModel(e,this.view,s),l.input=this.model.onDidChangeCollapseState;const u=ge.forEach(this.model.onDidSplice,g=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(g),this.selection.onDidModelSplice(g)})},this.disposables);if(u(()=>null,null,this.disposables),c.input=ge.chain(ge.any(u,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const g=new Set;for(const f of this.focus.getNodes())g.add(f);for(const f of this.selection.getNodes())g.add(f);return[...g.values()]}).event,s.keyboardSupport!==!1){const g=ge.chain(this.view.onKeyDown).filter(f=>!jd(f.target)).map(f=>new Rt(f));g.filter(f=>f.keyCode===15).on(this.onLeftArrow,this,this.disposables),g.filter(f=>f.keyCode===17).on(this.onRightArrow,this,this.disposables),g.filter(f=>f.keyCode===10).on(this.onSpace,this,this.disposables)}((r=s.findWidgetEnabled)!==null&&r!==void 0?r:!0)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider?(this.findController=new VX(this,this.model,this.view,h,s.contextViewProvider),this.focusNavigationFilter=g=>this.findController.shouldAllowFocus(g),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode):this.onDidChangeFindMode=ge.None,this.styleElement=Qs(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Dm.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ge.filter(ge.map(this.view.onMouseDblClick,FM),e=>e.target!==gd.Filter)}get onPointer(){return ge.map(this.view.onPointer,FM)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return ge.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:Fr.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Dm.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),tc(t)&&((i=this.findController)===null||i===void 0||i.layout(t))}style(e){var t;const i=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${i}:hover .monaco-tl-indent > .indent-guide, .monaco-list${i}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${i} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join(` -`),(t=this.findController)===null||t===void 0||t.style(e),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);i!==-1&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){nt(this.disposables),this.view.dispose()}}class dN{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new MX(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=je.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=je.empty(),i){const n=new Set,s=new Set,r=l=>{var c;if(l.element===null)return;const d=l;if(n.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.add(h),this.nodesByIdentity.set(h,d)}(c=i.onDidCreateNode)===null||c===void 0||c.call(i,d)},a=l=>{var c;if(l.element===null)return;const d=l;if(n.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.has(h)||this.nodesByIdentity.delete(h)}(c=i.onDidDeleteNode)===null||c===void 0||c.call(i,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:r,onDidDeleteNode:a}))}preserveCollapseState(e=je.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),je.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s=typeof t.collapsed<"u"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Ws(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function k0(o){const e=[o.element],t=o.incompressible||!1;return{element:{elements:e,incompressible:t},children:je.map(je.from(o.children),k0),collapsible:o.collapsible,collapsed:o.collapsed}}function x0(o){const e=[o.element],t=o.incompressible||!1;let i,n;for(;[n,i]=je.consume(je.from(o.children),2),!(n.length!==1||n[0].incompressible);)o=n[0],e.push(o.element);return{element:{elements:e,incompressible:t},children:je.map(je.concat(n,i),x0),collapsible:o.collapsible,collapsed:o.collapsed}}function dk(o,e=0){let t;return edk(i,0)),e===0&&o.element.incompressible?{element:o.element.elements[e],children:t,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[e],children:t,collapsible:o.collapsible,collapsed:o.collapsed}}function BM(o){return dk(o,0)}function FF(o,e,t){return o.element===e?Object.assign(Object.assign({},o),{children:t}):Object.assign(Object.assign({},o),{children:je.map(je.from(o.children),i=>FF(i,e,t))})}const UX=o=>({getId(e){return e.elements.map(t=>o.getId(t).toString()).join("\0")}});class $X{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new dN(e,t,i),this.enabled=typeof i.compressionEnabled>"u"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=je.empty(),i){const n=i.diffIdentityProvider&&UX(i.diffIdentityProvider);if(e===null){const g=je.map(t,this.enabled?x0:k0);this._setChildren(null,g,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=BM(r),d=FF(c,e,t),h=(this.enabled?x0:k0)(d),u=l.children.map(g=>g===r?h:g);this._setChildren(l.element,u,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=je.map(i,BM),s=je.map(n,e?x0:k0);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},r=a=>{for(const l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:s,onDidDeleteNode:r}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return t}}const jX=o=>o[o.length-1];class hN{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new hN(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function KX(o,e){return{splice(t,i,n){e.splice(t,i,n.map(s=>o.map(s)))},updateElementHeight(t,i){e.updateElementHeight(t,i)}}}function qX(o,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(o(t))}},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){return e.filter.filter(o(t),i)}}})}class GX{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||jX;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new aN(s=>new hN(n,s)),this.model=new $X(e,KX(this.nodeMapper,t),qX(n,i))}get onDidSplice(){return ge.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return ge.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return ge.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=je.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var ZX=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class uN extends PF{constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=je.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new dN(e,t,i)}}class BF{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){var s,r,a,l;i.compressedTreeNode?(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,i.compressedTreeNode,t,i.data,n):(l=(a=this.renderer).disposeElement)===null||l===void 0||l.call(a,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}ZX([pi],BF.prototype,"compressedTreeNodeProvider",null);function YX(o,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=o().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}class WF extends uN{constructor(e,t,i,n,s={}){const r=()=>this,a=n.map(l=>new BF(r,l));super(e,t,i,a,YX(r,s))}setChildren(e,t=je.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new GX(e,t,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var vl=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function QS(o){return Object.assign(Object.assign({},o),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function hk(o,e){return e.parent?e.parent===o?!0:hk(o,e.parent):!1}function QX(o,e){return o===e||hk(o,e)||hk(e,o)}class gN{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new gN(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class XX{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...m.treeItemLoading.classNamesArray),!0):(t.classList.remove(...m.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function WM(o){return{browserEvent:o.browserEvent,elements:o.elements.map(e=>e.element)}}function VM(o){return{browserEvent:o.browserEvent,element:o.element&&o.element.element,target:o.target}}class JX extends w_{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function XS(o){return o instanceof w_?new JX(o):o}class eJ{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,XS(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(XS(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(XS(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}}function VF(o){return o&&Object.assign(Object.assign({},o),{collapseByDefault:!0,identityProvider:o.identityProvider&&{getId(e){return o.identityProvider.getId(e.element)}},dnd:o.dnd&&new eJ(o.dnd),multipleSelectionController:o.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return o.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return o.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:o.accessibilityProvider&&Object.assign(Object.assign({},o.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:o.accessibilityProvider.getRole?e=>o.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:o.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=o.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return o.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return o.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:o.accessibilityProvider.getWidgetRole?()=>o.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:o.accessibilityProvider.getAriaLevel&&(e=>o.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:o.accessibilityProvider.getActiveDescendantId&&(e=>o.accessibilityProvider.getActiveDescendantId(e.element))}),filter:o.filter&&{filter(e,t){return o.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},o.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof o.expandOnlyOnTwistieClick>"u"?void 0:typeof o.expandOnlyOnTwistieClick!="function"?o.expandOnlyOnTwistieClick:e=>o.expandOnlyOnTwistieClick(e.element),additionalScrollHeight:o.additionalScrollHeight})}function uk(o,e){e(o),o.children.forEach(t=>uk(t,e))}class HF{constructor(e,t,i,n,s,r={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new R,this._onDidChangeNodeSlowState=new R,this.nodeMapper=new aN(a=>new gN(a)),this.disposables=new Q,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,i,n,r),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=QS({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return ge.map(this.tree.onDidChangeFocus,WM)}get onDidChangeSelection(){return ge.map(this.tree.onDidChangeSelection,WM)}get onMouseDblClick(){return ge.map(this.tree.onMouseDblClick,VM)}get onPointer(){return ge.map(this.tree.onPointer,VM)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,s){const r=new cN(i),a=n.map(c=>new XX(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=VF(s)||{};return new uN(e,t,r,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return vl(this,void 0,void 0,function*(){this.refreshPromises.forEach(n=>n.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return vl(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ws(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,s),i)try{this.tree.rerender(r)}catch{}})}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return vl(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ws(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event)),n})}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Ws(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return vl(this,void 0,void 0,function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)})}refreshNode(e,t,i){return vl(this,void 0,void 0,function*(){let n;if(this.subTreeRefreshPromises.forEach((s,r)=>{!n&&QX(r,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,i)})}doRefreshSubTree(e,t,i){return vl(this,void 0,void 0,function*(){let n;e.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=yield this.doRefreshNode(e,t,i);e.stale=!1,yield KL.settled(s.map(r=>this.doRefreshSubTree(r,t,i)))}finally{n()}})}doRefreshNode(e,t,i){return vl(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(je.empty());else{const s=this.doGetChildren(e);if(ET(s))n=Promise.resolve(s);else{const r=sc(800);r.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),n=s.finally(()=>r.cancel())}}try{const s=yield n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),ea(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return ET(i)?this.processChildren(i):(t=Ri(()=>vl(this,void 0,void 0,function*(){return this.processChildren(yield i)})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Te))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const r=new Map,a=new Map;for(const d of e.children)if(r.set(d.element,d),this.identityProvider){const h=this.tree.isCollapsed(d);a.set(d.id,{node:d,collapsed:h})}const l=[],c=s.map(d=>{const h=!!this.dataSource.hasChildren(d);if(!this.identityProvider){const _=QS({element:d,parent:e,hasChildren:h});return h&&this.collapseByDefault&&!this.collapseByDefault(d)&&(_.collapsedByDefault=!1,l.push(_)),_}const u=this.identityProvider.getId(d).toString(),g=a.get(u);if(g){const _=g.node;return r.delete(_.element),this.nodes.delete(_.element),this.nodes.set(d,_),_.element=d,_.hasChildren=h,i?g.collapsed?(_.children.forEach(b=>uk(b,v=>this.nodes.delete(v.element))),_.children.splice(0,_.children.length),_.stale=!0):l.push(_):h&&this.collapseByDefault&&!this.collapseByDefault(d)&&(_.collapsedByDefault=!1,l.push(_)),_}const f=QS({element:d,parent:e,id:u,hasChildren:h});return n&&n.viewState.focus&&n.viewState.focus.indexOf(u)>-1&&n.focus.push(f),n&&n.viewState.selection&&n.viewState.selection.indexOf(u)>-1&&n.selection.push(f),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(u)>-1?l.push(f):h&&this.collapseByDefault&&!this.collapseByDefault(d)&&(f.collapsedByDefault=!1,l.push(f)),f});for(const d of r.values())uk(d,h=>this.nodes.delete(h.element));for(const d of c)this.nodes.set(d.element,d);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].collapsedByDefault=!1,l.push(c[0])),l}render(e,t,i){const n=e.children.map(r=>this.asTreeElement(r,t)),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)}}});this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:i=e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?je.map(e.children,n=>this.asTreeElement(n,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class fN{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new fN(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class tJ{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...m.treeItemLoading.classNamesArray),!0):(t.classList.remove(...m.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var s,r;(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=nt(this.disposables)}}function iJ(o){const e=o&&VF(o);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}})})}class nJ extends HF{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new aN(l=>new fN(l)),this.filter=a.filter}createTree(e,t,i,n,s){const r=new cN(i),a=n.map(c=>new tJ(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=iJ(s)||{};return new WF(e,t,r,a,l)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=u=>this.identityProvider.getId(u).toString(),n=u=>{const g=new Set;for(const f of u){const _=this.tree.getCompressedTreeNode(f===this.root?null:f);if(!!_.element)for(const b of _.element.elements)g.add(i(b.element))}return g},s=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const h=u=>{const g=u.element;if(g)for(let f=0;f{const i=this.filter.filter(t,1),n=sJ(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function sJ(o){return typeof o=="boolean"?o?1:0:lN(o)?Lm(o.visibility):Lm(o)}class oJ extends PF{constructor(e,t,i,n,s,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(e,t,i){return new dN(e,t,i)}}new le("isMac",Ge,p("isMac","Whether the operating system is macOS"));new le("isLinux",dn,p("isLinux","Whether the operating system is Linux"));const B1=new le("isWindows",Yi,p("isWindows","Whether the operating system is Windows"));new le("isWeb",Sc,p("isWeb","Whether the platform is a web browser"));new le("isMacNative",Ge&&!Sc,p("isMacNative","Whether the operating system is macOS on a non-browser platform"));new le("isIOS",Ur,p("isIOS","Whether the operating system is iOS"));new le("isDevelopment",!1,!0);new le("productQualityType","",p("productQualityType","Quality type of VS Code"));const zF="inputFocus";new le(zF,!1,p("inputFocus","Whether keyboard focus is inside an input box"));var sa=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},st=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const so=Ye("listService");let gk=class{constructor(e){this._themeService=e,this.disposables=new Q,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(i=this._lastFocusedWidget)===null||i===void 0||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const n=new NF(Qs(),"");this.disposables.add(Ud(n,this._themeService))}if(this.lists.some(n=>n.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),qo(e.onDidFocus(()=>this.setLastFocusedList(e)),Be(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};gk=sa([st(0,Ct)],gk);const UF=new le("listFocus",!0),W1=new le("listSupportsMultiselect",!0),$F=se.and(UF,se.not(zF)),pN=new le("listHasSelectionOrFocus",!1),mN=new le("listDoubleSelection",!1),_N=new le("listMultiSelection",!1),V1=new le("listSelectionNavigation",!1),rJ=new le("listSupportsFind",!0),bN=new le("treeElementCanCollapse",!1),aJ=new le("treeElementHasParent",!1),vN=new le("treeElementCanExpand",!1),lJ=new le("treeElementHasChild",!1),cJ=new le("treeFindOpen",!1),jF="listTypeNavigationMode",KF="listAutomaticKeyboardNavigation";function H1(o,e){const t=o.createScoped(e.getHTMLElement());return UF.bindTo(t),t}const Sh="workbench.list.multiSelectModifier",fk="workbench.list.openMode",Gs="workbench.list.horizontalScrolling",CN="workbench.list.defaultFindMode",wN="workbench.list.keyboardNavigation",xm="workbench.tree.indent",rC="workbench.tree.renderIndentGuides",tr="workbench.list.smoothScrolling",Yr="workbench.list.mouseWheelScrollSensitivity",Qr="workbench.list.fastScrollSensitivity",aC="workbench.tree.expandMode";function Xr(o){return o.getValue(Sh)==="alt"}class dJ extends H{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Xr(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Sh)&&(this.useAltAsMultipleSelectionModifier=Xr(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:xF(e)}isSelectionRangeChangeEvent(e){return IF(e)}}function z1(o,e){var t;const i=o.get(ot),n=o.get(_i),s=new Q;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter(a){return n.mightProducePrintableCharacter(a)}},smoothScrolling:Boolean(i.getValue(tr)),mouseWheelScrollSensitivity:i.getValue(Yr),fastScrollSensitivity:i.getValue(Qr),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:s.add(new dJ(i)),keyboardNavigationEventFilter:gJ(n)}),s]}let pk=class extends rr{constructor(e,t,i,n,s,r,a,l,c,d){const h=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:Boolean(c.getValue(Gs)),[u,g]=d.invokeFunction(z1,s);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Ao(l.getColorTheme(),A1)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=H1(r,this),this.themeService=l,this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=pN.bindTo(this.contextKeyService),this.listDoubleSelection=mN.bindTo(this.contextKeyService),this.listMultiSelection=_N.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Xr(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const _=this.getSelection(),b=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(_.length>0||b.length>0),this.listMultiSelection.set(_.length>1),this.listDoubleSelection.set(_.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const _=this.getSelection(),b=this.getFocus();this.listHasSelectionOrFocus.set(_.length>0||b.length>0)})),this.disposables.add(c.onDidChangeConfiguration(_=>{_.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(c));let b={};if(_.affectsConfiguration(Gs)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(Gs));b=Object.assign(Object.assign({},b),{horizontalScrolling:v})}if(_.affectsConfiguration(tr)){const v=Boolean(c.getValue(tr));b=Object.assign(Object.assign({},b),{smoothScrolling:v})}if(_.affectsConfiguration(Yr)){const v=c.getValue(Yr);b=Object.assign(Object.assign({},b),{mouseWheelScrollSensitivity:v})}if(_.affectsConfiguration(Qr)){const v=c.getValue(Qr);b=Object.assign(Object.assign({},b),{fastScrollSensitivity:v})}Object.keys(b).length>0&&this.updateOptions(b)})),this.navigator=new qF(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=Ud(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),super.dispose()}};pk=sa([st(5,Ee),st(6,so),st(7,Ct),st(8,ot),st(9,Ae)],pk);let HM=class extends wX{constructor(e,t,i,n,s,r,a,l,c,d){const h=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:Boolean(c.getValue(Gs)),[u,g]=d.invokeFunction(z1,s);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Ao(l.getColorTheme(),A1)),u),{horizontalScrolling:h})),this.disposables=new Q,this.disposables.add(g),this.contextKeyService=H1(r,this),this.themeService=l,this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Xr(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),s.overrideStyles&&this.disposables.add(Ud(this,l,s.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration(_=>{_.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(c));let b={};if(_.affectsConfiguration(Gs)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(Gs));b=Object.assign(Object.assign({},b),{horizontalScrolling:v})}if(_.affectsConfiguration(tr)){const v=Boolean(c.getValue(tr));b=Object.assign(Object.assign({},b),{smoothScrolling:v})}if(_.affectsConfiguration(Yr)){const v=c.getValue(Yr);b=Object.assign(Object.assign({},b),{mouseWheelScrollSensitivity:v})}if(_.affectsConfiguration(Qr)){const v=c.getValue(Qr);b=Object.assign(Object.assign({},b),{fastScrollSensitivity:v})}Object.keys(b).length>0&&this.updateOptions(b)})),this.navigator=new qF(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=Ud(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};HM=sa([st(5,Ee),st(6,so),st(7,Ct),st(8,ot),st(9,Ae)],HM);let zM=class extends F1{constructor(e,t,i,n,s,r,a,l,c,d,h){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:Boolean(d.getValue(Gs)),[g,f]=h.invokeFunction(z1,r);super(e,t,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Ao(c.getColorTheme(),A1)),g),{horizontalScrolling:u})),this.disposables.add(f),this.contextKeyService=H1(a,this),this.themeService=c,this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(r.selectionNavigation)),this.listHasSelectionOrFocus=pN.bindTo(this.contextKeyService),this.listDoubleSelection=mN.bindTo(this.contextKeyService),this.listMultiSelection=_N.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Xr(d),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const b=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(b.length>0||v.length>0),this.listMultiSelection.set(b.length>1),this.listDoubleSelection.set(b.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const b=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(b.length>0||v.length>0)})),this.disposables.add(d.onDidChangeConfiguration(b=>{b.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(d));let v={};if(b.affectsConfiguration(Gs)&&this.horizontalScrolling===void 0){const C=Boolean(d.getValue(Gs));v=Object.assign(Object.assign({},v),{horizontalScrolling:C})}if(b.affectsConfiguration(tr)){const C=Boolean(d.getValue(tr));v=Object.assign(Object.assign({},v),{smoothScrolling:C})}if(b.affectsConfiguration(Yr)){const C=d.getValue(Yr);v=Object.assign(Object.assign({},v),{mouseWheelScrollSensitivity:C})}if(b.affectsConfiguration(Qr)){const C=d.getValue(Qr);v=Object.assign(Object.assign({},v),{fastScrollSensitivity:C})}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new hJ(this,Object.assign({configurationService:d},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=Ud(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};zM=sa([st(6,Ee),st(7,so),st(8,Ct),st(9,ot),st(10,Ae)],zM);class SN extends H{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new R),this.onDidOpen=this._onDidOpen.event,this._register(ge.filter(this.widget.onDidChangeSelection,n=>n.browserEvent instanceof KeyboardEvent)(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t==null?void 0:t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(fk))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(fk))!=="doubleClick"}))):this.openOnSingleClick=(i=t==null?void 0:t.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i,s=!1;this._open(this.getSelectedElement(),i,n,s,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,r=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const s=!1,r=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}_open(e,t,i,n,s){!e||this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class qF extends SN{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class hJ extends SN{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class uJ extends SN{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function gJ(o){let e=!1;return t=>{if(t.toKeybinding().isModifierKey())return!1;if(e)return e=!1,!1;const i=o.softDispatch(t,t.target);return i!=null&&i.enterChord?(e=!0,!1):(e=!1,!i)}}let UM=class extends uN{constructor(e,t,i,n,s,r,a,l,c,d){const{options:h,getTypeNavigationMode:u,disposable:g}=r.invokeFunction(L_,s);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Kd(this,s,u,s.overrideStyles,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};UM=sa([st(5,Ae),st(6,Ee),st(7,so),st(8,Ct),st(9,ot)],UM);let $M=class extends WF{constructor(e,t,i,n,s,r,a,l,c,d){const{options:h,getTypeNavigationMode:u,disposable:g}=r.invokeFunction(L_,s);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Kd(this,s,u,s.overrideStyles,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};$M=sa([st(5,Ae),st(6,Ee),st(7,so),st(8,Ct),st(9,ot)],$M);let jM=class extends oJ{constructor(e,t,i,n,s,r,a,l,c,d,h){const{options:u,getTypeNavigationMode:g,disposable:f}=a.invokeFunction(L_,r);super(e,t,i,n,s,u),this.disposables.add(f),this.internals=new Kd(this,r,g,r.overrideStyles,l,c,d,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};jM=sa([st(6,Ae),st(7,Ee),st(8,so),st(9,Ct),st(10,ot)],jM);let mk=class extends HF{constructor(e,t,i,n,s,r,a,l,c,d,h){const{options:u,getTypeNavigationMode:g,disposable:f}=a.invokeFunction(L_,r);super(e,t,i,n,s,u),this.disposables.add(f),this.internals=new Kd(this,r,g,r.overrideStyles,l,c,d,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};mk=sa([st(6,Ae),st(7,Ee),st(8,so),st(9,Ct),st(10,ot)],mk);let KM=class extends nJ{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const{options:g,getTypeNavigationMode:f,disposable:_}=l.invokeFunction(L_,a);super(e,t,i,n,s,r,g),this.disposables.add(_),this.internals=new Kd(this,a,f,a.overrideStyles,c,d,h,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};KM=sa([st(7,Ae),st(8,Ee),st(9,so),st(10,Ct),st(11,ot)],KM);function GF(o){const e=o.getValue(CN);if(e==="highlight")return Fr.Highlight;if(e==="filter")return Fr.Filter;const t=o.getValue(wN);if(t==="simple"||t==="highlight")return Fr.Highlight;if(t==="filter")return Fr.Filter}function L_(o,e){var t;const i=o.get(ot),n=o.get(vh),s=o.get(Ee),r=o.get(Ae),a=()=>{const u=s.getContextKeyValue(jF);if(u==="automatic")return Yl.Automatic;if(u==="trigger"||s.getContextKeyValue(KF)===!1)return Yl.Trigger},l=e.horizontalScrolling!==void 0?e.horizontalScrolling:Boolean(i.getValue(Gs)),[c,d]=r.invokeFunction(z1,e),h=e.additionalScrollHeight;return{getTypeNavigationMode:a,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},c),{indent:typeof i.getValue(xm)=="number"?i.getValue(xm):void 0,renderIndentGuides:i.getValue(rC),smoothScrolling:Boolean(i.getValue(tr)),defaultFindMode:GF(i),horizontalScrolling:l,additionalScrollHeight:h,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:i.getValue(aC)==="doubleClick",contextViewProvider:n})}}let Kd=class{constructor(e,t,i,n,s,r,a,l){var c;this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=H1(s,e),this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=rJ.bindTo(this.contextKeyService),this.listSupportFindWidget.set((c=t.findWidgetEnabled)!==null&&c!==void 0?c:!0),this.hasSelectionOrFocus=pN.bindTo(this.contextKeyService),this.hasDoubleSelection=mN.bindTo(this.contextKeyService),this.hasMultiSelection=_N.bindTo(this.contextKeyService),this.treeElementCanCollapse=bN.bindTo(this.contextKeyService),this.treeElementHasParent=aJ.bindTo(this.contextKeyService),this.treeElementCanExpand=vN.bindTo(this.contextKeyService),this.treeElementHasChild=lJ.bindTo(this.contextKeyService),this.treeFindOpen=cJ.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Xr(l),this.updateStyleOverrides(n);const h=()=>{const g=e.getFocus()[0];if(!g)return;const f=e.getNode(g);this.treeElementCanCollapse.set(f.collapsible&&!f.collapsed),this.treeElementHasParent.set(!!e.getParentElement(g)),this.treeElementCanExpand.set(f.collapsible&&f.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(g))},u=new Set;u.add(jF),u.add(KF),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const g=e.getSelection(),f=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(g.length>0||f.length>0),this.hasMultiSelection.set(g.length>1),this.hasDoubleSelection.set(g.length===2)})}),e.onDidChangeFocus(()=>{const g=e.getSelection(),f=e.getFocus();this.hasSelectionOrFocus.set(g.length>0||f.length>0),h()}),e.onDidChangeCollapseState(h),e.onDidChangeModel(h),e.onDidChangeFindOpenState(g=>this.treeFindOpen.set(g)),l.onDidChangeConfiguration(g=>{let f={};if(g.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(l)),g.affectsConfiguration(xm)){const _=l.getValue(xm);f=Object.assign(Object.assign({},f),{indent:_})}if(g.affectsConfiguration(rC)){const _=l.getValue(rC);f=Object.assign(Object.assign({},f),{renderIndentGuides:_})}if(g.affectsConfiguration(tr)){const _=Boolean(l.getValue(tr));f=Object.assign(Object.assign({},f),{smoothScrolling:_})}if((g.affectsConfiguration(CN)||g.affectsConfiguration(wN))&&e.updateOptions({defaultFindMode:GF(l)}),g.affectsConfiguration(Gs)&&t.horizontalScrolling===void 0){const _=Boolean(l.getValue(Gs));f=Object.assign(Object.assign({},f),{horizontalScrolling:_})}if(g.affectsConfiguration(aC)&&t.expandOnlyOnTwistieClick===void 0&&(f=Object.assign(Object.assign({},f),{expandOnlyOnTwistieClick:l.getValue(aC)==="doubleClick"})),g.affectsConfiguration(Yr)){const _=l.getValue(Yr);f=Object.assign(Object.assign({},f),{mouseWheelScrollSensitivity:_})}if(g.affectsConfiguration(Qr)){const _=l.getValue(Qr);f=Object.assign(Object.assign({},f),{fastScrollSensitivity:_})}Object.keys(f).length>0&&e.updateOptions(f)}),this.contextKeyService.onDidChangeContext(g=>{g.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new uJ(e,Object.assign({configurationService:l},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){nt(this.styler),this.styler=e?Ud(this.tree,this.themeService,e):H.None}dispose(){this.disposables=nt(this.disposables),nt(this.styler),this.styler=void 0}};Kd=sa([st(4,Ee),st(5,so),st(6,Ct),st(7,ot)],Kd);const fJ=zt.as(rl.Configuration);fJ.registerConfiguration({id:"workbench",order:7,title:p("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Sh]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[p("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:p({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[fk]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Gs]:{type:"boolean",default:!1,description:p("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[xm]:{type:"number",default:8,minimum:4,maximum:40,description:p("tree indent setting","Controls tree indentation in pixels.")},[rC]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:p("render tree indent guides","Controls whether the tree should render indent guides.")},[tr]:{type:"boolean",default:!1,description:p("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Yr]:{type:"number",default:1,markdownDescription:p("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Qr]:{type:"number",default:5,description:p("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[CN]:{type:"string",enum:["highlight","filter"],enumDescriptions:[p("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),p("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:p("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[wN]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[p("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),p("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),p("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:p("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:p("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' instead.")},[aC]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}});var _k;(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(_k||(_k={}));const yh={Quickaccess:"workbench.contributions.quickaccess"};class pJ{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),Be(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return i_([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}zt.add(yh.Quickaccess,new pJ);const dl=Ye("quickInputService");var mJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let bk=class extends H{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=zt.as(yh.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const f=a.value.substr(l.prefix.length);f&&(g=`${r.prefix}${f}`)}if(!g){const f=s==null?void 0:s.defaultFilterValue;f===_k.LAST?g=this.lastAcceptedPickerValues.get(r):typeof f=="string"&&(g=`${r.prefix}${f}`)}typeof g=="string"&&(e=g)}const c=new Q,d=c.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,r,i),d.placeholder=r==null?void 0:r.placeholder,d.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||(i==null?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:To.SECOND),d.contextKey=r==null?void 0:r.contextKey,d.filterValue=g=>g.substring(r?r.prefix.length:0),r!=null&&r.placeholder&&(d.ariaLabel=r==null?void 0:r.placeholder);let h;t&&(h=new RI,c.add(Xa(d.onWillAccept)(g=>{g.veto(),d.hide()}))),c.add(this.registerPickerListeners(d,s,r,e));const u=c.add(new Qi);if(s&&c.add(s.provide(d,u.token)),Xa(d.onDidHide)(()=>{d.selectedItems.length===0&&u.cancel(),c.dispose(),h==null||h.complete(d.selectedItems.slice(0))}),d.show(),t)return h==null?void 0:h.p}adjustValueSelection(e,t,i){var n;let s;i!=null&&i.preserveValue?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n){const s=new Q,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add(Be(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):r.value=a})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),s}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};bk=mJ([qM(0,dl),qM(1,Ae)],bk);var _J=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let vk=class extends lz{constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(bk))),this._quickAccess}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),returnFocus:()=>e.focus(),createList:(s,r,a,l,c)=>this.instantiationService.createInstance(pk,s,r,a,l,c),styles:this.computeStyles()},n=this._register(new P1(Object.assign(Object.assign({},i),t)));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout(s=>n.layout(s,e.offset.quickPickTop))),this._register(n.onShow(()=>this.resetContextKeys())),this._register(n.onHide(()=>this.resetContextKeys())),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new le(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=ze.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Ao(this.theme,{quickInputBackground:M2,quickInputForeground:Fz,quickInputTitleBackground:Bz,contrastBorder:We,widgetShadow:Ho})),inputBox:Ao(this.theme,{inputForeground:f1,inputBackground:g1,inputBorder:p1,inputValidationInfoBackground:ZI,inputValidationInfoForeground:YI,inputValidationInfoBorder:QI,inputValidationWarningBackground:XI,inputValidationWarningForeground:JI,inputValidationWarningBorder:eE,inputValidationErrorBackground:tE,inputValidationErrorForeground:iE,inputValidationErrorBorder:nE}),countBadge:Ao(this.theme,{badgeBackground:gu,badgeForeground:fu,badgeBorder:We}),button:Ao(this.theme,{buttonForeground:Uf,buttonBackground:lD,buttonHoverBackground:Ez,buttonBorder:We}),progressBar:Ao(this.theme,{progressBarBackground:Nz}),keybindingLabel:Ao(this.theme,{keybindingLabelBackground:Hz,keybindingLabelForeground:zz,keybindingLabelBorder:Uz,keybindingLabelBottomBorder:$z,keybindingLabelShadow:Ho}),list:Ao(this.theme,{listBackground:M2,listInactiveFocusForeground:jf,listInactiveSelectionIconForeground:Kf,listInactiveFocusBackground:qf,listFocusOutline:Ot,listInactiveFocusOutline:Ot,pickerGroupBorder:Vz,pickerGroupForeground:Wz})}}};vk=_J([Nf(0,Ae),Nf(1,Ee),Nf(2,Ct),Nf(3,al),Nf(4,Yg)],vk);var ZF=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},td=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Ck=class extends vk{constructor(e,t,i,n,s,r){super(t,i,n,s,new FD(e.getContainerDomNode(),r)),this.host=void 0;const a=wg.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return l.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};Ck=ZF([td(1,Ae),td(2,Ee),td(3,Ct),td(4,al),td(5,ct)],Ck);let wk=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Ck,e);this.mapEditorToService.set(e,t),Xa(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=ze.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};wk=ZF([td(0,Ae),td(1,ct)],wk);class wg{constructor(e){this.editor=e,this.widget=new U1(this.editor)}static get(e){return e.getContribution(wg.ID)}dispose(){this.widget.dispose()}}wg.ID="editor.controller.quickInput";class U1{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return U1.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}U1.ID="editor.contrib.quickInputWidget";tt(wg.ID,wg);class bJ{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function vJ(o){if(!o||!Array.isArray(o))return[];const e=[];let t=0;for(let i=0,n=o.length;i{const u=DJ(d.token,h.token);return u!==0?u:d.index-h.index});let t=0,i="000000",n="ffffff";for(;o.length>=1&&o[0].token==="";){const d=o.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(n=d.background)}const s=new SJ;for(const d of e)s.getId(d);const r=s.getId(i),a=s.getId(n),l=new yN(t,r,a),c=new LN(l);for(let d=0,h=o.length;d"u"){const n=this._match(t),s=LJ(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const yJ=/\b(comment|string|regex|regexp)\b/;function LJ(o){const e=o.match(yJ);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function DJ(o,e){return oe?1:0}class yN{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new yN(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class LN{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return typeof s<"u"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}const s=e.indexOf(".");let r,a;s===-1?(r=e,a=""):(r=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(r);typeof l>"u"&&(l=new LN(this._mainRule.clone()),this._children.set(r,l)),l.insert(a,t,i,n)}}function kJ(o){const e=[];for(let t=1,i=o.length;te.fire()),o==null||o.onDidProductIconThemeChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const i=o?o.getProductIconTheme():new QF,n={},s=a=>{const l=i.getIcon(a);if(!l)return;const c=l.font;return c?(n[c.id]=c.definition,`.codicon-${a.id}:before { content: '${l.fontCharacter}'; font-family: ${x2(c.id)}; }`):`.codicon-${a.id}:before { content: '${l.fontCharacter}'; }`},r=[];for(const a of t.getIcons()){const l=s(a);l&&r.push(l)}for(const a in n){const l=n[a],c=l.weight?`font-weight: ${l.weight};`:"",d=l.style?`font-style: ${l.style};`:"",h=l.src.map(u=>`${Pd(u.location)} format('${u.format}')`).join(", ");r.push(`@font-face { src: ${h}; font-family: ${x2(a)};${c}${d} font-display: block; }`)}return r.join(` -`)}}}class QF{getIcon(e){const t=U5();let i=e.defaults;for(;at.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Ra="vs",Ku="vs-dark",Sd="hc-black",yd="hc-light",XF=zt.as(D4.ColorContribution),AJ=zt.as(f4.ThemingContribution);class JF{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(I0(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,W.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=Sk(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,W.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=XF.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Ra:return Hs.LIGHT;case Sd:return Hs.HIGH_CONTRAST_DARK;case yd:return Hs.HIGH_CONTRAST_LIGHT;default:return Hs.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=Sk(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=YF.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=qi.getForeground(s),a=qi.getFontStyle(s);return{foreground:r,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4),strikethrough:Boolean(a&8)}}}function I0(o){return o===Ra||o===Ku||o===Sd||o===yd}function Sk(o){switch(o){case Ra:return xJ;case Ku:return IJ;case Sd:return EJ;case yd:return NJ}}function Fb(o){const e=Sk(o);return new JF(o,e)}class MJ extends H{constructor(){super(),this._onColorThemeChange=this._register(new R),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new R),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new QF,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Ra,Fb(Ra)),this._knownThemes.set(Ku,Fb(Ku)),this._knownThemes.set(Sd,Fb(Sd)),this._knownThemes.set(yd,Fb(yd));const e=TJ(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Ra),this._onOSSchemeChanged(),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),DI("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Gp(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Qs(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),H.None}_registerShadowDomContainer(e){const t=Qs(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let i=0;i{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Ra),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==cn(this._theme.type)){let t;Xp(this._theme.type)?t=e?Sd:Ku:t=e?yd:Ra,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};AJ.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of XF.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${L4(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor { ${n.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}F1.InstanceCount=0;const xX={inputActiveOptionBorder:W.fromHex("#007ACC00"),inputActiveOptionForeground:W.fromHex("#FFFFFF"),inputActiveOptionBackground:W.fromHex("#0E639C50")};class y_ extends yo{constructor(e){super(),this._onChange=this._register(new R),this.onChange=this._onChange.event,this._onKeyDown=this._register(new R),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},xX),e),this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Ln.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const IX=p("caseDescription","Match Case"),EX=p("wordsDescription","Match Whole Word"),NX=p("regexDescription","Use Regular Expression");class M5 extends y_{constructor(e){super({icon:m.caseSensitive,title:IX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class R5 extends y_{constructor(e){super({icon:m.wholeWord,title:EX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class O5 extends y_{constructor(e){super({icon:m.regex,title:NX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}const TX=p("defaultLabel","input");class AX extends yo{constructor(e,t,i,n){var s;super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalToggles=[],this._onDidOptionChange=this._register(new R),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new R),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new R),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new R),this._onKeyUp=this._register(new R),this._onCaseSensitiveKeyDown=this._register(new R),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new R),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||TX,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const r=n.appendCaseSensitiveLabel||"",a=n.appendWholeWordsLabel||"",l=n.appendRegexLabel||"",c=n.history||[],d=!!n.flexibleHeight,h=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y5(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:c,showHistoryHint:n.showHistoryHint,flexibleHeight:d,flexibleWidth:h,flexibleMaxHeight:u})),this.regex=this._register(new O5({appendTitle:l,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(f=>{this._onRegexKeyDown.fire(f)})),this.wholeWords=this._register(new R5({appendTitle:a,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new M5({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(f=>{this._onDidOptionChange.fire(f),!f&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(f=>{this._onCaseSensitiveKeyDown.fire(f)}));const g=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,f=>{if(f.equals(15)||f.equals(17)||f.equals(9)){const _=g.indexOf(document.activeElement);if(_>=0){let b=-1;f.equals(17)?b=(_+1)%g.length:f.equals(15)&&(_===0?b=g.length-1:b=_-1),f.equals(9)?(g[_].blur(),this.inputBox.focus()):b>=0&&g[b].focus(),ut.stop(f,!0)}}}),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this._showOptionButtons||(this.caseSensitive.domNode.style.display="none",this.wholeWords.domNode.style.display="none",this.regex.domNode.style.display="none");for(const f of(s=n==null?void 0:n.additionalToggles)!==null&&s!==void 0?s:[])this._register(f),this.controls.appendChild(f.domNode),this._register(f.onChange(_=>{this._onDidOptionChange.fire(_),!_&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(f);this.additionalToggles.length>0&&(this.controls.style.display="block"),this.inputBox.paddingRight=(this._showOptionButtons?this.caseSensitive.width()+this.wholeWords.width()+this.regex.width():0)+this.additionalToggles.reduce((f,_)=>f+_.width(),0),this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(G(this.inputBox.inputElement,"compositionstart",f=>{this.imeSessionInProgress=!0})),this._register(G(this.inputBox.inputElement,"compositionend",f=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,f=>this._onKeyDown.fire(f)),this.onkeyup(this.inputBox.inputElement,f=>this._onKeyUp.fire(f)),this.oninput(this.inputBox.inputElement,f=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,f=>this._onMouseDown.fire(f))}get onDidChange(){return this.inputBox.onDidChange}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);for(const i of this.additionalToggles)i.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var gd;(function(o){o[o.Unknown=0]="Unknown",o[o.Twistie=1]="Twistie",o[o.Element=2]="Element",o[o.Filter=3]="Filter"})(gd||(gd={}));class Ws extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class aN{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function lN(o){return typeof o=="object"&&"visibility"in o&&"data"in o}function Lm(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}function GS(o){return typeof o.collapsible=="boolean"}class MX{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new gI,this._onDidChangeCollapseState=new R,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new R,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new R,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Kr(RP),this.collapseByDefault=typeof n.collapseByDefault>"u"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren>"u"?!1:n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=je.empty(),n={}){if(e.length===0)throw new Ws(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,r){var a;n===void 0&&(n=je.empty()),r===void 0&&(r=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,i,n,s);const c=[...n],d=t[t.length-1],h=new xr({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,d),...c,...l.children.slice(d+i)].map(b=>e.getId(b.element).toString())}).ComputeDiff(!1);if(h.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,i,c,s);const u=t.slice(0,-1),g=(b,v,C)=>{if(r>0)for(let w=0;wC.originalStart-v.originalStart))g(f,_,f-(b.originalStart+b.originalLength)),f=b.originalStart,_=b.modifiedStart-d,this.spliceSimple([...u,f],b.originalLength,je.slice(c,_,_+b.modifiedLength),s);g(f,_,f)}spliceSimple(e,t,i=je.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:c,visible:d}=this.getParentNodeWithListIndex(e),h=[],u=je.map(i,y=>this.createTreeNode(y,a,a.visible?1:0,c,h,n)),g=e[e.length-1],f=a.children.length>0;let _=0;for(let y=g;y>=0&&yr.getId(y.element).toString())):a.lastDiffIds=a.children.map(y=>r.getId(y.element).toString()):a.lastDiffIds=void 0;let S=0;for(const y of w)y.visible&&S++;if(S!==0)for(let y=g+b.length;yD+(I.visible?I.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,C-y),this.list.splice(l,y,h)}if(w.length>0&&s){const y=D=>{s(D),D.children.forEach(y)};w.forEach(y)}this._onDidSplice.fire({insertedNodes:b,deletedNodes:w});const k=a.children.length>0;f!==k&&this.setCollapsible(e.slice(0,-1),k);let x=a;for(;x;){if(x.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}x=x.parent}}rerender(e){if(e.length===0)throw new Ws(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!GS(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return r}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const r=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=r-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(GS(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!GS(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,r){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);const c=e.children||je.empty(),d=n&&l!==0&&!a.collapsed,h=je.map(c,f=>this.createTreeNode(f,a,l,d,s,r));let u=0,g=1;for(const f of h)a.children.push(f),g+=f.renderNodeCount,f.visible&&(f.visibleChildIndex=u++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=l===2?u>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=g):(a.renderNodeCount=0,n&&s.pop()),r==null||r(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,s,i,n&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):lN(i)?(e.filterData=i.data,Lm(i.visibility)):(e.filterData=void 0,Lm(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new Ws(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new Ws(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new Ws(this.user,"Invalid tree location");for(let l=0;lt.element)),this.data=e}}function ZS(o){return o instanceof w_?new OX(o):o}class PX{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=H.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,ZS(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(ZS(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return r;if(a&&typeof r!="boolean"&&r.autoExpand&&(this.autoExpandDisposable=Ad(()=>{const u=this.modelProvider(),g=u.getNodeLocation(t);u.isCollapsed(g)&&u.setCollapsed(g,!1),this.autoExpandNode=void 0},500)),typeof r=="boolean"||!r.accept||typeof r.bubble>"u"||r.feedback){if(!s){const u=typeof r=="boolean"?r:r.accept,g=typeof r=="boolean"?void 0:r.effect;return{accept:u,effect:g,feedback:[i]}}return r}if(r.bubble===1){const u=this.modelProvider(),g=u.getNodeLocation(t),f=u.getParentNodeLocation(g),_=u.getNode(f),b=f&&u.getListIndex(f);return this.onDragOver(e,_,b,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),h=l.getListRenderCount(c);return Object.assign(Object.assign({},r),{feedback:Cn(d,d+h)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(ZS(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}}function FX(o,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new PX(o,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(t){const i=o(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}})})}class cN{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;(n=(i=this.delegate).setDynamicHeight)===null||n===void 0||n.call(i,e.element,t)}}var Dm;(function(o){o.None="none",o.OnHover="onHover",o.Always="always"})(Dm||(Dm={}));class BX{constructor(e,t=[]){this._elements=t,this.disposables=new Q,this.onDidChange=ge.forEach(e,i=>this._elements=i,this.disposables)}get elements(){return this._elements}dispose(){this.disposables.dispose()}}class km{constructor(e,t,i,n,s={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=km.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new RX,this.activeIndentNodes=new Set,this.indentGuidesDisposable=H.None,this.disposables=new Q,this.templateId=e.templateId,this.updateOptions(s),ge.map(i,a=>a.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(r=e.onDidChangeTwistieState)===null||r===void 0||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"&&(this.indent=Zn(e.indent,0,40)),typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==Dm.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const i=new Q;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=q(e,J(".monaco-tl-row")),i=q(t,J(".monaco-tl-indent")),n=q(t,J(".monaco-tl-twistie")),s=q(t,J(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:H.None,templateData:r}}renderElement(e,t,i,n){typeof n=="number"&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const s=km.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${s}px`,i.indent.style.width=`${s+this.indent-16}px`,this.renderTwistie(e,i),typeof n=="number"&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var s,r;i.indentGuidesDisposable.dispose(),(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,e,t,i.templateData,n),typeof n=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);!t||this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);!t||(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...m.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...m.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Si(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new Q,n=this.modelProvider();let s=e;for(;;){const r=n.getNodeLocation(s),a=n.getParentNodeLocation(r);if(!a)break;const l=n.getNode(a),c=J(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add(Be(()=>this.renderedIndentGuides.delete(l,c))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(n=>{const s=i.getNodeLocation(n);try{const r=i.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):r&&t.add(i.getNode(r))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),nt(this.disposables)}}km.DefaultIndent=8;class WX{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Q,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}filter(e,t){let i=1;if(this._filter){const r=this._filter.filter(e,t);if(typeof r=="boolean"?i=r?1:0:lN(r)?i=Lm(r.visibility):i=r,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Zo.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const r of s){const a=r&&r.toString();if(typeof a>"u")return{data:Zo.Default,visibility:i};const l=mg(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,s.length===1?{data:l,visibility:i}:{data:{label:a,score:l},visibility:i}}return this.tree.findMode===Fr.Filter?2:{data:Zo.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){nt(this.disposables)}}var Fr;(function(o){o[o.Highlight=0]="Highlight",o[o.Filter=1]="Filter"})(Fr||(Fr={}));class VX{constructor(e,t,i,n,s){var r;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=s,this._pattern="",this.width=0,this._onDidChangeMode=new R,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangePattern=new R,this._onDidChangeOpenState=new R,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new Q,this.disposables=new Q,this._mode=(r=e.options.defaultFindMode)!==null&&r!==void 0?r:Fr.Highlight,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t;const i=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&i?(e=this.widget)===null||e===void 0||e.showMessage({type:2,content:p("not found","No elements found.")}):(t=this.widget)===null||t===void 0||t.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===Fr.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Zo.isDefault(e.filterData)}style(e){var t;this.styles=e,(t=this.widget)===null||t===void 0||t.style(e)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function FM(o){let e=gd.Unknown;return rS(o.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=gd.Twistie:rS(o.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=gd.Element:rS(o.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=gd.Filter),{browserEvent:o.browserEvent,element:o.element?o.element.element:null,target:e}}function D0(o,e){e(o),o.children.forEach(t=>D0(t,e))}class YS{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new R,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(t!=null&&t.__forceEvent)&&Ss(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const l=this.createNodeSet(),c=d=>l.delete(d);t.forEach(d=>D0(d,c)),this.set([...l.values()]);return}const i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>D0(l,n));const s=new Map,r=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>D0(l,r));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!i.has(c))a.push(l);else{const h=s.get(c);h&&a.push(h)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class HX extends E5{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(D5(e.browserEvent.target)||jd(e.browserEvent.target)||yu(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,s&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const r=this.tree.model,a=r.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),r.setCollapsed(a,void 0,l),s&&n)return}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(e)}}class zX extends rr{constructor(e,t,i,n,s,r,a,l){super(e,t,i,n,l),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=a}createMouseController(e){return new HX(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let r;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(r=e+l)}),n.length>0&&super.setFocus(Qa([...super.getFocus(),...n])),s.length>0&&super.setSelection(Qa([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class P5{constructor(e,t,i,n,s={}){var r;this._user=e,this._options=s,this.eventBufferer=new gI,this.onDidChangeFindOpenState=ge.None,this.disposables=new Q,this._onWillRefilter=new R,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new R;const a=new cN(i),l=new AT,c=new AT,d=this.disposables.add(new BX(c.event));this.renderers=n.map(g=>new km(g,()=>this.model,l.event,d,s));for(const g of this.renderers)this.disposables.add(g);let h;s.keyboardNavigationLabelProvider&&(h=new WX(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:h}),this.disposables.add(h)),this.focus=new YS(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new YS(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new YS(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new zX(e,t,a,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},FX(()=>this.model,s)),{tree:this})),this.model=this.createModel(e,this.view,s),l.input=this.model.onDidChangeCollapseState;const u=ge.forEach(this.model.onDidSplice,g=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(g),this.selection.onDidModelSplice(g)})},this.disposables);if(u(()=>null,null,this.disposables),c.input=ge.chain(ge.any(u,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const g=new Set;for(const f of this.focus.getNodes())g.add(f);for(const f of this.selection.getNodes())g.add(f);return[...g.values()]}).event,s.keyboardSupport!==!1){const g=ge.chain(this.view.onKeyDown).filter(f=>!jd(f.target)).map(f=>new Rt(f));g.filter(f=>f.keyCode===15).on(this.onLeftArrow,this,this.disposables),g.filter(f=>f.keyCode===17).on(this.onRightArrow,this,this.disposables),g.filter(f=>f.keyCode===10).on(this.onSpace,this,this.disposables)}((r=s.findWidgetEnabled)!==null&&r!==void 0?r:!0)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider?(this.findController=new VX(this,this.model,this.view,h,s.contextViewProvider),this.focusNavigationFilter=g=>this.findController.shouldAllowFocus(g),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode):this.onDidChangeFindMode=ge.None,this.styleElement=Qs(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Dm.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ge.filter(ge.map(this.view.onMouseDblClick,FM),e=>e.target!==gd.Filter)}get onPointer(){return ge.map(this.view.onPointer,FM)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return ge.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:Fr.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Dm.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),tc(t)&&((i=this.findController)===null||i===void 0||i.layout(t))}style(e){var t;const i=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${i}:hover .monaco-tl-indent > .indent-guide, .monaco-list${i}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${i} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join(` +`),(t=this.findController)===null||t===void 0||t.style(e),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);i!==-1&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){nt(this.disposables),this.view.dispose()}}class dN{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new MX(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=je.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=je.empty(),i){const n=new Set,s=new Set,r=l=>{var c;if(l.element===null)return;const d=l;if(n.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.add(h),this.nodesByIdentity.set(h,d)}(c=i.onDidCreateNode)===null||c===void 0||c.call(i,d)},a=l=>{var c;if(l.element===null)return;const d=l;if(n.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.has(h)||this.nodesByIdentity.delete(h)}(c=i.onDidDeleteNode)===null||c===void 0||c.call(i,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:r,onDidDeleteNode:a}))}preserveCollapseState(e=je.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),je.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s=typeof t.collapsed<"u"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Ws(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function k0(o){const e=[o.element],t=o.incompressible||!1;return{element:{elements:e,incompressible:t},children:je.map(je.from(o.children),k0),collapsible:o.collapsible,collapsed:o.collapsed}}function x0(o){const e=[o.element],t=o.incompressible||!1;let i,n;for(;[n,i]=je.consume(je.from(o.children),2),!(n.length!==1||n[0].incompressible);)o=n[0],e.push(o.element);return{element:{elements:e,incompressible:t},children:je.map(je.concat(n,i),x0),collapsible:o.collapsible,collapsed:o.collapsed}}function dk(o,e=0){let t;return edk(i,0)),e===0&&o.element.incompressible?{element:o.element.elements[e],children:t,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[e],children:t,collapsible:o.collapsible,collapsed:o.collapsed}}function BM(o){return dk(o,0)}function F5(o,e,t){return o.element===e?Object.assign(Object.assign({},o),{children:t}):Object.assign(Object.assign({},o),{children:je.map(je.from(o.children),i=>F5(i,e,t))})}const UX=o=>({getId(e){return e.elements.map(t=>o.getId(t).toString()).join("\0")}});class $X{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new dN(e,t,i),this.enabled=typeof i.compressionEnabled>"u"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=je.empty(),i){const n=i.diffIdentityProvider&&UX(i.diffIdentityProvider);if(e===null){const g=je.map(t,this.enabled?x0:k0);this._setChildren(null,g,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=BM(r),d=F5(c,e,t),h=(this.enabled?x0:k0)(d),u=l.children.map(g=>g===r?h:g);this._setChildren(l.element,u,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=je.map(i,BM),s=je.map(n,e?x0:k0);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},r=a=>{for(const l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:s,onDidDeleteNode:r}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return t}}const jX=o=>o[o.length-1];class hN{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new hN(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function KX(o,e){return{splice(t,i,n){e.splice(t,i,n.map(s=>o.map(s)))},updateElementHeight(t,i){e.updateElementHeight(t,i)}}}function qX(o,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(o(t))}},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){return e.filter.filter(o(t),i)}}})}class GX{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||jX;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new aN(s=>new hN(n,s)),this.model=new $X(e,KX(this.nodeMapper,t),qX(n,i))}get onDidSplice(){return ge.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return ge.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return ge.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=je.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var ZX=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class uN extends P5{constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=je.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new dN(e,t,i)}}class B5{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){var s,r,a,l;i.compressedTreeNode?(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,i.compressedTreeNode,t,i.data,n):(l=(a=this.renderer).disposeElement)===null||l===void 0||l.call(a,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}ZX([pi],B5.prototype,"compressedTreeNodeProvider",null);function YX(o,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=o().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}class W5 extends uN{constructor(e,t,i,n,s={}){const r=()=>this,a=n.map(l=>new B5(r,l));super(e,t,i,a,YX(r,s))}setChildren(e,t=je.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new GX(e,t,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var vl=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function QS(o){return Object.assign(Object.assign({},o),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function hk(o,e){return e.parent?e.parent===o?!0:hk(o,e.parent):!1}function QX(o,e){return o===e||hk(o,e)||hk(e,o)}class gN{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new gN(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class XX{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...m.treeItemLoading.classNamesArray),!0):(t.classList.remove(...m.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function WM(o){return{browserEvent:o.browserEvent,elements:o.elements.map(e=>e.element)}}function VM(o){return{browserEvent:o.browserEvent,element:o.element&&o.element.element,target:o.target}}class JX extends w_{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function XS(o){return o instanceof w_?new JX(o):o}class eJ{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,XS(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(XS(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(XS(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}}function V5(o){return o&&Object.assign(Object.assign({},o),{collapseByDefault:!0,identityProvider:o.identityProvider&&{getId(e){return o.identityProvider.getId(e.element)}},dnd:o.dnd&&new eJ(o.dnd),multipleSelectionController:o.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return o.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return o.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:o.accessibilityProvider&&Object.assign(Object.assign({},o.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:o.accessibilityProvider.getRole?e=>o.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:o.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=o.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return o.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return o.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:o.accessibilityProvider.getWidgetRole?()=>o.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:o.accessibilityProvider.getAriaLevel&&(e=>o.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:o.accessibilityProvider.getActiveDescendantId&&(e=>o.accessibilityProvider.getActiveDescendantId(e.element))}),filter:o.filter&&{filter(e,t){return o.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},o.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof o.expandOnlyOnTwistieClick>"u"?void 0:typeof o.expandOnlyOnTwistieClick!="function"?o.expandOnlyOnTwistieClick:e=>o.expandOnlyOnTwistieClick(e.element),additionalScrollHeight:o.additionalScrollHeight})}function uk(o,e){e(o),o.children.forEach(t=>uk(t,e))}class H5{constructor(e,t,i,n,s,r={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new R,this._onDidChangeNodeSlowState=new R,this.nodeMapper=new aN(a=>new gN(a)),this.disposables=new Q,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,i,n,r),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=QS({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return ge.map(this.tree.onDidChangeFocus,WM)}get onDidChangeSelection(){return ge.map(this.tree.onDidChangeSelection,WM)}get onMouseDblClick(){return ge.map(this.tree.onMouseDblClick,VM)}get onPointer(){return ge.map(this.tree.onPointer,VM)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,s){const r=new cN(i),a=n.map(c=>new XX(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=V5(s)||{};return new uN(e,t,r,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return vl(this,void 0,void 0,function*(){this.refreshPromises.forEach(n=>n.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return vl(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ws(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,s),i)try{this.tree.rerender(r)}catch{}})}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return vl(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ws(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield ge.toPromise(this._onDidRender.event)),n})}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Ws(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return vl(this,void 0,void 0,function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)})}refreshNode(e,t,i){return vl(this,void 0,void 0,function*(){let n;if(this.subTreeRefreshPromises.forEach((s,r)=>{!n&&QX(r,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,i)})}doRefreshSubTree(e,t,i){return vl(this,void 0,void 0,function*(){let n;e.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=yield this.doRefreshNode(e,t,i);e.stale=!1,yield KL.settled(s.map(r=>this.doRefreshSubTree(r,t,i)))}finally{n()}})}doRefreshNode(e,t,i){return vl(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(je.empty());else{const s=this.doGetChildren(e);if(ET(s))n=Promise.resolve(s);else{const r=sc(800);r.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),n=s.finally(()=>r.cancel())}}try{const s=yield n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),ea(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return ET(i)?this.processChildren(i):(t=Ri(()=>vl(this,void 0,void 0,function*(){return this.processChildren(yield i)})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Te))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const r=new Map,a=new Map;for(const d of e.children)if(r.set(d.element,d),this.identityProvider){const h=this.tree.isCollapsed(d);a.set(d.id,{node:d,collapsed:h})}const l=[],c=s.map(d=>{const h=!!this.dataSource.hasChildren(d);if(!this.identityProvider){const _=QS({element:d,parent:e,hasChildren:h});return h&&this.collapseByDefault&&!this.collapseByDefault(d)&&(_.collapsedByDefault=!1,l.push(_)),_}const u=this.identityProvider.getId(d).toString(),g=a.get(u);if(g){const _=g.node;return r.delete(_.element),this.nodes.delete(_.element),this.nodes.set(d,_),_.element=d,_.hasChildren=h,i?g.collapsed?(_.children.forEach(b=>uk(b,v=>this.nodes.delete(v.element))),_.children.splice(0,_.children.length),_.stale=!0):l.push(_):h&&this.collapseByDefault&&!this.collapseByDefault(d)&&(_.collapsedByDefault=!1,l.push(_)),_}const f=QS({element:d,parent:e,id:u,hasChildren:h});return n&&n.viewState.focus&&n.viewState.focus.indexOf(u)>-1&&n.focus.push(f),n&&n.viewState.selection&&n.viewState.selection.indexOf(u)>-1&&n.selection.push(f),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(u)>-1?l.push(f):h&&this.collapseByDefault&&!this.collapseByDefault(d)&&(f.collapsedByDefault=!1,l.push(f)),f});for(const d of r.values())uk(d,h=>this.nodes.delete(h.element));for(const d of c)this.nodes.set(d.element,d);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].collapsedByDefault=!1,l.push(c[0])),l}render(e,t,i){const n=e.children.map(r=>this.asTreeElement(r,t)),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)}}});this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:i=e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?je.map(e.children,n=>this.asTreeElement(n,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class fN{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new fN(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class tJ{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...m.treeItemLoading.classNamesArray),!0):(t.classList.remove(...m.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var s,r;(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=nt(this.disposables)}}function iJ(o){const e=o&&V5(o);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}})})}class nJ extends H5{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new aN(l=>new fN(l)),this.filter=a.filter}createTree(e,t,i,n,s){const r=new cN(i),a=n.map(c=>new tJ(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=iJ(s)||{};return new W5(e,t,r,a,l)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=u=>this.identityProvider.getId(u).toString(),n=u=>{const g=new Set;for(const f of u){const _=this.tree.getCompressedTreeNode(f===this.root?null:f);if(!!_.element)for(const b of _.element.elements)g.add(i(b.element))}return g},s=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const h=u=>{const g=u.element;if(g)for(let f=0;f{const i=this.filter.filter(t,1),n=sJ(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function sJ(o){return typeof o=="boolean"?o?1:0:lN(o)?Lm(o.visibility):Lm(o)}class oJ extends P5{constructor(e,t,i,n,s,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(e,t,i){return new dN(e,t,i)}}new le("isMac",Ge,p("isMac","Whether the operating system is macOS"));new le("isLinux",dn,p("isLinux","Whether the operating system is Linux"));const B1=new le("isWindows",Yi,p("isWindows","Whether the operating system is Windows"));new le("isWeb",Sc,p("isWeb","Whether the platform is a web browser"));new le("isMacNative",Ge&&!Sc,p("isMacNative","Whether the operating system is macOS on a non-browser platform"));new le("isIOS",Ur,p("isIOS","Whether the operating system is iOS"));new le("isDevelopment",!1,!0);new le("productQualityType","",p("productQualityType","Quality type of VS Code"));const z5="inputFocus";new le(z5,!1,p("inputFocus","Whether keyboard focus is inside an input box"));var sa=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},st=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const so=Ye("listService");let gk=class{constructor(e){this._themeService=e,this.disposables=new Q,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(i=this._lastFocusedWidget)===null||i===void 0||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const n=new N5(Qs(),"");this.disposables.add(Ud(n,this._themeService))}if(this.lists.some(n=>n.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),qo(e.onDidFocus(()=>this.setLastFocusedList(e)),Be(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};gk=sa([st(0,Ct)],gk);const U5=new le("listFocus",!0),W1=new le("listSupportsMultiselect",!0),$5=se.and(U5,se.not(z5)),pN=new le("listHasSelectionOrFocus",!1),mN=new le("listDoubleSelection",!1),_N=new le("listMultiSelection",!1),V1=new le("listSelectionNavigation",!1),rJ=new le("listSupportsFind",!0),bN=new le("treeElementCanCollapse",!1),aJ=new le("treeElementHasParent",!1),vN=new le("treeElementCanExpand",!1),lJ=new le("treeElementHasChild",!1),cJ=new le("treeFindOpen",!1),j5="listTypeNavigationMode",K5="listAutomaticKeyboardNavigation";function H1(o,e){const t=o.createScoped(e.getHTMLElement());return U5.bindTo(t),t}const Sh="workbench.list.multiSelectModifier",fk="workbench.list.openMode",Gs="workbench.list.horizontalScrolling",CN="workbench.list.defaultFindMode",wN="workbench.list.keyboardNavigation",xm="workbench.tree.indent",rC="workbench.tree.renderIndentGuides",tr="workbench.list.smoothScrolling",Yr="workbench.list.mouseWheelScrollSensitivity",Qr="workbench.list.fastScrollSensitivity",aC="workbench.tree.expandMode";function Xr(o){return o.getValue(Sh)==="alt"}class dJ extends H{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Xr(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Sh)&&(this.useAltAsMultipleSelectionModifier=Xr(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:x5(e)}isSelectionRangeChangeEvent(e){return I5(e)}}function z1(o,e){var t;const i=o.get(ot),n=o.get(_i),s=new Q;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter(a){return n.mightProducePrintableCharacter(a)}},smoothScrolling:Boolean(i.getValue(tr)),mouseWheelScrollSensitivity:i.getValue(Yr),fastScrollSensitivity:i.getValue(Qr),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:s.add(new dJ(i)),keyboardNavigationEventFilter:gJ(n)}),s]}let pk=class extends rr{constructor(e,t,i,n,s,r,a,l,c,d){const h=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:Boolean(c.getValue(Gs)),[u,g]=d.invokeFunction(z1,s);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Ao(l.getColorTheme(),A1)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=H1(r,this),this.themeService=l,this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=pN.bindTo(this.contextKeyService),this.listDoubleSelection=mN.bindTo(this.contextKeyService),this.listMultiSelection=_N.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Xr(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const _=this.getSelection(),b=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(_.length>0||b.length>0),this.listMultiSelection.set(_.length>1),this.listDoubleSelection.set(_.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const _=this.getSelection(),b=this.getFocus();this.listHasSelectionOrFocus.set(_.length>0||b.length>0)})),this.disposables.add(c.onDidChangeConfiguration(_=>{_.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(c));let b={};if(_.affectsConfiguration(Gs)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(Gs));b=Object.assign(Object.assign({},b),{horizontalScrolling:v})}if(_.affectsConfiguration(tr)){const v=Boolean(c.getValue(tr));b=Object.assign(Object.assign({},b),{smoothScrolling:v})}if(_.affectsConfiguration(Yr)){const v=c.getValue(Yr);b=Object.assign(Object.assign({},b),{mouseWheelScrollSensitivity:v})}if(_.affectsConfiguration(Qr)){const v=c.getValue(Qr);b=Object.assign(Object.assign({},b),{fastScrollSensitivity:v})}Object.keys(b).length>0&&this.updateOptions(b)})),this.navigator=new q5(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=Ud(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),super.dispose()}};pk=sa([st(5,Ee),st(6,so),st(7,Ct),st(8,ot),st(9,Ae)],pk);let HM=class extends wX{constructor(e,t,i,n,s,r,a,l,c,d){const h=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:Boolean(c.getValue(Gs)),[u,g]=d.invokeFunction(z1,s);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Ao(l.getColorTheme(),A1)),u),{horizontalScrolling:h})),this.disposables=new Q,this.disposables.add(g),this.contextKeyService=H1(r,this),this.themeService=l,this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Xr(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),s.overrideStyles&&this.disposables.add(Ud(this,l,s.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration(_=>{_.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(c));let b={};if(_.affectsConfiguration(Gs)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(Gs));b=Object.assign(Object.assign({},b),{horizontalScrolling:v})}if(_.affectsConfiguration(tr)){const v=Boolean(c.getValue(tr));b=Object.assign(Object.assign({},b),{smoothScrolling:v})}if(_.affectsConfiguration(Yr)){const v=c.getValue(Yr);b=Object.assign(Object.assign({},b),{mouseWheelScrollSensitivity:v})}if(_.affectsConfiguration(Qr)){const v=c.getValue(Qr);b=Object.assign(Object.assign({},b),{fastScrollSensitivity:v})}Object.keys(b).length>0&&this.updateOptions(b)})),this.navigator=new q5(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=Ud(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};HM=sa([st(5,Ee),st(6,so),st(7,Ct),st(8,ot),st(9,Ae)],HM);let zM=class extends F1{constructor(e,t,i,n,s,r,a,l,c,d,h){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:Boolean(d.getValue(Gs)),[g,f]=h.invokeFunction(z1,r);super(e,t,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Ao(c.getColorTheme(),A1)),g),{horizontalScrolling:u})),this.disposables.add(f),this.contextKeyService=H1(a,this),this.themeService=c,this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(r.selectionNavigation)),this.listHasSelectionOrFocus=pN.bindTo(this.contextKeyService),this.listDoubleSelection=mN.bindTo(this.contextKeyService),this.listMultiSelection=_N.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Xr(d),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const b=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(b.length>0||v.length>0),this.listMultiSelection.set(b.length>1),this.listDoubleSelection.set(b.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const b=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(b.length>0||v.length>0)})),this.disposables.add(d.onDidChangeConfiguration(b=>{b.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(d));let v={};if(b.affectsConfiguration(Gs)&&this.horizontalScrolling===void 0){const C=Boolean(d.getValue(Gs));v=Object.assign(Object.assign({},v),{horizontalScrolling:C})}if(b.affectsConfiguration(tr)){const C=Boolean(d.getValue(tr));v=Object.assign(Object.assign({},v),{smoothScrolling:C})}if(b.affectsConfiguration(Yr)){const C=d.getValue(Yr);v=Object.assign(Object.assign({},v),{mouseWheelScrollSensitivity:C})}if(b.affectsConfiguration(Qr)){const C=d.getValue(Qr);v=Object.assign(Object.assign({},v),{fastScrollSensitivity:C})}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new hJ(this,Object.assign({configurationService:d},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=Ud(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};zM=sa([st(6,Ee),st(7,so),st(8,Ct),st(9,ot),st(10,Ae)],zM);class SN extends H{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new R),this.onDidOpen=this._onDidOpen.event,this._register(ge.filter(this.widget.onDidChangeSelection,n=>n.browserEvent instanceof KeyboardEvent)(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t==null?void 0:t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(fk))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(fk))!=="doubleClick"}))):this.openOnSingleClick=(i=t==null?void 0:t.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i,s=!1;this._open(this.getSelectedElement(),i,n,s,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,r=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const s=!1,r=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}_open(e,t,i,n,s){!e||this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class q5 extends SN{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class hJ extends SN{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class uJ extends SN{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function gJ(o){let e=!1;return t=>{if(t.toKeybinding().isModifierKey())return!1;if(e)return e=!1,!1;const i=o.softDispatch(t,t.target);return i!=null&&i.enterChord?(e=!0,!1):(e=!1,!i)}}let UM=class extends uN{constructor(e,t,i,n,s,r,a,l,c,d){const{options:h,getTypeNavigationMode:u,disposable:g}=r.invokeFunction(L_,s);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Kd(this,s,u,s.overrideStyles,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};UM=sa([st(5,Ae),st(6,Ee),st(7,so),st(8,Ct),st(9,ot)],UM);let $M=class extends W5{constructor(e,t,i,n,s,r,a,l,c,d){const{options:h,getTypeNavigationMode:u,disposable:g}=r.invokeFunction(L_,s);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Kd(this,s,u,s.overrideStyles,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};$M=sa([st(5,Ae),st(6,Ee),st(7,so),st(8,Ct),st(9,ot)],$M);let jM=class extends oJ{constructor(e,t,i,n,s,r,a,l,c,d,h){const{options:u,getTypeNavigationMode:g,disposable:f}=a.invokeFunction(L_,r);super(e,t,i,n,s,u),this.disposables.add(f),this.internals=new Kd(this,r,g,r.overrideStyles,l,c,d,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};jM=sa([st(6,Ae),st(7,Ee),st(8,so),st(9,Ct),st(10,ot)],jM);let mk=class extends H5{constructor(e,t,i,n,s,r,a,l,c,d,h){const{options:u,getTypeNavigationMode:g,disposable:f}=a.invokeFunction(L_,r);super(e,t,i,n,s,u),this.disposables.add(f),this.internals=new Kd(this,r,g,r.overrideStyles,l,c,d,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};mk=sa([st(6,Ae),st(7,Ee),st(8,so),st(9,Ct),st(10,ot)],mk);let KM=class extends nJ{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const{options:g,getTypeNavigationMode:f,disposable:_}=l.invokeFunction(L_,a);super(e,t,i,n,s,r,g),this.disposables.add(_),this.internals=new Kd(this,a,f,a.overrideStyles,c,d,h,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};KM=sa([st(7,Ae),st(8,Ee),st(9,so),st(10,Ct),st(11,ot)],KM);function G5(o){const e=o.getValue(CN);if(e==="highlight")return Fr.Highlight;if(e==="filter")return Fr.Filter;const t=o.getValue(wN);if(t==="simple"||t==="highlight")return Fr.Highlight;if(t==="filter")return Fr.Filter}function L_(o,e){var t;const i=o.get(ot),n=o.get(vh),s=o.get(Ee),r=o.get(Ae),a=()=>{const u=s.getContextKeyValue(j5);if(u==="automatic")return Yl.Automatic;if(u==="trigger"||s.getContextKeyValue(K5)===!1)return Yl.Trigger},l=e.horizontalScrolling!==void 0?e.horizontalScrolling:Boolean(i.getValue(Gs)),[c,d]=r.invokeFunction(z1,e),h=e.additionalScrollHeight;return{getTypeNavigationMode:a,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},c),{indent:typeof i.getValue(xm)=="number"?i.getValue(xm):void 0,renderIndentGuides:i.getValue(rC),smoothScrolling:Boolean(i.getValue(tr)),defaultFindMode:G5(i),horizontalScrolling:l,additionalScrollHeight:h,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:i.getValue(aC)==="doubleClick",contextViewProvider:n})}}let Kd=class{constructor(e,t,i,n,s,r,a,l){var c;this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=H1(s,e),this.listSupportsMultiSelect=W1.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),V1.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=rJ.bindTo(this.contextKeyService),this.listSupportFindWidget.set((c=t.findWidgetEnabled)!==null&&c!==void 0?c:!0),this.hasSelectionOrFocus=pN.bindTo(this.contextKeyService),this.hasDoubleSelection=mN.bindTo(this.contextKeyService),this.hasMultiSelection=_N.bindTo(this.contextKeyService),this.treeElementCanCollapse=bN.bindTo(this.contextKeyService),this.treeElementHasParent=aJ.bindTo(this.contextKeyService),this.treeElementCanExpand=vN.bindTo(this.contextKeyService),this.treeElementHasChild=lJ.bindTo(this.contextKeyService),this.treeFindOpen=cJ.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Xr(l),this.updateStyleOverrides(n);const h=()=>{const g=e.getFocus()[0];if(!g)return;const f=e.getNode(g);this.treeElementCanCollapse.set(f.collapsible&&!f.collapsed),this.treeElementHasParent.set(!!e.getParentElement(g)),this.treeElementCanExpand.set(f.collapsible&&f.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(g))},u=new Set;u.add(j5),u.add(K5),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const g=e.getSelection(),f=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(g.length>0||f.length>0),this.hasMultiSelection.set(g.length>1),this.hasDoubleSelection.set(g.length===2)})}),e.onDidChangeFocus(()=>{const g=e.getSelection(),f=e.getFocus();this.hasSelectionOrFocus.set(g.length>0||f.length>0),h()}),e.onDidChangeCollapseState(h),e.onDidChangeModel(h),e.onDidChangeFindOpenState(g=>this.treeFindOpen.set(g)),l.onDidChangeConfiguration(g=>{let f={};if(g.affectsConfiguration(Sh)&&(this._useAltAsMultipleSelectionModifier=Xr(l)),g.affectsConfiguration(xm)){const _=l.getValue(xm);f=Object.assign(Object.assign({},f),{indent:_})}if(g.affectsConfiguration(rC)){const _=l.getValue(rC);f=Object.assign(Object.assign({},f),{renderIndentGuides:_})}if(g.affectsConfiguration(tr)){const _=Boolean(l.getValue(tr));f=Object.assign(Object.assign({},f),{smoothScrolling:_})}if((g.affectsConfiguration(CN)||g.affectsConfiguration(wN))&&e.updateOptions({defaultFindMode:G5(l)}),g.affectsConfiguration(Gs)&&t.horizontalScrolling===void 0){const _=Boolean(l.getValue(Gs));f=Object.assign(Object.assign({},f),{horizontalScrolling:_})}if(g.affectsConfiguration(aC)&&t.expandOnlyOnTwistieClick===void 0&&(f=Object.assign(Object.assign({},f),{expandOnlyOnTwistieClick:l.getValue(aC)==="doubleClick"})),g.affectsConfiguration(Yr)){const _=l.getValue(Yr);f=Object.assign(Object.assign({},f),{mouseWheelScrollSensitivity:_})}if(g.affectsConfiguration(Qr)){const _=l.getValue(Qr);f=Object.assign(Object.assign({},f),{fastScrollSensitivity:_})}Object.keys(f).length>0&&e.updateOptions(f)}),this.contextKeyService.onDidChangeContext(g=>{g.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new uJ(e,Object.assign({configurationService:l},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){nt(this.styler),this.styler=e?Ud(this.tree,this.themeService,e):H.None}dispose(){this.disposables=nt(this.disposables),nt(this.styler),this.styler=void 0}};Kd=sa([st(4,Ee),st(5,so),st(6,Ct),st(7,ot)],Kd);const fJ=zt.as(rl.Configuration);fJ.registerConfiguration({id:"workbench",order:7,title:p("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Sh]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[p("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:p({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[fk]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Gs]:{type:"boolean",default:!1,description:p("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[xm]:{type:"number",default:8,minimum:4,maximum:40,description:p("tree indent setting","Controls tree indentation in pixels.")},[rC]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:p("render tree indent guides","Controls whether the tree should render indent guides.")},[tr]:{type:"boolean",default:!1,description:p("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Yr]:{type:"number",default:1,markdownDescription:p("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Qr]:{type:"number",default:5,description:p("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[CN]:{type:"string",enum:["highlight","filter"],enumDescriptions:[p("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),p("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:p("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[wN]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[p("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),p("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),p("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:p("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:p("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' instead.")},[aC]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}});var _k;(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(_k||(_k={}));const yh={Quickaccess:"workbench.contributions.quickaccess"};class pJ{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),Be(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return i_([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}zt.add(yh.Quickaccess,new pJ);const dl=Ye("quickInputService");var mJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let bk=class extends H{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=zt.as(yh.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const f=a.value.substr(l.prefix.length);f&&(g=`${r.prefix}${f}`)}if(!g){const f=s==null?void 0:s.defaultFilterValue;f===_k.LAST?g=this.lastAcceptedPickerValues.get(r):typeof f=="string"&&(g=`${r.prefix}${f}`)}typeof g=="string"&&(e=g)}const c=new Q,d=c.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,r,i),d.placeholder=r==null?void 0:r.placeholder,d.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||(i==null?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:To.SECOND),d.contextKey=r==null?void 0:r.contextKey,d.filterValue=g=>g.substring(r?r.prefix.length:0),r!=null&&r.placeholder&&(d.ariaLabel=r==null?void 0:r.placeholder);let h;t&&(h=new RI,c.add(Xa(d.onWillAccept)(g=>{g.veto(),d.hide()}))),c.add(this.registerPickerListeners(d,s,r,e));const u=c.add(new Qi);if(s&&c.add(s.provide(d,u.token)),Xa(d.onDidHide)(()=>{d.selectedItems.length===0&&u.cancel(),c.dispose(),h==null||h.complete(d.selectedItems.slice(0))}),d.show(),t)return h==null?void 0:h.p}adjustValueSelection(e,t,i){var n;let s;i!=null&&i.preserveValue?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n){const s=new Q,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add(Be(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):r.value=a})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),s}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};bk=mJ([qM(0,dl),qM(1,Ae)],bk);var _J=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let vk=class extends lz{constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(bk))),this._quickAccess}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),returnFocus:()=>e.focus(),createList:(s,r,a,l,c)=>this.instantiationService.createInstance(pk,s,r,a,l,c),styles:this.computeStyles()},n=this._register(new P1(Object.assign(Object.assign({},i),t)));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout(s=>n.layout(s,e.offset.quickPickTop))),this._register(n.onShow(()=>this.resetContextKeys())),this._register(n.onHide(()=>this.resetContextKeys())),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new le(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=ze.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Ao(this.theme,{quickInputBackground:M2,quickInputForeground:Fz,quickInputTitleBackground:Bz,contrastBorder:We,widgetShadow:Ho})),inputBox:Ao(this.theme,{inputForeground:f1,inputBackground:g1,inputBorder:p1,inputValidationInfoBackground:ZI,inputValidationInfoForeground:YI,inputValidationInfoBorder:QI,inputValidationWarningBackground:XI,inputValidationWarningForeground:JI,inputValidationWarningBorder:eE,inputValidationErrorBackground:tE,inputValidationErrorForeground:iE,inputValidationErrorBorder:nE}),countBadge:Ao(this.theme,{badgeBackground:gu,badgeForeground:fu,badgeBorder:We}),button:Ao(this.theme,{buttonForeground:Uf,buttonBackground:lD,buttonHoverBackground:Ez,buttonBorder:We}),progressBar:Ao(this.theme,{progressBarBackground:Nz}),keybindingLabel:Ao(this.theme,{keybindingLabelBackground:Hz,keybindingLabelForeground:zz,keybindingLabelBorder:Uz,keybindingLabelBottomBorder:$z,keybindingLabelShadow:Ho}),list:Ao(this.theme,{listBackground:M2,listInactiveFocusForeground:jf,listInactiveSelectionIconForeground:Kf,listInactiveFocusBackground:qf,listFocusOutline:Ot,listInactiveFocusOutline:Ot,pickerGroupBorder:Vz,pickerGroupForeground:Wz})}}};vk=_J([Nf(0,Ae),Nf(1,Ee),Nf(2,Ct),Nf(3,al),Nf(4,Yg)],vk);var Z5=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},td=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Ck=class extends vk{constructor(e,t,i,n,s,r){super(t,i,n,s,new FD(e.getContainerDomNode(),r)),this.host=void 0;const a=wg.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return l.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};Ck=Z5([td(1,Ae),td(2,Ee),td(3,Ct),td(4,al),td(5,ct)],Ck);let wk=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Ck,e);this.mapEditorToService.set(e,t),Xa(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=ze.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};wk=Z5([td(0,Ae),td(1,ct)],wk);class wg{constructor(e){this.editor=e,this.widget=new U1(this.editor)}static get(e){return e.getContribution(wg.ID)}dispose(){this.widget.dispose()}}wg.ID="editor.controller.quickInput";class U1{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return U1.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}U1.ID="editor.contrib.quickInputWidget";tt(wg.ID,wg);class bJ{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function vJ(o){if(!o||!Array.isArray(o))return[];const e=[];let t=0;for(let i=0,n=o.length;i{const u=DJ(d.token,h.token);return u!==0?u:d.index-h.index});let t=0,i="000000",n="ffffff";for(;o.length>=1&&o[0].token==="";){const d=o.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(n=d.background)}const s=new SJ;for(const d of e)s.getId(d);const r=s.getId(i),a=s.getId(n),l=new yN(t,r,a),c=new LN(l);for(let d=0,h=o.length;d"u"){const n=this._match(t),s=LJ(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const yJ=/\b(comment|string|regex|regexp)\b/;function LJ(o){const e=o.match(yJ);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function DJ(o,e){return oe?1:0}class yN{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new yN(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class LN{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return typeof s<"u"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}const s=e.indexOf(".");let r,a;s===-1?(r=e,a=""):(r=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(r);typeof l>"u"&&(l=new LN(this._mainRule.clone()),this._children.set(r,l)),l.insert(a,t,i,n)}}function kJ(o){const e=[];for(let t=1,i=o.length;te.fire()),o==null||o.onDidProductIconThemeChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const i=o?o.getProductIconTheme():new Q5,n={},s=a=>{const l=i.getIcon(a);if(!l)return;const c=l.font;return c?(n[c.id]=c.definition,`.codicon-${a.id}:before { content: '${l.fontCharacter}'; font-family: ${x2(c.id)}; }`):`.codicon-${a.id}:before { content: '${l.fontCharacter}'; }`},r=[];for(const a of t.getIcons()){const l=s(a);l&&r.push(l)}for(const a in n){const l=n[a],c=l.weight?`font-weight: ${l.weight};`:"",d=l.style?`font-style: ${l.style};`:"",h=l.src.map(u=>`${Pd(u.location)} format('${u.format}')`).join(", ");r.push(`@font-face { src: ${h}; font-family: ${x2(a)};${c}${d} font-display: block; }`)}return r.join(` +`)}}}class Q5{getIcon(e){const t=UF();let i=e.defaults;for(;at.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Ra="vs",Ku="vs-dark",Sd="hc-black",yd="hc-light",X5=zt.as(D4.ColorContribution),AJ=zt.as(f4.ThemingContribution);class J5{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(I0(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,W.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=Sk(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,W.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=X5.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Ra:return Hs.LIGHT;case Sd:return Hs.HIGH_CONTRAST_DARK;case yd:return Hs.HIGH_CONTRAST_LIGHT;default:return Hs.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=Sk(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=Y5.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=qi.getForeground(s),a=qi.getFontStyle(s);return{foreground:r,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4),strikethrough:Boolean(a&8)}}}function I0(o){return o===Ra||o===Ku||o===Sd||o===yd}function Sk(o){switch(o){case Ra:return xJ;case Ku:return IJ;case Sd:return EJ;case yd:return NJ}}function Fb(o){const e=Sk(o);return new J5(o,e)}class MJ extends H{constructor(){super(),this._onColorThemeChange=this._register(new R),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new R),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new Q5,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Ra,Fb(Ra)),this._knownThemes.set(Ku,Fb(Ku)),this._knownThemes.set(Sd,Fb(Sd)),this._knownThemes.set(yd,Fb(yd));const e=TJ(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Ra),this._onOSSchemeChanged(),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),DI("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Gp(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Qs(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),H.None}_registerShadowDomContainer(e){const t=Qs(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let i=0;i{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Ra),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==cn(this._theme.type)){let t;Xp(this._theme.type)?t=e?Sd:Ku:t=e?yd:Ra,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};AJ.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of X5.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${L4(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor { ${n.join(` `)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(kJ(s)),this._themeCSS=e.join(` `),this._updateCSS(),Wt.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} ${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const Es=Ye("themeService");var RJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},JS=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let yk=class extends H{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new R,this._onDidChangeReducedMotion=new R,this._accessibilityModeEnabledContext=c_.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),r.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const s=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(G(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};yk=RJ([JS(0,Ee),JS(1,Yg),JS(2,ot)],yk);var Jf=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},Du;(function(o){o[o.None=0]="None",o[o.Initialized=1]="Initialized",o[o.Closed=2]="Closed"})(Du||(Du={}));class qu extends H{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new R),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=Du.None,this.cache=new Map,this.flushDelayer=new UW(qu.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;(t=e.changed)===null||t===void 0||t.forEach((n,s)=>this.accept(s,n)),(i=e.deleted)===null||i===void 0||i.forEach(n=>this.accept(n,void 0))}accept(e,t){if(this.state===Du.Closed)return;let i=!1;ms(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return ms(i)?t:i}getBoolean(e,t){const i=this.get(e);return ms(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return ms(i)?t:parseInt(i,10)}set(e,t){return Jf(this,void 0,void 0,function*(){if(this.state===Du.Closed)return;if(ms(t))return this.delete(e);const i=String(t);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}delete(e){return Jf(this,void 0,void 0,function*(){if(!(this.state===Du.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Jf(this,void 0,void 0,function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}doFlush(e){return Jf(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),e)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}qu.DEFAULT_FLUSH_DELAY=100;class ey{constructor(){this.onDidChangeItemsExternal=ge.None,this.items=new Map}updateItems(e){var t,i;return Jf(this,void 0,void 0,function*(){(t=e.insert)===null||t===void 0||t.forEach((n,s)=>this.items.set(s,n)),(i=e.delete)===null||i===void 0||i.forEach(n=>this.items.delete(n))})}}const Bb="__$__targetStorageMarker",Do=Ye("storageService");var lC;(function(o){o[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN"})(lC||(lC={}));class $1 extends H{constructor(e={flushInterval:$1.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Z0),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new Z0),this._onWillSaveState=this._register(new R),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}emitDidChangeValue(e,t){if(t===Bb){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getNumber(e,i)}store(e,t,i,n){if(ms(t)){this.remove(e,i);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,n),(s=this.getStorage(i))===null||s===void 0||s.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),(i=this.getStorage(t))===null||i===void 0||i.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,s;const r=this.getKeyTargets(t);typeof i=="number"?r[e]!==i&&(r[e]=i,(n=this.getStorage(t))===null||n===void 0||n.set(Bb,JSON.stringify(r))):typeof r[e]=="number"&&(delete r[e],(s=this.getStorage(t))===null||s===void 0||s.set(Bb,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.get(Bb,e);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}}$1.DEFAULT_FLUSH_INTERVAL=60*1e3;class OJ extends $1{constructor(){super(),this.applicationStorage=this._register(new qu(new ey)),this.profileStorage=this._register(new qu(new ey)),this.workspaceStorage=this._register(new qu(new ey)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}var DN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gu=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Lk=class{constructor(e,t){this._commandService=e,this._hiddenStates=new cC(t)}createMenu(e,t,i){return new Dk(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};Lk=DN([Gu(0,ci),Gu(1,Do)],Lk);let cC=class ep{constructor(e){this._storageService=e,this._disposables=new Q,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1;try{const t=e.get(ep._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(t=>{if(t.key===ep._key){if(!this._ignoreChangeEvent)try{const i=e.get(ep._key,0,"{}");this._data=JSON.parse(i)}catch(i){console.log("FAILED to read storage after UPDATE",i)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}isHidden(e,t){var i,n;return(n=(i=this._data[e.id])===null||i===void 0?void 0:i.includes(t))!==null&&n!==void 0?n:!1}updateHidden(e,t,i){const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const s=n.indexOf(t);s>=0&&j8(n,s),n.length===0&&delete this._data[e.id]}this._persist()}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(ep._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};cC._key="menu.hiddenCommands";cC=DN([Gu(0,Do)],cC);let Dk=class iu{constructor(e,t,i,n,s,r){this._id=e,this._hiddenStates=t,this._options=i,this._commandService=n,this._contextKeyService=s,this._menuService=r,this._disposables=new Q,this._menuGroups=[],this._contextKeys=new Set,this._build();const a=new mt(()=>{this._build(),this._onDidChange.fire(this)},i.eventDebounceDelay);this._disposables.add(a),this._disposables.add(qs.onDidChangeMenu(d=>{d.has(e)&&a.schedule()}));const l=this._disposables.add(new Q),c=()=>{const d=new mt(()=>this._onDidChange.fire(this),i.eventDebounceDelay);l.add(d),l.add(s.onDidChangeContext(h=>{h.affectsSome(this._contextKeys)&&d.schedule()})),l.add(t.onDidChange(()=>{d.schedule()}))};this._onDidChange=new R({onFirstListenerAdd:c,onLastListenerRemove:l.clear.bind(l)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const e=qs.getMenuItems(this._id);let t;e.sort(iu._compareMenuItems);for(const i of e){const n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(iu._fillInKbExprKeys(e.when,this._contextKeys),uu(e)){if(e.command.precondition&&iu._fillInKbExprKeys(e.command.precondition,this._contextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;iu._fillInKbExprKeys(t,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&qs.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(const i of this._menuGroups){const[n,s]=i,r=[],a=[];for(const l of s)if(this._contextKeyService.contextMatchesRules(l.when)){let c;if(uu(l)){const h=PJ(this._id,l.command,this._hiddenStates);c=new ac(l.command,l.alt,e,h,this._contextKeyService,this._commandService)}else c=new GI(l,this._menuService,this._contextKeyService,e),c.actions.length===0&&(c.dispose(),c=void 0);c&&a.push(c)}a.length>0&&t.push([n,a]),r.length>0}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;const a=i.localeCompare(n);if(a!==0)return a}const s=e.order||0,r=t.order||0;return sr?1:iu._compareTitles(uu(e)?e.command.title:e.title,uu(t)?t.command.title:t.title)}static _compareTitles(e,t){const i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};Dk=DN([Gu(3,ci),Gu(4,Ee),Gu(5,ph)],Dk);function PJ(o,e,t){const i=`${o.id}/${e.id}`,n=typeof e.title=="string"?e.title:e.title.value,s=E2({id:i,label:p("hide.label","Hide '{0}'",n),run(){t.updateHidden(o,e.id,!0)}}),r=E2({id:i,label:n,get checked(){return!t.isHidden(o,e.id)},run(){const a=!t.isHidden(o,e.id);t.updateHidden(o,e.id,a)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}var FJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GM=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Hh=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let kk=class extends H{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(Ja||xI)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const t=new RI;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(i=>Hh(this,void 0,void 0,function*(){(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)}))};this.layoutService.hasContainer&&(this._register(G(this.layoutService.container,"click",e)),this._register(G(this.layoutService.container,"keydown",e)))}writeText(e,t){return Hh(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(s){console.error(s)}const i=document.activeElement,n=document.body.appendChild(J("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)})}readText(e){return Hh(this,void 0,void 0,function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}})}readFindText(){return Hh(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return Hh(this,void 0,void 0,function*(){this.findText=e})}readResources(){return Hh(this,void 0,void 0,function*(){return this.resources})}};kk=FJ([GM(0,Yg),GM(1,So)],kk);var BJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WJ=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const kp="data-keybinding-context";class kN{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}}class Sg extends kN{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Sg.INSTANCE=new Sg;class Im extends kN{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Uu.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===7){const s=Array.from(je.map(this._values,([r])=>r));this._values.clear(),i.fire(new YM(s))}else{const s=[];for(const r of n.affectedKeys){const a=`config.${r}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...je.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new YM(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(Im._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Im._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Im._keyPrefix="config.";class VJ{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class ZM{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class YM{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class HJ{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function zJ(o,e){return o.allKeysContainedIn(new Set(Object.keys(e)))}class e3{constructor(e){this._onDidChangeContext=new Z0({merge:t=>new HJ(t)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new VJ(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new UJ(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);!i||i.setValue(e,t)&&this._onDidChangeContext.fire(new ZM(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new ZM(e))}getContext(e){return this._isDisposed?Sg.INSTANCE:this.getContextValuesContainer($J(e))}}let xk=class extends e3{constructor(e){super(0),this._contexts=new Map,this._toDispose=new Q,this._lastContextId=0;const t=new Im(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Sg.INSTANCE:this._contexts.get(e)||Sg.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new kN(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};xk=BJ([WJ(0,ot)],xk);class UJ extends e3{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new _n,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(kp)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(kp,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const i=this._parent.getContextValuesContainer(this._myContextId).value;zJ(e,i)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(kp),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Sg.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function $J(o){for(;o;){if(o.hasAttribute(kp)){const e=o.getAttribute(kp);return e?parseInt(e,10):NaN}o=o.parentElement}return 0}function jJ(o,e,t){o.get(Ee).createKey(String(e),KJ(t))}function KJ(o){return qO(o,e=>{if(typeof e=="object"&&e.$mid===1)return _e.revive(e).toString();if(e instanceof _e)return e.toString()})}Xe.registerCommand(rz,jJ);Xe.registerCommand({id:"getContextKeyInfo",handler(){return[...le.all()].sort((o,e)=>o.key.localeCompare(e.key))},description:{description:p("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Xe.registerCommand("_generateContextKeyInfo",function(){const o=[],e=new Set;for(const t of le.all())e.has(t.key)||(e.add(t.key),o.push(t));o.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(o,void 0,2))});class qJ{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class GJ{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new qJ(e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join(` @@ -601,34 +601,34 @@ ${e.toString()}`}}class xN{constructor(e=new k1,t=!1,i){this._activeInstantiatio `+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class K1{info(e){return this.notify({severity:Bt.Info,message:e})}warn(e){return this.notify({severity:Bt.Warning,message:e})}error(e){return this.notify({severity:Bt.Error,message:e})}notify(e){switch(e.severity){case Bt.Error:console.error(e.message);break;case Bt.Warning:console.warn(e.message);break;default:console.log(e.message);break}return K1.NO_OP}status(e,t){return H.None}}K1.NO_OP=new TG;let Ek=class{constructor(e){this._onWillExecuteCommand=new R,this._onDidExecuteCommand=new R,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Xe.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};Ek=Ic([pn(0,Ae)],Ek);let yg=class extends CY{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const f=new Q;f.add(G(g,ae.KEY_DOWN,_=>{const b=new Rt(_);this._dispatch(b,b.target)&&(b.preventDefault(),b.stopPropagation())})),f.add(G(g,ae.KEY_UP,_=>{const b=new Rt(_);this._singleModifierDispatch(b,b.target)&&b.preventDefault()})),this._domNodeListeners.push(new iee(g,f))},l=g=>{for(let f=0;f{g.getOption(56)||a(g.getContainerDomNode())},d=g=>{g.getOption(56)||l(g.getContainerDomNode())};this._register(r.onCodeEditorAdd(c)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(c);const h=g=>{a(g.getContainerDomNode())},u=g=>{l(g.getContainerDomNode())};this._register(r.onDiffEditorAdd(h)),this._register(r.onDiffEditorRemove(u)),r.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){return qo(Xe.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>{var n,s;const r=eD(i.keybinding,Os);return{keybinding:(n=r==null?void 0:r.parts)!==null&&n!==void 0?n:null,command:(s=i.command)!==null&&s!==void 0?s:null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),Be(()=>{for(let i=0;ithis._log(i))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new aM(void 0,s.command,s.commandArgs,r,t,null,!1);else{const l=mm.resolveUserBinding(a,Os);for(const c of l)i[n++]=new aM(c,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Md(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new mm(t,Os)}};yg=Ic([pn(0,Ee),pn(1,ci),pn(2,sr),pn(3,di),pn(4,So),pn(5,ct)],yg);class iee extends H{constructor(e,t){super(),this.domNode=e,this._register(t)}}function JM(o){return o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof _e)}class s3{constructor(){this._onDidChangeConfiguration=new R,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new N1(new XJ,new Qn,new Qn,new Qn)}getValue(e,t){const i=typeof e=="string"?e:void 0,n=JM(e)?e:JM(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new bY({keys:i,overrides:[]},t,this._configuration);n.source=8,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let Nk=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new R,this.configurationService.onDidChangeConfiguration(t=>{this._onDidChangeConfiguration.fire({affectedKeys:t.affectedKeys,affectsConfiguration:(i,n)=>t.affectsConfiguration(n)})})}getValue(e,t,i){const s=(B.isIPosition(t)?t:null)?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0;return typeof s>"u"?this.configurationService.getValue():this.configurationService.getValue(s)}};Nk=Ic([pn(0,ot)],Nk);let Tk=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:dn||Ge?` `:`\r -`}};Tk=Ic([pn(0,ot)],Tk);class nee{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class Em{constructor(){const e=_e.from({scheme:Em.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new kY({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===Em.SCHEME?this.workspace.folders[0]:null}}Em.SCHEME="inmemory";function dC(o,e,t){if(!e||!(o instanceof s3))return;const i=[];Object.keys(e).forEach(n=>{pY(n)&&i.push([`editor.${n}`,e[n]]),t&&mY(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let Ak=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return n3(this,void 0,void 0,function*(){const i=new Map;for(const r of e){if(!(r instanceof Cd))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(r.resource);if(!a)throw new Error("bad edit - model not found");if(typeof r.versionId=="number"&&a.getVersionId()!==r.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(a);l||(l=[],i.set(a,l)),l.push(Ft.replaceMove(L.lift(r.textEdit.range),r.textEdit.text))}let n=0,s=0;for(const[r,a]of i)r.pushStackElement(),r.pushEditOperations([],a,()=>[]),r.pushStackElement(),s+=1,n+=a.length;return{ariaSummary:Vs(jD.bulkEditServiceSummary,n,s)}})}};Ak=Ic([pn(0,Ut)],Ak);class see{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Js(e)}}let Mk=class extends KD{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};Mk=Ic([pn(0,Yg),pn(1,ct)],Mk);class oee{constructor(){this._neverEmitter=new R,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class ree extends Cm{constructor(){super()}}class aee extends NV{constructor(){super(new EV)}}let Rk=class extends ZD{constructor(e,t,i,n,s){super(e,t,i,n,s),this.configure({blockMouse:!1})}};Rk=Ic([pn(0,sr),pn(1,di),pn(2,vh),pn(3,_i),pn(4,Ct)],Rk);et(ot,s3);et(WI,Nk);et(VP,Tk);et(_m,Em);et(bg,see);et(sr,nee);et(b_,tee);et(di,K1);et(na,kl);et(Ht,ree);et(Es,MJ);et(So,aee);et(Ut,iC);et(KI,ek);et(Ee,xk);et(G5,eee);et(kc,j1);et(Do,OJ);et(to,XL);et(v_,Ak);et(lF,oee);et(Kn,Ik);et(al,yk);et(so,gk);et(ci,Ek);et(_i,yg);et(dl,wk);et(vh,Mk);et(io,JD);et(cl,kk);et(ll,Rk);et(ph,Lk);var Le;(function(o){const e=new k1;for(const[r,a]of UT())e.set(r,a);const t=new xN(e,!0);e.set(Ae,t);function i(r){const a=e.get(r);if(!a)throw new Error("Missing service "+r);return a instanceof yr?t.invokeFunction(l=>l.get(r)):a}o.get=i;let n=!1;function s(r){if(n)return t;n=!0;for(const[a,l]of UT())e.get(a)||e.set(a,l);for(const a in r)if(r.hasOwnProperty(a)){const l=Ye(a);e.get(l)instanceof yr&&e.set(l,r[a])}return t}o.initialize=s})(Le||(Le={}));var IN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},At=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let lee=0,eR=!1;function cee(o){if(!o){if(eR)return;eR=!0}nz(o||document.body)}let hC=class extends pg{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g=Object.assign({},t);g.ariaLabel=g.ariaLabel||Zv.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+Zv.accessibilityHelpMessage,super(e,g,{},i,n,s,r,l,c,d,h,u),a instanceof yg?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,cee(g.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++lee,s=se.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),H.None;const t=e.id,i=e.label,n=se.and(se.equals("editorId",this.getId()),se.deserialize(e.precondition)),s=e.keybindings,r=se.and(n,se.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(g,...f)=>Promise.resolve(e.run(this,...f)),d=new Q,h=this.getId()+":"+t;if(d.add(Xe.registerCommand(h,c)),a){const g={command:{id:h,title:i},when:n,group:a,order:l};d.add(qs.appendMenuItem(M.EditorContext,g))}if(Array.isArray(s))for(const g of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,g,c,r));const u=new a5(h,i,i,n,c,this._contextKeyService);return this._actions[t]=u,d.add(Be(()=>{delete this._actions[t]})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof Uv)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};hC=IN([At(2,Ae),At(3,ct),At(4,ci),At(5,Ee),At(6,_i),At(7,Ct),At(8,di),At(9,al),At(10,si),At(11,de)],hC);let Ok=class extends hC{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f,_){const b=Object.assign({},t);dC(d,b,!1);const v=l.registerEditorContainer(e);typeof b.theme=="string"&&l.setTheme(b.theme),typeof b.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(Boolean(b.autoDetectHighContrast));const C=b.model;delete b.model,super(e,b,i,n,s,r,a,l,c,h,f,_),this._configurationService=d,this._standaloneThemeService=l,this._register(v);let w;if(typeof C>"u"){const S=g.getLanguageIdByMimeType(b.language)||b.language||Ks;w=o3(u,g,b.value||"",S,void 0),this._ownsModel=!0}else w=C,this._ownsModel=!1;if(this._attachModel(w),w){const S={oldModelUrl:null,newModelUrl:w.uri};this._onDidChangeModel.fire(S)}}dispose(){super.dispose()}updateOptions(e){dC(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Ok=IN([At(2,Ae),At(3,ct),At(4,ci),At(5,Ee),At(6,_i),At(7,Es),At(8,di),At(9,ot),At(10,al),At(11,Ut),At(12,Ht),At(13,si),At(14,de)],Ok);let Pk=class extends uc{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g=Object.assign({},t);dC(c,g,!0);const f=a.registerEditorContainer(e);typeof g.theme=="string"&&a.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&a.setAutoDetectHighContrast(Boolean(g.autoDetectHighContrast)),super(e,g,{},u,s,n,i,r,a,l,d,h),this._configurationService=c,this._standaloneThemeService=a,this._register(f)}dispose(){super.dispose()}updateOptions(e){dC(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(hC,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};Pk=IN([At(2,Ae),At(3,Ee),At(4,to),At(5,ct),At(6,Es),At(7,di),At(8,ot),At(9,ll),At(10,kc),At(11,cl)],Pk);function o3(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` +`}};Tk=Ic([pn(0,ot)],Tk);class nee{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class Em{constructor(){const e=_e.from({scheme:Em.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new kY({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===Em.SCHEME?this.workspace.folders[0]:null}}Em.SCHEME="inmemory";function dC(o,e,t){if(!e||!(o instanceof s3))return;const i=[];Object.keys(e).forEach(n=>{pY(n)&&i.push([`editor.${n}`,e[n]]),t&&mY(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let Ak=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return n3(this,void 0,void 0,function*(){const i=new Map;for(const r of e){if(!(r instanceof Cd))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(r.resource);if(!a)throw new Error("bad edit - model not found");if(typeof r.versionId=="number"&&a.getVersionId()!==r.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(a);l||(l=[],i.set(a,l)),l.push(Ft.replaceMove(L.lift(r.textEdit.range),r.textEdit.text))}let n=0,s=0;for(const[r,a]of i)r.pushStackElement(),r.pushEditOperations([],a,()=>[]),r.pushStackElement(),s+=1,n+=a.length;return{ariaSummary:Vs(jD.bulkEditServiceSummary,n,s)}})}};Ak=Ic([pn(0,Ut)],Ak);class see{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Js(e)}}let Mk=class extends KD{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};Mk=Ic([pn(0,Yg),pn(1,ct)],Mk);class oee{constructor(){this._neverEmitter=new R,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class ree extends Cm{constructor(){super()}}class aee extends NV{constructor(){super(new EV)}}let Rk=class extends ZD{constructor(e,t,i,n,s){super(e,t,i,n,s),this.configure({blockMouse:!1})}};Rk=Ic([pn(0,sr),pn(1,di),pn(2,vh),pn(3,_i),pn(4,Ct)],Rk);et(ot,s3);et(WI,Nk);et(VP,Tk);et(_m,Em);et(bg,see);et(sr,nee);et(b_,tee);et(di,K1);et(na,kl);et(Ht,ree);et(Es,MJ);et(So,aee);et(Ut,iC);et(KI,ek);et(Ee,xk);et(GF,eee);et(kc,j1);et(Do,OJ);et(to,XL);et(v_,Ak);et(l5,oee);et(Kn,Ik);et(al,yk);et(so,gk);et(ci,Ek);et(_i,yg);et(dl,wk);et(vh,Mk);et(io,JD);et(cl,kk);et(ll,Rk);et(ph,Lk);var Le;(function(o){const e=new k1;for(const[r,a]of UT())e.set(r,a);const t=new xN(e,!0);e.set(Ae,t);function i(r){const a=e.get(r);if(!a)throw new Error("Missing service "+r);return a instanceof yr?t.invokeFunction(l=>l.get(r)):a}o.get=i;let n=!1;function s(r){if(n)return t;n=!0;for(const[a,l]of UT())e.get(a)||e.set(a,l);for(const a in r)if(r.hasOwnProperty(a)){const l=Ye(a);e.get(l)instanceof yr&&e.set(l,r[a])}return t}o.initialize=s})(Le||(Le={}));var IN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},At=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let lee=0,eR=!1;function cee(o){if(!o){if(eR)return;eR=!0}nz(o||document.body)}let hC=class extends pg{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g=Object.assign({},t);g.ariaLabel=g.ariaLabel||Zv.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+Zv.accessibilityHelpMessage,super(e,g,{},i,n,s,r,l,c,d,h,u),a instanceof yg?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,cee(g.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++lee,s=se.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),H.None;const t=e.id,i=e.label,n=se.and(se.equals("editorId",this.getId()),se.deserialize(e.precondition)),s=e.keybindings,r=se.and(n,se.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(g,...f)=>Promise.resolve(e.run(this,...f)),d=new Q,h=this.getId()+":"+t;if(d.add(Xe.registerCommand(h,c)),a){const g={command:{id:h,title:i},when:n,group:a,order:l};d.add(qs.appendMenuItem(M.EditorContext,g))}if(Array.isArray(s))for(const g of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,g,c,r));const u=new aF(h,i,i,n,c,this._contextKeyService);return this._actions[t]=u,d.add(Be(()=>{delete this._actions[t]})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof Uv)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};hC=IN([At(2,Ae),At(3,ct),At(4,ci),At(5,Ee),At(6,_i),At(7,Ct),At(8,di),At(9,al),At(10,si),At(11,de)],hC);let Ok=class extends hC{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f,_){const b=Object.assign({},t);dC(d,b,!1);const v=l.registerEditorContainer(e);typeof b.theme=="string"&&l.setTheme(b.theme),typeof b.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(Boolean(b.autoDetectHighContrast));const C=b.model;delete b.model,super(e,b,i,n,s,r,a,l,c,h,f,_),this._configurationService=d,this._standaloneThemeService=l,this._register(v);let w;if(typeof C>"u"){const S=g.getLanguageIdByMimeType(b.language)||b.language||Ks;w=o3(u,g,b.value||"",S,void 0),this._ownsModel=!0}else w=C,this._ownsModel=!1;if(this._attachModel(w),w){const S={oldModelUrl:null,newModelUrl:w.uri};this._onDidChangeModel.fire(S)}}dispose(){super.dispose()}updateOptions(e){dC(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Ok=IN([At(2,Ae),At(3,ct),At(4,ci),At(5,Ee),At(6,_i),At(7,Es),At(8,di),At(9,ot),At(10,al),At(11,Ut),At(12,Ht),At(13,si),At(14,de)],Ok);let Pk=class extends uc{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g=Object.assign({},t);dC(c,g,!0);const f=a.registerEditorContainer(e);typeof g.theme=="string"&&a.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&a.setAutoDetectHighContrast(Boolean(g.autoDetectHighContrast)),super(e,g,{},u,s,n,i,r,a,l,d,h),this._configurationService=c,this._standaloneThemeService=a,this._register(f)}dispose(){super.dispose()}updateOptions(e){dC(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(hC,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};Pk=IN([At(2,Ae),At(3,Ee),At(4,to),At(5,ct),At(6,Es),At(7,di),At(8,ot),At(9,ll),At(10,kc),At(11,cl)],Pk);function o3(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` `);let r=t;return s!==-1&&(r=t.substring(0,s)),tR(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return tR(o,t,e.createById(i),n)}function tR(o,e,t,i){return o.createModel(e,t,i)}function dee(o,e,t){return Le.initialize(t||{}).createInstance(Ok,o,e)}function hee(o){return Le.get(ct).onCodeEditorAdd(t=>{o(t)})}function uee(o){return Le.get(ct).onDiffEditorAdd(t=>{o(t)})}function gee(){return Le.get(ct).listCodeEditors()}function fee(){return Le.get(ct).listDiffEditors()}function pee(o,e,t){return Le.initialize(t||{}).createInstance(Pk,o,e)}function mee(o,e){return new QB(o,e)}function _ee(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Xe.registerCommand(o.id,o.run)}function bee(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=se.deserialize(o.precondition),t=(n,...s)=>xi.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new Q;if(i.add(Xe.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(qs.appendMenuItem(M.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Le.get(_i);if(!(n instanceof yg))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=se.and(e,se.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function vee(o){return r3([o])}function r3(o){const e=Le.get(_i);return e instanceof yg?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:se.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),H.None)}function Cee(o,e,t){const i=Le.get(Ht),n=i.getLanguageIdByMimeType(e)||e;return o3(Le.get(Ut),i,o,n,t)}function wee(o,e){const t=Le.get(Ht);Le.get(Ut).setMode(o,t.createById(e))}function See(o,e,t){o&&Le.get(na).changeOne(e,o.uri,t)}function yee(o){Le.get(na).changeAll(o,[])}function Lee(o){return Le.get(na).read(o)}function Dee(o){return Le.get(na).onMarkerChanged(o)}function kee(o){return Le.get(Ut).getModel(o)}function xee(){return Le.get(Ut).getModels()}function Iee(o){return Le.get(Ut).onModelAdded(o)}function Eee(o){return Le.get(Ut).onModelRemoved(o)}function Nee(o){return Le.get(Ut).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function Tee(o){return OV(Le.get(Ut),Le.get(si),o)}function Aee(o,e){const t=Le.get(Ht),i=Le.get(Es);return i.registerEditorContainer(o),UI.colorizeElement(i,t,o,e)}function Mee(o,e,t){const i=Le.get(Ht);return Le.get(Es).registerEditorContainer(document.body),UI.colorize(i,o,e,t)}function Ree(o,e,t=4){return Le.get(Es).registerEditorContainer(document.body),UI.colorizeModelLine(o,e,t)}function Oee(o){const e=Wt.get(o);return e||{getInitialState:()=>ng,tokenize:(t,i,n)=>AI(o,n)}}function Pee(o,e){Wt.getOrCreate(e);const t=Oee(e),i=jr(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw Dt(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw Dt(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!eH(o,Il(o,n,"",[],""))))throw Dt(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=Fk(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=Bk(e,this.name,t)}}function a3(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=o,t.includeLF=Wb(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=Wb(e.ignoreCase,!1),t.unicode=Wb(e.unicode,!1),t.tokenPostfix=iR(e.tokenPostfix,"."+t.languageId),t.defaultToken=iR(e.defaultToken,"source"),t.usesEmbedded=!1;const i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const c of l){let d=c.include;if(d){if(typeof d!="string")throw Dt(t,"an 'include' attribute must be a string at: "+r);if(d[0]==="@"&&(d=d.substr(1)),!e.tokenizer[d])throw Dt(t,"include target '"+d+"' is not defined at: "+r);n(r+"."+d,a,e.tokenizer[d])}else{const h=new Kee(r);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")h.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const u=c[1];u.next=c[2],h.setAction(i,u)}else throw Dt(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else h.setAction(i,c[1]);else{if(!c.regex)throw Dt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);c.name&&typeof c.name=="string"&&(h.name=c.name),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=Wb(c.matchOnlyAtLineStart,!1)),h.setRegex(i,c.regex),h.setAction(i,c.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Dt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Dt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Dt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:Kl(t,a.open),close:Kl(t,a.close)});else throw Dt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var qee=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function Gee(o){ig.registerLanguage(o)}function Zee(){let o=[];return o=o.concat(ig.getLanguages()),o}function Yee(o){return Le.get(Ht).languageIdCodec.encodeLanguageId(o)}function Qee(o,e){const i=Le.get(Ht).onDidEncounterLanguage(n=>{n===o&&(i.dispose(),e())});return i}function Xee(o,e){if(!Le.get(Ht).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Le.get(si).register(o,e,100)}class Jee{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return Nm.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new BC(n.tokens,n.endState)}}class Nm{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:gqee(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?ete(i)?c3(o,i):new Kp(Le.get(Ht),Le.get(Es),o,a3(o,i),Le.get(ot)):null})};return Wt.registerFactory(o,t)}function nte(o,e){if(!Le.get(Ht).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return l3(e)?EN(o,{create:()=>e}):Wt.register(o,c3(o,e))}function ste(o,e){const t=i=>new Kp(Le.get(Ht),Le.get(Es),o,a3(o,i),Le.get(ot));return l3(e)?EN(o,{create:()=>e}):Wt.register(o,t(e))}function ote(o,e){return Le.get(de).referenceProvider.register(o,e)}function rte(o,e){return Le.get(de).renameProvider.register(o,e)}function ate(o,e){return Le.get(de).signatureHelpProvider.register(o,e)}function lte(o,e){return Le.get(de).hoverProvider.register(o,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(!!a)return!a.range&&r&&(a.range=new L(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function cte(o,e){return Le.get(de).documentSymbolProvider.register(o,e)}function dte(o,e){return Le.get(de).documentHighlightProvider.register(o,e)}function hte(o,e){return Le.get(de).linkedEditingRangeProvider.register(o,e)}function ute(o,e){return Le.get(de).definitionProvider.register(o,e)}function gte(o,e){return Le.get(de).implementationProvider.register(o,e)}function fte(o,e){return Le.get(de).typeDefinitionProvider.register(o,e)}function pte(o,e){return Le.get(de).codeLensProvider.register(o,e)}function mte(o,e,t){return Le.get(de).codeActionProvider.register(o,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(n,s,r,a)=>{const c=Le.get(na).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function _te(o,e){return Le.get(de).documentFormattingEditProvider.register(o,e)}function bte(o,e){return Le.get(de).documentRangeFormattingEditProvider.register(o,e)}function vte(o,e){return Le.get(de).onTypeFormattingEditProvider.register(o,e)}function Cte(o,e){return Le.get(de).linkProvider.register(o,e)}function wte(o,e){return Le.get(de).completionProvider.register(o,e)}function Ste(o,e){return Le.get(de).colorProvider.register(o,e)}function yte(o,e){return Le.get(de).foldingRangeProvider.register(o,e)}function Lte(o,e){return Le.get(de).declarationProvider.register(o,e)}function Dte(o,e){return Le.get(de).selectionRangeProvider.register(o,e)}function kte(o,e){return Le.get(de).documentSemanticTokensProvider.register(o,e)}function xte(o,e){return Le.get(de).documentRangeSemanticTokensProvider.register(o,e)}function Ite(o,e){return Le.get(de).inlineCompletionsProvider.register(o,e)}function Ete(o,e){return Le.get(de).inlayHintsProvider.register(o,e)}function Nte(){return{register:Gee,getLanguages:Zee,onLanguage:Qee,getEncodedLanguageId:Yee,setLanguageConfiguration:Xee,setColorMap:ite,registerTokensProviderFactory:EN,setTokensProvider:nte,setMonarchTokensProvider:ste,registerReferenceProvider:ote,registerRenameProvider:rte,registerCompletionItemProvider:wte,registerSignatureHelpProvider:ate,registerHoverProvider:lte,registerDocumentSymbolProvider:cte,registerDocumentHighlightProvider:dte,registerLinkedEditingRangeProvider:hte,registerDefinitionProvider:ute,registerImplementationProvider:gte,registerTypeDefinitionProvider:fte,registerCodeLensProvider:pte,registerCodeActionProvider:mte,registerDocumentFormattingEditProvider:_te,registerDocumentRangeFormattingEditProvider:bte,registerOnTypeFormattingEditProvider:vte,registerLinkProvider:Cte,registerColorProvider:Ste,registerFoldingRangeProvider:yte,registerDeclarationProvider:Lte,registerSelectionRangeProvider:Dte,registerDocumentSemanticTokensProvider:kte,registerDocumentRangeSemanticTokensProvider:xte,registerInlineCompletionsProvider:Ite,registerInlayHintsProvider:Ete,DocumentHighlightKind:lL,CompletionItemKind:iL,CompletionItemTag:nL,CompletionItemInsertTextRule:J0,SymbolKind:TL,SymbolTag:AL,IndentAction:gL,CompletionTriggerKind:sL,SignatureHelpTriggerKind:NL,InlayHintKind:pL,InlineCompletionTriggerKind:mL,CodeActionTriggerType:tL,FoldingRangeKind:Qo}}const NN=Ye("IEditorCancelService"),d3=new le("cancellableOperation",!1,p("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));et(NN,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=d3.bindTo(n.get(Ee)),r=new Dn;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},!0);class Tte extends Qi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(NN).add(e,this))}dispose(){this._unregister(),super.dispose()}}ee(new class extends xi{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:d3})}runEditorCommand(o,e){o.get(NN).cancel(e)}});class Tm{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const i=e.getModel();this.modelVersionId=i?Vs("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof Tm))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new Tm(e,this.flags))}}class qd extends Tte{constructor(e,t,i,n){super(e,n),this._listener=new Q,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!L.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!L.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class TN extends Qi{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function nl(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===o_.ICodeEditor:!1}function h3(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===o_.IDiffEditor:!1}function u3(o){return nl(o)?o:h3(o)?o.getModifiedEditor():null}class Lg{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=Lg._handleEolEdits(e,t);n.length===1&&Lg._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(s=>Ft.replace(L.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",n.map(s=>Ft.replaceMove(L.lift(s.range),s.text))),i&&e.pushUndoStop()}}class ty{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var ir=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function AN(o){if(o=o.filter(n=>n.range),!o.length)return;let{range:e}=o[0];for(let n=1;n0&&L.areIntersectingOrTouching(l[c-1],f)?l[c-1]=L.fromPositions(l[c-1].getStartPosition(),f.getEndPosition()):c=l.push(f);const d=f=>ir(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(r,f,r.getFormattingOptions(),a.token))||[]}),h=(f,_)=>{if(!f.length||!_.length)return!1;const b=f.reduce((v,C)=>L.plusRange(v,C.range),f[0].range);if(!_.some(v=>L.intersectRanges(b,v.range)))return!1;for(const v of f)for(const C of _)if(L.intersectRanges(v.range,C.range))return!0;return!1},u=[],g=[];try{for(const f of l){if(a.token.isCancellationRequested)return!0;g.push(yield d(f))}for(let f=0;f({text:b.text,range:L.lift(b.range),forceMoveMarkers:!0})),b=>{for(const{range:v}of b)if(L.areIntersectingOrTouching(v,_))return[new oe(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn)];return null})}return!0})}function Mte(o,e,t,i,n){return ir(this,void 0,void 0,function*(){const s=o.get(Ae),r=o.get(de),a=nl(e)?e.getModel():e,l=g3(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),c=yield Gd.select(l,a,t);c&&(i.report(c),yield s.invokeFunction(Rte,c,e,t,n))})}function Rte(o,e,t,i,n){return ir(this,void 0,void 0,function*(){const s=o.get(to);let r,a;nl(t)?(r=t.getModel(),a=new qd(t,5,void 0,n)):(r=t,a=new TN(t,n));let l;try{const c=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,c),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(nl(t))Lg.execute(t,l,i!==2),i!==2&&(AN(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:c}]=l,d=new oe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn);r.pushEditOperations([d],l.map(h=>({text:h.text,range:L.lift(h.range),forceMoveMarkers:!0})),h=>{for(const{range:u}of h)if(L.areIntersectingOrTouching(u,d))return[new oe(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function Ote(o,e,t,i,n,s){return ir(this,void 0,void 0,function*(){const r=e.documentRangeFormattingEditProvider.ordered(t);for(const a of r){const l=yield Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(Pi);if(rn(l))return yield o.computeMoreMinimalEdits(t.uri,l)}})}function Pte(o,e,t,i,n){return ir(this,void 0,void 0,function*(){const s=g3(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const r of s){const a=yield Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(Pi);if(rn(a))return yield o.computeMoreMinimalEdits(t.uri,a)}})}function p3(o,e,t,i,n,s,r){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(Pi).then(l=>o.computeMoreMinimalEdits(t.uri,l))}Xe.registerCommand("_executeFormatRangeProvider",function(o,...e){return ir(this,void 0,void 0,function*(){const[t,i,n]=e;pt(_e.isUri(t)),pt(L.isIRange(i));const s=o.get(Kn),r=o.get(to),a=o.get(de),l=yield s.createModelReference(t);try{return Ote(r,a,l.object.textEditorModel,L.lift(i),n,ze.None)}finally{l.dispose()}})});Xe.registerCommand("_executeFormatDocumentProvider",function(o,...e){return ir(this,void 0,void 0,function*(){const[t,i]=e;pt(_e.isUri(t));const n=o.get(Kn),s=o.get(to),r=o.get(de),a=yield n.createModelReference(t);try{return Pte(s,r,a.object.textEditorModel,i,ze.None)}finally{a.dispose()}})});Xe.registerCommand("_executeFormatOnTypeProvider",function(o,...e){return ir(this,void 0,void 0,function*(){const[t,i,n,s]=e;pt(_e.isUri(t)),pt(B.isIPosition(i)),pt(typeof n=="string");const r=o.get(Kn),a=o.get(to),l=o.get(de),c=yield r.createModelReference(t);try{return p3(a,l,c.object.textEditorModel,B.lift(i),n,s,ze.None)}finally{c.dispose()}})});var iy;nr.wrappingIndent.defaultValue=0;nr.glyphMargin.defaultValue=!1;nr.autoIndent.defaultValue=3;nr.overviewRulerLanes.defaultValue=2;Gd.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const xn=lP();xn.editor=Hee();xn.languages=Nte();const m3=xn.CancellationTokenSource,_3=xn.Emitter,b3=xn.KeyCode,v3=xn.KeyMod,C3=xn.Position,w3=xn.Range,S3=xn.Selection,y3=xn.SelectionDirection,L3=xn.MarkerSeverity,D3=xn.MarkerTag,k3=xn.Uri,x3=xn.Token,I3=xn.editor,E3=xn.languages;(((iy=ni.MonacoEnvironment)===null||iy===void 0?void 0:iy.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=xn);typeof self.require<"u"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const D_=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:m3,Emitter:_3,KeyCode:b3,KeyMod:v3,Position:C3,Range:w3,Selection:S3,SelectionDirection:y3,MarkerSeverity:L3,MarkerTag:D3,Uri:k3,Token:x3,editor:I3,languages:E3},Symbol.toStringTag,{value:"Module"}));/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Fte=Object.defineProperty,Bte=Object.getOwnPropertyDescriptor,Wte=Object.getOwnPropertyNames,Vte=Object.prototype.hasOwnProperty,sR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Wte(e))!Vte.call(o,n)&&n!==t&&Fte(o,n,{get:()=>e[n],enumerable:!(i=Bte(e,n))||i.enumerable});return o},Hte=(o,e,t)=>(sR(o,e,"default"),t&&sR(t,e,"default")),tp={};Hte(tp,D_);var N3={},ny={},T3=class{constructor(o){qt(this,"_languageId");qt(this,"_loadingTriggered");qt(this,"_lazyLoadPromise");qt(this,"_lazyLoadPromiseResolve");qt(this,"_lazyLoadPromiseReject");this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(o){return ny[o]||(ny[o]=new T3(o)),ny[o]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,N3[this._languageId].loader().then(o=>this._lazyLoadPromiseResolve(o),o=>this._lazyLoadPromiseReject(o))),this._lazyLoadPromise}};function pe(o){const e=o.id;N3[e]=o,tp.languages.register(o);const t=T3.getOrCreate(e);tp.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),tp.languages.onLanguage(e,async()=>{const i=await t.load();tp.languages.setLanguageConfiguration(e,i.conf)})}pe({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>ue(()=>import("./abap.15cc56c3.js"),[])});pe({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>ue(()=>import("./apex.3097bfba.js"),[])});pe({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>ue(()=>import("./azcli.b70fb9b3.js"),[])});pe({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>ue(()=>import("./bat.4e83862e.js"),[])});pe({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>ue(()=>import("./bicep.107c4876.js"),[])});pe({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>ue(()=>import("./cameligo.9b7ef084.js"),[])});pe({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>ue(()=>import("./clojure.9b9ce362.js"),[])});pe({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>ue(()=>import("./coffee.3343db4b.js"),[])});pe({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>ue(()=>import("./cpp.5842f29e.js"),[])});pe({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>ue(()=>import("./cpp.5842f29e.js"),[])});pe({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>ue(()=>import("./csharp.711e6ef5.js"),[])});pe({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>ue(()=>import("./csp.1454e635.js"),[])});pe({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>ue(()=>import("./css.0f39058b.js"),[])});pe({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>ue(()=>import("./cypher.8b877bda.js"),[])});pe({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>ue(()=>import("./dart.d9ca4827.js"),[])});pe({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>ue(()=>import("./dockerfile.b12c8d75.js"),[])});pe({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>ue(()=>import("./ecl.5841a83e.js"),[])});pe({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>ue(()=>import("./elixir.837d31f3.js"),[])});pe({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>ue(()=>import("./flow9.02cb4afd.js"),[])});pe({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>ue(()=>import("./fsharp.c6cc3d99.js"),[])});pe({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAutoInterpolationDollar)});pe({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAngleInterpolationDollar)});pe({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagBracketInterpolationDollar)});pe({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAngleInterpolationBracket)});pe({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagBracketInterpolationBracket)});pe({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAutoInterpolationDollar)});pe({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>ue(()=>import("./freemarker2.da17bfda.js"),["assets/freemarker2.da17bfda.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAutoInterpolationBracket)});pe({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>ue(()=>import("./go.e18cc8fd.js"),[])});pe({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>ue(()=>import("./graphql.91865f29.js"),[])});pe({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>ue(()=>import("./handlebars.8f21526b.js"),["assets/handlebars.8f21526b.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>ue(()=>import("./hcl.89542f1d.js"),[])});pe({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>ue(()=>import("./html.a026c447.js"),["assets/html.a026c447.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>ue(()=>import("./ini.927d4958.js"),[])});pe({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>ue(()=>import("./java.cae92986.js"),[])});pe({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>ue(()=>import("./javascript.f90e66cb.js"),["assets/javascript.f90e66cb.js","assets/typescript.8aa88c16.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>ue(()=>import("./julia.1ab2c6a6.js"),[])});pe({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>ue(()=>import("./kotlin.567012b4.js"),[])});pe({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>ue(()=>import("./less.8ff15de1.js"),[])});pe({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>ue(()=>import("./lexon.892ac9e8.js"),[])});pe({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>ue(()=>import("./lua.84919ba3.js"),[])});pe({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>ue(()=>import("./liquid.022aa170.js"),["assets/liquid.022aa170.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>ue(()=>import("./m3.dbd6d890.js"),[])});pe({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>ue(()=>import("./markdown.0bd269fb.js"),[])});pe({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>ue(()=>import("./mips.5b57214f.js"),[])});pe({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>ue(()=>import("./msdax.664f04d4.js"),[])});pe({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>ue(()=>import("./mysql.b3be80b5.js"),[])});pe({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>ue(()=>import("./objective-c.f61689b5.js"),[])});pe({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>ue(()=>import("./pascal.63810ab2.js"),[])});pe({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>ue(()=>import("./pascaligo.f3c373fd.js"),[])});pe({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>ue(()=>import("./perl.7a13b920.js"),[])});pe({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>ue(()=>import("./pgsql.231377e2.js"),[])});pe({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>ue(()=>import("./php.f75fab85.js"),[])});pe({id:"pla",extensions:[".pla"],loader:()=>ue(()=>import("./pla.53add393.js"),[])});pe({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>ue(()=>import("./postiats.b78836c4.js"),[])});pe({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>ue(()=>import("./powerquery.40e0a8e5.js"),[])});pe({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>ue(()=>import("./powershell.b2dc53b1.js"),[])});pe({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>ue(()=>import("./protobuf.bce7ad87.js"),[])});pe({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>ue(()=>import("./pug.e7bd8f2e.js"),[])});pe({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>ue(()=>import("./python.1cd2abe3.js"),["assets/python.1cd2abe3.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>ue(()=>import("./qsharp.9d22faff.js"),[])});pe({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>ue(()=>import("./r.77bb7e19.js"),[])});pe({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>ue(()=>import("./razor.a734f30f.js"),["assets/razor.a734f30f.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>ue(()=>import("./redis.d60fd379.js"),[])});pe({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>ue(()=>import("./redshift.3c32617e.js"),[])});pe({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>ue(()=>import("./restructuredtext.6d30740a.js"),[])});pe({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>ue(()=>import("./ruby.10c929d1.js"),[])});pe({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>ue(()=>import("./rust.abc56d3e.js"),[])});pe({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>ue(()=>import("./sb.4973b57f.js"),[])});pe({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>ue(()=>import("./scala.2026dee1.js"),[])});pe({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>ue(()=>import("./scheme.fe55144d.js"),[])});pe({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>ue(()=>import("./scss.4ba8f803.js"),[])});pe({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>ue(()=>import("./shell.2643570b.js"),[])});pe({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>ue(()=>import("./solidity.9a85e4e7.js"),[])});pe({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>ue(()=>import("./sophia.ae3e217e.js"),[])});pe({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>ue(()=>import("./sparql.6944fd44.js"),[])});pe({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>ue(()=>import("./sql.4f48b9c1.js"),[])});pe({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>ue(()=>import("./st.7c961594.js"),[])});pe({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>ue(()=>import("./swift.23da7225.js"),[])});pe({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>ue(()=>import("./systemverilog.0eef8e45.js"),[])});pe({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>ue(()=>import("./systemverilog.0eef8e45.js"),[])});pe({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>ue(()=>import("./tcl.236460f4.js"),[])});pe({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>ue(()=>import("./twig.b70b7ae1.js"),[])});pe({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>ue(()=>import("./typescript.8aa88c16.js"),["assets/typescript.8aa88c16.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>ue(()=>import("./vb.5502a104.js"),[])});pe({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\ue(()=>import("./xml.9eb7a6fc.js"),["assets/xml.9eb7a6fc.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});pe({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>ue(()=>import("./yaml.a0e81576.js"),["assets/yaml.a0e81576.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Fte=Object.defineProperty,Bte=Object.getOwnPropertyDescriptor,Wte=Object.getOwnPropertyNames,Vte=Object.prototype.hasOwnProperty,sR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Wte(e))!Vte.call(o,n)&&n!==t&&Fte(o,n,{get:()=>e[n],enumerable:!(i=Bte(e,n))||i.enumerable});return o},Hte=(o,e,t)=>(sR(o,e,"default"),t&&sR(t,e,"default")),tp={};Hte(tp,D_);var N3={},ny={},T3=class{constructor(o){qt(this,"_languageId");qt(this,"_loadingTriggered");qt(this,"_lazyLoadPromise");qt(this,"_lazyLoadPromiseResolve");qt(this,"_lazyLoadPromiseReject");this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(o){return ny[o]||(ny[o]=new T3(o)),ny[o]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,N3[this._languageId].loader().then(o=>this._lazyLoadPromiseResolve(o),o=>this._lazyLoadPromiseReject(o))),this._lazyLoadPromise}};function pe(o){const e=o.id;N3[e]=o,tp.languages.register(o);const t=T3.getOrCreate(e);tp.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),tp.languages.onLanguage(e,async()=>{const i=await t.load();tp.languages.setLanguageConfiguration(e,i.conf)})}pe({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>ue(()=>import("./abap.15cc56c3.js"),[])});pe({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>ue(()=>import("./apex.3097bfba.js"),[])});pe({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>ue(()=>import("./azcli.b70fb9b3.js"),[])});pe({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>ue(()=>import("./bat.4e83862e.js"),[])});pe({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>ue(()=>import("./bicep.107c4876.js"),[])});pe({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>ue(()=>import("./cameligo.9b7ef084.js"),[])});pe({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>ue(()=>import("./clojure.9b9ce362.js"),[])});pe({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>ue(()=>import("./coffee.3343db4b.js"),[])});pe({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>ue(()=>import("./cpp.5842f29e.js"),[])});pe({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>ue(()=>import("./cpp.5842f29e.js"),[])});pe({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>ue(()=>import("./csharp.711e6ef5.js"),[])});pe({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>ue(()=>import("./csp.1454e635.js"),[])});pe({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>ue(()=>import("./css.0f39058b.js"),[])});pe({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>ue(()=>import("./cypher.8b877bda.js"),[])});pe({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>ue(()=>import("./dart.d9ca4827.js"),[])});pe({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>ue(()=>import("./dockerfile.b12c8d75.js"),[])});pe({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>ue(()=>import("./ecl.5841a83e.js"),[])});pe({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>ue(()=>import("./elixir.837d31f3.js"),[])});pe({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>ue(()=>import("./flow9.02cb4afd.js"),[])});pe({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>ue(()=>import("./fsharp.c6cc3d99.js"),[])});pe({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAutoInterpolationDollar)});pe({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAngleInterpolationDollar)});pe({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagBracketInterpolationDollar)});pe({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAngleInterpolationBracket)});pe({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagBracketInterpolationBracket)});pe({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAutoInterpolationDollar)});pe({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>ue(()=>import("./freemarker2.5ac535cb.js"),["assets/freemarker2.5ac535cb.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"]).then(o=>o.TagAutoInterpolationBracket)});pe({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>ue(()=>import("./go.e18cc8fd.js"),[])});pe({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>ue(()=>import("./graphql.91865f29.js"),[])});pe({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>ue(()=>import("./handlebars.6e3dd22e.js"),["assets/handlebars.6e3dd22e.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>ue(()=>import("./hcl.89542f1d.js"),[])});pe({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>ue(()=>import("./html.7cbc54d4.js"),["assets/html.7cbc54d4.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>ue(()=>import("./ini.927d4958.js"),[])});pe({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>ue(()=>import("./java.cae92986.js"),[])});pe({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>ue(()=>import("./javascript.ad911371.js"),["assets/javascript.ad911371.js","assets/typescript.ac0b7aa1.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>ue(()=>import("./julia.1ab2c6a6.js"),[])});pe({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>ue(()=>import("./kotlin.567012b4.js"),[])});pe({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>ue(()=>import("./less.8ff15de1.js"),[])});pe({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>ue(()=>import("./lexon.892ac9e8.js"),[])});pe({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>ue(()=>import("./lua.84919ba3.js"),[])});pe({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>ue(()=>import("./liquid.f7b7c7fe.js"),["assets/liquid.f7b7c7fe.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>ue(()=>import("./m3.dbd6d890.js"),[])});pe({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>ue(()=>import("./markdown.0bd269fb.js"),[])});pe({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>ue(()=>import("./mips.5b57214f.js"),[])});pe({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>ue(()=>import("./msdax.664f04d4.js"),[])});pe({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>ue(()=>import("./mysql.b3be80b5.js"),[])});pe({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>ue(()=>import("./objective-c.f61689b5.js"),[])});pe({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>ue(()=>import("./pascal.63810ab2.js"),[])});pe({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>ue(()=>import("./pascaligo.f3c373fd.js"),[])});pe({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>ue(()=>import("./perl.7a13b920.js"),[])});pe({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>ue(()=>import("./pgsql.231377e2.js"),[])});pe({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>ue(()=>import("./php.f75fab85.js"),[])});pe({id:"pla",extensions:[".pla"],loader:()=>ue(()=>import("./pla.53add393.js"),[])});pe({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>ue(()=>import("./postiats.b78836c4.js"),[])});pe({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>ue(()=>import("./powerquery.40e0a8e5.js"),[])});pe({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>ue(()=>import("./powershell.b2dc53b1.js"),[])});pe({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>ue(()=>import("./protobuf.bce7ad87.js"),[])});pe({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>ue(()=>import("./pug.e7bd8f2e.js"),[])});pe({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>ue(()=>import("./python.3eb11cc2.js"),["assets/python.3eb11cc2.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>ue(()=>import("./qsharp.9d22faff.js"),[])});pe({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>ue(()=>import("./r.77bb7e19.js"),[])});pe({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>ue(()=>import("./razor.5b8183f8.js"),["assets/razor.5b8183f8.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>ue(()=>import("./redis.d60fd379.js"),[])});pe({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>ue(()=>import("./redshift.3c32617e.js"),[])});pe({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>ue(()=>import("./restructuredtext.6d30740a.js"),[])});pe({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>ue(()=>import("./ruby.10c929d1.js"),[])});pe({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>ue(()=>import("./rust.abc56d3e.js"),[])});pe({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>ue(()=>import("./sb.4973b57f.js"),[])});pe({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>ue(()=>import("./scala.2026dee1.js"),[])});pe({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>ue(()=>import("./scheme.fe55144d.js"),[])});pe({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>ue(()=>import("./scss.4ba8f803.js"),[])});pe({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>ue(()=>import("./shell.2643570b.js"),[])});pe({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>ue(()=>import("./solidity.9a85e4e7.js"),[])});pe({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>ue(()=>import("./sophia.ae3e217e.js"),[])});pe({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>ue(()=>import("./sparql.6944fd44.js"),[])});pe({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>ue(()=>import("./sql.4f48b9c1.js"),[])});pe({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>ue(()=>import("./st.7c961594.js"),[])});pe({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>ue(()=>import("./swift.23da7225.js"),[])});pe({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>ue(()=>import("./systemverilog.0eef8e45.js"),[])});pe({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>ue(()=>import("./systemverilog.0eef8e45.js"),[])});pe({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>ue(()=>import("./tcl.236460f4.js"),[])});pe({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>ue(()=>import("./twig.b70b7ae1.js"),[])});pe({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>ue(()=>import("./typescript.ac0b7aa1.js"),["assets/typescript.ac0b7aa1.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>ue(()=>import("./vb.5502a104.js"),[])});pe({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\ue(()=>import("./xml.d83bcfca.js"),["assets/xml.d83bcfca.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});pe({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>ue(()=>import("./yaml.8e5d7e4f.js"),["assets/yaml.8e5d7e4f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var zte=Object.defineProperty,Ute=Object.getOwnPropertyDescriptor,$te=Object.getOwnPropertyNames,jte=Object.prototype.hasOwnProperty,oR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $te(e))!jte.call(o,n)&&n!==t&&zte(o,n,{get:()=>e[n],enumerable:!(i=Ute(e,n))||i.enumerable});return o},Kte=(o,e,t)=>(oR(o,e,"default"),t&&oR(t,e,"default")),Xg={};Kte(Xg,D_);var MN=class{constructor(o,e,t){qt(this,"_onDidChange",new Xg.Emitter);qt(this,"_options");qt(this,"_modeConfiguration");qt(this,"_languageId");this._languageId=o,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(o){this._options=o||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(o){this.setOptions(o)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},RN={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},ON={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},A3=new MN("css",RN,ON),M3=new MN("scss",RN,ON),R3=new MN("less",RN,ON);Xg.languages.css={cssDefaults:A3,lessDefaults:R3,scssDefaults:M3};function PN(){return ue(()=>import("./cssMode.84f7d84d.js"),["assets/cssMode.84f7d84d.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])}Xg.languages.onLanguage("less",()=>{PN().then(o=>o.setupMode(R3))});Xg.languages.onLanguage("scss",()=>{PN().then(o=>o.setupMode(M3))});Xg.languages.onLanguage("css",()=>{PN().then(o=>o.setupMode(A3))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var zte=Object.defineProperty,Ute=Object.getOwnPropertyDescriptor,$te=Object.getOwnPropertyNames,jte=Object.prototype.hasOwnProperty,oR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $te(e))!jte.call(o,n)&&n!==t&&zte(o,n,{get:()=>e[n],enumerable:!(i=Ute(e,n))||i.enumerable});return o},Kte=(o,e,t)=>(oR(o,e,"default"),t&&oR(t,e,"default")),Xg={};Kte(Xg,D_);var MN=class{constructor(o,e,t){qt(this,"_onDidChange",new Xg.Emitter);qt(this,"_options");qt(this,"_modeConfiguration");qt(this,"_languageId");this._languageId=o,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(o){this._options=o||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(o){this.setOptions(o)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},RN={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},ON={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},A3=new MN("css",RN,ON),M3=new MN("scss",RN,ON),R3=new MN("less",RN,ON);Xg.languages.css={cssDefaults:A3,lessDefaults:R3,scssDefaults:M3};function PN(){return ue(()=>import("./cssMode.a07fb68f.js"),["assets/cssMode.a07fb68f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])}Xg.languages.onLanguage("less",()=>{PN().then(o=>o.setupMode(R3))});Xg.languages.onLanguage("scss",()=>{PN().then(o=>o.setupMode(M3))});Xg.languages.onLanguage("css",()=>{PN().then(o=>o.setupMode(A3))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var qte=Object.defineProperty,Gte=Object.getOwnPropertyDescriptor,Zte=Object.getOwnPropertyNames,Yte=Object.prototype.hasOwnProperty,rR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Zte(e))!Yte.call(o,n)&&n!==t&&qte(o,n,{get:()=>e[n],enumerable:!(i=Gte(e,n))||i.enumerable});return o},Qte=(o,e,t)=>(rR(o,e,"default"),t&&rR(t,e,"default")),q1={};Qte(q1,D_);var Xte=class{constructor(o,e,t){qt(this,"_onDidChange",new q1.Emitter);qt(this,"_options");qt(this,"_modeConfiguration");qt(this,"_languageId");this._languageId=o,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(o){this._options=o||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},Jte={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},G1={format:Jte,suggest:{},data:{useDefaultDataProvider:!0}};function Z1(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===xp,documentFormattingEdits:o===xp,documentRangeFormattingEdits:o===xp}}var xp="html",aR="handlebars",lR="razor",O3=Y1(xp,G1,Z1(xp)),eie=O3.defaults,P3=Y1(aR,G1,Z1(aR)),tie=P3.defaults,F3=Y1(lR,G1,Z1(lR)),iie=F3.defaults;q1.languages.html={htmlDefaults:eie,razorDefaults:iie,handlebarDefaults:tie,htmlLanguageService:O3,handlebarLanguageService:P3,razorLanguageService:F3,registerHTMLLanguageService:Y1};function nie(){return ue(()=>import("./htmlMode.bf1c4c91.js"),["assets/htmlMode.bf1c4c91.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])}function Y1(o,e=G1,t=Z1(o)){const i=new Xte(o,e,t);let n;const s=q1.languages.onLanguage(o,async()=>{n=(await nie()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var qte=Object.defineProperty,Gte=Object.getOwnPropertyDescriptor,Zte=Object.getOwnPropertyNames,Yte=Object.prototype.hasOwnProperty,rR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Zte(e))!Yte.call(o,n)&&n!==t&&qte(o,n,{get:()=>e[n],enumerable:!(i=Gte(e,n))||i.enumerable});return o},Qte=(o,e,t)=>(rR(o,e,"default"),t&&rR(t,e,"default")),q1={};Qte(q1,D_);var Xte=class{constructor(o,e,t){qt(this,"_onDidChange",new q1.Emitter);qt(this,"_options");qt(this,"_modeConfiguration");qt(this,"_languageId");this._languageId=o,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(o){this._options=o||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},Jte={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},G1={format:Jte,suggest:{},data:{useDefaultDataProvider:!0}};function Z1(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===xp,documentFormattingEdits:o===xp,documentRangeFormattingEdits:o===xp}}var xp="html",aR="handlebars",lR="razor",O3=Y1(xp,G1,Z1(xp)),eie=O3.defaults,P3=Y1(aR,G1,Z1(aR)),tie=P3.defaults,F3=Y1(lR,G1,Z1(lR)),iie=F3.defaults;q1.languages.html={htmlDefaults:eie,razorDefaults:iie,handlebarDefaults:tie,htmlLanguageService:O3,handlebarLanguageService:P3,razorLanguageService:F3,registerHTMLLanguageService:Y1};function nie(){return ue(()=>import("./htmlMode.141d1da7.js"),["assets/htmlMode.141d1da7.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])}function Y1(o,e=G1,t=Z1(o)){const i=new Xte(o,e,t);let n;const s=q1.languages.onLanguage(o,async()=>{n=(await nie()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var sie=Object.defineProperty,oie=Object.getOwnPropertyDescriptor,rie=Object.getOwnPropertyNames,aie=Object.prototype.hasOwnProperty,cR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rie(e))!aie.call(o,n)&&n!==t&&sie(o,n,{get:()=>e[n],enumerable:!(i=oie(e,n))||i.enumerable});return o},lie=(o,e,t)=>(cR(o,e,"default"),t&&cR(t,e,"default")),k_={};lie(k_,D_);var cie=class{constructor(o,e,t){qt(this,"_onDidChange",new k_.Emitter);qt(this,"_diagnosticsOptions");qt(this,"_modeConfiguration");qt(this,"_languageId");this._languageId=o,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},die={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},hie={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},B3=new cie("json",die,hie);k_.languages.json={jsonDefaults:B3};function uie(){return ue(()=>import("./jsonMode.9952188c.js"),["assets/jsonMode.9952188c.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])}k_.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});k_.languages.onLanguage("json",()=>{uie().then(o=>o.setupMode(B3))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var sie=Object.defineProperty,oie=Object.getOwnPropertyDescriptor,rie=Object.getOwnPropertyNames,aie=Object.prototype.hasOwnProperty,cR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rie(e))!aie.call(o,n)&&n!==t&&sie(o,n,{get:()=>e[n],enumerable:!(i=oie(e,n))||i.enumerable});return o},lie=(o,e,t)=>(cR(o,e,"default"),t&&cR(t,e,"default")),k_={};lie(k_,D_);var cie=class{constructor(o,e,t){qt(this,"_onDidChange",new k_.Emitter);qt(this,"_diagnosticsOptions");qt(this,"_modeConfiguration");qt(this,"_languageId");this._languageId=o,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},die={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},hie={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},B3=new cie("json",die,hie);k_.languages.json={jsonDefaults:B3};function uie(){return ue(()=>import("./jsonMode.8ce8b65f.js"),["assets/jsonMode.8ce8b65f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])}k_.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});k_.languages.onLanguage("json",()=>{uie().then(o=>o.setupMode(B3))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var gie=Object.defineProperty,fie=Object.getOwnPropertyDescriptor,pie=Object.getOwnPropertyNames,mie=Object.prototype.hasOwnProperty,dR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pie(e))!mie.call(o,n)&&n!==t&&gie(o,n,{get:()=>e[n],enumerable:!(i=fie(e,n))||i.enumerable});return o},_ie=(o,e,t)=>(dR(o,e,"default"),t&&dR(t,e,"default")),bie="4.5.5",Dg={};_ie(Dg,D_);var W3=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(W3||{}),V3=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(V3||{}),H3=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(H3||{}),z3=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(z3||{}),U3=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(U3||{}),$3=class{constructor(o,e,t,i){qt(this,"_onDidChange",new Dg.Emitter);qt(this,"_onDidExtraLibsChange",new Dg.Emitter);qt(this,"_extraLibs");qt(this,"_removedExtraLibs");qt(this,"_eagerModelSync");qt(this,"_compilerOptions");qt(this,"_diagnosticsOptions");qt(this,"_workerOptions");qt(this,"_onDidExtraLibsChangeTimeout");qt(this,"_inlayHintsOptions");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];!n||n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}},vie=bie,j3=new $3({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),K3=new $3({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),Cie=()=>Q1().then(o=>o.getTypeScriptWorker()),wie=()=>Q1().then(o=>o.getJavaScriptWorker());Dg.languages.typescript={ModuleKind:W3,JsxEmit:V3,NewLineKind:H3,ScriptTarget:z3,ModuleResolutionKind:U3,typescriptVersion:vie,typescriptDefaults:j3,javascriptDefaults:K3,getTypeScriptWorker:Cie,getJavaScriptWorker:wie};function Q1(){return ue(()=>import("./tsMode.f7255e05.js"),["assets/tsMode.f7255e05.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css"])}Dg.languages.onLanguage("typescript",()=>Q1().then(o=>o.setupTypeScript(j3)));Dg.languages.onLanguage("javascript",()=>Q1().then(o=>o.setupJavaScript(K3)));var Sie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yie=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},X1=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const J1=new le("selectionAnchorSet",!1);let sl=class q3{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=J1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(q3.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(oe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Fn().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Gi(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(oe.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};sl.ID="editor.contrib.selectionAnchorController";sl=Sie([yie(1,Ee)],sl);class Lie extends ce{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2080),weight:100}})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class Die extends ce{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:J1})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class kie extends ce{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:J1,kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2089),weight:100}})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class xie extends ce{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:J1,kbOpts:{kbExpr:N.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}tt(sl.ID,sl);ie(Lie);ie(Die);ie(kie);ie(xie);const Iie=T("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Eie extends ce{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;(i=Yo.get(t))===null||i===void 0||i.jumpToBracket()}}class Nie extends ce{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=Yo.get(t))===null||n===void 0||n.selectToBracket(s)}}class Tie{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Yo extends H{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new mt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(66),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(66)&&(this._matchBrackets=this._editor.getOption(66),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(Yo.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new oe(r.lineNumber,r.column,r.lineNumber,r.column):new oe(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const c=t.bracketPairs.findNextBracket(s);c&&c.range&&(r=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(L.compareRangesUsingStarts);const[c,d]=r;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new oe(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h1&&s.sort(B.compare);const a=[];let l=0,c=0;const d=n.length;for(let h=0,u=s.length;h{const t=o.getColor(A$);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=o.getColor(z4);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)});qs.appendMenuItem(M.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Aie{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new L(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,s,i,s),a)}else{const r=new L(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new oe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new oe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class G3 extends ce{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new Aie(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class Mie extends G3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:p("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:N.writable})}}class Rie extends G3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:p("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:N.writable})}}ie(Mie);ie(Rie);class Oie extends ce{constructor(){super({id:"editor.action.transposeLetters",label:p("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,c=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;const d=l===c?r.getPosition():lt.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=lt.leftPosition(i,d),u=lt.leftPosition(i,h),g=i.getValueInRange(L.fromPositions(u,h)),f=i.getValueInRange(L.fromPositions(h,d)),_=L.fromPositions(u,d);n.push(new zi(_,f+g))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}ie(Oie);var Pie=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Zd="9_cutcopypaste",Fie=jo||document.queryCommandSupported("cut"),Z3=jo||document.queryCommandSupported("copy"),Bie=typeof navigator.clipboard>"u"||Ls?document.queryCommandSupported("paste"):!0;function FN(o){return o.register(),o}const Wie=Fie?FN(new Ug({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:jo?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:M.MenubarEditMenu,group:"2_ccp",title:p({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:M.EditorContext,group:Zd,title:p("actions.clipboard.cutLabel","Cut"),when:N.writable,order:1},{menuId:M.CommandPalette,group:"",title:p("actions.clipboard.cutLabel","Cut"),order:1},{menuId:M.SimpleEditorContext,group:Zd,title:p("actions.clipboard.cutLabel","Cut"),when:N.writable,order:1}]})):void 0,Vie=Z3?FN(new Ug({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:jo?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:M.MenubarEditMenu,group:"2_ccp",title:p({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:M.EditorContext,group:Zd,title:p("actions.clipboard.copyLabel","Copy"),order:2},{menuId:M.CommandPalette,group:"",title:p("actions.clipboard.copyLabel","Copy"),order:1},{menuId:M.SimpleEditorContext,group:Zd,title:p("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;qs.appendMenuItem(M.MenubarEditMenu,{submenu:M.MenubarCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});qs.appendMenuItem(M.EditorContext,{submenu:M.EditorContextCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:Zd,order:3});qs.appendMenuItem(M.EditorContext,{submenu:M.EditorContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1});const sy=Bie?FN(new Ug({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:jo?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:M.MenubarEditMenu,group:"2_ccp",title:p({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:M.EditorContext,group:Zd,title:p("actions.clipboard.pasteLabel","Paste"),when:N.writable,order:4},{menuId:M.CommandPalette,group:"",title:p("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:M.SimpleEditorContext,group:Zd,title:p("actions.clipboard.pasteLabel","Paste"),when:N.writable,order:4}]})):void 0;class Hie extends ce{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(33)&&t.getSelection().isEmpty()||(gD.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),gD.forceCopyWithSyntaxHighlighting=!1)}}function Y3(o,e){!o||(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(ct).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(33),r=n.getSelection();return r&&r.isEmpty()&&!s||document.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}Y3(Wie,"cut");Y3(Vie,"copy");sy&&(sy.addImplementation(1e4,"code-editor",(o,e)=>{const t=o.get(ct),i=o.get(cl),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&Sc?(()=>Pie(void 0,void 0,void 0,function*(){const r=yield i.readText();if(r!==""){const a=im.INSTANCE.get(r);let l=!1,c=null,d=null;a&&(l=n.getOption(33)&&!!a.isFromEmptySelection,c=typeof a.multicursorText<"u"?a.multicursorText:null,d=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),sy.addImplementation(0,"generic-dom",(o,e)=>(document.execCommand("paste"),!0)));Z3&&ie(Hie);class Ze{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Ze.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Ze(this.value+Ze.sep+e)}}Ze.sep=".";Ze.None=new Ze("@@none@@");Ze.Empty=new Ze("");Ze.QuickFix=new Ze("quickfix");Ze.Refactor=new Ze("refactor");Ze.Source=new Ze("source");Ze.SourceOrganizeImports=Ze.Source.append("organizeImports");Ze.SourceFixAll=Ze.Source.append("fixAll");var bn;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(bn||(bn={}));function zie(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>Q3(e,t,o.include))||!o.includeSourceActions&&Ze.Source.contains(e))}function Uie(o,e){const t=e.kind?new Ze(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>Q3(t,i,o.include))||!o.includeSourceActions&&t&&Ze.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function Q3(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class Nr{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new Nr(t.kind,t.apply,!1):new Nr(Nr.getKindFromUser(e,t.kind),Nr.getApplyFromUser(e,t.apply),Nr.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ze(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var BN=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const X3="editor.action.codeAction",J3="editor.action.refactor",$ie="editor.action.refactor.preview",e7="editor.action.sourceAction",WN="editor.action.organizeImports",VN="editor.action.fixAll";class t7{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return BN(this,void 0,void 0,function*(){if(((t=this.provider)===null||t===void 0?void 0:t.resolveCodeAction)&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Pi(n)}i&&(this.action.edit=i.edit)}return this})}}class HN extends H{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(HN.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:rn(e.diagnostics)?rn(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:rn(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ze.QuickFix.contains(new Ze(e.kind))&&!!e.isPreferred)}}const hR={actions:[],documentation:void 0};function zN(o,e,t,i,n,s){var r;const a=i.filter||{},l={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new TN(e,s),d=jie(o,e,a),h=new Q,u=d.map(f=>BN(this,void 0,void 0,function*(){try{n.report(f);const _=yield f.provideCodeActions(e,t,l,c.token);if(_&&h.add(_),c.token.isCancellationRequested)return hR;const b=((_==null?void 0:_.actions)||[]).filter(C=>C&&Uie(a,C)),v=Kie(f,b,a.include);return{actions:b.map(C=>new t7(C,f)),documentation:v}}catch(_){if(ea(_))throw _;return Pi(_),hR}})),g=o.onDidChange(()=>{const f=o.all(e);Ss(f,d)||c.cancel()});return Promise.all(u).then(f=>{const _=f.map(v=>v.actions).flat(),b=i_(f.map(v=>v.documentation));return new HN(_,b,h)}).finally(()=>{g.dispose(),c.dispose()})}function jie(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>zie(t,new Ze(n))):!0)}function Kie(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Ze(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(!!n.kind){for(const s of i)if(s.kind.contains(new Ze(n.kind)))return s.command}}Xe.registerCommand("_executeCodeActionProvider",function(o,e,t,i,n){return BN(this,void 0,void 0,function*(){if(!(e instanceof _e))throw Ko();const{codeActionProvider:s}=o.get(de),r=o.get(Ut).getModel(e);if(!r)throw Ko();const a=oe.isISelection(t)?oe.liftSelection(t):L.isIRange(t)?r.validateRange(t):void 0;if(!a)throw Ko();const l=typeof i=="string"?new Ze(i):void 0,c=yield zN(s,r,a,{type:1,triggerAction:bn.Default,filter:{includeSourceActions:!0,include:l}},Ch.None,ze.None),d=[],h=Math.min(c.validActions.length,typeof n=="number"?n:0);for(let u=0;uu.action)}finally{setTimeout(()=>c.dispose(),100)}})});var qie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gie=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let os=class Wk{constructor(e,t){this._messageWidget=new _n,this._messageListeners=new Q,this._editor=e,this._visible=Wk.MESSAGE_VISIBLE.bindTo(t)}static get(e){return e.getContribution(Wk.ID)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Gi(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new uR(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new xs(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{!n.target.position||(i?i.containsPosition(n.target.position)||this.closeMessage():i=new L(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(uR.fadeOut(this._messageWidget.value))}};os.ID="editor.contrib.messageController";os.MESSAGE_VISIBLE=new le("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));os=qie([Gie(1,Ee)],os);const Zie=xi.bindToContribution(os.get);ee(new Zie({id:"leaveEditorMessage",precondition:os.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class uR{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}}tt(os.ID,os);var i7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_a=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Yie=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Jg={Visible:new le("CodeActionMenuVisible",!1,p("CodeActionMenuVisible","Whether the code action list widget is visible"))};class oy extends is{constructor(e,t){super(e.command?e.command.id:e.title,Qie(e.title),void 0,!e.disabled,t),this.action=e}}function Qie(o){return o.replace(/\r\n|\r|\n/g," ")}const Xie="codeActionWidget",ry=26;let Vk=class{constructor(e,t){this.acceptKeybindings=e,this.keybindingService=t}get templateId(){return Xie}renderTemplate(e){const t=Object.create(null);return t.disposables=[],t.root=e,t.text=document.createElement("span"),e.append(t.text),t}renderElement(e,t,i){const n=i,s=e.title,r=e.isEnabled,a=e.isSeparator,l=e.isDocumentation;n.text.textContent=s,r?n.root.classList.remove("option-disabled"):(n.root.classList.add("option-disabled"),n.root.style.backgroundColor="transparent !important"),a&&(n.root.classList.add("separator"),n.root.style.height="10px"),l||(()=>{var d,h;const[u,g]=this.acceptKeybindings;n.root.title=p({key:"label",comment:['placeholders are keybindings, e.g "F2 to Refactor, Shift+F2 to Preview"']},"{0} to Refactor, {1} to Preview",(d=this.keybindingService.lookupKeybinding(u))===null||d===void 0?void 0:d.getLabel(),(h=this.keybindingService.lookupKeybinding(g))===null||h===void 0?void 0:h.getLabel())})()}disposeTemplate(e){e.disposables=nt(e.disposables)}};Vk=i7([_a(1,_i)],Vk);let uC=class Hk extends H{constructor(e,t,i,n,s,r,a,l,c,d){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=s,this._telemetryService=r,this._configurationService=l,this._contextViewService=c,this._contextKeyService=d,this._showingActions=this._register(new _n),this.codeActionList=this._register(new _n),this.options=[],this._visible=!1,this.viewItems=[],this.hasSeperator=!1,this._keybindingResolver=new ew({getKeybindings:()=>n.getKeybindings()}),this._ctxMenuWidgetVisible=Jg.Visible.bindTo(this._contextKeyService),this.listRenderer=new Vk(["onEnterSelectCodeAction","onEnterSelectCodeActionWithPreview"],n)}get isVisible(){return this._visible}isCodeActionWidgetEnabled(e){return this._configurationService.getValue("editor.experimental.useCustomCodeActionMenu",{resource:e.uri})}_onListSelection(e){e.elements.length&&e.elements.forEach(t=>{t.isEnabled&&(t.action.run(),this.hideCodeActionWidget())})}_onListHover(e){var t,i,n,s;e.element?!((i=e.element)===null||i===void 0)&&i.isEnabled?((n=this.codeActionList.value)===null||n===void 0||n.setFocus([e.element.index]),this.focusedEnabledItem=this.viewItems.indexOf(e.element),this.currSelectedItem=e.element.index):(this.currSelectedItem=void 0,(s=this.codeActionList.value)===null||s===void 0||s.setFocus([e.element.index])):(this.currSelectedItem=void 0,(t=this.codeActionList.value)===null||t===void 0||t.setFocus([]))}renderCodeActionMenuList(e,t){var i;const n=new Q,s=document.createElement("div"),r=document.createElement("div");this.block=e.appendChild(r),this.block.classList.add("context-view-block"),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",n.add(G(this.block,ae.MOUSE_DOWN,u=>u.stopPropagation())),s.id="codeActionMenuWidget",s.classList.add("codeActionMenuWidget"),e.appendChild(s),this.codeActionList.value=new rr("codeActionWidget",s,{getHeight(u){return u.isSeparator?10:ry},getTemplateId(u){return"codeActionWidget"}},[this.listRenderer],{keyboardSupport:!1}),n.add(this.codeActionList.value.onMouseOver(u=>this._onListHover(u))),n.add(this.codeActionList.value.onDidChangeFocus(u=>{var g;return(g=this.codeActionList.value)===null||g===void 0?void 0:g.domFocus()})),n.add(this.codeActionList.value.onDidChangeSelection(u=>this._onListSelection(u))),n.add(this._editor.onDidLayoutChange(u=>this.hideCodeActionWidget())),t.forEach((u,g)=>{const f=u.class==="separator";let _=!1;u instanceof oy&&(_=u.action.kind===Hk.documentationID),f&&(this.hasSeperator=!0);const b={title:u.label,detail:u.tooltip,action:t[g],isEnabled:u.enabled,isSeparator:f,index:g,isDocumentation:_};u.enabled&&this.viewItems.push(b),this.options.push(b)}),this.codeActionList.value.splice(0,this.codeActionList.value.length,this.options);const a=this.hasSeperator?(t.length-1)*ry+10:t.length*ry;s.style.height=String(a)+"px",this.codeActionList.value.layout(a);const l=[];this.options.forEach((u,g)=>{var f,_;if(!this.codeActionList.value)return;const b=(_=document.getElementById((f=this.codeActionList.value)===null||f===void 0?void 0:f.getElementID(g)))===null||_===void 0?void 0:_.getElementsByTagName("span")[0].offsetWidth;l.push(Number(b))});const c=Math.max(...l);s.style.width=c+52+"px",(i=this.codeActionList.value)===null||i===void 0||i.layout(a,c),this.viewItems.length<1||this.viewItems.every(u=>u.isDocumentation)?this.currSelectedItem=void 0:(this.focusedEnabledItem=0,this.currSelectedItem=this.viewItems[0].index,this.codeActionList.value.setFocus([this.currSelectedItem])),this.codeActionList.value.domFocus();const d=Od(e),h=d.onDidBlur(()=>{this.hideCodeActionWidget()});return n.add(h),n.add(d),this._ctxMenuWidgetVisible.set(!0),n}focusPrevious(){var e;if(typeof this.focusedEnabledItem>"u")this.focusedEnabledItem=this.viewItems[0].index;else if(this.viewItems.length<1)return!1;const t=this.focusedEnabledItem;let i;do this.focusedEnabledItem=this.focusedEnabledItem-1,this.focusedEnabledItem<0&&(this.focusedEnabledItem=this.viewItems.length-1),i=this.viewItems[this.focusedEnabledItem],(e=this.codeActionList.value)===null||e===void 0||e.setFocus([i.index]),this.currSelectedItem=i.index;while(this.focusedEnabledItem!==t&&(!i.isEnabled||i.action.id===ln.ID));return!0}focusNext(){var e;if(typeof this.focusedEnabledItem>"u")this.focusedEnabledItem=this.viewItems.length-1;else if(this.viewItems.length<1)return!1;const t=this.focusedEnabledItem;let i;do this.focusedEnabledItem=(this.focusedEnabledItem+1)%this.viewItems.length,i=this.viewItems[this.focusedEnabledItem],(e=this.codeActionList.value)===null||e===void 0||e.setFocus([i.index]),this.currSelectedItem=i.index;while(this.focusedEnabledItem!==t&&(!i.isEnabled||i.action.id===ln.ID));return!0}navigateListWithKeysUp(){this.focusPrevious()}navigateListWithKeysDown(){this.focusNext()}onEnterSet(){var e;typeof this.currSelectedItem=="number"&&((e=this.codeActionList.value)===null||e===void 0||e.setSelection([this.currSelectedItem]))}dispose(){super.dispose()}hideCodeActionWidget(){this._ctxMenuWidgetVisible.reset(),this.options=[],this.viewItems=[],this.focusedEnabledItem=0,this.currSelectedItem=void 0,this.hasSeperator=!1,this._contextViewService.hideContextView({source:this})}codeActionTelemetry(e,t,i){this._telemetryService.publicLog2("codeAction.applyCodeAction",{codeActionFrom:e,validCodeActions:i.validActions.length,cancelled:t})}show(e,t,i,n){return Yie(this,void 0,void 0,function*(){const s=this._editor.getModel();if(!s)return;const r=n.includeDisabledActions?t.allActions:t.validActions;if(!r.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,QO();this._visible=!0,this._showingActions.value=t;const a=this.getMenuActions(e,r,t.documentation),l=B.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},c=this._keybindingResolver.getResolver(),d=this._editor.getOption(117);this.isCodeActionWidgetEnabled(s)?this._contextViewService.showContextView({getAnchor:()=>l,render:h=>this.renderCodeActionMenuList(h,a),onHide:h=>{const u=n.fromLightbulb?bn.Lightbulb:e.triggerAction;this.codeActionTelemetry(u,h,t),this._visible=!1,this._editor.focus()}},this._editor.getDomNode(),!1):this._contextMenuService.showContextMenu({domForShadowRoot:d?this._editor.getDomNode():void 0,getAnchor:()=>l,getActions:()=>a,onHide:h=>{const u=n.fromLightbulb?bn.Lightbulb:e.triggerAction;this.codeActionTelemetry(u,h,t),this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:h=>h instanceof oy?c(h.action):void 0})})}getMenuActions(e,t,i){var n,s;const r=d=>new oy(d.action,()=>this._delegate.onSelectCodeAction(d,e)),a=t.map(r),l=[...i],c=this._editor.getModel();if(c&&a.length)for(const d of this._languageFeaturesService.codeActionProvider.all(c))d._getAdditionalMenuItems&&l.push(...d._getAdditionalMenuItems({trigger:e.type,only:(s=(n=e.filter)===null||n===void 0?void 0:n.include)===null||s===void 0?void 0:s.value},t.map(h=>h.action)));return l.length&&a.push(new ln,...l.map(d=>r(new t7({title:d.title,command:d,kind:Hk.documentationID},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=on(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}};uC.documentationID="_documentation";uC=i7([_a(2,ll),_a(3,_i),_a(4,de),_a(5,sr),_a(6,Ct),_a(7,ot),_a(8,vh),_a(9,Ee)],uC);class ew{constructor(e){this._keybindingProvider=e}getResolver(){const e=new Ju(()=>this._keybindingProvider.getKeybindings().filter(t=>ew.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===WN?i={kind:Ze.SourceOrganizeImports.value}:t.command===VN&&(i={kind:Ze.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Nr.fromUser(i,{kind:Ze.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ze(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}}ew.codeActionCommands=[J3,X3,e7,WN,VN];var Jie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ene=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ip;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})(Ip||(Ip={}));let gC=class n7 extends H{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new R),this.onClick=this._onClick.event,this._state=Ip.Hidden,this._domNode=document.createElement("div"),this._domNode.className=m.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),ft.ignoreTarget(this._domNode),this._register(zH(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:r,height:a}=on(this._domNode),l=this._editor.getOption(61);let c=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(s.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(59)&&!this._editor.getOption(59).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(59).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,c=n.get(46),d=s.getLineContent(r),h=S1(d,l),u=c.spaceWidth*h>22,g=_=>_>2&&this._editor.getTopForLineNumber(_)===this._editor.getTopForLineNumber(_-1);let f=r;if(!u){if(r>1&&!g(r-1))f-=1;else if(!g(r+1))f+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new Ip.Showing(e,t,i,{position:{lineNumber:f,column:1},preference:n7._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=Ip.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...m.lightBulb.classNamesArray),this._domNode.classList.add(...m.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=p("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...m.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...m.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=p("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=p("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};gC._posPref=[0];gC=Jie([ene(3,_i)],gC);Et((o,e)=>{var t;const i=(t=o.getColor(wi))===null||t===void 0?void 0:t.transparent(.7),n=o.getColor(nU);n&&e.addRule(` + *-----------------------------------------------------------------------------*/var gie=Object.defineProperty,fie=Object.getOwnPropertyDescriptor,pie=Object.getOwnPropertyNames,mie=Object.prototype.hasOwnProperty,dR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pie(e))!mie.call(o,n)&&n!==t&&gie(o,n,{get:()=>e[n],enumerable:!(i=fie(e,n))||i.enumerable});return o},_ie=(o,e,t)=>(dR(o,e,"default"),t&&dR(t,e,"default")),bie="4.5.5",Dg={};_ie(Dg,D_);var W3=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(W3||{}),V3=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(V3||{}),H3=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(H3||{}),z3=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(z3||{}),U3=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(U3||{}),$3=class{constructor(o,e,t,i){qt(this,"_onDidChange",new Dg.Emitter);qt(this,"_onDidExtraLibsChange",new Dg.Emitter);qt(this,"_extraLibs");qt(this,"_removedExtraLibs");qt(this,"_eagerModelSync");qt(this,"_compilerOptions");qt(this,"_diagnosticsOptions");qt(this,"_workerOptions");qt(this,"_onDidExtraLibsChangeTimeout");qt(this,"_inlayHintsOptions");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];!n||n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}},vie=bie,j3=new $3({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),K3=new $3({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),Cie=()=>Q1().then(o=>o.getTypeScriptWorker()),wie=()=>Q1().then(o=>o.getJavaScriptWorker());Dg.languages.typescript={ModuleKind:W3,JsxEmit:V3,NewLineKind:H3,ScriptTarget:z3,ModuleResolutionKind:U3,typescriptVersion:vie,typescriptDefaults:j3,javascriptDefaults:K3,getTypeScriptWorker:Cie,getJavaScriptWorker:wie};function Q1(){return ue(()=>import("./tsMode.2890ed03.js"),["assets/tsMode.2890ed03.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css"])}Dg.languages.onLanguage("typescript",()=>Q1().then(o=>o.setupTypeScript(j3)));Dg.languages.onLanguage("javascript",()=>Q1().then(o=>o.setupJavaScript(K3)));var Sie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yie=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},X1=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const J1=new le("selectionAnchorSet",!1);let sl=class q3{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=J1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(q3.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(oe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Fn().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Gi(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(oe.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};sl.ID="editor.contrib.selectionAnchorController";sl=Sie([yie(1,Ee)],sl);class Lie extends ce{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2080),weight:100}})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class Die extends ce{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:J1})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class kie extends ce{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:J1,kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2089),weight:100}})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class xie extends ce{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:J1,kbOpts:{kbExpr:N.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return X1(this,void 0,void 0,function*(){(i=sl.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}tt(sl.ID,sl);ie(Lie);ie(Die);ie(kie);ie(xie);const Iie=T("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Eie extends ce{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;(i=Yo.get(t))===null||i===void 0||i.jumpToBracket()}}class Nie extends ce{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=Yo.get(t))===null||n===void 0||n.selectToBracket(s)}}class Tie{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Yo extends H{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new mt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(66),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(66)&&(this._matchBrackets=this._editor.getOption(66),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(Yo.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new oe(r.lineNumber,r.column,r.lineNumber,r.column):new oe(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const c=t.bracketPairs.findNextBracket(s);c&&c.range&&(r=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(L.compareRangesUsingStarts);const[c,d]=r;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new oe(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h1&&s.sort(B.compare);const a=[];let l=0,c=0;const d=n.length;for(let h=0,u=s.length;h{const t=o.getColor(A$);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=o.getColor(z4);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)});qs.appendMenuItem(M.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Aie{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new L(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,s,i,s),a)}else{const r=new L(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new oe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new oe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class G3 extends ce{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new Aie(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class Mie extends G3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:p("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:N.writable})}}class Rie extends G3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:p("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:N.writable})}}ie(Mie);ie(Rie);class Oie extends ce{constructor(){super({id:"editor.action.transposeLetters",label:p("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,c=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;const d=l===c?r.getPosition():lt.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=lt.leftPosition(i,d),u=lt.leftPosition(i,h),g=i.getValueInRange(L.fromPositions(u,h)),f=i.getValueInRange(L.fromPositions(h,d)),_=L.fromPositions(u,d);n.push(new zi(_,f+g))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}ie(Oie);var Pie=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Zd="9_cutcopypaste",Fie=jo||document.queryCommandSupported("cut"),Z3=jo||document.queryCommandSupported("copy"),Bie=typeof navigator.clipboard>"u"||Ls?document.queryCommandSupported("paste"):!0;function FN(o){return o.register(),o}const Wie=Fie?FN(new Ug({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:jo?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:M.MenubarEditMenu,group:"2_ccp",title:p({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:M.EditorContext,group:Zd,title:p("actions.clipboard.cutLabel","Cut"),when:N.writable,order:1},{menuId:M.CommandPalette,group:"",title:p("actions.clipboard.cutLabel","Cut"),order:1},{menuId:M.SimpleEditorContext,group:Zd,title:p("actions.clipboard.cutLabel","Cut"),when:N.writable,order:1}]})):void 0,Vie=Z3?FN(new Ug({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:jo?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:M.MenubarEditMenu,group:"2_ccp",title:p({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:M.EditorContext,group:Zd,title:p("actions.clipboard.copyLabel","Copy"),order:2},{menuId:M.CommandPalette,group:"",title:p("actions.clipboard.copyLabel","Copy"),order:1},{menuId:M.SimpleEditorContext,group:Zd,title:p("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;qs.appendMenuItem(M.MenubarEditMenu,{submenu:M.MenubarCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});qs.appendMenuItem(M.EditorContext,{submenu:M.EditorContextCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:Zd,order:3});qs.appendMenuItem(M.EditorContext,{submenu:M.EditorContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1});const sy=Bie?FN(new Ug({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:jo?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:M.MenubarEditMenu,group:"2_ccp",title:p({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:M.EditorContext,group:Zd,title:p("actions.clipboard.pasteLabel","Paste"),when:N.writable,order:4},{menuId:M.CommandPalette,group:"",title:p("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:M.SimpleEditorContext,group:Zd,title:p("actions.clipboard.pasteLabel","Paste"),when:N.writable,order:4}]})):void 0;class Hie extends ce{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(33)&&t.getSelection().isEmpty()||(gD.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),gD.forceCopyWithSyntaxHighlighting=!1)}}function Y3(o,e){!o||(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(ct).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(33),r=n.getSelection();return r&&r.isEmpty()&&!s||document.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}Y3(Wie,"cut");Y3(Vie,"copy");sy&&(sy.addImplementation(1e4,"code-editor",(o,e)=>{const t=o.get(ct),i=o.get(cl),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&Sc?(()=>Pie(void 0,void 0,void 0,function*(){const r=yield i.readText();if(r!==""){const a=im.INSTANCE.get(r);let l=!1,c=null,d=null;a&&(l=n.getOption(33)&&!!a.isFromEmptySelection,c=typeof a.multicursorText<"u"?a.multicursorText:null,d=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),sy.addImplementation(0,"generic-dom",(o,e)=>(document.execCommand("paste"),!0)));Z3&&ie(Hie);class Ze{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Ze.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Ze(this.value+Ze.sep+e)}}Ze.sep=".";Ze.None=new Ze("@@none@@");Ze.Empty=new Ze("");Ze.QuickFix=new Ze("quickfix");Ze.Refactor=new Ze("refactor");Ze.Source=new Ze("source");Ze.SourceOrganizeImports=Ze.Source.append("organizeImports");Ze.SourceFixAll=Ze.Source.append("fixAll");var bn;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(bn||(bn={}));function zie(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>Q3(e,t,o.include))||!o.includeSourceActions&&Ze.Source.contains(e))}function Uie(o,e){const t=e.kind?new Ze(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>Q3(t,i,o.include))||!o.includeSourceActions&&t&&Ze.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function Q3(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class Nr{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new Nr(t.kind,t.apply,!1):new Nr(Nr.getKindFromUser(e,t.kind),Nr.getApplyFromUser(e,t.apply),Nr.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ze(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var BN=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const X3="editor.action.codeAction",J3="editor.action.refactor",$ie="editor.action.refactor.preview",e7="editor.action.sourceAction",WN="editor.action.organizeImports",VN="editor.action.fixAll";class t7{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return BN(this,void 0,void 0,function*(){if(((t=this.provider)===null||t===void 0?void 0:t.resolveCodeAction)&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Pi(n)}i&&(this.action.edit=i.edit)}return this})}}class HN extends H{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(HN.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:rn(e.diagnostics)?rn(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:rn(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ze.QuickFix.contains(new Ze(e.kind))&&!!e.isPreferred)}}const hR={actions:[],documentation:void 0};function zN(o,e,t,i,n,s){var r;const a=i.filter||{},l={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new TN(e,s),d=jie(o,e,a),h=new Q,u=d.map(f=>BN(this,void 0,void 0,function*(){try{n.report(f);const _=yield f.provideCodeActions(e,t,l,c.token);if(_&&h.add(_),c.token.isCancellationRequested)return hR;const b=((_==null?void 0:_.actions)||[]).filter(C=>C&&Uie(a,C)),v=Kie(f,b,a.include);return{actions:b.map(C=>new t7(C,f)),documentation:v}}catch(_){if(ea(_))throw _;return Pi(_),hR}})),g=o.onDidChange(()=>{const f=o.all(e);Ss(f,d)||c.cancel()});return Promise.all(u).then(f=>{const _=f.map(v=>v.actions).flat(),b=i_(f.map(v=>v.documentation));return new HN(_,b,h)}).finally(()=>{g.dispose(),c.dispose()})}function jie(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>zie(t,new Ze(n))):!0)}function Kie(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Ze(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(!!n.kind){for(const s of i)if(s.kind.contains(new Ze(n.kind)))return s.command}}Xe.registerCommand("_executeCodeActionProvider",function(o,e,t,i,n){return BN(this,void 0,void 0,function*(){if(!(e instanceof _e))throw Ko();const{codeActionProvider:s}=o.get(de),r=o.get(Ut).getModel(e);if(!r)throw Ko();const a=oe.isISelection(t)?oe.liftSelection(t):L.isIRange(t)?r.validateRange(t):void 0;if(!a)throw Ko();const l=typeof i=="string"?new Ze(i):void 0,c=yield zN(s,r,a,{type:1,triggerAction:bn.Default,filter:{includeSourceActions:!0,include:l}},Ch.None,ze.None),d=[],h=Math.min(c.validActions.length,typeof n=="number"?n:0);for(let u=0;uu.action)}finally{setTimeout(()=>c.dispose(),100)}})});var qie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gie=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let os=class Wk{constructor(e,t){this._messageWidget=new _n,this._messageListeners=new Q,this._editor=e,this._visible=Wk.MESSAGE_VISIBLE.bindTo(t)}static get(e){return e.getContribution(Wk.ID)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Gi(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new uR(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new xs(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{!n.target.position||(i?i.containsPosition(n.target.position)||this.closeMessage():i=new L(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(uR.fadeOut(this._messageWidget.value))}};os.ID="editor.contrib.messageController";os.MESSAGE_VISIBLE=new le("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));os=qie([Gie(1,Ee)],os);const Zie=xi.bindToContribution(os.get);ee(new Zie({id:"leaveEditorMessage",precondition:os.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class uR{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}}tt(os.ID,os);var i7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_a=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Yie=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Jg={Visible:new le("CodeActionMenuVisible",!1,p("CodeActionMenuVisible","Whether the code action list widget is visible"))};class oy extends is{constructor(e,t){super(e.command?e.command.id:e.title,Qie(e.title),void 0,!e.disabled,t),this.action=e}}function Qie(o){return o.replace(/\r\n|\r|\n/g," ")}const Xie="codeActionWidget",ry=26;let Vk=class{constructor(e,t){this.acceptKeybindings=e,this.keybindingService=t}get templateId(){return Xie}renderTemplate(e){const t=Object.create(null);return t.disposables=[],t.root=e,t.text=document.createElement("span"),e.append(t.text),t}renderElement(e,t,i){const n=i,s=e.title,r=e.isEnabled,a=e.isSeparator,l=e.isDocumentation;n.text.textContent=s,r?n.root.classList.remove("option-disabled"):(n.root.classList.add("option-disabled"),n.root.style.backgroundColor="transparent !important"),a&&(n.root.classList.add("separator"),n.root.style.height="10px"),l||(()=>{var d,h;const[u,g]=this.acceptKeybindings;n.root.title=p({key:"label",comment:['placeholders are keybindings, e.g "F2 to Refactor, Shift+F2 to Preview"']},"{0} to Refactor, {1} to Preview",(d=this.keybindingService.lookupKeybinding(u))===null||d===void 0?void 0:d.getLabel(),(h=this.keybindingService.lookupKeybinding(g))===null||h===void 0?void 0:h.getLabel())})()}disposeTemplate(e){e.disposables=nt(e.disposables)}};Vk=i7([_a(1,_i)],Vk);let uC=class Hk extends H{constructor(e,t,i,n,s,r,a,l,c,d){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=s,this._telemetryService=r,this._configurationService=l,this._contextViewService=c,this._contextKeyService=d,this._showingActions=this._register(new _n),this.codeActionList=this._register(new _n),this.options=[],this._visible=!1,this.viewItems=[],this.hasSeperator=!1,this._keybindingResolver=new ew({getKeybindings:()=>n.getKeybindings()}),this._ctxMenuWidgetVisible=Jg.Visible.bindTo(this._contextKeyService),this.listRenderer=new Vk(["onEnterSelectCodeAction","onEnterSelectCodeActionWithPreview"],n)}get isVisible(){return this._visible}isCodeActionWidgetEnabled(e){return this._configurationService.getValue("editor.experimental.useCustomCodeActionMenu",{resource:e.uri})}_onListSelection(e){e.elements.length&&e.elements.forEach(t=>{t.isEnabled&&(t.action.run(),this.hideCodeActionWidget())})}_onListHover(e){var t,i,n,s;e.element?!((i=e.element)===null||i===void 0)&&i.isEnabled?((n=this.codeActionList.value)===null||n===void 0||n.setFocus([e.element.index]),this.focusedEnabledItem=this.viewItems.indexOf(e.element),this.currSelectedItem=e.element.index):(this.currSelectedItem=void 0,(s=this.codeActionList.value)===null||s===void 0||s.setFocus([e.element.index])):(this.currSelectedItem=void 0,(t=this.codeActionList.value)===null||t===void 0||t.setFocus([]))}renderCodeActionMenuList(e,t){var i;const n=new Q,s=document.createElement("div"),r=document.createElement("div");this.block=e.appendChild(r),this.block.classList.add("context-view-block"),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",n.add(G(this.block,ae.MOUSE_DOWN,u=>u.stopPropagation())),s.id="codeActionMenuWidget",s.classList.add("codeActionMenuWidget"),e.appendChild(s),this.codeActionList.value=new rr("codeActionWidget",s,{getHeight(u){return u.isSeparator?10:ry},getTemplateId(u){return"codeActionWidget"}},[this.listRenderer],{keyboardSupport:!1}),n.add(this.codeActionList.value.onMouseOver(u=>this._onListHover(u))),n.add(this.codeActionList.value.onDidChangeFocus(u=>{var g;return(g=this.codeActionList.value)===null||g===void 0?void 0:g.domFocus()})),n.add(this.codeActionList.value.onDidChangeSelection(u=>this._onListSelection(u))),n.add(this._editor.onDidLayoutChange(u=>this.hideCodeActionWidget())),t.forEach((u,g)=>{const f=u.class==="separator";let _=!1;u instanceof oy&&(_=u.action.kind===Hk.documentationID),f&&(this.hasSeperator=!0);const b={title:u.label,detail:u.tooltip,action:t[g],isEnabled:u.enabled,isSeparator:f,index:g,isDocumentation:_};u.enabled&&this.viewItems.push(b),this.options.push(b)}),this.codeActionList.value.splice(0,this.codeActionList.value.length,this.options);const a=this.hasSeperator?(t.length-1)*ry+10:t.length*ry;s.style.height=String(a)+"px",this.codeActionList.value.layout(a);const l=[];this.options.forEach((u,g)=>{var f,_;if(!this.codeActionList.value)return;const b=(_=document.getElementById((f=this.codeActionList.value)===null||f===void 0?void 0:f.getElementID(g)))===null||_===void 0?void 0:_.getElementsByTagName("span")[0].offsetWidth;l.push(Number(b))});const c=Math.max(...l);s.style.width=c+52+"px",(i=this.codeActionList.value)===null||i===void 0||i.layout(a,c),this.viewItems.length<1||this.viewItems.every(u=>u.isDocumentation)?this.currSelectedItem=void 0:(this.focusedEnabledItem=0,this.currSelectedItem=this.viewItems[0].index,this.codeActionList.value.setFocus([this.currSelectedItem])),this.codeActionList.value.domFocus();const d=Od(e),h=d.onDidBlur(()=>{this.hideCodeActionWidget()});return n.add(h),n.add(d),this._ctxMenuWidgetVisible.set(!0),n}focusPrevious(){var e;if(typeof this.focusedEnabledItem>"u")this.focusedEnabledItem=this.viewItems[0].index;else if(this.viewItems.length<1)return!1;const t=this.focusedEnabledItem;let i;do this.focusedEnabledItem=this.focusedEnabledItem-1,this.focusedEnabledItem<0&&(this.focusedEnabledItem=this.viewItems.length-1),i=this.viewItems[this.focusedEnabledItem],(e=this.codeActionList.value)===null||e===void 0||e.setFocus([i.index]),this.currSelectedItem=i.index;while(this.focusedEnabledItem!==t&&(!i.isEnabled||i.action.id===ln.ID));return!0}focusNext(){var e;if(typeof this.focusedEnabledItem>"u")this.focusedEnabledItem=this.viewItems.length-1;else if(this.viewItems.length<1)return!1;const t=this.focusedEnabledItem;let i;do this.focusedEnabledItem=(this.focusedEnabledItem+1)%this.viewItems.length,i=this.viewItems[this.focusedEnabledItem],(e=this.codeActionList.value)===null||e===void 0||e.setFocus([i.index]),this.currSelectedItem=i.index;while(this.focusedEnabledItem!==t&&(!i.isEnabled||i.action.id===ln.ID));return!0}navigateListWithKeysUp(){this.focusPrevious()}navigateListWithKeysDown(){this.focusNext()}onEnterSet(){var e;typeof this.currSelectedItem=="number"&&((e=this.codeActionList.value)===null||e===void 0||e.setSelection([this.currSelectedItem]))}dispose(){super.dispose()}hideCodeActionWidget(){this._ctxMenuWidgetVisible.reset(),this.options=[],this.viewItems=[],this.focusedEnabledItem=0,this.currSelectedItem=void 0,this.hasSeperator=!1,this._contextViewService.hideContextView({source:this})}codeActionTelemetry(e,t,i){this._telemetryService.publicLog2("codeAction.applyCodeAction",{codeActionFrom:e,validCodeActions:i.validActions.length,cancelled:t})}show(e,t,i,n){return Yie(this,void 0,void 0,function*(){const s=this._editor.getModel();if(!s)return;const r=n.includeDisabledActions?t.allActions:t.validActions;if(!r.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,QO();this._visible=!0,this._showingActions.value=t;const a=this.getMenuActions(e,r,t.documentation),l=B.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},c=this._keybindingResolver.getResolver(),d=this._editor.getOption(117);this.isCodeActionWidgetEnabled(s)?this._contextViewService.showContextView({getAnchor:()=>l,render:h=>this.renderCodeActionMenuList(h,a),onHide:h=>{const u=n.fromLightbulb?bn.Lightbulb:e.triggerAction;this.codeActionTelemetry(u,h,t),this._visible=!1,this._editor.focus()}},this._editor.getDomNode(),!1):this._contextMenuService.showContextMenu({domForShadowRoot:d?this._editor.getDomNode():void 0,getAnchor:()=>l,getActions:()=>a,onHide:h=>{const u=n.fromLightbulb?bn.Lightbulb:e.triggerAction;this.codeActionTelemetry(u,h,t),this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:h=>h instanceof oy?c(h.action):void 0})})}getMenuActions(e,t,i){var n,s;const r=d=>new oy(d.action,()=>this._delegate.onSelectCodeAction(d,e)),a=t.map(r),l=[...i],c=this._editor.getModel();if(c&&a.length)for(const d of this._languageFeaturesService.codeActionProvider.all(c))d._getAdditionalMenuItems&&l.push(...d._getAdditionalMenuItems({trigger:e.type,only:(s=(n=e.filter)===null||n===void 0?void 0:n.include)===null||s===void 0?void 0:s.value},t.map(h=>h.action)));return l.length&&a.push(new ln,...l.map(d=>r(new t7({title:d.title,command:d,kind:Hk.documentationID},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=on(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}};uC.documentationID="_documentation";uC=i7([_a(2,ll),_a(3,_i),_a(4,de),_a(5,sr),_a(6,Ct),_a(7,ot),_a(8,vh),_a(9,Ee)],uC);class ew{constructor(e){this._keybindingProvider=e}getResolver(){const e=new Ju(()=>this._keybindingProvider.getKeybindings().filter(t=>ew.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===WN?i={kind:Ze.SourceOrganizeImports.value}:t.command===VN&&(i={kind:Ze.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Nr.fromUser(i,{kind:Ze.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ze(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}}ew.codeActionCommands=[J3,X3,e7,WN,VN];var Jie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ene=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ip;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})(Ip||(Ip={}));let gC=class n7 extends H{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new R),this.onClick=this._onClick.event,this._state=Ip.Hidden,this._domNode=document.createElement("div"),this._domNode.className=m.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),ft.ignoreTarget(this._domNode),this._register(zH(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:r,height:a}=on(this._domNode),l=this._editor.getOption(61);let c=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(s.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(59)&&!this._editor.getOption(59).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(59).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,c=n.get(46),d=s.getLineContent(r),h=S1(d,l),u=c.spaceWidth*h>22,g=_=>_>2&&this._editor.getTopForLineNumber(_)===this._editor.getTopForLineNumber(_-1);let f=r;if(!u){if(r>1&&!g(r-1))f-=1;else if(!g(r+1))f+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new Ip.Showing(e,t,i,{position:{lineNumber:f,column:1},preference:n7._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=Ip.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...m.lightBulb.classNamesArray),this._domNode.classList.add(...m.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=p("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...m.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...m.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=p("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=p("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};gC._posPref=[0];gC=Jie([ene(3,_i)],gC);Et((o,e)=>{var t;const i=(t=o.getColor(wi))===null||t===void 0?void 0:t.transparent(.7),n=o.getColor(nU);n&&e.addRule(` .monaco-editor .contentWidgets ${m.lightBulb.cssSelector} { color: ${n}; background-color: ${i}; @@ -636,11 +636,11 @@ ${e.toString()}`}}class xN{constructor(e=new k1,t=!1,i){this._activeInstantiatio .monaco-editor .contentWidgets ${m.lightbulbAutofix.cssSelector} { color: ${s}; background-color: ${i}; - }`)});var tne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ine=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},ay=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},nne=globalThis&&globalThis.__classPrivateFieldSet||function(o,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(o,t):n?n.value=t:e.set(o,t),t},sne=globalThis&&globalThis.__classPrivateFieldGet||function(o,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!i:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(o):i?i.value:e.get(o)},E0;let zk=class extends H{constructor(e,t,i,n,s){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new _n),this.previewOn=!1,E0.set(this,!1),this._codeActionWidget=new Ju(()=>this._register(s.createInstance(uC,this._editor,{onSelectCodeAction:(r,a)=>ay(this,void 0,void 0,function*(){this.previewOn?this.delegate.applyCodeAction(r,!0,Boolean(this.previewOn)):this.delegate.applyCodeAction(r,!0,Boolean(a.preview)),this.previewOn=!1})}))),this._lightBulbWidget=new Ju(()=>{const r=this._register(s.createInstance(gC,this._editor,t,i));return this._register(r.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1,fromLightbulb:!0}))),r})}dispose(){nne(this,E0,!0,"f"),super.dispose()}hideCodeActionWidget(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().hideCodeActionWidget()}onEnter(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().onEnterSet()}onPreviewEnter(){this.previewOn=!0,this.onEnter()}navigateList(e){this._codeActionWidget.hasValue()&&(e?this._codeActionWidget.getValue().navigateListWithKeysUp():this._codeActionWidget.getValue().navigateListWithKeysDown())}update(e){var t,i,n,s,r;return ay(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let a;try{a=yield e.actions}catch(l){Te(l);return}if(!sne(this,E0,"f"))if(this._lightBulbWidget.getValue().update(a,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const c=this.tryGetValidActionToApply(e.trigger,a);if(c){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(c,!1,!1)}finally{a.dispose()}return}if(e.trigger.context){const d=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,a);if(d&&d.action.disabled){(n=os.get(this._editor))===null||n===void 0||n.showMessage(d.action.disabled,e.trigger.context.position),a.dispose();return}}}const l=!!(!((s=e.trigger.filter)===null||s===void 0)&&s.include);if(e.trigger.context&&(!a.allActions.length||!l&&!a.validActions.length)){(r=os.get(this._editor))===null||r===void 0||r.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=a,a.dispose();return}this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(e.trigger,a,e.position,{includeDisabledActions:l,fromLightbulb:!1})}else this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,n){return ay(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,n)})}};E0=new WeakMap;zk=tne([ine(4,Ae)],zk);var ly=globalThis&&globalThis.__classPrivateFieldGet||function(o,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!i:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(o):i?i.value:e.get(o)},one=globalThis&&globalThis.__classPrivateFieldSet||function(o,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(o,t):n?n.value=t:e.set(o,t),t},nu;const s7=new le("supportedCodeAction","");class rne extends H{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new xs),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();!t||e.some(i=>_5(i,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:bn.Default})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:bn.Default})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(!!t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(L.intersectRanges(n,e))return L.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:n,column:s}=i.getPosition(),r=t.getLineContent(n);if(r.length===0)return;if(s===1){if(/\s/.test(r[0]))return}else if(s===t.getLineMaxColumn(n)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[s-2])&&/\s/.test(r[s-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i){this._signalChange(void 0);return}const n=this._getRangeOfMarker(t),s=n?n.getStartPosition():t.getStartPosition(),r={trigger:e,selection:t,position:s};return this._signalChange(r),r}}var id;(function(o){o.Empty={type:0};class e{constructor(i,n,s,r){this.trigger=i,this.rangeOrSelection=n,this.position=s,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(ea(a))return ane;throw a})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(id||(id={}));const ane={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class lne extends H{constructor(e,t,i,n,s){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._codeActionOracle=this._register(new _n),this._state=id.Empty,this._onDidChangeState=this._register(new R),this.onDidChangeState=this._onDidChangeState.event,nu.set(this,!1),this._supportedCodeActions=s7.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){ly(this,nu,"f")||(one(this,nu,!0,"f"),super.dispose(),this.setState(id.Empty,!0))}_update(){if(ly(this,nu,"f"))return;this._codeActionOracle.value=void 0,this.setState(id.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(83)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new rne(this._editor,this._markerService,i=>{var n;if(!i){this.setState(id.Empty);return}const s=Ri(r=>zN(this._registry,e,i.selection,i.trigger,Ch.None,r));i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(s,250)),this.setState(new id.Triggered(i.trigger,i.selection,i.position,s))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:bn.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!ly(this,nu,"f")&&this._onDidChangeState.fire(e))}}nu=new WeakMap;var cne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},o7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function x_(o){return se.regex(s7.keys()[0],new RegExp("(\\s|^)"+ys(o.value)+"\\b"))}function r7(o,e,t,i){const n=Nr.fromUser(e,{kind:Ze.Refactor,apply:"never"});return Lh(o,typeof(e==null?void 0:e.kind)=="string"?n.preferred?p("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",e.kind):p("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",e.kind):n.preferred?p("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):p("editor.action.refactor.noneMessage","No refactorings available"),{include:Ze.Refactor.contains(n.kind)?n.kind:Ze.None,onlyIncludePreferredActions:n.preferred},n.apply,t,i)}const tw={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:p("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:p("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[p("args.schema.apply.first","Always apply the first returned code action."),p("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),p("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:p("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let fc=class a7 extends H{constructor(e,t,i,n,s,r){super(),this._instantiationService=s,this._editor=e,this._model=this._register(new lne(this._editor,r.codeActionProvider,t,i,n)),this._register(this._model.onDidChangeState(a=>this.update(a))),this._ui=new Ju(()=>this._register(new zk(e,ef.Id,I_.Id,{applyCodeAction:(a,l,c)=>o7(this,void 0,void 0,function*(){try{yield this._applyCodeAction(a,c)}finally{l&&this._trigger({type:2,triggerAction:bn.QuickFix,filter:{}})}})},this._instantiationService)))}static get(e){return e.getContribution(a7.ID)}update(e){this._ui.getValue().update(e)}hideCodeActionMenu(){this._ui.hasValue()&&this._ui.getValue().hideCodeActionWidget()}navigateCodeActionList(e){this._ui.hasValue()&&this._ui.getValue().navigateList(e)}selectedOption(){this._ui.hasValue()&&this._ui.getValue().onEnter()}selectedOptionWithPreview(){this._ui.hasValue()&&this._ui.getValue().onPreviewEnter()}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n,s){var r;if(!this._editor.hasModel())return;(r=os.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:a},preview:s})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t){return this._instantiationService.invokeFunction(dne,e,Uk.FromCodeActions,{preview:t,editor:this._editor})}};fc.ID="editor.contrib.quickFixController";fc=cne([Tf(1,na),Tf(2,Ee),Tf(3,kc),Tf(4,Ae),Tf(5,de)],fc);var Uk;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions"})(Uk||(Uk={}));function dne(o,e,t,i){return o7(this,void 0,void 0,function*(){const n=o.get(v_),s=o.get(ci),r=o.get(sr),a=o.get(di);if(r.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(ze.None),e.action.edit&&(yield n.apply(Qg.convert(e.action.edit),{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:!0,showPreview:i==null?void 0:i.preview})),e.action.command)try{yield s.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(l){const c=hne(l);a.error(typeof c=="string"?c:p("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function hne(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}function Lh(o,e,t,i,n=!1,s=bn.Default){if(o.hasModel()){const r=fc.get(o);r==null||r.manualTriggerAtCurrentPosition(e,s,t,i,n)}}class ef extends ce{constructor(){super({id:ef.Id,label:p("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:se.and(N.writable,N.hasCodeActionsProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:2132,weight:100}})}run(e,t){return Lh(t,p("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,!1,bn.QuickFix)}}ef.Id="editor.action.quickFix";class une extends xi{constructor(){super({id:X3,precondition:se.and(N.writable,N.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:tw}]}})}runEditorCommand(e,t,i){const n=Nr.fromUser(i,{kind:Ze.Empty,apply:"ifSingle"});return Lh(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):p("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?p("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):p("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class gne extends ce{constructor(){super({id:J3,label:p("refactor.label","Refactor..."),alias:"Refactor...",precondition:se.and(N.writable,N.hasCodeActionsProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:se.and(N.writable,x_(Ze.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:tw}]}})}run(e,t,i){return r7(t,i,!1,bn.Refactor)}}class fne extends ce{constructor(){super({id:$ie,label:p("refactor.preview.label","Refactor with Preview..."),alias:"Refactor Preview...",precondition:se.and(N.writable,N.hasCodeActionsProvider),description:{description:"Refactor Preview...",args:[{name:"args",schema:tw}]}})}run(e,t,i){return r7(t,i,!0,bn.RefactorPreview)}}class pne extends ce{constructor(){super({id:e7,label:p("source.label","Source Action..."),alias:"Source Action...",precondition:se.and(N.writable,N.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:se.and(N.writable,x_(Ze.Source))},description:{description:"Source Action...",args:[{name:"args",schema:tw}]}})}run(e,t,i){const n=Nr.fromUser(i,{kind:Ze.Source,apply:"never"});return Lh(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):p("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?p("editor.action.source.noneMessage.preferred","No preferred source actions available"):p("editor.action.source.noneMessage","No source actions available"),{include:Ze.Source.contains(n.kind)?n.kind:Ze.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,void 0,bn.SourceAction)}}class mne extends ce{constructor(){super({id:WN,label:p("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:se.and(N.writable,x_(Ze.SourceOrganizeImports)),kbOpts:{kbExpr:N.editorTextFocus,primary:1581,weight:100}})}run(e,t){return Lh(t,p("editor.action.organize.noneMessage","No organize imports action available"),{include:Ze.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",void 0,bn.OrganizeImports)}}class _ne extends ce{constructor(){super({id:VN,label:p("fixAll.label","Fix All"),alias:"Fix All",precondition:se.and(N.writable,x_(Ze.SourceFixAll))})}run(e,t){return Lh(t,p("fixAll.noneMessage","No fix all action available"),{include:Ze.SourceFixAll,includeSourceActions:!0},"ifSingle",void 0,bn.FixAll)}}class I_ extends ce{constructor(){super({id:I_.Id,label:p("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:se.and(N.writable,x_(Ze.QuickFix)),kbOpts:{kbExpr:N.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return Lh(t,p("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ze.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",void 0,bn.AutoFix)}}I_.Id="editor.action.autoFix";const E_=xi.bindToContribution(fc.get),N_=100+90;ee(new E_({id:"hideCodeActionMenuWidget",precondition:Jg.Visible,handler(o){o.hideCodeActionMenu()},kbOpts:{weight:N_,primary:9,secondary:[1033]}}));ee(new E_({id:"focusPreviousCodeAction",precondition:Jg.Visible,handler(o){o.navigateCodeActionList(!0)},kbOpts:{weight:N_+1e5,primary:16,secondary:[2064]}}));ee(new E_({id:"focusNextCodeAction",precondition:Jg.Visible,handler(o){o.navigateCodeActionList(!1)},kbOpts:{weight:N_+1e5,primary:18,secondary:[2066]}}));ee(new E_({id:"onEnterSelectCodeAction",precondition:Jg.Visible,handler(o){o.selectedOption()},kbOpts:{weight:N_+1e5,primary:3,secondary:[1026]}}));ee(new E_({id:"onEnterSelectCodeActionWithPreview",precondition:Jg.Visible,handler(o){o.selectedOptionWithPreview()},kbOpts:{weight:N_+1e5,primary:2051}}));zt.as(rl.Configuration).registerConfiguration(Object.assign(Object.assign({},GE),{properties:{"editor.experimental.useCustomCodeActionMenu":{type:"boolean",tags:["experimental"],scope:5,description:p("codeActionWidget","Enabling this adjusts how the code action menu is rendered."),default:!1}}}));tt(fc.ID,fc);ie(ef);ie(gne);ie(fne);ie(pne);ie(mne);ie(I_);ie(_ne);ee(new une);var gR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class $k{constructor(){this.lenses=[],this._disposables=new Q}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function l7(o,e,t){return gR(this,void 0,void 0,function*(){const i=o.ordered(e),n=new Map,s=new $k,r=i.map((a,l)=>gR(this,void 0,void 0,function*(){n.set(a,l);try{const c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&s.add(c,a)}catch(c){Pi(c)}}));return yield Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:n.get(a.provider)n.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),s})}Xe.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;pt(_e.isUri(t)),pt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(de),s=o.get(Ut).getModel(t);if(!s)throw Ko();const r=[],a=new Q;return l7(n,s,ze.None).then(l=>{a.add(l);const c=[];for(const d of l.lenses)i==null||Boolean(d.symbol.command)?r.push(d.symbol):i-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(s,d.symbol,ze.None)).then(h=>r.push(h||d.symbol)));return Promise.all(c)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var bne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vne=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const c7=Ye("ICodeLensCache");class fR{constructor(e,t){this.lineCount=e,this.data=t}}let jk=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Dc(20,.75);const t="codelens/cache";Up(()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),Xa(e.onWillSaveState)(s=>{s.reason===lC.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new $k;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new fR(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const s of i.data.lenses)n.add(s.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new L(a,1,a,11)});const r=new $k;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new fR(n.lineCount,r))}}catch{}}};jk=bne([vne(0,Do)],jk);et(c7,jk);class Cne{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class iw{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iw._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{d.symbol.command&&c.push(d.symbol),n.addDecoration({range:d.symbol.range,options:Ne.EMPTY},u=>this._decorationIds[h]=u),l?l=L.plusRange(l,d.symbol.range):l=L.lift(d.symbol.range)}),this._viewZone=new Cne(l.startLineNumber-1,r,a),this._viewZoneId=s.addZone(this._viewZone),c.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iw(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(i&&L.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:Ne.EMPTY},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Af=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Sne=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let kg=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new Q,this._localToDispose=new Q,this._lenses=[],this._oldCodeLensModels=new Q,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new mt(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(46)||a.hasChanged(16)||a.hasChanged(15))&&this._updateLensStyle(),a.hasChanged(14)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+OI(this._editor.getId()).toString(16),this._styleElement=Qs(Gp(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(61)/this._editor.getOption(48));let t=this._editor.getOption(16);return(!t||t<5)&&(t=this._editor.getOption(48)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(46),s=`--codelens-font-family${this._styleClassName}`,r=`--codelens-font-features${this._styleClassName}`;let a=` + }`)});var tne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ine=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},ay=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},nne=globalThis&&globalThis.__classPrivateFieldSet||function(o,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(o,t):n?n.value=t:e.set(o,t),t},sne=globalThis&&globalThis.__classPrivateFieldGet||function(o,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!i:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(o):i?i.value:e.get(o)},E0;let zk=class extends H{constructor(e,t,i,n,s){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new _n),this.previewOn=!1,E0.set(this,!1),this._codeActionWidget=new Ju(()=>this._register(s.createInstance(uC,this._editor,{onSelectCodeAction:(r,a)=>ay(this,void 0,void 0,function*(){this.previewOn?this.delegate.applyCodeAction(r,!0,Boolean(this.previewOn)):this.delegate.applyCodeAction(r,!0,Boolean(a.preview)),this.previewOn=!1})}))),this._lightBulbWidget=new Ju(()=>{const r=this._register(s.createInstance(gC,this._editor,t,i));return this._register(r.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1,fromLightbulb:!0}))),r})}dispose(){nne(this,E0,!0,"f"),super.dispose()}hideCodeActionWidget(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().hideCodeActionWidget()}onEnter(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().onEnterSet()}onPreviewEnter(){this.previewOn=!0,this.onEnter()}navigateList(e){this._codeActionWidget.hasValue()&&(e?this._codeActionWidget.getValue().navigateListWithKeysUp():this._codeActionWidget.getValue().navigateListWithKeysDown())}update(e){var t,i,n,s,r;return ay(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let a;try{a=yield e.actions}catch(l){Te(l);return}if(!sne(this,E0,"f"))if(this._lightBulbWidget.getValue().update(a,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const c=this.tryGetValidActionToApply(e.trigger,a);if(c){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(c,!1,!1)}finally{a.dispose()}return}if(e.trigger.context){const d=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,a);if(d&&d.action.disabled){(n=os.get(this._editor))===null||n===void 0||n.showMessage(d.action.disabled,e.trigger.context.position),a.dispose();return}}}const l=!!(!((s=e.trigger.filter)===null||s===void 0)&&s.include);if(e.trigger.context&&(!a.allActions.length||!l&&!a.validActions.length)){(r=os.get(this._editor))===null||r===void 0||r.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=a,a.dispose();return}this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(e.trigger,a,e.position,{includeDisabledActions:l,fromLightbulb:!1})}else this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,n){return ay(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,n)})}};E0=new WeakMap;zk=tne([ine(4,Ae)],zk);var ly=globalThis&&globalThis.__classPrivateFieldGet||function(o,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!i:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(o):i?i.value:e.get(o)},one=globalThis&&globalThis.__classPrivateFieldSet||function(o,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(o,t):n?n.value=t:e.set(o,t),t},nu;const s7=new le("supportedCodeAction","");class rne extends H{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new xs),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();!t||e.some(i=>_F(i,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:bn.Default})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:bn.Default})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(!!t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(L.intersectRanges(n,e))return L.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:n,column:s}=i.getPosition(),r=t.getLineContent(n);if(r.length===0)return;if(s===1){if(/\s/.test(r[0]))return}else if(s===t.getLineMaxColumn(n)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[s-2])&&/\s/.test(r[s-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i){this._signalChange(void 0);return}const n=this._getRangeOfMarker(t),s=n?n.getStartPosition():t.getStartPosition(),r={trigger:e,selection:t,position:s};return this._signalChange(r),r}}var id;(function(o){o.Empty={type:0};class e{constructor(i,n,s,r){this.trigger=i,this.rangeOrSelection=n,this.position=s,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(ea(a))return ane;throw a})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(id||(id={}));const ane={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class lne extends H{constructor(e,t,i,n,s){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._codeActionOracle=this._register(new _n),this._state=id.Empty,this._onDidChangeState=this._register(new R),this.onDidChangeState=this._onDidChangeState.event,nu.set(this,!1),this._supportedCodeActions=s7.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){ly(this,nu,"f")||(one(this,nu,!0,"f"),super.dispose(),this.setState(id.Empty,!0))}_update(){if(ly(this,nu,"f"))return;this._codeActionOracle.value=void 0,this.setState(id.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(83)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new rne(this._editor,this._markerService,i=>{var n;if(!i){this.setState(id.Empty);return}const s=Ri(r=>zN(this._registry,e,i.selection,i.trigger,Ch.None,r));i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(s,250)),this.setState(new id.Triggered(i.trigger,i.selection,i.position,s))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:bn.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!ly(this,nu,"f")&&this._onDidChangeState.fire(e))}}nu=new WeakMap;var cne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},o7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function x_(o){return se.regex(s7.keys()[0],new RegExp("(\\s|^)"+ys(o.value)+"\\b"))}function r7(o,e,t,i){const n=Nr.fromUser(e,{kind:Ze.Refactor,apply:"never"});return Lh(o,typeof(e==null?void 0:e.kind)=="string"?n.preferred?p("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",e.kind):p("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",e.kind):n.preferred?p("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):p("editor.action.refactor.noneMessage","No refactorings available"),{include:Ze.Refactor.contains(n.kind)?n.kind:Ze.None,onlyIncludePreferredActions:n.preferred},n.apply,t,i)}const tw={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:p("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:p("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[p("args.schema.apply.first","Always apply the first returned code action."),p("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),p("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:p("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let fc=class a7 extends H{constructor(e,t,i,n,s,r){super(),this._instantiationService=s,this._editor=e,this._model=this._register(new lne(this._editor,r.codeActionProvider,t,i,n)),this._register(this._model.onDidChangeState(a=>this.update(a))),this._ui=new Ju(()=>this._register(new zk(e,ef.Id,I_.Id,{applyCodeAction:(a,l,c)=>o7(this,void 0,void 0,function*(){try{yield this._applyCodeAction(a,c)}finally{l&&this._trigger({type:2,triggerAction:bn.QuickFix,filter:{}})}})},this._instantiationService)))}static get(e){return e.getContribution(a7.ID)}update(e){this._ui.getValue().update(e)}hideCodeActionMenu(){this._ui.hasValue()&&this._ui.getValue().hideCodeActionWidget()}navigateCodeActionList(e){this._ui.hasValue()&&this._ui.getValue().navigateList(e)}selectedOption(){this._ui.hasValue()&&this._ui.getValue().onEnter()}selectedOptionWithPreview(){this._ui.hasValue()&&this._ui.getValue().onPreviewEnter()}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n,s){var r;if(!this._editor.hasModel())return;(r=os.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:a},preview:s})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t){return this._instantiationService.invokeFunction(dne,e,Uk.FromCodeActions,{preview:t,editor:this._editor})}};fc.ID="editor.contrib.quickFixController";fc=cne([Tf(1,na),Tf(2,Ee),Tf(3,kc),Tf(4,Ae),Tf(5,de)],fc);var Uk;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions"})(Uk||(Uk={}));function dne(o,e,t,i){return o7(this,void 0,void 0,function*(){const n=o.get(v_),s=o.get(ci),r=o.get(sr),a=o.get(di);if(r.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(ze.None),e.action.edit&&(yield n.apply(Qg.convert(e.action.edit),{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:!0,showPreview:i==null?void 0:i.preview})),e.action.command)try{yield s.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(l){const c=hne(l);a.error(typeof c=="string"?c:p("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function hne(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}function Lh(o,e,t,i,n=!1,s=bn.Default){if(o.hasModel()){const r=fc.get(o);r==null||r.manualTriggerAtCurrentPosition(e,s,t,i,n)}}class ef extends ce{constructor(){super({id:ef.Id,label:p("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:se.and(N.writable,N.hasCodeActionsProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:2132,weight:100}})}run(e,t){return Lh(t,p("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,!1,bn.QuickFix)}}ef.Id="editor.action.quickFix";class une extends xi{constructor(){super({id:X3,precondition:se.and(N.writable,N.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:tw}]}})}runEditorCommand(e,t,i){const n=Nr.fromUser(i,{kind:Ze.Empty,apply:"ifSingle"});return Lh(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):p("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?p("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):p("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class gne extends ce{constructor(){super({id:J3,label:p("refactor.label","Refactor..."),alias:"Refactor...",precondition:se.and(N.writable,N.hasCodeActionsProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:se.and(N.writable,x_(Ze.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:tw}]}})}run(e,t,i){return r7(t,i,!1,bn.Refactor)}}class fne extends ce{constructor(){super({id:$ie,label:p("refactor.preview.label","Refactor with Preview..."),alias:"Refactor Preview...",precondition:se.and(N.writable,N.hasCodeActionsProvider),description:{description:"Refactor Preview...",args:[{name:"args",schema:tw}]}})}run(e,t,i){return r7(t,i,!0,bn.RefactorPreview)}}class pne extends ce{constructor(){super({id:e7,label:p("source.label","Source Action..."),alias:"Source Action...",precondition:se.and(N.writable,N.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:se.and(N.writable,x_(Ze.Source))},description:{description:"Source Action...",args:[{name:"args",schema:tw}]}})}run(e,t,i){const n=Nr.fromUser(i,{kind:Ze.Source,apply:"never"});return Lh(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):p("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?p("editor.action.source.noneMessage.preferred","No preferred source actions available"):p("editor.action.source.noneMessage","No source actions available"),{include:Ze.Source.contains(n.kind)?n.kind:Ze.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,void 0,bn.SourceAction)}}class mne extends ce{constructor(){super({id:WN,label:p("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:se.and(N.writable,x_(Ze.SourceOrganizeImports)),kbOpts:{kbExpr:N.editorTextFocus,primary:1581,weight:100}})}run(e,t){return Lh(t,p("editor.action.organize.noneMessage","No organize imports action available"),{include:Ze.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",void 0,bn.OrganizeImports)}}class _ne extends ce{constructor(){super({id:VN,label:p("fixAll.label","Fix All"),alias:"Fix All",precondition:se.and(N.writable,x_(Ze.SourceFixAll))})}run(e,t){return Lh(t,p("fixAll.noneMessage","No fix all action available"),{include:Ze.SourceFixAll,includeSourceActions:!0},"ifSingle",void 0,bn.FixAll)}}class I_ extends ce{constructor(){super({id:I_.Id,label:p("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:se.and(N.writable,x_(Ze.QuickFix)),kbOpts:{kbExpr:N.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return Lh(t,p("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ze.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",void 0,bn.AutoFix)}}I_.Id="editor.action.autoFix";const E_=xi.bindToContribution(fc.get),N_=100+90;ee(new E_({id:"hideCodeActionMenuWidget",precondition:Jg.Visible,handler(o){o.hideCodeActionMenu()},kbOpts:{weight:N_,primary:9,secondary:[1033]}}));ee(new E_({id:"focusPreviousCodeAction",precondition:Jg.Visible,handler(o){o.navigateCodeActionList(!0)},kbOpts:{weight:N_+1e5,primary:16,secondary:[2064]}}));ee(new E_({id:"focusNextCodeAction",precondition:Jg.Visible,handler(o){o.navigateCodeActionList(!1)},kbOpts:{weight:N_+1e5,primary:18,secondary:[2066]}}));ee(new E_({id:"onEnterSelectCodeAction",precondition:Jg.Visible,handler(o){o.selectedOption()},kbOpts:{weight:N_+1e5,primary:3,secondary:[1026]}}));ee(new E_({id:"onEnterSelectCodeActionWithPreview",precondition:Jg.Visible,handler(o){o.selectedOptionWithPreview()},kbOpts:{weight:N_+1e5,primary:2051}}));zt.as(rl.Configuration).registerConfiguration(Object.assign(Object.assign({},GE),{properties:{"editor.experimental.useCustomCodeActionMenu":{type:"boolean",tags:["experimental"],scope:5,description:p("codeActionWidget","Enabling this adjusts how the code action menu is rendered."),default:!1}}}));tt(fc.ID,fc);ie(ef);ie(gne);ie(fne);ie(pne);ie(mne);ie(I_);ie(_ne);ee(new une);var gR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class $k{constructor(){this.lenses=[],this._disposables=new Q}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function l7(o,e,t){return gR(this,void 0,void 0,function*(){const i=o.ordered(e),n=new Map,s=new $k,r=i.map((a,l)=>gR(this,void 0,void 0,function*(){n.set(a,l);try{const c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&s.add(c,a)}catch(c){Pi(c)}}));return yield Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:n.get(a.provider)n.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),s})}Xe.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;pt(_e.isUri(t)),pt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(de),s=o.get(Ut).getModel(t);if(!s)throw Ko();const r=[],a=new Q;return l7(n,s,ze.None).then(l=>{a.add(l);const c=[];for(const d of l.lenses)i==null||Boolean(d.symbol.command)?r.push(d.symbol):i-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(s,d.symbol,ze.None)).then(h=>r.push(h||d.symbol)));return Promise.all(c)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var bne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vne=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const c7=Ye("ICodeLensCache");class fR{constructor(e,t){this.lineCount=e,this.data=t}}let jk=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Dc(20,.75);const t="codelens/cache";Up(()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),Xa(e.onWillSaveState)(s=>{s.reason===lC.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new $k;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new fR(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const s of i.data.lenses)n.add(s.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new L(a,1,a,11)});const r=new $k;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new fR(n.lineCount,r))}}catch{}}};jk=bne([vne(0,Do)],jk);et(c7,jk);class Cne{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class iw{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iw._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{d.symbol.command&&c.push(d.symbol),n.addDecoration({range:d.symbol.range,options:Ne.EMPTY},u=>this._decorationIds[h]=u),l?l=L.plusRange(l,d.symbol.range):l=L.lift(d.symbol.range)}),this._viewZone=new Cne(l.startLineNumber-1,r,a),this._viewZoneId=s.addZone(this._viewZone),c.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iw(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(i&&L.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:Ne.EMPTY},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Af=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Sne=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let kg=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new Q,this._localToDispose=new Q,this._lenses=[],this._oldCodeLensModels=new Q,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new mt(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(46)||a.hasChanged(16)||a.hasChanged(15))&&this._updateLensStyle(),a.hasChanged(14)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+OI(this._editor.getId()).toString(16),this._styleElement=Qs(Gp(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(61)/this._editor.getOption(48));let t=this._editor.getOption(16);return(!t||t<5)&&(t=this._editor.getOption(48)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(46),s=`--codelens-font-family${this._styleClassName}`,r=`--codelens-font-features${this._styleClassName}`;let a=` .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${r}) } .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; } `;i&&(a+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${s}), ${ts.fontFamily}}`),this._styleElement.textContent=a,this._editor.getContainerDomNode().style.setProperty(s,i!=null?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(r,n.fontFeatureSettings),this._editor.changeViewZones(l=>{for(const c of this._lenses)c.updateHeight(e,l)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Ad(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new mt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Ri(r=>l7(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},Te)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Be(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(n=>{this._editor.changeViewZones(s=>{const r=[];let a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?r.push(c):(c.update(s),a=c.getLineNumber())});const l=new cy;r.forEach(c=>{c.dispose(l,s),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(n)})}),i.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Be(()=>{if(this._editor.getModel()){const n=hc.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new cy;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}const s=hc.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new cy;let d=0,h=0;for(;hthis._resolveCodeLensesInViewportSoon())),d++,h++)}for(;dthis._resolveCodeLensesInViewportSoon())),h++;c.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=Ri(a=>{const l=i.map((c,d)=>{const h=new Array(c.length),u=c.map((g,f)=>!g.symbol.command&&typeof g.provider.resolveCodeLens=="function"?Promise.resolve(g.provider.resolveCodeLens(t,g.symbol,a)).then(_=>{h[f]=_},Pi):(h[f]=g.symbol,Promise.resolve(void 0)));return Promise.all(u).then(()=>{!a.isCancellationRequested&&!n[d].isDisposed()&&n[d].updateCommands(h)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{Te(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};kg.ID="css.editor.codeLens";kg=wne([Af(1,de),Af(2,no),Af(3,ci),Af(4,di),Af(5,c7)],kg);tt(kg.ID,kg);ie(class extends ce{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:N.hasCodeLensProvider,label:p("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return Sne(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(dl),n=e.get(ci),s=e.get(di),r=t.getSelection().positionLineNumber,a=t.getContribution(kg.ID);if(!a)return;const l=a.getModel();if(!l)return;const c=[];for(const h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===r&&c.push({label:h.symbol.command.title,command:h.symbol.command});if(c.length===0)return;const d=yield i.pick(c,{canPickMany:!1});if(!!d){if(l.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(d.command.id,...d.command.arguments||[])}catch(h){s.error(h)}}})}});function yne(o,e,t){const i=[],s=o.ordered(e).reverse().map(r=>Promise.resolve(r.provideDocumentColors(e,t)).then(a=>{if(Array.isArray(a))for(const l of a)i.push({colorInfo:l,provider:r})}));return Promise.all(s).then(()=>i)}function mR(o,e,t,i){return Promise.resolve(t.provideColorPresentations(o,e,i))}Xe.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof _e))throw Ko();const{colorProvider:i}=o.get(de),n=o.get(Ut).getModel(t);if(!n)throw Ko();const s=[],a=i.ordered(n).reverse().map(l=>Promise.resolve(l.provideDocumentColors(n,ze.None)).then(c=>{if(Array.isArray(c))for(const d of c)s.push({range:d.range,color:[d.color.red,d.color.green,d.color.blue,d.color.alpha]})}));return Promise.all(a).then(()=>s)});Xe.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof _e)||!Array.isArray(t)||t.length!==4||!L.isIRange(s))throw Ko();const[r,a,l,c]=t,{colorProvider:d}=o.get(de),h=o.get(Ut).getModel(n);if(!h)throw Ko();const u={range:s,color:{red:r,green:a,blue:l,alpha:c}},g=[],_=d.ordered(h).reverse().map(b=>Promise.resolve(b.provideColorPresentations(h,u,ze.None)).then(v=>{Array.isArray(v)&&g.push(...v)}));return Promise.all(_).then(()=>g)});var Lne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Dne=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const d7=Object.create({}),kne=500;let Yd=class h7 extends H{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new Q),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new d_(this._editor),this._colorDecorationClassRefs=this._register(new Q),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:h7.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(i.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(()=>{const s=this._isEnabled;this._isEnabled=this.isEnabled(),s!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new xs,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){this._computePromise=Ri(e=>Dne(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const i=new $n(!1),n=yield yne(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,i.elapsed()),n})),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Te)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Ne.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[];for(let i=0;ithis._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Yd.ID="editor.contrib.colorDetector";Yd.RECOMPUTE_TIME=1e3;Yd=Lne([dy(1,ot),dy(2,de),dy(3,no)],Yd);tt(Yd.ID,Yd);class xne{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new R,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new R,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new R,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let i=0;i{this.backgroundColor=r.getColor(Bd)||W.white})),this._register(G(this.pickedColorNode,ae.CLICK,()=>this.model.selectNextColorPresentation())),this._register(G(s,ae.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=W.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=W.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(Uo(".codicon.codicon-color-mode"))}}class Ene extends H{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=Uo(".colorpicker-body"),q(e,this.domNode),this.saturationBox=new Nne(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new Tne(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Ane(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new W(new Rr(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new W(new Rr(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new W(new Rr(i===360?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class Nne extends H{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new R,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Uo(".saturation-wrap"),q(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",q(this.domNode,this.canvas),this.selection=Uo(".saturation-selection"),q(this.domNode,this.selection),this.layout(),this._register(G(this.domNode,ae.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new jg);const t=on(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=G(document,ae.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new W(new Rr(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this.canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=W.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class u7 extends H{constructor(e,t){super(),this.model=t,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new R,this.onColorFlushed=this._onColorFlushed.event,this.domNode=q(e,Uo(".strip")),this.overlay=q(this.domNode,Uo(".overlay")),this.slider=q(this.domNode,Uo(".slider")),this.slider.style.top="0px",this._register(G(this.domNode,ae.POINTER_DOWN,i=>this.onPointerDown(i))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new jg),i=on(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=G(document,ae.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class Tne extends u7{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,s=new W(new qe(t,i,n,1)),r=new W(new qe(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class Ane extends u7{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Mne extends yo{constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register(tg.onDidChange(()=>this.layout()));const s=Uo(".colorpicker-widget");e.appendChild(s);const r=new Ine(s,this.model,n);this.body=new Ene(s,this.model,this.pixelRatio),this._register(r),this._register(this.body)}layout(){this.body.layout()}}var Rne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},One=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},_R=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Pne{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Kk=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,i){return ri.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return _R(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const n=Yd.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[yield this._createColorHover(this._editor.getModel(),r.colorInfo,r.provider)]}return[]})}_createColorHover(e,t,i){return _R(this,void 0,void 0,function*(){const n=e.getValueInRange(t.range),{red:s,green:r,blue:a,alpha:l}=t.color,c=new qe(Math.round(s*255),Math.round(r*255),Math.round(a*255),l),d=new W(c),h=yield mR(e,t,i,ze.None),u=new xne(d,[],0);return u.colorPresentations=h||[],u.guessColorPresentation(d,n),new Pne(this,L.lift(t.range),u,i)})}renderHoverParts(e,t){if(t.length===0||!this._editor.hasModel())return H.None;const i=new Q,n=t[0],s=this._editor.getModel(),r=n.model,a=i.add(new Mne(e.fragment,r,this._editor.getOption(131),this._themeService));e.setColorPicker(a);let l=new L(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn);const c=()=>{let h,u;if(r.presentation.textEdit){h=[r.presentation.textEdit],u=new L(r.presentation.textEdit.range.startLineNumber,r.presentation.textEdit.range.startColumn,r.presentation.textEdit.range.endLineNumber,r.presentation.textEdit.range.endColumn);const g=this._editor.getModel()._setTrackedRange(null,u,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",h),u=this._editor.getModel()._getTrackedRange(g)||u}else h=[{range:l,text:r.presentation.label,forceMoveMarkers:!1}],u=l.setEndPosition(l.endLineNumber,l.startColumn+r.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",h);r.presentation.additionalTextEdits&&(h=[...r.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",h),e.hide()),this._editor.pushUndoStop(),l=u},d=h=>mR(s,{range:l,color:{red:h.rgba.r/255,green:h.rgba.g/255,blue:h.rgba.b/255,alpha:h.rgba.a}},n.provider,ze.None).then(u=>{r.colorPresentations=u||[]});return i.add(r.onColorFlushed(h=>{d(h).then(c)})),i.add(r.onDidChangeColor(d)),i}};Kk=Rne([One(1,Ct)],Kk);function qk(o,e){return!!o[e]}class hy{constructor(e,t){this.target=e.target,this.hasTriggerModifier=qk(e.event,t.triggerModifier),this.hasSideBySideModifier=qk(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class bR{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=qk(e,t.triggerModifier)}}class Vb{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function vR(o){return o==="altKey"?Ge?new Vb(57,"metaKey",6,"altKey"):new Vb(5,"ctrlKey",6,"altKey"):Ge?new Vb(6,"altKey",57,"metaKey"):new Vb(6,"altKey",5,"ctrlKey")}class UN extends H{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new R),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new R),this.onExecute=this._onExecute.event,this._onCancel=this._register(new R),this.onCancel=this._onCancel.event,this._editor=e,this._opts=vR(this._editor.getOption(72)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(t=>{if(t.hasChanged(72)){const i=vR(this._editor.getOption(72));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(t=>this._onEditorMouseMove(new hy(t,this._opts)))),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(new hy(t,this._opts)))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(new hy(t,this._opts)))),this._register(this._editor.onKeyDown(t=>this._onEditorKeyDown(new bR(t,this._opts)))),this._register(this._editor.onKeyUp(t=>this._onEditorKeyUp(new bR(t,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(t=>this._onDidChangeCursorSelection(t))),this._register(this._editor.onDidChangeModel(t=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(t=>{(t.scrollTopChanged||t.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var Fne=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fa=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Qd=class extends pg{constructor(e,t,i,n,s,r,a,l,c,d,h,u){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,s,r,a,l,c,d,h,u),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(g=>this._onParentConfigurationChanged(g)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Jr(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Qd=Fne([fa(3,Ae),fa(4,ct),fa(5,ci),fa(6,Ee),fa(7,Ct),fa(8,di),fa(9,al),fa(10,si),fa(11,de)],Qd);const CR=new W(new qe(0,122,204)),Bne={showArrow:!0,showFrame:!0,className:"",frameColor:CR,arrowColor:CR,keepEditorSelection:!1},Wne="vs.editor.contrib.zoneWidget";class Vne{constructor(e,t,i,n,s,r){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Hne{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class nw{constructor(e){this._editor=e,this._ruleName=nw._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),D2(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){D2(this._ruleName),nD(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:L.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}nw._IdGenerator=new nN(".arrow-decoration-");class zne{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new Q,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=La(t),Jr(this.options,Bne,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new nw(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(!!e)return e.getStartPosition()}show(e,t){const i=L.isIRange(e)?L.lift(e):L.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:Ne.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){const e=this.editor.getOption(61);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const a=this.editor.getOption(61),l=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,l);let c=0,d=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(a/3),this._arrow.height=c,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(g=>{this._viewZone&&g.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Vne(r,i.lineNumber,i.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f)),this._viewZone.id=g.addZone(this._viewZone),this._overlayWidget=new Hne(Wne+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const g=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=g+"px",this.container.style.borderBottomWidth=g+"px"}const h=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,s),this.options.keepEditorSelection||this.editor.setSelection(e);const u=this.editor.getModel();if(u){const g=e.endLineNumber+1;g<=u.getLineCount()?this.revealLine(g,!1):this.revealLine(u.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){!this.container||(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new tn(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(61),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}class Une extends og{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new R),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=q(e,J(".monaco-dropdown")),this._label=q(this._element,J(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(const s of[ae.CLICK,ae.MOUSE_DOWN,xt.Tap])this._register(G(this.element,s,r=>ut.stop(r,!0)));for(const s of[ae.MOUSE_DOWN,xt.Tap])this._register(G(this._label,s,r=>{r instanceof MouseEvent&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register(G(this._label,ae.KEY_UP,s=>{const r=new Rt(s);(r.equals(3)||r.equals(10))&&(ut.stop(s,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(ft.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class $ne extends Une{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class g7 extends Dr{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new R),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>{this.element=q(s,J("a.action-label"));let r=[];return typeof this.options.classNames=="string"?r=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(r=this.options.classNames),r.find(a=>a==="icon")||r.push("codicon"),this.element.classList.add(...r),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new $ne(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var r;(r=this.element)===null||r===void 0||r.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return s.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.getAction().tooltip?e=this.getAction().tooltip:this.getAction().label&&(e=this.getAction().label),e!=null?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",i),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",i)}}var $N=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rs=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},f7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function jne(o,e,t,i,n,s,r){const a=o.getActions(e);return qne(a,t,!1,typeof i=="string"?c=>c===i:i,n,s,r),Kne(a)}function Kne(o){const e=new Q;for(const[,t]of o)for(const i of t)e.add(i);return e}function qne(o,e,t,i=a=>a==="navigation",n=Number.MAX_SAFE_INTEGER,s=()=>!1,r=!1){let a,l;Array.isArray(e)?(a=e,l=e):(a=e.primary,l=e.secondary);const c=new Set;for(const[d,h]of o){let u;i(d)?(u=a,u.length>0&&r&&u.push(new ln)):(u=l,u.length>0&&u.push(new ln));for(let g of h){t&&(g=g instanceof ac&&g.alt?g.alt:g);const f=u.push(g);g instanceof Qp&&c.add({group:d,action:g,index:f-1})}}for(const{group:d,action:h,index:u}of c){const g=i(d)?a:l,f=h.actions;(f.length<=1||g.length+f.length-2<=n)&&s(h,d,g.length)&&g.splice(u,1,...f)}if(a!==l&&a.length>n){const d=a.splice(n,a.length-n);l.unshift(...d,new ln)}}let xg=class extends fm{constructor(e,t,i,n,s,r,a){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable,keybinding:t==null?void 0:t.keybinding,hoverDelegate:t==null?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new _n),this._altKey=Ol.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return f7(this,void 0,void 0,function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}})}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(Yi||dn)&&this._altKey.keyStatus.shiftKey;const n=()=>{var s;const r=t&&i&&!!(!((s=this._commandAction.alt)===null||s===void 0)&&s.enabled);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(s=>{i=s.altKey||(Yi||dn)&&s.shiftKey,n()})),this._register(G(e,"mouseleave",s=>{t=!1,n()})),this._register(G(e,"mouseenter",s=>{t=!0,n()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=i?p("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&((e=this._menuItemAction.alt)===null||e===void 0?void 0:e.enabled)){const r=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),c=l?p("titleAndKb","{0} ({1})",r,l):r;s=p("titleAndKbAndAlt",`{0} -[{1}] {2}`,s,ZE.modifierLabels[Os].altKey,c)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&((t=e.toggled)===null||t===void 0?void 0:t.icon)?e.toggled.icon:e.icon;if(!!s)if(at.isThemeIcon(s)){const r=at.asClassNameArray(s);n.classList.add(...r),this._itemClassDispose.value=Be(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=Xp(this._themeService.getColorTheme().type)?Pd(s.dark):Pd(s.light),n.classList.add("icon"),this._itemClassDispose.value=qo(Be(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};xg=$N([Rs(2,_i),Rs(3,di),Rs(4,Ee),Rs(5,Ct),Rs(6,ll)],xg);let Gk=class extends g7{constructor(e,t,i,n){var s,r;const a=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(s=t==null?void 0:t.menuAsChild)!==null&&s!==void 0?s:!1,classNames:(r=t==null?void 0:t.classNames)!==null&&r!==void 0?r:at.isThemeIcon(e.item.icon)?at.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,a),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),pt(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!at.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=Xp(this._themeService.getColorTheme().type)?Pd(i.dark):Pd(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};Gk=$N([Rs(2,ll),Rs(3,Ct)],Gk);let Zk=class extends Dr{constructor(e,t,i,n,s,r,a,l){var c,d,h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let u;const g=l.get(this._storageKey,1);g&&(u=e.actions.find(_=>g===_.id)),u||(u=e.actions[0]),this._defaultAction=this._instaService.createInstance(xg,u,{keybinding:this._getDefaultActionKeybindingLabel(u)});const f=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t==null?void 0:t.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(h=t==null?void 0:t.actionRunner)!==null&&h!==void 0?h:new og});this._dropdown=new g7(e,e.actions,this._contextMenuService,f),this._dropdown.actionRunner.onDidRun(_=>{_.action instanceof ac&&this.update(_.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(xg,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends og{runAction(t,i){return f7(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(QH(this._container,J(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const n=this._keybindingService.lookupKeybinding(e.id);n&&(i=`(${n.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=J(".action-container");this._defaultAction.render(q(this._container,t)),this._register(G(t,ae.KEY_DOWN,n=>{const s=new Rt(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=J(".dropdown-action-container");this._dropdown.render(q(this._container,i)),this._register(G(i,ae.KEY_DOWN,n=>{var s;const r=new Rt(n);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};Zk=$N([Rs(2,_i),Rs(3,di),Rs(4,ll),Rs(5,ph),Rs(6,Ae),Rs(7,Do)],Zk);function Gne(o,e,t){return e instanceof ac?o.createInstance(xg,e,t):e instanceof GI?e.item.rememberDefaultAction?o.createInstance(Zk,e,t):o.createInstance(Gk,e,t):void 0}var p7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m7=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const _7=Ye("IPeekViewService");et(_7,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}});var jn;(function(o){o.inPeekEditor=new le("inReferenceSearchEditor",!0,p("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(jn||(jn={}));let Am=class{constructor(e,t){e instanceof Qd&&jn.inPeekEditor.bindTo(t)}dispose(){}};Am.ID="editor.contrib.referenceController";Am=p7([m7(1,Ee)],Am);tt(Am.ID,Am);function Zne(o){const e=o.get(ct).getFocusedCodeEditor();return e instanceof Qd?e.getParentEditor():e}const Yne={headerBackgroundColor:W.white,primaryHeadingColor:W.fromHex("#333333"),secondaryHeadingColor:W.fromHex("#6c6c6cb3")};let fC=class extends zne{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new R,this.onDidClose=this._onDidClose.event,Jr(this.options,Yne,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=J(".head"),this._bodyElement=J(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=J(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),ki(i,"click",r=>this._onTitleClick(r))),q(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=J("span.filename"),this._secondaryHeading=J("span.dirname"),this._metaHeading=J("span.meta"),q(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=J(".peekview-actions");q(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new Zr(n,s),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new is("peekview.close",p("label.close","Close"),m.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Gne.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Si(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,bs(this._metaHeading)):Pn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(61)*1.2),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};fC=p7([m7(2,Ae)],fC);const Qne=T("peekViewTitle.background",{dark:fe(zn,.1),light:fe(zn,.1),hcDark:null,hcLight:null},p("peekViewTitleBackground","Background color of the peek view title area.")),b7=T("peekViewTitleLabel.foreground",{dark:W.white,light:W.black,hcDark:W.white,hcLight:Cs},p("peekViewTitleForeground","Color of the peek view title.")),v7=T("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},p("peekViewTitleInfoForeground","Color of the peek view title info.")),Xne=T("peekView.border",{dark:zn,light:zn,hcDark:We,hcLight:We},p("peekViewBorder","Color of the peek view borders and arrow.")),Jne=T("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:W.black,hcLight:W.white},p("peekViewResultsBackground","Background color of the peek view result list."));T("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:W.white,hcLight:Cs},p("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));T("peekViewResult.fileForeground",{dark:W.white,light:"#1E1E1E",hcDark:W.white,hcLight:Cs},p("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));T("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},p("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));T("peekViewResult.selectionForeground",{dark:W.white,light:"#6C6C6C",hcDark:W.white,hcLight:Cs},p("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Hb=T("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:W.black,hcLight:W.white},p("peekViewEditorBackground","Background color of the peek view editor."));T("peekViewEditorGutter.background",{dark:Hb,light:Hb,hcDark:Hb,hcLight:Hb},p("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));T("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},p("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));T("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},p("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));T("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ot,hcLight:Ot},p("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ese=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class pc{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=vF.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?p({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",Js(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):p("aria.oneReference","symbol in {0} on line {1} at column {2}",Js(this.uri),this.range.startLineNumber,this.range.startColumn)}}class tse{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),c=new L(n,l.startColumn,n,s),d=new L(r,a,r,1073741824),h=i.getValueInRange(c).replace(/^\s+/,""),u=i.getValueInRange(e),g=i.getValueInRange(d).replace(/\s+$/,"");return{value:h+u+g,highlight:{start:h.length,end:h.length+u.length}}}}class Mm{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new mn}dispose(){nt(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?p("aria.fileReferences.1","1 symbol in {0}, full path {1}",Js(this.uri),this.uri.fsPath):p("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Js(this.uri),this.uri.fsPath)}resolve(e){return ese(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new tse(i))}catch(i){Te(i)}return this})}}class ns{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new R,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(ns._compareReferences);let n;for(const s of e)if((!n||!It.isEqual(n.uri,s.uri,!0))&&(n=new Mm(this,s.uri),this.groups.push(n)),n.children.length===0||ns._compareReferences(s,n.children[n.children.length-1])!==0){const r=new pc(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){nt(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new ns(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?p("aria.result.0","No results found"):this.references.length===1?p("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?p("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):p("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+10?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:Nd(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLens.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&L.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return It.compare(e.uri,t.uri)||L.compareRangesUsingStarts(e.range,t.range)}}var sw=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rm=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Yk=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof ns||e instanceof Mm}getChildren(e){if(e instanceof ns)return e.groups;if(e instanceof Mm)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Yk=sw([Rm(0,Kn)],Yk);class ise{getHeight(){return 23}getTemplateId(e){return e instanceof Mm?Om.id:T_.id}}let Qk=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof pc){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return Js(e.uri)}};Qk=sw([Rm(0,_i)],Qk);class nse{getId(e){return e instanceof pc?e.id:e.uri}}let Xk=class extends H{constructor(e,t,i){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new nC(n,{supportHighlights:!0})),this.badge=new sk(q(n,J(".count"))),this._register(eQ(this.badge,i)),e.appendChild(n)}set(e,t){const i=L1(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(p("referencesCount","{0} references",n)):this.badge.setTitleFormat(p("referenceCount","{0} reference",n))}};Xk=sw([Rm(1,bg),Rm(2,Ct)],Xk);let Om=class C7{constructor(e){this._instantiationService=e,this.templateId=C7.id}renderTemplate(e){return this._instantiationService.createInstance(Xk,e)}renderElement(e,t,i){i.set(e.element,E1(e.filterData))}disposeTemplate(e){e.dispose()}};Om.id="FileReferencesRenderer";Om=sw([Rm(0,Ae)],Om);class sse{constructor(e){this.label=new $d(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${Js(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!Zo.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,E1(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class T_{constructor(){this.templateId=T_.id}renderTemplate(e){return new sse(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}T_.id="OneReferenceRenderer";class ose{getWidgetAriaLabel(){return p("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var rse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pa=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},wR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class ow{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new Q,this._callOnModelChange=new Q,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(!!e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let r=0;r{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(lse,"ReferencesWidget",this._treeContainer,new ise,[this._instantiationService.createInstance(Om),this._instantiationService.createInstance(T_)],this._instantiationService.createInstance(Yk),i),this._splitView.addView({onDidChange:ge.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},oC.Distribute),this._splitView.addView({onDidChange:ge.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},oC.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof pc&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),Pn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new vt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{!this._model||(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=p("noResults","No results"),bs(this._messageContainer),Promise.resolve(void 0)):(Pn(this._messageContainer),this._decorationsManager=new ow(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(t.detail!==2)return;const n=this._getFocusedReference();!n||this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),bs(this._treeContainer),bs(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof pc)return e;if(e instanceof Mm&&e.children.length>0)return e.children[0]}revealReference(e){return wR(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return wR(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Me.inMemory?this.setTitle(Dq(e.uri),this._uriLabel.getUriLabel(L1(e.uri))):this.setTitle(p("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const n=yield i;if(!this._model){n.dispose();return}nt(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=L.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};Jk=rse([pa(3,Ct),pa(4,Kn),pa(5,Ae),pa(6,_7),pa(7,bg),pa(8,D1),pa(9,_i),pa(10,Ht),pa(11,si)],Jk);var cse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},SR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Dh=new le("referenceSearchVisible",!1,p("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let mc=class ex{constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new Q,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Dh.bindTo(i)}static get(e){return e.getContribution(ex.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),!!n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s="peekViewLayout",r=ase.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(Jk,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(p("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:c,kind:d}=l;if(!!c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":i?this._gotoReference(c):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(p("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const d=this._editor.getModel().uri,h=new B(e.startLineNumber,e.startColumn),u=this._model.nearestReference(d,h);if(u)return this._widget.setSelection(u).then(()=>{this._widget&&this._editor.getOption(79)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return SR(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()})}revealReference(e){return SR(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const t=L.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:t,selectionSource:"code.jump"}},this._editor).then(i=>{var n;if(this._ignoreModelChangeEvent=!1,!i||!this._widget){this.closeWidget();return}if(this._editor===i)this._widget.show(t),this._widget.focusOnReferenceTree();else{const s=ex.get(i),r=this._model.clone();this.closeWidget(),i.focus(),s==null||s.toggleWidget(t,Ri(a=>Promise.resolve(r)),(n=this._peekMode)!==null&&n!==void 0?n:!1)}},i=>{this._ignoreModelChangeEvent=!1,Te(i)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};mc.ID="editor.contrib.referencesController";mc=cse([zh(2,Ee),zh(3,ct),zh(4,di),zh(5,Ae),zh(6,Do),zh(7,ot)],mc);function kh(o,e){const t=Zne(o);if(!t)return;const i=mc.get(t);i&&e(i)}as.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:yi(2089,60),when:se.or(Dh,jn.inPeekEditor),handler(o){kh(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});as.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:se.or(Dh,jn.inPeekEditor),handler(o){kh(o,e=>{e.goToNextOrPreviousReference(!0)})}});as.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:se.or(Dh,jn.inPeekEditor),handler(o){kh(o,e=>{e.goToNextOrPreviousReference(!1)})}});Xe.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Xe.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Xe.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Xe.registerCommand("closeReferenceSearch",o=>kh(o,e=>e.closeWidget()));as.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:se.and(jn.inPeekEditor,se.not("config.editor.stablePeek"))});as.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:se.and(Dh,se.not("config.editor.stablePeek"))});as.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:se.and(Dh,$F,bN.negate(),vN.negate()),handler(o){var e;const i=(e=o.get(so).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof pc&&kh(o,n=>n.revealReference(i[0]))}});as.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:se.and(Dh,$F,bN.negate(),vN.negate()),handler(o){var e;const i=(e=o.get(so).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof pc&&kh(o,n=>n.openReference(i[0],!0,!0))}});Xe.registerCommand("openReference",o=>{var e;const i=(e=o.get(so).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof pc&&kh(o,n=>n.openReference(i[0],!1,!0))});var w7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ip=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const jN=new le("hasSymbols",!1,p("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),rw=Ye("ISymbolNavigationService");let tx=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=jN.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new ix(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let c=!1,d=!1;for(const h of t.references)if(_5(h.uri,a.uri))c=!0,d=d||L.containsPosition(h.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=qo(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:L.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?p("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):p("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};tx=w7([ip(0,Ee),ip(1,ct),ip(2,di),ip(3,_i)],tx);et(rw,tx,!0);ee(new class extends xi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:jN,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(rw).revealNext(e)}});as.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:jN,primary:9,handler(o){o.get(rw).reset()}});let ix=class{constructor(e){this._listener=new Map,this._disposables=new Q,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),nt(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,qo(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};ix=w7([ip(0,ct)],ix);var S7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function A_(o,e,t,i){const s=t.ordered(o).map(r=>Promise.resolve(i(r,o,e)).then(void 0,a=>{Pi(a)}));return Promise.all(s).then(r=>{const a=[];for(const l of r)Array.isArray(l)?a.push(...l):l&&a.push(l);return a})}function KN(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function y7(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function L7(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function D7(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function aw(o,e,t,i,n){return A_(e,t,o,(s,r,a)=>S7(this,void 0,void 0,function*(){const l=yield s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const c=yield s.provideReferences(r,a,{includeDeclaration:!1},n);return c&&c.length===1?c:l}))}function M_(o){return S7(this,void 0,void 0,function*(){const e=yield o(),t=new ns(e,""),i=t.references.map(n=>n.link);return t.dispose(),i})}ia("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(de),n=KN(i.definitionProvider,e,t,ze.None);return M_(()=>n)});ia("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(de),n=D7(i.typeDefinitionProvider,e,t,ze.None);return M_(()=>n)});ia("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(de),n=y7(i.declarationProvider,e,t,ze.None);return M_(()=>n)});ia("_executeReferenceProvider",(o,e,t)=>{const i=o.get(de),n=aw(i.referenceProvider,e,t,!1,ze.None);return M_(()=>n)});ia("_executeImplementationProvider",(o,e,t)=>{const i=o.get(de),n=L7(i.implementationProvider,e,t,ze.None);return M_(()=>n)});var bo=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},uy,gy,fy,py,my,_y,by,vy;qs.appendMenuItem(M.EditorContext,{submenu:M.EditorContextPeek,title:p("peek.submenu","Peek"),group:"navigation",order:100});const k7=new Set;function ar(o){const e=new o;return C4(e),k7.add(e.id),e}class Pm{constructor(e,t){this.model=e,this.position=t}static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Pm||B.isIPosition(e.position)&&e.model)}}class vo extends ce{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(di),s=e.get(ct),r=e.get(kc),a=e.get(rw),l=e.get(de),c=t.getModel(),d=t.getPosition(),h=Pm.is(i)?i:new Pm(c,d),u=new qd(t,5),g=MI(this._getLocationModel(l,h.model,h.position,u.token),u.token).then(f=>bo(this,void 0,void 0,function*(){var _;if(!f||u.token.isCancellationRequested)return;Gi(f.ariaMessage);let b;if(f.referenceAt(c.uri,d)){const C=this._getAlternativeCommand(t);!vo._activeAlternativeCommands.has(C)&&k7.has(C)&&(b=t.getAction(C))}const v=f.references.length;if(v===0){if(!this.configuration.muteMessage){const C=c.getWordAtPosition(d);(_=os.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(C),d)}}else if(v===1&&b)vo._activeAlternativeCommands.add(this.id),b.run().finally(()=>{vo._activeAlternativeCommands.delete(this.id)});else return this._onResult(s,a,t,f)}),f=>{n.error(f)}).finally(()=>{u.dispose()});return r.showWhile(g,250),g}_onResult(e,t,i,n){return bo(this,void 0,void 0,function*(){const s=this._getGoToPreference(i);if(!(i instanceof Qd)&&(this.configuration.openInPeek||s==="peek"&&n.references.length>1))this._openInPeek(i,n);else{const r=n.firstReference(),a=n.references.length>1&&s==="gotoAndPeek",l=yield this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n):n.dispose(),s==="goto"&&t.put(r)}})}_openReference(e,t,i,n,s){return bo(this,void 0,void 0,function*(){let r;if(wB(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:L.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(!!a){if(s){const l=a.getModel(),c=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}})}_openInPeek(e,t){const i=mc.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),Ri(n=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}vo._activeAlternativeCommands=new Set;class R_ extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield KN(e.definitionProvider,t,i,n),p("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?p("noResultWord","No definition found for '{0}'",e.word):p("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(53).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(53).multipleDefinitions}}const x7=Sc&&!II()?2118:70;ar((uy=class nx extends R_{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nx.id,label:p("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:se.and(N.hasDefinitionProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:x7,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),Xe.registerCommandAlias("editor.action.goToDeclaration",nx.id)}},uy.id="editor.action.revealDefinition",uy));ar((gy=class sx extends R_{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:sx.id,label:p("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:se.and(N.hasDefinitionProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,x7),weight:100}}),Xe.registerCommandAlias("editor.action.openDeclarationToTheSide",sx.id)}},gy.id="editor.action.revealDefinitionAside",gy));ar((fy=class ox extends R_{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:ox.id,label:p("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:se.and(N.hasDefinitionProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:2}}),Xe.registerCommandAlias("editor.action.previewDeclaration",ox.id)}},fy.id="editor.action.peekDefinition",fy));class I7 extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield y7(e.declarationProvider,t,i,n),p("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(53).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(53).multipleDeclarations}}ar((py=class E7 extends I7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:E7.id,label:p("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:se.and(N.hasDeclarationProvider,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}},py.id="editor.action.revealDeclaration",py));ar(class extends I7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:p("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:se.and(N.hasDeclarationProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:3}})}});class N7 extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield D7(e.typeDefinitionProvider,t,i,n),p("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?p("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):p("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(53).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(53).multipleTypeDefinitions}}ar((my=class T7 extends N7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:T7.ID,label:p("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:se.and(N.hasTypeDefinitionProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},my.ID="editor.action.goToTypeDefinition",my));ar((_y=class A7 extends N7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:A7.ID,label:p("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:se.and(N.hasTypeDefinitionProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:4}})}},_y.ID="editor.action.peekTypeDefinition",_y));class M7 extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield L7(e.implementationProvider,t,i,n),p("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?p("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):p("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(53).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(53).multipleImplementations}}ar((by=class R7 extends M7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R7.ID,label:p("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:se.and(N.hasImplementationProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},by.ID="editor.action.goToImplementation",by));ar((vy=class O7 extends M7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:O7.ID,label:p("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:se.and(N.hasImplementationProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:5}})}},vy.ID="editor.action.peekImplementation",vy));class P7 extends vo{_getNoResultFoundMessage(e){return e?p("references.no","No references found for '{0}'",e.word):p("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(53).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(53).multipleReferences}}ar(class extends P7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:p("goToReferences.label","Go to References"),alias:"Go to References",precondition:se.and(N.hasReferenceProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield aw(e.referenceProvider,t,i,!0,n),p("ref.title","References"))})}});ar(class extends P7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:p("references.action.label","Peek References"),alias:"Peek References",precondition:se.and(N.hasReferenceProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield aw(e.referenceProvider,t,i,!1,n),p("ref.title","References"))})}});class dse extends vo{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:p("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:se.and(jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(this._references,p("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&p("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(53).multipleReferences}_getAlternativeCommand(){return""}}Xe.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:_e},{name:"position",description:"The position at which to start",constraint:B.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(o,e,t,i,n,s,r)=>bo(void 0,void 0,void 0,function*(){pt(_e.isUri(e)),pt(B.isIPosition(t)),pt(Array.isArray(i)),pt(typeof n>"u"||typeof n=="string"),pt(typeof r>"u"||typeof r=="boolean");const a=o.get(ct),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(nl(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const d=new class extends dse{_getNoResultFoundMessage(h){return s||super._getNoResultFoundMessage(h)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},i,n);c.get(Ae).invokeFunction(d.run.bind(d),l)})})});Xe.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:_e},{name:"position",description:"The position at which to start",constraint:B.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(o,e,t,i,n)=>bo(void 0,void 0,void 0,function*(){o.get(ci).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)})});Xe.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{pt(_e.isUri(e)),pt(B.isIPosition(t));const i=o.get(de),n=o.get(ct);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!nl(s)||!s.hasModel())return;const r=mc.get(s);if(!r)return;const a=Ri(c=>aw(i.referenceProvider,s.getModel(),B.lift(t),!1,c).then(d=>new ns(d,p("ref.title","References")))),l=new L(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});Xe.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");qs.appendMenuItems([{id:M.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:p({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:p({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:p({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:p({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:p({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var hse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Xd=class N0{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new Q,this.toUnhookForKeyboard=new Q,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new UN(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,Wn(a))})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},a=>{this.removeLinkDecorations(),Te(a)})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(N0.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;const n=new Tm(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ri(s=>this.findDefinition(e,s)),this.previousPromise.then(s=>{if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}if(s.length>1)this.addDecoration(new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),new Fn().appendText(p("multipleResults","Click to show {0} definitions.",s.length)));else{const r=s[0];if(!r.uri)return;this.textModelResolverService.createModelReference(r.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}const{object:{textEditorModel:l}}=a,{startLineNumber:c}=r.range;if(c<1||c>l.getLineCount()){a.dispose();return}const d=this.getPreviewValue(l,c,r);let h;r.originSelectionRange?h=L.lift(r.originSelectionRange):h=new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const u=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(h,new Fn().appendCodeblock(u||"",d)),a.dispose()})}}).then(void 0,Te)}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=N0.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const n=!t&&this.editor.getOption(80)&&!this.isInPeekEditor(i);return new R_({openToSide:t,openInPeek:n,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(i,this.editor)})}isInPeekEditor(e){const t=e.get(Ee);return jn.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};Xd.ID="editor.contrib.gotodefinitionatposition";Xd.MAX_SOURCE_PREVIEW_LINES=8;Xd=hse([Cy(1,Kn),Cy(2,Ht),Cy(3,de)],Xd);tt(Xd.ID,Xd);Et((o,e)=>{const t=o.getColor(lE);t&&e.addRule(`.monaco-editor .goto-definition-link { color: ${t} !important; }`)});const zb=J;class F7 extends H{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new p_(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class qN extends H{constructor(e,t,i){super(),this.actionContainer=q(e,zb("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=q(this.actionContainer,zb("a.action")),this.action.setAttribute("role","button"),t.iconClass&&q(this.action,zb(`span.icon.${t.iconClass}`));const n=q(this.action,zb("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register(G(this.actionContainer,ae.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register(G(this.actionContainer,ae.KEY_UP,s=>{new Rt(s).equals(3)&&(s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}static render(e,t,i){return new qN(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var use=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},gse=globalThis&&globalThis.__asyncValues||function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],t;return e?e.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=o[s]&&function(r){return new Promise(function(a,l){r=o[s](r),n(a,l,r.done,r.value)})}}function n(s,r,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},r)}};class fse{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class B7 extends H{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new R),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new mt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new mt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new mt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(55).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=jW(e=>this._computer.computeAsync(e)),use(this,void 0,void 0,function*(){var e,t;try{try{for(var i=gse(this._asyncIterable),n;n=yield i.next(),!n.done;){const s=n.value;s&&(this._result.push(s),this._fireResult())}}catch(s){e={error:s}}finally{try{n&&!n.done&&(t=i.return)&&(yield t.call(i))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){Te(s)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new fse(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class wy{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class T0{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const xh=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class ho{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=ho._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(ho.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(ho.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(ho.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(ho.isVariableCharacter(i)||ho.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof ho._table[i]>"u"&&!ho.isDigitCharacter(i)&&!ho.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}ho._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class tf{constructor(){this._children=[]}appendChild(e){return e instanceof Bn&&this._children[this._children.length-1]instanceof Bn?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function r(a,l){for(const c of a)c.parent=l,r(c.children,c)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof O_)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Bn extends tf{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Bn(this.value)}}class W7 extends tf{}class go extends W7{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof nf?this._children[0]:void 0}clone(){const e=new go(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class nf extends tf{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Bn&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new nf;return this.options.forEach(e.appendChild,e),e}}class GN extends tf{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof Mo&&Boolean(s.elseValue))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Mo){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new GN;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Mo extends tf{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(e)&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Mo(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Fm extends W7{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Bn(t)],!0):!1}clone(){const e=new Fm(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function yR(o,e){const t=[...o];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class O_ extends tf{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof go&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return yR([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof go&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Fm&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new O_;return this._children=this.children.map(t=>t.clone()),e}walk(e){yR(this.children,e)}}class _c{constructor(){this._scanner=new ho,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new O_;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i!=null?i:!1,t!=null?t:!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(r=>(r instanceof go&&(r.isFinalTabstop?n.set(0,void 0):!n.has(r.index)&&r.children.length>0?n.set(r.index,r.children):s.push(r)),!0));for(const r of s){const a=n.get(r.index);if(a){const l=new go(r.index);l.transform=r.transform;for(const c of a)l.appendChild(c.clone());t.replace(r,[l])}}return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new go(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Bn(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new go(Number(t)):new Fm(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new go(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Bn("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new nf;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Bn(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new Fm(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Bn("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new GN;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new Bn(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Mo(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Mo(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Mo(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new Mo(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new Mo(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new Mo(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new Mo(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Bn(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const pse=p("defaultLabel","input"),mse=p("label.preserveCaseToggle","Preserve Case");class _se extends y_{constructor(e){super({icon:m.preserveCase,title:mse+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class bse extends yo{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new R),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new R),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new R),this._onInput=this._register(new R),this._onKeyUp=this._register(new R),this._onPreserveCaseKeyDown=this._register(new R),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||pse,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendPreserveCaseLabel||"",r=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new yF(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c})),this.preserveCase=this._register(new _se({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(u=>{this._onPreserveCaseKeyDown.fire(u)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const d=[this.preserveCase.domNode];this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){const g=d.indexOf(document.activeElement);if(g>=0){let f=-1;u.equals(17)?f=(g+1)%d.length:u.equals(15)&&(g===0?f=d.length-1:f=g-1),u.equals(9)?(d[g].blur(),this.inputBox.focus()):f>=0&&d[f].focus(),ut.stop(u,!0)}}});const h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var V7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},H7=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const ZN=new le("suggestWidgetVisible",!1,p("suggestWidgetVisible","Whether suggestion are visible")),YN="historyNavigationWidgetFocus",z7="historyNavigationForwardsEnabled",U7="historyNavigationBackwardsEnabled";let Ld;const Ub=[];function $7(o,e){if(Ub.includes(e))throw new Error("Cannot register the same widget multiple times");Ub.push(e);const t=new Q,i=t.add(o.createScoped(e.element)),n=new le(YN,!1).bindTo(i),s=new le(z7,!0).bindTo(i),r=new le(U7,!0).bindTo(i),a=()=>{n.set(!0),Ld=e},l=()=>{n.set(!1),Ld===e&&(Ld=void 0)};return e.element===document.activeElement&&a(),t.add(e.onDidFocus(()=>a())),t.add(e.onDidBlur(()=>l())),t.add(Be(()=>{Ub.splice(Ub.indexOf(e),1),l()})),{scopedContextKeyService:i,historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:r,dispose(){t.dispose()}}}let rx=class extends AX{constructor(e,t,i,n,s=!1){super(e,t,s,i),this._register($7(n,this.inputBox))}};rx=V7([H7(3,Ee)],rx);let ax=class extends bse{constructor(e,t,i,n,s=!1){super(e,t,s,i),this._register($7(n,this.inputBox))}};ax=V7([H7(3,Ee)],ax);as.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:se.and(se.has(YN),se.equals(U7,!0),ZN.isEqualTo(!1)),primary:16,secondary:[528],handler:o=>{Ld&&Ld.showPreviousValue()}});as.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:se.and(se.has(YN),se.equals(z7,!0),ZN.isEqualTo(!1)),primary:18,secondary:[530],handler:o=>{Ld&&Ld.showNextValue()}});var Ep=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Ke={Visible:ZN,HasFocusedSuggestion:new le("suggestWidgetHasFocusedSuggestion",!1,p("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new le("suggestWidgetDetailsVisible",!1,p("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new le("suggestWidgetMultipleSuggestions",!1,p("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new le("suggestionMakesTextEdit",!0,p("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new le("acceptSuggestionOnEnter",!0,p("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new le("suggestionHasInsertAndReplaceRange",!1,p("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new le("suggestionInsertMode",void 0,{type:"string",description:p("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new le("suggestionCanResolve",!1,p("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ql=new M("suggestWidgetStatusBar");class vse{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=Zo.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,L.isIRange(t.range)?(this.editStart=new B(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new B(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new B(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||L.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new B(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new B(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new B(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||L.spansMultipleLines(t.range.insert)||L.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return Ep(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{ea(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class Bm{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}Bm.default=new Bm;let Cse;function wse(){return Cse}class Sse{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function QN(o,e,t,i=Bm.default,n={triggerKind:0},s=ze.None){return Ep(this,void 0,void 0,function*(){const r=new $n(!0);t=t.clone();const a=e.getWordAtPosition(t),l=a?new L(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):L.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],h=new Q,u=[];let g=!1;const f=(b,v,C)=>{var w,S,k;let x=!1;if(!v)return x;for(const y of v.suggestions)if(!i.kindFilter.has(y.kind)){if(!i.showDeprecated&&((w=y==null?void 0:y.tags)===null||w===void 0?void 0:w.includes(1)))continue;y.range||(y.range=c),y.sortText||(y.sortText=typeof y.label=="string"?y.label:y.label.label),!g&&y.insertTextRules&&y.insertTextRules&4&&(g=_c.guessNeedsClipboard(y.insertText)),d.push(new vse(t,y,v,b)),x=!0}return hI(v)&&h.add(v),u.push({providerName:(S=b._debugDisplayName)!==null&&S!==void 0?S:"unknown_provider",elapsedProvider:(k=v.duration)!==null&&k!==void 0?k:-1,elapsedOverall:C.elapsed()}),x},_=(()=>Ep(this,void 0,void 0,function*(){}))();for(const b of o.orderedGroups(e)){let v=!1;if(yield Promise.all(b.map(C=>Ep(this,void 0,void 0,function*(){if(!(i.providerFilter.size>0&&!i.providerFilter.has(C)))try{const w=new $n(!0),S=yield C.provideCompletionItems(e,t,n,s);v=f(C,S,w)||v}catch(w){Pi(w)}}))),v||s.isCancellationRequested)break}return yield _,s.isCancellationRequested?(h.dispose(),Promise.reject(new yc)):new Sse(d.sort(j7(i.snippetSortOrder)),g,{entries:u,elapsed:r.elapsed()},h)})}function XN(o,e){if(o.sortTextLow&&e.sortTextLow){if(o.sortTextLowe.sortTextLow)return 1}return o.textLabele.textLabel?1:o.completion.kind-e.completion.kind}function yse(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return XN(o,e)}function Lse(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return XN(o,e)}const lw=new Map;lw.set(0,yse);lw.set(2,Lse);lw.set(1,XN);function j7(o){return lw.get(o)}Xe.registerCommand("_executeCompletionItemProvider",(o,...e)=>Ep(void 0,void 0,void 0,function*(){const[t,i,n,s]=e;pt(_e.isUri(t)),pt(B.isIPosition(i)),pt(typeof n=="string"||!n),pt(typeof s=="number"||!s);const{completionProvider:r}=o.get(de),a=yield o.get(Kn).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},c=[],d=yield QN(r,a.object.textEditorModel,B.lift(i),void 0,{triggerCharacter:n,triggerKind:n?1:0});for(const h of d.items)c.length<(s!=null?s:0)&&c.push(h.resolve(ze.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}}));function Dse(o,e){var t;(t=o.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class ku{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var JN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pC=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const LR=J;let mC=class lx extends H{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(Dd,this._editor)),this._isChangingDecorations=!1,this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const n of xh.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new _C(this._editor,this._participants),this._hoverOperation=this._register(new B7(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value,n.isComplete,n.hasLoadingMessage)})),this._register(this._editor.onDidChangeModelDecorations(()=>{this._isChangingDecorations||this._onModelDecorationsChanged()})),this._register(ki(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(Wt.onDidChange(()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))}))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new wy(0,i.range)),i.type===7){const n=this._editor.getOption(46).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexts.priority-n.priority),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new wy(0,e),t,i)}_startShowingAt(e,t,i){if(!(this._computer.anchor&&this._computer.anchor.equals(e))){if(this._hoverOperation.cancel(),this._widget.position)if(!this._computer.anchor||!e.canAdoptVisibleHover(this._computer.anchor,this._widget.position))this.hide();else{const n=this._messages.filter(s=>s.isValidForHoverAnchor(e));if(n.length===0)this.hide();else{if(n.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,n)}}this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}return e}_withResult(e,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(e,t){const{showAtPosition:i,showAtRange:n,highlightRange:s}=lx.computeHoverRanges(e.range,t),r=new Q,a=r.add(new cx(this._keybindingService)),l=document.createDocumentFragment();let c=null;const d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const h of this._participants){const u=t.filter(g=>g.owner===h);u.length>0&&r.add(h.renderHoverParts(d,u))}if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const h=this._editor.createDecorationsCollection();try{this._isChangingDecorations=!0,h.set([{range:s,options:lx._DECORATION_OPTIONS}])}finally{this._isChangingDecorations=!1}r.add(Be(()=>{try{this._isChangingDecorations=!0,h.clear()}finally{this._isChangingDecorations=!1}}))}this._widget.showAt(l,new kse(c,i,n,this._editor.getOption(55).above,this._computer.shouldFocus,r))}else r.dispose()}static computeHoverRanges(e,t){const i=e.startLineNumber;let n=e.startColumn,s=e.endColumn,r=t[0].range,a=null;for(const l of t)r=L.plusRange(r,l.range),l.range.startLineNumber===i&&l.range.endLineNumber===i&&(n=Math.min(n,l.range.startColumn),s=Math.max(s,l.range.endColumn)),l.forceShowAtRange&&(a=l.range);return{showAtPosition:a?a.getStartPosition():new B(e.startLineNumber,n),showAtRange:a||new L(i,n,i,s),highlightRange:r}}};mC._DECORATION_OPTIONS=Ne.register({description:"content-hover-highlight",className:"hoverHighlight"});mC=JN([pC(1,Ae),pC(2,_i)],mC);class kse{constructor(e,t,i,n,s,r){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=n,this.stoleFocus=s,this.disposables=r}}let Dd=class K7 extends H{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=N.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new F7),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(46)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return Boolean((e=this._visibleData)===null||e===void 0?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return K7.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(Ke.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(46);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const i=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==i&&(this._hover.contentsDomNode.style.paddingBottom=i,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};Dd.ID="editor.contrib.contentHoverWidget";Dd=JN([pC(1,Ee)],Dd);let cx=class extends H{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=LR("div.hover-row.status-bar"),this.actionsElement=q(this.hoverElement,LR("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(qN.render(this.actionsElement,e,i))}append(e){const t=q(this.actionsElement,e);return this._hasContent=!0,t}};cx=JN([pC(0,_i)],cx);class _C{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(t.type!==1)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ri.EMPTY;const i=_C._getLineDecorations(this._editor,t);return ri.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):ri.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=_C._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return i_(t)}}let q7={};(function(){function o(e,t){t(q7)}o.amd=!0,function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof o=="function"&&o.amd?o(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))}(this,function(e){function t(Z,U){for(var $=0;$Z.length)&&(U=Z.length);for(var $=0,E=new Array(U);$=Z.length?{done:!0}:{done:!1,value:Z[E++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +[{1}] {2}`,s,ZE.modifierLabels[Os].altKey,c)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&((t=e.toggled)===null||t===void 0?void 0:t.icon)?e.toggled.icon:e.icon;if(!!s)if(at.isThemeIcon(s)){const r=at.asClassNameArray(s);n.classList.add(...r),this._itemClassDispose.value=Be(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=Xp(this._themeService.getColorTheme().type)?Pd(s.dark):Pd(s.light),n.classList.add("icon"),this._itemClassDispose.value=qo(Be(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};xg=$N([Rs(2,_i),Rs(3,di),Rs(4,Ee),Rs(5,Ct),Rs(6,ll)],xg);let Gk=class extends g7{constructor(e,t,i,n){var s,r;const a=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(s=t==null?void 0:t.menuAsChild)!==null&&s!==void 0?s:!1,classNames:(r=t==null?void 0:t.classNames)!==null&&r!==void 0?r:at.isThemeIcon(e.item.icon)?at.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,a),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),pt(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!at.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=Xp(this._themeService.getColorTheme().type)?Pd(i.dark):Pd(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};Gk=$N([Rs(2,ll),Rs(3,Ct)],Gk);let Zk=class extends Dr{constructor(e,t,i,n,s,r,a,l){var c,d,h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let u;const g=l.get(this._storageKey,1);g&&(u=e.actions.find(_=>g===_.id)),u||(u=e.actions[0]),this._defaultAction=this._instaService.createInstance(xg,u,{keybinding:this._getDefaultActionKeybindingLabel(u)});const f=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t==null?void 0:t.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(h=t==null?void 0:t.actionRunner)!==null&&h!==void 0?h:new og});this._dropdown=new g7(e,e.actions,this._contextMenuService,f),this._dropdown.actionRunner.onDidRun(_=>{_.action instanceof ac&&this.update(_.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(xg,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends og{runAction(t,i){return f7(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(QH(this._container,J(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const n=this._keybindingService.lookupKeybinding(e.id);n&&(i=`(${n.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=J(".action-container");this._defaultAction.render(q(this._container,t)),this._register(G(t,ae.KEY_DOWN,n=>{const s=new Rt(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=J(".dropdown-action-container");this._dropdown.render(q(this._container,i)),this._register(G(i,ae.KEY_DOWN,n=>{var s;const r=new Rt(n);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};Zk=$N([Rs(2,_i),Rs(3,di),Rs(4,ll),Rs(5,ph),Rs(6,Ae),Rs(7,Do)],Zk);function Gne(o,e,t){return e instanceof ac?o.createInstance(xg,e,t):e instanceof GI?e.item.rememberDefaultAction?o.createInstance(Zk,e,t):o.createInstance(Gk,e,t):void 0}var p7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m7=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const _7=Ye("IPeekViewService");et(_7,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}});var jn;(function(o){o.inPeekEditor=new le("inReferenceSearchEditor",!0,p("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(jn||(jn={}));let Am=class{constructor(e,t){e instanceof Qd&&jn.inPeekEditor.bindTo(t)}dispose(){}};Am.ID="editor.contrib.referenceController";Am=p7([m7(1,Ee)],Am);tt(Am.ID,Am);function Zne(o){const e=o.get(ct).getFocusedCodeEditor();return e instanceof Qd?e.getParentEditor():e}const Yne={headerBackgroundColor:W.white,primaryHeadingColor:W.fromHex("#333333"),secondaryHeadingColor:W.fromHex("#6c6c6cb3")};let fC=class extends zne{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new R,this.onDidClose=this._onDidClose.event,Jr(this.options,Yne,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=J(".head"),this._bodyElement=J(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=J(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),ki(i,"click",r=>this._onTitleClick(r))),q(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=J("span.filename"),this._secondaryHeading=J("span.dirname"),this._metaHeading=J("span.meta"),q(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=J(".peekview-actions");q(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new Zr(n,s),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new is("peekview.close",p("label.close","Close"),m.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Gne.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Si(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,bs(this._metaHeading)):Pn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(61)*1.2),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};fC=p7([m7(2,Ae)],fC);const Qne=T("peekViewTitle.background",{dark:fe(zn,.1),light:fe(zn,.1),hcDark:null,hcLight:null},p("peekViewTitleBackground","Background color of the peek view title area.")),b7=T("peekViewTitleLabel.foreground",{dark:W.white,light:W.black,hcDark:W.white,hcLight:Cs},p("peekViewTitleForeground","Color of the peek view title.")),v7=T("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},p("peekViewTitleInfoForeground","Color of the peek view title info.")),Xne=T("peekView.border",{dark:zn,light:zn,hcDark:We,hcLight:We},p("peekViewBorder","Color of the peek view borders and arrow.")),Jne=T("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:W.black,hcLight:W.white},p("peekViewResultsBackground","Background color of the peek view result list."));T("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:W.white,hcLight:Cs},p("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));T("peekViewResult.fileForeground",{dark:W.white,light:"#1E1E1E",hcDark:W.white,hcLight:Cs},p("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));T("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},p("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));T("peekViewResult.selectionForeground",{dark:W.white,light:"#6C6C6C",hcDark:W.white,hcLight:Cs},p("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Hb=T("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:W.black,hcLight:W.white},p("peekViewEditorBackground","Background color of the peek view editor."));T("peekViewEditorGutter.background",{dark:Hb,light:Hb,hcDark:Hb,hcLight:Hb},p("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));T("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},p("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));T("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},p("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));T("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ot,hcLight:Ot},p("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ese=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class pc{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=v5.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?p({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",Js(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):p("aria.oneReference","symbol in {0} on line {1} at column {2}",Js(this.uri),this.range.startLineNumber,this.range.startColumn)}}class tse{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),c=new L(n,l.startColumn,n,s),d=new L(r,a,r,1073741824),h=i.getValueInRange(c).replace(/^\s+/,""),u=i.getValueInRange(e),g=i.getValueInRange(d).replace(/\s+$/,"");return{value:h+u+g,highlight:{start:h.length,end:h.length+u.length}}}}class Mm{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new mn}dispose(){nt(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?p("aria.fileReferences.1","1 symbol in {0}, full path {1}",Js(this.uri),this.uri.fsPath):p("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Js(this.uri),this.uri.fsPath)}resolve(e){return ese(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new tse(i))}catch(i){Te(i)}return this})}}class ns{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new R,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(ns._compareReferences);let n;for(const s of e)if((!n||!It.isEqual(n.uri,s.uri,!0))&&(n=new Mm(this,s.uri),this.groups.push(n)),n.children.length===0||ns._compareReferences(s,n.children[n.children.length-1])!==0){const r=new pc(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){nt(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new ns(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?p("aria.result.0","No results found"):this.references.length===1?p("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?p("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):p("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+10?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:Nd(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLens.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&L.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return It.compare(e.uri,t.uri)||L.compareRangesUsingStarts(e.range,t.range)}}var sw=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rm=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Yk=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof ns||e instanceof Mm}getChildren(e){if(e instanceof ns)return e.groups;if(e instanceof Mm)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Yk=sw([Rm(0,Kn)],Yk);class ise{getHeight(){return 23}getTemplateId(e){return e instanceof Mm?Om.id:T_.id}}let Qk=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof pc){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return Js(e.uri)}};Qk=sw([Rm(0,_i)],Qk);class nse{getId(e){return e instanceof pc?e.id:e.uri}}let Xk=class extends H{constructor(e,t,i){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new nC(n,{supportHighlights:!0})),this.badge=new sk(q(n,J(".count"))),this._register(eQ(this.badge,i)),e.appendChild(n)}set(e,t){const i=L1(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(p("referencesCount","{0} references",n)):this.badge.setTitleFormat(p("referenceCount","{0} reference",n))}};Xk=sw([Rm(1,bg),Rm(2,Ct)],Xk);let Om=class C7{constructor(e){this._instantiationService=e,this.templateId=C7.id}renderTemplate(e){return this._instantiationService.createInstance(Xk,e)}renderElement(e,t,i){i.set(e.element,E1(e.filterData))}disposeTemplate(e){e.dispose()}};Om.id="FileReferencesRenderer";Om=sw([Rm(0,Ae)],Om);class sse{constructor(e){this.label=new $d(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${Js(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!Zo.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,E1(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class T_{constructor(){this.templateId=T_.id}renderTemplate(e){return new sse(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}T_.id="OneReferenceRenderer";class ose{getWidgetAriaLabel(){return p("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var rse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pa=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},wR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class ow{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new Q,this._callOnModelChange=new Q,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(!!e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let r=0;r{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(lse,"ReferencesWidget",this._treeContainer,new ise,[this._instantiationService.createInstance(Om),this._instantiationService.createInstance(T_)],this._instantiationService.createInstance(Yk),i),this._splitView.addView({onDidChange:ge.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},oC.Distribute),this._splitView.addView({onDidChange:ge.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},oC.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof pc&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),Pn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new vt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{!this._model||(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=p("noResults","No results"),bs(this._messageContainer),Promise.resolve(void 0)):(Pn(this._messageContainer),this._decorationsManager=new ow(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(t.detail!==2)return;const n=this._getFocusedReference();!n||this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),bs(this._treeContainer),bs(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof pc)return e;if(e instanceof Mm&&e.children.length>0)return e.children[0]}revealReference(e){return wR(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return wR(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Me.inMemory?this.setTitle(Dq(e.uri),this._uriLabel.getUriLabel(L1(e.uri))):this.setTitle(p("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const n=yield i;if(!this._model){n.dispose();return}nt(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=L.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};Jk=rse([pa(3,Ct),pa(4,Kn),pa(5,Ae),pa(6,_7),pa(7,bg),pa(8,D1),pa(9,_i),pa(10,Ht),pa(11,si)],Jk);var cse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},SR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Dh=new le("referenceSearchVisible",!1,p("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let mc=class ex{constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new Q,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Dh.bindTo(i)}static get(e){return e.getContribution(ex.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),!!n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s="peekViewLayout",r=ase.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(Jk,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(p("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:c,kind:d}=l;if(!!c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":i?this._gotoReference(c):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(p("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const d=this._editor.getModel().uri,h=new B(e.startLineNumber,e.startColumn),u=this._model.nearestReference(d,h);if(u)return this._widget.setSelection(u).then(()=>{this._widget&&this._editor.getOption(79)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return SR(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()})}revealReference(e){return SR(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const t=L.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:t,selectionSource:"code.jump"}},this._editor).then(i=>{var n;if(this._ignoreModelChangeEvent=!1,!i||!this._widget){this.closeWidget();return}if(this._editor===i)this._widget.show(t),this._widget.focusOnReferenceTree();else{const s=ex.get(i),r=this._model.clone();this.closeWidget(),i.focus(),s==null||s.toggleWidget(t,Ri(a=>Promise.resolve(r)),(n=this._peekMode)!==null&&n!==void 0?n:!1)}},i=>{this._ignoreModelChangeEvent=!1,Te(i)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};mc.ID="editor.contrib.referencesController";mc=cse([zh(2,Ee),zh(3,ct),zh(4,di),zh(5,Ae),zh(6,Do),zh(7,ot)],mc);function kh(o,e){const t=Zne(o);if(!t)return;const i=mc.get(t);i&&e(i)}as.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:yi(2089,60),when:se.or(Dh,jn.inPeekEditor),handler(o){kh(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});as.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:se.or(Dh,jn.inPeekEditor),handler(o){kh(o,e=>{e.goToNextOrPreviousReference(!0)})}});as.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:se.or(Dh,jn.inPeekEditor),handler(o){kh(o,e=>{e.goToNextOrPreviousReference(!1)})}});Xe.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Xe.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Xe.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Xe.registerCommand("closeReferenceSearch",o=>kh(o,e=>e.closeWidget()));as.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:se.and(jn.inPeekEditor,se.not("config.editor.stablePeek"))});as.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:se.and(Dh,se.not("config.editor.stablePeek"))});as.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:se.and(Dh,$5,bN.negate(),vN.negate()),handler(o){var e;const i=(e=o.get(so).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof pc&&kh(o,n=>n.revealReference(i[0]))}});as.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:se.and(Dh,$5,bN.negate(),vN.negate()),handler(o){var e;const i=(e=o.get(so).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof pc&&kh(o,n=>n.openReference(i[0],!0,!0))}});Xe.registerCommand("openReference",o=>{var e;const i=(e=o.get(so).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof pc&&kh(o,n=>n.openReference(i[0],!1,!0))});var w7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ip=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const jN=new le("hasSymbols",!1,p("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),rw=Ye("ISymbolNavigationService");let tx=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=jN.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new ix(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let c=!1,d=!1;for(const h of t.references)if(_F(h.uri,a.uri))c=!0,d=d||L.containsPosition(h.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=qo(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:L.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?p("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):p("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};tx=w7([ip(0,Ee),ip(1,ct),ip(2,di),ip(3,_i)],tx);et(rw,tx,!0);ee(new class extends xi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:jN,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(rw).revealNext(e)}});as.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:jN,primary:9,handler(o){o.get(rw).reset()}});let ix=class{constructor(e){this._listener=new Map,this._disposables=new Q,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),nt(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,qo(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};ix=w7([ip(0,ct)],ix);var S7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function A_(o,e,t,i){const s=t.ordered(o).map(r=>Promise.resolve(i(r,o,e)).then(void 0,a=>{Pi(a)}));return Promise.all(s).then(r=>{const a=[];for(const l of r)Array.isArray(l)?a.push(...l):l&&a.push(l);return a})}function KN(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function y7(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function L7(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function D7(o,e,t,i){return A_(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function aw(o,e,t,i,n){return A_(e,t,o,(s,r,a)=>S7(this,void 0,void 0,function*(){const l=yield s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const c=yield s.provideReferences(r,a,{includeDeclaration:!1},n);return c&&c.length===1?c:l}))}function M_(o){return S7(this,void 0,void 0,function*(){const e=yield o(),t=new ns(e,""),i=t.references.map(n=>n.link);return t.dispose(),i})}ia("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(de),n=KN(i.definitionProvider,e,t,ze.None);return M_(()=>n)});ia("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(de),n=D7(i.typeDefinitionProvider,e,t,ze.None);return M_(()=>n)});ia("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(de),n=y7(i.declarationProvider,e,t,ze.None);return M_(()=>n)});ia("_executeReferenceProvider",(o,e,t)=>{const i=o.get(de),n=aw(i.referenceProvider,e,t,!1,ze.None);return M_(()=>n)});ia("_executeImplementationProvider",(o,e,t)=>{const i=o.get(de),n=L7(i.implementationProvider,e,t,ze.None);return M_(()=>n)});var bo=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},uy,gy,fy,py,my,_y,by,vy;qs.appendMenuItem(M.EditorContext,{submenu:M.EditorContextPeek,title:p("peek.submenu","Peek"),group:"navigation",order:100});const k7=new Set;function ar(o){const e=new o;return C4(e),k7.add(e.id),e}class Pm{constructor(e,t){this.model=e,this.position=t}static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Pm||B.isIPosition(e.position)&&e.model)}}class vo extends ce{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(di),s=e.get(ct),r=e.get(kc),a=e.get(rw),l=e.get(de),c=t.getModel(),d=t.getPosition(),h=Pm.is(i)?i:new Pm(c,d),u=new qd(t,5),g=MI(this._getLocationModel(l,h.model,h.position,u.token),u.token).then(f=>bo(this,void 0,void 0,function*(){var _;if(!f||u.token.isCancellationRequested)return;Gi(f.ariaMessage);let b;if(f.referenceAt(c.uri,d)){const C=this._getAlternativeCommand(t);!vo._activeAlternativeCommands.has(C)&&k7.has(C)&&(b=t.getAction(C))}const v=f.references.length;if(v===0){if(!this.configuration.muteMessage){const C=c.getWordAtPosition(d);(_=os.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(C),d)}}else if(v===1&&b)vo._activeAlternativeCommands.add(this.id),b.run().finally(()=>{vo._activeAlternativeCommands.delete(this.id)});else return this._onResult(s,a,t,f)}),f=>{n.error(f)}).finally(()=>{u.dispose()});return r.showWhile(g,250),g}_onResult(e,t,i,n){return bo(this,void 0,void 0,function*(){const s=this._getGoToPreference(i);if(!(i instanceof Qd)&&(this.configuration.openInPeek||s==="peek"&&n.references.length>1))this._openInPeek(i,n);else{const r=n.firstReference(),a=n.references.length>1&&s==="gotoAndPeek",l=yield this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n):n.dispose(),s==="goto"&&t.put(r)}})}_openReference(e,t,i,n,s){return bo(this,void 0,void 0,function*(){let r;if(wB(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:L.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(!!a){if(s){const l=a.getModel(),c=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}})}_openInPeek(e,t){const i=mc.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),Ri(n=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}vo._activeAlternativeCommands=new Set;class R_ extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield KN(e.definitionProvider,t,i,n),p("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?p("noResultWord","No definition found for '{0}'",e.word):p("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(53).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(53).multipleDefinitions}}const x7=Sc&&!II()?2118:70;ar((uy=class nx extends R_{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nx.id,label:p("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:se.and(N.hasDefinitionProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:x7,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),Xe.registerCommandAlias("editor.action.goToDeclaration",nx.id)}},uy.id="editor.action.revealDefinition",uy));ar((gy=class sx extends R_{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:sx.id,label:p("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:se.and(N.hasDefinitionProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,x7),weight:100}}),Xe.registerCommandAlias("editor.action.openDeclarationToTheSide",sx.id)}},gy.id="editor.action.revealDefinitionAside",gy));ar((fy=class ox extends R_{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:ox.id,label:p("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:se.and(N.hasDefinitionProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:2}}),Xe.registerCommandAlias("editor.action.previewDeclaration",ox.id)}},fy.id="editor.action.peekDefinition",fy));class I7 extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield y7(e.declarationProvider,t,i,n),p("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(53).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(53).multipleDeclarations}}ar((py=class E7 extends I7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:E7.id,label:p("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:se.and(N.hasDeclarationProvider,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}},py.id="editor.action.revealDeclaration",py));ar(class extends I7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:p("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:se.and(N.hasDeclarationProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:3}})}});class N7 extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield D7(e.typeDefinitionProvider,t,i,n),p("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?p("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):p("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(53).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(53).multipleTypeDefinitions}}ar((my=class T7 extends N7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:T7.ID,label:p("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:se.and(N.hasTypeDefinitionProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},my.ID="editor.action.goToTypeDefinition",my));ar((_y=class A7 extends N7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:A7.ID,label:p("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:se.and(N.hasTypeDefinitionProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:4}})}},_y.ID="editor.action.peekTypeDefinition",_y));class M7 extends vo{_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield L7(e.implementationProvider,t,i,n),p("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?p("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):p("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(53).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(53).multipleImplementations}}ar((by=class R7 extends M7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R7.ID,label:p("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:se.and(N.hasImplementationProvider,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},by.ID="editor.action.goToImplementation",by));ar((vy=class O7 extends M7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:O7.ID,label:p("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:se.and(N.hasImplementationProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:5}})}},vy.ID="editor.action.peekImplementation",vy));class P7 extends vo{_getNoResultFoundMessage(e){return e?p("references.no","No references found for '{0}'",e.word):p("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(53).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(53).multipleReferences}}ar(class extends P7{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:p("goToReferences.label","Go to References"),alias:"Go to References",precondition:se.and(N.hasReferenceProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:N.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield aw(e.referenceProvider,t,i,!0,n),p("ref.title","References"))})}});ar(class extends P7{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:p("references.action.label","Peek References"),alias:"Peek References",precondition:se.and(N.hasReferenceProvider,jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:M.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(yield aw(e.referenceProvider,t,i,!1,n),p("ref.title","References"))})}});class dse extends vo{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:p("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:se.and(jn.notInPeekEditor,N.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return bo(this,void 0,void 0,function*(){return new ns(this._references,p("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&p("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(53).multipleReferences}_getAlternativeCommand(){return""}}Xe.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:_e},{name:"position",description:"The position at which to start",constraint:B.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(o,e,t,i,n,s,r)=>bo(void 0,void 0,void 0,function*(){pt(_e.isUri(e)),pt(B.isIPosition(t)),pt(Array.isArray(i)),pt(typeof n>"u"||typeof n=="string"),pt(typeof r>"u"||typeof r=="boolean");const a=o.get(ct),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(nl(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const d=new class extends dse{_getNoResultFoundMessage(h){return s||super._getNoResultFoundMessage(h)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},i,n);c.get(Ae).invokeFunction(d.run.bind(d),l)})})});Xe.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:_e},{name:"position",description:"The position at which to start",constraint:B.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(o,e,t,i,n)=>bo(void 0,void 0,void 0,function*(){o.get(ci).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)})});Xe.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{pt(_e.isUri(e)),pt(B.isIPosition(t));const i=o.get(de),n=o.get(ct);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!nl(s)||!s.hasModel())return;const r=mc.get(s);if(!r)return;const a=Ri(c=>aw(i.referenceProvider,s.getModel(),B.lift(t),!1,c).then(d=>new ns(d,p("ref.title","References")))),l=new L(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});Xe.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");qs.appendMenuItems([{id:M.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:p({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:p({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:p({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:p({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:M.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:p({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var hse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Xd=class N0{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new Q,this.toUnhookForKeyboard=new Q,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new UN(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,Wn(a))})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},a=>{this.removeLinkDecorations(),Te(a)})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(N0.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;const n=new Tm(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ri(s=>this.findDefinition(e,s)),this.previousPromise.then(s=>{if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}if(s.length>1)this.addDecoration(new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),new Fn().appendText(p("multipleResults","Click to show {0} definitions.",s.length)));else{const r=s[0];if(!r.uri)return;this.textModelResolverService.createModelReference(r.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}const{object:{textEditorModel:l}}=a,{startLineNumber:c}=r.range;if(c<1||c>l.getLineCount()){a.dispose();return}const d=this.getPreviewValue(l,c,r);let h;r.originSelectionRange?h=L.lift(r.originSelectionRange):h=new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const u=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(h,new Fn().appendCodeblock(u||"",d)),a.dispose()})}}).then(void 0,Te)}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=N0.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const n=!t&&this.editor.getOption(80)&&!this.isInPeekEditor(i);return new R_({openToSide:t,openInPeek:n,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(i,this.editor)})}isInPeekEditor(e){const t=e.get(Ee);return jn.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};Xd.ID="editor.contrib.gotodefinitionatposition";Xd.MAX_SOURCE_PREVIEW_LINES=8;Xd=hse([Cy(1,Kn),Cy(2,Ht),Cy(3,de)],Xd);tt(Xd.ID,Xd);Et((o,e)=>{const t=o.getColor(lE);t&&e.addRule(`.monaco-editor .goto-definition-link { color: ${t} !important; }`)});const zb=J;class F7 extends H{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new p_(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class qN extends H{constructor(e,t,i){super(),this.actionContainer=q(e,zb("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=q(this.actionContainer,zb("a.action")),this.action.setAttribute("role","button"),t.iconClass&&q(this.action,zb(`span.icon.${t.iconClass}`));const n=q(this.action,zb("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register(G(this.actionContainer,ae.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register(G(this.actionContainer,ae.KEY_UP,s=>{new Rt(s).equals(3)&&(s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}static render(e,t,i){return new qN(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var use=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},gse=globalThis&&globalThis.__asyncValues||function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],t;return e?e.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=o[s]&&function(r){return new Promise(function(a,l){r=o[s](r),n(a,l,r.done,r.value)})}}function n(s,r,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},r)}};class fse{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class B7 extends H{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new R),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new mt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new mt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new mt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(55).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=jW(e=>this._computer.computeAsync(e)),use(this,void 0,void 0,function*(){var e,t;try{try{for(var i=gse(this._asyncIterable),n;n=yield i.next(),!n.done;){const s=n.value;s&&(this._result.push(s),this._fireResult())}}catch(s){e={error:s}}finally{try{n&&!n.done&&(t=i.return)&&(yield t.call(i))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){Te(s)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new fse(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class wy{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class T0{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const xh=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class ho{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=ho._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(ho.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(ho.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(ho.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(ho.isVariableCharacter(i)||ho.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof ho._table[i]>"u"&&!ho.isDigitCharacter(i)&&!ho.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}ho._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class tf{constructor(){this._children=[]}appendChild(e){return e instanceof Bn&&this._children[this._children.length-1]instanceof Bn?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function r(a,l){for(const c of a)c.parent=l,r(c.children,c)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof O_)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Bn extends tf{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Bn(this.value)}}class W7 extends tf{}class go extends W7{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof nf?this._children[0]:void 0}clone(){const e=new go(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class nf extends tf{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Bn&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new nf;return this.options.forEach(e.appendChild,e),e}}class GN extends tf{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof Mo&&Boolean(s.elseValue))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Mo){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new GN;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Mo extends tf{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(e)&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Mo(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Fm extends W7{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Bn(t)],!0):!1}clone(){const e=new Fm(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function yR(o,e){const t=[...o];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class O_ extends tf{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof go&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return yR([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof go&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Fm&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new O_;return this._children=this.children.map(t=>t.clone()),e}walk(e){yR(this.children,e)}}class _c{constructor(){this._scanner=new ho,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new O_;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i!=null?i:!1,t!=null?t:!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(r=>(r instanceof go&&(r.isFinalTabstop?n.set(0,void 0):!n.has(r.index)&&r.children.length>0?n.set(r.index,r.children):s.push(r)),!0));for(const r of s){const a=n.get(r.index);if(a){const l=new go(r.index);l.transform=r.transform;for(const c of a)l.appendChild(c.clone());t.replace(r,[l])}}return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new go(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Bn(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new go(Number(t)):new Fm(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new go(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Bn("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new nf;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Bn(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new Fm(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Bn("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new GN;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new Bn(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Mo(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Mo(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Mo(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new Mo(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new Mo(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new Mo(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new Mo(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Bn(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const pse=p("defaultLabel","input"),mse=p("label.preserveCaseToggle","Preserve Case");class _se extends y_{constructor(e){super({icon:m.preserveCase,title:mse+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class bse extends yo{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new R),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new R),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new R),this._onInput=this._register(new R),this._onKeyUp=this._register(new R),this._onPreserveCaseKeyDown=this._register(new R),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||pse,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendPreserveCaseLabel||"",r=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y5(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c})),this.preserveCase=this._register(new _se({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(u=>{this._onPreserveCaseKeyDown.fire(u)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const d=[this.preserveCase.domNode];this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){const g=d.indexOf(document.activeElement);if(g>=0){let f=-1;u.equals(17)?f=(g+1)%d.length:u.equals(15)&&(g===0?f=d.length-1:f=g-1),u.equals(9)?(d[g].blur(),this.inputBox.focus()):f>=0&&d[f].focus(),ut.stop(u,!0)}}});const h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var V7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},H7=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const ZN=new le("suggestWidgetVisible",!1,p("suggestWidgetVisible","Whether suggestion are visible")),YN="historyNavigationWidgetFocus",z7="historyNavigationForwardsEnabled",U7="historyNavigationBackwardsEnabled";let Ld;const Ub=[];function $7(o,e){if(Ub.includes(e))throw new Error("Cannot register the same widget multiple times");Ub.push(e);const t=new Q,i=t.add(o.createScoped(e.element)),n=new le(YN,!1).bindTo(i),s=new le(z7,!0).bindTo(i),r=new le(U7,!0).bindTo(i),a=()=>{n.set(!0),Ld=e},l=()=>{n.set(!1),Ld===e&&(Ld=void 0)};return e.element===document.activeElement&&a(),t.add(e.onDidFocus(()=>a())),t.add(e.onDidBlur(()=>l())),t.add(Be(()=>{Ub.splice(Ub.indexOf(e),1),l()})),{scopedContextKeyService:i,historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:r,dispose(){t.dispose()}}}let rx=class extends AX{constructor(e,t,i,n,s=!1){super(e,t,s,i),this._register($7(n,this.inputBox))}};rx=V7([H7(3,Ee)],rx);let ax=class extends bse{constructor(e,t,i,n,s=!1){super(e,t,s,i),this._register($7(n,this.inputBox))}};ax=V7([H7(3,Ee)],ax);as.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:se.and(se.has(YN),se.equals(U7,!0),ZN.isEqualTo(!1)),primary:16,secondary:[528],handler:o=>{Ld&&Ld.showPreviousValue()}});as.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:se.and(se.has(YN),se.equals(z7,!0),ZN.isEqualTo(!1)),primary:18,secondary:[530],handler:o=>{Ld&&Ld.showNextValue()}});var Ep=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Ke={Visible:ZN,HasFocusedSuggestion:new le("suggestWidgetHasFocusedSuggestion",!1,p("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new le("suggestWidgetDetailsVisible",!1,p("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new le("suggestWidgetMultipleSuggestions",!1,p("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new le("suggestionMakesTextEdit",!0,p("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new le("acceptSuggestionOnEnter",!0,p("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new le("suggestionHasInsertAndReplaceRange",!1,p("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new le("suggestionInsertMode",void 0,{type:"string",description:p("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new le("suggestionCanResolve",!1,p("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ql=new M("suggestWidgetStatusBar");class vse{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=Zo.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,L.isIRange(t.range)?(this.editStart=new B(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new B(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new B(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||L.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new B(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new B(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new B(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||L.spansMultipleLines(t.range.insert)||L.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return Ep(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{ea(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class Bm{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}Bm.default=new Bm;let Cse;function wse(){return Cse}class Sse{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function QN(o,e,t,i=Bm.default,n={triggerKind:0},s=ze.None){return Ep(this,void 0,void 0,function*(){const r=new $n(!0);t=t.clone();const a=e.getWordAtPosition(t),l=a?new L(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):L.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],h=new Q,u=[];let g=!1;const f=(b,v,C)=>{var w,S,k;let x=!1;if(!v)return x;for(const y of v.suggestions)if(!i.kindFilter.has(y.kind)){if(!i.showDeprecated&&((w=y==null?void 0:y.tags)===null||w===void 0?void 0:w.includes(1)))continue;y.range||(y.range=c),y.sortText||(y.sortText=typeof y.label=="string"?y.label:y.label.label),!g&&y.insertTextRules&&y.insertTextRules&4&&(g=_c.guessNeedsClipboard(y.insertText)),d.push(new vse(t,y,v,b)),x=!0}return hI(v)&&h.add(v),u.push({providerName:(S=b._debugDisplayName)!==null&&S!==void 0?S:"unknown_provider",elapsedProvider:(k=v.duration)!==null&&k!==void 0?k:-1,elapsedOverall:C.elapsed()}),x},_=(()=>Ep(this,void 0,void 0,function*(){}))();for(const b of o.orderedGroups(e)){let v=!1;if(yield Promise.all(b.map(C=>Ep(this,void 0,void 0,function*(){if(!(i.providerFilter.size>0&&!i.providerFilter.has(C)))try{const w=new $n(!0),S=yield C.provideCompletionItems(e,t,n,s);v=f(C,S,w)||v}catch(w){Pi(w)}}))),v||s.isCancellationRequested)break}return yield _,s.isCancellationRequested?(h.dispose(),Promise.reject(new yc)):new Sse(d.sort(j7(i.snippetSortOrder)),g,{entries:u,elapsed:r.elapsed()},h)})}function XN(o,e){if(o.sortTextLow&&e.sortTextLow){if(o.sortTextLowe.sortTextLow)return 1}return o.textLabele.textLabel?1:o.completion.kind-e.completion.kind}function yse(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return XN(o,e)}function Lse(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return XN(o,e)}const lw=new Map;lw.set(0,yse);lw.set(2,Lse);lw.set(1,XN);function j7(o){return lw.get(o)}Xe.registerCommand("_executeCompletionItemProvider",(o,...e)=>Ep(void 0,void 0,void 0,function*(){const[t,i,n,s]=e;pt(_e.isUri(t)),pt(B.isIPosition(i)),pt(typeof n=="string"||!n),pt(typeof s=="number"||!s);const{completionProvider:r}=o.get(de),a=yield o.get(Kn).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},c=[],d=yield QN(r,a.object.textEditorModel,B.lift(i),void 0,{triggerCharacter:n,triggerKind:n?1:0});for(const h of d.items)c.length<(s!=null?s:0)&&c.push(h.resolve(ze.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}}));function Dse(o,e){var t;(t=o.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class ku{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var JN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pC=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const LR=J;let mC=class lx extends H{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(Dd,this._editor)),this._isChangingDecorations=!1,this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const n of xh.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new _C(this._editor,this._participants),this._hoverOperation=this._register(new B7(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value,n.isComplete,n.hasLoadingMessage)})),this._register(this._editor.onDidChangeModelDecorations(()=>{this._isChangingDecorations||this._onModelDecorationsChanged()})),this._register(ki(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(Wt.onDidChange(()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))}))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new wy(0,i.range)),i.type===7){const n=this._editor.getOption(46).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexts.priority-n.priority),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new wy(0,e),t,i)}_startShowingAt(e,t,i){if(!(this._computer.anchor&&this._computer.anchor.equals(e))){if(this._hoverOperation.cancel(),this._widget.position)if(!this._computer.anchor||!e.canAdoptVisibleHover(this._computer.anchor,this._widget.position))this.hide();else{const n=this._messages.filter(s=>s.isValidForHoverAnchor(e));if(n.length===0)this.hide();else{if(n.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,n)}}this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}return e}_withResult(e,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(e,t){const{showAtPosition:i,showAtRange:n,highlightRange:s}=lx.computeHoverRanges(e.range,t),r=new Q,a=r.add(new cx(this._keybindingService)),l=document.createDocumentFragment();let c=null;const d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const h of this._participants){const u=t.filter(g=>g.owner===h);u.length>0&&r.add(h.renderHoverParts(d,u))}if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const h=this._editor.createDecorationsCollection();try{this._isChangingDecorations=!0,h.set([{range:s,options:lx._DECORATION_OPTIONS}])}finally{this._isChangingDecorations=!1}r.add(Be(()=>{try{this._isChangingDecorations=!0,h.clear()}finally{this._isChangingDecorations=!1}}))}this._widget.showAt(l,new kse(c,i,n,this._editor.getOption(55).above,this._computer.shouldFocus,r))}else r.dispose()}static computeHoverRanges(e,t){const i=e.startLineNumber;let n=e.startColumn,s=e.endColumn,r=t[0].range,a=null;for(const l of t)r=L.plusRange(r,l.range),l.range.startLineNumber===i&&l.range.endLineNumber===i&&(n=Math.min(n,l.range.startColumn),s=Math.max(s,l.range.endColumn)),l.forceShowAtRange&&(a=l.range);return{showAtPosition:a?a.getStartPosition():new B(e.startLineNumber,n),showAtRange:a||new L(i,n,i,s),highlightRange:r}}};mC._DECORATION_OPTIONS=Ne.register({description:"content-hover-highlight",className:"hoverHighlight"});mC=JN([pC(1,Ae),pC(2,_i)],mC);class kse{constructor(e,t,i,n,s,r){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=n,this.stoleFocus=s,this.disposables=r}}let Dd=class K7 extends H{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=N.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new F7),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(46)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return Boolean((e=this._visibleData)===null||e===void 0?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return K7.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(Ke.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(46);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const i=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==i&&(this._hover.contentsDomNode.style.paddingBottom=i,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};Dd.ID="editor.contrib.contentHoverWidget";Dd=JN([pC(1,Ee)],Dd);let cx=class extends H{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=LR("div.hover-row.status-bar"),this.actionsElement=q(this.hoverElement,LR("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(qN.render(this.actionsElement,e,i))}append(e){const t=q(this.actionsElement,e);return this._hasContent=!0,t}};cx=JN([pC(0,_i)],cx);class _C{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(t.type!==1)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ri.EMPTY;const i=_C._getLineDecorations(this._editor,t);return ri.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):ri.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=_C._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return i_(t)}}let q7={};(function(){function o(e,t){t(q7)}o.amd=!0,function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof o=="function"&&o.amd?o(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))}(this,function(e){function t(Z,U){for(var $=0;$Z.length)&&(U=Z.length);for(var $=0,E=new Array(U);$=Z.length?{done:!0}:{done:!1,value:Z[E++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=a();function l(Z){e.defaults=Z}var c=/[&<>"']/,d=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,g={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(U){return g[U]};function _(Z,U){if(U){if(c.test(Z))return Z.replace(d,f)}else if(h.test(Z))return Z.replace(u,f);return Z}var b=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(Z){return Z.replace(b,function(U,$){return $=$.toLowerCase(),$==="colon"?":":$.charAt(0)==="#"?$.charAt(1)==="x"?String.fromCharCode(parseInt($.substring(2),16)):String.fromCharCode(+$.substring(1)):""})}var C=/(^|[^\[])\^/g;function w(Z,U){Z=typeof Z=="string"?Z:Z.source,U=U||"";var $={replace:function(A,V){return V=V.source||V,V=V.replace(C,"$1"),Z=Z.replace(A,V),$},getRegex:function(){return new RegExp(Z,U)}};return $}var S=/[^\w:]/g,k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(Z,U,$){if(Z){var E;try{E=decodeURIComponent(v($)).replace(S,"").toLowerCase()}catch{return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}U&&!k.test($)&&($=F(U,$));try{$=encodeURI($).replace(/%25/g,"%")}catch{return null}return $}var y={},D=/^[^:]+:\/*[^/]*$/,I=/^([^:]+:)[\s\S]*$/,O=/^([^:]+:\/*[^/]*)[\s\S]*$/;function F(Z,U){y[" "+Z]||(D.test(Z)?y[" "+Z]=Z+"/":y[" "+Z]=he(Z,"/",!0)),Z=y[" "+Z];var $=Z.indexOf(":")===-1;return U.substring(0,2)==="//"?$?U:Z.replace(I,"$1")+U:U.charAt(0)==="/"?$?U:Z.replace(O,"$1")+U:Z+U}var z={exec:function(){}};function j(Z){for(var U=1,$,E;U=0&&Y[De]==="\\";)ne=!ne;return ne?"|":" |"}),E=$.split(/ \|/),A=0;if(E[0].trim()||E.shift(),E.length>0&&!E[E.length-1].trim()&&E.pop(),E.length>U)E.splice(U);else for(;E.length1;)U&1&&($+=Z),U>>=1,Z+=Z;return $+Z}function He(Z,U,$,E){var A=U.href,V=U.title?_(U.title):null,P=Z[1].replace(/\\([\[\]])/g,"$1");if(Z[0].charAt(0)!=="!"){E.state.inLink=!0;var Y={type:"link",raw:$,href:A,title:V,text:P,tokens:E.inlineTokens(P,[])};return E.state.inLink=!1,Y}return{type:"image",raw:$,href:A,title:V,text:_(P)}}function Mt(Z,U){var $=Z.match(/^(\s+)(?:```)/);if($===null)return U;var E=$[1];return U.split(` `).map(function(A){var V=A.match(/^\s+/);if(V===null)return A;var P=V[0];return P.length>=E.length?A.slice(E.length):A}).join(` `)}var yt=function(){function Z($){this.options=$||e.defaults}var U=Z.prototype;return U.space=function(E){var A=this.rules.block.newline.exec(E);if(A&&A[0].length>0)return{type:"space",raw:A[0]}},U.code=function(E){var A=this.rules.block.code.exec(E);if(A){var V=A[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:A[0],codeBlockStyle:"indented",text:this.options.pedantic?V:he(V,` @@ -688,7 +688,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)},U.strong=function(E){return""+E+""},U.em=function(E){return""+E+""},U.codespan=function(E){return""+E+""},U.br=function(){return this.options.xhtml?"
":"
"},U.del=function(E){return""+E+""},U.link=function(E,A,V){if(E=x(this.options.sanitize,this.options.baseUrl,E),E===null)return V;var P='
",P},U.image=function(E,A,V){if(E=x(this.options.sanitize,this.options.baseUrl,E),E===null)return V;var P=''+V+'":">",P},U.text=function(E){return E},Z}(),oa=function(){function Z(){}var U=Z.prototype;return U.strong=function(E){return E},U.em=function(E){return E},U.codespan=function(E){return E},U.del=function(E){return E},U.html=function(E){return E},U.text=function(E){return E},U.link=function(E,A,V){return""+V},U.image=function(E,A,V){return""+V},U.br=function(){return""},Z}(),xo=function(){function Z(){this.seen={}}var U=Z.prototype;return U.serialize=function(E){return E.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},U.getNextSafeSlug=function(E,A){var V=E,P=0;if(this.seen.hasOwnProperty(V)){P=this.seen[E];do P++,V=E+"-"+P;while(this.seen.hasOwnProperty(V))}return A||(this.seen[E]=P,this.seen[V]=0),V},U.slug=function(E,A){A===void 0&&(A={});var V=this.serialize(E);return this.getNextSafeSlug(V,A.dryrun)},Z}(),cr=function(){function Z($){this.options=$||e.defaults,this.options.renderer=this.options.renderer||new ko,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new oa,this.slugger=new xo}Z.parse=function(E,A){var V=new Z(A);return V.parse(E)},Z.parseInline=function(E,A){var V=new Z(A);return V.parseInline(E)};var U=Z.prototype;return U.parse=function(E,A){A===void 0&&(A=!0);var V="",P,Y,ne,De,Ce,Ve,Fe,wt,dt,ke,bi,Jt,Ns,jt,Bi,Rc,cs,dr,ra,Oc=E.length;for(P=0;P0&&Bi.tokens[0].type==="paragraph"?(Bi.tokens[0].text=dr+" "+Bi.tokens[0].text,Bi.tokens[0].tokens&&Bi.tokens[0].tokens.length>0&&Bi.tokens[0].tokens[0].type==="text"&&(Bi.tokens[0].tokens[0].text=dr+" "+Bi.tokens[0].tokens[0].text)):Bi.tokens.unshift({type:"text",text:dr}):jt+=dr),jt+=this.parse(Bi.tokens,Ns),dt+=this.renderer.listitem(jt,cs,Rc);V+=this.renderer.list(dt,bi,Jt);continue}case"html":{V+=this.renderer.html(ke.text);continue}case"paragraph":{V+=this.renderer.paragraph(this.parseInline(ke.tokens));continue}case"text":{for(dt=ke.tokens?this.parseInline(ke.tokens):ke.text;P+1"u"||Z===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Z!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Z)+", string expected");if(typeof U=="function"&&($=U,U=null),U=j({},Pe.defaults,U||{}),ye(U),$){var E=U.highlight,A;try{A=In.lex(Z,U)}catch(ne){return $(ne)}var V=function(De){var Ce;if(!De)try{U.walkTokens&&Pe.walkTokens(A,U.walkTokens),Ce=cr.parse(A,U)}catch(Ve){De=Ve}return U.highlight=E,De?$(De):$(null,Ce)};if(!E||E.length<3||(delete U.highlight,!A.length))return V();var P=0;Pe.walkTokens(A,function(ne){ne.type==="code"&&(P++,setTimeout(function(){E(ne.text,ne.lang,function(De,Ce){if(De)return V(De);Ce!=null&&Ce!==ne.text&&(ne.text=Ce,ne.escaped=!0),P--,P===0&&V()})},0))}),P===0&&V();return}try{var Y=In.lex(Z,U);return U.walkTokens&&Pe.walkTokens(Y,U.walkTokens),cr.parse(Y,U)}catch(ne){if(ne.message+=` Please report this to https://github.com/markedjs/marked.`,U.silent)return"

An error occurred:

"+_(ne.message+"",!0)+"
";throw ne}}Pe.options=Pe.setOptions=function(Z){return j(Pe.defaults,Z),l(Pe.defaults),Pe},Pe.getDefaults=a,Pe.defaults=e.defaults,Pe.use=function(){for(var Z=arguments.length,U=new Array(Z),$=0;$"u"||Z===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Z!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Z)+", string expected");U=j({},Pe.defaults,U||{}),ye(U);try{var $=In.lexInline(Z,U);return U.walkTokens&&Pe.walkTokens($,U.walkTokens),cr.parseInline($,U)}catch(E){if(E.message+=` -Please report this to https://github.com/markedjs/marked.`,U.silent)return"

An error occurred:

"+_(E.message+"",!0)+"
";throw E}},Pe.Parser=cr,Pe.parser=cr.parse,Pe.Renderer=ko,Pe.TextRenderer=oa,Pe.Lexer=In,Pe.lexer=In.lex,Pe.Tokenizer=yt,Pe.Slugger=xo,Pe.parse=Pe;var hl=Pe.options,df=Pe.setOptions,hf=Pe.use,ul=Pe.walkTokens,Ih=Pe.parseInline,U_=Pe,Eh=cr.parse,$_=In.lex;e.Lexer=In,e.Parser=cr,e.Renderer=ko,e.Slugger=xo,e.TextRenderer=oa,e.Tokenizer=yt,e.getDefaults=a,e.lexer=$_,e.marked=Pe,e.options=hl,e.parse=U_,e.parseInline=Ih,e.parser=Eh,e.setOptions=df,e.use=hf,e.walkTokens=ul,Object.defineProperty(e,"__esModule",{value:!0})})})();var DR=q7||exports;function xse(o,e={},t={}){var i;const n=new Q;let s=!1;const r=sN(e),a=function(_){let b;try{b=Qv(decodeURIComponent(_))}catch{}return b?(b=qO(b,v=>{if(o.uris&&o.uris[v])return _e.revive(o.uris[v])}),encodeURIComponent(JSON.stringify(b))):_},l=function(_,b){const v=o.uris&&o.uris[_];let C=_e.revive(v);return b?_.startsWith(Me.data+":")?_:(C||(C=_e.parse(_)),e4.asBrowserUri(C).toString(!0)):!C||_e.parse(_).toString()===C.toString()?_:(C.query&&(C=C.with({query:a(C.query)})),C.toString())},c=new DR.Renderer;c.image=(_,b,v)=>{let C=[],w=[];return _&&({href:_,dimensions:C}=TZ(_),w.push(`src="${kb(_)}"`)),v&&w.push(`alt="${kb(v)}"`),b&&w.push(`title="${kb(b)}"`),C.length&&(w=w.concat(C)),""},c.link=(_,b,v)=>typeof _!="string"?"":(_===v&&(v=MS(v)),b=typeof b=="string"?kb(MS(b)):"",_=MS(_),_=_.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
${v}`),c.paragraph=_=>`

${_}

`;const d=[];if(e.codeBlockRenderer&&(c.code=(_,b)=>{const v=vF.nextId(),C=e.codeBlockRenderer(b!=null?b:"",_);return d.push(C.then(w=>[v,w])),`
${_I(_)}
`}),e.actionHandler){const _=e.actionHandler.disposables.add(new bt(r,"click")),b=e.actionHandler.disposables.add(new bt(r,"auxclick"));e.actionHandler.disposables.add(ge.any(_.event,b.event)(v=>{const C=new Mr(v);if(!C.leftButton&&!C.middleButton)return;let w=C.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let S=w.dataset.href;S&&(o.baseUri&&(S=Sy(_e.from(o.baseUri),S)),e.actionHandler.callback(S,C))}catch(S){Te(S)}finally{C.preventDefault()}}))}o.supportHtml||(t.sanitizer=_=>(o.isTrusted?_.match(/^(]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let h=(i=o.value)!==null&&i!==void 0?i:"";h.length>1e5&&(h=`${h.substr(0,1e5)}\u2026`),o.supportThemeIcons&&(h=xZ(h));let u=DR.parse(h,t);o.supportThemeIcons&&(u=wd(u).map(b=>typeof b=="string"?b:b.outerHTML).join(""));const f=new DOMParser().parseFromString(kR(o,u),"text/html");if(f.body.querySelectorAll("img").forEach(_=>{const b=_.getAttribute("src");if(b){let v=b;try{o.baseUri&&(v=Sy(_e.from(o.baseUri),v))}catch{}_.src=l(v,!0)}}),f.body.querySelectorAll("a").forEach(_=>{const b=_.getAttribute("href");if(_.setAttribute("href",""),!b||/^data:|javascript:/i.test(b)||/^command:/i.test(b)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(b))_.replaceWith(..._.childNodes);else{let v=l(b,!1);o.baseUri&&(v=Sy(_e.from(o.baseUri),b)),_.dataset.href=v}}),r.innerHTML=kR(o,f.body.innerHTML),d.length>0&&Promise.all(d).then(_=>{var b,v;if(s)return;const C=new Map(_),w=r.querySelectorAll("div[data-code]");for(const S of w){const k=C.get((b=S.dataset.code)!==null&&b!==void 0?b:"");k&&oc(S,k)}(v=e.asyncRenderCallback)===null||v===void 0||v.call(e)}),e.asyncRenderCallback)for(const _ of r.getElementsByTagName("img")){const b=n.add(G(_,"load",()=>{b.dispose(),e.asyncRenderCallback()}))}return{element:r,dispose:()=>{s=!0,n.dispose()}}}function Sy(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?fA(o,e).toString():fA(L1(o),e).toString()}function kR(o,e){const{config:t,allowedSchemes:i}=Ise(o);QP("uponSanitizeAttribute",(s,r)=>{if(r.attrName==="style"||r.attrName==="class"){if(s.tagName==="SPAN"){if(r.attrName==="style"){r.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(r.attrValue);return}else if(r.attrName==="class"){r.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(r.attrValue);return}}r.keepAttr=!1;return}});const n=tz(i);try{return BH(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{XP("uponSanitizeAttribute"),n.dispose()}}function Ise(o){const e=[Me.http,Me.https,Me.mailto,Me.data,Me.file,Me.vscodeFileResource,Me.vscodeRemote,Me.vscodeRemoteResource];return o.isTrusted&&e.push(Me.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}var Ese=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xR=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Nse=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},yy;let ol=class G7{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new R,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new Q;return{element:n.add(xse(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i)).element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,n)=>Nse(this,void 0,void 0,function*(){var s,r,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageId()),l||(l=Ks);const c=yield fG(this._languageService,n,l),d=document.createElement("span");if(d.innerHTML=(a=(r=G7._ttpTokenizer)===null||r===void 0?void 0:r.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){const h=this._options.editor.getOption(46);an(d,h)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>this._openerService.open(i,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:e.isTrusted}).catch(Te),disposables:t}}}};ol._ttpTokenizer=(yy=window.trustedTypes)===null||yy===void 0?void 0:yy.createPolicy("tokenizeToString",{createHTML(o){return o}});ol=Ese([xR(1,Ht),xR(2,io)],ol);const IR=J;class Zu extends H{constructor(e,t,i=dY){super(),this._renderDisposeables=this._register(new Q),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new F7),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new ol({editor:this._editor},t,i)),this._computer=new Tse(this._editor),this._hoverOperation=this._register(new B7(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(46)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Zu.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=IR("div.hover-row.markdown-hover"),r=q(s,IR("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(61),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Zu.ID="editor.contrib.modesGlyphHoverWidget";class Tse{constructor(e){this._editor=e,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||_g(s)||i.push(...lI(s).map(e))}return i}}var Ase=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Mse{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Rse(o,e,t,i,n){return Ase(this,void 0,void 0,function*(){try{const s=yield Promise.resolve(o.provideHover(t,i,n));if(s&&Pse(s))return new Mse(o,s,e)}catch(s){Pi(s)}})}function eT(o,e,t,i){const s=o.ordered(e).map((r,a)=>Rse(r,a,e,t,i));return ri.fromPromises(s).coalesce()}function Ose(o,e,t,i){return eT(o,e,t,i).map(n=>n.hover).toPromise()}ia("_executeHoverProvider",(o,e,t)=>{const i=o.get(de);return Ose(i.hoverProvider,e,t,ze.None)});function Pse(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var Fse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$b=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const ER=J;class Tr{constructor(e,t,i,n){this.owner=e,this.range=t,this.contents=i,this.ordinal=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let bC=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=2}createLoadingMessage(e){return new Tr(this,e.range,[new Fn().appendText(p("modesContentHover.loading","Loading..."))],2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),c=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c});typeof d=="number"&&l>=d&&r.push(new Tr(this,e.range,[{value:p("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],a++));for(const h of t){const u=h.range.startLineNumber===n?h.range.startColumn:1,g=h.range.endLineNumber===n?h.range.endColumn:s,f=h.options.hoverMessage;if(!f||_g(f))continue;const _=new L(e.range.startLineNumber,u,e.range.startLineNumber,g);r.push(new Tr(this,_,lI(f),a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return ri.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return ri.EMPTY;const s=new B(e.range.startLineNumber,e.range.startColumn);return eT(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!_g(r.hover.contents)).map(r=>{const a=r.hover.range?L.lift(r.hover.range):e.range;return new Tr(this,a,r.hover.contents,r.ordinal)})}renderHoverParts(e,t){return Z7(e,t,this._editor,this._languageService,this._openerService)}};bC=Fse([$b(1,Ht),$b(2,io),$b(3,ot),$b(4,de)],bC);function Z7(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new Q;for(const r of e)for(const a of r.contents){if(_g(a))continue;const l=ER("div.hover-row.markdown-hover"),c=q(l,ER("div.hover-contents")),d=s.add(new ol({editor:t},i,n));s.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",o.onContentsChanged()}));const h=s.add(d.render(a));c.appendChild(h.element),o.fragment.appendChild(l)}return s}var Y7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vC=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class NR{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let dx=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._dispoables=new Q,this._markers=[],this._nextIdx=-1,_e.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let c=Bp(a.resource.toString(),l.resource.toString());return c===0&&(n==="position"?c=L.compareRangesUsingStarts(a,l)||Vt.compare(a.severity,l.severity):c=Vt.compare(a.severity,l.severity)||L.compareRangesUsingStarts(a,l)),c},r=()=>{this._markers=this._markerService.read({resource:_e.isUri(e)?e:void 0,severities:Vt.Error|Vt.Warning|Vt.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new NR(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=aI(this._markers,{resource:e.uri},(r,a)=>Bp(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;rn.resource.toString()===e.toString());if(!(i<0)){for(;i{const t=o.getColor(GU);if(t){const s=m.error.cssSelector;e.addRule(` +Please report this to https://github.com/markedjs/marked.`,U.silent)return"

An error occurred:

"+_(E.message+"",!0)+"
";throw E}},Pe.Parser=cr,Pe.parser=cr.parse,Pe.Renderer=ko,Pe.TextRenderer=oa,Pe.Lexer=In,Pe.lexer=In.lex,Pe.Tokenizer=yt,Pe.Slugger=xo,Pe.parse=Pe;var hl=Pe.options,df=Pe.setOptions,hf=Pe.use,ul=Pe.walkTokens,Ih=Pe.parseInline,U_=Pe,Eh=cr.parse,$_=In.lex;e.Lexer=In,e.Parser=cr,e.Renderer=ko,e.Slugger=xo,e.TextRenderer=oa,e.Tokenizer=yt,e.getDefaults=a,e.lexer=$_,e.marked=Pe,e.options=hl,e.parse=U_,e.parseInline=Ih,e.parser=Eh,e.setOptions=df,e.use=hf,e.walkTokens=ul,Object.defineProperty(e,"__esModule",{value:!0})})})();var DR=q7||exports;function xse(o,e={},t={}){var i;const n=new Q;let s=!1;const r=sN(e),a=function(_){let b;try{b=Qv(decodeURIComponent(_))}catch{}return b?(b=qO(b,v=>{if(o.uris&&o.uris[v])return _e.revive(o.uris[v])}),encodeURIComponent(JSON.stringify(b))):_},l=function(_,b){const v=o.uris&&o.uris[_];let C=_e.revive(v);return b?_.startsWith(Me.data+":")?_:(C||(C=_e.parse(_)),e4.asBrowserUri(C).toString(!0)):!C||_e.parse(_).toString()===C.toString()?_:(C.query&&(C=C.with({query:a(C.query)})),C.toString())},c=new DR.Renderer;c.image=(_,b,v)=>{let C=[],w=[];return _&&({href:_,dimensions:C}=TZ(_),w.push(`src="${kb(_)}"`)),v&&w.push(`alt="${kb(v)}"`),b&&w.push(`title="${kb(b)}"`),C.length&&(w=w.concat(C)),""},c.link=(_,b,v)=>typeof _!="string"?"":(_===v&&(v=MS(v)),b=typeof b=="string"?kb(MS(b)):"",_=MS(_),_=_.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`${v}`),c.paragraph=_=>`

${_}

`;const d=[];if(e.codeBlockRenderer&&(c.code=(_,b)=>{const v=v5.nextId(),C=e.codeBlockRenderer(b!=null?b:"",_);return d.push(C.then(w=>[v,w])),`
${_I(_)}
`}),e.actionHandler){const _=e.actionHandler.disposables.add(new bt(r,"click")),b=e.actionHandler.disposables.add(new bt(r,"auxclick"));e.actionHandler.disposables.add(ge.any(_.event,b.event)(v=>{const C=new Mr(v);if(!C.leftButton&&!C.middleButton)return;let w=C.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let S=w.dataset.href;S&&(o.baseUri&&(S=Sy(_e.from(o.baseUri),S)),e.actionHandler.callback(S,C))}catch(S){Te(S)}finally{C.preventDefault()}}))}o.supportHtml||(t.sanitizer=_=>(o.isTrusted?_.match(/^(]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let h=(i=o.value)!==null&&i!==void 0?i:"";h.length>1e5&&(h=`${h.substr(0,1e5)}\u2026`),o.supportThemeIcons&&(h=xZ(h));let u=DR.parse(h,t);o.supportThemeIcons&&(u=wd(u).map(b=>typeof b=="string"?b:b.outerHTML).join(""));const f=new DOMParser().parseFromString(kR(o,u),"text/html");if(f.body.querySelectorAll("img").forEach(_=>{const b=_.getAttribute("src");if(b){let v=b;try{o.baseUri&&(v=Sy(_e.from(o.baseUri),v))}catch{}_.src=l(v,!0)}}),f.body.querySelectorAll("a").forEach(_=>{const b=_.getAttribute("href");if(_.setAttribute("href",""),!b||/^data:|javascript:/i.test(b)||/^command:/i.test(b)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(b))_.replaceWith(..._.childNodes);else{let v=l(b,!1);o.baseUri&&(v=Sy(_e.from(o.baseUri),b)),_.dataset.href=v}}),r.innerHTML=kR(o,f.body.innerHTML),d.length>0&&Promise.all(d).then(_=>{var b,v;if(s)return;const C=new Map(_),w=r.querySelectorAll("div[data-code]");for(const S of w){const k=C.get((b=S.dataset.code)!==null&&b!==void 0?b:"");k&&oc(S,k)}(v=e.asyncRenderCallback)===null||v===void 0||v.call(e)}),e.asyncRenderCallback)for(const _ of r.getElementsByTagName("img")){const b=n.add(G(_,"load",()=>{b.dispose(),e.asyncRenderCallback()}))}return{element:r,dispose:()=>{s=!0,n.dispose()}}}function Sy(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?fA(o,e).toString():fA(L1(o),e).toString()}function kR(o,e){const{config:t,allowedSchemes:i}=Ise(o);QP("uponSanitizeAttribute",(s,r)=>{if(r.attrName==="style"||r.attrName==="class"){if(s.tagName==="SPAN"){if(r.attrName==="style"){r.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(r.attrValue);return}else if(r.attrName==="class"){r.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(r.attrValue);return}}r.keepAttr=!1;return}});const n=tz(i);try{return BH(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{XP("uponSanitizeAttribute"),n.dispose()}}function Ise(o){const e=[Me.http,Me.https,Me.mailto,Me.data,Me.file,Me.vscodeFileResource,Me.vscodeRemote,Me.vscodeRemoteResource];return o.isTrusted&&e.push(Me.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}var Ese=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xR=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Nse=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},yy;let ol=class G7{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new R,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new Q;return{element:n.add(xse(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i)).element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,n)=>Nse(this,void 0,void 0,function*(){var s,r,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageId()),l||(l=Ks);const c=yield fG(this._languageService,n,l),d=document.createElement("span");if(d.innerHTML=(a=(r=G7._ttpTokenizer)===null||r===void 0?void 0:r.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){const h=this._options.editor.getOption(46);an(d,h)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>this._openerService.open(i,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:e.isTrusted}).catch(Te),disposables:t}}}};ol._ttpTokenizer=(yy=window.trustedTypes)===null||yy===void 0?void 0:yy.createPolicy("tokenizeToString",{createHTML(o){return o}});ol=Ese([xR(1,Ht),xR(2,io)],ol);const IR=J;class Zu extends H{constructor(e,t,i=dY){super(),this._renderDisposeables=this._register(new Q),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new F7),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new ol({editor:this._editor},t,i)),this._computer=new Tse(this._editor),this._hoverOperation=this._register(new B7(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(46)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Zu.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=IR("div.hover-row.markdown-hover"),r=q(s,IR("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(61),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Zu.ID="editor.contrib.modesGlyphHoverWidget";class Tse{constructor(e){this._editor=e,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||_g(s)||i.push(...lI(s).map(e))}return i}}var Ase=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Mse{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Rse(o,e,t,i,n){return Ase(this,void 0,void 0,function*(){try{const s=yield Promise.resolve(o.provideHover(t,i,n));if(s&&Pse(s))return new Mse(o,s,e)}catch(s){Pi(s)}})}function eT(o,e,t,i){const s=o.ordered(e).map((r,a)=>Rse(r,a,e,t,i));return ri.fromPromises(s).coalesce()}function Ose(o,e,t,i){return eT(o,e,t,i).map(n=>n.hover).toPromise()}ia("_executeHoverProvider",(o,e,t)=>{const i=o.get(de);return Ose(i.hoverProvider,e,t,ze.None)});function Pse(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var Fse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$b=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const ER=J;class Tr{constructor(e,t,i,n){this.owner=e,this.range=t,this.contents=i,this.ordinal=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let bC=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=2}createLoadingMessage(e){return new Tr(this,e.range,[new Fn().appendText(p("modesContentHover.loading","Loading..."))],2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),c=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c});typeof d=="number"&&l>=d&&r.push(new Tr(this,e.range,[{value:p("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],a++));for(const h of t){const u=h.range.startLineNumber===n?h.range.startColumn:1,g=h.range.endLineNumber===n?h.range.endColumn:s,f=h.options.hoverMessage;if(!f||_g(f))continue;const _=new L(e.range.startLineNumber,u,e.range.startLineNumber,g);r.push(new Tr(this,_,lI(f),a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return ri.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return ri.EMPTY;const s=new B(e.range.startLineNumber,e.range.startColumn);return eT(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!_g(r.hover.contents)).map(r=>{const a=r.hover.range?L.lift(r.hover.range):e.range;return new Tr(this,a,r.hover.contents,r.ordinal)})}renderHoverParts(e,t){return Z7(e,t,this._editor,this._languageService,this._openerService)}};bC=Fse([$b(1,Ht),$b(2,io),$b(3,ot),$b(4,de)],bC);function Z7(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new Q;for(const r of e)for(const a of r.contents){if(_g(a))continue;const l=ER("div.hover-row.markdown-hover"),c=q(l,ER("div.hover-contents")),d=s.add(new ol({editor:t},i,n));s.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",o.onContentsChanged()}));const h=s.add(d.render(a));c.appendChild(h.element),o.fragment.appendChild(l)}return s}var Y7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vC=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class NR{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let dx=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new R,this.onDidChange=this._onDidChange.event,this._dispoables=new Q,this._markers=[],this._nextIdx=-1,_e.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let c=Bp(a.resource.toString(),l.resource.toString());return c===0&&(n==="position"?c=L.compareRangesUsingStarts(a,l)||Vt.compare(a.severity,l.severity):c=Vt.compare(a.severity,l.severity)||L.compareRangesUsingStarts(a,l)),c},r=()=>{this._markers=this._markerService.read({resource:_e.isUri(e)?e:void 0,severities:Vt.Error|Vt.Warning|Vt.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new NR(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=aI(this._markers,{resource:e.uri},(r,a)=>Bp(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;rn.resource.toString()===e.toString());if(!(i<0)){for(;i{const t=o.getColor(GU);if(t){const s=m.error.cssSelector;e.addRule(` .monaco-editor .zone-widget ${s}, .markers-panel .marker-icon${s}, .text-search-provider-messages .providerMessage ${s}, @@ -712,13 +712,13 @@ Please report this to https://github.com/markedjs/marked.`,U.silent)return"

An .extension-editor ${s} { color: ${n}; } - `)}});var Bse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Uh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class Wse{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new Q,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(ki(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new i5(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){nt(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=jr(i);this._lines=a.length,this._longestLineLength=0;for(const u of a)this._longestLineLength=Math.max(u.length+r,this._longestLineLength);Si(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){const g=document.createElement("span");g.innerText=t,g.classList.add("source"),u.appendChild(g)}if(s)if(typeof s=="string"){const g=document.createElement("span");g.innerText=`(${s})`,g.classList.add("code"),u.appendChild(g)}else{this._codeLink=J("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=f=>{this._openerService.open(s.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()};const g=q(this._codeLink,J("span"));g.innerText=s.value,u.appendChild(this._codeLink)}}if(Si(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),rn(n)){const u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(61)*.66)}px`,this._lines+=1;for(const g of n){const f=document.createElement("div"),_=document.createElement("a");_.classList.add("filename"),_.innerText=`${this._labelService.getUriBasenameLabel(g.resource)}(${g.startLineNumber}, ${g.startColumn}): `,_.title=this._labelService.getUriLabel(g.resource),this._relatedDiagnostics.set(_,g);const b=document.createElement("span");b.innerText=g.message,f.appendChild(_),f.appendChild(b),this._lines+=1,u.appendChild(f)}}const c=this._editor.getOption(46),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Vt.Error:t=p("Error","Error");break;case Vt.Warning:t=p("Warning","Warning");break;case Vt.Info:t=p("Info","Info");break;case Vt.Hint:t=p("Hint","Hint");break}let i=p("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Ig=class X7 extends fC{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new Q,this._onDidSelectRelatedInformation=new R,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Vt.Warning,this._backgroundColor=W.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Use);let t=gx,i=Vse;this._severity===Vt.Warning?(t=A0,i=Hse):this._severity===Vt.Info&&(t=fx,i=zse);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(b7),secondaryHeadingColor:e.getColor(v7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(X7.TitleMenu,this._contextKeyService);jne(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=q(e,J(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Wse(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=L.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?p("problems","{0} of {1} problems",t,i):p("change","{0} of {1} problem",t,i);this.setTitle(Js(a.uri),l)}this._icon.className=`codicon ${ux.className(Vt.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Ig.TitleMenu=new M("gotoErrorTitleMenu");Ig=Bse([Uh(1,Ct),Uh(2,io),Uh(3,ph),Uh(4,Ae),Uh(5,Ee),Uh(6,bg)],Ig);const TR=em(Or,x4),AR=em(vs,ag),MR=em(zn,Cv),gx=T("editorMarkerNavigationError.background",{dark:TR,light:TR,hcDark:We,hcLight:We},p("editorMarkerNavigationError","Editor marker navigation widget error color.")),Vse=T("editorMarkerNavigationError.headerBackground",{dark:fe(gx,.1),light:fe(gx,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),A0=T("editorMarkerNavigationWarning.background",{dark:AR,light:AR,hcDark:We,hcLight:We},p("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Hse=T("editorMarkerNavigationWarning.headerBackground",{dark:fe(A0,.1),light:fe(A0,.1),hcDark:"#0C141F",hcLight:fe(A0,.2)},p("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),fx=T("editorMarkerNavigationInfo.background",{dark:MR,light:MR,hcDark:We,hcLight:We},p("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),zse=T("editorMarkerNavigationInfo.headerBackground",{dark:fe(fx,.1),light:fe(fx,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Use=T("editorMarkerNavigation.background",{dark:wi,light:wi,hcDark:wi,hcLight:wi},p("editorMarkerNavigationBackground","Editor marker navigation widget background."));var $se=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jb=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},J7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let bc=class M0{constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new Q,this._editor=e,this._widgetVisible=e9.bindTo(this._contextKeyService)}static get(e){return e.getContribution(M0.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Ig,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!L.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:L.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new B(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,n;return J7(this,void 0,void 0,function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=M0.get(r))===null||i===void 0||i.close(),(n=M0.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}})}};bc.ID="editor.contrib.markerController";bc=$se([jb(1,Q7),jb(2,Ee),jb(3,ct),jb(4,Ae)],bc);class cw extends ce{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return J7(this,void 0,void 0,function*(){t.hasModel()&&((i=bc.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class Xl extends cw{constructor(){super(!0,!1,{id:Xl.ID,label:Xl.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:578,weight:100},menuOpts:{menuId:Ig.TitleMenu,title:Xl.LABEL,icon:mi("marker-navigation-next",m.arrowDown,p("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Xl.ID="editor.action.marker.next";Xl.LABEL=p("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class kd extends cw{constructor(){super(!1,!1,{id:kd.ID,label:kd.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:1602,weight:100},menuOpts:{menuId:Ig.TitleMenu,title:kd.LABEL,icon:mi("marker-navigation-previous",m.arrowUp,p("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}kd.ID="editor.action.marker.prev";kd.LABEL=p("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class jse extends cw{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:p("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:66,weight:100},menuOpts:{menuId:M.MenubarGoMenu,title:p({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Kse extends cw{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:p("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:1090,weight:100},menuOpts:{menuId:M.MenubarGoMenu,title:p({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}tt(bc.ID,bc);ie(Xl);ie(kd);ie(jse);ie(Kse);const e9=new le("markersNavigationVisible",!1),qse=xi.bindToContribution(bc.get);ee(new qse({id:"closeMarkersNavigation",precondition:e9,handler:o=>o.close(),kbOpts:{weight:100+50,kbExpr:N.focus,primary:9,secondary:[1033]}}));var Gse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ly=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const ao=J;class Zse{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const RR={type:1,filter:{include:Ze.QuickFix},triggerAction:bn.QuickFixHover};let px=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,c=a.range.endLineNumber===n?a.range.endColumn:s,d=this._markerDecorationsService.getMarker(i.uri,a);if(!d)continue;const h=new L(e.range.startLineNumber,l,e.range.startLineNumber,c);r.push(new Zse(this,h,d))}return r}renderHoverParts(e,t){if(!t.length)return H.None;const i=new Q;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>Vt.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=ao("div.hover-row"),n=q(i,ao("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const c=q(n,ao("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=r,s||a)if(a&&typeof a!="string"){const d=ao("span");if(s){const f=q(d,ao("span"));f.innerText=s}const h=q(d,ao("a.code-link"));h.setAttribute("href",a.target.toString()),t.add(G(h,"click",f=>{this._openerService.open(a.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()}));const u=q(h,ao("span"));u.innerText=a.value;const g=q(n,d);g.style.opacity="0.6",g.style.paddingLeft="6px"}else{const d=q(n,ao("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(rn(l))for(const{message:d,resource:h,startLineNumber:u,startColumn:g}of l){const f=q(n,ao("div"));f.style.marginTop="8px";const _=q(f,ao("a"));_.innerText=`${Js(h)}(${u}, ${g}): `,_.style.cursor="pointer",t.add(G(_,"click",v=>{v.stopPropagation(),v.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:g}}}).catch(Te)}));const b=q(f,ao("span"));b.innerText=d,this._editor.applyFontInfo(b)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===Vt.Error||t.marker.severity===Vt.Warning||t.marker.severity===Vt.Info)&&e.statusBar.addAction({label:p("view problem","View Problem"),commandId:Xl.ID,run:()=>{var n;e.hide(),(n=bc.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(83)){const n=e.statusBar.append(ao("div"));this.recentMarkerCodeActionsInfo&&(eC.makeKey(this.recentMarkerCodeActionsInfo.marker)===eC.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=p("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?H.None:i.add(Ad(()=>n.textContent=p("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=String.fromCharCode(160));const r=this.getCodeActions(t.marker);i.add(Be(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=p("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Be(()=>{l||a.dispose()})),e.statusBar.addAction({label:p("quick fixes","Quick Fix..."),commandId:ef.Id,run:c=>{l=!0;const d=fc.get(this._editor),h=on(c);e.hide(),d==null||d.showCodeActions(RR,a,{x:h.left+6,y:h.top+h.height+6,width:h.width,height:h.height})}})},Te)}}getCodeActions(e){return Ri(t=>zN(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),RR,Ch.None,t))}};px=Gse([Ly(1,KI),Ly(2,io),Ly(3,de)],px);Et((o,e)=>{const t=o.getColor(h1);t&&e.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${t}; }`);const i=o.getColor(u1);i&&e.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)});var Yse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kb=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let vc=class t9{constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._toUnhook=new Q,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(r=>{r.hasChanged(55)&&(this._unhookEvents(),this._hookEvents())})}static get(e){return e.getContribution(t9.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(55);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;if(t.type===9&&t.detail===Dd.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===Zu.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,i,n,s,r;const a=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&a.type===9&&a.detail===Dd.ID||this._isHoverSticky&&!(!((i=(t=e.event.browserEvent.view)===null||t===void 0?void 0:t.getSelection())===null||i===void 0)&&i.isCollapsed)||!this._isHoverSticky&&a.type===9&&a.detail===Dd.ID&&((n=this._contentWidget)===null||n===void 0?void 0:n.isColorPickerVisible())||this._isHoverSticky&&a.type===12&&a.detail===Zu.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(s=this._glyphWidget)===null||s===void 0||s.hide();return}if(a.type===2&&a.position){(r=this._contentWidget)===null||r===void 0||r.hide(),this._glyphWidget||(this._glyphWidget=new Zu(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(a.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(mC,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};vc.ID="editor.contrib.hover";vc=Yse([Kb(1,Ae),Kb(2,io),Kb(3,Ht),Kb(4,Ee)],vc);class Qse extends ce{constructor(){super({id:"editor.action.showHover",label:p({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;const i=vc.get(t);if(!i)return;const n=t.getPosition(),s=new L(n.lineNumber,n.column,n.lineNumber,n.column),r=t.getOption(2)===2;i.showContentHover(s,1,r)}}class Xse extends ce{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:p({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=vc.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new L(n.lineNumber,n.column,n.lineNumber,n.column),r=Xd.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,!0)})}}tt(vc.ID,vc);ie(Qse);ie(Xse);xh.register(bC);xh.register(px);Et((o,e)=>{const t=o.getColor(Qz);t&&e.addRule(`.monaco-editor .hoverHighlight { background-color: ${t}; }`);const i=o.getColor(Bd);i&&e.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const n=o.getColor(aE);n&&(e.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${n.transparent(.5)}; }`));const s=o.getColor(h1);s&&e.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const r=o.getColor(u1);r&&e.addRule(`.monaco-editor .monaco-hover a:hover { color: ${r}; }`);const a=o.getColor(rE);a&&e.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=o.getColor(Xz);l&&e.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const c=o.getColor(k4);c&&e.addRule(`.monaco-editor .monaco-hover code { background-color: ${c}; }`)});class mx extends H{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==d7||!t.range)return;const i=this._editor.getContribution(vc.ID);if(!!i&&!i.isColorPickerVisible()){const n=new L(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(n,1,!1)}}}mx.ID="editor.contrib.colorContribution";tt(mx.ID,mx);xh.register(Kk);var i9=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function tT(o){return{asString:()=>i9(this,void 0,void 0,function*(){return o}),asFile:()=>{},value:typeof o=="string"?o:void 0}}function Jse(o,e,t){return{asString:()=>i9(this,void 0,void 0,function*(){return""}),asFile:()=>({name:o,uri:e,data:t}),value:void 0}}class n9{constructor(){this._entries=new Map}get size(){return this._entries.size}has(e){return this._entries.has(this.toKey(e))}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*entries(){for(const[e,t]of this._entries.entries())for(const i of t)yield[e,i]}values(){return Array.from(this._entries.values()).flat()}forEach(e){for(const[t,i]of this.entries())e(i,t)}toKey(e){return e.toLowerCase()}}const s9=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n0){const i=o.dataTransfer.getData(CC.EDITORS);if(i)try{t.push(...Qv(i))}catch{}else try{const r=o.dataTransfer.getData(__.RESOURCES);t.push(...toe(r))}catch{}if(!((e=o.dataTransfer)===null||e===void 0)&&e.files)for(let r=0;r0){const{selection:n,uri:s}=rF(_e.parse(i));e.push({resource:s,options:{selection:n}})}}return e}class ioe{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}const o9={DragAndDropContribution:"workbench.contributions.dragAndDrop"};zt.add(o9.DragAndDropContribution,new ioe);var noe=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function _x(o){const e=new n9;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,tT(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,soe(n))}}return e}function soe(o){const e=o.path?_e.parse(o.path):void 0;return Jse(o.name,e,()=>noe(this,void 0,void 0,function*(){return new Uint8Array(yield o.arrayBuffer())}))}const ooe=Object.freeze([CC.EDITORS,CC.FILES,__.RESOURCES]);function roe(o,e,t=!1){var i;if(e.dataTransfer&&(t||!o.has(Vn.uriList))){const n=eoe(e).filter(s=>s.resource).map(s=>s.resource.toString());for(const s of(i=e.dataTransfer)===null||i===void 0?void 0:i.items){const r=s.getAsFile();r&&n.push(r.path?_e.file(r.path).toString():r.name)}n.length&&o.replace(Vn.uriList,tT(iT.create(n)))}for(const n of ooe)o.delete(n)}const iT=Object.freeze({create:o=>Qa(o.map(e=>e.toString())).join(`\r + `)}});var Bse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Uh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class Wse{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new Q,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(ki(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new iF(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){nt(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=jr(i);this._lines=a.length,this._longestLineLength=0;for(const u of a)this._longestLineLength=Math.max(u.length+r,this._longestLineLength);Si(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){const g=document.createElement("span");g.innerText=t,g.classList.add("source"),u.appendChild(g)}if(s)if(typeof s=="string"){const g=document.createElement("span");g.innerText=`(${s})`,g.classList.add("code"),u.appendChild(g)}else{this._codeLink=J("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=f=>{this._openerService.open(s.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()};const g=q(this._codeLink,J("span"));g.innerText=s.value,u.appendChild(this._codeLink)}}if(Si(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),rn(n)){const u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(61)*.66)}px`,this._lines+=1;for(const g of n){const f=document.createElement("div"),_=document.createElement("a");_.classList.add("filename"),_.innerText=`${this._labelService.getUriBasenameLabel(g.resource)}(${g.startLineNumber}, ${g.startColumn}): `,_.title=this._labelService.getUriLabel(g.resource),this._relatedDiagnostics.set(_,g);const b=document.createElement("span");b.innerText=g.message,f.appendChild(_),f.appendChild(b),this._lines+=1,u.appendChild(f)}}const c=this._editor.getOption(46),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Vt.Error:t=p("Error","Error");break;case Vt.Warning:t=p("Warning","Warning");break;case Vt.Info:t=p("Info","Info");break;case Vt.Hint:t=p("Hint","Hint");break}let i=p("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Ig=class X7 extends fC{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new Q,this._onDidSelectRelatedInformation=new R,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Vt.Warning,this._backgroundColor=W.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Use);let t=gx,i=Vse;this._severity===Vt.Warning?(t=A0,i=Hse):this._severity===Vt.Info&&(t=fx,i=zse);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(b7),secondaryHeadingColor:e.getColor(v7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(X7.TitleMenu,this._contextKeyService);jne(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=q(e,J(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Wse(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=L.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?p("problems","{0} of {1} problems",t,i):p("change","{0} of {1} problem",t,i);this.setTitle(Js(a.uri),l)}this._icon.className=`codicon ${ux.className(Vt.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Ig.TitleMenu=new M("gotoErrorTitleMenu");Ig=Bse([Uh(1,Ct),Uh(2,io),Uh(3,ph),Uh(4,Ae),Uh(5,Ee),Uh(6,bg)],Ig);const TR=em(Or,x4),AR=em(vs,ag),MR=em(zn,Cv),gx=T("editorMarkerNavigationError.background",{dark:TR,light:TR,hcDark:We,hcLight:We},p("editorMarkerNavigationError","Editor marker navigation widget error color.")),Vse=T("editorMarkerNavigationError.headerBackground",{dark:fe(gx,.1),light:fe(gx,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),A0=T("editorMarkerNavigationWarning.background",{dark:AR,light:AR,hcDark:We,hcLight:We},p("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Hse=T("editorMarkerNavigationWarning.headerBackground",{dark:fe(A0,.1),light:fe(A0,.1),hcDark:"#0C141F",hcLight:fe(A0,.2)},p("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),fx=T("editorMarkerNavigationInfo.background",{dark:MR,light:MR,hcDark:We,hcLight:We},p("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),zse=T("editorMarkerNavigationInfo.headerBackground",{dark:fe(fx,.1),light:fe(fx,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Use=T("editorMarkerNavigation.background",{dark:wi,light:wi,hcDark:wi,hcLight:wi},p("editorMarkerNavigationBackground","Editor marker navigation widget background."));var $se=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jb=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},J7=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let bc=class M0{constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new Q,this._editor=e,this._widgetVisible=e9.bindTo(this._contextKeyService)}static get(e){return e.getContribution(M0.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Ig,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!L.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:L.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new B(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,n;return J7(this,void 0,void 0,function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=M0.get(r))===null||i===void 0||i.close(),(n=M0.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}})}};bc.ID="editor.contrib.markerController";bc=$se([jb(1,Q7),jb(2,Ee),jb(3,ct),jb(4,Ae)],bc);class cw extends ce{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return J7(this,void 0,void 0,function*(){t.hasModel()&&((i=bc.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class Xl extends cw{constructor(){super(!0,!1,{id:Xl.ID,label:Xl.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:578,weight:100},menuOpts:{menuId:Ig.TitleMenu,title:Xl.LABEL,icon:mi("marker-navigation-next",m.arrowDown,p("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Xl.ID="editor.action.marker.next";Xl.LABEL=p("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class kd extends cw{constructor(){super(!1,!1,{id:kd.ID,label:kd.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:1602,weight:100},menuOpts:{menuId:Ig.TitleMenu,title:kd.LABEL,icon:mi("marker-navigation-previous",m.arrowUp,p("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}kd.ID="editor.action.marker.prev";kd.LABEL=p("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class jse extends cw{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:p("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:66,weight:100},menuOpts:{menuId:M.MenubarGoMenu,title:p({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Kse extends cw{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:p("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:1090,weight:100},menuOpts:{menuId:M.MenubarGoMenu,title:p({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}tt(bc.ID,bc);ie(Xl);ie(kd);ie(jse);ie(Kse);const e9=new le("markersNavigationVisible",!1),qse=xi.bindToContribution(bc.get);ee(new qse({id:"closeMarkersNavigation",precondition:e9,handler:o=>o.close(),kbOpts:{weight:100+50,kbExpr:N.focus,primary:9,secondary:[1033]}}));var Gse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ly=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const ao=J;class Zse{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const RR={type:1,filter:{include:Ze.QuickFix},triggerAction:bn.QuickFixHover};let px=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,c=a.range.endLineNumber===n?a.range.endColumn:s,d=this._markerDecorationsService.getMarker(i.uri,a);if(!d)continue;const h=new L(e.range.startLineNumber,l,e.range.startLineNumber,c);r.push(new Zse(this,h,d))}return r}renderHoverParts(e,t){if(!t.length)return H.None;const i=new Q;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>Vt.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=ao("div.hover-row"),n=q(i,ao("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const c=q(n,ao("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=r,s||a)if(a&&typeof a!="string"){const d=ao("span");if(s){const f=q(d,ao("span"));f.innerText=s}const h=q(d,ao("a.code-link"));h.setAttribute("href",a.target.toString()),t.add(G(h,"click",f=>{this._openerService.open(a.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()}));const u=q(h,ao("span"));u.innerText=a.value;const g=q(n,d);g.style.opacity="0.6",g.style.paddingLeft="6px"}else{const d=q(n,ao("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(rn(l))for(const{message:d,resource:h,startLineNumber:u,startColumn:g}of l){const f=q(n,ao("div"));f.style.marginTop="8px";const _=q(f,ao("a"));_.innerText=`${Js(h)}(${u}, ${g}): `,_.style.cursor="pointer",t.add(G(_,"click",v=>{v.stopPropagation(),v.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:g}}}).catch(Te)}));const b=q(f,ao("span"));b.innerText=d,this._editor.applyFontInfo(b)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===Vt.Error||t.marker.severity===Vt.Warning||t.marker.severity===Vt.Info)&&e.statusBar.addAction({label:p("view problem","View Problem"),commandId:Xl.ID,run:()=>{var n;e.hide(),(n=bc.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(83)){const n=e.statusBar.append(ao("div"));this.recentMarkerCodeActionsInfo&&(eC.makeKey(this.recentMarkerCodeActionsInfo.marker)===eC.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=p("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?H.None:i.add(Ad(()=>n.textContent=p("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=String.fromCharCode(160));const r=this.getCodeActions(t.marker);i.add(Be(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=p("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Be(()=>{l||a.dispose()})),e.statusBar.addAction({label:p("quick fixes","Quick Fix..."),commandId:ef.Id,run:c=>{l=!0;const d=fc.get(this._editor),h=on(c);e.hide(),d==null||d.showCodeActions(RR,a,{x:h.left+6,y:h.top+h.height+6,width:h.width,height:h.height})}})},Te)}}getCodeActions(e){return Ri(t=>zN(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),RR,Ch.None,t))}};px=Gse([Ly(1,KI),Ly(2,io),Ly(3,de)],px);Et((o,e)=>{const t=o.getColor(h1);t&&e.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${t}; }`);const i=o.getColor(u1);i&&e.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)});var Yse=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kb=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let vc=class t9{constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._toUnhook=new Q,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(r=>{r.hasChanged(55)&&(this._unhookEvents(),this._hookEvents())})}static get(e){return e.getContribution(t9.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(55);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;if(t.type===9&&t.detail===Dd.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===Zu.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,i,n,s,r;const a=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&a.type===9&&a.detail===Dd.ID||this._isHoverSticky&&!(!((i=(t=e.event.browserEvent.view)===null||t===void 0?void 0:t.getSelection())===null||i===void 0)&&i.isCollapsed)||!this._isHoverSticky&&a.type===9&&a.detail===Dd.ID&&((n=this._contentWidget)===null||n===void 0?void 0:n.isColorPickerVisible())||this._isHoverSticky&&a.type===12&&a.detail===Zu.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(s=this._glyphWidget)===null||s===void 0||s.hide();return}if(a.type===2&&a.position){(r=this._contentWidget)===null||r===void 0||r.hide(),this._glyphWidget||(this._glyphWidget=new Zu(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(a.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(mC,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};vc.ID="editor.contrib.hover";vc=Yse([Kb(1,Ae),Kb(2,io),Kb(3,Ht),Kb(4,Ee)],vc);class Qse extends ce{constructor(){super({id:"editor.action.showHover",label:p({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;const i=vc.get(t);if(!i)return;const n=t.getPosition(),s=new L(n.lineNumber,n.column,n.lineNumber,n.column),r=t.getOption(2)===2;i.showContentHover(s,1,r)}}class Xse extends ce{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:p({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=vc.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new L(n.lineNumber,n.column,n.lineNumber,n.column),r=Xd.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,!0)})}}tt(vc.ID,vc);ie(Qse);ie(Xse);xh.register(bC);xh.register(px);Et((o,e)=>{const t=o.getColor(Qz);t&&e.addRule(`.monaco-editor .hoverHighlight { background-color: ${t}; }`);const i=o.getColor(Bd);i&&e.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const n=o.getColor(aE);n&&(e.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${n.transparent(.5)}; }`));const s=o.getColor(h1);s&&e.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const r=o.getColor(u1);r&&e.addRule(`.monaco-editor .monaco-hover a:hover { color: ${r}; }`);const a=o.getColor(rE);a&&e.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=o.getColor(Xz);l&&e.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const c=o.getColor(k4);c&&e.addRule(`.monaco-editor .monaco-hover code { background-color: ${c}; }`)});class mx extends H{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==d7||!t.range)return;const i=this._editor.getContribution(vc.ID);if(!!i&&!i.isColorPickerVisible()){const n=new L(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(n,1,!1)}}}mx.ID="editor.contrib.colorContribution";tt(mx.ID,mx);xh.register(Kk);var i9=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function tT(o){return{asString:()=>i9(this,void 0,void 0,function*(){return o}),asFile:()=>{},value:typeof o=="string"?o:void 0}}function Jse(o,e,t){return{asString:()=>i9(this,void 0,void 0,function*(){return""}),asFile:()=>({name:o,uri:e,data:t}),value:void 0}}class n9{constructor(){this._entries=new Map}get size(){return this._entries.size}has(e){return this._entries.has(this.toKey(e))}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*entries(){for(const[e,t]of this._entries.entries())for(const i of t)yield[e,i]}values(){return Array.from(this._entries.values()).flat()}forEach(e){for(const[t,i]of this.entries())e(i,t)}toKey(e){return e.toLowerCase()}}const s9=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n0){const i=o.dataTransfer.getData(CC.EDITORS);if(i)try{t.push(...Qv(i))}catch{}else try{const r=o.dataTransfer.getData(__.RESOURCES);t.push(...toe(r))}catch{}if(!((e=o.dataTransfer)===null||e===void 0)&&e.files)for(let r=0;r0){const{selection:n,uri:s}=r5(_e.parse(i));e.push({resource:s,options:{selection:n}})}}return e}class ioe{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}const o9={DragAndDropContribution:"workbench.contributions.dragAndDrop"};zt.add(o9.DragAndDropContribution,new ioe);var noe=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function _x(o){const e=new n9;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,tT(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,soe(n))}}return e}function soe(o){const e=o.path?_e.parse(o.path):void 0;return Jse(o.name,e,()=>noe(this,void 0,void 0,function*(){return new Uint8Array(yield o.arrayBuffer())}))}const ooe=Object.freeze([CC.EDITORS,CC.FILES,__.RESOURCES]);function roe(o,e,t=!1){var i;if(e.dataTransfer&&(t||!o.has(Vn.uriList))){const n=eoe(e).filter(s=>s.resource).map(s=>s.resource.toString());for(const s of(i=e.dataTransfer)===null||i===void 0?void 0:i.items){const r=s.getAsFile();r&&n.push(r.path?_e.file(r.path).toString():r.name)}n.length&&o.replace(Vn.uriList,tT(iT.create(n)))}for(const n of ooe)o.delete(n)}const iT=Object.freeze({create:o=>Qa(o.map(e=>e.toString())).join(`\r `),parse:o=>o.split(`\r `).filter(e=>!e.startsWith("#"))});function OR(o,e=Yi){return Lq(o,e)?o.charAt(0).toUpperCase()+o.slice(1):o}var aoe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},loe=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class PR{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class FR{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),r=_t(s,0,this._selection.startColumn-1);let a=r;e.snippet.walk(c=>c===e?!1:(c instanceof Bn&&(a=_t(jr(c.value).pop())),!0));const l=Nd(a,r);i=i.replace(/(\r\n|\r|\n)(.*)/g,(c,d,h)=>`${d}${a.substr(l)}${h}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class BR{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return fd(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=fd(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return sP(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(L1(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class WR{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(!!t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!dP(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let wC=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(!!n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};wC=aoe([loe(2,si)],wC);class $o{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return $o.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return $o.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return $o.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return $o.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}$o.dayNames=[p("Sunday","Sunday"),p("Monday","Monday"),p("Tuesday","Tuesday"),p("Wednesday","Wednesday"),p("Thursday","Thursday"),p("Friday","Friday"),p("Saturday","Saturday")];$o.dayNamesShort=[p("SundayShort","Sun"),p("MondayShort","Mon"),p("TuesdayShort","Tue"),p("WednesdayShort","Wed"),p("ThursdayShort","Thu"),p("FridayShort","Fri"),p("SaturdayShort","Sat")];$o.monthNames=[p("January","January"),p("February","February"),p("March","March"),p("April","April"),p("May","May"),p("June","June"),p("July","July"),p("August","August"),p("September","September"),p("October","October"),p("November","November"),p("December","December")];$o.monthNamesShort=[p("JanuaryShort","Jan"),p("FebruaryShort","Feb"),p("MarchShort","Mar"),p("AprilShort","Apr"),p("MayShort","May"),p("JuneShort","Jun"),p("JulyShort","Jul"),p("AugustShort","Aug"),p("SeptemberShort","Sep"),p("OctoberShort","Oct"),p("NovemberShort","Nov"),p("DecemberShort","Dec")];class VR{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=DY(this._workspaceService.getWorkspace());if(!!t){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(lM(e))return fd(e.uri.path);let t=fd(e.configPath.path);return t.endsWith(HD)&&(t=t.substr(0,t.length-HD.length-1)),t}_resoveWorkspacePath(e){if(lM(e))return OR(e.uri.fsPath);const t=fd(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?OR(i):"/"}}class HR{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return s9()}}var coe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},doe=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class Ms{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=DT(t.placeholders,go.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),r=L.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),a=i.isFinalTabstop?Ms._decor.inactiveFinal:Ms._decor.inactive,l=t.addDecoration(r,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx])if(s.transform){const r=this._placeholderDecorations.get(s),a=this._editor.getModel().getDecorationRange(r),l=this._editor.getModel().getValueInRange(a),c=s.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(n=>{const s=new Set,r=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);r.push(new oe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.changeDecorationOptions(l,a.isFinalTabstop?Ms._decor.activeFinal:Ms._decor.active),s.add(a);for(const d of this._snippet.enclosingPlaceholders(a)){const h=this._placeholderDecorations.get(d);n.changeDecorationOptions(h,d.isFinalTabstop?Ms._decor.activeFinal:Ms._decor.active),s.add(d)}}for(const[a,l]of this._placeholderDecorations)s.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?Ms._decor.inactiveFinal:Ms._decor.inactive);return r});return t?this.move(e):i!=null?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof go){const i=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){return this._snippet.placeholders.length===0||this._snippet.placeholders.length===1&&this._snippet.placeholders[0].isFinalTabstop}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const s=this._placeholderDecorations.get(n),r=this._editor.getModel().getDecorationRange(s);if(!r){e.delete(n.index);break}i.push(r)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);if(!!i)return{range:i,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof nf,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(s._offset!==-1),console.assert(!s._placeholderDecorations);const r=s._snippet.placeholderInfo.last.index;for(const l of s._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=n.index+(r+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const a=this._placeholderDecorations.get(n);i.removeDecoration(a),this._placeholderDecorations.delete(n);for(const l of s._snippet.placeholders){const c=s._snippet.offset(l),d=s._snippet.fullLen(l),h=L.fromPositions(t.getPositionAt(s._offset+c),t.getPositionAt(s._offset+c+d)),u=i.addDecoration(h,Ms._decor.inactive);this._placeholderDecorations.set(l,u)}}this._placeholderGroups=DT(this._snippet.placeholders,go.compareByIndex)})}}Ms._decor={active:Ne.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Ne.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Ne.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ne.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const zR={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let SC=class ba{constructor(e,t,i=zR,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}static adjustWhitespace(e,t,i,n,s){const r=e.getLineContent(t.lineNumber),a=_t(r,0,t.column-1);let l;return i.walk(c=>{if(!(c instanceof Bn)||c.parent instanceof nf)return!0;const d=c.value.split(/\r\n|\r|\n/);if(n){const u=i.offset(c);if(u===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:i.toString();const g=l.charCodeAt(u-1);(g===10||g===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let g=1;gS.get(_m)),f=e.invokeWithinContext(S=>new BR(S.get(bg),u)),_=()=>a,b=u.getValueInRange(ba.adjustSelection(u,e.getSelection(),i,0)),v=u.getValueInRange(ba.adjustSelection(u,e.getSelection(),0,n)),C=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),w=e.getSelections().map((S,k)=>({selection:S,idx:k})).sort((S,k)=>L.compareRangesUsingStarts(S.selection,k.selection));for(const{selection:S,idx:k}of w){let x=ba.adjustSelection(u,S,i,0),y=ba.adjustSelection(u,S,0,n);b!==u.getValueInRange(x)&&(x=S),v!==u.getValueInRange(y)&&(y=S);const D=S.setStartPosition(x.startLineNumber,x.startColumn).setEndPosition(y.endLineNumber,y.endColumn),I=new _c().parse(t,!0,s),O=D.getStartPosition(),F=ba.adjustWhitespace(u,O,I,r||k>0&&C!==u.getLineFirstNonWhitespaceColumn(S.positionLineNumber),!0);I.resolveVariables(new PR([f,new WR(_,k,w.length,e.getOption(73)==="spread"),new FR(u,S,k,l),new wC(u,S,c),new $o,new VR(g),new HR])),d[k]=Ft.replace(D,I.toString()),d[k].identifier={major:k,minor:0},d[k]._isTracked=!0,h[k]=new Ms(e,I,F)}return{edits:d,snippets:h}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,r,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const l=[],c=e.getModel(),d=new _c,h=new O_,u=new PR([e.invokeWithinContext(f=>new BR(f.get(bg),c)),new WR(()=>s,0,e.getSelections().length,e.getOption(73)==="spread"),new FR(c,e.getSelection(),0,r),new wC(c,e.getSelection(),a),new $o,new VR(e.invokeWithinContext(f=>f.get(_m))),new HR]);t=t.sort((f,_)=>L.compareRangesUsingStarts(f.range,_.range));let g=0;for(let f=0;f0){const S=t[f-1].range,k=L.fromPositions(S.getEndPosition(),_.getStartPosition()),x=new Bn(c.getValueInRange(k));h.appendChild(x),g+=x.value.length}d.parseFragment(b,h),h.resolveVariables(u);const v=h.toString(),C=v.slice(g);g=v.length;const w=Ft.replace(_,C);w.identifier={major:f,minor:0},w._isTracked=!0,l.push(w)}return d.ensureFinalTabstop(h,i,!0),{edits:l,snippets:[new Ms(e,h,"")]}}dispose(){nt(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=typeof this._template=="string"?ba.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):ba.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,i=>{const n=i.filter(s=>!!s.identifier);for(let s=0;soe.fromPositions(s.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=zR){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=ba.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,s=>{const r=s.filter(l=>!!l.identifier);for(let l=0;loe.fromPositions(l.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{s.push(...n.get(r))})}e.sort(L.compareRangesUsingStarts);for(const[i,n]of t){if(n.length!==e.length){t.delete(i);continue}n.sort(L.compareRangesUsingStarts);for(let s=0;s0}};SC=coe([doe(3,si)],SC);var hoe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qb=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const Gb={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Oi=class np{constructor(e,t,i,n,s){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=s,this._snippetListener=new Q,this._modelVersionId=-1,this._inSnippet=np.InSnippetMode.bindTo(n),this._hasNextTabstop=np.HasNextTabstop.bindTo(n),this._hasPrevTabstop=np.HasPrevTabstop.bindTo(n)}static get(e){return e.getContribution(np.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}apply(e,t){try{this._doInsert(e,typeof t>"u"?Gb:Object.assign(Object.assign({},Gb),t))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_edits=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}insert(e,t){try{this._doInsert(e,typeof t>"u"?Gb:Object.assign(Object.assign({},Gb),t))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(!!this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(pt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new SC(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((i=this._session)===null||i===void 0)&&i.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(s,r)=>{if(!this._session||s!==this._editor.getModel()||!B.equals(this._editor.getPosition(),r))return;const{activeChoice:a}=this._session;if(!a||a.choice.options.length===0)return;const l=s.getValueInRange(a.range),c=Boolean(a.choice.options.find(h=>h.value===l)),d=[];for(let h=0;hn.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{Dse(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};Oi.ID="snippetController2";Oi.InSnippetMode=new le("inSnippetMode",!1,p("inSnippetMode","Whether the editor in current in snippet mode"));Oi.HasNextTabstop=new le("hasNextTabstop",!1,p("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Oi.HasPrevTabstop=new le("hasPrevTabstop",!1,p("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Oi=hoe([qb(1,So),qb(2,de),qb(3,Ee),qb(4,si)],Oi);tt(Oi.ID,Oi);const dw=xi.bindToContribution(Oi.get);ee(new dw({id:"jumpToNextSnippetPlaceholder",precondition:se.and(Oi.InSnippetMode,Oi.HasNextTabstop),handler:o=>o.next(),kbOpts:{weight:100+30,kbExpr:N.editorTextFocus,primary:2}}));ee(new dw({id:"jumpToPrevSnippetPlaceholder",precondition:se.and(Oi.InSnippetMode,Oi.HasPrevTabstop),handler:o=>o.prev(),kbOpts:{weight:100+30,kbExpr:N.editorTextFocus,primary:1026}}));ee(new dw({id:"leaveSnippet",precondition:Oi.InSnippetMode,handler:o=>o.cancel(!0),kbOpts:{weight:100+30,kbExpr:N.editorTextFocus,primary:9,secondary:[1033]}}));ee(new dw({id:"acceptSnippet",precondition:Oi.InSnippetMode,handler:o=>o.finish()}));function r9(o,e,t){const i=Oi.get(o);return i?(o.focus(),i.apply(t.map(n=>({range:oe.liftSelection(n),template:e}))),i.isInSnippet()):!1}var uoe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zb=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},UR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Dy="application/vnd.code.copyMetadata";let Wm=class extends H{constructor(e,t,i,n,s){super(),this._bulkEditService=t,this._clipboardService=i,this._configurationService=n,this._languageFeaturesService=s,this._editor=e;const r=e.getContainerDomNode();this._register(G(r,"copy",a=>this.handleCopy(a))),this._register(G(r,"cut",a=>this.handleCopy(a))),this._register(G(r,"paste",a=>this.handlePaste(a),!0))}arePasteActionsEnabled(e){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:e.uri})}handleCopy(e){var t;if(!e.clipboardData||!this._editor.hasTextFocus())return;const i=this._editor.getModel(),n=this._editor.getSelections();if(!i||!(n!=null&&n.length)||!this.arePasteActionsEnabled(i))return;const s=[...n],r=n[0],a=r.isEmpty();if(a){if(!this._editor.getOption(33))return;s[0]=new L(r.startLineNumber,0,r.startLineNumber,i.getLineLength(r.startLineNumber))}const l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(u=>!!u.prepareDocumentPaste);if(!l.length){this.setCopyMetadata(e.clipboardData,{wasFromEmptySelection:a});return}const c=_x(e.clipboardData),d=s9();this.setCopyMetadata(e.clipboardData,{id:d,wasFromEmptySelection:a});const h=Ri(u=>UR(this,void 0,void 0,function*(){const g=yield Promise.all(l.map(f=>f.prepareDocumentPaste(i,s,c,u)));for(const f of g)f==null||f.forEach((_,b)=>{c.replace(b,_)});return c}));(t=this._currentClipboardItem)===null||t===void 0||t.dataTransferPromise.cancel(),this._currentClipboardItem={handle:d,dataTransferPromise:h}}setCopyMetadata(e,t){e.setData(Dy,JSON.stringify(t))}handlePaste(e){var t,i,n;return UR(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;const s=this._editor.getSelections();if(!(s!=null&&s.length)||!this._editor.hasModel())return;const r=this._editor.getModel();if(!this.arePasteActionsEnabled(r))return;let a;const l=(t=e.clipboardData)===null||t===void 0?void 0:t.getData(Dy);l&&typeof l=="string"&&(a=JSON.parse(l));const c=this._languageFeaturesService.documentPasteEditProvider.ordered(r);if(!c.length)return;e.preventDefault(),e.stopImmediatePropagation();const d=r.getVersionId(),h=new qd(this._editor,3);try{const u=_x(e.clipboardData);if((a==null?void 0:a.id)&&((i=this._currentClipboardItem)===null||i===void 0?void 0:i.handle)===a.id&&(yield this._currentClipboardItem.dataTransferPromise).forEach((b,v)=>{u.replace(v,b)}),!u.has(Vn.uriList)){const _=yield this._clipboardService.readResources();_.length&&u.append(Vn.uriList,tT(iT.create(_)))}u.delete(Dy);for(const _ of c){if(!_.pasteMimeTypes.some(v=>v.toLowerCase()===__.FILES.toLowerCase()?[...u.values()].some(C=>C.asFile()):u.has(v)))continue;const b=yield _.provideDocumentPasteEdits(r,s,u,h.token);if(d!==r.getVersionId())return;if(b){r9(this._editor,typeof b.insertText=="string"?_c.escape(b.insertText):b.insertText.snippet,s),b.additionalEdit&&(yield this._bulkEditService.apply(Qg.convert(b.additionalEdit),{editor:this._editor}));return}}const g=(n=u.get(Vn.text))!==null&&n!==void 0?n:u.get("text");if(!g)return;const f=yield g.asString();if(d!==r.getVersionId())return;this._editor.trigger("keyboard","paste",{text:f,pasteOnNewLine:a==null?void 0:a.wasFromEmptySelection,multicursorText:null})}finally{h.dispose()}})}};Wm.ID="editor.contrib.copyPasteActionController";Wm=uoe([Zb(1,v_),Zb(2,cl),Zb(3,ot),Zb(4,de)],Wm);tt(Wm.ID,Wm);zt.as(rl.Configuration).registerConfiguration(Object.assign(Object.assign({},GE),{properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:p("pasteActions","Enable/disable running edits from extensions on paste."),default:!1}}}));class Vl{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let r=0;r=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,h=s.getLineContent(a),u=s.getLineContent(c);let g=h.lastIndexOf(t,l-1+t.length),f=u.indexOf(i,d-1-i.length);if(g!==-1&&f!==-1)if(a===c)h.substring(g+t.length,f).indexOf(i)>=0&&(g=-1,f=-1);else{const b=h.substring(g+t.length),v=u.substring(0,f);(b.indexOf(i)>=0||v.indexOf(i)>=0)&&(g=-1,f=-1)}let _;g!==-1&&f!==-1?(n&&g+t.length0&&u.charCodeAt(f-1)===32&&(i=" "+i,f-=1),_=Vl._createRemoveBlockCommentOperations(new L(a,g+t.length+1,c,f+1),t,i)):(_=Vl._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=_.length===1?i:null);for(const b of _)r.addTrackedEditOperation(b.range,b.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return L.isEmpty(e)?n.push(Ft.delete(new L(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Ft.delete(new L(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Ft.delete(new L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return L.isEmpty(e)?s.push(Ft.replace(new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Ft.insert(new B(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Ft.insert(new B(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new oe(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new oe(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class ya{constructor(e,t,i,n,s,r,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,a=r?r.lineCommentToken:null;if(!a)return null;const l=[];for(let c=0,d=i-t+1;cs?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class nT extends ce{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(si);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(19),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>L.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$h=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Eg=class a9{constructor(e,t,i,n,s,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._toDispose=new Q,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&Rd(c)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(l=>{!this._editor.getOption(20)||l.keyCode===58&&(l.preventDefault(),l.stopPropagation(),this.showContextMenu())}))}static get(e){return e.getContribution(a9.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?M.SimpleEditorContext:M.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const r of s){const[,a]=r;let l=0;for(const c of a)if(c instanceof GI){const d=this._getMenuActions(e,c.item.submenu);d.length>0&&(i.push(new Qp(c.id,c.label,d)),l++)}else i.push(c),l++;l&&i.push(new ln)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(55);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),r=on(this._editor.getDomNode()),a=r.left+s.left,l=r.top+s.top+s.height;t={x:a,y:l}}const n=this._editor.getOption(117)&&!Ur;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:s=>{const r=this._keybindingFor(s);if(r)return new fm(s,s,{label:!0,keybinding:r.getLabel(),isMenu:!0});const a=s;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new fm(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;const t=this._editor.getOption(67);let i=0;const n=c=>({id:`menu-action-${++i}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run,dispose:()=>null}),s=(c,d)=>new Qp(`menu-action-${++i}`,c,d,void 0),r=(c,d,h,u,g)=>{if(!d)return n({label:c,enabled:d,run:()=>{}});const f=b=>()=>{this._configurationService.updateValue(h,b)},_=[];for(const b of g)_.push(n({label:b.label,checked:u===b.value,run:f(b.value)}));return s(c,_)},a=[];a.push(n({label:p("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ln),a.push(n({label:p("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(r(p("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:p("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:p("context.minimap.size.fill","Fill"),value:"fill"},{label:p("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(r(p("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:p("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:p("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(117)&&!Ur;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Eg.ID="editor.contrib.contextmenu";Eg=_oe([$h(1,ll),$h(2,vh),$h(3,Ee),$h(4,_i),$h(5,ph),$h(6,ot)],Eg);class boe extends ce{constructor(){super({id:"editor.action.showContextMenu",label:p("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=Eg.get(t))===null||i===void 0||i.showContextMenu()}}tt(Eg.ID,Eg);ie(boe);class ky{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new ky(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new xy(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(Jd.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new xy(new ky(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new xy(new ky(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}Jd.ID="editor.contrib.cursorUndoRedoController";class voe extends ce{constructor(){super({id:"cursorUndo",label:p("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;(n=Jd.get(t))===null||n===void 0||n.cursorUndo()}}class Coe extends ce{constructor(){super({id:"cursorRedo",label:p("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;(n=Jd.get(t))===null||n===void 0||n.cursorRedo()}}tt(Jd.ID,Jd);ie(voe);ie(Coe);class woe{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new L(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new oe(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new oe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(31)||this._editor.getOption(18)||(jh(e)&&(this._modifierPressed=!0),this._mouseDown&&jh(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(31)||this._editor.getOption(18)||(jh(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Za.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}jh(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new B(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new oe(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new oe(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(jh(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Za.ID,new woe(this._dragSelection,t,jh(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),options:Za._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}Za.ID="editor.contrib.dragAndDrop";Za.TRIGGER_KEY_VALUE=Ge?6:5;Za._DECORATION_OPTIONS=Ne.register({description:"dnd-target",className:"dnd-target"});tt(Za.ID,Za);var l9=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sp=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},R0=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Vm=class extends H{constructor(e,t,i,n,s){super(),this._bulkEditService=t,this._languageFeaturesService=i,this._progressService=n,this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new bx(s))}onDropIntoEditor(e,t,i){return R0(this,void 0,void 0,function*(){if(!i.dataTransfer||!e.hasModel())return;const n=e.getModel(),s=n.getVersionId(),r=yield this.extractDataTransferData(i);if(r.size===0||e.getModel().getVersionId()!==s)return;const a=new qd(e,1);try{const l=this._languageFeaturesService.documentOnDropEditProvider.ordered(n),c=yield this._progressService.withProgress({location:15,delay:750,title:p("dropProgressTitle","Running drop handlers..."),cancellable:!0},()=>MI((()=>R0(this,void 0,void 0,function*(){for(const d of l){const h=yield d.provideDocumentOnDropEdits(n,t,r,a.token);if(a.token.isCancellationRequested)return;if(h)return h}}))(),a.token),()=>{a.cancel()});if(a.token.isCancellationRequested||e.getModel().getVersionId()!==s)return;if(c){const d=new L(t.lineNumber,t.column,t.lineNumber,t.column);r9(e,typeof c.insertText=="string"?_c.escape(c.insertText):c.insertText.snippet,[oe.fromRange(d,0)]),c.additionalEdit&&(yield this._bulkEditService.apply(Qg.convert(c.additionalEdit),{editor:e}));return}}finally{a.dispose()}})}extractDataTransferData(e){return R0(this,void 0,void 0,function*(){if(!e.dataTransfer)return new n9;const t=_x(e.dataTransfer);return roe(t,e),t})}};Vm.ID="editor.contrib.dropIntoEditorController";Vm=l9([sp(1,v_),sp(2,de),sp(3,G5),sp(4,_m)],Vm);let bx=class{constructor(e){this._workspaceContextService=e}provideDocumentOnDropEdits(e,t,i,n){var s;return R0(this,void 0,void 0,function*(){const r=i.get(Vn.uriList);if(r){const l=yield r.asString(),c=this.getUriListInsertText(l);if(c)return{insertText:c}}const a=(s=i.get("text"))!==null&&s!==void 0?s:i.get(Vn.text);if(a)return{insertText:yield a.asString()}})}getUriListInsertText(e){const t=[];for(const i of iT.parse(e))try{t.push(_e.parse(i))}catch{}if(!!t.length)return t.map(i=>{const n=this._workspaceContextService.getWorkspaceFolder(i);if(n){const s=Eq(n.uri,i);if(s)return s}return i.fsPath}).join(" ")}};bx=l9([sp(0,_m)],bx);tt(Vm.ID,Vm);class fn{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const n=i.options;if(n===fn._FIND_MATCH_DECORATION||n===fn._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,fn._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,fn._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);s=new L(s.startLineNumber,s.startColumn,r,a)}this._rangeHighlightDecorationId=n.addDecoration(s,fn._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=fn._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=fn._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c));let h=e[0].range.startLineNumber,u=e[0].range.endLineNumber;for(let g=1,f=e.length;g=_.startLineNumber?_.endLineNumber>u&&(u=_.endLineNumber):(s.push({range:new L(h,1,u,1),options:fn._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=_.startLineNumber,u=_.endLineNumber)}s.push({range:new L(h,1,u,1),options:fn._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let a=0,l=e.length;ai.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,fn._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return s;if(!(s.startColumn0){const i=[];for(let r=0;rL.compareRangesUsingStarts(r.range,a.range));const n=[];let s=i[0];for(let r=1;r0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function $R(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function jR(o,e,t){const i=e.split(t),n=o[0].split(t);let s="";return i.forEach((r,a)=>{s+=c9([n[a]],r)+t}),s.slice(0,-1)}class KR{constructor(e){this.staticValue=e,this.kind=0}}class yoe{constructor(e){this.pieces=e,this.kind=1}}class Ng{constructor(e){!e||e.length===0?this._state=new KR(""):e.length===1&&e[0].staticValue!==null?this._state=new KR(e[0].staticValue):this._state=new yoe(e)}static fromStaticValue(e){return new Ng([xd.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(e,t){if(this._state.kind===0)return t?c9(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const l=[],c=r.caseOps.length;let d=0;for(let h=0,u=a.length;h=c){l.push(a.slice(h));break}switch(r.caseOps[d]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),d++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),d++;break;default:l.push(a[h])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e=n)break;const r=o.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` -`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=o.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,nt(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||!this._editor.hasModel()||(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},koe)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new L(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,Hl);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const a=BO(n.map(l=>l.range),l=>L.compareRangesUsingStarts(l,s)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(37).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new B(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new B(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()Np._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Hl?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new $c(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let h="mu";i.ignoreCase&&(h+="i"),i.global&&(h+="g"),i=new RegExp(i.source,h)}const n=this._editor.getModel(),s=n.getValue(1),r=n.getFullModelRange(),a=this._getReplacePattern();let l;const c=this._state.preserveCase;a.hasReplacementPatterns||c?l=s.replace(i,function(){return a.buildReplaceString(arguments,c)}):l=s.replace(i,a.buildReplaceString(null,c));const d=new gE(r,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let r=0,a=i.length;rr.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(s=>new oe(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn));const n=this._editor.getSelection();for(let s=0,r=i.length;sthis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s=n.getColorTheme().getColor(_v),r=n.getColorTheme().getColor(vv),a=n.getColorTheme().getColor(bv);this.caseSensitive=this._register(new MF({appendTitle:this._keybindingLabelFor(kt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:s,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new RF({appendTitle:this._keybindingLabelFor(kt.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:s,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new OF({appendTitle:this._keybindingLabelFor(kt.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:s,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(l=>{let c=!1;l.isRegex&&(this.regex.checked=this._state.isRegex,c=!0),l.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,c=!0),l.matchCase&&(this.caseSensitive.checked=this._state.matchCase,c=!0),!this._state.isRevealed&&c&&this._revealTemporarily()})),this._register(G(this._domNode,ae.MOUSE_LEAVE,l=>this._onMouseLeave())),this._register(G(this._domNode,"mouseover",l=>this._onMouseOver())),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return uw.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){!this._isVisible||(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){const t={inputActiveOptionBorder:e.getColor(_v),inputActiveOptionForeground:e.getColor(vv),inputActiveOptionBackground:e.getColor(bv)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}uw.ID="editor.contrib.findOptionsWidget";Et((o,e)=>{const t=o.getColor(li);t&&e.addRule(`.monaco-editor .findOptionsWidget { background-color: ${t}; }`);const i=o.getColor(zo);i&&e.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const n=o.getColor(Ho);n&&e.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${n}; }`);const s=o.getColor(We);s&&e.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${s}; }`)});function t0(o,e){return o===1?!0:o===2?!1:e}class xoe extends H{constructor(){super(),this._onFindReplaceStateChange=this._register(new R),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return t0(this._isRegexOverride,this._isRegex)}get wholeWord(){return t0(this._wholeWordOverride,this._wholeWord)}get matchCase(){return t0(this._matchCaseOverride,this._matchCase)}get preserveCase(){return t0(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),typeof i<"u"&&(L.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;const a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,r=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,r=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,r=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(h=>{var u;return(u=this._searchScope)===null||u===void 0?void 0:u.some(g=>!L.equalsRange(g,h))})||(this._searchScope=e.searchScope,s.searchScope=!0,r=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,r=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,r=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,r=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,a!==this.isRegex&&(r=!0,s.isRegex=!0),l!==this.wholeWord&&(r=!0,s.wholeWord=!0),c!==this.matchCase&&(r=!0,s.matchCase=!0),d!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Hl}}function qR(o){var e,t;return((e=o.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=o.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var Ioe=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Eoe=mi("find-selection",m.selection,p("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),GR=mi("find-collapsed",m.chevronRight,p("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),ZR=mi("find-expanded",m.chevronDown,p("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Noe=mi("find-replace",m.replace,p("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Toe=mi("find-replace-all",m.replaceAll,p("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Aoe=mi("find-previous-match",m.arrowUp,p("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Moe=mi("find-next-match",m.arrowDown,p("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Roe=p("label.find","Find"),Ooe=p("placeholder.find","Find"),Poe=p("label.previousMatchButton","Previous Match"),Foe=p("label.nextMatchButton","Next Match"),Boe=p("label.toggleSelectionFind","Find in Selection"),Woe=p("label.closeButton","Close"),Voe=p("label.replace","Replace"),Hoe=p("placeholder.replace","Replace"),zoe=p("label.replaceButton","Replace"),Uoe=p("label.replaceAllButton","Replace All"),$oe=p("label.toggleReplaceButton","Toggle Replace"),joe=p("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Hl),Koe=p("label.matchesLocation","{0} of {1}"),YR=p("label.noResults","No results"),fr=419,qoe=275,Goe=qoe-54;let Mf=69;const Zoe=33,QR="ctrlEnterReplaceAll.windows.donotask",XR=Ge?256:2048;class Iy{constructor(e){this.afterLineNumber=e,this.heightInPx=Zoe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function JR(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){o.stopPropagation();return}}function eO(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(83)&&(this._codeEditor.getOption(83)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(133)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(37)){const h=this._codeEditor.getOption(37).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new Iy(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ioe(this,void 0,void 0,function*(){if(this._isVisible){const d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=hw.bindTo(r),this._findFocusTracker=this._register(Od(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=sT.bindTo(r),this._replaceFocusTracker=this._register(Od(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(37).addExtraSpaceOnTop&&(this._viewZone=new Iy(0)),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return gw.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(83)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=co(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Te)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Mf+"px",this._state.matchesCount>=Hl?this._matchesCount.title=joe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Hl&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=Vs(Koe,i,t)}else e=YR;this._matchesCount.appendChild(document.createTextNode(e)),Gi(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Mf=Math.max(Mf,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===YR)return i===""?p("ariaSearchNoResultEmpty","{0} found",e):p("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=p("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return p("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(83);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(37).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(37).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=on(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);const l=s4(this._domNode).left;r>l&&(t=!1);const c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(37).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(37).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new Iy(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;const r=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(77).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){const t={inputActiveOptionBorder:e.getColor(_v),inputActiveOptionBackground:e.getColor(bv),inputActiveOptionForeground:e.getColor(vv),inputBackground:e.getColor(g1),inputForeground:e.getColor(f1),inputBorder:e.getColor(p1),inputValidationInfoBackground:e.getColor(ZI),inputValidationInfoForeground:e.getColor(YI),inputValidationInfoBorder:e.getColor(QI),inputValidationWarningBackground:e.getColor(XI),inputValidationWarningForeground:e.getColor(JI),inputValidationWarningBorder:e.getColor(eE),inputValidationErrorBackground:e.getColor(tE),inputValidationErrorForeground:e.getColor(iE),inputValidationErrorBorder:e.getColor(nE)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible||!jI(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,r=!1,a=!1;if(this._resized&&co(this._domNode)>fr){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=co(this._findInput.domNode);return}if(fr+28+n>=i&&(r=!0),fr+28+n-Mf>=i&&(a=!0),fr+28+n-Mf>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",r),!a&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._resized){this._findInput.inputBox.layout();const l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=co(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!!this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!L.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(XR|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),this._selectionId=t.trackSelection(i);return}i.startLineNumbers?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class nT extends ce{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(si);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(19),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>L.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$h=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Eg=class a9{constructor(e,t,i,n,s,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._toDispose=new Q,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&Rd(c)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(l=>{!this._editor.getOption(20)||l.keyCode===58&&(l.preventDefault(),l.stopPropagation(),this.showContextMenu())}))}static get(e){return e.getContribution(a9.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?M.SimpleEditorContext:M.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const r of s){const[,a]=r;let l=0;for(const c of a)if(c instanceof GI){const d=this._getMenuActions(e,c.item.submenu);d.length>0&&(i.push(new Qp(c.id,c.label,d)),l++)}else i.push(c),l++;l&&i.push(new ln)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(55);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),r=on(this._editor.getDomNode()),a=r.left+s.left,l=r.top+s.top+s.height;t={x:a,y:l}}const n=this._editor.getOption(117)&&!Ur;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:s=>{const r=this._keybindingFor(s);if(r)return new fm(s,s,{label:!0,keybinding:r.getLabel(),isMenu:!0});const a=s;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new fm(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;const t=this._editor.getOption(67);let i=0;const n=c=>({id:`menu-action-${++i}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run,dispose:()=>null}),s=(c,d)=>new Qp(`menu-action-${++i}`,c,d,void 0),r=(c,d,h,u,g)=>{if(!d)return n({label:c,enabled:d,run:()=>{}});const f=b=>()=>{this._configurationService.updateValue(h,b)},_=[];for(const b of g)_.push(n({label:b.label,checked:u===b.value,run:f(b.value)}));return s(c,_)},a=[];a.push(n({label:p("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ln),a.push(n({label:p("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(r(p("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:p("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:p("context.minimap.size.fill","Fill"),value:"fill"},{label:p("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(r(p("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:p("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:p("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(117)&&!Ur;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Eg.ID="editor.contrib.contextmenu";Eg=_oe([$h(1,ll),$h(2,vh),$h(3,Ee),$h(4,_i),$h(5,ph),$h(6,ot)],Eg);class boe extends ce{constructor(){super({id:"editor.action.showContextMenu",label:p("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=Eg.get(t))===null||i===void 0||i.showContextMenu()}}tt(Eg.ID,Eg);ie(boe);class ky{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new ky(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new xy(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(Jd.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new xy(new ky(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new xy(new ky(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}Jd.ID="editor.contrib.cursorUndoRedoController";class voe extends ce{constructor(){super({id:"cursorUndo",label:p("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;(n=Jd.get(t))===null||n===void 0||n.cursorUndo()}}class Coe extends ce{constructor(){super({id:"cursorRedo",label:p("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;(n=Jd.get(t))===null||n===void 0||n.cursorRedo()}}tt(Jd.ID,Jd);ie(voe);ie(Coe);class woe{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new L(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new oe(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new oe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(31)||this._editor.getOption(18)||(jh(e)&&(this._modifierPressed=!0),this._mouseDown&&jh(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(31)||this._editor.getOption(18)||(jh(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Za.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}jh(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new B(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new oe(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new oe(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(jh(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Za.ID,new woe(this._dragSelection,t,jh(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),options:Za._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}Za.ID="editor.contrib.dragAndDrop";Za.TRIGGER_KEY_VALUE=Ge?6:5;Za._DECORATION_OPTIONS=Ne.register({description:"dnd-target",className:"dnd-target"});tt(Za.ID,Za);var l9=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sp=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},R0=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Vm=class extends H{constructor(e,t,i,n,s){super(),this._bulkEditService=t,this._languageFeaturesService=i,this._progressService=n,this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new bx(s))}onDropIntoEditor(e,t,i){return R0(this,void 0,void 0,function*(){if(!i.dataTransfer||!e.hasModel())return;const n=e.getModel(),s=n.getVersionId(),r=yield this.extractDataTransferData(i);if(r.size===0||e.getModel().getVersionId()!==s)return;const a=new qd(e,1);try{const l=this._languageFeaturesService.documentOnDropEditProvider.ordered(n),c=yield this._progressService.withProgress({location:15,delay:750,title:p("dropProgressTitle","Running drop handlers..."),cancellable:!0},()=>MI((()=>R0(this,void 0,void 0,function*(){for(const d of l){const h=yield d.provideDocumentOnDropEdits(n,t,r,a.token);if(a.token.isCancellationRequested)return;if(h)return h}}))(),a.token),()=>{a.cancel()});if(a.token.isCancellationRequested||e.getModel().getVersionId()!==s)return;if(c){const d=new L(t.lineNumber,t.column,t.lineNumber,t.column);r9(e,typeof c.insertText=="string"?_c.escape(c.insertText):c.insertText.snippet,[oe.fromRange(d,0)]),c.additionalEdit&&(yield this._bulkEditService.apply(Qg.convert(c.additionalEdit),{editor:e}));return}}finally{a.dispose()}})}extractDataTransferData(e){return R0(this,void 0,void 0,function*(){if(!e.dataTransfer)return new n9;const t=_x(e.dataTransfer);return roe(t,e),t})}};Vm.ID="editor.contrib.dropIntoEditorController";Vm=l9([sp(1,v_),sp(2,de),sp(3,GF),sp(4,_m)],Vm);let bx=class{constructor(e){this._workspaceContextService=e}provideDocumentOnDropEdits(e,t,i,n){var s;return R0(this,void 0,void 0,function*(){const r=i.get(Vn.uriList);if(r){const l=yield r.asString(),c=this.getUriListInsertText(l);if(c)return{insertText:c}}const a=(s=i.get("text"))!==null&&s!==void 0?s:i.get(Vn.text);if(a)return{insertText:yield a.asString()}})}getUriListInsertText(e){const t=[];for(const i of iT.parse(e))try{t.push(_e.parse(i))}catch{}if(!!t.length)return t.map(i=>{const n=this._workspaceContextService.getWorkspaceFolder(i);if(n){const s=Eq(n.uri,i);if(s)return s}return i.fsPath}).join(" ")}};bx=l9([sp(0,_m)],bx);tt(Vm.ID,Vm);class fn{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const n=i.options;if(n===fn._FIND_MATCH_DECORATION||n===fn._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,fn._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,fn._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);s=new L(s.startLineNumber,s.startColumn,r,a)}this._rangeHighlightDecorationId=n.addDecoration(s,fn._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=fn._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=fn._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c));let h=e[0].range.startLineNumber,u=e[0].range.endLineNumber;for(let g=1,f=e.length;g=_.startLineNumber?_.endLineNumber>u&&(u=_.endLineNumber):(s.push({range:new L(h,1,u,1),options:fn._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=_.startLineNumber,u=_.endLineNumber)}s.push({range:new L(h,1,u,1),options:fn._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let a=0,l=e.length;ai.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,fn._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return s;if(!(s.startColumn0){const i=[];for(let r=0;rL.compareRangesUsingStarts(r.range,a.range));const n=[];let s=i[0];for(let r=1;r0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function $R(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function jR(o,e,t){const i=e.split(t),n=o[0].split(t);let s="";return i.forEach((r,a)=>{s+=c9([n[a]],r)+t}),s.slice(0,-1)}class KR{constructor(e){this.staticValue=e,this.kind=0}}class yoe{constructor(e){this.pieces=e,this.kind=1}}class Ng{constructor(e){!e||e.length===0?this._state=new KR(""):e.length===1&&e[0].staticValue!==null?this._state=new KR(e[0].staticValue):this._state=new yoe(e)}static fromStaticValue(e){return new Ng([xd.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(e,t){if(this._state.kind===0)return t?c9(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const l=[],c=r.caseOps.length;let d=0;for(let h=0,u=a.length;h=c){l.push(a.slice(h));break}switch(r.caseOps[d]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),d++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),d++;break;default:l.push(a[h])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e=n)break;const r=o.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` +`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=o.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,nt(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||!this._editor.hasModel()||(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},koe)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new L(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,Hl);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const a=BO(n.map(l=>l.range),l=>L.compareRangesUsingStarts(l,s)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(37).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new B(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new B(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()Np._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Hl?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new $c(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let h="mu";i.ignoreCase&&(h+="i"),i.global&&(h+="g"),i=new RegExp(i.source,h)}const n=this._editor.getModel(),s=n.getValue(1),r=n.getFullModelRange(),a=this._getReplacePattern();let l;const c=this._state.preserveCase;a.hasReplacementPatterns||c?l=s.replace(i,function(){return a.buildReplaceString(arguments,c)}):l=s.replace(i,a.buildReplaceString(null,c));const d=new gE(r,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let r=0,a=i.length;rr.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(s=>new oe(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn));const n=this._editor.getSelection();for(let s=0,r=i.length;sthis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s=n.getColorTheme().getColor(_v),r=n.getColorTheme().getColor(vv),a=n.getColorTheme().getColor(bv);this.caseSensitive=this._register(new M5({appendTitle:this._keybindingLabelFor(kt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:s,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new R5({appendTitle:this._keybindingLabelFor(kt.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:s,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new O5({appendTitle:this._keybindingLabelFor(kt.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:s,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(l=>{let c=!1;l.isRegex&&(this.regex.checked=this._state.isRegex,c=!0),l.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,c=!0),l.matchCase&&(this.caseSensitive.checked=this._state.matchCase,c=!0),!this._state.isRevealed&&c&&this._revealTemporarily()})),this._register(G(this._domNode,ae.MOUSE_LEAVE,l=>this._onMouseLeave())),this._register(G(this._domNode,"mouseover",l=>this._onMouseOver())),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return uw.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){!this._isVisible||(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){const t={inputActiveOptionBorder:e.getColor(_v),inputActiveOptionForeground:e.getColor(vv),inputActiveOptionBackground:e.getColor(bv)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}uw.ID="editor.contrib.findOptionsWidget";Et((o,e)=>{const t=o.getColor(li);t&&e.addRule(`.monaco-editor .findOptionsWidget { background-color: ${t}; }`);const i=o.getColor(zo);i&&e.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const n=o.getColor(Ho);n&&e.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${n}; }`);const s=o.getColor(We);s&&e.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${s}; }`)});function t0(o,e){return o===1?!0:o===2?!1:e}class xoe extends H{constructor(){super(),this._onFindReplaceStateChange=this._register(new R),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return t0(this._isRegexOverride,this._isRegex)}get wholeWord(){return t0(this._wholeWordOverride,this._wholeWord)}get matchCase(){return t0(this._matchCaseOverride,this._matchCase)}get preserveCase(){return t0(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),typeof i<"u"&&(L.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;const a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,r=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,r=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,r=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(h=>{var u;return(u=this._searchScope)===null||u===void 0?void 0:u.some(g=>!L.equalsRange(g,h))})||(this._searchScope=e.searchScope,s.searchScope=!0,r=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,r=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,r=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,r=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,a!==this.isRegex&&(r=!0,s.isRegex=!0),l!==this.wholeWord&&(r=!0,s.wholeWord=!0),c!==this.matchCase&&(r=!0,s.matchCase=!0),d!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Hl}}function qR(o){var e,t;return((e=o.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=o.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var Ioe=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Eoe=mi("find-selection",m.selection,p("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),GR=mi("find-collapsed",m.chevronRight,p("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),ZR=mi("find-expanded",m.chevronDown,p("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Noe=mi("find-replace",m.replace,p("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Toe=mi("find-replace-all",m.replaceAll,p("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Aoe=mi("find-previous-match",m.arrowUp,p("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Moe=mi("find-next-match",m.arrowDown,p("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Roe=p("label.find","Find"),Ooe=p("placeholder.find","Find"),Poe=p("label.previousMatchButton","Previous Match"),Foe=p("label.nextMatchButton","Next Match"),Boe=p("label.toggleSelectionFind","Find in Selection"),Woe=p("label.closeButton","Close"),Voe=p("label.replace","Replace"),Hoe=p("placeholder.replace","Replace"),zoe=p("label.replaceButton","Replace"),Uoe=p("label.replaceAllButton","Replace All"),$oe=p("label.toggleReplaceButton","Toggle Replace"),joe=p("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Hl),Koe=p("label.matchesLocation","{0} of {1}"),YR=p("label.noResults","No results"),fr=419,qoe=275,Goe=qoe-54;let Mf=69;const Zoe=33,QR="ctrlEnterReplaceAll.windows.donotask",XR=Ge?256:2048;class Iy{constructor(e){this.afterLineNumber=e,this.heightInPx=Zoe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function JR(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){o.stopPropagation();return}}function eO(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(83)&&(this._codeEditor.getOption(83)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(133)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(37)){const h=this._codeEditor.getOption(37).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new Iy(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ioe(this,void 0,void 0,function*(){if(this._isVisible){const d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=hw.bindTo(r),this._findFocusTracker=this._register(Od(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=sT.bindTo(r),this._replaceFocusTracker=this._register(Od(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(37).addExtraSpaceOnTop&&(this._viewZone=new Iy(0)),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return gw.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(83)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=co(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Te)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Mf+"px",this._state.matchesCount>=Hl?this._matchesCount.title=joe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Hl&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=Vs(Koe,i,t)}else e=YR;this._matchesCount.appendChild(document.createTextNode(e)),Gi(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Mf=Math.max(Mf,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===YR)return i===""?p("ariaSearchNoResultEmpty","{0} found",e):p("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=p("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return p("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(83);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(37).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(37).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=on(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);const l=s4(this._domNode).left;r>l&&(t=!1);const c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(37).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(37).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new Iy(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;const r=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(77).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){const t={inputActiveOptionBorder:e.getColor(_v),inputActiveOptionBackground:e.getColor(bv),inputActiveOptionForeground:e.getColor(vv),inputBackground:e.getColor(g1),inputForeground:e.getColor(f1),inputBorder:e.getColor(p1),inputValidationInfoBackground:e.getColor(ZI),inputValidationInfoForeground:e.getColor(YI),inputValidationInfoBorder:e.getColor(QI),inputValidationWarningBackground:e.getColor(XI),inputValidationWarningForeground:e.getColor(JI),inputValidationWarningBorder:e.getColor(eE),inputValidationErrorBackground:e.getColor(tE),inputValidationErrorForeground:e.getColor(iE),inputValidationErrorBorder:e.getColor(nE)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible||!jI(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,r=!1,a=!1;if(this._resized&&co(this._domNode)>fr){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=co(this._findInput.domNode);return}if(fr+28+n>=i&&(r=!0),fr+28+n-Mf>=i&&(a=!0),fr+28+n-Mf>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",r),!a&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._resized){this._findInput.inputBox.layout();const l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=co(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!!this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!L.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(XR|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return JR(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return eO(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(XR|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Yi&&jo&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(p("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(QR,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return JR(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return eO(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new rx(null,this._contextViewProvider,{width:Goe,label:Roe,placeholder:Ooe,appendCaseSensitiveLabel:this._keybindingLabelFor(kt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(kt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(kt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>qR(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),dn&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Kh({label:Poe+this._keybindingLabelFor(kt.PreviousMatchFindAction),icon:Aoe,onTrigger:()=>{this._codeEditor.getAction(kt.PreviousMatchFindAction).run().then(void 0,Te)}})),this._nextBtn=this._register(new Kh({label:Foe+this._keybindingLabelFor(kt.NextMatchFindAction),icon:Moe,onTrigger:()=>{this._codeEditor.getAction(kt.NextMatchFindAction).run().then(void 0,Te)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y_({icon:Eoe,title:Boe+this._keybindingLabelFor(kt.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Kh({label:Woe+this._keybindingLabelFor(kt.CloseFindWidgetCommand),icon:K5,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new ax(null,void 0,{label:Voe,placeholder:Hoe,appendPreserveCaseLabel:this._keybindingLabelFor(kt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>qR(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new Kh({label:zoe+this._keybindingLabelFor(kt.ReplaceOneAction),icon:Noe,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new Kh({label:Uoe+this._keybindingLabelFor(kt.ReplaceAllAction),icon:Toe,onTrigger:()=>{this._controller.replaceAll()}}));const s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const r=document.createElement("div");r.className="replace-actions",s.appendChild(r),r.appendChild(this._replaceBtn.domNode),r.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Kh({label:$oe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=co(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${fr}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(s),this._resizeSash=new tn(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=fr;this._register(this._resizeSash.onDidStart(()=>{a=co(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;const c=a+l.startX-l.currentX;if(cd||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=co(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=co(this._domNode);if(l{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{var n,s;if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}(s=(n=this._opts).onKeyDown)===null||s===void 0||s.call(n,i)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...at.asClassNameArray(GR)),this._domNode.classList.add(...at.asClassNameArray(ZR))):(this._domNode.classList.remove(...at.asClassNameArray(ZR)),this._domNode.classList.add(...at.asClassNameArray(GR)))}}Et((o,e)=>{const t=(f,_)=>{_&&e.addRule(`.monaco-editor ${f} { background-color: ${_}; }`)};t(".findMatch",o.getColor(Va)),t(".currentFindMatch",o.getColor(qz)),t(".findScope",o.getColor(Gz));const i=o.getColor(li);t(".find-widget",i);const n=o.getColor(Ho);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=o.getColor(cd);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${cn(o.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=o.getColor(Zz);r&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=o.getColor(Yz);a&&e.addRule(`.monaco-editor .findScope { border: 1px ${cn(o.type)?"dashed":"solid"} ${a}; }`);const l=o.getColor(We);l&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const c=o.getColor(zo);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const d=o.getColor(Iz);d&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const h=o.getColor(Pz);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const f=o.getColor(Ba);f&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${f}; }`)}const u=o.getColor(hD);u&&e.addRule(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return JR(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return eO(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new rx(null,this._contextViewProvider,{width:Goe,label:Roe,placeholder:Ooe,appendCaseSensitiveLabel:this._keybindingLabelFor(kt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(kt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(kt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>qR(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),dn&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Kh({label:Poe+this._keybindingLabelFor(kt.PreviousMatchFindAction),icon:Aoe,onTrigger:()=>{this._codeEditor.getAction(kt.PreviousMatchFindAction).run().then(void 0,Te)}})),this._nextBtn=this._register(new Kh({label:Foe+this._keybindingLabelFor(kt.NextMatchFindAction),icon:Moe,onTrigger:()=>{this._codeEditor.getAction(kt.NextMatchFindAction).run().then(void 0,Te)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y_({icon:Eoe,title:Boe+this._keybindingLabelFor(kt.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Kh({label:Woe+this._keybindingLabelFor(kt.CloseFindWidgetCommand),icon:KF,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new ax(null,void 0,{label:Voe,placeholder:Hoe,appendPreserveCaseLabel:this._keybindingLabelFor(kt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>qR(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new Kh({label:zoe+this._keybindingLabelFor(kt.ReplaceOneAction),icon:Noe,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new Kh({label:Uoe+this._keybindingLabelFor(kt.ReplaceAllAction),icon:Toe,onTrigger:()=>{this._controller.replaceAll()}}));const s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const r=document.createElement("div");r.className="replace-actions",s.appendChild(r),r.appendChild(this._replaceBtn.domNode),r.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Kh({label:$oe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=co(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${fr}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(s),this._resizeSash=new tn(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=fr;this._register(this._resizeSash.onDidStart(()=>{a=co(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;const c=a+l.startX-l.currentX;if(cd||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=co(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=co(this._domNode);if(l{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{var n,s;if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}(s=(n=this._opts).onKeyDown)===null||s===void 0||s.call(n,i)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...at.asClassNameArray(GR)),this._domNode.classList.add(...at.asClassNameArray(ZR))):(this._domNode.classList.remove(...at.asClassNameArray(ZR)),this._domNode.classList.add(...at.asClassNameArray(GR)))}}Et((o,e)=>{const t=(f,_)=>{_&&e.addRule(`.monaco-editor ${f} { background-color: ${_}; }`)};t(".findMatch",o.getColor(Va)),t(".currentFindMatch",o.getColor(qz)),t(".findScope",o.getColor(Gz));const i=o.getColor(li);t(".find-widget",i);const n=o.getColor(Ho);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=o.getColor(cd);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${cn(o.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=o.getColor(Zz);r&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=o.getColor(Yz);a&&e.addRule(`.monaco-editor .findScope { border: 1px ${cn(o.type)?"dashed":"solid"} ${a}; }`);const l=o.getColor(We);l&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const c=o.getColor(zo);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const d=o.getColor(Iz);d&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const h=o.getColor(Pz);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const f=o.getColor(Ba);f&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${f}; }`)}const u=o.getColor(hD);u&&e.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${u} !important; @@ -758,7 +758,7 @@ The flag will not be saved for the future. `)});class qre extends ce{constructor(){super({id:"editor.action.fontZoomIn",label:p("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){el.setZoomLevel(el.getZoomLevel()+1)}}class Gre extends ce{constructor(){super({id:"editor.action.fontZoomOut",label:p("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){el.setZoomLevel(el.getZoomLevel()-1)}}class Zre extends ce{constructor(){super({id:"editor.action.fontZoomReset",label:p("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){el.setZoomLevel(0)}}ie(qre);ie(Gre);ie(Zre);var v9=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yC=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},lT=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Hm=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new Q,this._sessionDisposables=new Q,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(n=>{n.hasChanged(51)&&this._update()}))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(51)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new cu;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{const s=n.charCodeAt(n.length-1);i.has(s)&&this._trigger(String.fromCharCode(s))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new Qi,s=this._editor.onDidChangeModelContent(r=>{if(r.isFlush){n.cancel(),s.dispose();return}for(let a=0,l=r.changes.length;a{n.token.isCancellationRequested||rn(r)&&(Lg.execute(this._editor,r,!0),AN(r))}).finally(()=>{s.dispose()})}};Hm.ID="editor.contrib.autoFormat";Hm=v9([yC(1,de),yC(2,to)],Hm);let zm=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new Q,this._callOnModel=new Q,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(50)&&(!this.editor.hasModel()||!this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())||this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e))))}_trigger(e){!this.editor.hasModel()||this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f3,this.editor,e,2,Ch.None,ze.None).catch(Te)}};zm.ID="editor.contrib.formatOnPaste";zm=v9([yC(1,de),yC(2,Ae)],zm);class Yre extends ce{constructor(){super({id:"editor.action.formatDocument",label:p("formatDocument.label","Format Document"),alias:"Format Document",precondition:se.and(N.notInCompositeEditor,N.writable,N.hasDocumentFormattingProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return lT(this,void 0,void 0,function*(){if(t.hasModel()){const i=e.get(Ae);yield e.get(kc).showWhile(i.invokeFunction(Mte,t,1,Ch.None,ze.None),250)}})}}class Qre extends ce{constructor(){super({id:"editor.action.formatSelection",label:p("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:se.and(N.writable,N.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:yi(2089,2084),weight:100},contextMenuOpts:{when:N.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return lT(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(Ae),n=t.getModel(),s=t.getSelections().map(a=>a.isEmpty()?new L(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);yield e.get(kc).showWhile(i.invokeFunction(f3,t,s,1,Ch.None,ze.None),250)})}}tt(Hm.ID,Hm);tt(zm.ID,zm);ie(Yre);ie(Qre);Xe.registerCommand("editor.action.format",o=>lT(void 0,void 0,void 0,function*(){const e=o.get(ct).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=o.get(ci);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}));var Xre=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ny=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Jre=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class xu{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}}class LC extends xu{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class eae extends xu{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class Ea extends xu{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t,i){const n=new Qi(i),s=new Ea(t.uri),r=e.ordered(t),a=r.map((c,d)=>{var h;const u=xu.findId(`provider_${d}`,s),g=new eae(u,s,(h=c.displayName)!==null&&h!==void 0?h:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,n.token)).then(f=>{for(const _ of f||[])Ea._makeOutlineElement(_,g);return g},f=>(Pi(f),g)).then(f=>{xu.empty(f)?f.remove():s._groups.set(u,f)})}),l=e.onDidChange(()=>{const c=e.ordered(t);Ss(c,r)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!i.isCancellationRequested?Ea.create(e,t,i):s._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){const i=xu.findId(e,t),n=new LC(i,t,e);if(e.children)for(const s of e.children)Ea._makeOutlineElement(s,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=je.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof LC?e.push(t.symbol):e.push(...je.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>L.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return Ea._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>B.compare(L.getStartPosition(i.range),L.getStartPosition(n.range))||B.compare(L.getEndPosition(n.range),L.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&Ea._flattenDocumentSymbols(e,n.children,n.name)}}const pw=Ye("IOutlineModelService");let wx=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new Q,this._cache=new Dc(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved(n=>{this._cache.delete(n.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return Jre(this,void 0,void 0,function*(){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!Ss(s.provider,n)){const a=new Qi;s={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:a,promise:Ea.create(i,e,a.token),model:void 0},this._cache.set(e.id,s);const l=Date.now();s.promise.then(c=>{s.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(s.model)return s.model;s.promiseCnt+=1;const r=t.onCancellationRequested(()=>{--s.promiseCnt===0&&(s.source.cancel(),this._cache.delete(e.id))});try{return yield s.promise}finally{r.dispose()}})}};wx=Xre([Ny(0,de),Ny(1,no),Ny(2,Ut)],wx);et(pw,wx,!0);var tae=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};Xe.registerCommand("_executeDocumentSymbolProvider",function(o,...e){return tae(this,void 0,void 0,function*(){const[t]=e;pt(_e.isUri(t));const i=o.get(pw),s=yield o.get(Kn).createModelReference(t);try{return(yield i.getOrCreate(s.object.textEditorModel,ze.None)).getTopLevelSymbols()}finally{s.dispose()}})});const DC="editor.action.inlineSuggest.commit";function iae(o,e){return{object:o,dispose:()=>e==null?void 0:e.dispose()}}function nae(o,e){const t=new sae(o),i=e.map(n=>{const s=L.lift(n.range);return{startOffset:t.getOffset(s.getStartPosition()),endOffset:t.getOffset(s.getEndPosition()),text:n.text}});i.sort((n,s)=>s.startOffset-n.startOffset);for(const n of i)o=o.substring(0,n.startOffset)+n.text+o.substring(n.endOffset);return o}class sae{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(` `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}class Sx{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class w9{constructor(e,t,i,n,s=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=n,this.additionalReservedLineCount=s,this.parts=[new Sx(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` -`)}}class S9 extends H{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(108)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function kC(o,e){if(!e)return e;const t=o.getValueInRange(e.range),i=Nd(t,e.insertText),n=o.getOffsetAt(e.range.getStartPosition())+i,s=o.getPositionAt(n),r=t.substr(i),a=Wp(r,e.insertText),l=o.getPositionAt(Math.max(n,o.getOffsetAt(e.range.getEndPosition())-a));return{range:L.fromPositions(s,l),insertText:e.insertText.substr(i,e.insertText.length-i-a),snippetInfo:e.snippetInfo,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}function aae(o,e){return o===e?!0:!o||!e?!1:o.range.equalsRange(e.range)&&o.insertText===e.insertText&&o.command===e.command}function y9(o,e,t,i,n=0){if(o.range.startLineNumber!==o.range.endLineNumber)return;const s=e.getLineContent(o.range.startLineNumber),r=_t(s).length;if(o.range.startColumn-1<=r){const g=_t(o.insertText).length,f=s.substring(o.range.startColumn-1,r),_=L.fromPositions(o.range.getStartPosition().delta(0,f.length),o.range.getEndPosition()),b=o.insertText.startsWith(f)?o.insertText.substring(f.length):o.insertText.substring(g);o={range:_,insertText:b,command:o.command,snippetInfo:void 0,filterText:o.filterText,additionalTextEdits:o.additionalTextEdits}}const l=e.getValueInRange(o.range),c=lae(l,o.insertText);if(!c)return;const d=o.range.startLineNumber,h=new Array;if(t==="prefix"){const g=c.filter(f=>f.originalLength===0);if(g.length>1||g.length===1&&g[0].originalStart!==l.length)return}const u=o.insertText.length-n;for(const g of c){const f=o.range.startColumn+g.originalStart+g.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===o.range.startLineNumber&&f0)return;if(g.modifiedLength===0)continue;const _=g.modifiedStart+g.modifiedLength,b=Math.max(g.modifiedStart,Math.min(_,u)),v=o.insertText.substring(g.modifiedStart,b),C=o.insertText.substring(b,Math.max(g.modifiedStart,_));if(v.length>0){const w=jr(v);h.push(new Sx(f,w,!1))}if(C.length>0){const w=jr(C);h.push(new Sx(f,w,!0))}}return new C9(d,h,0)}let pr;function lae(o,e){if((pr==null?void 0:pr.originalValue)===o&&(pr==null?void 0:pr.newValue)===e)return pr==null?void 0:pr.changes;{let t=oO(o,e,!0);if(t){const i=sO(t);if(i>0){const n=oO(o,e,!1);n&&sO(n)5e3||e.length>5e3)return;function i(c){let d=0;for(let h=0,u=c.length;hd&&(d=g)}return d}const n=Math.max(i(o),i(e));function s(c){if(c<0)throw new Error("unexpected");return n+c+1}function r(c){let d=0,h=0;const u=new Int32Array(c.length);for(let g=0,f=c.length;ga},{getElements:()=>l}).ComputeDiff(!1).changes}function cae(o,e){const t=new l5,i=new d5(t,c=>e.getLanguageConfiguration(c)),n=new c5(new dae([o]),i),s=CD(n,[],void 0,!0);let r="";const a=o.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=Xt(d,c.openingBracket.length),c.child&&(l(c.child,d),d=Xt(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=Xt(d,c.closingBracket.length);else{const u=i.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);r+=u}else if(c.kind!==3){if(c.kind===0||c.kind===1)r+=a.substring(d,Xt(d,c.length));else if(c.kind===4)for(const h of c.children)l(h,d),d=Xt(d,h.length)}}return l(s,mo),r}class dae{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var hae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Of=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Na=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let yx=class extends H{constructor(e,t,i,n,s,r,a){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=n,this.languageFeaturesService=s,this.debounceService=r,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new _n),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(i.onDidExecuteCommand(l=>{new Set([Wu.Tab.id,Wu.DeleteLeft.id,Wu.DeleteRight.id,DC,"acceptSelectedSuggestion"]).has(l.commandId)&&e.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(l=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(l=>{(l.reason===3||this.session&&!this.session.isValid)&&this.hide()})),this._register(Be(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{a.getValue("editor.inlineSuggest.hideOnBlur")||this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var e;return(e=this.session)===null||e===void 0?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;(t=this.session)===null||t===void 0||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&((t=this.session)===null||t===void 0||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){!this.editor.getOption(57).enabled||this.session&&this.session.isValid||this.trigger(Ps.Automatic)}trigger(e){if(this.completionSession.value){e===Ps.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new uae(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;(e=this.session)===null||e===void 0||e.commitCurrentCompletion()}showNext(){var e;(e=this.session)===null||e===void 0||e.showNextInlineCompletion()}showPrevious(){var e;(e=this.session)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Na(this,void 0,void 0,function*(){const t=yield(e=this.session)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};yx=hae([Of(2,ci),Of(3,si),Of(4,de),Of(5,no),Of(6,ot)],yx);class uae extends S9{constructor(e,t,i,n,s,r,a,l,c){super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=s,this.initialTriggerKind=r,this.languageConfigurationService=a,this.registry=l,this.debounce=c,this.minReservedLineCount=0,this.updateOperation=this._register(new _n),this.updateSoon=this._register(new mt(()=>{const h=this.initialTriggerKind;return this.initialTriggerKind=Ps.Automatic,this.update(h)},50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0;let d;this._register(this.onDidChange(()=>{var h;const u=this.currentCompletion;if(u&&u.sourceInlineCompletion!==d){d=u.sourceInlineCompletion;const g=u.sourceProvider;(h=g.handleItemDidShow)===null||h===void 0||h.call(g,u.sourceInlineCompletions,d)}})),this._register(Be(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(h=>{var u;h.reason!==3&&((u=this.cache.value)===null||u===void 0||u.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))})),this._register(this.editor.onDidChangeModelContent(h=>{var u;(u=this.cache.value)===null||u===void 0||u.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()})),this._register(this.registry.onDidChange(()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))})),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value){this.filteredCompletions=[];return}const e=this.editor.getModel(),t=e.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter(i=>{const n=e.getValueInRange(i.synchronizedRange).toLowerCase(),s=i.inlineCompletion.filterText.toLowerCase(),r=e.getLineIndentColumn(i.synchronizedRange.startLineNumber),a=Math.max(0,t.column-i.synchronizedRange.startColumn);let l=s.substring(0,a),c=s.substring(a),d=n.substring(0,a),h=n.substring(a);return i.synchronizedRange.startColumn<=r&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&A5(h,c)})}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const e=this.filteredCompletions.findIndex(t=>t.semanticId===this.currentlySelectedCompletionId);return e===-1?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(!!this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){return Na(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){return Na(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+e.length-1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var e;return Na(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===Ps.Explicit?yield this.updateOperation.value.promise:yield this.update(Ps.Explicit):((e=this.cache.value)===null||e===void 0?void 0:e.triggerKind)!==Ps.Explicit&&(yield this.update(Ps.Explicit))})}hasMultipleInlineCompletions(){var e;return Na(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((e=this.cache.value)===null||e===void 0?void 0:e.completions.length)||0)>1})}get ghostText(){const e=this.currentCompletion;if(!e)return;const t=this.editor.getPosition();if(e.range.getEndPosition().isBefore(t))return;const i=this.editor.getOptions().get(57).mode,n=y9(e,this.editor.getModel(),i,t);return n?n.isEmpty()?void 0:n:new w9(e.range.startLineNumber,e.range.startColumn,e.range.endColumn-e.range.startColumn,e.insertText.split(` +`)}}class S9 extends H{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(108)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function kC(o,e){if(!e)return e;const t=o.getValueInRange(e.range),i=Nd(t,e.insertText),n=o.getOffsetAt(e.range.getStartPosition())+i,s=o.getPositionAt(n),r=t.substr(i),a=Wp(r,e.insertText),l=o.getPositionAt(Math.max(n,o.getOffsetAt(e.range.getEndPosition())-a));return{range:L.fromPositions(s,l),insertText:e.insertText.substr(i,e.insertText.length-i-a),snippetInfo:e.snippetInfo,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}function aae(o,e){return o===e?!0:!o||!e?!1:o.range.equalsRange(e.range)&&o.insertText===e.insertText&&o.command===e.command}function y9(o,e,t,i,n=0){if(o.range.startLineNumber!==o.range.endLineNumber)return;const s=e.getLineContent(o.range.startLineNumber),r=_t(s).length;if(o.range.startColumn-1<=r){const g=_t(o.insertText).length,f=s.substring(o.range.startColumn-1,r),_=L.fromPositions(o.range.getStartPosition().delta(0,f.length),o.range.getEndPosition()),b=o.insertText.startsWith(f)?o.insertText.substring(f.length):o.insertText.substring(g);o={range:_,insertText:b,command:o.command,snippetInfo:void 0,filterText:o.filterText,additionalTextEdits:o.additionalTextEdits}}const l=e.getValueInRange(o.range),c=lae(l,o.insertText);if(!c)return;const d=o.range.startLineNumber,h=new Array;if(t==="prefix"){const g=c.filter(f=>f.originalLength===0);if(g.length>1||g.length===1&&g[0].originalStart!==l.length)return}const u=o.insertText.length-n;for(const g of c){const f=o.range.startColumn+g.originalStart+g.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===o.range.startLineNumber&&f0)return;if(g.modifiedLength===0)continue;const _=g.modifiedStart+g.modifiedLength,b=Math.max(g.modifiedStart,Math.min(_,u)),v=o.insertText.substring(g.modifiedStart,b),C=o.insertText.substring(b,Math.max(g.modifiedStart,_));if(v.length>0){const w=jr(v);h.push(new Sx(f,w,!1))}if(C.length>0){const w=jr(C);h.push(new Sx(f,w,!0))}}return new C9(d,h,0)}let pr;function lae(o,e){if((pr==null?void 0:pr.originalValue)===o&&(pr==null?void 0:pr.newValue)===e)return pr==null?void 0:pr.changes;{let t=oO(o,e,!0);if(t){const i=sO(t);if(i>0){const n=oO(o,e,!1);n&&sO(n)5e3||e.length>5e3)return;function i(c){let d=0;for(let h=0,u=c.length;hd&&(d=g)}return d}const n=Math.max(i(o),i(e));function s(c){if(c<0)throw new Error("unexpected");return n+c+1}function r(c){let d=0,h=0;const u=new Int32Array(c.length);for(let g=0,f=c.length;ga},{getElements:()=>l}).ComputeDiff(!1).changes}function cae(o,e){const t=new lF,i=new dF(t,c=>e.getLanguageConfiguration(c)),n=new cF(new dae([o]),i),s=CD(n,[],void 0,!0);let r="";const a=o.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=Xt(d,c.openingBracket.length),c.child&&(l(c.child,d),d=Xt(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=Xt(d,c.closingBracket.length);else{const u=i.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);r+=u}else if(c.kind!==3){if(c.kind===0||c.kind===1)r+=a.substring(d,Xt(d,c.length));else if(c.kind===4)for(const h of c.children)l(h,d),d=Xt(d,h.length)}}return l(s,mo),r}class dae{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var hae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Of=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Na=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let yx=class extends H{constructor(e,t,i,n,s,r,a){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=n,this.languageFeaturesService=s,this.debounceService=r,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new _n),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(i.onDidExecuteCommand(l=>{new Set([Wu.Tab.id,Wu.DeleteLeft.id,Wu.DeleteRight.id,DC,"acceptSelectedSuggestion"]).has(l.commandId)&&e.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(l=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(l=>{(l.reason===3||this.session&&!this.session.isValid)&&this.hide()})),this._register(Be(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{a.getValue("editor.inlineSuggest.hideOnBlur")||this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var e;return(e=this.session)===null||e===void 0?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;(t=this.session)===null||t===void 0||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&((t=this.session)===null||t===void 0||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){!this.editor.getOption(57).enabled||this.session&&this.session.isValid||this.trigger(Ps.Automatic)}trigger(e){if(this.completionSession.value){e===Ps.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new uae(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;(e=this.session)===null||e===void 0||e.commitCurrentCompletion()}showNext(){var e;(e=this.session)===null||e===void 0||e.showNextInlineCompletion()}showPrevious(){var e;(e=this.session)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Na(this,void 0,void 0,function*(){const t=yield(e=this.session)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};yx=hae([Of(2,ci),Of(3,si),Of(4,de),Of(5,no),Of(6,ot)],yx);class uae extends S9{constructor(e,t,i,n,s,r,a,l,c){super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=s,this.initialTriggerKind=r,this.languageConfigurationService=a,this.registry=l,this.debounce=c,this.minReservedLineCount=0,this.updateOperation=this._register(new _n),this.updateSoon=this._register(new mt(()=>{const h=this.initialTriggerKind;return this.initialTriggerKind=Ps.Automatic,this.update(h)},50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0;let d;this._register(this.onDidChange(()=>{var h;const u=this.currentCompletion;if(u&&u.sourceInlineCompletion!==d){d=u.sourceInlineCompletion;const g=u.sourceProvider;(h=g.handleItemDidShow)===null||h===void 0||h.call(g,u.sourceInlineCompletions,d)}})),this._register(Be(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(h=>{var u;h.reason!==3&&((u=this.cache.value)===null||u===void 0||u.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))})),this._register(this.editor.onDidChangeModelContent(h=>{var u;(u=this.cache.value)===null||u===void 0||u.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()})),this._register(this.registry.onDidChange(()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))})),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value){this.filteredCompletions=[];return}const e=this.editor.getModel(),t=e.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter(i=>{const n=e.getValueInRange(i.synchronizedRange).toLowerCase(),s=i.inlineCompletion.filterText.toLowerCase(),r=e.getLineIndentColumn(i.synchronizedRange.startLineNumber),a=Math.max(0,t.column-i.synchronizedRange.startColumn);let l=s.substring(0,a),c=s.substring(a),d=n.substring(0,a),h=n.substring(a);return i.synchronizedRange.startColumn<=r&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&AF(h,c)})}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const e=this.filteredCompletions.findIndex(t=>t.semanticId===this.currentlySelectedCompletionId);return e===-1?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(!!this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){return Na(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){return Na(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+e.length-1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var e;return Na(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===Ps.Explicit?yield this.updateOperation.value.promise:yield this.update(Ps.Explicit):((e=this.cache.value)===null||e===void 0?void 0:e.triggerKind)!==Ps.Explicit&&(yield this.update(Ps.Explicit))})}hasMultipleInlineCompletions(){var e;return Na(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((e=this.cache.value)===null||e===void 0?void 0:e.completions.length)||0)>1})}get ghostText(){const e=this.currentCompletion;if(!e)return;const t=this.editor.getPosition();if(e.range.getEndPosition().isBefore(t))return;const i=this.editor.getOptions().get(57).mode,n=y9(e,this.editor.getModel(),i,t);return n?n.isEmpty()?void 0:n:new w9(e.range.startLineNumber,e.range.startColumn,e.range.endColumn-e.range.startColumn,e.insertText.split(` `),0)}get currentCompletion(){const e=this.currentCachedCompletion;if(!!e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return Na(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=Ri(r=>Na(this,void 0,void 0,function*(){let a;try{a=yield D9(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},r,this.languageConfigurationService);const l=new Date;this.debounce.update(this.editor.getModel(),l.getTime()-i.getTime())}catch(l){Te(l);return}r.isCancellationRequested||(this.cache.setValue(this.editor,a,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),s=new L9(n,e);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const t=this.currentCompletion;t&&this.commit(t)}commit(e){var t;const i=this.cache.clearAndLeak();e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[Ft.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),(t=Oi.get(this.editor))===null||t===void 0||t.insert(e.snippetInfo.snippet)):this.editor.executeEdits("inlineSuggestion.accept",[Ft.replaceMove(e.range,e.insertText),...e.additionalTextEdits]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{i==null||i.dispose()}).then(void 0,Pi):i==null||i.dispose(),this.onDidChangeEmitter.fire()}get commands(){var e;return[...new Set(((e=this.cache.value)===null||e===void 0?void 0:e.completions.map(i=>i.inlineCompletion.sourceInlineCompletions))||[])].flatMap(i=>i.commands||[])}}class L9{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class gae extends H{constructor(e,t,i,n){super(),this.editor=t,this.onChange=i,this.triggerKind=n,this.isDisposing=!1;const s=t.changeDecorations(r=>r.deltaDecorations([],e.items.map(a=>({range:a.range,options:{description:"inline-completion-tracking-range"}}))));this._register(Be(()=>{this.isDisposing=!0,t.removeDecorations(s)})),this.completions=e.items.map((r,a)=>new fae(r,s[a])),this._register(t.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(e)}updateRanges(){if(this.isDisposing)return;let e=!1;const t=this.editor.getModel();for(const i of this.completions){const n=t.getDecorationRange(i.decorationId);if(!n){Te(new Error("Decoration has no range"));continue}i.synchronizedRange.equalsRange(n)||(e=!0,i.synchronizedRange=n)}e&&this.onChange()}}class fae{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function D9(o,e,t,i,n=ze.None,s){return Na(this,void 0,void 0,function*(){const r=pae(e,t),a=o.all(t),l=yield Promise.all(a.map(d=>Na(this,void 0,void 0,function*(){const h=yield Promise.resolve(d.provideInlineCompletions(t,e,i,n)).catch(Pi);return{completions:h,provider:d,dispose:()=>{h&&d.freeInlineCompletions(h)}}}))),c=new Map;for(const d of l){const h=d.completions;if(!!h)for(const u of h.items){let g=u.range?L.lift(u.range):r;if(g.startLineNumber!==g.endLineNumber)continue;let f,_;if(typeof u.insertText=="string"){if(f=u.insertText,s&&u.completeBracketPairs){f=mae(f,g.getStartPosition(),t,s);const v=f.length-u.insertText.length;v!==0&&(g=new L(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+v))}_=void 0}else"snippet"in u.insertText?(f=new _c().parse(u.insertText.snippet).toString(),_={snippet:u.insertText.snippet,range:g}):OC(u.insertText);const b={insertText:f,snippetInfo:_,range:g,command:u.command,sourceProvider:d.provider,sourceInlineCompletions:h,sourceInlineCompletion:u,filterText:u.filterText||f,additionalTextEdits:u.additionalTextEdits||rae()};c.set(JSON.stringify({insertText:f,range:u.range}),b)}}return{items:[...c.values()],dispose:()=>{for(const d of l)d.dispose()}}})}function pae(o,e){const t=e.getWordAtPosition(o),i=e.getLineMaxColumn(o.lineNumber);return t?new L(o.lineNumber,t.startColumn,o.lineNumber,i):L.fromPositions(o,o.with(void 0,i))}function mae(o,e,t,i){const s=t.getLineContent(e.lineNumber).substring(0,e.column-1)+o,r=t.tokenization.tokenizeLineWithEdit(e,s.length-(e.column-1),o),a=r==null?void 0:r.sliceAndInflate(e.column-1,s.length,0);return a?cae(a,i):o}var _ae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class cT{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;const n=i[0].score[0];for(let s=0;sl&&h.type===i[c].completion.kind&&h.insertText===i[c].completion.insertText&&(l=h.touch,a=c),i[c].completion.preselect&&r===-1)return r=c}return a!==-1?a:r!==-1?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:Pp.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class vae extends cT{constructor(){super("recentlyUsedByPrefix"),this._trie=Uu.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let r=this._trie.get(s);if(r||(r=this._trie.findSubstr(s)),r)for(let a=0;ae.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type=typeof i.type=="number"?i.type:Pp.fromString(i.type),this._trie.set(t,i)}}}let Um=class O0{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new Q,this._persistSoon=new mt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===lC.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((i=this._strategy)===null||i===void 0?void 0:i.name)!==n){this._saveState();const s=O0._strategyCtors.get(n)||k9;this._strategy=new s;try{const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${O0._storagePrefix}/${n}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${O0._storagePrefix}/${this._strategy.name}`,i,t,1)}}};Um._strategyCtors=new Map([["recentlyUsedByPrefix",vae],["recentlyUsed",bae],["first",k9]]);Um._storagePrefix="suggest/memories";Um=_ae([rO(0,Do),rO(1,ot)],Um);const mw=Ye("ISuggestMemories");et(mw,Um,!0);var Cae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wae=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let $m=class x9{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=x9.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(113)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(113)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),n=this._editor.getSelection(),s=i.getWordAtPosition(n.getStartPosition());if(!s){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(s.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};$m.AtEnd=new le("atEndOfWord",!1);$m=Cae([wae(1,Ee)],$m);var Sae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yae=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let ih=class P0{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=P0.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(P0._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===i||!t.items[n].completion.additionalTextEdits););return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(!!this._model)try{this._ignore=!0,this._index=P0._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};ih.OtherSuggestions=new le("hasOtherSuggestions",!1);ih=Sae([yae(1,Ee)],ih);class Lae{constructor(e,t,i){this._disposables=new Q,this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(n=>{if(this._active&&!t.isFrozen()){const s=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!rn(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new cu;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var Dae=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class fs{provideSelectionRanges(e,t){return Dae(this,void 0,void 0,function*(){const i=[];for(const n of t){const s=[];i.push(s);const r=new Map;yield new Promise(a=>fs._bracketsRightYield(a,0,e,n,r)),yield new Promise(a=>fs._bracketsLeftYield(a,0,e,n,r,s))}return i})}static _bracketsRightYield(e,t,i,n,s){const r=new Map,a=Date.now();for(;;){if(t>=fs._maxRounds){e();break}if(!n){e();break}const l=i.bracketPairs.findNextBracket(n);if(!l){e();break}if(Date.now()-a>fs._maxDuration){setTimeout(()=>fs._bracketsRightYield(e,t+1,i,n,s));break}if(l.bracketInfo.isOpeningBracket){const d=l.bracketInfo.bracketText,h=r.has(d)?r.get(d):0;r.set(d,h+1)}else{const d=l.bracketInfo.getClosedBrackets()[0].bracketText;let h=r.has(d)?r.get(d):0;if(h-=1,r.set(d,Math.max(0,h)),h<0){let u=s.get(d);u||(u=new Dn,s.set(d,u)),u.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,r){const a=new Map,l=Date.now();for(;;){if(t>=fs._maxRounds&&s.size===0){e();break}if(!n){e();break}const c=i.bracketPairs.findPrevBracket(n);if(!c){e();break}if(Date.now()-l>fs._maxDuration){setTimeout(()=>fs._bracketsLeftYield(e,t+1,i,n,s,r));break}if(c.bracketInfo.isOpeningBracket){const h=c.bracketInfo.bracketText;let u=a.has(h)?a.get(h):0;if(u-=1,a.set(h,Math.max(0,u)),u<0){const g=s.get(h);if(g){const f=g.shift();g.size===0&&s.delete(h);const _=L.fromPositions(c.range.getEndPosition(),f.getStartPosition()),b=L.fromPositions(c.range.getStartPosition(),f.getEndPosition());r.push({range:_}),r.push({range:b}),fs._addBracketLeading(i,b,r)}}}else{const h=c.bracketInfo.getClosedBrackets()[0].bracketText,u=a.has(h)?a.get(h):0;a.set(h,u+1)}n=c.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);s!==0&&s!==t.startColumn&&(i.push({range:L.fromPositions(new B(n,s),t.getEndPosition())}),i.push({range:L.fromPositions(new B(n,1),t.getEndPosition())}));const r=n-1;if(r>0){const a=e.getLineFirstNonWhitespaceColumn(r);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(r)&&(i.push({range:L.fromPositions(new B(r,a),t.getEndPosition())}),i.push({range:L.fromPositions(new B(r,1),t.getEndPosition())}))}}}fs._maxDuration=30;fs._maxRounds=2;var kae=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Fo{static create(e,t){return kae(this,void 0,void 0,function*(){if(!t.getOption(108).localityBonus||!t.hasModel())return Fo.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return Fo.None;const[s]=yield new fs().provideSelectionRanges(i,[n]);if(s.length===0)return Fo.None;const r=yield e.computeWordRanges(i.uri,s[0].range);if(!r)return Fo.None;const a=i.getWordUntilPosition(n);return delete r[a.word],new class extends Fo{distance(l,c){if(!n.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;const d=typeof c.label=="string"?c.label:c.label.label,h=r[d];if(WO(h))return 2<<20;const u=aI(h,L.fromPositions(l),L.compareRangesUsingStarts),g=u>=0?h[u]:h[Math.max(0,~u-1)];let f=s.length;for(const _ of s){if(!L.containsRange(_.range,g))break;f-=1}return f}}})}}Fo.None=new class extends Fo{distance(){return 0}};class aO{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class Al{constructor(e,t,i,n,s,r,a=$E.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=Al._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=a,r==="top"?this._snippetCompareFn=Al._compareCompletionItemsSnippetsUp:r==="bottom"&&(this._snippetCompareFn=Al._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta2e3?mg:CZ;for(let c=0;c=u)d.score=Zo.Default;else if(typeof d.completion.filterText=="string"){const f=l(n,s,g,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!f)continue;FL(d.completion.filterText,d.textLabel)===0?d.score=f:(d.score=mZ(n,s,g,d.textLabel,d.labelLow,0),d.score[0]=f[0])}else{const f=l(n,s,g,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!f)continue;d.score=f}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Uy(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return Al._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return Al._compareCompletionItems(e,t)}}var xae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zc=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Iae=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class qh{constructor(e,t,i,n,s){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=i,this.shy=n,this.noSelect=s}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column||!isNaN(Number(n.word)))}}function Eae(o,e,t){if(!Boolean(e.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getValue("editor.inlineSuggest.allowQuickSuggestions");return i!==void 0?Boolean(i):!1}function Nae(o,e,t){if(!Boolean(e.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return i!==void 0?Boolean(i):!1}let Lx=class I9{constructor(e,t,i,n,s,r,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=a,this._languageFeaturesService=l,this._toDispose=new Q,this._triggerCharacterListener=new Q,this._triggerQuickSuggest=new xs,this._state=0,this._completionDisposables=new Q,this._onDidCancel=new R,this._onDidTrigger=new R,this._onDidSuggest=new R,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new oe(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{c||this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){nt(this._triggerCharacterListener),nt([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(83)||!this._editor.hasModel()||!this._editor.getOption(111))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const n of i.triggerCharacters||[]){let s=e.get(n);s||(s=new Set,s.add(wse()),e.set(n,s)),s.add(i)}const t=i=>{if(!Nae(this._editor,this._contextKeyService,this._configurationService)||qh.shouldAutoTrigger(this._editor))return;if(!i){const r=this._editor.getPosition();i=this._editor.getModel().getLineContent(r.lineNumber).substr(0,r.column-1)}let n="";Td(i.charCodeAt(i.length-1))?Li(i.charCodeAt(i.length-2))&&(n=i.substr(i.length-2)):n=i.charAt(i.length-1);const s=e.get(n);if(s){const r=this._completionModel?{items:this._completionModel.adopt(s),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,noSelect:!1,triggerCharacter:n},Boolean(this._completionModel),s,r)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._state}cancel(e=!1){var t;this._state!==0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1,noSelect:!1},!0))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._state===0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;ku.isAllOff(this._editor.getOption(81))||this._editor.getOption(108).snippetsPreventQuickSuggestions&&((e=Oi.get(this._editor))===null||e===void 0?void 0:e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!qh.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=this._editor.getOption(81);if(!ku.isAllOff(n)){if(!ku.isAllOn(n)){t.tokenization.tokenizeIfCheap(i.lineNumber);const s=t.tokenization.getLineTokens(i.lineNumber),r=s.getStandardTokenType(s.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(ku.valueFor(n,r)!=="on")return}!Eae(this._editor,this._contextKeyService,this._configurationService)||!this._languageFeaturesService.completionProvider.has(t)||this.trigger({auto:!0,shy:!1,noSelect:!1})}},this._editor.getOption(82)))}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new qh(e,t,this._state===2,!1,!1);this._onNewContext(i)})}trigger(e,t=!1,i,n,s){var r;if(!this._editor.hasModel())return;const a=this._editor.getModel(),l=e.auto,c=new qh(a,this._editor.getPosition(),l,e.shy,e.noSelect);this.cancel(t),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:e.shy,position:this._editor.getPosition()}),this._context=c;let d={triggerKind:(r=e.triggerKind)!==null&&r!==void 0?r:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Qi;const h=this._editor.getOption(103);let u=1;switch(h){case"top":u=0;break;case"bottom":u=2;break}const{itemKind:g,showDeprecated:f}=I9._createSuggestFilter(this._editor),_=new Bm(u,s?new Set:g,i,f),b=Fo.create(this._editorWorkerService,this._editor),v=QN(this._languageFeaturesService.completionProvider,a,this._editor.getPosition(),_,d,this._requestToken.token);Promise.all([v,b]).then(([C,w])=>Iae(this,void 0,void 0,function*(){var S;if((S=this._requestToken)===null||S===void 0||S.dispose(),!this._editor.hasModel())return;let k=n==null?void 0:n.clipboardText;if(!k&&C.needsClipboard&&(k=yield this._clipboardService.readText()),this._state===0)return;const x=this._editor.getModel();let y=C.items;if(n){const I=j7(u);y=y.concat(n.items).sort(I)}const D=new qh(x,this._editor.getPosition(),l,e.shy,e.noSelect);this._completionModel=new Al(y,this._context.column,{leadingLineContent:D.leadingLineContent,characterCountDelta:D.column-this._context.column},w,this._editor.getOption(108),this._editor.getOption(103),void 0,k),this._completionDisposables.add(C.disposable),this._onNewContext(D),this._reportDurationsTelemetry(C.durations)})).catch(Te)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){const t=new Set;e.getOption(103)==="none"&&t.add(27);const n=e.getOption(108);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(!!this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(_t(e.leadingLineContent)!==_t(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){const t=new Set(this._languageFeaturesService.completionProvider.all(this._editor.getModel()));for(const n of this._completionModel.allProvider)t.delete(n);const i=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0,t,{items:i,clipboardText:this._completionModel.clipboardText});return}if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&e.leadingWord.word.length!==0){const{incomplete:t}=this._completionModel,i=this._completionModel.adopt(t);this.trigger({auto:this._state===2,shy:!1,noSelect:!1,triggerKind:2},!0,t,{items:i,clipboardText:this._completionModel.clipboardText})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){if(qh.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,noSelect:this._context.noSelect,isFrozen:i})}}}}};Lx=xae([zc(1,to),zc(2,cl),zc(3,sr),zc(4,So),zc(5,Ee),zc(6,ot),zc(7,de)],Lx);class _w{constructor(e,t){this._disposables=new Q,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty||!e.hasModel())return;const i=e.getSelections(),n=i.length;let s=!1;for(let a=0;a_w._maxSelectionLength)return;this._lastOvertyped[a]={value:r.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(i=>{!this._empty&&!i.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ty=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class dT extends xg{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=p("ddd","{0} ({1})",this._action.label,dT.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}}let Dx=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new Q,this.element=q(e,J(".suggest-status-bar"));const s=r=>r instanceof ac?t.createInstance(dT,r,void 0):void 0;this._leftActions=new Zr(this.element,{actionViewItemProvider:s}),this._rightActions=new Zr(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(Ql,this._contextKeyService),t=()=>{const i=[],n=[];for(const[s,r]of e.getActions())s==="left"?i.push(...r):n.push(...r);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Dx=Tae([Ty(1,Ae),Ty(2,ph),Ty(3,Ee)],Dx);const Aae=T("symbolIcon.arrayForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mae=T("symbolIcon.booleanForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rae=T("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Oae=T("symbolIcon.colorForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Pae=T("symbolIcon.constantForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Fae=T("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Bae=T("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Wae=T("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vae=T("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Hae=T("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zae=T("symbolIcon.fileForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Uae=T("symbolIcon.folderForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$ae=T("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jae=T("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Kae=T("symbolIcon.keyForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qae=T("symbolIcon.keywordForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Gae=T("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Zae=T("symbolIcon.moduleForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yae=T("symbolIcon.namespaceForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Qae=T("symbolIcon.nullForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Xae=T("symbolIcon.numberForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Jae=T("symbolIcon.objectForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ele=T("symbolIcon.operatorForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tle=T("symbolIcon.packageForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ile=T("symbolIcon.propertyForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nle=T("symbolIcon.referenceForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sle=T("symbolIcon.snippetForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ole=T("symbolIcon.stringForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rle=T("symbolIcon.structForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ale=T("symbolIcon.textForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lle=T("symbolIcon.typeParameterForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cle=T("symbolIcon.unitForeground",{dark:X,light:X,hcDark:X,hcLight:X},p("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dle=T("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Et((o,e)=>{const t=o.getColor(Aae);t&&e.addRule(`${m.symbolArray.cssSelector} { color: ${t}; }`);const i=o.getColor(Mae);i&&e.addRule(`${m.symbolBoolean.cssSelector} { color: ${i}; }`);const n=o.getColor(Rae);n&&e.addRule(`${m.symbolClass.cssSelector} { color: ${n}; }`);const s=o.getColor(Gae);s&&e.addRule(`${m.symbolMethod.cssSelector} { color: ${s}; }`);const r=o.getColor(Oae);r&&e.addRule(`${m.symbolColor.cssSelector} { color: ${r}; }`);const a=o.getColor(Pae);a&&e.addRule(`${m.symbolConstant.cssSelector} { color: ${a}; }`);const l=o.getColor(Fae);l&&e.addRule(`${m.symbolConstructor.cssSelector} { color: ${l}; }`);const c=o.getColor(Bae);c&&e.addRule(` ${m.symbolValue.cssSelector},${m.symbolEnum.cssSelector} { color: ${c}; }`);const d=o.getColor(Wae);d&&e.addRule(`${m.symbolEnumMember.cssSelector} { color: ${d}; }`);const h=o.getColor(Vae);h&&e.addRule(`${m.symbolEvent.cssSelector} { color: ${h}; }`);const u=o.getColor(Hae);u&&e.addRule(`${m.symbolField.cssSelector} { color: ${u}; }`);const g=o.getColor(zae);g&&e.addRule(`${m.symbolFile.cssSelector} { color: ${g}; }`);const f=o.getColor(Uae);f&&e.addRule(`${m.symbolFolder.cssSelector} { color: ${f}; }`);const _=o.getColor($ae);_&&e.addRule(`${m.symbolFunction.cssSelector} { color: ${_}; }`);const b=o.getColor(jae);b&&e.addRule(`${m.symbolInterface.cssSelector} { color: ${b}; }`);const v=o.getColor(Kae);v&&e.addRule(`${m.symbolKey.cssSelector} { color: ${v}; }`);const C=o.getColor(qae);C&&e.addRule(`${m.symbolKeyword.cssSelector} { color: ${C}; }`);const w=o.getColor(Zae);w&&e.addRule(`${m.symbolModule.cssSelector} { color: ${w}; }`);const S=o.getColor(Yae);S&&e.addRule(`${m.symbolNamespace.cssSelector} { color: ${S}; }`);const k=o.getColor(Qae);k&&e.addRule(`${m.symbolNull.cssSelector} { color: ${k}; }`);const x=o.getColor(Xae);x&&e.addRule(`${m.symbolNumber.cssSelector} { color: ${x}; }`);const y=o.getColor(Jae);y&&e.addRule(`${m.symbolObject.cssSelector} { color: ${y}; }`);const D=o.getColor(ele);D&&e.addRule(`${m.symbolOperator.cssSelector} { color: ${D}; }`);const I=o.getColor(tle);I&&e.addRule(`${m.symbolPackage.cssSelector} { color: ${I}; }`);const O=o.getColor(ile);O&&e.addRule(`${m.symbolProperty.cssSelector} { color: ${O}; }`);const F=o.getColor(nle);F&&e.addRule(`${m.symbolReference.cssSelector} { color: ${F}; }`);const z=o.getColor(sle);z&&e.addRule(`${m.symbolSnippet.cssSelector} { color: ${z}; }`);const j=o.getColor(ole);j&&e.addRule(`${m.symbolString.cssSelector} { color: ${j}; }`);const re=o.getColor(rle);re&&e.addRule(`${m.symbolStruct.cssSelector} { color: ${re}; }`);const he=o.getColor(ale);he&&e.addRule(`${m.symbolText.cssSelector} { color: ${he}; }`);const Se=o.getColor(lle);Se&&e.addRule(`${m.symbolTypeParameter.cssSelector} { color: ${Se}; }`);const ye=o.getColor(cle);ye&&e.addRule(`${m.symbolUnit.cssSelector} { color: ${ye}; }`);const xe=o.getColor(dle);xe&&e.addRule(`${m.symbolVariable.cssSelector} { color: ${xe}; }`)});class E9{constructor(){this._onDidWillResize=new R,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new R,this.onDidResize=this._onDidResize.event,this._sashListener=new Q,this._size=new vt(0,0),this._minSize=new vt(0,0),this._maxSize=new vt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new tn(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new tn(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new tn(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Fv.North}),this._southSash=new tn(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Fv.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ge.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ge.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(ge.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ge.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const a=new vt(t,e);vt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}var hle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ule=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function hT(o){return!!o&&Boolean(o.completion.documentation||o.completion.detail&&o.completion.detail!==o.completion.label)}let kx=class{constructor(e,t){this._editor=e,this._onDidClose=new R,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new R,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new Q,this._renderDisposeable=new Q,this._borderWidth=1,this._size=new vt(330,0),this.domNode=J(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(ol,{editor:e}),this._body=J(".body"),this._scrollbar=new p_(this._body,{alwaysConsumeMouseWheel:!0}),q(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=q(this._body,J(".header")),this._close=q(this._header,J("span"+m.close.cssSelector)),this._close.title=p("details.close","Close"),this._type=q(this._header,J("p.type")),this._docs=q(this._body,J("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(46)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(46),i=t.getMassagedFontFamily(),n=e.get(109)||t.fontSize,s=e.get(110)||t.lineHeight,r=t.fontWeight,a=`${n}px`,l=`${s}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${s/n}`,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(110)||this._editor.getOption(46).lineHeight,t=this._borderWidth,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=p("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:r}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} `,a+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"} @@ -766,7 +766,7 @@ The flag will not be saved for the future. `,a+=`distance: ${e.distance} (localityBonus-setting) `,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} `,a+=`commit_chars: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")} -`,r=new Fn().appendCodeblock("empty",a),s=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!hT(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const a=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=a,this._type.title=a,bs(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Si(this._type),this._type.title="",Pn(this._type),this.domNode.classList.add("no-type");if(Si(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),Si(this._docs);const a=this._markdownRenderer.render(r);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new vt(e,t);vt.equals(i,this._size)||(this._size=i,jH(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};kx=hle([ule(1,Ae)],kx);class gle{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new Q,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new E9,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+r})}a.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=JC(document.body),r=this.widget.getLayoutInfo(),a=new vt(220,2*r.lineHeight),l=e.top,c=function(){const w=s.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),S=-r.borderWidth+e.left+e.width,k=new vt(w,s.height-e.top-r.borderHeight-r.verticalPadding),x=k.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:k,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),d=function(){const w=e.left-r.borderWidth-r.horizontalPadding,S=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),k=new vt(w,s.height-e.top-r.borderHeight-r.verticalPadding),x=k.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:k,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),h=function(){const w=e.left,S=-r.borderWidth+e.top+e.height,k=new vt(e.width-r.borderHeight,s.height-e.top-e.height-r.verticalPadding);return{top:S,left:w,fit:k.height-t.height,maxSizeBottom:k,maxSizeTop:k,minSize:a.with(k.width)}}(),u=[c,d,h],g=(n=u.find(w=>w.fit>=0))!==null&&n!==void 0?n:u.sort((w,S)=>S.fit-w.fit)[0],f=e.top+e.height-r.borderHeight;let _,b=t.height;const v=Math.max(g.maxSizeTop.height,g.maxSizeBottom.height);b>v&&(b=v);let C;i?b<=g.maxSizeTop.height?(_=!0,C=g.maxSizeTop):(_=!1,C=g.maxSizeBottom):b<=g.maxSizeBottom.height?(_=!1,C=g.maxSizeBottom):(_=!0,C=g.maxSizeTop),this._applyTopLeft({left:g.left,top:_?g.top:f-b}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!_,g===c,_,g!==c),this._resizable.minSize=g.minSize,this._resizable.maxSize=C,this._resizable.layout(b,Math.min(C.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Ka;(function(o){o[o.FILE=0]="FILE",o[o.FOLDER=1]="FOLDER",o[o.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ka||(Ka={}));const fle=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function i0(o,e,t,i){const n=i===Ka.ROOT_FOLDER?["rootfolder-icon"]:i===Ka.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===Me.data)s=cc.parseMetaData(t).get(cc.META_DATA_LABEL);else{const r=t.path.match(fle);r?(s=n0(r[2].toLowerCase()),r[1]&&n.push(`${n0(r[1].toLowerCase())}-name-dir-icon`)):s=n0(t.authority.toLowerCase())}if(i===Ka.FOLDER)n.push(`${s}-name-folder-icon`);else{if(s){if(n.push(`${s}-name-file-icon`),n.push("name-file-icon"),s.length<=255){const a=s.split(".");for(let l=1;l=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ay=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Pf;function N9(o){return`suggest-aria-id:${o}`}const _le=mi("suggest-more-info",m.chevronRight,p("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),ble=new(Pf=class F0{extract(e,t){if(e.textLabel.match(F0._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(F0._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=F0._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},Pf._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,Pf._regexStrict=new RegExp(`^${Pf._regexRelaxed.source}$`,"i"),Pf);let xx=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new R,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new Q,t.root=e,t.root.classList.add("show-file-icons"),t.icon=q(e,J(".icon")),t.colorspan=q(t.icon,J("span.colorspan"));const i=q(e,J(".contents")),n=q(i,J(".main"));t.iconContainer=q(n,J(".icon-label.codicon")),t.left=q(n,J("span.left")),t.right=q(n,J("span.right")),t.iconLabel=new nC(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=q(t.left,J("span.signature-label")),t.qualifierLabel=q(t.left,J("span.qualifier-label")),t.detailsLabel=q(t.right,J("span.details-label")),t.readMore=q(t.right,J("span.readMore"+at.asCSSSelector(_le))),t.readMore.title=p("readMore","Read More");const s=()=>{const r=this._editor.getOptions(),a=r.get(46),l=a.getMassagedFontFamily(),c=a.fontFeatureSettings,d=r.get(109)||a.fontSize,h=r.get(110)||a.lineHeight,u=a.fontWeight,g=a.letterSpacing,f=`${d}px`,_=`${h}px`,b=`${g}px`;t.root.style.fontSize=f,t.root.style.fontWeight=u,t.root.style.letterSpacing=b,n.style.fontFamily=l,n.style.fontFeatureSettings=c,n.style.lineHeight=_,t.icon.style.height=_,t.icon.style.width=_,t.readMore.style.height=_,t.readMore.style.width=_};return s(),t.disposables.add(this._editor.onDidChangeConfiguration(r=>{(r.hasChanged(46)||r.hasChanged(109)||r.hasChanged(110))&&s()})),t}renderElement(e,t,i){const{completion:n}=e;i.root.id=N9(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:E1(e.score)},r=[];if(n.kind===19&&ble.extract(e,r))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=r[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:e.textLabel}),Ka.FILE),l=i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:n.detail}),Ka.FILE);s.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:e.textLabel}),Ka.FOLDER),i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:n.detail}),Ka.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Ln.asClassNameArray(Pp.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=My(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=My(n.label.detail||""),i.detailsLabel.textContent=My(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(108).showInlineDetails?bs(i.detailsLabel):Pn(i.detailsLabel),hT(e)?(i.right.classList.add("can-expand-details"),bs(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),Pn(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};xx=mle([Ay(1,Ut),Ay(2,Ht),Ay(3,Ct)],xx);function My(o){return o.replace(/\r\n|\r|\n/g,"")}var vle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s0=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Cle=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};T("editorSuggestWidget.background",{dark:li,light:li,hcDark:li,hcLight:li},p("editorSuggestWidgetBackground","Background color of the suggest widget."));T("editorSuggestWidget.border",{dark:Ba,light:Ba,hcDark:Ba,hcLight:Ba},p("editorSuggestWidgetBorder","Border color of the suggest widget."));const o0=T("editorSuggestWidget.foreground",{dark:Cs,light:Cs,hcDark:Cs,hcLight:Cs},p("editorSuggestWidgetForeground","Foreground color of the suggest widget."));T("editorSuggestWidget.selectedForeground",{dark:jf,light:jf,hcDark:jf,hcLight:jf},p("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));T("editorSuggestWidget.selectedIconForeground",{dark:Kf,light:Kf,hcDark:Kf,hcLight:Kf},p("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const wle=T("editorSuggestWidget.selectedBackground",{dark:qf,light:qf,hcDark:qf,hcLight:qf},p("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));T("editorSuggestWidget.highlightForeground",{dark:fo,light:fo,hcDark:fo,hcLight:fo},p("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));T("editorSuggestWidget.focusHighlightForeground",{dark:ob,light:ob,hcDark:ob,hcLight:ob},p("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));T("editorSuggestWidgetStatus.foreground",{dark:fe(o0,.5),light:fe(o0,.5),hcDark:fe(o0,.5),hcLight:fe(o0,.5)},p("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Sle{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Qd}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(vt.is(i))return vt.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let jm=class Ix{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new xs,this._disposables=new Q,this._onDidSelect=new R,this._onDidFocus=new R,this._onDidHide=new R,this._onDidShow=new R,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new R,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new E9,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new yle(this,e),this._persistedSize=new Sle(t,e);class r{constructor(g,f,_=!1,b=!1){this.persistedSize=g,this.currentSize=f,this.persistHeight=_,this.persistWidth=b}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new r(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(u=>{var g,f,_,b;if(this._resize(u.dimension.width,u.dimension.height),a&&(a.persistHeight=a.persistHeight||!!u.north||!!u.south,a.persistWidth=a.persistWidth||!!u.east||!!u.west),!!u.done){if(a){const{itemHeight:v,defaultSize:C}=this.getLayoutInfo(),w=Math.round(v/2);let{width:S,height:k}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-k)<=w)&&(k=(f=(g=a.persistedSize)===null||g===void 0?void 0:g.height)!==null&&f!==void 0?f:C.height),(!a.persistWidth||Math.abs(a.currentSize.width-S)<=w)&&(S=(b=(_=a.persistedSize)===null||_===void 0?void 0:_.width)!==null&&b!==void 0?b:C.width),this._persistedSize.store(new vt(S,k))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=q(this.element.domNode,J(".message")),this._listElement=q(this.element.domNode,J(".tree"));const l=s.createInstance(kx,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new gle(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(108).showIcons);c();const d=s.createInstance(xx,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new rr("SuggestWidget",this._listElement,{getHeight:u=>this.getLayoutInfo().itemHeight,getTemplateId:u=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>p("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:u=>{let g=u.textLabel;if(typeof u.completion.label!="string"){const{detail:v,description:C}=u.completion.label;v&&C?g=p("label.full","{0}{1}, {2}",g,v,C):v?g=p("label.detail","{0}{1}",g,v):C&&(g=p("label.desc","{0}, {1}",g,C))}if(!u.isResolved||!this._isDetailsVisible())return g;const{documentation:f,detail:_}=u.completion,b=Vs("{0}{1}",_||"",f?typeof f=="string"?f:f.value:"");return p("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",g,b)}}}),this._status=s.createInstance(Dx,this.element.domNode);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(108).showStatusBar);h(),this._disposables.add(Ud(this._list,n,{listInactiveFocusBackground:wle,listInactiveFocusOutline:Ot})),this._disposables.add(n.onDidColorThemeChange(u=>this._onThemeChange(u))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(u=>this._onListMouseDownOrTap(u))),this._disposables.add(this._list.onTap(u=>this._onListMouseDownOrTap(u))),this._disposables.add(this._list.onDidChangeSelection(u=>this._onListSelection(u))),this._disposables.add(this._list.onDidChangeFocus(u=>this._onListFocus(u))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(u=>{u.hasChanged(108)&&(h(),c())})),this._ctxSuggestWidgetVisible=Ke.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=Ke.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=Ke.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=Ke.HasFocusedSuggestion.bindTo(i),this._disposables.add(ki(this._details.widget.domNode,"keydown",u=>{this._onDetailsKeydown.fire(u)})),this._disposables.add(this.editor.onMouseDown(u=>this._onEditorMouseDown(u)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=cn(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Ri(s=>Cle(this,void 0,void 0,function*(){const r=Ad(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=s.onCancellationRequested(()=>r.dispose()),l=yield i.resolve(s);return r.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:N9(n)}))}).catch(Te)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Pn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ix.LOADING_MESSAGE,Pn(this._listElement,this._status.element),bs(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ix.NO_SUGGESTIONS_MESSAGE,Pn(this._listElement,this._status.element),bs(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Pn(this._messageElement),bs(this._listElement,this._status.element),this._show();break;case 4:Pn(this._messageElement),bs(this._listElement,this._status.element),this._show();break;case 5:Pn(this._messageElement),bs(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Ad(()=>this._setState(1),t)))}showSuggestions(e,t,i,n){var s,r;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(r=this._currentSuggestionDetails)===null||r===void 0||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const a=this._completionModel.items.length,l=a===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),t>=0&&(this._list.reveal(t,0),this._list.setFocus([t])),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(hT(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightc&&(l=c);const d=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:l,h=r.statusBarHeight+this._list.contentHeight+r.borderHeight,u=r.itemHeight+r.statusBarHeight,g=on(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),_=g.top+f.top+f.height,b=Math.min(s.height-_-r.verticalPadding,h),v=g.top+f.top-r.verticalPadding,C=Math.min(v,h);let w=Math.min(Math.max(C,b)+r.borderHeight,h);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),aw&&(a=w);const S=150;a>b||this._forceRenderingAbove&&v>S?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),w=C):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),w=b),this.element.preferredSize=new vt(d,r.defaultSize.height),this.element.maxSize=new vt(c,w),this.element.minSize=new vt(220,u),this._cappedHeight=a===h?{wanted:(n=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=`${t-s}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(46),t=Zn(this.editor.getOption(110)||e.lineHeight,8,1e3),i=!this.editor.getOption(108).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new vt(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};jm.LOADING_MESSAGE=p("suggestWidget.loading","Loading...");jm.NO_SUGGESTIONS_MESSAGE=p("suggestWidget.noSuggestions","No suggestions.");jm=vle([s0(1,Do),s0(2,Ee),s0(3,Ct),s0(4,Ae)],jm);class yle{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new vt(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Lle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class Dle{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:L.fromPositions(t,s),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let _o=class T9{constructor(e,t,i,n,s,r,a){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=r,this._telemetryService=a,this._lineSuffix=new _n,this._toDispose=new Q,this._selectors=new kle(h=>h.priority),this._telemetryGate=0,this.editor=e,this.model=s.createInstance(Lx,this.editor);const l=Ke.InsertMode.bindTo(n);l.set(e.getOption(108).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(108).insertMode)),this.widget=this._toDispose.add(new $l(()=>{const h=this._instantiationService.createInstance(jm,this.editor);this._toDispose.add(h),this._toDispose.add(h.onDidSelect(b=>this._insertSuggestion(b,0),this));const u=new Lae(this.editor,h,b=>this._insertSuggestion(b,2));this._toDispose.add(u),this._toDispose.add(this.model.onDidSuggest(b=>{b.completionModel.items.length===0&&u.reset()}));const g=Ke.MakesTextEdit.bindTo(this._contextKeyService),f=Ke.HasInsertAndReplaceRange.bindTo(this._contextKeyService),_=Ke.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Be(()=>{g.reset(),f.reset(),_.reset()})),this._toDispose.add(h.onDidFocus(({item:b})=>{const v=this.editor.getPosition(),C=b.editStart.column,w=v.column;let S=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!b.completion.additionalTextEdits&&!(b.completion.insertTextRules&4)&&w-C===b.completion.insertText.length&&(S=this.editor.getModel().getValueInRange({startLineNumber:v.lineNumber,startColumn:C,endLineNumber:v.lineNumber,endColumn:w})!==b.completion.insertText),g.set(S),f.set(!B.equals(b.editInsertEnd,b.editReplaceEnd)),_.set(Boolean(b.provider.resolveCompletionItem)||Boolean(b.completion.documentation)||b.completion.detail!==b.completion.label)})),this._toDispose.add(h.onDetailsKeyDown(b=>{if(b.toKeybinding().equals(new Md(!0,!1,!1,!1,33))||Ge&&b.toKeybinding().equals(new Md(!1,!1,!1,!0,33))){b.stopPropagation();return}b.toKeybinding().isModifierKey()||this.editor.focus()})),h})),this._overtypingCapturer=this._toDispose.add(new $l(()=>this._toDispose.add(new _w(this.editor,this.model)))),this._alternatives=this._toDispose.add(new $l(()=>this._toDispose.add(new ih(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance($m,e)),this._toDispose.add(this.model.onDidTrigger(h=>{this.widget.value.showTriggered(h.auto,h.shy?250:50),this._lineSuffix.value=new Dle(this.editor.getModel(),h.position)})),this._toDispose.add(this.model.onDidSuggest(h=>{if(h.shy)return;let u=-1;if(!h.noSelect){for(const g of this._selectors.itemsOrderedByPriorityDesc)if(u=g.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items),u!==-1)break;u===-1&&(u=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items))}this.widget.value.showSuggestions(h.completionModel,u,h.isFrozen,h.auto)})),this._toDispose.add(this.model.onDidCancel(h=>{h.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const c=Ke.AcceptSuggestionsOnEnter.bindTo(n),d=()=>{const h=this.editor.getOption(1);c.set(h==="on"||h==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>d())),d()}static get(e){return e.getContribution(T9.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=Oi.get(this.editor);if(!i)return;const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:r}=e,a=[],l=new Qi;t&1||this.editor.pushUndoStop();const c=this.getOverwriteInfo(r,Boolean(t&8));if(this._memoryService.memorize(n,this.editor.getPosition(),r),Array.isArray(r.completion.additionalTextEdits)){const h=hc.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",r.completion.additionalTextEdits.map(u=>Ft.replaceMove(L.lift(u.range),u.text))),h.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!r.isResolved){const h=new $n(!0);let u;const g=n.onDidChangeContent(v=>{if(v.isFlush){l.cancel(),g.dispose();return}for(const C of v.changes){const w=L.getEndPosition(C.range);(!u||B.isBefore(w,u))&&(u=w)}}),f=t;t|=2;let _=!1;const b=this.editor.onWillType(()=>{b.dispose(),_=!0,f&2||this.editor.pushUndoStop()});a.push(r.resolve(l.token).then(()=>{if(!r.completion.additionalTextEdits||l.token.isCancellationRequested||u&&r.completion.additionalTextEdits.some(C=>B.isBefore(u,L.getStartPosition(C.range))))return!1;_&&this.editor.pushUndoStop();const v=hc.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",r.completion.additionalTextEdits.map(C=>Ft.replaceMove(L.lift(C.range),C.text))),v.restoreRelativeVerticalPositionOfCursor(this.editor),(_||!(f&2))&&this.editor.pushUndoStop(),!0}).then(v=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",h.elapsed(),v),g.dispose(),b.dispose()}))}let{insertText:d}=r.completion;r.completion.insertTextRules&4||(d=_c.escape(d)),i.insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(r.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),r.completion.command?r.completion.command.id===F_.id?this.model.trigger({auto:!0,shy:!1,noSelect:!1},!0):(a.push(this._commandService.executeCommand(r.completion.command.id,...r.completion.command.arguments?[...r.completion.command.arguments]:[]).catch(Te)),this.model.cancel()):this.model.cancel(),t&4&&this._alternatives.value.set(e,h=>{for(l.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(h,3|(t&8?8:0));break}}),this._alertCompletionItem(r),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(r,n,e),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,i){var n;if(this._telemetryGate++%100!==0)return;const s=e.extensionId?e.extensionId.value:((n=i.item.provider._debugDisplayName)!==null&&n!==void 0?n:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:s,kind:e.completion.kind,basenameHash:OI(Js(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:kq(t.uri)})}getOverwriteInfo(e,t){pt(this.editor.hasModel());let i=this.editor.getOption(108).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,r=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+r,overwriteAfter:s+a}}_alertCompletionItem(e){if(rn(e.completion.additionalTextEdits)){const t=p("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Gi(t)}}triggerSuggest(e,t,i,n){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,shy:!1,noSelect:n!=null?n:!1},!1,e,void 0,i),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const r=this.editor.getPosition(),a=s.editStart.column,l=r.column;return l-a!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:r.lineNumber,startColumn:a,endLineNumber:r.lineNumber,endColumn:l})!==s.completion.insertText};ge.once(this.model.onDidTrigger)(s=>{const r=[];ge.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{nt(r),i()},void 0,r),this.model.onDidSuggest(({completionModel:a})=>{if(nt(r),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!n(c)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,r)}),this.model.trigger({auto:!1,shy:!0,noSelect:!1}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){!this.widget.isInitialized||this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};_o.ID="editor.contrib.suggestController";_o=Lle([Gh(1,mw),Gh(2,ci),Gh(3,Ee),Gh(4,Ae),Gh(5,So),Gh(6,sr)],_o);class kle{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class F_ extends ce{constructor(){super({id:F_.id,label:p("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:se.and(N.writable,N.hasCompletionItemProvider),kbOpts:{kbExpr:N.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=_o.get(t);if(!n)return;let s,r;i&&typeof i=="object"&&(i.auto===!0&&(s=!0),i.noSelection===!0&&(r=!0)),n.triggerSuggest(void 0,s,void 0,r)}}F_.id="editor.action.triggerSuggest";tt(_o.ID,_o);ie(F_);const eo=100+90,ls=xi.bindToContribution(_o.get);ee(new ls({id:"acceptSelectedSuggestion",precondition:se.and(Ke.Visible,Ke.HasFocusedSuggestion),handler(o){o.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:se.and(Ke.Visible,N.textInputFocus),weight:eo},{primary:3,kbExpr:se.and(Ke.Visible,N.textInputFocus,Ke.AcceptSuggestionsOnEnter,Ke.MakesTextEdit),weight:eo}],menuOpts:[{menuId:Ql,title:p("accept.insert","Insert"),group:"left",order:1,when:Ke.HasInsertAndReplaceRange.toNegated()},{menuId:Ql,title:p("accept.insert","Insert"),group:"left",order:1,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("insert"))},{menuId:Ql,title:p("accept.replace","Replace"),group:"left",order:1,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("replace"))}]}));ee(new ls({id:"acceptAlternativeSelectedSuggestion",precondition:se.and(Ke.Visible,N.textInputFocus,Ke.HasFocusedSuggestion),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:1027,secondary:[1026]},handler(o){o.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Ql,group:"left",order:2,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("insert")),title:p("accept.replace","Replace")},{menuId:Ql,group:"left",order:2,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("replace")),title:p("accept.insert","Insert")}]}));Xe.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");ee(new ls({id:"hideSuggestWidget",precondition:Ke.Visible,handler:o=>o.cancelSuggestWidget(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:9,secondary:[1033]}}));ee(new ls({id:"selectNextSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectNextSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));ee(new ls({id:"selectNextPageSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectNextPageSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:12,secondary:[2060]}}));ee(new ls({id:"selectLastSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectLastSuggestion()}));ee(new ls({id:"selectPrevSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectPrevSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));ee(new ls({id:"selectPrevPageSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectPrevPageSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:11,secondary:[2059]}}));ee(new ls({id:"selectFirstSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectFirstSuggestion()}));ee(new ls({id:"toggleSuggestionDetails",precondition:Ke.Visible,handler:o=>o.toggleSuggestionDetails(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Ql,group:"right",order:1,when:se.and(Ke.DetailsVisible,Ke.CanResolve),title:p("detail.more","show less")},{menuId:Ql,group:"right",order:1,when:se.and(Ke.DetailsVisible.toNegated(),Ke.CanResolve),title:p("detail.less","show more")}]}));ee(new ls({id:"toggleExplainMode",precondition:Ke.Visible,handler:o=>o.toggleExplainMode(),kbOpts:{weight:100,primary:2133}}));ee(new ls({id:"toggleSuggestionFocus",precondition:Ke.Visible,handler:o=>o.toggleSuggestionFocus(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:2570,mac:{primary:778}}}));ee(new ls({id:"insertBestCompletion",precondition:se.and(N.textInputFocus,se.equals("config.editor.tabCompletion","on"),$m.AtEnd,Ke.Visible.toNegated(),ih.OtherSuggestions.toNegated(),Oi.InSnippetMode.toNegated()),handler:(o,e)=>{o.triggerSuggestAndAcceptBest(Hn(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:eo,primary:2}}));ee(new ls({id:"insertNextSuggestion",precondition:se.and(N.textInputFocus,se.equals("config.editor.tabCompletion","on"),ih.OtherSuggestions,Ke.Visible.toNegated(),Oi.InSnippetMode.toNegated()),handler:o=>o.acceptNextSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:2}}));ee(new ls({id:"insertPrevSuggestion",precondition:se.and(N.textInputFocus,se.equals("config.editor.tabCompletion","on"),ih.OtherSuggestions,Ke.Visible.toNegated(),Oi.InSnippetMode.toNegated()),handler:o=>o.acceptPrevSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:1026}}));ie(class extends ce{constructor(){super({id:"editor.action.resetSuggestSize",label:p("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(o,e){var t;(t=_o.get(e))===null||t===void 0||t.resetWidgetSize()}});class xle extends H{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new mt(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(e.onKeyDown(n=>{n.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(n=>{n.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=_o.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(r,a,l)=>{const c=this.editor.getModel(),d=kC(c,this.suggestControllerPreselector());if(!d)return-1;const h=B.lift(a),u=l.map((f,_)=>{const b=lO(i,h,f,this.isShiftKeyPressed),v=kC(c,b==null?void 0:b.normalizedInlineCompletion);if(!v)return;const C=Ile(d.range,v.range)&&d.insertText.startsWith(v.insertText);return{index:_,valid:C,prefixLength:v.insertText.length,suggestItem:f}}).filter(f=>f&&f.valid),g=zO(u,op(f=>f.prefixLength,Z8));return g?g.index:-1}}));let n=!1;const s=()=>{n||(n=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ge.once(i.model.onDidTrigger)(r=>{s()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(e){const t=this.getSuggestItemInfo();let i=!1;Ele(this._currentSuggestItemInfo,t)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=_o.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();if(!!t)return lO(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=_o.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=_o.get(this.editor);e&&e.forceRenderingAbove()}}function Ile(o,e){return e.startLineNumber===o.startLineNumber&&e.startColumn===o.startColumn&&(e.endLineNumber0)return{completionItemKind:t.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:L.fromPositions(e,e),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:n}=t.completion,s=!1;if(t.completion.insertTextRules&4){const a=new _c().parse(n),l=o.editor.getModel();if(a.children.length>100)return;SC.adjustWhitespace(l,e,a,!0,!0),n=a.toString(),s=!0}const r=o.getOverwriteInfo(t,i);return{isSnippetText:s,completionItemKind:t.completion.kind,normalizedInlineCompletion:{insertText:n,filterText:n,range:L.fromPositions(e.delta(0,-r.overwriteBefore),e.delta(0,Math.max(r.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}var Nle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tle=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},cO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Ex=class extends S9{constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new xle(this.editor,()=>{var n,s;return(s=(n=this.cache.value)===null||n===void 0?void 0:n.completions[0])===null||s===void 0?void 0:s.toLiveInlineCompletion()})),this.updateOperation=this._register(new _n),this.updateCacheSoon=this._register(new mt(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const s=this.ghostText;s&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,Ale(s.parts.map(r=>r.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(n=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register(Be(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(108).preview}updateCache(){return cO(this,void 0,void 0,function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.insertText,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition();if(e.selectedItem.isSnippetText||e.selectedItem.completionItemKind===27||e.selectedItem.completionItemKind===20||e.selectedItem.completionItemKind===23){this.cache.clear();return}const n=Ri(r=>cO(this,void 0,void 0,function*(){let a;try{a=yield D9(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:Ps.Automatic,selectedSuggestionInfo:t},r)}catch(l){Te(l);return}if(r.isCancellationRequested){a.dispose();return}this.cache.setValue(this.editor,a,Ps.Automatic),this.onDidChangeEmitter.fire()})),s=new L9(n,Ps.Automatic);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}get ghostText(){var e,t,i;const n=this.isSuggestionPreviewEnabled(),s=this.editor.getModel(),r=kC(s,(t=(e=this.cache.value)===null||e===void 0?void 0:e.completions[0])===null||t===void 0?void 0:t.toLiveInlineCompletion()),a=this.suggestionInlineCompletionSource.state,l=kC(s,(i=a==null?void 0:a.selectedItem)===null||i===void 0?void 0:i.normalizedInlineCompletion),c=r&&l&&r.insertText.startsWith(l.insertText)&&r.range.equalsRange(l.range);if(!n&&!c)return;const d=c?r:l||r,h=c?d.insertText.length-l.insertText.length:0;return this.toGhostText(d,h)}toGhostText(e,t){const i=this.editor.getOptions().get(108).previewMode;return e?y9(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new C9(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};Ex=Nle([Tle(2,de)],Ex);function Ale(o){return o.reduce((e,t)=>e+t,0)}var Mle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rle=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ole=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Ple extends H{constructor(){super(...arguments),this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new _n)}get targetModel(){var e;return(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object}setTargetModel(e){var t;((t=this.currentModelRef.value)===null||t===void 0?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?iae(e,e.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=(t=(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object)===null||t===void 0?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;(t=this.targetModel)===null||t===void 0||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let Nx=class extends Ple{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new Fle),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(Ex,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(yx,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=(t=this.activeInlineCompletionsModel)===null||t===void 0?void 0:t.ghostText;return i?i.parts.some(n=>e.containsPosition(new B(i.lineNumber,n.column))):!1}triggerInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.trigger(Ps.Explicit)}commitInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.hide()}showNextInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showNext()}showPreviousInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showPrevious()}hasMultipleInlineCompletions(){var e;return Ole(this,void 0,void 0,function*(){const t=yield(e=this.activeInlineCompletionsModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};Nx=Mle([Rle(1,Ae)],Nx);class Fle extends H{constructor(){super(...arguments),this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new _n)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new gae(t,e,()=>this.onDidChangeEmitter.fire(),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var Ble=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ry;const hO=(Ry=window.trustedTypes)===null||Ry===void 0?void 0:Ry.createPolicy("editorGhostText",{createHTML:o=>o});let Tx=class extends H{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(Vle,this.editor)),this.additionalLinesWidget=this._register(new Hle(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new Wle(this.editor)),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(29)||s.hasChanged(107)||s.hasChanged(90)||s.hasChanged(85)||s.hasChanged(47)||s.hasChanged(46)||s.hasChanged(61))&&this.update()})),this._register(Be(()=>{var s;this.disposed=!0,this.update(),(s=this.viewMoreContentWidget)===null||s===void 0||s.dispose(),this.viewMoreContentWidget=void 0})),this._register(t.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear(),this.replacementDecoration.clear();return}const i=new Array,n=new Array;function s(c,d){if(n.length>0){const h=n[n.length-1];d&&h.decorations.push(new es(h.content.length+1,h.content.length+1+c[0].length,d,0)),h.content+=c[0],c=c.slice(1)}for(const h of c)n.push({content:h,decorations:d?[new es(1,h.length+1,d,0)]:[]})}t instanceof w9?this.replacementDecoration.setDecorations([{range:new L(t.lineNumber,t.columnStart,t.lineNumber,t.columnStart+t.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const r=this.editor.getModel().getLineContent(t.lineNumber);let a,l=0;for(const c of t.parts){let d=c.lines;a===void 0?(i.push({column:c.column,text:d[0],preview:c.preview}),d=d.slice(1)):s([r.substring(l,c.column-1)],void 0),d.length>0&&(s(d,"ghost-text"),a===void 0&&c.column<=r.length&&(a=c.column)),l=c.column-1}a!==void 0&&s([r.substring(l)],void 0),this.partsWidget.setParts(t.lineNumber,i,a!==void 0?{column:a,length:r.length+1-a}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),(e=this.viewMoreContentWidget)===null||e===void 0||e.dispose(),this.viewMoreContentWidget=void 0}renderViewMoreLines(e,t,i){const n=this.editor.getOption(46),s=document.createElement("div");s.className="suggest-preview-additional-widget",an(s,n);const r=document.createElement("span");r.className="content-spacer",r.append(t),s.append(r);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("\u23CE "),s.append(a);const l=new Q,c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines\u2026`),l.add(ki(c,"mousedown",d=>{var h;(h=this.model)===null||h===void 0||h.setExpanded(!0),d.preventDefault(),this.editor.focus()})),s.append(c),new Ule(this.editor,e,s,l)}};Tx=Ble([dO(2,Ae),dO(3,Ht)],Tx);class Wle{constructor(e){this.editor=e,this.decorationIds=[]}setDecorations(e){this.editor.changeDecorations(t=>{this.decorationIds=t.deltaDecorations(this.decorationIds,e)})}clear(){this.setDecorations([])}dispose(){this.clear()}}class Vle{constructor(e){this.editor=e,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations(e=>{this.decorationIds=e.deltaDecorations(this.decorationIds,[])})}setParts(e,t,i){if(!this.editor.getModel())return;const s=new Array;i&&s.push({range:L.fromPositions(new B(e,i.column),new B(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations(r=>{this.decorationIds=r.deltaDecorations(this.decorationIds,t.map(a=>({range:L.fromPositions(new B(e,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Wo.Left},showIfCollapsed:!0}})).concat(s))})}}class Hle{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones(r=>{this._viewZoneId&&(r.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(t.length,i);if(a>0){const l=document.createElement("div");zle(l,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=r.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}}function zle(o,e,t,i,n){const s=i.get(29),r=i.get(107),a="none",l=i.get(85),c=i.get(47),d=i.get(46),h=i.get(61),u=nc(1e4);u.appendASCIIString('

');for(let _=0,b=t.length;_');const w=VC(C),S=eg(C),k=Di.createEmpty(C,n);a_(new Lc(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,C,!1,w,S,0,k,v.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,a,l,c!==_s.OFF,null),u),u.appendASCIIString("
")}u.appendASCIIString(""),an(o,d);const g=u.build(),f=hO?hO.createHTML(g):g;o.innerHTML=f}class Ule extends H{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register(Be(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Et((o,e)=>{const t=o.getColor(W$);t&&(e.addRule(`.monaco-editor .ghost-text-decoration { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${t.toString()} !important; }`));const i=o.getColor(V$);i&&(e.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${i.toString()}; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${i.toString()}; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${i.toString()}; }`));const n=o.getColor(B$);n&&(e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${n}; }`))});var A9=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ax=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},bw=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Mi=class M9 extends H{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new _n),this.activeModelDidChangeEmitter=this._register(new R),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(i=>{i.hasChanged(108)&&this.updateModelController(),i.hasChanged(57)&&this.updateModelController()})),this.updateModelController()}static get(e){return e.getContribution(M9.ID)}get activeModel(){var e;return(e=this.activeController.value)===null||e===void 0?void 0:e.model}updateModelController(){const e=this.editor.getOption(108),t=this.editor.getOption(57);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(Mx,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(e){var t;return((t=this.activeModel)===null||t===void 0?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return((i=(t=this.activeController.value)===null||t===void 0?void 0:t.widget)===null||i===void 0?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(e=this.activeModel)===null||e===void 0||e.triggerInlineCompletion()}commit(){var e;(e=this.activeModel)===null||e===void 0||e.commitInlineCompletion()}hide(){var e;(e=this.activeModel)===null||e===void 0||e.hideInlineCompletion()}showNextInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return bw(this,void 0,void 0,function*(){const t=yield(e=this.activeModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};Mi.inlineSuggestionVisible=new le("inlineSuggestionVisible",!1,p("inlineSuggestionVisible","Whether an inline suggestion is visible"));Mi.inlineSuggestionHasIndentation=new le("inlineSuggestionHasIndentation",!1,p("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));Mi.inlineSuggestionHasIndentationLessThanTabSize=new le("inlineSuggestionHasIndentationLessThanTabSize",!0,p("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));Mi.ID="editor.contrib.ghostTextController";Mi=A9([Ax(1,Ae)],Mi);class $le{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=Mi.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=Mi.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=Mi.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let Mx=class extends H{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new $le(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(Nx,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Tx,this.editor,this.model)),this._register(Be(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(((e=this.model.activeInlineCompletionsModel)===null||e===void 0?void 0:e.ghostText)!==void 0);let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:s,lines:r}=n.parts[0],a=r[0],l=this.editor.getModel().getLineIndentColumn(n.lineNumber);if(s<=l){let d=kn(a);d===-1&&(d=a.length-1),t=d>0;const h=this.editor.getModel().getOptions().tabSize;i=Ci.visibleColumnFromColumn(a,d+1,h)=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class qle{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}get commands(){var e,t,i;return((i=(t=(e=this.controller.activeModel)===null||e===void 0?void 0:e.activeInlineCompletionsModel)===null||t===void 0?void 0:t.completionSession.value)===null||i===void 0?void 0:i.commands)||[]}}let Rx=class{constructor(e,t,i,n,s,r,a){this._editor=e,this._commandService=t,this._menuService=i,this._contextKeyService=n,this._languageService=s,this._openerService=r,this.accessibilityService=a,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=Mi.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new T0(1e3,this,L.fromPositions(n.positionBefore||n.position,n.positionBefore||n.position))}return i.type===7&&t.shouldShowHoverAt(i.range)?new T0(1e3,this,i.range):i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new T0(1e3,this,i.range):null}computeSync(e,t){const i=Mi.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new qle(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new Q,n=t[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,n,i);const s=i.add(this._menuService.createMenu(M.InlineCompletionsActions,this._contextKeyService)),r=e.statusBar.addAction({label:p("showNextInlineSuggestion","Next"),commandId:Ag.ID,run:()=>this._commandService.executeCommand(Ag.ID)}),a=e.statusBar.addAction({label:p("showPreviousInlineSuggestion","Previous"),commandId:Mg.ID,run:()=>this._commandService.executeCommand(Mg.ID)});e.statusBar.addAction({label:p("acceptInlineSuggestion","Accept"),commandId:DC,run:()=>this._commandService.executeCommand(DC)});const l=[r,a];for(const c of l)c.setEnabled(!1);n.hasMultipleSuggestions().then(c=>{for(const d of l)d.setEnabled(c)});for(const c of n.commands)e.statusBar.addAction({label:c.title,commandId:c.id,run:()=>this._commandService.executeCommand(c.id,...c.arguments||[])});for(const[c,d]of s.getActions())for(const h of d)h instanceof ac&&e.statusBar.addAction({label:h.label,commandId:h.item.id,run:()=>this._commandService.executeCommand(h.item.id)});return i}renderScreenReaderText(e,t,i){var n,s;const r=J,a=r("div.hover-row.markdown-hover"),l=q(a,r("div.hover-contents")),c=i.add(new ol({editor:this._editor},this._languageService,this._openerService)),d=u=>{i.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",e.onContentsChanged()}));const g=p("inlineSuggestionFollows","Suggestion:"),f=i.add(c.render(new Fn().appendText(g).appendCodeblock("text",u)));l.replaceChildren(f.element)},h=(s=(n=t.controller.activeModel)===null||n===void 0?void 0:n.inlineCompletionsModel)===null||s===void 0?void 0:s.ghostText;if(h){const u=this._editor.getModel().getLineContent(h.lineNumber);d(h.renderForScreenReader(u))}e.fragment.appendChild(a)}};Rx=Kle([Zh(1,ci),Zh(2,ph),Zh(3,Ee),Zh(4,Ht),Zh(5,io),Zh(6,al)],Rx);tt(Mi.ID,Mi);ie(jle);ie(Ag);ie(Mg);xh.register(Rx);const R9=xi.bindToContribution(Mi.get),Ox=new R9({id:DC,precondition:Mi.inlineSuggestionVisible,handler(o){o.commit(),o.editor.focus()}});ee(Ox);as.registerKeybindingRule({primary:2,weight:200,id:Ox.id,when:se.and(Ox.precondition,N.tabMovesFocus.toNegated(),Mi.inlineSuggestionHasIndentationLessThanTabSize)});ee(new R9({id:"editor.action.inlineSuggest.hide",precondition:Mi.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(o){o.hide()}}));function Gn(o,e){let t=0;for(let i=0;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zle=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function O9(o,e,t,i,n){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(o.getLanguageId()).indentationRules;if(!s)return[];for(i=Math.min(i,o.getLineCount());t<=i&&s.unIndentedLinePattern;){const b=o.getLineContent(t);if(!s.unIndentedLinePattern.test(b))break;t++}if(t>i-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=o.getOptions(),c=(b,v)=>(v=v||1,Bs.shiftIndent(b,b.length+v,r,a,l)),d=(b,v)=>(v=v||1,Bs.unshiftIndent(b,b.length+v,r,a,l)),h=[];let u;const g=o.getLineContent(t);let f=g;if(n!=null){u=n;const b=_t(g);f=u+g.substring(b.length),s.decreaseIndentPattern&&s.decreaseIndentPattern.test(f)&&(u=d(u),f=u+g.substring(b.length)),g!==f&&h.push(Ft.replaceMove(new oe(t,1,t,b.length+1),Sv(u,a,l)))}else u=_t(g);let _=u;s.increaseIndentPattern&&s.increaseIndentPattern.test(f)?(_=c(_),u=c(u)):s.indentNextLinePattern&&s.indentNextLinePattern.test(f)&&(_=c(_)),t++;for(let b=t;b<=i;b++){const v=o.getLineContent(b),C=_t(v),w=_+v.substring(C.length);s.decreaseIndentPattern&&s.decreaseIndentPattern.test(w)&&(_=d(_),u=d(u)),C!==_&&h.push(Ft.replaceMove(new oe(b,1,b,C.length+1),Sv(_,a,l))),!(s.unIndentedLinePattern&&s.unIndentedLinePattern.test(v))&&(s.increaseIndentPattern&&s.increaseIndentPattern.test(w)?(u=c(u),_=u):s.indentNextLinePattern&&s.indentNextLinePattern.test(w)?_=c(_):_=u)}return h}class vw extends ce{constructor(){super({id:vw.ID,label:p("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:N.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new Jle(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}vw.ID="editor.action.indentationToSpaces";class Cw extends ce{constructor(){super({id:Cw.ID,label:p("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:N.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new ece(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}Cw.ID="editor.action.indentationToTabs";class P9 extends ce{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(dl),n=e.get(Ut),s=t.getModel();if(!s)return;const r=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),a=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===r.tabSize?p("configuredTabSize","Configured Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:p({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then(c=>{c&&s&&!s.isDisposed()&&s.updateOptions({tabSize:parseInt(c.label,10),insertSpaces:this.insertSpaces})})},50)}}class ww extends P9{constructor(){super(!1,{id:ww.ID,label:p("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}ww.ID="editor.action.indentUsingTabs";class Sw extends P9{constructor(){super(!0,{id:Sw.ID,label:p("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}Sw.ID="editor.action.indentUsingSpaces";class yw extends ce{constructor(){super({id:yw.ID,label:p("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(Ut),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}yw.ID="editor.action.detectIndentation";class Yle extends ce{constructor(){super({id:"editor.action.reindentlines",label:p("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:N.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=O9(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class Qle extends ce{constructor(){super({id:"editor.action.reindentselectedlines",label:p("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:N.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=t.getSelections();if(s===null)return;const r=[];for(const a of s){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;const d=O9(n,i,l,c);r.push(...d)}r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class Xle{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(L.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let Km=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new Q,this.callOnModel=new Q,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(50))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:s,indentSize:r,insertSpaces:a}=i.getOptions(),l=[],c={shiftIndent:g=>Bs.shiftIndent(g,g.length+1,s,r,a),unshiftIndent:g=>Bs.unshiftIndent(g,g.length+1,s,r,a)};let d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(i,d)){d++;continue}break}if(d>e.endLineNumber)return;let h=i.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){const g=hp(n,i,i.getLanguageId(),d,c,this._languageConfigurationService);if(g!==null){const f=_t(h),_=Gn(g,s),b=Gn(f,s);if(_!==b){const v=Tp(_,s,a);l.push({range:new L(d,1,d,f.length+1),text:v}),h=v+h.substr(f.length)}else{const v=Z4(i,d,this._languageConfigurationService);if(v===0||v===8)return}}}const u=d;for(;di.tokenization.getLineTokens(_),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(_,b)=>i.getLanguageIdAtPosition(_,b)},getLineContent:_=>_===u?h:i.getLineContent(_)},i.getLanguageId(),d+1,c,this._languageConfigurationService);if(f!==null){const _=Gn(f,s),b=Gn(_t(i.getLineContent(d+1)),s);if(_!==b){const v=_-b;for(let C=d+1;C<=e.endLineNumber;C++){const w=i.getLineContent(C),S=_t(w),x=Gn(S,s)+v,y=Tp(x,s,a);y!==S&&l.push({range:new L(C,1,C,S.length+1),text:y})}}}}if(l.length>0){this.editor.pushUndoStop();const g=new Xle(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",g),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const s=n.findTokenIndexAtOffset(i);if(s>=0&&n.getStandardTokenType(s)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Km.ID="editor.contrib.autoIndentOnPaste";Km=Gle([Zle(1,si)],Km);function F9(o,e,t,i){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return;let n="";for(let r=0;rthis._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,i;return xC(this,void 0,void 0,function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=n==null?void 0:n.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(i=n==null?void 0:n.label)!==null&&i!==void 0?i:this.hint.label,this._isResolved=!0}catch(n){Pi(n),this._isResolved=!1}})}}class qm{constructor(e,t,i){this._disposables=new Q,this.ranges=e,this.provider=new Set;const n=[];for(const[s,r]of t){this._disposables.add(s),this.provider.add(r);for(const a of s.hints){const l=i.validatePosition(a.position);let c="before";const d=qm._getRangeAtPosition(i,l);let h;d.getStartPosition().isBefore(l)?(h=L.fromPositions(d.getStartPosition(),l),c="after"):(h=L.fromPositions(l,d.getEndPosition()),c="before"),n.push(new uT(a,new B9(h,c),r))}}this.items=n.sort((s,r)=>B.compare(s.hint.position,r.hint.position))}static create(e,t,i,n){return xC(this,void 0,void 0,function*(){const s=[],r=e.ordered(t).reverse().map(a=>i.map(l=>xC(this,void 0,void 0,function*(){try{const c=yield a.provideInlayHints(t,l,n);c!=null&&c.hints.length&&s.push([c,a])}catch(c){Pi(c)}})));if(yield Promise.all(r.flat()),n.isCancellationRequested||t.isDisposed())throw new yc;return new qm(i,s,t)})}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new L(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),r=t.column-1,a=s.findTokenIndexAtOffset(r);let l=s.getStartOffset(a),c=s.getEndOffset(a);return c-l===1&&(l===r&&a>1?(l=s.getStartOffset(a-1),c=s.getEndOffset(a-1)):c===r&&auu(f)?f.command.id:""));for(const f of md.getEditorActions())f instanceof vo&&u.has(f.id)&&h.push(new is(f.id,f.label,void 0,!0,()=>Ap(this,void 0,void 0,function*(){const _=yield s.createModelReference(d.uri);try{yield l.invokeFunction(f.run.bind(f),e,new Pm(_.object.textEditorModel,L.getStartPosition(d.range)))}finally{_.dispose()}})));if(i.part.command){const{command:f}=i.part;h.push(new ln),h.push(new is(f.id,f.title,void 0,!0,()=>Ap(this,void 0,void 0,function*(){var _;try{yield a.executeCommand(f.id,...(_=f.arguments)!==null&&_!==void 0?_:[])}catch(b){c.notify({severity:I5.Error,source:i.item.provider.displayName,message:b})}})))}const g=e.getOption(117);r.showContextMenu({domForShadowRoot:g&&(n=e.getDomNode())!==null&&n!==void 0?n:void 0,getAnchor:()=>{const f=on(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>h,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function nce(o,e,t,i){return Ap(this,void 0,void 0,function*(){const s=yield o.get(Kn).createModelReference(i.uri);yield t.invokeWithinContext(r=>Ap(this,void 0,void 0,function*(){const a=e.hasSideBySideModifier,l=r.get(Ee),c=jn.inPeekEditor.getValue(l),d=!a&&t.getOption(80)&&!c;return new R_({openToSide:a,openInPeek:d,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(r,t,{model:s.object.textEditorModel,position:L.getStartPosition(i.range)})})),s.dispose()})}var sce=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},su=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class IC{constructor(){this._entries=new Dc(50)}get(e){const t=IC._key(e);return this._entries.get(t)}set(e,t){const i=IC._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const W9=Ye("IInlayHintsCache");et(W9,IC,!0);class Px{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class oce{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let nh=class Fx{constructor(e,t,i,n,s,r,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=r,this._instaService=a,this._disposables=new Q,this._sessionDisposables=new Q,this._decorationsMetadata=new Map,this._ruleFactory=new d_(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(129)&&this._update()})),this._update()}static get(e){var t;return(t=e.getContribution(Fx.ID))!==null&&t!==void 0?t:void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(129);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(Be(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n;const s=new Set,r=new mt(()=>su(this,void 0,void 0,function*(){const a=Date.now();n==null||n.dispose(!0),n=new Qi;const l=t.onWillDispose(()=>n==null?void 0:n.cancel());try{const c=n.token,d=yield qm.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(r.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){d.dispose();return}for(const h of d.provider)typeof h.onDidChangeInlayHints=="function"&&!s.has(h)&&(s.add(h),this._sessionDisposables.add(h.onDidChangeInlayHints(()=>{r.isScheduled()||r.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){Te(c)}finally{n.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add(Be(()=>n==null?void 0:n.dispose(!0))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!r.isScheduled())&&r.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{const l=Math.max(r.delay,1250);r.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(Ol.getInstance().event(c=>{if(!this._editor.hasModel())return;const d=c.altKey&&c.ctrlKey?l:a;if(d!==this._activeRenderMode){this._activeRenderMode=d;const h=this._editor.getModel(),u=this._copyInlayHintsWithCurrentAnchor(h);this._updateHintsDecorators([h.getFullModelRange()],u),r.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>r.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new Q,t=e.add(new UN(this._editor)),i=new Q;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{const[s]=n,r=this._getInlayHintLabelPart(s),a=this._editor.getModel();if(!r||!a){i.clear();return}const l=new Qi;i.add(Be(()=>l.dispose(!0))),r.item.resolve(l.token),this._activeInlayHintPart=r.part.command||r.part.location?new oce(r,s.hasTriggerModifier):void 0;const c=r.item.hint.position.lineNumber,d=new L(c,1,c,a.getLineMaxColumn(c)),h=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],h),i.add(Be(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],h)}))})),e.add(t.onCancel(()=>i.clear())),e.add(t.onExecute(n=>su(this,void 0,void 0,function*(){const s=this._getInlayHintLabelPart(n);if(s){const r=s.part;r.location?this._instaService.invokeFunction(nce,n,this._editor,r.location):Jy.is(r.command)&&(yield this._invokeCommand(r.command,s.item))}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>su(this,void 0,void 0,function*(){if(t.event.detail!==2)return;const i=this._getInlayHintLabelPart(t);if(!!i&&(t.event.preventDefault(),yield i.item.resolve(ze.None),rn(i.item.hint.textEdits))){const n=i.item.hint.textEdits.map(s=>Ft.replace(L.lift(s.range),s.text));this._editor.executeEdits("inlayHint.default",n),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>su(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(ice,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(i instanceof zd&&(i==null?void 0:i.attachedData)instanceof Px)return i.attachedData}_invokeCommand(e,t){var i;return su(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(i=e.arguments)!==null&&i!==void 0?i:[])}catch(n){this._notificationService.notify({severity:I5.Error,source:t.provider.displayName,message:n})}})}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const r=new B9(s,n.item.anchor.direction),a=n.item.with({anchor:r});t.set(n.item,a)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(L.compareRangesUsingStarts)){const r=t.validateRange(new L(s.startLineNumber-30,s.startColumn,s.endLineNumber+30,s.endColumn));n.length===0||!L.areIntersectingOrTouching(n[n.length-1],r)?n.push(r):n[n.length-1]=L.plusRange(n[n.length-1],r)}return n}_updateHintsDecorators(e,t){var i,n;const s=[],r=(f,_,b,v,C)=>{const w={content:b,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:_.className,cursorStops:v,attachedData:C};s.push({item:f,classNameRef:_,decoration:{range:f.anchor.range,options:{description:"InlayHint",showIfCollapsed:f.anchor.range.isEmpty(),collapseOnReplaceEdit:!f.anchor.range.isEmpty(),stickiness:0,[f.anchor.direction]:this._activeRenderMode===0?w:void 0}}})},a=(f,_)=>{const b=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});r(f,b,"\u200A",_?Wo.Right:Wo.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:h}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,c);for(const f of t){f.hint.paddingLeft&&a(f,!1);const _=typeof f.hint.label=="string"?[{label:f.hint.label}]:f.hint.label;for(let b=0;b<_.length;b++){const v=_[b],C=b===0,w=b===_.length-1,S={fontSize:`${l}px`,fontFamily:`var(${u}), ${ts.fontFamily}`,verticalAlign:h?"baseline":"middle"};rn(f.hint.textEdits)&&(S.cursor="default"),this._fillInColors(S,f.hint),(v.command||v.location)&&((i=this._activeInlayHintPart)===null||i===void 0?void 0:i.part.item)===f&&this._activeInlayHintPart.part.index===b&&(S.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(S.color=Qt(lE),S.cursor="pointer")),d&&(C&&w?(S.padding=`1px ${Math.max(1,l/4)|0}px`,S.borderRadius=`${l/4|0}px`):C?(S.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,S.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):w?(S.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,S.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):S.padding="1px 0 1px 0"),r(f,this._ruleFactory.createClassNameRef(S),rce(v.label),w&&!f.hint.paddingRight?Wo.Right:Wo.None,new Px(f,b))}if(f.hint.paddingRight&&a(f,!0),s.length>Fx._MAX_DECORATORS)break}const g=[];for(const f of e)for(const{id:_}of(n=this._editor.getDecorationsInRange(f))!==null&&n!==void 0?n:[]){const b=this._decorationsMetadata.get(_);b&&(g.push(_),b.classNameRef.dispose(),this._decorationsMetadata.delete(_))}this._editor.changeDecorations(f=>{const _=f.deltaDecorations(g,s.map(b=>b.decoration));for(let b=0;b<_.length;b++){const v=s[b];this._decorationsMetadata.set(_[b],v)}})}_fillInColors(e,t){t.kind===X0.Parameter?(e.backgroundColor=Qt(iU),e.color=Qt(tU)):t.kind===X0.Type?(e.backgroundColor=Qt(eU),e.color=Qt(Jz)):(e.backgroundColor=Qt(za),e.color=Qt(Ha))}_getLayoutInfo(){const e=this._editor.getOption(129),t=e.padding,i=this._editor.getOption(48),n=this._editor.getOption(45);let s=e.fontSize;(!s||s<5||s>i)&&(s=i);const r=e.fontFamily||n;return{fontSize:s,fontFamily:r,padding:t,isUniform:!t&&r===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};nh.ID="editor.contrib.InlayHints";nh._MAX_DECORATORS=1500;nh=sce([Yh(1,de),Yh(2,no),Yh(3,W9),Yh(4,ci),Yh(5,di),Yh(6,Ae)],nh);function rce(o){const e="\xA0";return o.replace(/[ \t]/g,e)}Xe.registerCommand("_executeInlayHintProvider",(o,...e)=>su(void 0,void 0,void 0,function*(){const[t,i]=e;pt(_e.isUri(t)),pt(L.isIRange(i));const{inlayHintsProvider:n}=o.get(de),s=yield o.get(Kn).createModelReference(t);try{const r=yield qm.create(n,s.object.textEditorModel,[L.lift(i)],ze.None),a=r.items.map(l=>l.hint);return setTimeout(()=>r.dispose(),0),a}finally{s.dispose()}}));var ace=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ff=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},uO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},lce=globalThis&&globalThis.__asyncValues||function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],t;return e?e.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=o[s]&&function(r){return new Promise(function(a,l){r=o[s](r),n(a,l,r.done,r.value)})}}function n(s,r,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},r)}};class gO extends T0{constructor(e,t){super(10,t,e.item.anchor.range),this.part=e}}let Bx=class extends bC{constructor(e,t,i,n,s,r){super(e,t,i,n,r),this._resolverService=s,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!nh.get(this._editor)||e.target.type!==6)return null;const n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return n instanceof zd&&n.attachedData instanceof Px?new gO(n.attachedData,this):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof gO?new ri(n=>uO(this,void 0,void 0,function*(){var s,r;const{part:a}=e;if(yield a.item.resolve(i),i.isCancellationRequested)return;let l;typeof a.item.hint.tooltip=="string"?l=new Fn().appendText(a.item.hint.tooltip):a.item.hint.tooltip&&(l=a.item.hint.tooltip),l&&n.emitOne(new Tr(this,e.range,[l],0)),rn(a.item.hint.textEdits)&&n.emitOne(new Tr(this,e.range,[new Fn().appendText(p("hint.dbl","Double click to insert"))],10001));let c;if(typeof a.part.tooltip=="string"?c=new Fn().appendText(a.part.tooltip):a.part.tooltip&&(c=a.part.tooltip),c&&n.emitOne(new Tr(this,e.range,[c],1)),a.part.location||a.part.command){let g;const _=this._editor.getOption(72)==="altKey"?Ge?p("links.navigate.kb.meta.mac","cmd + click"):p("links.navigate.kb.meta","ctrl + click"):Ge?p("links.navigate.kb.alt.mac","option + click"):p("links.navigate.kb.alt","alt + click");a.part.location&&a.part.command?g=new Fn().appendText(p("hint.defAndCommand","Go to Definition ({0}), right click for more",_)):a.part.location?g=new Fn().appendText(p("hint.def","Go to Definition ({0})",_)):a.part.command&&(g=new Fn(`[${p("hint.cmd","Execute Command")}](${tce(a.part.command)} "${a.part.command.title}") (${_})`,{isTrusted:!0})),g&&n.emitOne(new Tr(this,e.range,[g],1e4))}const d=yield this._resolveInlayHintLabelPartHover(a,i);try{for(var h=lce(d),u;u=yield h.next(),!u.done;){const g=u.value;n.emitOne(g)}}catch(g){s={error:g}}finally{try{u&&!u.done&&(r=h.return)&&(yield r.call(h))}finally{if(s)throw s.error}}})):ri.EMPTY}_resolveInlayHintLabelPartHover(e,t){return uO(this,void 0,void 0,function*(){if(!e.part.location)return ri.EMPTY;const{uri:i,range:n}=e.part.location,s=yield this._resolverService.createModelReference(i);try{const r=s.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(r)?eT(this._languageFeaturesService.hoverProvider,r,new B(n.startLineNumber,n.startColumn),t).filter(a=>!_g(a.hover.contents)).map(a=>new Tr(this,e.item.anchor.range,a.hover.contents,2+a.ordinal)):ri.EMPTY}finally{s.dispose()}})}};Bx=ace([Ff(1,Ht),Ff(2,io),Ff(3,ot),Ff(4,Kn),Ff(5,de)],Bx);tt(nh.ID,nh);xh.register(Bx);class cce{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new oe(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new oe(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var dce=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hce=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Cc=class Wx{constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}static get(e){return e.getContribution(Wx.ID)}dispose(){}run(e,t){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;const r=new Tm(this.editor,5),a=n.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=Ri(l=>this.editorWorkerService.navigateValueSet(a,s,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!r.validate(this.editor))return;const c=L.lift(l.range);let d=l.range;const h=l.value.length-(s.endColumn-s.startColumn);d={startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.startColumn+l.value.length},h>1&&(s=new oe(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+h-1));const u=new cce(c,s,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:d,options:Wx.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=sc(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Te)}).catch(Te)):Promise.resolve(void 0)}};Cc.ID="editor.contrib.inPlaceReplaceController";Cc.DECORATION=Ne.register({description:"in-place-replace",className:"valueSetReplacement"});Cc=dce([hce(1,to)],Cc);class uce extends ce{constructor(){super({id:"editor.action.inPlaceReplace.up",label:p("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=Cc.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class gce extends ce{constructor(){super({id:"editor.action.inPlaceReplace.down",label:p("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=Cc.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}tt(Cc.ID,Cc);ie(uce);ie(gce);Et((o,e)=>{const t=o.getColor(z4);t&&e.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${t}; }`)});class fce extends ce{constructor(){super({id:"expandLineSelection",label:p("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:N.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,Wi.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}ie(fce);class pce{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=mce(e,this._cursors);for(let n=0,s=i.length;nr.lineNumber===a.lineNumber?r.column-a.column:r.lineNumber-a.lineNumber);for(let r=e.length-2;r>=0;r--)e[r].lineNumber===e[r+1].lineNumber&&e.splice(r,1);const t=[];let i=0,n=0;const s=e.length;for(let r=1,a=o.getLineCount();r<=a;r++){const l=o.getLineContent(r),c=l.length+1;let d=0;if(n1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=a,this._type.title=a,bs(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Si(this._type),this._type.title="",Pn(this._type),this.domNode.classList.add("no-type");if(Si(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),Si(this._docs);const a=this._markdownRenderer.render(r);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new vt(e,t);vt.equals(i,this._size)||(this._size=i,jH(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};kx=hle([ule(1,Ae)],kx);class gle{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new Q,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new E9,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+r})}a.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=JC(document.body),r=this.widget.getLayoutInfo(),a=new vt(220,2*r.lineHeight),l=e.top,c=function(){const w=s.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),S=-r.borderWidth+e.left+e.width,k=new vt(w,s.height-e.top-r.borderHeight-r.verticalPadding),x=k.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:k,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),d=function(){const w=e.left-r.borderWidth-r.horizontalPadding,S=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),k=new vt(w,s.height-e.top-r.borderHeight-r.verticalPadding),x=k.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:k,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),h=function(){const w=e.left,S=-r.borderWidth+e.top+e.height,k=new vt(e.width-r.borderHeight,s.height-e.top-e.height-r.verticalPadding);return{top:S,left:w,fit:k.height-t.height,maxSizeBottom:k,maxSizeTop:k,minSize:a.with(k.width)}}(),u=[c,d,h],g=(n=u.find(w=>w.fit>=0))!==null&&n!==void 0?n:u.sort((w,S)=>S.fit-w.fit)[0],f=e.top+e.height-r.borderHeight;let _,b=t.height;const v=Math.max(g.maxSizeTop.height,g.maxSizeBottom.height);b>v&&(b=v);let C;i?b<=g.maxSizeTop.height?(_=!0,C=g.maxSizeTop):(_=!1,C=g.maxSizeBottom):b<=g.maxSizeBottom.height?(_=!1,C=g.maxSizeBottom):(_=!0,C=g.maxSizeTop),this._applyTopLeft({left:g.left,top:_?g.top:f-b}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!_,g===c,_,g!==c),this._resizable.minSize=g.minSize,this._resizable.maxSize=C,this._resizable.layout(b,Math.min(C.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Ka;(function(o){o[o.FILE=0]="FILE",o[o.FOLDER=1]="FOLDER",o[o.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ka||(Ka={}));const fle=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function i0(o,e,t,i){const n=i===Ka.ROOT_FOLDER?["rootfolder-icon"]:i===Ka.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===Me.data)s=cc.parseMetaData(t).get(cc.META_DATA_LABEL);else{const r=t.path.match(fle);r?(s=n0(r[2].toLowerCase()),r[1]&&n.push(`${n0(r[1].toLowerCase())}-name-dir-icon`)):s=n0(t.authority.toLowerCase())}if(i===Ka.FOLDER)n.push(`${s}-name-folder-icon`);else{if(s){if(n.push(`${s}-name-file-icon`),n.push("name-file-icon"),s.length<=255){const a=s.split(".");for(let l=1;l=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ay=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Pf;function N9(o){return`suggest-aria-id:${o}`}const _le=mi("suggest-more-info",m.chevronRight,p("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),ble=new(Pf=class F0{extract(e,t){if(e.textLabel.match(F0._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(F0._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=F0._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},Pf._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,Pf._regexStrict=new RegExp(`^${Pf._regexRelaxed.source}$`,"i"),Pf);let xx=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new R,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new Q,t.root=e,t.root.classList.add("show-file-icons"),t.icon=q(e,J(".icon")),t.colorspan=q(t.icon,J("span.colorspan"));const i=q(e,J(".contents")),n=q(i,J(".main"));t.iconContainer=q(n,J(".icon-label.codicon")),t.left=q(n,J("span.left")),t.right=q(n,J("span.right")),t.iconLabel=new nC(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=q(t.left,J("span.signature-label")),t.qualifierLabel=q(t.left,J("span.qualifier-label")),t.detailsLabel=q(t.right,J("span.details-label")),t.readMore=q(t.right,J("span.readMore"+at.asCSSSelector(_le))),t.readMore.title=p("readMore","Read More");const s=()=>{const r=this._editor.getOptions(),a=r.get(46),l=a.getMassagedFontFamily(),c=a.fontFeatureSettings,d=r.get(109)||a.fontSize,h=r.get(110)||a.lineHeight,u=a.fontWeight,g=a.letterSpacing,f=`${d}px`,_=`${h}px`,b=`${g}px`;t.root.style.fontSize=f,t.root.style.fontWeight=u,t.root.style.letterSpacing=b,n.style.fontFamily=l,n.style.fontFeatureSettings=c,n.style.lineHeight=_,t.icon.style.height=_,t.icon.style.width=_,t.readMore.style.height=_,t.readMore.style.width=_};return s(),t.disposables.add(this._editor.onDidChangeConfiguration(r=>{(r.hasChanged(46)||r.hasChanged(109)||r.hasChanged(110))&&s()})),t}renderElement(e,t,i){const{completion:n}=e;i.root.id=N9(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:E1(e.score)},r=[];if(n.kind===19&&ble.extract(e,r))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=r[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:e.textLabel}),Ka.FILE),l=i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:n.detail}),Ka.FILE);s.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:e.textLabel}),Ka.FOLDER),i0(this._modelService,this._languageService,_e.from({scheme:"fake",path:n.detail}),Ka.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Ln.asClassNameArray(Pp.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=My(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=My(n.label.detail||""),i.detailsLabel.textContent=My(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(108).showInlineDetails?bs(i.detailsLabel):Pn(i.detailsLabel),hT(e)?(i.right.classList.add("can-expand-details"),bs(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),Pn(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};xx=mle([Ay(1,Ut),Ay(2,Ht),Ay(3,Ct)],xx);function My(o){return o.replace(/\r\n|\r|\n/g,"")}var vle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s0=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Cle=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};T("editorSuggestWidget.background",{dark:li,light:li,hcDark:li,hcLight:li},p("editorSuggestWidgetBackground","Background color of the suggest widget."));T("editorSuggestWidget.border",{dark:Ba,light:Ba,hcDark:Ba,hcLight:Ba},p("editorSuggestWidgetBorder","Border color of the suggest widget."));const o0=T("editorSuggestWidget.foreground",{dark:Cs,light:Cs,hcDark:Cs,hcLight:Cs},p("editorSuggestWidgetForeground","Foreground color of the suggest widget."));T("editorSuggestWidget.selectedForeground",{dark:jf,light:jf,hcDark:jf,hcLight:jf},p("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));T("editorSuggestWidget.selectedIconForeground",{dark:Kf,light:Kf,hcDark:Kf,hcLight:Kf},p("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const wle=T("editorSuggestWidget.selectedBackground",{dark:qf,light:qf,hcDark:qf,hcLight:qf},p("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));T("editorSuggestWidget.highlightForeground",{dark:fo,light:fo,hcDark:fo,hcLight:fo},p("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));T("editorSuggestWidget.focusHighlightForeground",{dark:ob,light:ob,hcDark:ob,hcLight:ob},p("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));T("editorSuggestWidgetStatus.foreground",{dark:fe(o0,.5),light:fe(o0,.5),hcDark:fe(o0,.5),hcLight:fe(o0,.5)},p("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Sle{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Qd}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(vt.is(i))return vt.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let jm=class Ix{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new xs,this._disposables=new Q,this._onDidSelect=new R,this._onDidFocus=new R,this._onDidHide=new R,this._onDidShow=new R,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new R,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new E9,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new yle(this,e),this._persistedSize=new Sle(t,e);class r{constructor(g,f,_=!1,b=!1){this.persistedSize=g,this.currentSize=f,this.persistHeight=_,this.persistWidth=b}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new r(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(u=>{var g,f,_,b;if(this._resize(u.dimension.width,u.dimension.height),a&&(a.persistHeight=a.persistHeight||!!u.north||!!u.south,a.persistWidth=a.persistWidth||!!u.east||!!u.west),!!u.done){if(a){const{itemHeight:v,defaultSize:C}=this.getLayoutInfo(),w=Math.round(v/2);let{width:S,height:k}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-k)<=w)&&(k=(f=(g=a.persistedSize)===null||g===void 0?void 0:g.height)!==null&&f!==void 0?f:C.height),(!a.persistWidth||Math.abs(a.currentSize.width-S)<=w)&&(S=(b=(_=a.persistedSize)===null||_===void 0?void 0:_.width)!==null&&b!==void 0?b:C.width),this._persistedSize.store(new vt(S,k))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=q(this.element.domNode,J(".message")),this._listElement=q(this.element.domNode,J(".tree"));const l=s.createInstance(kx,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new gle(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(108).showIcons);c();const d=s.createInstance(xx,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new rr("SuggestWidget",this._listElement,{getHeight:u=>this.getLayoutInfo().itemHeight,getTemplateId:u=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>p("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:u=>{let g=u.textLabel;if(typeof u.completion.label!="string"){const{detail:v,description:C}=u.completion.label;v&&C?g=p("label.full","{0}{1}, {2}",g,v,C):v?g=p("label.detail","{0}{1}",g,v):C&&(g=p("label.desc","{0}, {1}",g,C))}if(!u.isResolved||!this._isDetailsVisible())return g;const{documentation:f,detail:_}=u.completion,b=Vs("{0}{1}",_||"",f?typeof f=="string"?f:f.value:"");return p("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",g,b)}}}),this._status=s.createInstance(Dx,this.element.domNode);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(108).showStatusBar);h(),this._disposables.add(Ud(this._list,n,{listInactiveFocusBackground:wle,listInactiveFocusOutline:Ot})),this._disposables.add(n.onDidColorThemeChange(u=>this._onThemeChange(u))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(u=>this._onListMouseDownOrTap(u))),this._disposables.add(this._list.onTap(u=>this._onListMouseDownOrTap(u))),this._disposables.add(this._list.onDidChangeSelection(u=>this._onListSelection(u))),this._disposables.add(this._list.onDidChangeFocus(u=>this._onListFocus(u))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(u=>{u.hasChanged(108)&&(h(),c())})),this._ctxSuggestWidgetVisible=Ke.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=Ke.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=Ke.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=Ke.HasFocusedSuggestion.bindTo(i),this._disposables.add(ki(this._details.widget.domNode,"keydown",u=>{this._onDetailsKeydown.fire(u)})),this._disposables.add(this.editor.onMouseDown(u=>this._onEditorMouseDown(u)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=cn(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Ri(s=>Cle(this,void 0,void 0,function*(){const r=Ad(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=s.onCancellationRequested(()=>r.dispose()),l=yield i.resolve(s);return r.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:N9(n)}))}).catch(Te)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Pn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ix.LOADING_MESSAGE,Pn(this._listElement,this._status.element),bs(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ix.NO_SUGGESTIONS_MESSAGE,Pn(this._listElement,this._status.element),bs(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Pn(this._messageElement),bs(this._listElement,this._status.element),this._show();break;case 4:Pn(this._messageElement),bs(this._listElement,this._status.element),this._show();break;case 5:Pn(this._messageElement),bs(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Ad(()=>this._setState(1),t)))}showSuggestions(e,t,i,n){var s,r;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(r=this._currentSuggestionDetails)===null||r===void 0||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const a=this._completionModel.items.length,l=a===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),t>=0&&(this._list.reveal(t,0),this._list.setFocus([t])),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(hT(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightc&&(l=c);const d=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:l,h=r.statusBarHeight+this._list.contentHeight+r.borderHeight,u=r.itemHeight+r.statusBarHeight,g=on(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),_=g.top+f.top+f.height,b=Math.min(s.height-_-r.verticalPadding,h),v=g.top+f.top-r.verticalPadding,C=Math.min(v,h);let w=Math.min(Math.max(C,b)+r.borderHeight,h);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),aw&&(a=w);const S=150;a>b||this._forceRenderingAbove&&v>S?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),w=C):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),w=b),this.element.preferredSize=new vt(d,r.defaultSize.height),this.element.maxSize=new vt(c,w),this.element.minSize=new vt(220,u),this._cappedHeight=a===h?{wanted:(n=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=`${t-s}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(46),t=Zn(this.editor.getOption(110)||e.lineHeight,8,1e3),i=!this.editor.getOption(108).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new vt(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};jm.LOADING_MESSAGE=p("suggestWidget.loading","Loading...");jm.NO_SUGGESTIONS_MESSAGE=p("suggestWidget.noSuggestions","No suggestions.");jm=vle([s0(1,Do),s0(2,Ee),s0(3,Ct),s0(4,Ae)],jm);class yle{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new vt(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Lle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class Dle{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:L.fromPositions(t,s),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let _o=class T9{constructor(e,t,i,n,s,r,a){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=r,this._telemetryService=a,this._lineSuffix=new _n,this._toDispose=new Q,this._selectors=new kle(h=>h.priority),this._telemetryGate=0,this.editor=e,this.model=s.createInstance(Lx,this.editor);const l=Ke.InsertMode.bindTo(n);l.set(e.getOption(108).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(108).insertMode)),this.widget=this._toDispose.add(new $l(()=>{const h=this._instantiationService.createInstance(jm,this.editor);this._toDispose.add(h),this._toDispose.add(h.onDidSelect(b=>this._insertSuggestion(b,0),this));const u=new Lae(this.editor,h,b=>this._insertSuggestion(b,2));this._toDispose.add(u),this._toDispose.add(this.model.onDidSuggest(b=>{b.completionModel.items.length===0&&u.reset()}));const g=Ke.MakesTextEdit.bindTo(this._contextKeyService),f=Ke.HasInsertAndReplaceRange.bindTo(this._contextKeyService),_=Ke.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Be(()=>{g.reset(),f.reset(),_.reset()})),this._toDispose.add(h.onDidFocus(({item:b})=>{const v=this.editor.getPosition(),C=b.editStart.column,w=v.column;let S=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!b.completion.additionalTextEdits&&!(b.completion.insertTextRules&4)&&w-C===b.completion.insertText.length&&(S=this.editor.getModel().getValueInRange({startLineNumber:v.lineNumber,startColumn:C,endLineNumber:v.lineNumber,endColumn:w})!==b.completion.insertText),g.set(S),f.set(!B.equals(b.editInsertEnd,b.editReplaceEnd)),_.set(Boolean(b.provider.resolveCompletionItem)||Boolean(b.completion.documentation)||b.completion.detail!==b.completion.label)})),this._toDispose.add(h.onDetailsKeyDown(b=>{if(b.toKeybinding().equals(new Md(!0,!1,!1,!1,33))||Ge&&b.toKeybinding().equals(new Md(!1,!1,!1,!0,33))){b.stopPropagation();return}b.toKeybinding().isModifierKey()||this.editor.focus()})),h})),this._overtypingCapturer=this._toDispose.add(new $l(()=>this._toDispose.add(new _w(this.editor,this.model)))),this._alternatives=this._toDispose.add(new $l(()=>this._toDispose.add(new ih(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance($m,e)),this._toDispose.add(this.model.onDidTrigger(h=>{this.widget.value.showTriggered(h.auto,h.shy?250:50),this._lineSuffix.value=new Dle(this.editor.getModel(),h.position)})),this._toDispose.add(this.model.onDidSuggest(h=>{if(h.shy)return;let u=-1;if(!h.noSelect){for(const g of this._selectors.itemsOrderedByPriorityDesc)if(u=g.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items),u!==-1)break;u===-1&&(u=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items))}this.widget.value.showSuggestions(h.completionModel,u,h.isFrozen,h.auto)})),this._toDispose.add(this.model.onDidCancel(h=>{h.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const c=Ke.AcceptSuggestionsOnEnter.bindTo(n),d=()=>{const h=this.editor.getOption(1);c.set(h==="on"||h==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>d())),d()}static get(e){return e.getContribution(T9.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=Oi.get(this.editor);if(!i)return;const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:r}=e,a=[],l=new Qi;t&1||this.editor.pushUndoStop();const c=this.getOverwriteInfo(r,Boolean(t&8));if(this._memoryService.memorize(n,this.editor.getPosition(),r),Array.isArray(r.completion.additionalTextEdits)){const h=hc.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",r.completion.additionalTextEdits.map(u=>Ft.replaceMove(L.lift(u.range),u.text))),h.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!r.isResolved){const h=new $n(!0);let u;const g=n.onDidChangeContent(v=>{if(v.isFlush){l.cancel(),g.dispose();return}for(const C of v.changes){const w=L.getEndPosition(C.range);(!u||B.isBefore(w,u))&&(u=w)}}),f=t;t|=2;let _=!1;const b=this.editor.onWillType(()=>{b.dispose(),_=!0,f&2||this.editor.pushUndoStop()});a.push(r.resolve(l.token).then(()=>{if(!r.completion.additionalTextEdits||l.token.isCancellationRequested||u&&r.completion.additionalTextEdits.some(C=>B.isBefore(u,L.getStartPosition(C.range))))return!1;_&&this.editor.pushUndoStop();const v=hc.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",r.completion.additionalTextEdits.map(C=>Ft.replaceMove(L.lift(C.range),C.text))),v.restoreRelativeVerticalPositionOfCursor(this.editor),(_||!(f&2))&&this.editor.pushUndoStop(),!0}).then(v=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",h.elapsed(),v),g.dispose(),b.dispose()}))}let{insertText:d}=r.completion;r.completion.insertTextRules&4||(d=_c.escape(d)),i.insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(r.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),r.completion.command?r.completion.command.id===F_.id?this.model.trigger({auto:!0,shy:!1,noSelect:!1},!0):(a.push(this._commandService.executeCommand(r.completion.command.id,...r.completion.command.arguments?[...r.completion.command.arguments]:[]).catch(Te)),this.model.cancel()):this.model.cancel(),t&4&&this._alternatives.value.set(e,h=>{for(l.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(h,3|(t&8?8:0));break}}),this._alertCompletionItem(r),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(r,n,e),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,i){var n;if(this._telemetryGate++%100!==0)return;const s=e.extensionId?e.extensionId.value:((n=i.item.provider._debugDisplayName)!==null&&n!==void 0?n:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:s,kind:e.completion.kind,basenameHash:OI(Js(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:kq(t.uri)})}getOverwriteInfo(e,t){pt(this.editor.hasModel());let i=this.editor.getOption(108).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,r=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+r,overwriteAfter:s+a}}_alertCompletionItem(e){if(rn(e.completion.additionalTextEdits)){const t=p("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Gi(t)}}triggerSuggest(e,t,i,n){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,shy:!1,noSelect:n!=null?n:!1},!1,e,void 0,i),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const r=this.editor.getPosition(),a=s.editStart.column,l=r.column;return l-a!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:r.lineNumber,startColumn:a,endLineNumber:r.lineNumber,endColumn:l})!==s.completion.insertText};ge.once(this.model.onDidTrigger)(s=>{const r=[];ge.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{nt(r),i()},void 0,r),this.model.onDidSuggest(({completionModel:a})=>{if(nt(r),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!n(c)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,r)}),this.model.trigger({auto:!1,shy:!0,noSelect:!1}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){!this.widget.isInitialized||this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};_o.ID="editor.contrib.suggestController";_o=Lle([Gh(1,mw),Gh(2,ci),Gh(3,Ee),Gh(4,Ae),Gh(5,So),Gh(6,sr)],_o);class kle{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class F_ extends ce{constructor(){super({id:F_.id,label:p("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:se.and(N.writable,N.hasCompletionItemProvider),kbOpts:{kbExpr:N.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=_o.get(t);if(!n)return;let s,r;i&&typeof i=="object"&&(i.auto===!0&&(s=!0),i.noSelection===!0&&(r=!0)),n.triggerSuggest(void 0,s,void 0,r)}}F_.id="editor.action.triggerSuggest";tt(_o.ID,_o);ie(F_);const eo=100+90,ls=xi.bindToContribution(_o.get);ee(new ls({id:"acceptSelectedSuggestion",precondition:se.and(Ke.Visible,Ke.HasFocusedSuggestion),handler(o){o.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:se.and(Ke.Visible,N.textInputFocus),weight:eo},{primary:3,kbExpr:se.and(Ke.Visible,N.textInputFocus,Ke.AcceptSuggestionsOnEnter,Ke.MakesTextEdit),weight:eo}],menuOpts:[{menuId:Ql,title:p("accept.insert","Insert"),group:"left",order:1,when:Ke.HasInsertAndReplaceRange.toNegated()},{menuId:Ql,title:p("accept.insert","Insert"),group:"left",order:1,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("insert"))},{menuId:Ql,title:p("accept.replace","Replace"),group:"left",order:1,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("replace"))}]}));ee(new ls({id:"acceptAlternativeSelectedSuggestion",precondition:se.and(Ke.Visible,N.textInputFocus,Ke.HasFocusedSuggestion),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:1027,secondary:[1026]},handler(o){o.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Ql,group:"left",order:2,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("insert")),title:p("accept.replace","Replace")},{menuId:Ql,group:"left",order:2,when:se.and(Ke.HasInsertAndReplaceRange,Ke.InsertMode.isEqualTo("replace")),title:p("accept.insert","Insert")}]}));Xe.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");ee(new ls({id:"hideSuggestWidget",precondition:Ke.Visible,handler:o=>o.cancelSuggestWidget(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:9,secondary:[1033]}}));ee(new ls({id:"selectNextSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectNextSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));ee(new ls({id:"selectNextPageSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectNextPageSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:12,secondary:[2060]}}));ee(new ls({id:"selectLastSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectLastSuggestion()}));ee(new ls({id:"selectPrevSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectPrevSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));ee(new ls({id:"selectPrevPageSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectPrevPageSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:11,secondary:[2059]}}));ee(new ls({id:"selectFirstSuggestion",precondition:se.and(Ke.Visible,Ke.MultipleSuggestions),handler:o=>o.selectFirstSuggestion()}));ee(new ls({id:"toggleSuggestionDetails",precondition:Ke.Visible,handler:o=>o.toggleSuggestionDetails(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Ql,group:"right",order:1,when:se.and(Ke.DetailsVisible,Ke.CanResolve),title:p("detail.more","show less")},{menuId:Ql,group:"right",order:1,when:se.and(Ke.DetailsVisible.toNegated(),Ke.CanResolve),title:p("detail.less","show more")}]}));ee(new ls({id:"toggleExplainMode",precondition:Ke.Visible,handler:o=>o.toggleExplainMode(),kbOpts:{weight:100,primary:2133}}));ee(new ls({id:"toggleSuggestionFocus",precondition:Ke.Visible,handler:o=>o.toggleSuggestionFocus(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:2570,mac:{primary:778}}}));ee(new ls({id:"insertBestCompletion",precondition:se.and(N.textInputFocus,se.equals("config.editor.tabCompletion","on"),$m.AtEnd,Ke.Visible.toNegated(),ih.OtherSuggestions.toNegated(),Oi.InSnippetMode.toNegated()),handler:(o,e)=>{o.triggerSuggestAndAcceptBest(Hn(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:eo,primary:2}}));ee(new ls({id:"insertNextSuggestion",precondition:se.and(N.textInputFocus,se.equals("config.editor.tabCompletion","on"),ih.OtherSuggestions,Ke.Visible.toNegated(),Oi.InSnippetMode.toNegated()),handler:o=>o.acceptNextSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:2}}));ee(new ls({id:"insertPrevSuggestion",precondition:se.and(N.textInputFocus,se.equals("config.editor.tabCompletion","on"),ih.OtherSuggestions,Ke.Visible.toNegated(),Oi.InSnippetMode.toNegated()),handler:o=>o.acceptPrevSuggestion(),kbOpts:{weight:eo,kbExpr:N.textInputFocus,primary:1026}}));ie(class extends ce{constructor(){super({id:"editor.action.resetSuggestSize",label:p("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(o,e){var t;(t=_o.get(e))===null||t===void 0||t.resetWidgetSize()}});class xle extends H{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new mt(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(e.onKeyDown(n=>{n.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(n=>{n.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=_o.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(r,a,l)=>{const c=this.editor.getModel(),d=kC(c,this.suggestControllerPreselector());if(!d)return-1;const h=B.lift(a),u=l.map((f,_)=>{const b=lO(i,h,f,this.isShiftKeyPressed),v=kC(c,b==null?void 0:b.normalizedInlineCompletion);if(!v)return;const C=Ile(d.range,v.range)&&d.insertText.startsWith(v.insertText);return{index:_,valid:C,prefixLength:v.insertText.length,suggestItem:f}}).filter(f=>f&&f.valid),g=zO(u,op(f=>f.prefixLength,Z8));return g?g.index:-1}}));let n=!1;const s=()=>{n||(n=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ge.once(i.model.onDidTrigger)(r=>{s()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(e){const t=this.getSuggestItemInfo();let i=!1;Ele(this._currentSuggestItemInfo,t)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=_o.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();if(!!t)return lO(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=_o.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=_o.get(this.editor);e&&e.forceRenderingAbove()}}function Ile(o,e){return e.startLineNumber===o.startLineNumber&&e.startColumn===o.startColumn&&(e.endLineNumber0)return{completionItemKind:t.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:L.fromPositions(e,e),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:n}=t.completion,s=!1;if(t.completion.insertTextRules&4){const a=new _c().parse(n),l=o.editor.getModel();if(a.children.length>100)return;SC.adjustWhitespace(l,e,a,!0,!0),n=a.toString(),s=!0}const r=o.getOverwriteInfo(t,i);return{isSnippetText:s,completionItemKind:t.completion.kind,normalizedInlineCompletion:{insertText:n,filterText:n,range:L.fromPositions(e.delta(0,-r.overwriteBefore),e.delta(0,Math.max(r.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}var Nle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tle=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},cO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Ex=class extends S9{constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new xle(this.editor,()=>{var n,s;return(s=(n=this.cache.value)===null||n===void 0?void 0:n.completions[0])===null||s===void 0?void 0:s.toLiveInlineCompletion()})),this.updateOperation=this._register(new _n),this.updateCacheSoon=this._register(new mt(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const s=this.ghostText;s&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,Ale(s.parts.map(r=>r.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(n=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register(Be(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(108).preview}updateCache(){return cO(this,void 0,void 0,function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.insertText,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition();if(e.selectedItem.isSnippetText||e.selectedItem.completionItemKind===27||e.selectedItem.completionItemKind===20||e.selectedItem.completionItemKind===23){this.cache.clear();return}const n=Ri(r=>cO(this,void 0,void 0,function*(){let a;try{a=yield D9(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:Ps.Automatic,selectedSuggestionInfo:t},r)}catch(l){Te(l);return}if(r.isCancellationRequested){a.dispose();return}this.cache.setValue(this.editor,a,Ps.Automatic),this.onDidChangeEmitter.fire()})),s=new L9(n,Ps.Automatic);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}get ghostText(){var e,t,i;const n=this.isSuggestionPreviewEnabled(),s=this.editor.getModel(),r=kC(s,(t=(e=this.cache.value)===null||e===void 0?void 0:e.completions[0])===null||t===void 0?void 0:t.toLiveInlineCompletion()),a=this.suggestionInlineCompletionSource.state,l=kC(s,(i=a==null?void 0:a.selectedItem)===null||i===void 0?void 0:i.normalizedInlineCompletion),c=r&&l&&r.insertText.startsWith(l.insertText)&&r.range.equalsRange(l.range);if(!n&&!c)return;const d=c?r:l||r,h=c?d.insertText.length-l.insertText.length:0;return this.toGhostText(d,h)}toGhostText(e,t){const i=this.editor.getOptions().get(108).previewMode;return e?y9(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new C9(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};Ex=Nle([Tle(2,de)],Ex);function Ale(o){return o.reduce((e,t)=>e+t,0)}var Mle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rle=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ole=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Ple extends H{constructor(){super(...arguments),this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new _n)}get targetModel(){var e;return(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object}setTargetModel(e){var t;((t=this.currentModelRef.value)===null||t===void 0?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?iae(e,e.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=(t=(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object)===null||t===void 0?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;(t=this.targetModel)===null||t===void 0||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let Nx=class extends Ple{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new Fle),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(Ex,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(yx,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=(t=this.activeInlineCompletionsModel)===null||t===void 0?void 0:t.ghostText;return i?i.parts.some(n=>e.containsPosition(new B(i.lineNumber,n.column))):!1}triggerInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.trigger(Ps.Explicit)}commitInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.hide()}showNextInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showNext()}showPreviousInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showPrevious()}hasMultipleInlineCompletions(){var e;return Ole(this,void 0,void 0,function*(){const t=yield(e=this.activeInlineCompletionsModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};Nx=Mle([Rle(1,Ae)],Nx);class Fle extends H{constructor(){super(...arguments),this.onDidChangeEmitter=new R,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new _n)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new gae(t,e,()=>this.onDidChangeEmitter.fire(),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var Ble=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ry;const hO=(Ry=window.trustedTypes)===null||Ry===void 0?void 0:Ry.createPolicy("editorGhostText",{createHTML:o=>o});let Tx=class extends H{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(Vle,this.editor)),this.additionalLinesWidget=this._register(new Hle(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new Wle(this.editor)),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(29)||s.hasChanged(107)||s.hasChanged(90)||s.hasChanged(85)||s.hasChanged(47)||s.hasChanged(46)||s.hasChanged(61))&&this.update()})),this._register(Be(()=>{var s;this.disposed=!0,this.update(),(s=this.viewMoreContentWidget)===null||s===void 0||s.dispose(),this.viewMoreContentWidget=void 0})),this._register(t.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear(),this.replacementDecoration.clear();return}const i=new Array,n=new Array;function s(c,d){if(n.length>0){const h=n[n.length-1];d&&h.decorations.push(new es(h.content.length+1,h.content.length+1+c[0].length,d,0)),h.content+=c[0],c=c.slice(1)}for(const h of c)n.push({content:h,decorations:d?[new es(1,h.length+1,d,0)]:[]})}t instanceof w9?this.replacementDecoration.setDecorations([{range:new L(t.lineNumber,t.columnStart,t.lineNumber,t.columnStart+t.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const r=this.editor.getModel().getLineContent(t.lineNumber);let a,l=0;for(const c of t.parts){let d=c.lines;a===void 0?(i.push({column:c.column,text:d[0],preview:c.preview}),d=d.slice(1)):s([r.substring(l,c.column-1)],void 0),d.length>0&&(s(d,"ghost-text"),a===void 0&&c.column<=r.length&&(a=c.column)),l=c.column-1}a!==void 0&&s([r.substring(l)],void 0),this.partsWidget.setParts(t.lineNumber,i,a!==void 0?{column:a,length:r.length+1-a}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),(e=this.viewMoreContentWidget)===null||e===void 0||e.dispose(),this.viewMoreContentWidget=void 0}renderViewMoreLines(e,t,i){const n=this.editor.getOption(46),s=document.createElement("div");s.className="suggest-preview-additional-widget",an(s,n);const r=document.createElement("span");r.className="content-spacer",r.append(t),s.append(r);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("\u23CE "),s.append(a);const l=new Q,c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines\u2026`),l.add(ki(c,"mousedown",d=>{var h;(h=this.model)===null||h===void 0||h.setExpanded(!0),d.preventDefault(),this.editor.focus()})),s.append(c),new Ule(this.editor,e,s,l)}};Tx=Ble([dO(2,Ae),dO(3,Ht)],Tx);class Wle{constructor(e){this.editor=e,this.decorationIds=[]}setDecorations(e){this.editor.changeDecorations(t=>{this.decorationIds=t.deltaDecorations(this.decorationIds,e)})}clear(){this.setDecorations([])}dispose(){this.clear()}}class Vle{constructor(e){this.editor=e,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations(e=>{this.decorationIds=e.deltaDecorations(this.decorationIds,[])})}setParts(e,t,i){if(!this.editor.getModel())return;const s=new Array;i&&s.push({range:L.fromPositions(new B(e,i.column),new B(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations(r=>{this.decorationIds=r.deltaDecorations(this.decorationIds,t.map(a=>({range:L.fromPositions(new B(e,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Wo.Left},showIfCollapsed:!0}})).concat(s))})}}class Hle{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones(r=>{this._viewZoneId&&(r.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(t.length,i);if(a>0){const l=document.createElement("div");zle(l,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=r.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}}function zle(o,e,t,i,n){const s=i.get(29),r=i.get(107),a="none",l=i.get(85),c=i.get(47),d=i.get(46),h=i.get(61),u=nc(1e4);u.appendASCIIString('
');for(let _=0,b=t.length;_');const w=VC(C),S=eg(C),k=Di.createEmpty(C,n);a_(new Lc(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,C,!1,w,S,0,k,v.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,a,l,c!==_s.OFF,null),u),u.appendASCIIString("
")}u.appendASCIIString(""),an(o,d);const g=u.build(),f=hO?hO.createHTML(g):g;o.innerHTML=f}class Ule extends H{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register(Be(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Et((o,e)=>{const t=o.getColor(W$);t&&(e.addRule(`.monaco-editor .ghost-text-decoration { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${t.toString()} !important; }`));const i=o.getColor(V$);i&&(e.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${i.toString()}; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${i.toString()}; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${i.toString()}; }`));const n=o.getColor(B$);n&&(e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${n}; }`))});var A9=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ax=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},bw=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Mi=class M9 extends H{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new _n),this.activeModelDidChangeEmitter=this._register(new R),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(i=>{i.hasChanged(108)&&this.updateModelController(),i.hasChanged(57)&&this.updateModelController()})),this.updateModelController()}static get(e){return e.getContribution(M9.ID)}get activeModel(){var e;return(e=this.activeController.value)===null||e===void 0?void 0:e.model}updateModelController(){const e=this.editor.getOption(108),t=this.editor.getOption(57);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(Mx,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(e){var t;return((t=this.activeModel)===null||t===void 0?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return((i=(t=this.activeController.value)===null||t===void 0?void 0:t.widget)===null||i===void 0?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(e=this.activeModel)===null||e===void 0||e.triggerInlineCompletion()}commit(){var e;(e=this.activeModel)===null||e===void 0||e.commitInlineCompletion()}hide(){var e;(e=this.activeModel)===null||e===void 0||e.hideInlineCompletion()}showNextInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return bw(this,void 0,void 0,function*(){const t=yield(e=this.activeModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};Mi.inlineSuggestionVisible=new le("inlineSuggestionVisible",!1,p("inlineSuggestionVisible","Whether an inline suggestion is visible"));Mi.inlineSuggestionHasIndentation=new le("inlineSuggestionHasIndentation",!1,p("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));Mi.inlineSuggestionHasIndentationLessThanTabSize=new le("inlineSuggestionHasIndentationLessThanTabSize",!0,p("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));Mi.ID="editor.contrib.ghostTextController";Mi=A9([Ax(1,Ae)],Mi);class $le{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=Mi.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=Mi.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=Mi.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let Mx=class extends H{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new $le(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(Nx,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Tx,this.editor,this.model)),this._register(Be(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(((e=this.model.activeInlineCompletionsModel)===null||e===void 0?void 0:e.ghostText)!==void 0);let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:s,lines:r}=n.parts[0],a=r[0],l=this.editor.getModel().getLineIndentColumn(n.lineNumber);if(s<=l){let d=kn(a);d===-1&&(d=a.length-1),t=d>0;const h=this.editor.getModel().getOptions().tabSize;i=Ci.visibleColumnFromColumn(a,d+1,h)=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class qle{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}get commands(){var e,t,i;return((i=(t=(e=this.controller.activeModel)===null||e===void 0?void 0:e.activeInlineCompletionsModel)===null||t===void 0?void 0:t.completionSession.value)===null||i===void 0?void 0:i.commands)||[]}}let Rx=class{constructor(e,t,i,n,s,r,a){this._editor=e,this._commandService=t,this._menuService=i,this._contextKeyService=n,this._languageService=s,this._openerService=r,this.accessibilityService=a,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=Mi.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new T0(1e3,this,L.fromPositions(n.positionBefore||n.position,n.positionBefore||n.position))}return i.type===7&&t.shouldShowHoverAt(i.range)?new T0(1e3,this,i.range):i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new T0(1e3,this,i.range):null}computeSync(e,t){const i=Mi.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new qle(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new Q,n=t[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,n,i);const s=i.add(this._menuService.createMenu(M.InlineCompletionsActions,this._contextKeyService)),r=e.statusBar.addAction({label:p("showNextInlineSuggestion","Next"),commandId:Ag.ID,run:()=>this._commandService.executeCommand(Ag.ID)}),a=e.statusBar.addAction({label:p("showPreviousInlineSuggestion","Previous"),commandId:Mg.ID,run:()=>this._commandService.executeCommand(Mg.ID)});e.statusBar.addAction({label:p("acceptInlineSuggestion","Accept"),commandId:DC,run:()=>this._commandService.executeCommand(DC)});const l=[r,a];for(const c of l)c.setEnabled(!1);n.hasMultipleSuggestions().then(c=>{for(const d of l)d.setEnabled(c)});for(const c of n.commands)e.statusBar.addAction({label:c.title,commandId:c.id,run:()=>this._commandService.executeCommand(c.id,...c.arguments||[])});for(const[c,d]of s.getActions())for(const h of d)h instanceof ac&&e.statusBar.addAction({label:h.label,commandId:h.item.id,run:()=>this._commandService.executeCommand(h.item.id)});return i}renderScreenReaderText(e,t,i){var n,s;const r=J,a=r("div.hover-row.markdown-hover"),l=q(a,r("div.hover-contents")),c=i.add(new ol({editor:this._editor},this._languageService,this._openerService)),d=u=>{i.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",e.onContentsChanged()}));const g=p("inlineSuggestionFollows","Suggestion:"),f=i.add(c.render(new Fn().appendText(g).appendCodeblock("text",u)));l.replaceChildren(f.element)},h=(s=(n=t.controller.activeModel)===null||n===void 0?void 0:n.inlineCompletionsModel)===null||s===void 0?void 0:s.ghostText;if(h){const u=this._editor.getModel().getLineContent(h.lineNumber);d(h.renderForScreenReader(u))}e.fragment.appendChild(a)}};Rx=Kle([Zh(1,ci),Zh(2,ph),Zh(3,Ee),Zh(4,Ht),Zh(5,io),Zh(6,al)],Rx);tt(Mi.ID,Mi);ie(jle);ie(Ag);ie(Mg);xh.register(Rx);const R9=xi.bindToContribution(Mi.get),Ox=new R9({id:DC,precondition:Mi.inlineSuggestionVisible,handler(o){o.commit(),o.editor.focus()}});ee(Ox);as.registerKeybindingRule({primary:2,weight:200,id:Ox.id,when:se.and(Ox.precondition,N.tabMovesFocus.toNegated(),Mi.inlineSuggestionHasIndentationLessThanTabSize)});ee(new R9({id:"editor.action.inlineSuggest.hide",precondition:Mi.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(o){o.hide()}}));function Gn(o,e){let t=0;for(let i=0;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zle=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};function O9(o,e,t,i,n){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(o.getLanguageId()).indentationRules;if(!s)return[];for(i=Math.min(i,o.getLineCount());t<=i&&s.unIndentedLinePattern;){const b=o.getLineContent(t);if(!s.unIndentedLinePattern.test(b))break;t++}if(t>i-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=o.getOptions(),c=(b,v)=>(v=v||1,Bs.shiftIndent(b,b.length+v,r,a,l)),d=(b,v)=>(v=v||1,Bs.unshiftIndent(b,b.length+v,r,a,l)),h=[];let u;const g=o.getLineContent(t);let f=g;if(n!=null){u=n;const b=_t(g);f=u+g.substring(b.length),s.decreaseIndentPattern&&s.decreaseIndentPattern.test(f)&&(u=d(u),f=u+g.substring(b.length)),g!==f&&h.push(Ft.replaceMove(new oe(t,1,t,b.length+1),Sv(u,a,l)))}else u=_t(g);let _=u;s.increaseIndentPattern&&s.increaseIndentPattern.test(f)?(_=c(_),u=c(u)):s.indentNextLinePattern&&s.indentNextLinePattern.test(f)&&(_=c(_)),t++;for(let b=t;b<=i;b++){const v=o.getLineContent(b),C=_t(v),w=_+v.substring(C.length);s.decreaseIndentPattern&&s.decreaseIndentPattern.test(w)&&(_=d(_),u=d(u)),C!==_&&h.push(Ft.replaceMove(new oe(b,1,b,C.length+1),Sv(_,a,l))),!(s.unIndentedLinePattern&&s.unIndentedLinePattern.test(v))&&(s.increaseIndentPattern&&s.increaseIndentPattern.test(w)?(u=c(u),_=u):s.indentNextLinePattern&&s.indentNextLinePattern.test(w)?_=c(_):_=u)}return h}class vw extends ce{constructor(){super({id:vw.ID,label:p("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:N.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new Jle(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}vw.ID="editor.action.indentationToSpaces";class Cw extends ce{constructor(){super({id:Cw.ID,label:p("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:N.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new ece(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}Cw.ID="editor.action.indentationToTabs";class P9 extends ce{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(dl),n=e.get(Ut),s=t.getModel();if(!s)return;const r=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),a=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===r.tabSize?p("configuredTabSize","Configured Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:p({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then(c=>{c&&s&&!s.isDisposed()&&s.updateOptions({tabSize:parseInt(c.label,10),insertSpaces:this.insertSpaces})})},50)}}class ww extends P9{constructor(){super(!1,{id:ww.ID,label:p("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}ww.ID="editor.action.indentUsingTabs";class Sw extends P9{constructor(){super(!0,{id:Sw.ID,label:p("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}Sw.ID="editor.action.indentUsingSpaces";class yw extends ce{constructor(){super({id:yw.ID,label:p("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(Ut),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}yw.ID="editor.action.detectIndentation";class Yle extends ce{constructor(){super({id:"editor.action.reindentlines",label:p("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:N.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=O9(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class Qle extends ce{constructor(){super({id:"editor.action.reindentselectedlines",label:p("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:N.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=t.getSelections();if(s===null)return;const r=[];for(const a of s){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;const d=O9(n,i,l,c);r.push(...d)}r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class Xle{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(L.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let Km=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new Q,this.callOnModel=new Q,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(50))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:s,indentSize:r,insertSpaces:a}=i.getOptions(),l=[],c={shiftIndent:g=>Bs.shiftIndent(g,g.length+1,s,r,a),unshiftIndent:g=>Bs.unshiftIndent(g,g.length+1,s,r,a)};let d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(i,d)){d++;continue}break}if(d>e.endLineNumber)return;let h=i.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){const g=hp(n,i,i.getLanguageId(),d,c,this._languageConfigurationService);if(g!==null){const f=_t(h),_=Gn(g,s),b=Gn(f,s);if(_!==b){const v=Tp(_,s,a);l.push({range:new L(d,1,d,f.length+1),text:v}),h=v+h.substr(f.length)}else{const v=Z4(i,d,this._languageConfigurationService);if(v===0||v===8)return}}}const u=d;for(;di.tokenization.getLineTokens(_),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(_,b)=>i.getLanguageIdAtPosition(_,b)},getLineContent:_=>_===u?h:i.getLineContent(_)},i.getLanguageId(),d+1,c,this._languageConfigurationService);if(f!==null){const _=Gn(f,s),b=Gn(_t(i.getLineContent(d+1)),s);if(_!==b){const v=_-b;for(let C=d+1;C<=e.endLineNumber;C++){const w=i.getLineContent(C),S=_t(w),x=Gn(S,s)+v,y=Tp(x,s,a);y!==S&&l.push({range:new L(C,1,C,S.length+1),text:y})}}}}if(l.length>0){this.editor.pushUndoStop();const g=new Xle(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",g),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const s=n.findTokenIndexAtOffset(i);if(s>=0&&n.getStandardTokenType(s)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Km.ID="editor.contrib.autoIndentOnPaste";Km=Gle([Zle(1,si)],Km);function F9(o,e,t,i){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return;let n="";for(let r=0;rthis._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,i;return xC(this,void 0,void 0,function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=n==null?void 0:n.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(i=n==null?void 0:n.label)!==null&&i!==void 0?i:this.hint.label,this._isResolved=!0}catch(n){Pi(n),this._isResolved=!1}})}}class qm{constructor(e,t,i){this._disposables=new Q,this.ranges=e,this.provider=new Set;const n=[];for(const[s,r]of t){this._disposables.add(s),this.provider.add(r);for(const a of s.hints){const l=i.validatePosition(a.position);let c="before";const d=qm._getRangeAtPosition(i,l);let h;d.getStartPosition().isBefore(l)?(h=L.fromPositions(d.getStartPosition(),l),c="after"):(h=L.fromPositions(l,d.getEndPosition()),c="before"),n.push(new uT(a,new B9(h,c),r))}}this.items=n.sort((s,r)=>B.compare(s.hint.position,r.hint.position))}static create(e,t,i,n){return xC(this,void 0,void 0,function*(){const s=[],r=e.ordered(t).reverse().map(a=>i.map(l=>xC(this,void 0,void 0,function*(){try{const c=yield a.provideInlayHints(t,l,n);c!=null&&c.hints.length&&s.push([c,a])}catch(c){Pi(c)}})));if(yield Promise.all(r.flat()),n.isCancellationRequested||t.isDisposed())throw new yc;return new qm(i,s,t)})}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new L(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),r=t.column-1,a=s.findTokenIndexAtOffset(r);let l=s.getStartOffset(a),c=s.getEndOffset(a);return c-l===1&&(l===r&&a>1?(l=s.getStartOffset(a-1),c=s.getEndOffset(a-1)):c===r&&auu(f)?f.command.id:""));for(const f of md.getEditorActions())f instanceof vo&&u.has(f.id)&&h.push(new is(f.id,f.label,void 0,!0,()=>Ap(this,void 0,void 0,function*(){const _=yield s.createModelReference(d.uri);try{yield l.invokeFunction(f.run.bind(f),e,new Pm(_.object.textEditorModel,L.getStartPosition(d.range)))}finally{_.dispose()}})));if(i.part.command){const{command:f}=i.part;h.push(new ln),h.push(new is(f.id,f.title,void 0,!0,()=>Ap(this,void 0,void 0,function*(){var _;try{yield a.executeCommand(f.id,...(_=f.arguments)!==null&&_!==void 0?_:[])}catch(b){c.notify({severity:IF.Error,source:i.item.provider.displayName,message:b})}})))}const g=e.getOption(117);r.showContextMenu({domForShadowRoot:g&&(n=e.getDomNode())!==null&&n!==void 0?n:void 0,getAnchor:()=>{const f=on(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>h,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function nce(o,e,t,i){return Ap(this,void 0,void 0,function*(){const s=yield o.get(Kn).createModelReference(i.uri);yield t.invokeWithinContext(r=>Ap(this,void 0,void 0,function*(){const a=e.hasSideBySideModifier,l=r.get(Ee),c=jn.inPeekEditor.getValue(l),d=!a&&t.getOption(80)&&!c;return new R_({openToSide:a,openInPeek:d,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(r,t,{model:s.object.textEditorModel,position:L.getStartPosition(i.range)})})),s.dispose()})}var sce=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},su=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class IC{constructor(){this._entries=new Dc(50)}get(e){const t=IC._key(e);return this._entries.get(t)}set(e,t){const i=IC._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const W9=Ye("IInlayHintsCache");et(W9,IC,!0);class Px{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class oce{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let nh=class Fx{constructor(e,t,i,n,s,r,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=r,this._instaService=a,this._disposables=new Q,this._sessionDisposables=new Q,this._decorationsMetadata=new Map,this._ruleFactory=new d_(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(129)&&this._update()})),this._update()}static get(e){var t;return(t=e.getContribution(Fx.ID))!==null&&t!==void 0?t:void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(129);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(Be(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n;const s=new Set,r=new mt(()=>su(this,void 0,void 0,function*(){const a=Date.now();n==null||n.dispose(!0),n=new Qi;const l=t.onWillDispose(()=>n==null?void 0:n.cancel());try{const c=n.token,d=yield qm.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(r.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){d.dispose();return}for(const h of d.provider)typeof h.onDidChangeInlayHints=="function"&&!s.has(h)&&(s.add(h),this._sessionDisposables.add(h.onDidChangeInlayHints(()=>{r.isScheduled()||r.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){Te(c)}finally{n.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add(Be(()=>n==null?void 0:n.dispose(!0))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!r.isScheduled())&&r.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{const l=Math.max(r.delay,1250);r.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(Ol.getInstance().event(c=>{if(!this._editor.hasModel())return;const d=c.altKey&&c.ctrlKey?l:a;if(d!==this._activeRenderMode){this._activeRenderMode=d;const h=this._editor.getModel(),u=this._copyInlayHintsWithCurrentAnchor(h);this._updateHintsDecorators([h.getFullModelRange()],u),r.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>r.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new Q,t=e.add(new UN(this._editor)),i=new Q;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{const[s]=n,r=this._getInlayHintLabelPart(s),a=this._editor.getModel();if(!r||!a){i.clear();return}const l=new Qi;i.add(Be(()=>l.dispose(!0))),r.item.resolve(l.token),this._activeInlayHintPart=r.part.command||r.part.location?new oce(r,s.hasTriggerModifier):void 0;const c=r.item.hint.position.lineNumber,d=new L(c,1,c,a.getLineMaxColumn(c)),h=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],h),i.add(Be(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],h)}))})),e.add(t.onCancel(()=>i.clear())),e.add(t.onExecute(n=>su(this,void 0,void 0,function*(){const s=this._getInlayHintLabelPart(n);if(s){const r=s.part;r.location?this._instaService.invokeFunction(nce,n,this._editor,r.location):Jy.is(r.command)&&(yield this._invokeCommand(r.command,s.item))}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>su(this,void 0,void 0,function*(){if(t.event.detail!==2)return;const i=this._getInlayHintLabelPart(t);if(!!i&&(t.event.preventDefault(),yield i.item.resolve(ze.None),rn(i.item.hint.textEdits))){const n=i.item.hint.textEdits.map(s=>Ft.replace(L.lift(s.range),s.text));this._editor.executeEdits("inlayHint.default",n),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>su(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(ice,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(i instanceof zd&&(i==null?void 0:i.attachedData)instanceof Px)return i.attachedData}_invokeCommand(e,t){var i;return su(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(i=e.arguments)!==null&&i!==void 0?i:[])}catch(n){this._notificationService.notify({severity:IF.Error,source:t.provider.displayName,message:n})}})}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const r=new B9(s,n.item.anchor.direction),a=n.item.with({anchor:r});t.set(n.item,a)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(L.compareRangesUsingStarts)){const r=t.validateRange(new L(s.startLineNumber-30,s.startColumn,s.endLineNumber+30,s.endColumn));n.length===0||!L.areIntersectingOrTouching(n[n.length-1],r)?n.push(r):n[n.length-1]=L.plusRange(n[n.length-1],r)}return n}_updateHintsDecorators(e,t){var i,n;const s=[],r=(f,_,b,v,C)=>{const w={content:b,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:_.className,cursorStops:v,attachedData:C};s.push({item:f,classNameRef:_,decoration:{range:f.anchor.range,options:{description:"InlayHint",showIfCollapsed:f.anchor.range.isEmpty(),collapseOnReplaceEdit:!f.anchor.range.isEmpty(),stickiness:0,[f.anchor.direction]:this._activeRenderMode===0?w:void 0}}})},a=(f,_)=>{const b=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});r(f,b,"\u200A",_?Wo.Right:Wo.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:h}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,c);for(const f of t){f.hint.paddingLeft&&a(f,!1);const _=typeof f.hint.label=="string"?[{label:f.hint.label}]:f.hint.label;for(let b=0;b<_.length;b++){const v=_[b],C=b===0,w=b===_.length-1,S={fontSize:`${l}px`,fontFamily:`var(${u}), ${ts.fontFamily}`,verticalAlign:h?"baseline":"middle"};rn(f.hint.textEdits)&&(S.cursor="default"),this._fillInColors(S,f.hint),(v.command||v.location)&&((i=this._activeInlayHintPart)===null||i===void 0?void 0:i.part.item)===f&&this._activeInlayHintPart.part.index===b&&(S.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(S.color=Qt(lE),S.cursor="pointer")),d&&(C&&w?(S.padding=`1px ${Math.max(1,l/4)|0}px`,S.borderRadius=`${l/4|0}px`):C?(S.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,S.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):w?(S.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,S.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):S.padding="1px 0 1px 0"),r(f,this._ruleFactory.createClassNameRef(S),rce(v.label),w&&!f.hint.paddingRight?Wo.Right:Wo.None,new Px(f,b))}if(f.hint.paddingRight&&a(f,!0),s.length>Fx._MAX_DECORATORS)break}const g=[];for(const f of e)for(const{id:_}of(n=this._editor.getDecorationsInRange(f))!==null&&n!==void 0?n:[]){const b=this._decorationsMetadata.get(_);b&&(g.push(_),b.classNameRef.dispose(),this._decorationsMetadata.delete(_))}this._editor.changeDecorations(f=>{const _=f.deltaDecorations(g,s.map(b=>b.decoration));for(let b=0;b<_.length;b++){const v=s[b];this._decorationsMetadata.set(_[b],v)}})}_fillInColors(e,t){t.kind===X0.Parameter?(e.backgroundColor=Qt(iU),e.color=Qt(tU)):t.kind===X0.Type?(e.backgroundColor=Qt(eU),e.color=Qt(Jz)):(e.backgroundColor=Qt(za),e.color=Qt(Ha))}_getLayoutInfo(){const e=this._editor.getOption(129),t=e.padding,i=this._editor.getOption(48),n=this._editor.getOption(45);let s=e.fontSize;(!s||s<5||s>i)&&(s=i);const r=e.fontFamily||n;return{fontSize:s,fontFamily:r,padding:t,isUniform:!t&&r===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};nh.ID="editor.contrib.InlayHints";nh._MAX_DECORATORS=1500;nh=sce([Yh(1,de),Yh(2,no),Yh(3,W9),Yh(4,ci),Yh(5,di),Yh(6,Ae)],nh);function rce(o){const e="\xA0";return o.replace(/[ \t]/g,e)}Xe.registerCommand("_executeInlayHintProvider",(o,...e)=>su(void 0,void 0,void 0,function*(){const[t,i]=e;pt(_e.isUri(t)),pt(L.isIRange(i));const{inlayHintsProvider:n}=o.get(de),s=yield o.get(Kn).createModelReference(t);try{const r=yield qm.create(n,s.object.textEditorModel,[L.lift(i)],ze.None),a=r.items.map(l=>l.hint);return setTimeout(()=>r.dispose(),0),a}finally{s.dispose()}}));var ace=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ff=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},uO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},lce=globalThis&&globalThis.__asyncValues||function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],t;return e?e.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=o[s]&&function(r){return new Promise(function(a,l){r=o[s](r),n(a,l,r.done,r.value)})}}function n(s,r,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},r)}};class gO extends T0{constructor(e,t){super(10,t,e.item.anchor.range),this.part=e}}let Bx=class extends bC{constructor(e,t,i,n,s,r){super(e,t,i,n,r),this._resolverService=s,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!nh.get(this._editor)||e.target.type!==6)return null;const n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return n instanceof zd&&n.attachedData instanceof Px?new gO(n.attachedData,this):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof gO?new ri(n=>uO(this,void 0,void 0,function*(){var s,r;const{part:a}=e;if(yield a.item.resolve(i),i.isCancellationRequested)return;let l;typeof a.item.hint.tooltip=="string"?l=new Fn().appendText(a.item.hint.tooltip):a.item.hint.tooltip&&(l=a.item.hint.tooltip),l&&n.emitOne(new Tr(this,e.range,[l],0)),rn(a.item.hint.textEdits)&&n.emitOne(new Tr(this,e.range,[new Fn().appendText(p("hint.dbl","Double click to insert"))],10001));let c;if(typeof a.part.tooltip=="string"?c=new Fn().appendText(a.part.tooltip):a.part.tooltip&&(c=a.part.tooltip),c&&n.emitOne(new Tr(this,e.range,[c],1)),a.part.location||a.part.command){let g;const _=this._editor.getOption(72)==="altKey"?Ge?p("links.navigate.kb.meta.mac","cmd + click"):p("links.navigate.kb.meta","ctrl + click"):Ge?p("links.navigate.kb.alt.mac","option + click"):p("links.navigate.kb.alt","alt + click");a.part.location&&a.part.command?g=new Fn().appendText(p("hint.defAndCommand","Go to Definition ({0}), right click for more",_)):a.part.location?g=new Fn().appendText(p("hint.def","Go to Definition ({0})",_)):a.part.command&&(g=new Fn(`[${p("hint.cmd","Execute Command")}](${tce(a.part.command)} "${a.part.command.title}") (${_})`,{isTrusted:!0})),g&&n.emitOne(new Tr(this,e.range,[g],1e4))}const d=yield this._resolveInlayHintLabelPartHover(a,i);try{for(var h=lce(d),u;u=yield h.next(),!u.done;){const g=u.value;n.emitOne(g)}}catch(g){s={error:g}}finally{try{u&&!u.done&&(r=h.return)&&(yield r.call(h))}finally{if(s)throw s.error}}})):ri.EMPTY}_resolveInlayHintLabelPartHover(e,t){return uO(this,void 0,void 0,function*(){if(!e.part.location)return ri.EMPTY;const{uri:i,range:n}=e.part.location,s=yield this._resolverService.createModelReference(i);try{const r=s.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(r)?eT(this._languageFeaturesService.hoverProvider,r,new B(n.startLineNumber,n.startColumn),t).filter(a=>!_g(a.hover.contents)).map(a=>new Tr(this,e.item.anchor.range,a.hover.contents,2+a.ordinal)):ri.EMPTY}finally{s.dispose()}})}};Bx=ace([Ff(1,Ht),Ff(2,io),Ff(3,ot),Ff(4,Kn),Ff(5,de)],Bx);tt(nh.ID,nh);xh.register(Bx);class cce{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new oe(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new oe(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var dce=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hce=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Cc=class Wx{constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}static get(e){return e.getContribution(Wx.ID)}dispose(){}run(e,t){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;const r=new Tm(this.editor,5),a=n.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=Ri(l=>this.editorWorkerService.navigateValueSet(a,s,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!r.validate(this.editor))return;const c=L.lift(l.range);let d=l.range;const h=l.value.length-(s.endColumn-s.startColumn);d={startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.startColumn+l.value.length},h>1&&(s=new oe(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+h-1));const u=new cce(c,s,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:d,options:Wx.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=sc(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Te)}).catch(Te)):Promise.resolve(void 0)}};Cc.ID="editor.contrib.inPlaceReplaceController";Cc.DECORATION=Ne.register({description:"in-place-replace",className:"valueSetReplacement"});Cc=dce([hce(1,to)],Cc);class uce extends ce{constructor(){super({id:"editor.action.inPlaceReplace.up",label:p("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=Cc.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class gce extends ce{constructor(){super({id:"editor.action.inPlaceReplace.down",label:p("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:N.writable,kbOpts:{kbExpr:N.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=Cc.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}tt(Cc.ID,Cc);ie(uce);ie(gce);Et((o,e)=>{const t=o.getColor(z4);t&&e.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${t}; }`)});class fce extends ce{constructor(){super({id:"expandLineSelection",label:p("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:N.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,Wi.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}ie(fce);class pce{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=mce(e,this._cursors);for(let n=0,s=i.length;nr.lineNumber===a.lineNumber?r.column-a.column:r.lineNumber-a.lineNumber);for(let r=e.length-2;r>=0;r--)e[r].lineNumber===e[r+1].lineNumber&&e.splice(r,1);const t=[];let i=0,n=0;const s=e.length;for(let r=1,a=o.getLineCount();r<=a;r++){const l=o.getLineContent(r),c=l.length+1;let d=0;if(n{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new oe(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){!e||(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(!!this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!X9(this._editor.getModel(),t,n)){const r=this._editor.getModel(),a=[];for(let l=0,c=t.length;l0&&i.isRegex){const n=this._editor.getModel();i.searchScope?t=n.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(119):null,!1,1073741824):t=n.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(119):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const n=this._editor.getSelection();for(let s=0,r=t.length;snew oe(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)))}}}sh.ID="editor.contrib.multiCursorController";class rf extends ce{run(e,t){const i=sh.get(t);if(!i)return;const n=rs.get(t);if(!n)return;const s=t._getViewModel();if(s){const r=s.getCursorStates();this._run(i,n),Nc(r,s.getCursorStates())}}}class tde extends rf{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:2082,weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"3_multi",title:p({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class ide extends rf{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:M.MenubarSelectionMenu,group:"3_multi",title:p({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class nde extends rf{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:yi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class sde extends rf{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class ode extends rf{constructor(){super({id:"editor.action.selectHighlights",label:p("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:3114,weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"3_multi",title:p({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class rde extends rf{constructor(){super({id:"editor.action.changeAll",label:p("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:se.and(N.writable,N.editorTextFocus),kbOpts:{kbExpr:N.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class ade{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(L.compareRangesUsingStarts)),this._cachedFindMatches}}let oh=class B0 extends H{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(99),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new mt(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(n=>{this._isEnabled=e.getOption(99)})),this._register(e.onDidChangeCursorSelection(n=>{!this._isEnabled||(n.selection.isEmpty()?n.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(n=>{this._setState(null)})),this._register(e.onDidChangeModelContent(n=>{this._isEnabled&&this.updateSoon.schedule()}));const i=rs.get(e);i&&this._register(i.getState().onFindReplaceStateChange(n=>{this._update()}))}_update(){this._setState(B0._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t||!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=sh.get(i);if(!s)return null;const r=rs.get(i);if(!r)return null;let a=s.getSession(r);if(!a){const d=i.getSelections();if(d.length>1){const u=r.getState().matchCase;if(!X9(i.getModel(),d,u))return null}a=Zm.create(i,r)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;const l=r.getState(),c=l.matchCase;if(l.isRevealed){let d=l.searchString;c||(d=d.toLowerCase());let h=a.searchText;if(c||(h=h.toLowerCase()),d===h&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new ade(i.getModel(),a.searchText,a.matchCase,a.wholeWord?i.getOption(119):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(L.compareRangesUsingStarts);const s=[];for(let l=0,c=0,d=i.length,h=n.length;l=h)s.push(u),l++;else{const g=L.compareRangesUsingStarts(u,n[c]);g<0?((n[c].isEmpty()||!L.areIntersecting(u,n[c]))&&s.push(u),l++):(g>0||l++,c++)}}const r=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(74),a=s.map(l=>({range:l,options:r?B0._SELECTION_HIGHLIGHT:B0._SELECTION_HIGHLIGHT_OVERVIEW}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};oh.ID="editor.contrib.selectionHighlighter";oh._SELECTION_HIGHLIGHT_OVERVIEW=Ne.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:Qt(m1),position:js.Inline},overviewRuler:{color:Qt(T4),position:Zs.Center}});oh._SELECTION_HIGHLIGHT=Ne.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});oh=Gce([Zce(1,de)],oh);function X9(o,e,t){const i=pO(o,e[0],!t);for(let n=1,s=e.length;nJ9(void 0,void 0,void 0,function*(){const[t,i,n]=e;pt(_e.isUri(t)),pt(B.isIPosition(i)),pt(typeof n=="string"||!n);const s=o.get(de),r=yield o.get(Kn).createModelReference(t);try{const a=yield e8(s.signatureHelpProvider,r.object.textEditorModel,B.lift(i),{triggerKind:Wr.Invoke,isRetrigger:!1,triggerCharacter:n},ze.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{r.dispose()}}));var dde=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},xl;(function(o){o.Default={type:0};class e{constructor(n,s){this.request=n,this.previouslyActiveHints=s,this.type=2}}o.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}o.Active=t})(xl||(xl={}));class Dw extends H{constructor(e,t,i=Dw.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new R),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=xl.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new _n),this.triggerChars=new cu,this.retriggerChars=new cu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Kr(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(n=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(n=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(n=>this.onCursorChange(n))),this._register(this.editor.onDidChangeModelContent(n=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(n=>this.onDidType(n))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=xl.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(Te)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(78).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,n=this.editor.getOption(78).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new xl.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return dde(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const n=this._pendingTriggers.reduce(hde);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),a=this.editor.getPosition();this.state=new xl.Pending(Ri(l=>e8(this.providers,r,a,s,l)),i);try{const l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new xl.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=xl.Default),Te(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new cu,this.retriggerChars=new cu;const e=this.editor.getModel();if(!!e)for(const t of this.providers.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(i.charCodeAt(0)),this.retriggerChars.add(i.charCodeAt(0));for(const i of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:Wr.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Wr.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Wr.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(78).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}Dw.DEFAULT_DELAY=120;function hde(o,e){switch(e.triggerKind){case Wr.Invoke:return e;case Wr.ContentChange:return o;case Wr.TriggerCharacter:default:return e}}var ude=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},c0=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const hs=J,gde=mi("parameter-hints-next",m.chevronDown,p("parameterHintsNextIcon","Icon for show next parameter hint.")),fde=mi("parameter-hints-previous",m.chevronUp,p("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let NC=class t8 extends H{constructor(e,t,i,n,s){super(),this.editor=e,this.renderDisposeables=this._register(new Q),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new ol({editor:e},n,i)),this.model=this._register(new Dw(e,s.signatureHelpProvider)),this.keyVisible=rh.Visible.bindTo(t),this.keyMultipleSignatures=rh.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints(r=>{r?(this.show(),this.render(r)):this.hide()}))}createParameterHintDOMNodes(){const e=hs(".editor-widget.parameter-hints-widget"),t=q(e,hs(".phwrapper"));t.tabIndex=-1;const i=q(t,hs(".controls")),n=q(i,hs(".button"+at.asCSSSelector(fde))),s=q(i,hs(".overloads")),r=q(i,hs(".button"+at.asCSSSelector(gde)));this._register(G(n,"click",u=>{ut.stop(u),this.previous()})),this._register(G(r,"click",u=>{ut.stop(u),this.next()}));const a=hs(".body"),l=new p_(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());const c=q(a,hs(".signature")),d=q(a,hs(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:s,docs:d,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(u=>{this.visible&&this.editor.layoutContentWidget(this)}));const h=()=>{if(!this.domNodes)return;const u=this.editor.getOption(46);this.domNodes.element.style.fontSize=`${u.fontSize}px`,this.domNodes.element.style.lineHeight=`${u.lineHeight/u.fontSize}`};h(),this._register(ge.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(u=>u.hasChanged(46)).on(h,null)),this._register(this.editor.onDidLayoutChange(u=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=q(this.domNodes.signature,hs(".code")),r=this.editor.getOption(46);s.style.fontSize=`${r.fontSize}px`,s.style.fontFamily=r.fontFamily;const a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(s,n,l);else{const h=q(s,hs("span"));h.textContent=n.label}const c=n.parameters[l];if(c!=null&&c.documentation){const h=hs("span.documentation");if(typeof c.documentation=="string")h.textContent=c.documentation;else{const u=this.renderMarkdownDocs(c.documentation);h.appendChild(u.element)}q(this.domNodes.docs,hs("p",{},h))}if(n.documentation!==void 0)if(typeof n.documentation=="string")q(this.domNodes.docs,hs("p",{},n.documentation));else{const h=this.renderMarkdownDocs(n.documentation);q(this.domNodes.docs,h.element)}const d=this.hasDocs(n,c);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,c){let h="";const u=n.parameters[l];Array.isArray(u.label)?h=n.label.substring(u.label[0],u.label[1]):h=u.label,u.documentation&&(h+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),n.documentation&&(h+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==h&&(Gi(p("hint","{0}, hint",h)),this.announcedLabel=h)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var i;(i=this.domNodes)===null||i===void 0||i.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Z_(t.documentation).length>0||t&&typeof t.documentation=="object"&&Z_(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Z_(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Z_(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,n);const a=document.createElement("span");a.textContent=t.label.substring(n,s),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(s),q(e,r,a,l)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const n=new RegExp(`(\\W|^)${ys(i.label)}(?=\\W|$)`,"g");n.test(e.label);const s=n.lastIndex-i.label.length;return s>=0?[s,n.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return t8.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};NC.ID="editor.widget.parameterHintsWidget";NC=ude([c0(1,Ee),c0(2,io),c0(3,Ht),c0(4,de)],NC);const pde=T("editorHoverWidget.highlightForeground",{dark:fo,light:fo,hcDark:fo,hcLight:fo},p("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));Et((o,e)=>{const t=o.getColor(aE);if(t){const c=cn(o.type)?2:1;e.addRule(`.monaco-editor .parameter-hints-widget { border: ${c}px solid ${t}; }`),e.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${t.transparent(.5)}; }`)}const i=o.getColor(Bd);i&&e.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${i}; }`);const n=o.getColor(h1);n&&e.addRule(`.monaco-editor .parameter-hints-widget a { color: ${n}; }`);const s=o.getColor(u1);s&&e.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${s}; }`);const r=o.getColor(rE);r&&e.addRule(`.monaco-editor .parameter-hints-widget { color: ${r}; }`);const a=o.getColor(k4);a&&e.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${a}; }`);const l=o.getColor(pde);l&&e.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${l}}`)});var mde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_de=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let ah=class i8 extends H{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance(NC,this.editor))}static get(e){return e.getContribution(i8.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};ah.ID="editor.controller.parameterHints";ah=mde([_de(1,Ae)],ah);class bde extends ce{constructor(){super({id:"editor.action.triggerParameterHints",label:p("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:N.hasSignatureHelpProvider,kbOpts:{kbExpr:N.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=ah.get(t);i&&i.trigger({triggerKind:Wr.Invoke})}}tt(ah.ID,ah);ie(bde);const gT=100+75,fT=xi.bindToContribution(ah.get);ee(new fT({id:"closeParameterHints",precondition:rh.Visible,handler:o=>o.cancel(),kbOpts:{weight:gT,kbExpr:N.focus,primary:9,secondary:[1033]}}));ee(new fT({id:"showPrevParameterHint",precondition:se.and(rh.Visible,rh.MultipleSignatures),handler:o=>o.previous(),kbOpts:{weight:gT,kbExpr:N.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));ee(new fT({id:"showNextParameterHint",precondition:se.and(rh.Visible,rh.MultipleSignatures),handler:o=>o.next(),kbOpts:{weight:gT,kbExpr:N.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var vde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Oy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const kw=new le("renameInputVisible",!1,p("renameInputVisible","Whether the rename input widget is visible"));let Ux=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new Q,this.allowEditorOverflow=!0,this._visibleContextKey=kw.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(46)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",p("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var t,i;const[n,s]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(n),this._label.innerText=p({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel(),(i=this._keybindingService.lookupKeybinding(s))===null||i===void 0?void 0:i.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const r=e.getColor(Ho);this._domNode.style.backgroundColor=String((t=e.getColor(li))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String((i=e.getColor(f1))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=e.getColor(g1))!==null&&n!==void 0?n:"");const a=e.getColor(p1);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=(s=a==null?void 0:a.toString())!==null&&s!==void 0?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(46);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,i,n,s,r){this._domNode.classList.toggle("preview",s),this._position=new B(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const a=new Q;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:s&&c})},a.add(r.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};Ux=vde([Oy(2,Ct),Oy(3,_i),Oy(4,Ee)],Ux);var Cde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Uc=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Id=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class pT{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Id(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` `):void 0}:{range:L.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` `):void 0}})}provideRenameEdits(e,t){return Id(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return Id(this,void 0,void 0,function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(` -`)};const r=yield s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r})}}function wde(o,e,t,i){return Id(this,void 0,void 0,function*(){const n=new pT(e,t,o),s=yield n.resolveRenameLocation(ze.None);return s!=null&&s.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,ze.None)})}let lh=class n8{constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new Q,this._cts=new Qi,this._renameInputField=this._disposableStore.add(new $l(()=>this._disposableStore.add(this._instaService.createInstance(Ux,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(n8.ID)}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Id(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new pT(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;this._cts=new qd(this.editor,5);let s;try{const u=n.resolveRenameLocation(this._cts.token);this._progressService.showWhile(u,250),s=yield u}catch(u){(e=os.get(this.editor))===null||e===void 0||e.showMessage(u||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}if(!s)return;if(s.rejectReason){(t=os.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,i);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new qd(this.editor,5,s.range);const r=this.editor.getSelection();let a=0,l=s.text.length;!L.isEmpty(r)&&!L.spansMultipleLines(r)&&L.containsRange(s.range,r)&&(a=Math.max(0,r.startColumn-s.range.startColumn),l=Math.min(s.range.endColumn,r.endColumn)-s.range.startColumn);const c=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=yield this._renameInputField.value.getInput(s.range,s.text,a,l,c,this._cts.token);if(typeof d=="boolean"){d&&this.editor.focus();return}this.editor.focus();const h=MI(n.provideRenameEdits(d.newName,this._cts.token),this._cts.token).then(u=>Id(this,void 0,void 0,function*(){if(!(!u||!this.editor.hasModel())){if(u.rejectReason){this._notificationService.info(u.rejectReason);return}this.editor.setSelection(L.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(Qg.convert(u),{editor:this.editor,showPreview:d.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,d.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,d.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&Gi(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,d.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),u=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(u)});return this._progressService.showWhile(h,250),h})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};lh.ID="editor.contrib.renameController";lh=Cde([Uc(1,Ae),Uc(2,di),Uc(3,v_),Uc(4,kc),Uc(5,So),Uc(6,WI),Uc(7,de)],lh);class Sde extends ce{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:se.and(N.writable,N.hasRenameProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(ct),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return _e.isUri(n)&&B.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{!r||(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},Te):super.runCommand(e,t)}run(e,t){const i=lh.get(t);return i?i.run():Promise.resolve()}}tt(lh.ID,lh);ie(Sde);const mT=xi.bindToContribution(lh.get);ee(new mT({id:"acceptRenameInput",precondition:kw,handler:o=>o.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:N.focus,primary:3}}));ee(new mT({id:"acceptRenameInputWithPreview",precondition:se.and(kw,se.has("config.editor.rename.enablePreview")),handler:o=>o.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:N.focus,primary:1024+3}}));ee(new mT({id:"cancelRenameInput",precondition:kw,handler:o=>o.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:N.focus,primary:9,secondary:[1033]}}));ia("_executeDocumentRenameProvider",function(o,e,t,...i){const[n]=i;pt(typeof n=="string");const{renameProvider:s}=o.get(de);return wde(s,e,t,n)});ia("_executePrepareRename",function(o,e,t){return Id(this,void 0,void 0,function*(){const{renameProvider:i}=o.get(de),s=yield new pT(e,t,i).resolveRenameLocation(ze.None);if(s!=null&&s.rejectReason)throw new Error(s.rejectReason);return s})});zt.as(rl.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:p("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var yde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lde=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},mO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},Py;let Ym=class extends H{constructor(e,t){super(),this._sessionStore=new Q,this._ranges=[],this._rangesVersionId=0,this._editor=e,this._languageFeaturesService=t,this.stickyScrollWidget=new Dde(this._editor),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(34)&&this.onConfigurationChange()})),this._updateSoon=this._register(new mt(()=>this._update(!0),50)),this.onConfigurationChange()}onConfigurationChange(){if(this._editor.getOption(34).stickyScroll.enabled===!1){this.stickyScrollWidget.emptyRootNode(),this._editor.removeOverlayWidget(this.stickyScrollWidget),this._sessionStore.clear();return}else this._editor.addOverlayWidget(this.stickyScrollWidget),this._sessionStore.add(this._editor.onDidChangeModel(()=>this._update(!0))),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._update(!1))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this._update(!0))),this._sessionStore.add(this._editor.onDidChangeModelTokens(t=>this._onTokensChange(t))),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this._update(!0))),this._update(!0)}_needsUpdate(e){const t=this.stickyScrollWidget.getCurrentLines();for(const i of t)for(const n of e.ranges)if(i>=n.fromLineNumber&&i<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._update(!1)}_update(e=!1){var t,i;return mO(this,void 0,void 0,function*(){e&&((t=this._cts)===null||t===void 0||t.dispose(!0),this._cts=new Qi,yield this._updateOutlineModel(this._cts.token));const n=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getHiddenAreas();if(n)for(const s of n)this._ranges=this._ranges.filter(r=>!(r[0]>=s.startLineNumber&&r[1]<=s.endLineNumber+1));this._renderStickyScroll()})}_findLineRanges(e,t){if(e!=null&&e.children.size){let i=!1;for(const n of e==null?void 0:e.children.values()){const s=n.symbol.kind;(s===4||s===8||s===11||s===10||s===5||s===1)&&(i=!0,this._findLineRanges(n,t+1))}i||this._addOutlineRanges(e,t)}else this._addOutlineRanges(e,t)}_addOutlineRanges(e,t){let i=0,n=0;for(;e;){const s=e.symbol.kind;if((s===4||s===8||s===11||s===10||s===5||s===1)&&(i=e==null?void 0:e.symbol.range.startLineNumber,n=e==null?void 0:e.symbol.range.endLineNumber,this._ranges.push([i,n,t]),t--),e.parent instanceof LC)e=e.parent;else break}}_updateOutlineModel(e){return mO(this,void 0,void 0,function*(){if(this._editor.hasModel()){const t=this._editor.getModel(),i=t.getVersionId(),n=yield Ea.create(this._languageFeaturesService.documentSymbolProvider,t,e);if(e.isCancellationRequested)return;this._ranges=[],this._rangesVersionId=i;for(const s of n.children.values()){if(s instanceof LC){const a=s.symbol.kind;a===4||a===8||a===11||a===10||a===5||a===1?this._findLineRanges(s,1):this._findLineRanges(s,0)}this._ranges=this._ranges.sort(function(a,l){return a[0]!==l[0]?a[0]-l[0]:a[1]!==l[1]?l[1]-a[1]:a[2]-l[2]});let r=[];for(const[a,l]of this._ranges.entries()){const[c,d,h]=l;r[0]===c&&r[1]===d?this._ranges.splice(a,1):r=l}}}})}_renderStickyScroll(){if(!this._editor.hasModel())return;const e=this._editor.getOption(61),t=this._editor.getModel();if(this._rangesVersionId!==t.getVersionId())return;const i=this._editor.getScrollTop();this.stickyScrollWidget.emptyRootNode();const n=new Set;for(const[s,r]of this._ranges.entries()){const[a,l,c]=r;if(l-a>0&&t.getLineContent(a)!==""){const d=(c-1)*e,h=c*e,u=this._editor.getBottomForLineNumber(a)-i,g=this._editor.getTopForLineNumber(l)-i,f=this._editor.getBottomForLineNumber(l)-i;if(n.has(a))this._ranges.splice(s,1);else if(d>=g-1&&du&&ho});class bO{constructor(e,t,i,n,s){this._lineNumber=e,this._depth=t,this._editor=i,this._zIndex=n,this._relativePosition=s,this.effectiveLineHeight=0,this.effectiveLineHeight=this._editor.getOption(61)+this._relativePosition}get lineNumber(){return this._lineNumber}getDomNode(){const e=document.createElement("div"),t=this._editor._getViewModel(),i=t.coordinatesConverter.convertModelPositionToViewPosition(new B(this._lineNumber,1)).lineNumber,n=t.getViewLineRenderingData(i);let s;try{s=es.filter(n.inlineDecorations,i,n.minColumn,n.maxColumn)}catch{s=[]}const r=new Lc(!0,!0,n.content,n.continuesWithWrappedLine,n.isBasicASCII,n.containsRTL,0,n.tokens,s,n.tabSize,n.startVisibleColumn,1,1,1,100,"none",!0,!0,null),a=nc(400);a_(r,a);let l;_O?l=_O.createHTML(a.build()):l=a.build();const c=document.createElement("span");c.style.backgroundColor="var(--vscode-editorStickyScroll-background)",c.style.overflow="hidden",c.style.whiteSpace="nowrap",c.style.display="inline-block",c.style.lineHeight=this._editor.getOption(61).toString()+"px",c.innerHTML=l;const d=document.createElement("span");d.style.width=this._editor.getLayoutInfo().contentLeft.toString()+"px",d.style.backgroundColor="var(--vscode-editorStickyScroll-background)",d.style.color="var(--vscode-editorLineNumber-foreground)",d.style.display="inline-block",d.style.lineHeight=this._editor.getOption(61).toString()+"px";const h=document.createElement("span");return h.innerText=this._lineNumber.toString(),h.style.paddingLeft=this._editor.getLayoutInfo().lineNumbersLeft.toString()+"px",h.style.width=this._editor.getLayoutInfo().lineNumbersWidth.toString()+"px",h.style.backgroundColor="var(--vscode-editorStickyScroll-background)",h.style.textAlign="right",h.style.float="left",h.style.lineHeight=this._editor.getOption(61).toString()+"px",d.appendChild(h),e.onclick=u=>{u.stopPropagation(),u.preventDefault(),this._editor.revealPosition({lineNumber:this._lineNumber-this._depth+1,column:1})},e.onmouseover=u=>{h.style.background="var(--vscode-editorStickyScrollHover-background)",c.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",d.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",e.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",h.style.cursor="pointer",c.style.cursor="pointer",e.style.cursor="pointer",d.style.cursor="pointer"},e.onmouseleave=u=>{h.style.background="var(--vscode-editorStickyScroll-background)",c.style.backgroundColor="var(--vscode-editorStickyScroll-background)",d.style.backgroundColor="var(--vscode-editorStickyScroll-background)",e.style.backgroundColor="var(--vscode-editorStickyScroll-background)"},this._editor.applyFontInfo(c),this._editor.applyFontInfo(h),e.appendChild(d),e.appendChild(c),e.style.zIndex=this._zIndex.toString(),e.style.backgroundColor="var(--vscode-editorStickyScroll-background)",e.style.overflow="hidden",e.style.whiteSpace="nowrap",e.style.width="100%",e.style.lineHeight=this._editor.getOption(61).toString()+"px",e.style.height=this._editor.getOption(61).toString()+"px",this._relativePosition&&(e.style.position="relative",e.style.top=this._relativePosition+"px",e.style.width="100%"),e}}class Dde{constructor(e){this._editor=e,this.arrayOfCodeLines=[],this.rootDomNode=document.createElement("div"),this.rootDomNode=document.createElement("div"),this.rootDomNode.style.width="100%",this.rootDomNode.style.boxShadow="var(--vscode-scrollbar-shadow) 0 6px 6px -6px"}getCurrentLines(){const e=[];for(const t of this.arrayOfCodeLines)e.push(t.lineNumber);return e}pushCodeLine(e){this.arrayOfCodeLines.push(e)}updateRootNode(){let e=0;for(const t of this.arrayOfCodeLines)e+=t.effectiveLineHeight,this.rootDomNode.appendChild(t.getDomNode());this.rootDomNode.style.height=e.toString()+"px"}emptyRootNode(){this.arrayOfCodeLines.length=0,Si(this.rootDomNode)}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this.rootDomNode.style.zIndex="2",this.rootDomNode.style.backgroundColor="var(--vscode-editorStickyScroll-background)",this.rootDomNode}getPosition(){return{preference:null}}}tt(Ym.ID,Ym);class kde{provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:r}=n,a=i.column-r;let l=a,c=a,d=0;for(;l>=0;l--){const h=s.charCodeAt(l);if(l!==a&&(h===95||h===45))break;if(Ml(h)&&Sr(d))break;d=h}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new L(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var xde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ide=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},xw=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class _T{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new _T(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let Og=class s8{constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}static get(e){return e.getContribution(s8.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return xw(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield r8(this._languageFeaturesService.selectionRangeProvider,i,t.map(s=>s.getPosition()),this._editor.getOption(104),ze.None).then(s=>{var r;if(!(!rn(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Ss(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),s[a].unshift(t[a]);this._state=s.map(a=>new _T(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>oe.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}};Og.ID="editor.contrib.smartSelectController";Og=xde([Ide(1,de)],Og);class o8 extends ce{constructor(e,t){super(t),this._forward=e}run(e,t){return xw(this,void 0,void 0,function*(){const i=Og.get(t);i&&(yield i.run(this._forward))})}}class Ede extends o8{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}Xe.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class Nde extends o8{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}tt(Og.ID,Og);ie(Ede);ie(Nde);function r8(o,e,t,i,n){return xw(this,void 0,void 0,function*(){const s=o.all(e).concat(new kde);s.length===1&&s.unshift(new fs);const r=[],a=[];for(const l of s)r.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(c=>{if(rn(c)&&c.length===t.length)for(let d=0;d{if(l.length===0)return[];l.sort((u,g)=>B.isBefore(u.getStartPosition(),g.getStartPosition())?1:B.isBefore(g.getStartPosition(),u.getStartPosition())||B.isBefore(u.getEndPosition(),g.getEndPosition())?-1:B.isBefore(g.getEndPosition(),u.getEndPosition())?1:0);const c=[];let d;for(const u of l)(!d||L.containsRange(u,d)&&!L.equalsRange(u,d))&&(c.push(u),d=u);if(!i.selectLeadingAndTrailingWhitespace)return c;const h=[c[0]];for(let u=1;u=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ed=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Tde=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Ade{constructor(e,t,i,n,s,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=r}}let $x=class extends K6{constructor(e,t,i,n,s,r){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&l.resolve(ze.None)}return t}};$x=bT([Ed(5,mw)],$x);let jx=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var s;return Tde(this,void 0,void 0,function*(){if(i.selectedSuggestionInfo)return;const r=this._getEditorOption(81,e);if(ku.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(ku.valueFor(r,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c!=null&&c.word||(d=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let h;const u=e.getValueInRange(new L(t.lineNumber,1,t.lineNumber,t.column));if(!d&&((s=this._lastResult)===null||s===void 0?void 0:s.canBeReused(e,t.lineNumber,c))){const g=new aO(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),h=this._lastResult}else{const g=yield QN(this._languageFeatureService.completionProvider,e,t,new Bm(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n);let f;g.needsClipboard&&(f=yield this._clipboardService.readText());const _=new Al(g.items,t.column,new aO(u,0),Fo.None,this._getEditorOption(108,e),this._getEditorOption(103,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},f);h=new $x(e,t.lineNumber,c,_,g,this._suggestMemoryService)}return this._lastResult=h,h})}handleItemDidShow(e,t){t.completion.resolve(ze.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(L.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))!((i=r.triggerCharacters)===null||i===void 0)&&i.includes(n)&&s.add(r);if(s.size!==0)return{providers:s,ch:n}}};jx=bT([Ed(1,de),Ed(2,cl),Ed(3,mw)],jx);let TC=class ou{constructor(e,t,i,n){if(++ou._counter===1){const s=n.createInstance(jx,(r,a)=>{var l;return((l=i.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(r)});ou._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;--ou._counter===0&&((e=ou._disposable)===null||e===void 0||e.dispose(),ou._disposable=void 0)}};TC._counter=0;TC=bT([Ed(1,de),Ed(2,ct),Ed(3,Ae)],TC);tt("suggest.inlineCompletionsProvider",TC);class Mde extends ce{constructor(){super({id:"editor.action.forceRetokenize",label:p("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new $n(!0);i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}ie(Mde);class Pg extends ce{constructor(){super({id:Pg.ID,label:p({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!mv.getTabFocusMode();mv.setTabFocusMode(n),Gi(n?p("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):p("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}Pg.ID="editor.action.toggleTabFocusMode";ie(Pg);var Rde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ode=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Kx=class extends H{constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=q(e,J("a.monaco-link",{tabIndex:(s=t.tabIndex)!==null&&s!==void 0?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const r=this._register(new bt(this.el,"click")),a=this._register(new bt(this.el,"keypress")),l=ge.chain(a.event).map(h=>new Rt(h)).filter(h=>h.keyCode===3).event,c=this._register(new bt(this.el,xt.Tap)).event;this._register(ft.addTarget(this.el));const d=ge.any(r.event,l,c);this._register(d(h=>{!this.enabled||(ut.stop(h,!0),i!=null&&i.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}};Kx=Rde([Ode(3,io)],Kx);Et((o,e)=>{const t=o.getColor(h1);t&&e.addRule(`.monaco-link { color: ${t}; }`);const i=o.getColor(u1);i&&e.addRule(`.monaco-link:hover { color: ${i}; }`)});var a8=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l8=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const Pde=26;let qx=class extends H{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Gx))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,Pde)}};qx=a8([l8(1,Ae)],qx);let Gx=class extends H{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(ol,{}),this.element=J("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=J("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Si(this.element)}show(e){Si(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=q(this.element,J("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(J(`div${at.asCSSSelector(e.icon)}`));const n=q(this.element,J("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=q(this.element,J("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(Kx,this.messageActionsContainer,Object.assign(Object.assign({},r),{tabIndex:-1}),{}));const s=q(this.element,J("div.action-container"));this.actionBar=this._register(new Zr(s)),this.actionBar.push(this._register(new is("banner.close","Close Banner",at.asClassName(K5),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Gx=a8([l8(0,Ae)],Gx);var vT=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qu=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},nn=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Fde=mi("extensions-warning-message",m.warning,p("warningIcon","Icon shown with a warning message in the extensions editor."));let Fg=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let a;if(s.nonBasicAsciiCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new lf};else if(s.ambiguousCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Tc};else if(s.invisibleCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new af};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Fde,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(qx,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(115),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(115)&&(this._options=e.getOption(115),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=Bde(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?F8:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Zx(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Wde(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Fg.ID="editor.contrib.unicodeHighlighter";Fg=vT([Qu(1,to),Qu(2,lF),Qu(3,Ae)],Fg);function Bde(o,e){return{nonBasicASCII:e.nonBasicASCII===gs?!o:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===gs?!o:e.includeComments,includeStrings:e.includeStrings===gs?!o:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let Zx=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new mt(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:AC.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!TE(t,e))return null;const i=t.getValueInRange(e.range);return{reason:c8(i,this._options),inComment:AE(t,e),inString:ME(t,e)}}};Zx=vT([Qu(3,to)],Zx);class Wde extends H{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new mt(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const s=BI.computeUnicodeHighlights(this._model,this._options,n);for(const r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:AC.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return TE(t,e)?{reason:c8(i,this._options),inComment:AE(t,e),inString:ME(t,e)}:null}}let Yx=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=4}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(Fg.ID);if(!n)return[];const s=[];let r=300;for(const a of t){const l=n.getDecorationInfo(a);if(!l)continue;const d=i.getValueInRange(a.range).codePointAt(0),h=vO(d);let u;switch(l.reason.kind){case 0:u=p("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,vO(l.reason.confusableWith.codePointAt(0)));break;case 1:u=p("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:u=p("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}const g={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},f=p("unicodeHighlight.adjustSettings","Adjust settings"),_=`command:${W_.ID}?${encodeURIComponent(JSON.stringify(g))}`,b=new Fn("",!0).appendMarkdown(u).appendText(" ").appendLink(_,f);s.push(new Tr(this,a.range,[b],r++))}return s}renderHoverParts(e,t){return Z7(e,t,this._editor,this._languageService,this._openerService)}};Yx=vT([Qu(1,Ht),Qu(2,io)],Yx);function Qx(o){return`U+${o.toString(16).padStart(4,"0")}`}function vO(o){let e=`\`${Qx(o)}\``;return Hr.isInvisibleCharacter(o)||(e+=` "${`${Vde(o)}`}"`),e}function Vde(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function c8(o,e){return BI.computeUnicodeHighlightReason(o,e)}class AC{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=Ne.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}AC.instance=new AC;class Hde extends ce{constructor(){super({id:Tc.ID,label:p("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.includeComments,!1,2)})}}class zde extends ce{constructor(){super({id:Tc.ID,label:p("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.includeStrings,!1,2)})}}class Tc extends ce{constructor(){super({id:Tc.ID,label:p("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.ambiguousCharacters,!1,2)})}}Tc.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class af extends ce{constructor(){super({id:af.ID,label:p("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.invisibleCharacters,!1,2)})}}af.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class lf extends ce{constructor(){super({id:lf.ID,label:p("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.nonBasicASCII,!1,2)})}}lf.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class W_ extends ce{constructor(){super({id:W_.ID,label:p("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return nn(this,void 0,void 0,function*(){const{codePoint:n,reason:s,inString:r,inComment:a}=i,l=String.fromCodePoint(n),c=e.get(dl),d=e.get(ot);function h(f){return Hr.isInvisibleCharacter(f)?p("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Qx(f)):p("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Qx(f)} "${l}"`)}const u=[];if(s.kind===0)for(const f of s.notAmbiguousInLocales)u.push({label:p("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',f),run:()=>nn(this,void 0,void 0,function*(){$de(d,[f])})});if(u.push({label:h(n),run:()=>Ude(d,[n])}),a){const f=new Hde;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else if(r){const f=new zde;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}if(s.kind===0){const f=new Tc;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else if(s.kind===1){const f=new af;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else if(s.kind===2){const f=new lf;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else jde(s);const g=yield c.pick(u,{title:p("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});g&&(yield g.run())})}}W_.ID="editor.action.unicodeHighlight.showExcludeOptions";function Ude(o,e){return nn(this,void 0,void 0,function*(){const t=o.getValue(On.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;yield o.updateValue(On.allowedCharacters,i,2)})}function $de(o,e){var t;return nn(this,void 0,void 0,function*(){const i=(t=o.inspect(On.allowedLocales).user)===null||t===void 0?void 0:t.value;let n;typeof i=="object"&&i?n=Object.assign({},i):n={};for(const s of e)n[s]=!0;yield o.updateValue(On.allowedLocales,n,2)})}function jde(o){throw new Error(`Unexpected value: ${o}`)}ie(Tc);ie(af);ie(lf);ie(W_);tt(Fg.ID,Fg);xh.register(Yx);var Kde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},qde=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const d8="ignoreUnusualLineTerminators";function Gde(o,e,t){o.setModelProperty(e.uri,d8,t)}function Zde(o,e){return o.getModelProperty(e.uri,d8)}let Qm=class extends H{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(116),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&(this._config=this._editor.getOption(116),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return qde(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||Zde(this._codeEditorService,e)===!0||this._editor.getOption(83))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:p("unusualLineTerminators.title","Unusual Line Terminators"),message:p("unusualLineTerminators.message","Detected unusual line terminators"),detail:p("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Js(e.uri)),primaryButton:p("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:p("unusualLineTerminators.ignore","Ignore")})).confirmed){Gde(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};Qm.ID="editor.contrib.unusualLineTerminatorsDetector";Qm=Kde([CO(1,b_),CO(2,ct)],Qm);tt(Qm.ID,Qm);var Yde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Xm=class extends H{constructor(e,t,i,n,s,r){super(),this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new mt(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(iN)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()}))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=Ri(r=>Promise.resolve(eN(this._provider,e,t,r))),s=new $n(!1);return n.then(r=>{if(this._debounceInformation.update(e,s.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,c=this._modelService.getSemanticTokensProviderStyling(a);e.tokenization.setPartialSemanticTokens(t,gF(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};Xm.ID="editor.contrib.viewportSemanticTokens";Xm=Yde([Bf(1,Ut),Bf(2,Ct),Bf(3,ot),Bf(4,no),Bf(5,de)],Xm);tt(Xm.ID,Xm);var Qde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const Xde=T("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},p("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Jde=T("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},p("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),ehe=T("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Ot,hcLight:Ot},p("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),the=T("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Ot,hcLight:Ot},p("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),ihe=T("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},p("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),nhe=T("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},p("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Iw=new le("hasWordHighlights",!1);function h8(o,e,t,i){const n=o.ordered(e);return OP(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,Pi)),rn)}class u8{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ri(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=Boolean(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=i.length;!l&&c=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class she extends u8{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return h8(this._providers,e,t.getPosition(),n).then(s=>s||[])}}class ohe extends u8{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return sc(250,n).then(()=>{if(!t.isEmpty())return[];const s=e.getWordAtPosition(t.getPosition());return!s||s.word.length>1e3?[]:e.findMatches(s.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:Fp.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function rhe(o,e,t,i){return o.has(e)?new she(e,t,i,o):new ohe(e,t,i)}ia("_executeDocumentHighlights",(o,e,t)=>{const i=o.get(de);return h8(i.documentHighlightProvider,e,t,ze.None)});class cf{constructor(e,t,i){this.toUnhook=new Q,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=Iw.bindTo(i),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(74),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(n=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(n)})),this.toUnhook.add(e.onDidChangeModelContent(n=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(n=>{const s=this.editor.getOption(74);this.occurrencesHighlight!==s&&(this.occurrencesHighlight=s,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(L.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);Gi(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);Gi(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},Te)}}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:cf._getDecorationOptions(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===Fp.Write?this._WRITE_OPTIONS:e===Fp.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}cf._WRITE_OPTIONS=Ne.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Qt(nhe),position:Zs.Center},minimap:{color:Qt(m1),position:js.Inline}});cf._TEXT_OPTIONS=Ne.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Qt(T4),position:Zs.Center},minimap:{color:Qt(m1),position:js.Inline}});cf._REGULAR_OPTIONS=Ne.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Qt(ihe),position:Zs.Center},minimap:{color:Qt(m1),position:js.Inline}});let ch=class g8 extends H{constructor(e,t,i){super(),this.wordHighlighter=null;const n=()=>{e.hasModel()&&(this.wordHighlighter=new cf(e,i.documentHighlightProvider,t))};this._register(e.onDidChangeModel(s=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()})),n()}static get(e){return e.getContribution(g8.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};ch.ID="editor.contrib.wordHighlighter";ch=Qde([wO(1,Ee),wO(2,de)],ch);class f8 extends ce{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=ch.get(t);!i||(this._isNext?i.moveNext():i.moveBack())}}class ahe extends f8{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:p("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Iw,kbOpts:{kbExpr:N.editorTextFocus,primary:65,weight:100}})}}class lhe extends f8{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:p("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Iw,kbOpts:{kbExpr:N.editorTextFocus,primary:1089,weight:100}})}}class che extends ce{constructor(){super({id:"editor.action.wordHighlight.trigger",label:p("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Iw.toNegated(),kbOpts:{kbExpr:N.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=ch.get(t);!n||n.restoreViewState(!0)}}tt(ch.ID,ch);ie(ahe);ie(lhe);ie(che);Et((o,e)=>{const t=o.getColor(oE);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=o.getColor(Xde);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const n=o.getColor(Jde);n&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${n}; }`);const s=o.getColor(Kz);s&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${cn(o.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=o.getColor(ehe);r&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${cn(o.type)?"dashed":"solid"} ${r}; box-sizing: border-box; }`);const a=o.getColor(the);a&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${cn(o.type)?"dashed":"solid"} ${a}; box-sizing: border-box; }`)});class Ew extends xi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Ys(t.getOption(119)),s=t.getModel(),a=t.getSelections().map(l=>{const c=new B(l.positionLineNumber,l.positionColumn),d=this._move(n,s,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>$e.fromModelSelection(l))),a.length===1){const l=new B(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new oe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new oe(t.lineNumber,t.column,t.lineNumber,t.column)}}class Ac extends Ew{_move(e,t,i,n){return it.moveWordLeft(e,t,i,n)}}class Mc extends Ew{_move(e,t,i,n){return it.moveWordRight(e,t,i,n)}}class dhe extends Ac{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class hhe extends Ac{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class uhe extends Ac{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class ghe extends Ac{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class fhe extends Ac{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class phe extends Ac{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class mhe extends Ac{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class _he extends Ac{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class bhe extends Mc{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class vhe extends Mc{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Che extends Mc{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class whe extends Mc{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class She extends Mc{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class yhe extends Mc{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class Lhe extends Mc{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class Dhe extends Mc{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class Nw extends xi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(si);if(!t.hasModel())return;const s=Ys(t.getOption(119)),r=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(8),d=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),u=a.map(g=>{const f=this._delete({wordSeparators:s,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new zi(f,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class CT extends Nw{_delete(e,t){const i=it.deleteWordLeft(e,t);return i||new L(1,1,1,1)}}class wT extends Nw{_delete(e,t){const i=it.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new L(n,s,n,s)}}class khe extends CT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:N.writable})}}class xhe extends CT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:N.writable})}}class Ihe extends CT{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class Ehe extends wT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:N.writable})}}class Nhe extends wT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:N.writable})}}class The extends wT{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Ahe extends ce{constructor(){super({id:"deleteInsideWord",precondition:N.writable,label:p("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=Ys(t.getOption(119)),s=t.getModel(),a=t.getSelections().map(l=>{const c=it.deleteInsideWord(n,s,l);return new zi(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}ee(new dhe);ee(new hhe);ee(new uhe);ee(new ghe);ee(new fhe);ee(new phe);ee(new bhe);ee(new vhe);ee(new Che);ee(new whe);ee(new She);ee(new yhe);ee(new mhe);ee(new _he);ee(new Lhe);ee(new Dhe);ee(new khe);ee(new xhe);ee(new Ihe);ee(new Ehe);ee(new Nhe);ee(new The);ie(Ahe);class Mhe extends Nw{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=v1.deleteWordPartLeft(e);return i||new L(1,1,1,1)}}class Rhe extends Nw{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=v1.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new L(n,s,n,s)}}class p8 extends Ew{_move(e,t,i,n){return v1.moveWordPartLeft(e,t,i)}}class Ohe extends p8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}Xe.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Phe extends p8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}Xe.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class m8 extends Ew{_move(e,t,i,n){return v1.moveWordPartRight(e,t,i)}}class Fhe extends m8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class Bhe extends m8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ee(new Mhe);ee(new Rhe);ee(new Ohe);ee(new Phe);ee(new Fhe);ee(new Bhe);class Xx extends H{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=os.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(p("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(p("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}}Xx.ID="editor.contrib.readOnlyMessageController";tt(Xx.ID,Xx);var _8=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},W0=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const b8=new le("accessibilityHelpWidgetVisible",!1);let dh=class v8 extends H{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Bg,this._editor))}static get(e){return e.getContribution(v8.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};dh.ID="editor.contrib.accessibilityHelpController";dh=_8([W0(1,Ae)],dh);function Whe(o,e){return!o||o.length===0?hi.noSelection:o.length===1?e?Vs(hi.singleSelectionRange,o[0].positionLineNumber,o[0].positionColumn,e):Vs(hi.singleSelection,o[0].positionLineNumber,o[0].positionColumn):e?Vs(hi.multiSelectionRange,o.length,e):o.length>0?Vs(hi.multiSelection,o.length):""}let Bg=class V0 extends yo{constructor(e,t,i,n){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=b8.bindTo(this._contextKeyService),this._domNode=Je(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=Je(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(ki(this._contentDomNode.domNode,"keydown",s=>{if(!!this._isVisible&&(s.equals(2083)&&(Gi(hi.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),Si(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Gi(hi.openingDocs);let r=this._editor.getRawOptions().accessibilityHelpUrl;typeof r>"u"&&(r="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(_e.parse(r)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return V0.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){const n=this._keybindingService.lookupKeybinding(e);return n?Vs(t,n.getAriaLabel()):Vs(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const a=this._editor.getModel();a&&t.forEach(l=>{i+=a.getValueLengthInRange(l)})}let n=Whe(t,i);e.get(56)?e.get(83)?n+=hi.readonlyDiffEditor:n+=hi.editableDiffEditor:e.get(83)?n+=hi.readonlyEditor:n+=hi.editableEditor;const s=Ge?hi.changeConfigToOnMac:hi.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+=` +`)};const r=yield s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r})}}function wde(o,e,t,i){return Id(this,void 0,void 0,function*(){const n=new pT(e,t,o),s=yield n.resolveRenameLocation(ze.None);return s!=null&&s.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,ze.None)})}let lh=class n8{constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new Q,this._cts=new Qi,this._renameInputField=this._disposableStore.add(new $l(()=>this._disposableStore.add(this._instaService.createInstance(Ux,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(n8.ID)}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Id(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new pT(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;this._cts=new qd(this.editor,5);let s;try{const u=n.resolveRenameLocation(this._cts.token);this._progressService.showWhile(u,250),s=yield u}catch(u){(e=os.get(this.editor))===null||e===void 0||e.showMessage(u||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}if(!s)return;if(s.rejectReason){(t=os.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,i);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new qd(this.editor,5,s.range);const r=this.editor.getSelection();let a=0,l=s.text.length;!L.isEmpty(r)&&!L.spansMultipleLines(r)&&L.containsRange(s.range,r)&&(a=Math.max(0,r.startColumn-s.range.startColumn),l=Math.min(s.range.endColumn,r.endColumn)-s.range.startColumn);const c=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=yield this._renameInputField.value.getInput(s.range,s.text,a,l,c,this._cts.token);if(typeof d=="boolean"){d&&this.editor.focus();return}this.editor.focus();const h=MI(n.provideRenameEdits(d.newName,this._cts.token),this._cts.token).then(u=>Id(this,void 0,void 0,function*(){if(!(!u||!this.editor.hasModel())){if(u.rejectReason){this._notificationService.info(u.rejectReason);return}this.editor.setSelection(L.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(Qg.convert(u),{editor:this.editor,showPreview:d.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,d.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,d.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&Gi(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,d.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),u=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(u)});return this._progressService.showWhile(h,250),h})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};lh.ID="editor.contrib.renameController";lh=Cde([Uc(1,Ae),Uc(2,di),Uc(3,v_),Uc(4,kc),Uc(5,So),Uc(6,WI),Uc(7,de)],lh);class Sde extends ce{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:se.and(N.writable,N.hasRenameProvider),kbOpts:{kbExpr:N.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(ct),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return _e.isUri(n)&&B.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{!r||(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},Te):super.runCommand(e,t)}run(e,t){const i=lh.get(t);return i?i.run():Promise.resolve()}}tt(lh.ID,lh);ie(Sde);const mT=xi.bindToContribution(lh.get);ee(new mT({id:"acceptRenameInput",precondition:kw,handler:o=>o.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:N.focus,primary:3}}));ee(new mT({id:"acceptRenameInputWithPreview",precondition:se.and(kw,se.has("config.editor.rename.enablePreview")),handler:o=>o.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:N.focus,primary:1024+3}}));ee(new mT({id:"cancelRenameInput",precondition:kw,handler:o=>o.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:N.focus,primary:9,secondary:[1033]}}));ia("_executeDocumentRenameProvider",function(o,e,t,...i){const[n]=i;pt(typeof n=="string");const{renameProvider:s}=o.get(de);return wde(s,e,t,n)});ia("_executePrepareRename",function(o,e,t){return Id(this,void 0,void 0,function*(){const{renameProvider:i}=o.get(de),s=yield new pT(e,t,i).resolveRenameLocation(ze.None);if(s!=null&&s.rejectReason)throw new Error(s.rejectReason);return s})});zt.as(rl.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:p("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var yde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lde=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},mO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},Py;let Ym=class extends H{constructor(e,t){super(),this._sessionStore=new Q,this._ranges=[],this._rangesVersionId=0,this._editor=e,this._languageFeaturesService=t,this.stickyScrollWidget=new Dde(this._editor),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(34)&&this.onConfigurationChange()})),this._updateSoon=this._register(new mt(()=>this._update(!0),50)),this.onConfigurationChange()}onConfigurationChange(){if(this._editor.getOption(34).stickyScroll.enabled===!1){this.stickyScrollWidget.emptyRootNode(),this._editor.removeOverlayWidget(this.stickyScrollWidget),this._sessionStore.clear();return}else this._editor.addOverlayWidget(this.stickyScrollWidget),this._sessionStore.add(this._editor.onDidChangeModel(()=>this._update(!0))),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._update(!1))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this._update(!0))),this._sessionStore.add(this._editor.onDidChangeModelTokens(t=>this._onTokensChange(t))),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this._update(!0))),this._update(!0)}_needsUpdate(e){const t=this.stickyScrollWidget.getCurrentLines();for(const i of t)for(const n of e.ranges)if(i>=n.fromLineNumber&&i<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._update(!1)}_update(e=!1){var t,i;return mO(this,void 0,void 0,function*(){e&&((t=this._cts)===null||t===void 0||t.dispose(!0),this._cts=new Qi,yield this._updateOutlineModel(this._cts.token));const n=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getHiddenAreas();if(n)for(const s of n)this._ranges=this._ranges.filter(r=>!(r[0]>=s.startLineNumber&&r[1]<=s.endLineNumber+1));this._renderStickyScroll()})}_findLineRanges(e,t){if(e!=null&&e.children.size){let i=!1;for(const n of e==null?void 0:e.children.values()){const s=n.symbol.kind;(s===4||s===8||s===11||s===10||s===5||s===1)&&(i=!0,this._findLineRanges(n,t+1))}i||this._addOutlineRanges(e,t)}else this._addOutlineRanges(e,t)}_addOutlineRanges(e,t){let i=0,n=0;for(;e;){const s=e.symbol.kind;if((s===4||s===8||s===11||s===10||s===5||s===1)&&(i=e==null?void 0:e.symbol.range.startLineNumber,n=e==null?void 0:e.symbol.range.endLineNumber,this._ranges.push([i,n,t]),t--),e.parent instanceof LC)e=e.parent;else break}}_updateOutlineModel(e){return mO(this,void 0,void 0,function*(){if(this._editor.hasModel()){const t=this._editor.getModel(),i=t.getVersionId(),n=yield Ea.create(this._languageFeaturesService.documentSymbolProvider,t,e);if(e.isCancellationRequested)return;this._ranges=[],this._rangesVersionId=i;for(const s of n.children.values()){if(s instanceof LC){const a=s.symbol.kind;a===4||a===8||a===11||a===10||a===5||a===1?this._findLineRanges(s,1):this._findLineRanges(s,0)}this._ranges=this._ranges.sort(function(a,l){return a[0]!==l[0]?a[0]-l[0]:a[1]!==l[1]?l[1]-a[1]:a[2]-l[2]});let r=[];for(const[a,l]of this._ranges.entries()){const[c,d,h]=l;r[0]===c&&r[1]===d?this._ranges.splice(a,1):r=l}}}})}_renderStickyScroll(){if(!this._editor.hasModel())return;const e=this._editor.getOption(61),t=this._editor.getModel();if(this._rangesVersionId!==t.getVersionId())return;const i=this._editor.getScrollTop();this.stickyScrollWidget.emptyRootNode();const n=new Set;for(const[s,r]of this._ranges.entries()){const[a,l,c]=r;if(l-a>0&&t.getLineContent(a)!==""){const d=(c-1)*e,h=c*e,u=this._editor.getBottomForLineNumber(a)-i,g=this._editor.getTopForLineNumber(l)-i,f=this._editor.getBottomForLineNumber(l)-i;if(n.has(a))this._ranges.splice(s,1);else if(d>=g-1&&du&&ho});class bO{constructor(e,t,i,n,s){this._lineNumber=e,this._depth=t,this._editor=i,this._zIndex=n,this._relativePosition=s,this.effectiveLineHeight=0,this.effectiveLineHeight=this._editor.getOption(61)+this._relativePosition}get lineNumber(){return this._lineNumber}getDomNode(){const e=document.createElement("div"),t=this._editor._getViewModel(),i=t.coordinatesConverter.convertModelPositionToViewPosition(new B(this._lineNumber,1)).lineNumber,n=t.getViewLineRenderingData(i);let s;try{s=es.filter(n.inlineDecorations,i,n.minColumn,n.maxColumn)}catch{s=[]}const r=new Lc(!0,!0,n.content,n.continuesWithWrappedLine,n.isBasicASCII,n.containsRTL,0,n.tokens,s,n.tabSize,n.startVisibleColumn,1,1,1,100,"none",!0,!0,null),a=nc(400);a_(r,a);let l;_O?l=_O.createHTML(a.build()):l=a.build();const c=document.createElement("span");c.style.backgroundColor="var(--vscode-editorStickyScroll-background)",c.style.overflow="hidden",c.style.whiteSpace="nowrap",c.style.display="inline-block",c.style.lineHeight=this._editor.getOption(61).toString()+"px",c.innerHTML=l;const d=document.createElement("span");d.style.width=this._editor.getLayoutInfo().contentLeft.toString()+"px",d.style.backgroundColor="var(--vscode-editorStickyScroll-background)",d.style.color="var(--vscode-editorLineNumber-foreground)",d.style.display="inline-block",d.style.lineHeight=this._editor.getOption(61).toString()+"px";const h=document.createElement("span");return h.innerText=this._lineNumber.toString(),h.style.paddingLeft=this._editor.getLayoutInfo().lineNumbersLeft.toString()+"px",h.style.width=this._editor.getLayoutInfo().lineNumbersWidth.toString()+"px",h.style.backgroundColor="var(--vscode-editorStickyScroll-background)",h.style.textAlign="right",h.style.float="left",h.style.lineHeight=this._editor.getOption(61).toString()+"px",d.appendChild(h),e.onclick=u=>{u.stopPropagation(),u.preventDefault(),this._editor.revealPosition({lineNumber:this._lineNumber-this._depth+1,column:1})},e.onmouseover=u=>{h.style.background="var(--vscode-editorStickyScrollHover-background)",c.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",d.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",e.style.backgroundColor="var(--vscode-editorStickyScrollHover-background)",h.style.cursor="pointer",c.style.cursor="pointer",e.style.cursor="pointer",d.style.cursor="pointer"},e.onmouseleave=u=>{h.style.background="var(--vscode-editorStickyScroll-background)",c.style.backgroundColor="var(--vscode-editorStickyScroll-background)",d.style.backgroundColor="var(--vscode-editorStickyScroll-background)",e.style.backgroundColor="var(--vscode-editorStickyScroll-background)"},this._editor.applyFontInfo(c),this._editor.applyFontInfo(h),e.appendChild(d),e.appendChild(c),e.style.zIndex=this._zIndex.toString(),e.style.backgroundColor="var(--vscode-editorStickyScroll-background)",e.style.overflow="hidden",e.style.whiteSpace="nowrap",e.style.width="100%",e.style.lineHeight=this._editor.getOption(61).toString()+"px",e.style.height=this._editor.getOption(61).toString()+"px",this._relativePosition&&(e.style.position="relative",e.style.top=this._relativePosition+"px",e.style.width="100%"),e}}class Dde{constructor(e){this._editor=e,this.arrayOfCodeLines=[],this.rootDomNode=document.createElement("div"),this.rootDomNode=document.createElement("div"),this.rootDomNode.style.width="100%",this.rootDomNode.style.boxShadow="var(--vscode-scrollbar-shadow) 0 6px 6px -6px"}getCurrentLines(){const e=[];for(const t of this.arrayOfCodeLines)e.push(t.lineNumber);return e}pushCodeLine(e){this.arrayOfCodeLines.push(e)}updateRootNode(){let e=0;for(const t of this.arrayOfCodeLines)e+=t.effectiveLineHeight,this.rootDomNode.appendChild(t.getDomNode());this.rootDomNode.style.height=e.toString()+"px"}emptyRootNode(){this.arrayOfCodeLines.length=0,Si(this.rootDomNode)}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this.rootDomNode.style.zIndex="2",this.rootDomNode.style.backgroundColor="var(--vscode-editorStickyScroll-background)",this.rootDomNode}getPosition(){return{preference:null}}}tt(Ym.ID,Ym);class kde{provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:r}=n,a=i.column-r;let l=a,c=a,d=0;for(;l>=0;l--){const h=s.charCodeAt(l);if(l!==a&&(h===95||h===45))break;if(Ml(h)&&Sr(d))break;d=h}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new L(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var xde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ide=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},xw=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class _T{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new _T(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let Og=class s8{constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}static get(e){return e.getContribution(s8.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return xw(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield r8(this._languageFeaturesService.selectionRangeProvider,i,t.map(s=>s.getPosition()),this._editor.getOption(104),ze.None).then(s=>{var r;if(!(!rn(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Ss(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),s[a].unshift(t[a]);this._state=s.map(a=>new _T(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>oe.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}};Og.ID="editor.contrib.smartSelectController";Og=xde([Ide(1,de)],Og);class o8 extends ce{constructor(e,t){super(t),this._forward=e}run(e,t){return xw(this,void 0,void 0,function*(){const i=Og.get(t);i&&(yield i.run(this._forward))})}}class Ede extends o8{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}Xe.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class Nde extends o8{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:N.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:M.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}tt(Og.ID,Og);ie(Ede);ie(Nde);function r8(o,e,t,i,n){return xw(this,void 0,void 0,function*(){const s=o.all(e).concat(new kde);s.length===1&&s.unshift(new fs);const r=[],a=[];for(const l of s)r.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(c=>{if(rn(c)&&c.length===t.length)for(let d=0;d{if(l.length===0)return[];l.sort((u,g)=>B.isBefore(u.getStartPosition(),g.getStartPosition())?1:B.isBefore(g.getStartPosition(),u.getStartPosition())||B.isBefore(u.getEndPosition(),g.getEndPosition())?-1:B.isBefore(g.getEndPosition(),u.getEndPosition())?1:0);const c=[];let d;for(const u of l)(!d||L.containsRange(u,d)&&!L.equalsRange(u,d))&&(c.push(u),d=u);if(!i.selectLeadingAndTrailingWhitespace)return c;const h=[c[0]];for(let u=1;u=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ed=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Tde=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};class Ade{constructor(e,t,i,n,s,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=r}}let $x=class extends K6{constructor(e,t,i,n,s,r){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&l.resolve(ze.None)}return t}};$x=bT([Ed(5,mw)],$x);let jx=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var s;return Tde(this,void 0,void 0,function*(){if(i.selectedSuggestionInfo)return;const r=this._getEditorOption(81,e);if(ku.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(ku.valueFor(r,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c!=null&&c.word||(d=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let h;const u=e.getValueInRange(new L(t.lineNumber,1,t.lineNumber,t.column));if(!d&&((s=this._lastResult)===null||s===void 0?void 0:s.canBeReused(e,t.lineNumber,c))){const g=new aO(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),h=this._lastResult}else{const g=yield QN(this._languageFeatureService.completionProvider,e,t,new Bm(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n);let f;g.needsClipboard&&(f=yield this._clipboardService.readText());const _=new Al(g.items,t.column,new aO(u,0),Fo.None,this._getEditorOption(108,e),this._getEditorOption(103,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},f);h=new $x(e,t.lineNumber,c,_,g,this._suggestMemoryService)}return this._lastResult=h,h})}handleItemDidShow(e,t){t.completion.resolve(ze.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(L.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))!((i=r.triggerCharacters)===null||i===void 0)&&i.includes(n)&&s.add(r);if(s.size!==0)return{providers:s,ch:n}}};jx=bT([Ed(1,de),Ed(2,cl),Ed(3,mw)],jx);let TC=class ou{constructor(e,t,i,n){if(++ou._counter===1){const s=n.createInstance(jx,(r,a)=>{var l;return((l=i.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(r)});ou._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;--ou._counter===0&&((e=ou._disposable)===null||e===void 0||e.dispose(),ou._disposable=void 0)}};TC._counter=0;TC=bT([Ed(1,de),Ed(2,ct),Ed(3,Ae)],TC);tt("suggest.inlineCompletionsProvider",TC);class Mde extends ce{constructor(){super({id:"editor.action.forceRetokenize",label:p("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new $n(!0);i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}ie(Mde);class Pg extends ce{constructor(){super({id:Pg.ID,label:p({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!mv.getTabFocusMode();mv.setTabFocusMode(n),Gi(n?p("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):p("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}Pg.ID="editor.action.toggleTabFocusMode";ie(Pg);var Rde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ode=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Kx=class extends H{constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=q(e,J("a.monaco-link",{tabIndex:(s=t.tabIndex)!==null&&s!==void 0?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const r=this._register(new bt(this.el,"click")),a=this._register(new bt(this.el,"keypress")),l=ge.chain(a.event).map(h=>new Rt(h)).filter(h=>h.keyCode===3).event,c=this._register(new bt(this.el,xt.Tap)).event;this._register(ft.addTarget(this.el));const d=ge.any(r.event,l,c);this._register(d(h=>{!this.enabled||(ut.stop(h,!0),i!=null&&i.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}};Kx=Rde([Ode(3,io)],Kx);Et((o,e)=>{const t=o.getColor(h1);t&&e.addRule(`.monaco-link { color: ${t}; }`);const i=o.getColor(u1);i&&e.addRule(`.monaco-link:hover { color: ${i}; }`)});var a8=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l8=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const Pde=26;let qx=class extends H{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Gx))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,Pde)}};qx=a8([l8(1,Ae)],qx);let Gx=class extends H{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(ol,{}),this.element=J("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=J("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Si(this.element)}show(e){Si(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=q(this.element,J("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(J(`div${at.asCSSSelector(e.icon)}`));const n=q(this.element,J("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=q(this.element,J("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(Kx,this.messageActionsContainer,Object.assign(Object.assign({},r),{tabIndex:-1}),{}));const s=q(this.element,J("div.action-container"));this.actionBar=this._register(new Zr(s)),this.actionBar.push(this._register(new is("banner.close","Close Banner",at.asClassName(KF),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Gx=a8([l8(0,Ae)],Gx);var vT=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qu=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},nn=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Fde=mi("extensions-warning-message",m.warning,p("warningIcon","Icon shown with a warning message in the extensions editor."));let Fg=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let a;if(s.nonBasicAsciiCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new lf};else if(s.ambiguousCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Tc};else if(s.invisibleCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new af};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Fde,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(qx,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(115),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(115)&&(this._options=e.getOption(115),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=Bde(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?F8:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Zx(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Wde(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Fg.ID="editor.contrib.unicodeHighlighter";Fg=vT([Qu(1,to),Qu(2,l5),Qu(3,Ae)],Fg);function Bde(o,e){return{nonBasicASCII:e.nonBasicASCII===gs?!o:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===gs?!o:e.includeComments,includeStrings:e.includeStrings===gs?!o:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let Zx=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new mt(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:AC.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!TE(t,e))return null;const i=t.getValueInRange(e.range);return{reason:c8(i,this._options),inComment:AE(t,e),inString:ME(t,e)}}};Zx=vT([Qu(3,to)],Zx);class Wde extends H{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new mt(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const s=BI.computeUnicodeHighlights(this._model,this._options,n);for(const r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:AC.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return TE(t,e)?{reason:c8(i,this._options),inComment:AE(t,e),inString:ME(t,e)}:null}}let Yx=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=4}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(Fg.ID);if(!n)return[];const s=[];let r=300;for(const a of t){const l=n.getDecorationInfo(a);if(!l)continue;const d=i.getValueInRange(a.range).codePointAt(0),h=vO(d);let u;switch(l.reason.kind){case 0:u=p("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,vO(l.reason.confusableWith.codePointAt(0)));break;case 1:u=p("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:u=p("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}const g={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},f=p("unicodeHighlight.adjustSettings","Adjust settings"),_=`command:${W_.ID}?${encodeURIComponent(JSON.stringify(g))}`,b=new Fn("",!0).appendMarkdown(u).appendText(" ").appendLink(_,f);s.push(new Tr(this,a.range,[b],r++))}return s}renderHoverParts(e,t){return Z7(e,t,this._editor,this._languageService,this._openerService)}};Yx=vT([Qu(1,Ht),Qu(2,io)],Yx);function Qx(o){return`U+${o.toString(16).padStart(4,"0")}`}function vO(o){let e=`\`${Qx(o)}\``;return Hr.isInvisibleCharacter(o)||(e+=` "${`${Vde(o)}`}"`),e}function Vde(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function c8(o,e){return BI.computeUnicodeHighlightReason(o,e)}class AC{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=Ne.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}AC.instance=new AC;class Hde extends ce{constructor(){super({id:Tc.ID,label:p("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.includeComments,!1,2)})}}class zde extends ce{constructor(){super({id:Tc.ID,label:p("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.includeStrings,!1,2)})}}class Tc extends ce{constructor(){super({id:Tc.ID,label:p("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.ambiguousCharacters,!1,2)})}}Tc.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class af extends ce{constructor(){super({id:af.ID,label:p("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.invisibleCharacters,!1,2)})}}af.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class lf extends ce{constructor(){super({id:lf.ID,label:p("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,i){return nn(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(ot);n&&this.runAction(n)})}runAction(e){return nn(this,void 0,void 0,function*(){yield e.updateValue(On.nonBasicASCII,!1,2)})}}lf.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class W_ extends ce{constructor(){super({id:W_.ID,label:p("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return nn(this,void 0,void 0,function*(){const{codePoint:n,reason:s,inString:r,inComment:a}=i,l=String.fromCodePoint(n),c=e.get(dl),d=e.get(ot);function h(f){return Hr.isInvisibleCharacter(f)?p("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Qx(f)):p("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Qx(f)} "${l}"`)}const u=[];if(s.kind===0)for(const f of s.notAmbiguousInLocales)u.push({label:p("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',f),run:()=>nn(this,void 0,void 0,function*(){$de(d,[f])})});if(u.push({label:h(n),run:()=>Ude(d,[n])}),a){const f=new Hde;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else if(r){const f=new zde;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}if(s.kind===0){const f=new Tc;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else if(s.kind===1){const f=new af;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else if(s.kind===2){const f=new lf;u.push({label:f.label,run:()=>nn(this,void 0,void 0,function*(){return f.runAction(d)})})}else jde(s);const g=yield c.pick(u,{title:p("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});g&&(yield g.run())})}}W_.ID="editor.action.unicodeHighlight.showExcludeOptions";function Ude(o,e){return nn(this,void 0,void 0,function*(){const t=o.getValue(On.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;yield o.updateValue(On.allowedCharacters,i,2)})}function $de(o,e){var t;return nn(this,void 0,void 0,function*(){const i=(t=o.inspect(On.allowedLocales).user)===null||t===void 0?void 0:t.value;let n;typeof i=="object"&&i?n=Object.assign({},i):n={};for(const s of e)n[s]=!0;yield o.updateValue(On.allowedLocales,n,2)})}function jde(o){throw new Error(`Unexpected value: ${o}`)}ie(Tc);ie(af);ie(lf);ie(W_);tt(Fg.ID,Fg);xh.register(Yx);var Kde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},qde=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const d8="ignoreUnusualLineTerminators";function Gde(o,e,t){o.setModelProperty(e.uri,d8,t)}function Zde(o,e){return o.getModelProperty(e.uri,d8)}let Qm=class extends H{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(116),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&(this._config=this._editor.getOption(116),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return qde(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||Zde(this._codeEditorService,e)===!0||this._editor.getOption(83))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:p("unusualLineTerminators.title","Unusual Line Terminators"),message:p("unusualLineTerminators.message","Detected unusual line terminators"),detail:p("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Js(e.uri)),primaryButton:p("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:p("unusualLineTerminators.ignore","Ignore")})).confirmed){Gde(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};Qm.ID="editor.contrib.unusualLineTerminatorsDetector";Qm=Kde([CO(1,b_),CO(2,ct)],Qm);tt(Qm.ID,Qm);var Yde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Xm=class extends H{constructor(e,t,i,n,s,r){super(),this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new mt(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(iN)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()}))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=Ri(r=>Promise.resolve(eN(this._provider,e,t,r))),s=new $n(!1);return n.then(r=>{if(this._debounceInformation.update(e,s.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,c=this._modelService.getSemanticTokensProviderStyling(a);e.tokenization.setPartialSemanticTokens(t,g5(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};Xm.ID="editor.contrib.viewportSemanticTokens";Xm=Yde([Bf(1,Ut),Bf(2,Ct),Bf(3,ot),Bf(4,no),Bf(5,de)],Xm);tt(Xm.ID,Xm);var Qde=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const Xde=T("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},p("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Jde=T("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},p("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),ehe=T("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Ot,hcLight:Ot},p("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),the=T("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Ot,hcLight:Ot},p("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),ihe=T("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},p("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),nhe=T("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},p("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Iw=new le("hasWordHighlights",!1);function h8(o,e,t,i){const n=o.ordered(e);return OP(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,Pi)),rn)}class u8{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ri(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=Boolean(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=i.length;!l&&c=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class she extends u8{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return h8(this._providers,e,t.getPosition(),n).then(s=>s||[])}}class ohe extends u8{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return sc(250,n).then(()=>{if(!t.isEmpty())return[];const s=e.getWordAtPosition(t.getPosition());return!s||s.word.length>1e3?[]:e.findMatches(s.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:Fp.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function rhe(o,e,t,i){return o.has(e)?new she(e,t,i,o):new ohe(e,t,i)}ia("_executeDocumentHighlights",(o,e,t)=>{const i=o.get(de);return h8(i.documentHighlightProvider,e,t,ze.None)});class cf{constructor(e,t,i){this.toUnhook=new Q,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=Iw.bindTo(i),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(74),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(n=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(n)})),this.toUnhook.add(e.onDidChangeModelContent(n=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(n=>{const s=this.editor.getOption(74);this.occurrencesHighlight!==s&&(this.occurrencesHighlight=s,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(L.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);Gi(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);Gi(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},Te)}}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:cf._getDecorationOptions(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===Fp.Write?this._WRITE_OPTIONS:e===Fp.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}cf._WRITE_OPTIONS=Ne.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Qt(nhe),position:Zs.Center},minimap:{color:Qt(m1),position:js.Inline}});cf._TEXT_OPTIONS=Ne.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Qt(T4),position:Zs.Center},minimap:{color:Qt(m1),position:js.Inline}});cf._REGULAR_OPTIONS=Ne.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Qt(ihe),position:Zs.Center},minimap:{color:Qt(m1),position:js.Inline}});let ch=class g8 extends H{constructor(e,t,i){super(),this.wordHighlighter=null;const n=()=>{e.hasModel()&&(this.wordHighlighter=new cf(e,i.documentHighlightProvider,t))};this._register(e.onDidChangeModel(s=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()})),n()}static get(e){return e.getContribution(g8.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};ch.ID="editor.contrib.wordHighlighter";ch=Qde([wO(1,Ee),wO(2,de)],ch);class f8 extends ce{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=ch.get(t);!i||(this._isNext?i.moveNext():i.moveBack())}}class ahe extends f8{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:p("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Iw,kbOpts:{kbExpr:N.editorTextFocus,primary:65,weight:100}})}}class lhe extends f8{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:p("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Iw,kbOpts:{kbExpr:N.editorTextFocus,primary:1089,weight:100}})}}class che extends ce{constructor(){super({id:"editor.action.wordHighlight.trigger",label:p("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Iw.toNegated(),kbOpts:{kbExpr:N.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=ch.get(t);!n||n.restoreViewState(!0)}}tt(ch.ID,ch);ie(ahe);ie(lhe);ie(che);Et((o,e)=>{const t=o.getColor(oE);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=o.getColor(Xde);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const n=o.getColor(Jde);n&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${n}; }`);const s=o.getColor(Kz);s&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${cn(o.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=o.getColor(ehe);r&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${cn(o.type)?"dashed":"solid"} ${r}; box-sizing: border-box; }`);const a=o.getColor(the);a&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${cn(o.type)?"dashed":"solid"} ${a}; box-sizing: border-box; }`)});class Ew extends xi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Ys(t.getOption(119)),s=t.getModel(),a=t.getSelections().map(l=>{const c=new B(l.positionLineNumber,l.positionColumn),d=this._move(n,s,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>$e.fromModelSelection(l))),a.length===1){const l=new B(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new oe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new oe(t.lineNumber,t.column,t.lineNumber,t.column)}}class Ac extends Ew{_move(e,t,i,n){return it.moveWordLeft(e,t,i,n)}}class Mc extends Ew{_move(e,t,i,n){return it.moveWordRight(e,t,i,n)}}class dhe extends Ac{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class hhe extends Ac{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class uhe extends Ac{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class ghe extends Ac{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class fhe extends Ac{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class phe extends Ac{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class mhe extends Ac{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class _he extends Ac{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class bhe extends Mc{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class vhe extends Mc{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Che extends Mc{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class whe extends Mc{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class She extends Mc{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:se.and(N.textInputFocus,(e=se.and(c_,B1))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class yhe extends Mc{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class Lhe extends Mc{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class Dhe extends Mc{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Ys(nr.wordSeparators.defaultValue),t,i,n)}}class Nw extends xi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(si);if(!t.hasModel())return;const s=Ys(t.getOption(119)),r=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(8),d=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),u=a.map(g=>{const f=this._delete({wordSeparators:s,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new zi(f,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class CT extends Nw{_delete(e,t){const i=it.deleteWordLeft(e,t);return i||new L(1,1,1,1)}}class wT extends Nw{_delete(e,t){const i=it.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new L(n,s,n,s)}}class khe extends CT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:N.writable})}}class xhe extends CT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:N.writable})}}class Ihe extends CT{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class Ehe extends wT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:N.writable})}}class Nhe extends wT{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:N.writable})}}class The extends wT{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Ahe extends ce{constructor(){super({id:"deleteInsideWord",precondition:N.writable,label:p("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=Ys(t.getOption(119)),s=t.getModel(),a=t.getSelections().map(l=>{const c=it.deleteInsideWord(n,s,l);return new zi(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}ee(new dhe);ee(new hhe);ee(new uhe);ee(new ghe);ee(new fhe);ee(new phe);ee(new bhe);ee(new vhe);ee(new Che);ee(new whe);ee(new She);ee(new yhe);ee(new mhe);ee(new _he);ee(new Lhe);ee(new Dhe);ee(new khe);ee(new xhe);ee(new Ihe);ee(new Ehe);ee(new Nhe);ee(new The);ie(Ahe);class Mhe extends Nw{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=v1.deleteWordPartLeft(e);return i||new L(1,1,1,1)}}class Rhe extends Nw{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:N.writable,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=v1.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new L(n,s,n,s)}}class p8 extends Ew{_move(e,t,i,n){return v1.moveWordPartLeft(e,t,i)}}class Ohe extends p8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}Xe.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Phe extends p8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}Xe.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class m8 extends Ew{_move(e,t,i,n){return v1.moveWordPartRight(e,t,i)}}class Fhe extends m8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class Bhe extends m8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:N.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ee(new Mhe);ee(new Rhe);ee(new Ohe);ee(new Phe);ee(new Fhe);ee(new Bhe);class Xx extends H{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=os.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(p("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(p("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}}Xx.ID="editor.contrib.readOnlyMessageController";tt(Xx.ID,Xx);var _8=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},W0=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const b8=new le("accessibilityHelpWidgetVisible",!1);let dh=class v8 extends H{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Bg,this._editor))}static get(e){return e.getContribution(v8.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};dh.ID="editor.contrib.accessibilityHelpController";dh=_8([W0(1,Ae)],dh);function Whe(o,e){return!o||o.length===0?hi.noSelection:o.length===1?e?Vs(hi.singleSelectionRange,o[0].positionLineNumber,o[0].positionColumn,e):Vs(hi.singleSelection,o[0].positionLineNumber,o[0].positionColumn):e?Vs(hi.multiSelectionRange,o.length,e):o.length>0?Vs(hi.multiSelection,o.length):""}let Bg=class V0 extends yo{constructor(e,t,i,n){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=b8.bindTo(this._contextKeyService),this._domNode=Je(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=Je(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(ki(this._contentDomNode.domNode,"keydown",s=>{if(!!this._isVisible&&(s.equals(2083)&&(Gi(hi.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),Si(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Gi(hi.openingDocs);let r=this._editor.getRawOptions().accessibilityHelpUrl;typeof r>"u"&&(r="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(_e.parse(r)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return V0.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){const n=this._keybindingService.lookupKeybinding(e);return n?Vs(t,n.getAriaLabel()):Vs(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const a=this._editor.getModel();a&&t.forEach(l=>{i+=a.getValueLengthInRange(l)})}let n=Whe(t,i);e.get(56)?e.get(83)?n+=hi.readonlyDiffEditor:n+=hi.editableDiffEditor:e.get(83)?n+=hi.readonlyEditor:n+=hi.editableEditor;const s=Ge?hi.changeConfigToOnMac:hi.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+=` - `+s;break;case 2:n+=` @@ -793,6 +793,6 @@ The flag will not be saved for the future. - `+r,n+=` -`+hi.outroMsg,this._contentDomNode.domNode.appendChild(CF(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Si(this._contentDomNode.domNode),this._editor.focus())}_layout(){const e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(V0.WIDTH,e.width-40)),i=Math.max(5,Math.min(V0.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(i);const n=Math.round((e.height-i)/2);this._domNode.setTop(n);const s=Math.round((e.width-t)/2);this._domNode.setLeft(s)}};Bg.ID="editor.contrib.accessibilityHelpWidget";Bg.WIDTH=500;Bg.HEIGHT=300;Bg=_8([W0(1,Ee),W0(2,_i),W0(3,io)],Bg);class Vhe extends ce{constructor(){super({id:"editor.action.showAccessibilityHelp",label:hi.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){const i=dh.get(t);i&&i.show()}}tt(dh.ID,dh);ie(Vhe);const Hhe=xi.bindToContribution(dh.get);ee(new Hhe({id:"closeAccessibilityHelp",precondition:b8,handler:o=>o.hide(),kbOpts:{weight:100+100,kbExpr:N.focus,primary:9,secondary:[1033]}}));Et((o,e)=>{const t=o.getColor(li);t&&e.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${t}; }`);const i=o.getColor(zo);i&&e.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const n=o.getColor(Ho);n&&e.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${n}; }`);const s=o.getColor(We);s&&e.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${s}; }`)});class Jx extends H{constructor(e){super(),this.editor=e,this.widget=null,Ur&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(83);!this.widget&&e?this.widget=new Tw(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}Jx.ID="editor.contrib.iPadShowKeyboard";class Tw extends H{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(G(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(G(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return Tw.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}Tw.ID="editor.contrib.ShowKeyboardWidget";tt(Jx.ID,Jx);var zhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Wg=class C8 extends H{constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(Wt.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}static get(e){return e.getContribution(C8.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new Aw(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Wg.ID="editor.contrib.inspectTokens";Wg=zhe([SO(1,Es),SO(2,Ht)],Wg);class Uhe extends ce{constructor(){super({id:"editor.action.inspectTokens",label:zD.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=Wg.get(t);i&&i.launch()}}function $he(o){let e="";for(let t=0,i=o.length;tng,tokenize:(n,s,r)=>AI(e,r),tokenizeEncoded:(n,s,r)=>qC(i,r)}}class Aw extends H{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=jhe(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return Aw._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const c=t.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i{const t=o.getColor(aE);if(t){const s=cn(o.type)?2:1;e.addRule(`.monaco-editor .tokens-inspect-widget { border: ${s}px solid ${t}; }`),e.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${t}; }`)}const i=o.getColor(Bd);i&&e.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const n=o.getColor(rE);n&&e.addRule(`.monaco-editor .tokens-inspect-widget { color: ${n}; }`)});var Khe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let MC=class H0{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=zt.as(yh.Quickaccess)}provide(e){const t=new Q;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(H0.PREFIX.length));n&&n.prefix&&n.prefix!==H0.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders(),t}getQuickAccessProviders(){const e=[];for(const t of this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)))if(t.prefix!==H0.PREFIX)for(const i of t.helpEntries){const n=i.prefix||t.prefix,s=n||"\u2026";e.push({prefix:n,label:s,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:p("helpPickAriaLabel","{0}, {1}",s,i.description),description:i.description})}return e}};MC.PREFIX="?";MC=Khe([yO(0,dl),yO(1,_i)],MC);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:MC,prefix:"",helpEntries:[{description:UD.helpQuickAccessActionLabel}]});class w8{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new Q;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new _n);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t){const i=new Q,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const s={editor:n},r=u3(n);if(r){let a=Wn(n.saveViewState());i.add(r.onDidChangeCursorPosition(()=>{a=Wn(n.saveViewState())})),s.restoreViewState=()=>{a&&n===this.activeTextEditorControl&&n.restoreViewState(a)},i.add(Xa(t.onCancellationRequested)(()=>{var l;return(l=s.restoreViewState)===null||l===void 0?void 0:l.call(s)}))}i.add(Be(()=>this.clearDecorations(n))),i.add(this.provideWithTextEditor(s,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return h3(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Qt(H$),position:Zs.Full}}}],[r,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class Mw extends w8{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=p("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,H.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new Q;s.add(t.onDidAccept(l=>{const[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(n,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const r=()=>{const l=this.parsePosition(n,t.value.trim().substr(Mw.PREFIX.length)),c=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const d=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(d,0),this.addDecorations(n,d)};r(),s.add(t.onDidChangeValue(()=>r()));const a=u3(n);return a&&a.getOptions().get(62).renderType===2&&(a.updateOptions({lineNumbers:"on"}),s.add(Be(()=>a.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?p("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):p("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?p("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):p("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){var t,i;return(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}Mw.PREFIX=":";var qhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ghe=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Jm=class extends Mw{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=ge.None}get activeTextEditorControl(){return Wn(this.editorService.getFocusedCodeEditor())}};Jm=qhe([Ghe(0,ct)],Jm);class V_ extends ce{constructor(){super({id:V_.ID,label:qv.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(dl).quickAccess.show(Jm.PREFIX)}}V_.ID="editor.action.gotoLine";ie(V_);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:Jm,prefix:Jm.PREFIX,helpEntries:[{description:qv.gotoLineActionLabel,commandId:V_.ID}]});const S8=[void 0,[]];function Fy(o,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?Zhe(o,n.values,t,i):y8(o,e,t,i)}function Zhe(o,e,t,i){let n=0;const s=[];for(const r of e){const[a,l]=y8(o,r,t,i);if(typeof a!="number")return S8;n+=a,s.push(...l)}return[n,Yhe(s)]}function y8(o,e,t,i){const n=mg(e.original,e.originalLowercase,t,o,o.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],E1(n)]:S8}Object.freeze({score:0});function Yhe(o){const e=o.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!Qhe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function Qhe(o,e){return!(o.end=0,r=LO(o);let a;const l=o.split(L8);if(l.length>1)for(const c of l){const d=LO(c),{pathNormalized:h,normalized:u,normalizedLowercase:g}=DO(c);u&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:g,expectContiguousMatch:d}))}return{original:o,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function DO(o){let e;Yi?e=o.replace(/\//g,Br):e=o.replace(/\\/g,Br);const t=kB(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function kO(o){return Array.isArray(o)?eI(o.map(e=>e.original).join(L8)):eI(o.original)}var Xhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Wf=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Co=class tI extends w8{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,p("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),H.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):H.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new Q;return this.provideLabelPick(i,p("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),Wf(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,s))||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n))}),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return Wf(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new RI,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(Be(()=>i.complete(!1))),i.p})}doProvideWithEditorSymbols(e,t,i,n){var s;const r=e.editor,a=new Q;a.add(i.onDidAccept(u=>{const[g]=i.selectedItems;g&&g.range&&(this.gotoLocation(e,{range:g.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n);let c;const d=u=>Wf(this,void 0,void 0,function*(){c==null||c.dispose(!0),i.busy=!1,c=new Qi(n),i.busy=!0;try{const g=eI(i.value.substr(tI.PREFIX.length).trim()),f=yield this.doGetSymbolPicks(l,g,void 0,c.token);if(n.isCancellationRequested)return;if(f.length>0){if(i.items=f,u&&g.original.length===0){const _=j0(f,b=>Boolean(b.type!=="separator"&&b.range&&L.containsPosition(b.range.decoration,u)));_&&(i.activeItems=[_])}}else g.original.length>0?this.provideLabelPick(i,p("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,p("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}});a.add(i.onDidChangeValue(()=>d(void 0))),d((s=r.getSelection())===null||s===void 0?void 0:s.getPosition());let h=2;return a.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;if(u&&u.range){if(h-- >0)return;r.revealRangeInCenter(u.range.selection,0),this.addDecorations(r,u.range.decoration)}})),a}doGetSymbolPicks(e,t,i,n){return Wf(this,void 0,void 0,function*(){const s=yield e;if(n.isCancellationRequested)return[];const r=t.original.indexOf(tI.SCOPE_PREFIX)===0,a=r?1:0;let l,c;t.values&&t.values.length>1?(l=kO(t.values[0]),c=kO(t.values.slice(1))):l=t;const d=[];for(let g=0;ga){let D=!1;if(l!==t&&([w,S]=Fy(b,Object.assign(Object.assign({},t),{values:void 0}),a,v),typeof w=="number"&&(D=!0)),typeof w!="number"&&([w,S]=Fy(b,l,a,v),typeof w!="number"))continue;if(!D&&c){if(C&&c.original.length>0&&([k,x]=Fy(C,c)),typeof k!="number")continue;typeof w=="number"&&(w+=k)}}const y=f.tags&&f.tags.indexOf(1)>=0;d.push({index:g,kind:f.kind,score:w,label:b,ariaLabel:_,description:C,highlights:y?void 0:{label:S,description:x},range:{selection:L.collapseToStart(f.selectionRange),decoration:f.range},strikethrough:y,buttons:(()=>{var D,I;const O=!((D=this.options)===null||D===void 0)&&D.openSideBySideDirection?(I=this.options)===null||I===void 0?void 0:I.openSideBySideDirection():void 0;if(!!O)return[{iconClass:O==="right"?m.splitHorizontal.classNames:m.splitVertical.classNames,tooltip:O==="right"?p("openToSide","Open to the Side"):p("openToBottom","Open to the Bottom")}]})()})}const h=d.sort((g,f)=>r?this.compareByKindAndScore(g,f):this.compareByScore(g,f));let u=[];if(r){let b=function(){f&&typeof g=="number"&&_>0&&(f.label=Vs(Wy[g]||By,_))},g,f,_=0;for(const v of h)g!==v.kind?(b(),g=v.kind,_=1,f={type:"separator"},u.push(f)):_++,u.push(v);b()}else h.length>0&&(u=[{label:p("symbols","symbols ({0})",d.length),type:"separator"},...h]);return u})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=Wy[e.kind]||By,n=Wy[t.kind]||By,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}getDocumentSymbols(e,t){return Wf(this,void 0,void 0,function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}};Co.PREFIX="@";Co.SCOPE_PREFIX=":";Co.PREFIX_BY_CATEGORY=`${Co.PREFIX}${Co.SCOPE_PREFIX}`;Co=Xhe([xO(0,de),xO(1,pw)],Co);const By=p("property","properties ({0})"),Wy={[5]:p("method","methods ({0})"),[11]:p("function","functions ({0})"),[8]:p("_constructor","constructors ({0})"),[12]:p("variable","variables ({0})"),[4]:p("class","classes ({0})"),[22]:p("struct","structs ({0})"),[23]:p("event","events ({0})"),[24]:p("operator","operators ({0})"),[10]:p("interface","interfaces ({0})"),[2]:p("namespace","namespaces ({0})"),[3]:p("package","packages ({0})"),[25]:p("typeParameter","type parameters ({0})"),[1]:p("modules","modules ({0})"),[6]:p("property","properties ({0})"),[9]:p("enum","enumerations ({0})"),[21]:p("enumMember","enumeration members ({0})"),[14]:p("string","strings ({0})"),[0]:p("file","files ({0})"),[17]:p("array","arrays ({0})"),[15]:p("number","numbers ({0})"),[16]:p("boolean","booleans ({0})"),[18]:p("object","objects ({0})"),[19]:p("key","keys ({0})"),[7]:p("field","fields ({0})"),[13]:p("constant","constants ({0})")};var Jhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let iI=class extends Co{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=ge.None}get activeTextEditorControl(){return Wn(this.editorService.getFocusedCodeEditor())}};iI=Jhe([Vy(0,ct),Vy(1,de),Vy(2,pw)],iI);class H_ extends ce{constructor(){super({id:H_.ID,label:bm.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:N.hasDocumentSymbolProvider,kbOpts:{kbExpr:N.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(dl).quickAccess.show(Co.PREFIX)}}H_.ID="editor.action.quickOutline";ie(H_);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:iI,prefix:Co.PREFIX,helpEntries:[{description:bm.quickOutlineActionLabel,prefix:Co.PREFIX,commandId:H_.ID},{description:bm.quickOutlineByCategoryActionLabel,prefix:Co.PREFIX_BY_CATEGORY}]});function Hy(o,e){return e&&(o.stack||o.stacktrace)?p("stackTrace.format","{0}: {1}",EO(o),IO(o.stack)||IO(o.stacktrace)):EO(o)}function IO(o){return Array.isArray(o)?o.join(` -`):o}function EO(o){return typeof o.code=="string"&&typeof o.errno=="number"&&typeof o.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",o.message):o.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function D8(o=null,e=!1){if(!o)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(o)){const t=i_(o),i=D8(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Un(o))return o;if(o.detail){const t=o.detail;if(t.error)return Hy(t.error,e);if(t.exception)return Hy(t.exception,e)}return o.stack?Hy(o,e):o.message?o.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var d0=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},Iu;(function(o){o[o.NO_ACTION=0]="NO_ACTION",o[o.CLOSE_PICKER=1]="CLOSE_PICKER",o[o.REFRESH_PICKER=2]="REFRESH_PICKER",o[o.REMOVE_ITEM=3]="REMOVE_ITEM"})(Iu||(Iu={}));function zy(o){const e=o;return Array.isArray(e.items)}function eue(o){const e=o;return!!e.picks&&e.additionalPicks instanceof Promise}class Rw extends H{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const n=new Q;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const r=n.add(new _n),a=()=>d0(this,void 0,void 0,function*(){const l=r.value=new Q;s==null||s.dispose(!0),e.busy=!1,s=new Qi(t);const c=s.token,d=e.value.substr(this.prefix.length).trim(),h=this._getPicks(d,l,c),u=(g,f)=>{var _;let b,v;if(zy(g)?(b=g.items,v=g.active):b=g,b.length===0){if(f)return!1;d.length>0&&((_=this.options)===null||_===void 0?void 0:_.noResultsPick)&&(b=[this.options.noResultsPick])}return e.items=b,v&&(e.activeItems=[v]),!0};if(h!==null)if(eue(h)){let g=!1,f=!1;yield Promise.all([(()=>d0(this,void 0,void 0,function*(){yield sc(Rw.FAST_PICKS_RACE_DELAY),!c.isCancellationRequested&&(f||(g=u(h.picks,!0)))}))(),(()=>d0(this,void 0,void 0,function*(){e.busy=!0;try{const _=yield h.additionalPicks;if(c.isCancellationRequested)return;let b,v;zy(h.picks)?(b=h.picks.items,v=h.picks.active):b=h.picks;let C,w;if(zy(_)?(C=_.items,w=_.active):C=_,C.length>0||!g){let S;if(!v&&!w){const k=e.activeItems[0];k&&b.indexOf(k)!==-1&&(S=k)}u({items:[...b,...C],active:v||w||S})}}finally{c.isCancellationRequested||(e.busy=!1),f=!0}}))()])}else if(!(h instanceof Promise))u(h);else{e.busy=!0;try{const g=yield h;if(c.isCancellationRequested)return;u(g)}finally{c.isCancellationRequested||(e.busy=!1)}}});return n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),n.add(e.onDidTriggerItemButton(({button:l,item:c})=>d0(this,void 0,void 0,function*(){var d,h;if(typeof c.trigger=="function"){const u=(h=(d=c.buttons)===null||d===void 0?void 0:d.indexOf(l))!==null&&h!==void 0?h:-1;if(u>=0){const g=c.trigger(u,e.keyMods),f=typeof g=="number"?g:yield g;if(t.isCancellationRequested)return;switch(f){case Iu.NO_ACTION:break;case Iu.CLOSE_PICKER:e.hide();break;case Iu.REFRESH_PICKER:a();break;case Iu.REMOVE_ITEM:{const _=e.items.indexOf(c);if(_!==-1){const b=e.items.slice(),v=b.splice(_,1),C=e.activeItems.filter(S=>S!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}}))),n}}Rw.FAST_PICKS_RACE_DELAY=200;var k8=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nd=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},NO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let e_=class z0 extends Rw{constructor(e,t,i,n,s,r){super(z0.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(hh)),this.options=e}_getPicks(e,t,i){return NO(this,void 0,void 0,function*(){const n=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const s=[];for(const c of n){const d=Wn(z0.WORD_FILTER(e,c.label)),h=c.commandAlias?Wn(z0.WORD_FILTER(e,c.commandAlias)):void 0;d||h?(c.highlights={label:d,detail:this.options.showAlias?h:void 0},s.push(c)):e===c.commandId&&s.push(c)}const r=new Map;for(const c of s){const d=r.get(c.label);d?(c.description=c.commandId,d.description=d.commandId):r.set(c.label,c)}s.sort((c,d)=>{const h=this.commandsHistory.peek(c.commandId),u=this.commandsHistory.peek(d.commandId);return h&&u?h>u?-1:1:h?-1:u?1:c.label.localeCompare(d.label)});const a=[];let l=!1;for(let c=0;cNO(this,void 0,void 0,function*(){this.commandsHistory.push(d.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"quick open"});try{yield this.commandService.executeCommand(d.commandId)}catch(g){ea(g)||this.dialogService.show(Bt.Error,p("canNotRun","Command '{0}' resulted in an error ({1})",d.label,D8(g)))}})}))}return a})}};e_.PREFIX=">";e_.WORD_FILTER=WE(x1,gZ,T5);e_=k8([nd(1,Ae),nd(2,_i),nd(3,ci),nd(4,sr),nd(5,b_)],e_);let hh=class Ii extends H{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Ii.getConfiguredCommandHistoryLength(this.configurationService),Ii.cache&&Ii.cache.limit!==this.configuredCommandsHistoryLength&&(Ii.cache.limit=this.configuredCommandsHistoryLength,Ii.saveState(this.storageService))}load(){const e=this.storageService.get(Ii.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=Ii.cache=new Dc(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}Ii.counter=this.storageService.getNumber(Ii.PREF_KEY_COUNTER,0,Ii.counter)}push(e){!Ii.cache||(Ii.cache.set(e,Ii.counter++),Ii.saveState(this.storageService))}peek(e){var t;return(t=Ii.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Ii.cache)return;const t={usesLRU:!0,entries:[]};Ii.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(Ii.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Ii.PREF_KEY_COUNTER,Ii.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const s=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof s=="number"?s:Ii.DEFAULT_COMMANDS_HISTORY_LENGTH}};hh.DEFAULT_COMMANDS_HISTORY_LENGTH=50;hh.PREF_KEY_CACHE="commandPalette.mru.cache";hh.PREF_KEY_COUNTER="commandPalette.mru.counter";hh.counter=1;hh=k8([nd(0,Do),nd(1,ot)],hh);class tue extends e_{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:KE(i.label)||i.id});return t}}var iue=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},nue=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let t_=class extends tue{constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}get activeTextEditorControl(){return Wn(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return nue(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};t_=iue([Qh(0,Ae),Qh(1,ct),Qh(2,_i),Qh(3,ci),Qh(4,sr),Qh(5,b_)],t_);class z_ extends ce{constructor(){super({id:z_.ID,label:Gv.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(dl).quickAccess.show(t_.PREFIX)}}z_.ID="editor.action.quickCommand";ie(z_);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:t_,prefix:t_.PREFIX,helpEntries:[{description:Gv.quickCommandHelp,commandId:z_.ID}]});var sue=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let nI=class extends mc{constructor(e,t,i,n,s,r,a){super(!0,e,t,i,n,s,r,a)}};nI=sue([Xh(1,Ee),Xh(2,ct),Xh(3,di),Xh(4,Ae),Xh(5,Do),Xh(6,ot)],nI);tt(mc.ID,nI);class oue extends ce{constructor(){super({id:"editor.action.toggleHighContrast",label:$D.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Es),n=i.getColorTheme();cn(n.type)?(i.setTheme(this._originalThemeName||(Xp(n.type)?Ku:Ra)),this._originalThemeName=null):(i.setTheme(Xp(n.type)?Sd:yd),this._originalThemeName=n.themeName)}}ie(oue);const ffe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:m3,Emitter:_3,KeyCode:b3,KeyMod:v3,Position:C3,Range:w3,Selection:S3,SelectionDirection:y3,MarkerSeverity:L3,MarkerTag:D3,Uri:k3,Token:x3,editor:I3,languages:E3},Symbol.toStringTag,{value:"Module"}));export{ffe as e,D_ as m,j3 as t}; -//# sourceMappingURL=editor.main.71e27b19.js.map +`+hi.outroMsg,this._contentDomNode.domNode.appendChild(C5(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Si(this._contentDomNode.domNode),this._editor.focus())}_layout(){const e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(V0.WIDTH,e.width-40)),i=Math.max(5,Math.min(V0.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(i);const n=Math.round((e.height-i)/2);this._domNode.setTop(n);const s=Math.round((e.width-t)/2);this._domNode.setLeft(s)}};Bg.ID="editor.contrib.accessibilityHelpWidget";Bg.WIDTH=500;Bg.HEIGHT=300;Bg=_8([W0(1,Ee),W0(2,_i),W0(3,io)],Bg);class Vhe extends ce{constructor(){super({id:"editor.action.showAccessibilityHelp",label:hi.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){const i=dh.get(t);i&&i.show()}}tt(dh.ID,dh);ie(Vhe);const Hhe=xi.bindToContribution(dh.get);ee(new Hhe({id:"closeAccessibilityHelp",precondition:b8,handler:o=>o.hide(),kbOpts:{weight:100+100,kbExpr:N.focus,primary:9,secondary:[1033]}}));Et((o,e)=>{const t=o.getColor(li);t&&e.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${t}; }`);const i=o.getColor(zo);i&&e.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const n=o.getColor(Ho);n&&e.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${n}; }`);const s=o.getColor(We);s&&e.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${s}; }`)});class Jx extends H{constructor(e){super(),this.editor=e,this.widget=null,Ur&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(83);!this.widget&&e?this.widget=new Tw(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}Jx.ID="editor.contrib.iPadShowKeyboard";class Tw extends H{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(G(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(G(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return Tw.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}Tw.ID="editor.contrib.ShowKeyboardWidget";tt(Jx.ID,Jx);var zhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Wg=class C8 extends H{constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(Wt.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}static get(e){return e.getContribution(C8.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new Aw(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Wg.ID="editor.contrib.inspectTokens";Wg=zhe([SO(1,Es),SO(2,Ht)],Wg);class Uhe extends ce{constructor(){super({id:"editor.action.inspectTokens",label:zD.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=Wg.get(t);i&&i.launch()}}function $he(o){let e="";for(let t=0,i=o.length;tng,tokenize:(n,s,r)=>AI(e,r),tokenizeEncoded:(n,s,r)=>qC(i,r)}}class Aw extends H{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=jhe(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return Aw._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const c=t.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i{const t=o.getColor(aE);if(t){const s=cn(o.type)?2:1;e.addRule(`.monaco-editor .tokens-inspect-widget { border: ${s}px solid ${t}; }`),e.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${t}; }`)}const i=o.getColor(Bd);i&&e.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const n=o.getColor(rE);n&&e.addRule(`.monaco-editor .tokens-inspect-widget { color: ${n}; }`)});var Khe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let MC=class H0{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=zt.as(yh.Quickaccess)}provide(e){const t=new Q;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(H0.PREFIX.length));n&&n.prefix&&n.prefix!==H0.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders(),t}getQuickAccessProviders(){const e=[];for(const t of this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)))if(t.prefix!==H0.PREFIX)for(const i of t.helpEntries){const n=i.prefix||t.prefix,s=n||"\u2026";e.push({prefix:n,label:s,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:p("helpPickAriaLabel","{0}, {1}",s,i.description),description:i.description})}return e}};MC.PREFIX="?";MC=Khe([yO(0,dl),yO(1,_i)],MC);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:MC,prefix:"",helpEntries:[{description:UD.helpQuickAccessActionLabel}]});class w8{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new Q;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new _n);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t){const i=new Q,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const s={editor:n},r=u3(n);if(r){let a=Wn(n.saveViewState());i.add(r.onDidChangeCursorPosition(()=>{a=Wn(n.saveViewState())})),s.restoreViewState=()=>{a&&n===this.activeTextEditorControl&&n.restoreViewState(a)},i.add(Xa(t.onCancellationRequested)(()=>{var l;return(l=s.restoreViewState)===null||l===void 0?void 0:l.call(s)}))}i.add(Be(()=>this.clearDecorations(n))),i.add(this.provideWithTextEditor(s,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return h3(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Qt(H$),position:Zs.Full}}}],[r,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class Mw extends w8{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=p("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,H.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new Q;s.add(t.onDidAccept(l=>{const[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(n,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const r=()=>{const l=this.parsePosition(n,t.value.trim().substr(Mw.PREFIX.length)),c=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const d=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(d,0),this.addDecorations(n,d)};r(),s.add(t.onDidChangeValue(()=>r()));const a=u3(n);return a&&a.getOptions().get(62).renderType===2&&(a.updateOptions({lineNumbers:"on"}),s.add(Be(()=>a.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?p("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):p("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?p("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):p("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){var t,i;return(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}Mw.PREFIX=":";var qhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ghe=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Jm=class extends Mw{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=ge.None}get activeTextEditorControl(){return Wn(this.editorService.getFocusedCodeEditor())}};Jm=qhe([Ghe(0,ct)],Jm);class V_ extends ce{constructor(){super({id:V_.ID,label:qv.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(dl).quickAccess.show(Jm.PREFIX)}}V_.ID="editor.action.gotoLine";ie(V_);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:Jm,prefix:Jm.PREFIX,helpEntries:[{description:qv.gotoLineActionLabel,commandId:V_.ID}]});const S8=[void 0,[]];function Fy(o,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?Zhe(o,n.values,t,i):y8(o,e,t,i)}function Zhe(o,e,t,i){let n=0;const s=[];for(const r of e){const[a,l]=y8(o,r,t,i);if(typeof a!="number")return S8;n+=a,s.push(...l)}return[n,Yhe(s)]}function y8(o,e,t,i){const n=mg(e.original,e.originalLowercase,t,o,o.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],E1(n)]:S8}Object.freeze({score:0});function Yhe(o){const e=o.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!Qhe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function Qhe(o,e){return!(o.end=0,r=LO(o);let a;const l=o.split(L8);if(l.length>1)for(const c of l){const d=LO(c),{pathNormalized:h,normalized:u,normalizedLowercase:g}=DO(c);u&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:g,expectContiguousMatch:d}))}return{original:o,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function DO(o){let e;Yi?e=o.replace(/\//g,Br):e=o.replace(/\\/g,Br);const t=kB(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function kO(o){return Array.isArray(o)?eI(o.map(e=>e.original).join(L8)):eI(o.original)}var Xhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xO=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Wf=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let Co=class tI extends w8{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,p("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),H.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):H.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new Q;return this.provideLabelPick(i,p("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),Wf(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,s))||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n))}),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return Wf(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new RI,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(Be(()=>i.complete(!1))),i.p})}doProvideWithEditorSymbols(e,t,i,n){var s;const r=e.editor,a=new Q;a.add(i.onDidAccept(u=>{const[g]=i.selectedItems;g&&g.range&&(this.gotoLocation(e,{range:g.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n);let c;const d=u=>Wf(this,void 0,void 0,function*(){c==null||c.dispose(!0),i.busy=!1,c=new Qi(n),i.busy=!0;try{const g=eI(i.value.substr(tI.PREFIX.length).trim()),f=yield this.doGetSymbolPicks(l,g,void 0,c.token);if(n.isCancellationRequested)return;if(f.length>0){if(i.items=f,u&&g.original.length===0){const _=j0(f,b=>Boolean(b.type!=="separator"&&b.range&&L.containsPosition(b.range.decoration,u)));_&&(i.activeItems=[_])}}else g.original.length>0?this.provideLabelPick(i,p("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,p("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}});a.add(i.onDidChangeValue(()=>d(void 0))),d((s=r.getSelection())===null||s===void 0?void 0:s.getPosition());let h=2;return a.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;if(u&&u.range){if(h-- >0)return;r.revealRangeInCenter(u.range.selection,0),this.addDecorations(r,u.range.decoration)}})),a}doGetSymbolPicks(e,t,i,n){return Wf(this,void 0,void 0,function*(){const s=yield e;if(n.isCancellationRequested)return[];const r=t.original.indexOf(tI.SCOPE_PREFIX)===0,a=r?1:0;let l,c;t.values&&t.values.length>1?(l=kO(t.values[0]),c=kO(t.values.slice(1))):l=t;const d=[];for(let g=0;ga){let D=!1;if(l!==t&&([w,S]=Fy(b,Object.assign(Object.assign({},t),{values:void 0}),a,v),typeof w=="number"&&(D=!0)),typeof w!="number"&&([w,S]=Fy(b,l,a,v),typeof w!="number"))continue;if(!D&&c){if(C&&c.original.length>0&&([k,x]=Fy(C,c)),typeof k!="number")continue;typeof w=="number"&&(w+=k)}}const y=f.tags&&f.tags.indexOf(1)>=0;d.push({index:g,kind:f.kind,score:w,label:b,ariaLabel:_,description:C,highlights:y?void 0:{label:S,description:x},range:{selection:L.collapseToStart(f.selectionRange),decoration:f.range},strikethrough:y,buttons:(()=>{var D,I;const O=!((D=this.options)===null||D===void 0)&&D.openSideBySideDirection?(I=this.options)===null||I===void 0?void 0:I.openSideBySideDirection():void 0;if(!!O)return[{iconClass:O==="right"?m.splitHorizontal.classNames:m.splitVertical.classNames,tooltip:O==="right"?p("openToSide","Open to the Side"):p("openToBottom","Open to the Bottom")}]})()})}const h=d.sort((g,f)=>r?this.compareByKindAndScore(g,f):this.compareByScore(g,f));let u=[];if(r){let b=function(){f&&typeof g=="number"&&_>0&&(f.label=Vs(Wy[g]||By,_))},g,f,_=0;for(const v of h)g!==v.kind?(b(),g=v.kind,_=1,f={type:"separator"},u.push(f)):_++,u.push(v);b()}else h.length>0&&(u=[{label:p("symbols","symbols ({0})",d.length),type:"separator"},...h]);return u})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=Wy[e.kind]||By,n=Wy[t.kind]||By,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}getDocumentSymbols(e,t){return Wf(this,void 0,void 0,function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}};Co.PREFIX="@";Co.SCOPE_PREFIX=":";Co.PREFIX_BY_CATEGORY=`${Co.PREFIX}${Co.SCOPE_PREFIX}`;Co=Xhe([xO(0,de),xO(1,pw)],Co);const By=p("property","properties ({0})"),Wy={[5]:p("method","methods ({0})"),[11]:p("function","functions ({0})"),[8]:p("_constructor","constructors ({0})"),[12]:p("variable","variables ({0})"),[4]:p("class","classes ({0})"),[22]:p("struct","structs ({0})"),[23]:p("event","events ({0})"),[24]:p("operator","operators ({0})"),[10]:p("interface","interfaces ({0})"),[2]:p("namespace","namespaces ({0})"),[3]:p("package","packages ({0})"),[25]:p("typeParameter","type parameters ({0})"),[1]:p("modules","modules ({0})"),[6]:p("property","properties ({0})"),[9]:p("enum","enumerations ({0})"),[21]:p("enumMember","enumeration members ({0})"),[14]:p("string","strings ({0})"),[0]:p("file","files ({0})"),[17]:p("array","arrays ({0})"),[15]:p("number","numbers ({0})"),[16]:p("boolean","booleans ({0})"),[18]:p("object","objects ({0})"),[19]:p("key","keys ({0})"),[7]:p("field","fields ({0})"),[13]:p("constant","constants ({0})")};var Jhe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let iI=class extends Co{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=ge.None}get activeTextEditorControl(){return Wn(this.editorService.getFocusedCodeEditor())}};iI=Jhe([Vy(0,ct),Vy(1,de),Vy(2,pw)],iI);class H_ extends ce{constructor(){super({id:H_.ID,label:bm.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:N.hasDocumentSymbolProvider,kbOpts:{kbExpr:N.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(dl).quickAccess.show(Co.PREFIX)}}H_.ID="editor.action.quickOutline";ie(H_);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:iI,prefix:Co.PREFIX,helpEntries:[{description:bm.quickOutlineActionLabel,prefix:Co.PREFIX,commandId:H_.ID},{description:bm.quickOutlineByCategoryActionLabel,prefix:Co.PREFIX_BY_CATEGORY}]});function Hy(o,e){return e&&(o.stack||o.stacktrace)?p("stackTrace.format","{0}: {1}",EO(o),IO(o.stack)||IO(o.stacktrace)):EO(o)}function IO(o){return Array.isArray(o)?o.join(` +`):o}function EO(o){return typeof o.code=="string"&&typeof o.errno=="number"&&typeof o.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",o.message):o.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function D8(o=null,e=!1){if(!o)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(o)){const t=i_(o),i=D8(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Un(o))return o;if(o.detail){const t=o.detail;if(t.error)return Hy(t.error,e);if(t.exception)return Hy(t.exception,e)}return o.stack?Hy(o,e):o.message?o.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var d0=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},Iu;(function(o){o[o.NO_ACTION=0]="NO_ACTION",o[o.CLOSE_PICKER=1]="CLOSE_PICKER",o[o.REFRESH_PICKER=2]="REFRESH_PICKER",o[o.REMOVE_ITEM=3]="REMOVE_ITEM"})(Iu||(Iu={}));function zy(o){const e=o;return Array.isArray(e.items)}function eue(o){const e=o;return!!e.picks&&e.additionalPicks instanceof Promise}class Rw extends H{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const n=new Q;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const r=n.add(new _n),a=()=>d0(this,void 0,void 0,function*(){const l=r.value=new Q;s==null||s.dispose(!0),e.busy=!1,s=new Qi(t);const c=s.token,d=e.value.substr(this.prefix.length).trim(),h=this._getPicks(d,l,c),u=(g,f)=>{var _;let b,v;if(zy(g)?(b=g.items,v=g.active):b=g,b.length===0){if(f)return!1;d.length>0&&((_=this.options)===null||_===void 0?void 0:_.noResultsPick)&&(b=[this.options.noResultsPick])}return e.items=b,v&&(e.activeItems=[v]),!0};if(h!==null)if(eue(h)){let g=!1,f=!1;yield Promise.all([(()=>d0(this,void 0,void 0,function*(){yield sc(Rw.FAST_PICKS_RACE_DELAY),!c.isCancellationRequested&&(f||(g=u(h.picks,!0)))}))(),(()=>d0(this,void 0,void 0,function*(){e.busy=!0;try{const _=yield h.additionalPicks;if(c.isCancellationRequested)return;let b,v;zy(h.picks)?(b=h.picks.items,v=h.picks.active):b=h.picks;let C,w;if(zy(_)?(C=_.items,w=_.active):C=_,C.length>0||!g){let S;if(!v&&!w){const k=e.activeItems[0];k&&b.indexOf(k)!==-1&&(S=k)}u({items:[...b,...C],active:v||w||S})}}finally{c.isCancellationRequested||(e.busy=!1),f=!0}}))()])}else if(!(h instanceof Promise))u(h);else{e.busy=!0;try{const g=yield h;if(c.isCancellationRequested)return;u(g)}finally{c.isCancellationRequested||(e.busy=!1)}}});return n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),n.add(e.onDidTriggerItemButton(({button:l,item:c})=>d0(this,void 0,void 0,function*(){var d,h;if(typeof c.trigger=="function"){const u=(h=(d=c.buttons)===null||d===void 0?void 0:d.indexOf(l))!==null&&h!==void 0?h:-1;if(u>=0){const g=c.trigger(u,e.keyMods),f=typeof g=="number"?g:yield g;if(t.isCancellationRequested)return;switch(f){case Iu.NO_ACTION:break;case Iu.CLOSE_PICKER:e.hide();break;case Iu.REFRESH_PICKER:a();break;case Iu.REMOVE_ITEM:{const _=e.items.indexOf(c);if(_!==-1){const b=e.items.slice(),v=b.splice(_,1),C=e.activeItems.filter(S=>S!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}}))),n}}Rw.FAST_PICKS_RACE_DELAY=200;var k8=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nd=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},NO=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let e_=class z0 extends Rw{constructor(e,t,i,n,s,r){super(z0.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(hh)),this.options=e}_getPicks(e,t,i){return NO(this,void 0,void 0,function*(){const n=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const s=[];for(const c of n){const d=Wn(z0.WORD_FILTER(e,c.label)),h=c.commandAlias?Wn(z0.WORD_FILTER(e,c.commandAlias)):void 0;d||h?(c.highlights={label:d,detail:this.options.showAlias?h:void 0},s.push(c)):e===c.commandId&&s.push(c)}const r=new Map;for(const c of s){const d=r.get(c.label);d?(c.description=c.commandId,d.description=d.commandId):r.set(c.label,c)}s.sort((c,d)=>{const h=this.commandsHistory.peek(c.commandId),u=this.commandsHistory.peek(d.commandId);return h&&u?h>u?-1:1:h?-1:u?1:c.label.localeCompare(d.label)});const a=[];let l=!1;for(let c=0;cNO(this,void 0,void 0,function*(){this.commandsHistory.push(d.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"quick open"});try{yield this.commandService.executeCommand(d.commandId)}catch(g){ea(g)||this.dialogService.show(Bt.Error,p("canNotRun","Command '{0}' resulted in an error ({1})",d.label,D8(g)))}})}))}return a})}};e_.PREFIX=">";e_.WORD_FILTER=WE(x1,gZ,TF);e_=k8([nd(1,Ae),nd(2,_i),nd(3,ci),nd(4,sr),nd(5,b_)],e_);let hh=class Ii extends H{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Ii.getConfiguredCommandHistoryLength(this.configurationService),Ii.cache&&Ii.cache.limit!==this.configuredCommandsHistoryLength&&(Ii.cache.limit=this.configuredCommandsHistoryLength,Ii.saveState(this.storageService))}load(){const e=this.storageService.get(Ii.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=Ii.cache=new Dc(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}Ii.counter=this.storageService.getNumber(Ii.PREF_KEY_COUNTER,0,Ii.counter)}push(e){!Ii.cache||(Ii.cache.set(e,Ii.counter++),Ii.saveState(this.storageService))}peek(e){var t;return(t=Ii.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Ii.cache)return;const t={usesLRU:!0,entries:[]};Ii.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(Ii.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Ii.PREF_KEY_COUNTER,Ii.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const s=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof s=="number"?s:Ii.DEFAULT_COMMANDS_HISTORY_LENGTH}};hh.DEFAULT_COMMANDS_HISTORY_LENGTH=50;hh.PREF_KEY_CACHE="commandPalette.mru.cache";hh.PREF_KEY_COUNTER="commandPalette.mru.counter";hh.counter=1;hh=k8([nd(0,Do),nd(1,ot)],hh);class tue extends e_{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:KE(i.label)||i.id});return t}}var iue=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},nue=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let t_=class extends tue{constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}get activeTextEditorControl(){return Wn(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return nue(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};t_=iue([Qh(0,Ae),Qh(1,ct),Qh(2,_i),Qh(3,ci),Qh(4,sr),Qh(5,b_)],t_);class z_ extends ce{constructor(){super({id:z_.ID,label:Gv.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:N.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(dl).quickAccess.show(t_.PREFIX)}}z_.ID="editor.action.quickCommand";ie(z_);zt.as(yh.Quickaccess).registerQuickAccessProvider({ctor:t_,prefix:t_.PREFIX,helpEntries:[{description:Gv.quickCommandHelp,commandId:z_.ID}]});var sue=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let nI=class extends mc{constructor(e,t,i,n,s,r,a){super(!0,e,t,i,n,s,r,a)}};nI=sue([Xh(1,Ee),Xh(2,ct),Xh(3,di),Xh(4,Ae),Xh(5,Do),Xh(6,ot)],nI);tt(mc.ID,nI);class oue extends ce{constructor(){super({id:"editor.action.toggleHighContrast",label:$D.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Es),n=i.getColorTheme();cn(n.type)?(i.setTheme(this._originalThemeName||(Xp(n.type)?Ku:Ra)),this._originalThemeName=null):(i.setTheme(Xp(n.type)?Sd:yd),this._originalThemeName=n.themeName)}}ie(oue);const ffe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:m3,Emitter:_3,KeyCode:b3,KeyMod:v3,Position:C3,Range:w3,Selection:S3,SelectionDirection:y3,MarkerSeverity:L3,MarkerTag:D3,Uri:k3,Token:x3,editor:I3,languages:E3},Symbol.toStringTag,{value:"Module"}));export{ffe as e,D_ as m,j3 as t}; +//# sourceMappingURL=editor.main.1c8cebfc.js.map diff --git a/abstra_statics/dist/assets/executeJs.c3858a9c.js b/abstra_statics/dist/assets/executeJs.dfd1b55f.js similarity index 94% rename from abstra_statics/dist/assets/executeJs.c3858a9c.js rename to abstra_statics/dist/assets/executeJs.dfd1b55f.js index 75ecd76b22..bb0ba4cc59 100644 --- a/abstra_statics/dist/assets/executeJs.c3858a9c.js +++ b/abstra_statics/dist/assets/executeJs.dfd1b55f.js @@ -1,2 +1,2 @@ -import{P as PlayerNavbar}from"./PlayerNavbar.e3146994.js";import{g as getCname}from"./index.a2df0371.js";import{d as defineComponent,b as openBlock,c as createElementBlock,U as createTextVNode,z as unref,D as createCommentVNode,ai as createStaticVNode,q as _export_sfc,r as ref,t as createBlock,w as withCtx,x as createBaseVNode,O as pushScopeId,Q as popScopeId,a as resolveComponent,e as createVNode,F as Fragment,L as renderList,N as toDisplayString,aj as TransitionGroup,G as normalizeClass}from"./registerWidgets.ca6243ef.js";import{S as Steps}from"./WidgetsFrame.8af89817.js";import{M as Modal}from"./Modal.2f8d0c91.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="774fa820-995b-4887-b849-cc5da2862276",e._sentryDebugIdIdentifier="sentry-dbid-774fa820-995b-4887-b849-cc5da2862276")}catch{}})();const _hoisted_1$2=["href"],_hoisted_2$1=createStaticVNode('Abstra Cloud',2),_sfc_main$3=defineComponent({__name:"Watermark",props:{runtime:null,type:null},setup(e){const t=window.location.hostname.split(".")[0],a=!getCname();return(s,o)=>a?(openBlock(),createElementBlock("a",{key:0,href:`https://www.abstracloud.com/${e.type}?utm_source=abstra_pages&utm_medium=badge&utm_campaign=${e.runtime.id}&origin_subdomain=${unref(t)}`,target:"_blank",class:"watermark"},[createTextVNode(" Coded in Python with "),_hoisted_2$1],8,_hoisted_1$2)):createCommentVNode("",!0)}}),Watermark_vue_vue_type_style_index_0_scoped_f8a478c3_lang="",Watermark=_export_sfc(_sfc_main$3,[["__scopeId","data-v-f8a478c3"]]),_withScopeId=e=>(pushScopeId("data-v-54969e59"),e=e(),popScopeId(),e),_hoisted_1$1={class:"no-credits-message"},_hoisted_2={class:"image-container"},_hoisted_3={key:0,class:"no-credit-image",src:"https://abstra-cloud-assets.s3.amazonaws.com/no-credit.svg"},_hoisted_4=_withScopeId(()=>createBaseVNode("div",{class:"title"},"Insufficient credits to start this page",-1)),_hoisted_5=_withScopeId(()=>createBaseVNode("div",{class:"message"}," Please contact the creator for more information. ",-1)),_sfc_main$2=defineComponent({__name:"NoCreditsMessage",props:{runner:null},setup(e,{expose:t}){const a=ref(null),s={width:"380px",height:"unset",padding:"30px"},o={borderBottom:"none",color:"#D35249",fontSize:"20px",justifyContent:"flex-start",marginBottom:"17px"},i={color:"#414A58",fontSize:"14px"};return t({open:()=>{var r;(r=a.value)==null||r.open()}}),(r,c)=>(openBlock(),createBlock(Modal,{ref_key:"modalRef",ref:a,"container-style":s,"header-style":o,"content-style":i},{content:withCtx(()=>[createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2,[e.runner.logoUrl?(openBlock(),createElementBlock("img",_hoisted_3)):createCommentVNode("",!0)]),_hoisted_4,_hoisted_5])]),_:1},512))}}),NoCreditsMessage_vue_vue_type_style_index_0_scoped_54969e59_lang="",NoCreditsMessage=_export_sfc(_sfc_main$2,[["__scopeId","data-v-54969e59"]]),_hoisted_1={class:"alert"},_sfc_main$1=defineComponent({__name:"Alerts",props:{alerts:null},setup(e){return(t,a)=>{const s=resolveComponent("Message");return openBlock(),createElementBlock("div",_hoisted_1,[createVNode(TransitionGroup,{name:"p-message",tag:"div"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.alerts,o=>(openBlock(),createBlock(s,{key:o.id,severity:o.severity,closable:!1,sticky:!1},{default:withCtx(()=>[createTextVNode(toDisplayString(o.message),1)]),_:2},1032,["severity"]))),128))]),_:1})])}}}),Alerts_vue_vue_type_style_index_0_scoped_62dd7843_lang="",AlertsComponent=_export_sfc(_sfc_main$1,[["__scopeId","data-v-62dd7843"]]),_sfc_main=defineComponent({__name:"RuntimeCommons",props:{runtime:null,fullWidth:{type:Boolean},isPreview:{type:Boolean},type:null,forceResponsivity:null,userEmail:null,stepsInfo:null,alerts:null},emits:["navigate","logout"],setup(e,{expose:t,emit:a}){const s=ref(null),o=n=>a("navigate",n);return t({open:()=>{var n;return(n=s.value)==null?void 0:n.open()}}),(n,r)=>{var c;return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("header",null,[createVNode(PlayerNavbar,{runtime:e.runtime,"user-email":e.userEmail,"force-responsivity":e.forceResponsivity,onLogout:r[0]||(r[0]=l=>a("logout")),onNavigate:o},null,8,["runtime","user-email","force-responsivity"])]),e.type==="forms"?(openBlock(),createBlock(Steps,{key:0,class:"steps","steps-info":e.stepsInfo},null,8,["steps-info"])):createCommentVNode("",!0),createVNode(NoCreditsMessage,{ref_key:"noCreditsMessageModalRef",ref:s,class:normalizeClass({"full-width":e.fullWidth}),runner:e.runtime},null,8,["class","runner"]),e.isPreview?createCommentVNode("",!0):(openBlock(),createBlock(Watermark,{key:1,class:normalizeClass(["watermark",{"viewport-attached":!e.isPreview}]),runtime:e.runtime,type:e.type},null,8,["class","runtime","type"])),(c=e.alerts)!=null&&c.length?(openBlock(),createBlock(AlertsComponent,{key:2,class:"alerts",alerts:e.alerts},null,8,["alerts"])):createCommentVNode("",!0)],64)}}}),RuntimeCommons_vue_vue_type_style_index_0_scoped_3fc00cc0_lang="",RuntimeCommons=_export_sfc(_sfc_main,[["__scopeId","data-v-3fc00cc0"]]),executeCode=($context,code)=>{let evaluatedCode;try{evaluatedCode=eval(code)}catch(e){throw console.error(`[Error: execute_js]: ${e.message}, context: ${$context}`),e}return isSerializable(evaluatedCode)?evaluatedCode:null};async function executeJs(e){return executeCode(e.context,e.code)}const isSerializable=e=>{try{return JSON.stringify(e),!0}catch{return!1}};export{RuntimeCommons as R,executeJs as e}; -//# sourceMappingURL=executeJs.c3858a9c.js.map +import{P as PlayerNavbar}from"./PlayerNavbar.2a5ed820.js";import{g as getCname}from"./index.d40cd19f.js";import{d as defineComponent,b as openBlock,c as createElementBlock,U as createTextVNode,z as unref,D as createCommentVNode,ai as createStaticVNode,q as _export_sfc,r as ref,t as createBlock,w as withCtx,x as createBaseVNode,O as pushScopeId,Q as popScopeId,a as resolveComponent,e as createVNode,F as Fragment,L as renderList,N as toDisplayString,aj as TransitionGroup,G as normalizeClass}from"./registerWidgets.89616af0.js";import{S as Steps}from"./WidgetsFrame.2b06573d.js";import{M as Modal}from"./Modal.73e976a2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0123bfc4-53b3-4400-8315-73bdcfec3562",e._sentryDebugIdIdentifier="sentry-dbid-0123bfc4-53b3-4400-8315-73bdcfec3562")}catch{}})();const _hoisted_1$2=["href"],_hoisted_2$1=createStaticVNode('Abstra Cloud',2),_sfc_main$3=defineComponent({__name:"Watermark",props:{runtime:null,type:null},setup(e){const t=window.location.hostname.split(".")[0],a=!getCname();return(s,o)=>a?(openBlock(),createElementBlock("a",{key:0,href:`https://www.abstracloud.com/${e.type}?utm_source=abstra_pages&utm_medium=badge&utm_campaign=${e.runtime.id}&origin_subdomain=${unref(t)}`,target:"_blank",class:"watermark"},[createTextVNode(" Coded in Python with "),_hoisted_2$1],8,_hoisted_1$2)):createCommentVNode("",!0)}}),Watermark_vue_vue_type_style_index_0_scoped_f8a478c3_lang="",Watermark=_export_sfc(_sfc_main$3,[["__scopeId","data-v-f8a478c3"]]),_withScopeId=e=>(pushScopeId("data-v-54969e59"),e=e(),popScopeId(),e),_hoisted_1$1={class:"no-credits-message"},_hoisted_2={class:"image-container"},_hoisted_3={key:0,class:"no-credit-image",src:"https://abstra-cloud-assets.s3.amazonaws.com/no-credit.svg"},_hoisted_4=_withScopeId(()=>createBaseVNode("div",{class:"title"},"Insufficient credits to start this page",-1)),_hoisted_5=_withScopeId(()=>createBaseVNode("div",{class:"message"}," Please contact the creator for more information. ",-1)),_sfc_main$2=defineComponent({__name:"NoCreditsMessage",props:{runner:null},setup(e,{expose:t}){const a=ref(null),s={width:"380px",height:"unset",padding:"30px"},o={borderBottom:"none",color:"#D35249",fontSize:"20px",justifyContent:"flex-start",marginBottom:"17px"},i={color:"#414A58",fontSize:"14px"};return t({open:()=>{var r;(r=a.value)==null||r.open()}}),(r,c)=>(openBlock(),createBlock(Modal,{ref_key:"modalRef",ref:a,"container-style":s,"header-style":o,"content-style":i},{content:withCtx(()=>[createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2,[e.runner.logoUrl?(openBlock(),createElementBlock("img",_hoisted_3)):createCommentVNode("",!0)]),_hoisted_4,_hoisted_5])]),_:1},512))}}),NoCreditsMessage_vue_vue_type_style_index_0_scoped_54969e59_lang="",NoCreditsMessage=_export_sfc(_sfc_main$2,[["__scopeId","data-v-54969e59"]]),_hoisted_1={class:"alert"},_sfc_main$1=defineComponent({__name:"Alerts",props:{alerts:null},setup(e){return(t,a)=>{const s=resolveComponent("Message");return openBlock(),createElementBlock("div",_hoisted_1,[createVNode(TransitionGroup,{name:"p-message",tag:"div"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.alerts,o=>(openBlock(),createBlock(s,{key:o.id,severity:o.severity,closable:!1,sticky:!1},{default:withCtx(()=>[createTextVNode(toDisplayString(o.message),1)]),_:2},1032,["severity"]))),128))]),_:1})])}}}),Alerts_vue_vue_type_style_index_0_scoped_62dd7843_lang="",AlertsComponent=_export_sfc(_sfc_main$1,[["__scopeId","data-v-62dd7843"]]),_sfc_main=defineComponent({__name:"RuntimeCommons",props:{runtime:null,fullWidth:{type:Boolean},isPreview:{type:Boolean},type:null,forceResponsivity:null,userEmail:null,stepsInfo:null,alerts:null},emits:["navigate","logout"],setup(e,{expose:t,emit:a}){const s=ref(null),o=n=>a("navigate",n);return t({open:()=>{var n;return(n=s.value)==null?void 0:n.open()}}),(n,r)=>{var c;return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("header",null,[createVNode(PlayerNavbar,{runtime:e.runtime,"user-email":e.userEmail,"force-responsivity":e.forceResponsivity,onLogout:r[0]||(r[0]=l=>a("logout")),onNavigate:o},null,8,["runtime","user-email","force-responsivity"])]),e.type==="forms"?(openBlock(),createBlock(Steps,{key:0,class:"steps","steps-info":e.stepsInfo},null,8,["steps-info"])):createCommentVNode("",!0),createVNode(NoCreditsMessage,{ref_key:"noCreditsMessageModalRef",ref:s,class:normalizeClass({"full-width":e.fullWidth}),runner:e.runtime},null,8,["class","runner"]),e.isPreview?createCommentVNode("",!0):(openBlock(),createBlock(Watermark,{key:1,class:normalizeClass(["watermark",{"viewport-attached":!e.isPreview}]),runtime:e.runtime,type:e.type},null,8,["class","runtime","type"])),(c=e.alerts)!=null&&c.length?(openBlock(),createBlock(AlertsComponent,{key:2,class:"alerts",alerts:e.alerts},null,8,["alerts"])):createCommentVNode("",!0)],64)}}}),RuntimeCommons_vue_vue_type_style_index_0_scoped_3fc00cc0_lang="",RuntimeCommons=_export_sfc(_sfc_main,[["__scopeId","data-v-3fc00cc0"]]),executeCode=($context,code)=>{let evaluatedCode;try{evaluatedCode=eval(code)}catch(e){throw console.error(`[Error: execute_js]: ${e.message}, context: ${$context}`),e}return isSerializable(evaluatedCode)?evaluatedCode:null};async function executeJs(e){return executeCode(e.context,e.code)}const isSerializable=e=>{try{return JSON.stringify(e),!0}catch{return!1}};export{RuntimeCommons as R,executeJs as e}; +//# sourceMappingURL=executeJs.dfd1b55f.js.map diff --git a/abstra_statics/dist/assets/forms.38d7da0a.js b/abstra_statics/dist/assets/forms.59430d62.js similarity index 91% rename from abstra_statics/dist/assets/forms.38d7da0a.js rename to abstra_statics/dist/assets/forms.59430d62.js index 22db15b1e7..f666df7d78 100644 --- a/abstra_statics/dist/assets/forms.38d7da0a.js +++ b/abstra_statics/dist/assets/forms.59430d62.js @@ -1,2 +1,2 @@ -var i=Object.defineProperty;var n=(s,t,e)=>t in s?i(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>(n(s,typeof t!="symbol"?t+"":t,e),e);import{A as c}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="9acf91e5-81b2-4545-b2a5-59e61cf19bf4",s._sentryDebugIdIdentifier="sentry-dbid-9acf91e5-81b2-4545-b2a5-59e61cf19bf4")}catch{}})();class d{async list(){return await(await fetch("/_editor/api/forms")).json()}async create(){return await(await fetch("/_editor/api/forms",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(t){return await(await fetch(`/_editor/api/forms/${t}`)).json()}async update(t,e){return await(await fetch(`/_editor/api/forms/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async delete(t){await fetch(`/_editor/api/forms/${t}`,{method:"DELETE"})}async duplicate(t){return await(await fetch(`/_editor/api/forms/${t}/duplicate`,{method:"POST"})).json()}}const r=new d;class a{constructor(t){o(this,"record");this.record=c.create(r,t,"path")}static async list(){return(await r.list()).map(e=>new a(e))}static async create(){const t=await r.create();return new a(t)}static async get(t){const e=await r.get(t);return new a(e)}get allowRestart(){return this.record.get("allow_restart")}set allowRestart(t){this.record.set("allow_restart",t)}get file(){return this.record.get("file")}set file(t){this.record.set("file",t)}get autoStart(){return this.record.get("auto_start")}set autoStart(t){this.record.set("auto_start",t)}get endMessage(){return this.record.get("end_message")}set endMessage(t){this.record.set("end_message",t)}get errorMessage(){return this.record.get("error_message")}set errorMessage(t){this.record.set("error_message",t)}get path(){return this.record.get("path")}set path(t){this.record.set("path",t)}get restartButtonText(){return this.record.get("restart_button_text")}set restartButtonText(t){this.record.set("restart_button_text",t)}get startButtonText(){return this.record.get("start_button_text")}set startButtonText(t){this.record.set("start_button_text",t)}get startMessage(){return this.record.get("start_message")}set startMessage(t){this.record.set("start_message",t)}get timeoutMessage(){return this.record.get("timeout_message")}set timeoutMessage(t){this.record.set("timeout_message",t)}get(t){return this.record.get(t)}set(t,e){this.record.set(t,e)}get title(){return this.record.get("title")}set title(t){this.record.set("title",t)}get welcomeTitle(){return this.record.get("welcome_title")}set welcomeTitle(t){this.record.set("welcome_title",t)}async save(){await this.record.save()}onUpdate(t){this.record.pubsub.subscribe("update",t)}hasChanges(){return this.record.hasChanges()}async delete(){await r.delete(this.path)}async duplicate(){const t=await r.duplicate(this.path);return new a(t)}makeRunnerData(t){return{...t.makeRunnerData(),runtimeType:"form",id:this.path,isLocal:!0,path:this.path,allowRestart:this.allowRestart,autoStart:this.autoStart,endMessage:this.endMessage,errorMessage:this.errorMessage,restartButtonText:this.restartButtonText,startButtonText:this.startButtonText,startMessage:this.startMessage,timeoutMessage:this.timeoutMessage,title:this.title,welcomeTitle:this.welcomeTitle}}get routeName(){return"form"}}export{a as F}; -//# sourceMappingURL=forms.38d7da0a.js.map +var i=Object.defineProperty;var n=(s,t,e)=>t in s?i(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>(n(s,typeof t!="symbol"?t+"":t,e),e);import{A as c}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="4a382bba-d16a-40db-983d-f92cc2933294",s._sentryDebugIdIdentifier="sentry-dbid-4a382bba-d16a-40db-983d-f92cc2933294")}catch{}})();class d{async list(){return await(await fetch("/_editor/api/forms")).json()}async create(){return await(await fetch("/_editor/api/forms",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(t){return await(await fetch(`/_editor/api/forms/${t}`)).json()}async update(t,e){return await(await fetch(`/_editor/api/forms/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async delete(t){await fetch(`/_editor/api/forms/${t}`,{method:"DELETE"})}async duplicate(t){return await(await fetch(`/_editor/api/forms/${t}/duplicate`,{method:"POST"})).json()}}const r=new d;class a{constructor(t){o(this,"record");this.record=c.create(r,t,"path")}static async list(){return(await r.list()).map(e=>new a(e))}static async create(){const t=await r.create();return new a(t)}static async get(t){const e=await r.get(t);return new a(e)}get allowRestart(){return this.record.get("allow_restart")}set allowRestart(t){this.record.set("allow_restart",t)}get file(){return this.record.get("file")}set file(t){this.record.set("file",t)}get autoStart(){return this.record.get("auto_start")}set autoStart(t){this.record.set("auto_start",t)}get endMessage(){return this.record.get("end_message")}set endMessage(t){this.record.set("end_message",t)}get errorMessage(){return this.record.get("error_message")}set errorMessage(t){this.record.set("error_message",t)}get path(){return this.record.get("path")}set path(t){this.record.set("path",t)}get restartButtonText(){return this.record.get("restart_button_text")}set restartButtonText(t){this.record.set("restart_button_text",t)}get startButtonText(){return this.record.get("start_button_text")}set startButtonText(t){this.record.set("start_button_text",t)}get startMessage(){return this.record.get("start_message")}set startMessage(t){this.record.set("start_message",t)}get timeoutMessage(){return this.record.get("timeout_message")}set timeoutMessage(t){this.record.set("timeout_message",t)}get(t){return this.record.get(t)}set(t,e){this.record.set(t,e)}get title(){return this.record.get("title")}set title(t){this.record.set("title",t)}get welcomeTitle(){return this.record.get("welcome_title")}set welcomeTitle(t){this.record.set("welcome_title",t)}async save(){await this.record.save()}onUpdate(t){this.record.pubsub.subscribe("update",t)}hasChanges(){return this.record.hasChanges()}async delete(){await r.delete(this.path)}async duplicate(){const t=await r.duplicate(this.path);return new a(t)}makeRunnerData(t){return{...t.makeRunnerData(),runtimeType:"form",id:this.path,isLocal:!0,path:this.path,allowRestart:this.allowRestart,autoStart:this.autoStart,endMessage:this.endMessage,errorMessage:this.errorMessage,restartButtonText:this.restartButtonText,startButtonText:this.startButtonText,startMessage:this.startMessage,timeoutMessage:this.timeoutMessage,title:this.title,welcomeTitle:this.welcomeTitle}}get routeName(){return"form"}}export{a as F}; +//# sourceMappingURL=forms.59430d62.js.map diff --git a/abstra_statics/dist/assets/freemarker2.da17bfda.js b/abstra_statics/dist/assets/freemarker2.5ac535cb.js similarity index 98% rename from abstra_statics/dist/assets/freemarker2.da17bfda.js rename to abstra_statics/dist/assets/freemarker2.5ac535cb.js index 612f0a759f..94f9a39c44 100644 --- a/abstra_statics/dist/assets/freemarker2.da17bfda.js +++ b/abstra_statics/dist/assets/freemarker2.5ac535cb.js @@ -1,4 +1,4 @@ -import{m as b}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="e5b8148a-9b6e-43f3-a9aa-c2ccebce2338",t._sentryDebugIdIdentifier="sentry-dbid-e5b8148a-9b6e-43f3-a9aa-c2ccebce2338")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as b}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="f76fc803-5284-45bb-8bb3-43b2813c77b1",t._sentryDebugIdIdentifier="sentry-dbid-f76fc803-5284-45bb-8bb3-43b2813c77b1")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license @@ -6,4 +6,4 @@ import{m as b}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef. *-----------------------------------------------------------------------------*/var F=Object.defineProperty,x=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,v=Object.prototype.hasOwnProperty,g=(t,n,_,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of $(n))!v.call(t,o)&&o!==_&&F(t,o,{get:()=>n[o],enumerable:!(e=x(n,o))||e.enumerable});return t},E=(t,n,_)=>(g(t,n,"default"),_&&g(_,n,"default")),r={};E(r,b);var d=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],s=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},u={close:"\\]",id:"bracket",open:"\\["},D={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${s.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${s.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:r.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:r.languages.IndentAction.Indent}}]}}function A(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${s.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${s.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:r.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:r.languages.IndentAction.Indent}}]}}function i(t,n){const _=`_${t.id}_${n.id}`,e=c=>c.replace(/__id__/g,_),o=c=>{const f=c.source.replace(/__id__/g,_);return new RegExp(f,c.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function m(t){const n=i(a,t),_=i(u,t),e=i(D,t);return{...n,..._,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,..._.tokenizer,...e.tokenizer}}}var w={conf:l(a),language:i(a,k)},h={conf:l(u),language:i(u,k)},T={conf:l(a),language:i(a,p)},S={conf:l(u),language:i(u,p)},y={conf:A(),language:m(k)},P={conf:A(),language:m(p)};export{T as TagAngleInterpolationBracket,w as TagAngleInterpolationDollar,P as TagAutoInterpolationBracket,y as TagAutoInterpolationDollar,S as TagBracketInterpolationBracket,h as TagBracketInterpolationDollar}; -//# sourceMappingURL=freemarker2.da17bfda.js.map +//# sourceMappingURL=freemarker2.5ac535cb.js.map diff --git a/abstra_statics/dist/assets/gateway.0deebb85.js b/abstra_statics/dist/assets/gateway.0deebb85.js new file mode 100644 index 0000000000..e0a11357aa --- /dev/null +++ b/abstra_statics/dist/assets/gateway.0deebb85.js @@ -0,0 +1,2 @@ +import{t as i,p as r}from"./passwordlessManager.884221ca.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="67b3bd2d-572c-4d85-ada4-66bae524baea",t._sentryDebugIdIdentifier="sentry-dbid-67b3bd2d-572c-4d85-ada4-66bae524baea")}catch{}})();const n=i("cloud-api");class p{static async get(e){const o=await(await fetch(`${n}/console/${e}`,{headers:{...r.getUserHeaders("Author-Authorization")}})).text();return o?JSON.parse(o):null}static async post(e,s){const a=await(await fetch(`${n}/console/${e}`,{method:"POST",headers:{"Content-Type":"application/json",...r.getUserHeaders("Author-Authorization")},body:JSON.stringify(s)})).text();return a?JSON.parse(a):null}static async patch(e,s){const a=await(await fetch(`${n}/console/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json",...r.getUserHeaders("Author-Authorization")},body:JSON.stringify(s)})).text();return a?JSON.parse(a):null}static async delete(e){await fetch(`${n}/console/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json",...r.getUserHeaders("Author-Authorization")}})}}export{p as C}; +//# sourceMappingURL=gateway.0deebb85.js.map diff --git a/abstra_statics/dist/assets/gateway.fa3322de.js b/abstra_statics/dist/assets/gateway.fa3322de.js deleted file mode 100644 index 7e746a576b..0000000000 --- a/abstra_statics/dist/assets/gateway.fa3322de.js +++ /dev/null @@ -1,2 +0,0 @@ -import{t as i,p as a}from"./passwordlessManager.0ab78ba0.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="6f537afd-3ff7-4569-b431-5a6d653c9917",t._sentryDebugIdIdentifier="sentry-dbid-6f537afd-3ff7-4569-b431-5a6d653c9917")}catch{}})();const n=i("cloud-api");class f{static async get(e){const r=await(await fetch(`${n}/console/${e}`,{headers:{...a.getUserHeaders("Author-Authorization")}})).text();return r?JSON.parse(r):null}static async post(e,s){const o=await(await fetch(`${n}/console/${e}`,{method:"POST",headers:{"Content-Type":"application/json",...a.getUserHeaders("Author-Authorization")},body:JSON.stringify(s)})).text();return o?JSON.parse(o):null}static async patch(e,s){const o=await(await fetch(`${n}/console/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json",...a.getUserHeaders("Author-Authorization")},body:JSON.stringify(s)})).text();return o?JSON.parse(o):null}static async delete(e){await fetch(`${n}/console/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json",...a.getUserHeaders("Author-Authorization")}})}}export{f as C}; -//# sourceMappingURL=gateway.fa3322de.js.map diff --git a/abstra_statics/dist/assets/handlebars.8f21526b.js b/abstra_statics/dist/assets/handlebars.6e3dd22e.js similarity index 95% rename from abstra_statics/dist/assets/handlebars.8f21526b.js rename to abstra_statics/dist/assets/handlebars.6e3dd22e.js index d96105c7df..03728aecf2 100644 --- a/abstra_statics/dist/assets/handlebars.8f21526b.js +++ b/abstra_statics/dist/assets/handlebars.6e3dd22e.js @@ -1,7 +1,7 @@ -import{m as l}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f843054f-e33c-4f01-ab40-5f12b9da4433",t._sentryDebugIdIdentifier="sentry-dbid-f843054f-e33c-4f01-ab40-5f12b9da4433")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as l}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b8074fe4-3319-438f-9373-9eddd90e37af",t._sentryDebugIdIdentifier="sentry-dbid-b8074fe4-3319-438f-9373-9eddd90e37af")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var d=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,i=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!p.call(t,r)&&r!==n&&d(t,r,{get:()=>e[r],enumerable:!(o=s(e,r))||o.enumerable});return t},h=(t,e,n)=>(i(t,e,"default"),n&&i(n,e,"default")),a={};h(a,l);var m=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],y={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:a.languages.IndentAction.Indent}}]},k={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{y as conf,k as language}; -//# sourceMappingURL=handlebars.8f21526b.js.map +//# sourceMappingURL=handlebars.6e3dd22e.js.map diff --git a/abstra_statics/dist/assets/hooks.d7d78397.js b/abstra_statics/dist/assets/hooks.6e1e253e.js similarity index 82% rename from abstra_statics/dist/assets/hooks.d7d78397.js rename to abstra_statics/dist/assets/hooks.6e1e253e.js index 9dd334861a..36e39bcaec 100644 --- a/abstra_statics/dist/assets/hooks.d7d78397.js +++ b/abstra_statics/dist/assets/hooks.6e1e253e.js @@ -1,2 +1,2 @@ -var y=Object.defineProperty;var l=(a,t,e)=>t in a?y(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var o=(a,t,e)=>(l(a,typeof t!="symbol"?t+"":t,e),e);import{A as b}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="45bc9a2f-a421-42c6-881b-b34383e089e6",a._sentryDebugIdIdentifier="sentry-dbid-45bc9a2f-a421-42c6-881b-b34383e089e6")}catch{}})();class w{async list(){return await(await fetch("/_editor/api/hooks")).json()}async create(){return await(await fetch("/_editor/api/hooks",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(t){return await(await fetch(`/_editor/api/hooks/${t}`)).json()}async update(t,e){return await(await fetch(`/_editor/api/hooks/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async delete(t){await fetch(`/_editor/api/hooks/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async test(t,e){const n=new URLSearchParams(e.query),i=await fetch(`/_editor/api/hooks/${t}/test?${n.toString()}`,{method:e.method,headers:{"Content-Type":"application/json",...e.headers},body:e.method==="GET"?void 0:e.body}),{status:c,headers:d,body:h,stderr:p,stdout:u}=await i.json();return{status:c,headers:d,body:h,stderr:p,stdout:u}}}const s=new w;class r{constructor(t){o(this,"record");this.record=b.create(s,t,"path")}static async list(){return(await s.list()).map(e=>new r(e))}static async create(){const t=await s.create();return new r(t)}static async get(t){const e=await s.get(t);return new r(e)}async delete(){await s.delete(this.path)}async duplicate(){return this}disable(){return s.update(this.path,{enabled:!1})}enable(){return s.update(this.path,{enabled:!0})}async save(){await this.record.save(),console.log("save ",this.path)}onUpdate(t){this.record.pubsub.subscribe("update",t)}hasChanges(){return this.record.hasChanges()}get path(){return this.record.get("path")}set path(t){this.record.set("path",t)}get title(){return this.record.get("title")}get enabled(){return this.record.get("enabled")}get file(){return this.record.get("file")}set file(t){this.record.set("file",t)}async test(t){return s.test(this.path,t)}get routeName(){return"hooks"}}export{r as H}; -//# sourceMappingURL=hooks.d7d78397.js.map +var y=Object.defineProperty;var l=(a,t,e)=>t in a?y(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var o=(a,t,e)=>(l(a,typeof t!="symbol"?t+"":t,e),e);import{A as w}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="8e8bb5e7-8c8a-4ecc-88da-e84ec34996c9",a._sentryDebugIdIdentifier="sentry-dbid-8e8bb5e7-8c8a-4ecc-88da-e84ec34996c9")}catch{}})();class b{async list(){return await(await fetch("/_editor/api/hooks")).json()}async create(){return await(await fetch("/_editor/api/hooks",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(t){return await(await fetch(`/_editor/api/hooks/${t}`)).json()}async update(t,e){return await(await fetch(`/_editor/api/hooks/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async delete(t){await fetch(`/_editor/api/hooks/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async test(t,e){const n=new URLSearchParams(e.query),i=await fetch(`/_editor/api/hooks/${t}/test?${n.toString()}`,{method:e.method,headers:{"Content-Type":"application/json",...e.headers},body:e.method==="GET"?void 0:e.body}),{status:c,headers:d,body:h,stderr:p,stdout:u}=await i.json();return{status:c,headers:d,body:h,stderr:p,stdout:u}}}const s=new b;class r{constructor(t){o(this,"record");this.record=w.create(s,t,"path")}static async list(){return(await s.list()).map(e=>new r(e))}static async create(){const t=await s.create();return new r(t)}static async get(t){const e=await s.get(t);return new r(e)}async delete(){await s.delete(this.path)}async duplicate(){return this}disable(){return s.update(this.path,{enabled:!1})}enable(){return s.update(this.path,{enabled:!0})}async save(){await this.record.save(),console.log("save ",this.path)}onUpdate(t){this.record.pubsub.subscribe("update",t)}hasChanges(){return this.record.hasChanges()}get path(){return this.record.get("path")}set path(t){this.record.set("path",t)}get title(){return this.record.get("title")}get enabled(){return this.record.get("enabled")}get file(){return this.record.get("file")}set file(t){this.record.set("file",t)}async test(t){return s.test(this.path,t)}get routeName(){return"hooks"}}export{r as H}; +//# sourceMappingURL=hooks.6e1e253e.js.map diff --git a/abstra_statics/dist/assets/html.a026c447.js b/abstra_statics/dist/assets/html.7cbc54d4.js similarity index 94% rename from abstra_statics/dist/assets/html.a026c447.js rename to abstra_statics/dist/assets/html.7cbc54d4.js index b564f94ea4..74f68d71a0 100644 --- a/abstra_statics/dist/assets/html.a026c447.js +++ b/abstra_statics/dist/assets/html.7cbc54d4.js @@ -1,7 +1,7 @@ -import{m as s}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="2720528b-2409-41fd-91b1-ca2e6de3ff8f",t._sentryDebugIdIdentifier="sentry-dbid-2720528b-2409-41fd-91b1-ca2e6de3ff8f")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as s}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0df2ce8a-9a99-4459-8d35-bca72e3a0fb3",t._sentryDebugIdIdentifier="sentry-dbid-0df2ce8a-9a99-4459-8d35-bca72e3a0fb3")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of m(e))!c.call(t,n)&&n!==r&&p(t,n,{get:()=>e[n],enumerable:!(o=l(e,n))||o.enumerable});return t},u=(t,e,r)=>(a(t,e,"default"),r&&a(r,e,"default")),i={};u(i,s);var d=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],x={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${d.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:i.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${d.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},g={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{x as conf,g as language}; -//# sourceMappingURL=html.a026c447.js.map +//# sourceMappingURL=html.7cbc54d4.js.map diff --git a/abstra_statics/dist/assets/htmlMode.bf1c4c91.js b/abstra_statics/dist/assets/htmlMode.141d1da7.js similarity index 99% rename from abstra_statics/dist/assets/htmlMode.bf1c4c91.js rename to abstra_statics/dist/assets/htmlMode.141d1da7.js index dd7bbbb34e..6e3e3c7e0b 100644 --- a/abstra_statics/dist/assets/htmlMode.bf1c4c91.js +++ b/abstra_statics/dist/assets/htmlMode.141d1da7.js @@ -1,4 +1,4 @@ -var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var E=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78469c1a-b4ac-4131-96d1-03cbc249e50e",e._sentryDebugIdIdentifier="sentry-dbid-78469c1a-b4ac-4131-96d1-03cbc249e50e")}catch{}})();/*!----------------------------------------------------------------------------- +var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var E=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0b73877f-70c6-4d6e-b328-9fa8d57749be",e._sentryDebugIdIdentifier="sentry-dbid-0b73877f-70c6-4d6e-b328-9fa8d57749be")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license @@ -7,4 +7,4 @@ var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,config `,a==="\r"&&t+10&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets},e.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return k.create(0,n);for(;rn?t=a:r=a+1}var o=r-1;return k.create(o,n-i[o])},e.prototype.offsetAt=function(n){var i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;var r=i[n.line],t=n.line+1"u"}e.undefined=r;function t(f){return f===!0||f===!1}e.boolean=t;function a(f){return n.call(f)==="[object String]"}e.string=a;function o(f){return n.call(f)==="[object Number]"}e.number=o;function u(f,I,N){return n.call(f)==="[object Number]"&&I<=f&&f<=N}e.numberRange=u;function g(f){return n.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}e.integer=g;function d(f){return n.call(f)==="[object Number]"&&0<=f&&f<=2147483647}e.uinteger=d;function v(f){return n.call(f)==="[object Function]"}e.func=v;function w(f){return f!==null&&typeof f=="object"}e.objectLiteral=w;function b(f,I){return Array.isArray(f)&&f.every(I)}e.typedArray=b})(s||(s={}));var mt=class{constructor(e,n,i){E(this,"_disposables",[]);E(this,"_listener",Object.create(null));this._languageId=e,this._worker=n;const r=a=>{let o=a.getLanguageId();if(o!==this._languageId)return;let u;this._listener[a.uri.toString()]=a.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(a.uri,o),500)}),this._doValidate(a.uri,o)},t=a=>{c.editor.setModelMarkers(a,this._languageId,[]);let o=a.uri.toString(),u=this._listener[o];u&&(u.dispose(),delete this._listener[o])};this._disposables.push(c.editor.onDidCreateModel(r)),this._disposables.push(c.editor.onWillDisposeModel(t)),this._disposables.push(c.editor.onDidChangeModelLanguage(a=>{t(a.model),r(a.model)})),this._disposables.push(i(a=>{c.editor.getModels().forEach(o=>{o.getLanguageId()===this._languageId&&(t(o),r(o))})})),this._disposables.push({dispose:()=>{c.editor.getModels().forEach(t);for(let a in this._listener)this._listener[a].dispose()}}),c.editor.getModels().forEach(r)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,n){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{const r=i.map(a=>nt(e,a));let t=c.editor.getModel(e);t&&t.getLanguageId()===n&&c.editor.setModelMarkers(t,n,r)}).then(void 0,i=>{console.error(i)})}};function rt(e){switch(e){case A.Error:return c.MarkerSeverity.Error;case A.Warning:return c.MarkerSeverity.Warning;case A.Information:return c.MarkerSeverity.Info;case A.Hint:return c.MarkerSeverity.Hint;default:return c.MarkerSeverity.Info}}function nt(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:rt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}var it=class{constructor(e,n){this._worker=e,this._triggerCharacters=n}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.doComplete(t.toString(),C(n))).then(a=>{if(!a)return;const o=e.getWordUntilPosition(n),u=new c.Range(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn),g=a.items.map(d=>{const v={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:st(d.command),range:u,kind:ot(d.kind)};return d.textEdit&&(at(d.textEdit)?v.range={insert:_(d.textEdit.insert),replace:_(d.textEdit.replace)}:v.range=_(d.textEdit.range),v.insertText=d.textEdit.newText),d.additionalTextEdits&&(v.additionalTextEdits=d.additionalTextEdits.map(j)),d.insertTextFormat===G.Snippet&&(v.insertTextRules=c.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:a.isIncomplete,suggestions:g}})}};function C(e){if(!!e)return{character:e.column-1,line:e.lineNumber-1}}function Se(e){if(!!e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function _(e){if(!!e)return new c.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function at(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function ot(e){const n=c.languages.CompletionItemKind;switch(e){case l.Text:return n.Text;case l.Method:return n.Method;case l.Function:return n.Function;case l.Constructor:return n.Constructor;case l.Field:return n.Field;case l.Variable:return n.Variable;case l.Class:return n.Class;case l.Interface:return n.Interface;case l.Module:return n.Module;case l.Property:return n.Property;case l.Unit:return n.Unit;case l.Value:return n.Value;case l.Enum:return n.Enum;case l.Keyword:return n.Keyword;case l.Snippet:return n.Snippet;case l.Color:return n.Color;case l.File:return n.File;case l.Reference:return n.Reference}return n.Property}function j(e){if(!!e)return{range:_(e.range),text:e.newText}}function st(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Te=class{constructor(e){this._worker=e}provideHover(e,n,i){let r=e.uri;return this._worker(r).then(t=>t.doHover(r.toString(),C(n))).then(t=>{if(!!t)return{range:_(t.range),contents:ct(t.contents)}})}};function ut(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Re(e){return typeof e=="string"?{value:e}:ut(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function ct(e){if(!!e)return Array.isArray(e)?e.map(Re):[Re(e)]}var Fe=class{constructor(e){this._worker=e}provideDocumentHighlights(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDocumentHighlights(r.toString(),C(n))).then(t=>{if(!!t)return t.map(a=>({range:_(a.range),kind:dt(a.kind)}))})}};function dt(e){switch(e){case D.Read:return c.languages.DocumentHighlightKind.Read;case D.Write:return c.languages.DocumentHighlightKind.Write;case D.Text:return c.languages.DocumentHighlightKind.Text}return c.languages.DocumentHighlightKind.Text}var _t=class{constructor(e){this._worker=e}provideDefinition(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDefinition(r.toString(),C(n))).then(t=>{if(!!t)return[Le(t)]})}};function Le(e){return{uri:c.Uri.parse(e.uri),range:_(e.range)}}var wt=class{constructor(e){this._worker=e}provideReferences(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.findReferences(t.toString(),C(n))).then(a=>{if(!!a)return a.map(Le)})}},je=class{constructor(e){this._worker=e}provideRenameEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.doRename(t.toString(),C(n),i)).then(a=>ft(a))}};function ft(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=c.Uri.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:_(t.range),text:t.newText}})}return{edits:n}}var Ne=class{constructor(e){this._worker=e}provideDocumentSymbols(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentSymbols(i.toString())).then(r=>{if(!!r)return r.map(t=>({name:t.name,detail:"",containerName:t.containerName,kind:gt(t.kind),range:_(t.location.range),selectionRange:_(t.location.range),tags:[]}))})}};function gt(e){let n=c.languages.SymbolKind;switch(e){case h.File:return n.Array;case h.Module:return n.Module;case h.Namespace:return n.Namespace;case h.Package:return n.Package;case h.Class:return n.Class;case h.Method:return n.Method;case h.Property:return n.Property;case h.Field:return n.Field;case h.Constructor:return n.Constructor;case h.Enum:return n.Enum;case h.Interface:return n.Interface;case h.Function:return n.Function;case h.Variable:return n.Variable;case h.Constant:return n.Constant;case h.String:return n.String;case h.Number:return n.Number;case h.Boolean:return n.Boolean;case h.Array:return n.Array}return n.Function}var We=class{constructor(e){this._worker=e}provideLinks(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentLinks(i.toString())).then(r=>{if(!!r)return{links:r.map(t=>({range:_(t.range),url:t.target}))}})}},He=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.format(r.toString(),null,Oe(n)).then(a=>{if(!(!a||a.length===0))return a.map(j)}))}},Ue=class{constructor(e){this._worker=e}provideDocumentRangeFormattingEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.format(t.toString(),Se(n),Oe(i)).then(o=>{if(!(!o||o.length===0))return o.map(j)}))}};function Oe(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var kt=class{constructor(e){this._worker=e}provideDocumentColors(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentColors(i.toString())).then(r=>{if(!!r)return r.map(t=>({color:t.color,range:_(t.range)}))})}provideColorPresentations(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getColorPresentations(r.toString(),n.color,Se(n.range))).then(t=>{if(!!t)return t.map(a=>{let o={label:a.label};return a.textEdit&&(o.textEdit=j(a.textEdit)),a.additionalTextEdits&&(o.additionalTextEdits=a.additionalTextEdits.map(j)),o})})}},Ve=class{constructor(e){this._worker=e}provideFoldingRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getFoldingRanges(r.toString(),n)).then(t=>{if(!!t)return t.map(a=>{const o={start:a.startLine+1,end:a.endLine+1};return typeof a.kind<"u"&&(o.kind=lt(a.kind)),o})})}};function lt(e){switch(e){case R.Comment:return c.languages.FoldingRangeKind.Comment;case R.Imports:return c.languages.FoldingRangeKind.Imports;case R.Region:return c.languages.FoldingRangeKind.Region}}var ze=class{constructor(e){this._worker=e}provideSelectionRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getSelectionRanges(r.toString(),n.map(C))).then(t=>{if(!!t)return t.map(a=>{const o=[];for(;a;)o.push({range:_(a.range)}),a=a.parent;return o})})}},Xe=class extends it{constructor(e){super(e,[".",":","<",'"',"=","/"])}};function bt(e){const n=new Me(e),i=(...t)=>n.getLanguageServiceWorker(...t);let r=e.languageId;c.languages.registerCompletionItemProvider(r,new Xe(i)),c.languages.registerHoverProvider(r,new Te(i)),c.languages.registerDocumentHighlightProvider(r,new Fe(i)),c.languages.registerLinkProvider(r,new We(i)),c.languages.registerFoldingRangeProvider(r,new Ve(i)),c.languages.registerDocumentSymbolProvider(r,new Ne(i)),c.languages.registerSelectionRangeProvider(r,new ze(i)),c.languages.registerRenameProvider(r,new je(i)),r==="html"&&(c.languages.registerDocumentFormattingEditProvider(r,new He(i)),c.languages.registerDocumentRangeFormattingEditProvider(r,new Ue(i)))}function Et(e){const n=[],i=[],r=new Me(e);n.push(r);const t=(...o)=>r.getLanguageServiceWorker(...o);function a(){const{languageId:o,modeConfiguration:u}=e;Be(i),u.completionItems&&i.push(c.languages.registerCompletionItemProvider(o,new Xe(t))),u.hovers&&i.push(c.languages.registerHoverProvider(o,new Te(t))),u.documentHighlights&&i.push(c.languages.registerDocumentHighlightProvider(o,new Fe(t))),u.links&&i.push(c.languages.registerLinkProvider(o,new We(t))),u.documentSymbols&&i.push(c.languages.registerDocumentSymbolProvider(o,new Ne(t))),u.rename&&i.push(c.languages.registerRenameProvider(o,new je(t))),u.foldingRanges&&i.push(c.languages.registerFoldingRangeProvider(o,new Ve(t))),u.selectionRanges&&i.push(c.languages.registerSelectionRangeProvider(o,new ze(t))),u.documentFormattingEdits&&i.push(c.languages.registerDocumentFormattingEditProvider(o,new He(t))),u.documentRangeFormattingEdits&&i.push(c.languages.registerDocumentRangeFormattingEditProvider(o,new Ue(t)))}return a(),n.push(De(i)),De(n)}function De(e){return{dispose:()=>Be(e)}}function Be(e){for(;e.length;)e.pop().dispose()}export{it as CompletionAdapter,_t as DefinitionAdapter,mt as DiagnosticsAdapter,kt as DocumentColorAdapter,He as DocumentFormattingEditProvider,Fe as DocumentHighlightAdapter,We as DocumentLinkAdapter,Ue as DocumentRangeFormattingEditProvider,Ne as DocumentSymbolAdapter,Ve as FoldingRangeAdapter,Te as HoverAdapter,wt as ReferenceAdapter,je as RenameAdapter,ze as SelectionRangeAdapter,Me as WorkerManager,C as fromPosition,Se as fromRange,Et as setupMode,bt as setupMode1,_ as toRange,j as toTextEdit}; -//# sourceMappingURL=htmlMode.bf1c4c91.js.map +//# sourceMappingURL=htmlMode.141d1da7.js.map diff --git a/abstra_statics/dist/assets/icons.11151937.js b/abstra_statics/dist/assets/icons.9cfdae6d.js similarity index 97% rename from abstra_statics/dist/assets/icons.11151937.js rename to abstra_statics/dist/assets/icons.9cfdae6d.js index 62b597ff4b..2a0f676e0e 100644 --- a/abstra_statics/dist/assets/icons.11151937.js +++ b/abstra_statics/dist/assets/icons.9cfdae6d.js @@ -1,2 +1,2 @@ -import"./registerWidgets.ca6243ef.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},L=new Error().stack;L&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[L]="3f476fb7-9234-4a5a-b05d-a2c414a57f8e",C._sentryDebugIdIdentifier="sentry-dbid-3f476fb7-9234-4a5a-b05d-a2c414a57f8e")}catch{}})();const M="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",Z="M6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM8 9H16V19H8V9ZM15.5 4L14.5 3H9.5L8.5 4H5V6H19V4H15.5Z",s="M18.15 7.23525C16.7 5.78525 14.71 4.88525 12.5 4.88525C8.08001 4.88525 4.51001 8.46525 4.51001 12.8853C4.51001 17.3053 8.08001 20.8853 12.5 20.8853C16.23 20.8853 19.34 18.3353 20.23 14.8853H18.15C17.33 17.2153 15.11 18.8853 12.5 18.8853C9.19001 18.8853 6.50001 16.1953 6.50001 12.8853C6.50001 9.57525 9.19001 6.88525 12.5 6.88525C14.16 6.88525 15.64 7.57525 16.72 8.66525L13.5 11.8853H20.5V4.88525L18.15 7.23525Z",n="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",o="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",c="M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",e="M11.8484 17.098C11.8664 17.1211 11.8894 17.1398 11.9157 17.1526C11.9419 17.1655 11.9708 17.1721 12 17.1721C12.0292 17.1721 12.0581 17.1655 12.0843 17.1526C12.1106 17.1398 12.1336 17.1211 12.1516 17.098L14.8468 13.6763C14.9455 13.5507 14.8564 13.3648 14.6952 13.3648H12.912V5.19318C12.912 5.08693 12.8254 5 12.7195 5H11.2757C11.1698 5 11.0832 5.08693 11.0832 5.19318V13.3624H9.30481C9.14358 13.3624 9.05455 13.5483 9.15321 13.6739L11.8484 17.098ZM20.8075 15.2528H19.3636C19.2578 15.2528 19.1711 15.3398 19.1711 15.446V19.1648H4.82888V15.446C4.82888 15.3398 4.74225 15.2528 4.63636 15.2528H3.19251C3.08663 15.2528 3 15.3398 3 15.446V20.2273C3 20.6547 3.34412 21 3.77005 21H20.2299C20.6559 21 21 20.6547 21 20.2273V15.446C21 15.3398 20.9134 15.2528 20.8075 15.2528Z",t="M10.4122 15.9425L14.9037 12.2121C14.9338 12.1869 14.958 12.1549 14.9747 12.1184C14.9913 12.0819 15 12.0419 15 12.0014C15 11.9609 14.9913 11.9209 14.9747 11.8845C14.958 11.848 14.9338 11.8159 14.9037 11.7908L10.4122 8.058C10.2455 7.91993 10 8.04372 10 8.2675V15.7306C10 15.9544 10.2455 16.0805 10.4122 15.9425Z M20.28 3H3.72C3.32175 3 3 3.32175 3 3.72V20.28C3 20.6783 3.32175 21 3.72 21H20.28C20.6783 21 21 20.6783 21 20.28V3.72C21 3.32175 20.6783 3 20.28 3ZM19.38 19.38H4.62V4.62H19.38V19.38Z",a="M12.1373 17.7157C12.1373 17.8719 12.2539 17.9997 12.3946 17.9997H18.7426C18.8833 17.9997 19 17.8719 19 17.7157V16.0116C19 15.8553 18.8833 15.7275 18.7426 15.7275H12.3946C12.2539 15.7275 12.1373 15.8553 12.1373 16.0116V17.7157ZM5.44951 17.9323L12.0377 12.2163C12.1681 12.1027 12.1681 11.8932 12.0377 11.7796L5.44951 6.06723C5.40974 6.03224 5.3611 6.00979 5.30936 6.00255C5.25763 5.99531 5.20497 6.00358 5.15764 6.02638C5.11031 6.04918 5.0703 6.08556 5.04236 6.13119C5.01442 6.17681 4.99972 6.22978 5 6.2838V8.50982C5 8.59503 5.03432 8.67313 5.09951 8.72639L8.86716 11.9997L5.09951 15.2731C5.06884 15.2997 5.04407 15.3328 5.0269 15.3701C5.00973 15.4075 5.00055 15.4483 5 15.4897V17.7157C5 17.9571 5.27108 18.0885 5.44951 17.9323Z",l="M15 18H3V16H15V18ZM21 13H3V11H21V13ZM15 8H3V6H15V8Z",d="M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z",r="M18.7375 11.0838C18.1142 8.06508 15.3367 5.79883 12 5.79883C9.35083 5.79883 7.05 7.23383 5.90417 9.33383C3.145 9.61383 1 11.8451 1 14.5488C1 17.4451 3.46583 19.7988 6.5 19.7988H18.4167C20.9467 19.7988 23 17.8388 23 15.4238C23 13.1138 21.1208 11.2413 18.7375 11.0838ZM18.4167 18.0488H6.5C4.47417 18.0488 2.83333 16.4826 2.83333 14.5488C2.83333 12.7551 4.23583 11.2588 6.09667 11.0751L7.0775 10.9788L7.53583 10.1476C8.40667 8.54633 10.1117 7.54883 12 7.54883C14.4017 7.54883 16.4733 9.17633 16.9408 11.4251L17.2158 12.7376L18.6183 12.8338C20.0483 12.9213 21.1667 14.0676 21.1667 15.4238C21.1667 16.8676 19.9292 18.0488 18.4167 18.0488ZM8.33333 13.6738H10.6708V16.2988H13.3292V13.6738H15.6667L12 10.1738L8.33333 13.6738Z",i="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",A="M12 22C6.49 22 2 17.51 2 12C2 6.49 6.49 2 12 2C17.51 2 22 6.04 22 11C22 14.31 19.31 17 16 17H14.23C13.95 17 13.73 17.22 13.73 17.5C13.73 17.62 13.78 17.73 13.86 17.83C14.27 18.3 14.5 18.89 14.5 19.5C14.5 20.88 13.38 22 12 22ZM12 4C7.59 4 4 7.59 4 12C4 16.41 7.59 20 12 20C12.28 20 12.5 19.78 12.5 19.5C12.5 19.34 12.42 19.22 12.36 19.15C11.95 18.69 11.73 18.1 11.73 17.5C11.73 16.12 12.85 15 14.23 15H16C18.21 15 20 13.21 20 11C20 7.14 16.41 4 12 4Z M6.5 13C7.32843 13 8 12.3284 8 11.5C8 10.6716 7.32843 10 6.5 10C5.67157 10 5 10.6716 5 11.5C5 12.3284 5.67157 13 6.5 13Z M9.5 9C10.3284 9 11 8.32843 11 7.5C11 6.67157 10.3284 6 9.5 6C8.67157 6 8 6.67157 8 7.5C8 8.32843 8.67157 9 9.5 9Z M14.5 9C15.3284 9 16 8.32843 16 7.5C16 6.67157 15.3284 6 14.5 6C13.6716 6 13 6.67157 13 7.5C13 8.32843 13.6716 9 14.5 9Z M17.5 13C18.3284 13 19 12.3284 19 11.5C19 10.6716 18.3284 10 17.5 10C16.6716 10 16 10.6716 16 11.5C16 12.3284 16.6716 13 17.5 13Z",f="M21 11.11V5C21 3.9 20.11 3 19 3H14.82C14.4 1.84 13.3 1 12 1S9.6 1.84 9.18 3H5C3.9 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H11.11C12.37 22.24 14.09 23 16 23C19.87 23 23 19.87 23 16C23 14.09 22.24 12.37 21 11.11M12 3C12.55 3 13 3.45 13 4S12.55 5 12 5 11 4.55 11 4 11.45 3 12 3M5 19V5H7V7H17V5H19V9.68C18.09 9.25 17.08 9 16 9H7V11H11.1C10.5 11.57 10.04 12.25 9.68 13H7V15H9.08C9.03 15.33 9 15.66 9 16C9 17.08 9.25 18.09 9.68 19H5M16 21C13.24 21 11 18.76 11 16S13.24 11 16 11 21 13.24 21 16 18.76 21 16 21M16.5 16.25L19.36 17.94L18.61 19.16L15 17V12H16.5V16.25Z",u="M12.0125 2C11.0798 2 10.1926 2.18775 9.32834 2.56324C5.75685 4.06509 4.05085 8.31251 5.52933 11.9967C6.62119 14.7189 9.16906 16.4788 12.0125 16.4788C12.9452 16.4788 13.8323 16.2911 14.6966 15.9156C18.2681 14.3904 19.9741 10.1663 18.4956 6.45862C17.4036 3.7599 14.8559 2 12.0125 2ZM6.43928 11.1988C6.00704 9.93174 6.00704 8.57065 6.43928 7.27995H7.94068C7.82691 7.91359 7.75868 8.59403 7.75868 9.22766C7.75868 9.83775 7.82691 10.4948 7.98622 11.1754L6.43929 11.1752L6.43928 11.1988ZM8.89605 9.22754C8.89605 8.54709 8.96428 7.88987 9.10074 7.27982H11.4438V11.1987L9.14628 11.1989C8.98697 10.5417 8.89605 9.86117 8.89605 9.22754ZM12.5812 3.47826C13.3774 3.80678 14.1053 4.81593 14.583 6.10646H12.5812V3.47826ZM11.4438 3.47826V6.10646H9.44191C9.9197 4.81593 10.6475 3.80679 11.4438 3.47826ZM11.4438 12.372V14.9768C10.6931 14.6249 9.9879 13.5923 9.51012 12.372H11.4438ZM12.5812 14.9768V12.372H14.5148C14.037 13.5922 13.3319 14.6247 12.5812 14.9768ZM12.5812 11.1987V7.2797H14.9242C15.0606 7.91333 15.1289 8.57039 15.1289 9.22741C15.1289 9.86105 15.0379 10.5181 14.8786 11.1751H12.5811L12.5812 11.1987ZM16.0842 7.2797H17.5856C18.0179 8.59378 17.995 9.95487 17.5856 11.1986H16.0389C16.1982 10.5182 16.2664 9.83754 16.2664 9.25088C16.2662 8.59399 16.198 7.91333 16.0842 7.2797ZM17.0625 6.10638H15.7886C15.5384 5.26158 15.1744 4.48715 14.7195 3.85351C15.6749 4.36994 16.4938 5.14438 17.0625 6.10638ZM9.30547 3.85368C8.87322 4.48732 8.50921 5.26175 8.23632 6.10654H6.98515C7.53114 5.14438 8.32739 4.36998 9.30547 3.85368ZM6.96244 12.372H8.30452C8.60029 13.2402 8.987 14.0616 9.48745 14.7421C8.46384 14.2258 7.57667 13.4044 6.96244 12.372ZM14.5375 14.7186C15.0152 14.0382 15.4246 13.2168 15.6976 12.372H17.0396C16.4711 13.3576 15.6067 14.2024 14.5375 14.7186ZM5.09509 22C5.70932 22 6.30072 21.7184 6.71027 21.2256C6.89227 20.9908 7.02873 20.7327 7.11965 20.4277H10.0106C10.2609 21.3429 11.0571 22 12.0125 22C12.9679 22 13.7641 21.3429 14.0143 20.4277H16.9054C17.1556 21.3429 17.9518 22 18.9072 22C20.0673 22 21 21.0378 21 19.8411C21 18.6443 20.0673 17.6822 18.9072 17.6822C17.9518 17.6822 17.1556 18.3392 16.9054 19.2544L14.0143 19.2543C13.8097 18.5268 13.2637 17.9636 12.5812 17.7758V17.2619C12.5812 16.9333 12.331 16.6752 12.0125 16.6752C11.694 16.6752 11.4438 16.9333 11.4438 17.2619V17.7758C10.7387 17.987 10.1926 18.5502 10.0106 19.2543H7.0969C6.8922 18.4799 6.25527 17.8698 5.50459 17.729C4.75391 17.5883 3.98049 17.8698 3.48004 18.48C3.07066 18.9729 2.91134 19.6299 3.04779 20.2634C3.2071 21.1082 3.86671 21.8123 4.68563 21.953C4.82209 22 4.95864 22 5.09509 22ZM18.9298 18.8553C19.453 18.8553 19.8852 19.3012 19.8852 19.8409C19.8852 20.3806 19.453 20.8265 18.9298 20.8265C18.4294 20.8265 18.02 20.4276 17.9744 19.9113V19.8409V19.7705C18.02 19.2778 18.4293 18.8553 18.9298 18.8553ZM12.0125 18.8553C12.5356 18.8553 12.9679 19.3012 12.9679 19.8409C12.9679 20.3806 12.5356 20.8265 12.0125 20.8265C11.4893 20.8265 11.057 20.3806 11.057 19.8409C11.057 19.3012 11.4893 18.8553 12.0125 18.8553ZM4.16243 20.0522C4.11689 19.7471 4.18512 19.4655 4.36712 19.2308C4.54913 18.9961 4.82204 18.8789 5.09513 18.8789C5.16337 18.8789 5.2316 18.8789 5.27714 18.9023C5.64114 18.9727 5.95961 19.2778 6.02782 19.6767C6.07336 19.9818 6.00512 20.2633 5.82312 20.4981C5.59558 20.7796 5.25443 20.897 4.89042 20.8266C4.52642 20.7326 4.23067 20.4275 4.16243 20.0522Z",b="m 14.6454,15.0573 2.5899,-2.3906 H 7 V 11.3333 H 17.2353 L 14.6454,8.94267 15.6667,8 20,12 15.6667,16 Z M 5.375,22 h 8.25 c 0.3646,-4e-4 0.7141,-0.151 0.9719,-0.4188 0.2578,-0.2679 0.4027,-0.631 0.4031,-1.0098 v -2.1428 h -1.375 v 2.1428 H 5.375 V 3.42857 h 8.25 V 5.57143 H 15 V 3.42857 C 14.9996,3.04981 14.8547,2.68666 14.5969,2.41884 14.3391,2.15101 13.9896,2.00038 13.625,2 H 5.375 C 5.01044,2.00038 4.66091,2.15101 4.40313,2.41884 4.14535,2.68666 4.00036,3.04981 4,3.42857 V 20.5714 c 3.6e-4,0.3788 0.14535,0.7419 0.40313,1.0098 C 4.66091,21.849 5.01044,21.9996 5.375,22 Z",h="m 20.348814,20.43092 c 2.2301,-2.2386 3.4802,-5.2708 3.4759,-8.4304 -0.0024,-0.1951 -0.0815,-0.3813 -0.2202,-0.5184 -0.1388,-0.1371 -0.3259,-0.2139 -0.5209,-0.2139 -0.1952,0 -0.3823,0.0768 -0.5211,0.2139 -0.1388,0.1371 -0.2178,0.3233 -0.2202,0.5184 0.0031,2.769 -1.093,5.4261 -3.0475,7.3876 -0.9488,0.9741 -2.0832,1.7483 -3.3361,2.277 -1.2529,0.5286 -2.599,0.801 -3.9588,0.801 -1.3599,0 -2.7059994,-0.2724 -3.9588994,-0.801 -1.2528999,-0.5287 -2.3871999,-1.3029 -3.3360399,-2.277 -1.9519,-1.9634 -3.0475,-4.6195 -3.0475,-7.3881 0,-2.7686005 1.0956,-5.4247 3.0475,-7.38813 0.94334,-0.96663 2.06914,-1.73639 3.3121399,-2.26465 1.2431,-0.52825 2.5785994,-0.8045 3.9291994,-0.81272 0.2884,0.00903 0.5618,0.13038 0.762,0.33815 0.2003,0.20776 0.3113,0.48553 0.3096,0.77404 -0.0016,0.28852 -0.1159,0.56496 -0.3185,0.7704 -0.2026,0.20543 -0.4775,0.32357 -0.7659,0.32925 -0.0268,6e-5 -0.0535,0.00154 -0.08,0.00444 -2.0547994,0.06617 -4.0044994,0.92415 -5.4413993,2.39452 -1.5175,1.5276 -2.36911,3.5933995 -2.36911,5.7466 0,2.1532 0.85161,4.2189 2.36911,5.7465 0.7414,0.7594 1.6270999,1.3629 2.6050999,1.7749 0.978,0.412 2.0285994,0.6242 3.0897994,0.6242 1.0612,0 2.1117,-0.2122 3.0898,-0.6242 0.9779,-0.412 1.8636,-1.0155 2.605,-1.7749 1.5198,-1.526 2.3718,-3.5928 2.3688,-5.7465 0.0031,-0.3392 -0.061,-0.6759 -0.1887,-0.9902 -0.1277,-0.3143 -0.3163,-0.6002 -0.5552,-0.8412 -0.2388,-0.2410005 -0.5229,-0.4323005 -0.8361,-0.5628005 -0.3131,-0.1306 -0.649,-0.1978 -0.9883,-0.1978 -0.3393,0 -0.6751,0.0672 -0.9883,0.1978 -0.3131,0.1305 -0.5972,0.3218 -0.8361,0.5628005 -0.2388,0.241 -0.4274,0.5269 -0.5552,0.8412 -0.1276,0.3143 -0.1917,0.651 -0.1886,0.9902 0,0.0216 0.0014,0.0419 0.0031,0.0627 -0.0017,0.0208 -0.0031,0.0415 -0.0031,0.0627 0.0049,0.5915 -0.1662,1.171 -0.4913,1.6652 -0.325,0.4941 -0.7896,0.8805 -1.3346,1.1102 -0.5451,0.2296 -1.1461,0.2923 -1.7268,0.1799 -0.5807,-0.1125 -1.1149,-0.3948 -1.5347994,-0.8114 -0.42,-0.4165 -0.7067,-0.9483 -0.8239,-1.5281 -0.1172,-0.5798 -0.0595,-1.1813 0.1657,-1.7281 0.2252,-0.547 0.6079,-1.0147005 1.0992994,-1.3438005 0.4915,-0.3291 1.0696,-0.5048 1.6611,-0.5049 0.0981,0.0012 0.1954,-0.0171 0.2864,-0.0538 0.0909,-0.0367 0.1737,-0.0911 0.2435,-0.1601 0.0697,-0.0689 0.1252,-0.151 0.163,-0.2415 0.0378,-0.0905 0.0573,-0.1877 0.0573,-0.2858 0,-0.0981 -0.0195,-0.1951995 -0.0573,-0.2856995 -0.0378,-0.0905 -0.0933,-0.1726 -0.163,-0.2416 -0.0698,-0.0689 -0.1526,-0.1233 -0.2435,-0.16 -0.091,-0.0367 -0.1883,-0.055 -0.2864,-0.0539 -0.8778,0.0049 -1.7345,0.2697 -2.4619994,0.7608995 -0.7274,0.4912 -1.2931,1.1869 -1.6257,1.9992005 -0.3325,0.8124 -0.417,1.7051 -0.2428,2.5654 0.1743,0.8603 0.5994,1.6497 1.2218,2.2687 0.6225,0.619 1.4142994,1.0397 2.2755994,1.2092 0.8612,0.1694 1.7534,0.0799 2.5639,-0.2571 0.8105,-0.337 1.5031,-0.9065 1.9902,-1.6367 0.4872,-0.7303 0.7471,-1.5884 0.7471,-2.4662 0,-0.0216 -0.0014,-0.0419 -0.0031,-0.0627 0.0017,-0.0208 0.0031,-0.0415 0.0031,-0.0627 -0.0029,-0.1444 0.023,-0.288 0.0764,-0.4223 0.0532,-0.1343 0.1328,-0.2566 0.2338,-0.3597 0.1012,-0.1032 0.2219,-0.1851 0.355,-0.2411 0.1332,-0.0559 0.2763,-0.0847 0.4207,-0.0847 0.1444,0 0.2875,0.0288 0.4206,0.0847 0.1332,0.056 0.2539,0.1379 0.355,0.2411 0.101,0.1031 0.1806,0.2254 0.2339,0.3597 0.0533,0.1343 0.0792,0.2779 0.0763,0.4223 0.002,1.7632 -0.696,3.4551 -1.9407,4.7041 -0.6034,0.62 -1.325,1.1127 -2.122,1.4492 -0.7971,0.3365 -1.6535,0.5098 -2.5187,0.5098 -0.8651,0 -1.7215,-0.1733 -2.5185994,-0.5098 -0.7971,-0.3365 -1.5186,-0.8292 -2.1221,-1.4492 -1.2429999,-1.25 -1.9406999,-2.9413 -1.9406999,-4.7041 0,-1.7629 0.6977,-3.4541005 1.9406999,-4.7042 0.6039,-0.6192 1.3255,-1.1115 2.1224,-1.4479 0.7967994,-0.3364 1.6527994,-0.5101 2.5177994,-0.5111 0.0666,-2e-4 0.1328,-0.0093 0.1969,-0.0272 0.631,-0.0968 1.204,-0.42314 1.6092,-0.91644 0.4051,-0.4933 0.6139,-1.11882 0.5862,-1.75657 -0.0277,-0.63776 -0.29,-1.24283 -0.7364,-1.69914 -0.4464,-0.45632 -1.0455,-0.73175 -1.6825,-0.77346 -0.0266,-0.0029 -0.0534,-0.00438 -0.0802,-0.00443 -0.015,0 -0.0298,0 -0.0447,0 -0.0074,0 -0.0145,0 -0.0216,0 -0.0072,0 -0.0145,8.6e-4 -0.0217,0.00108 -1.5409,0.01212 -3.0640994,0.32913 -4.4818994,0.93276 -1.4178999,0.60363 -2.7021399,1.48195 -3.7788799,2.5843 -2.22634,2.2409 -3.47585998,5.2714995 -3.47585998,8.4304 0,3.1588 1.24951998,6.1894 3.47585998,8.4303 1.08669,1.1136 2.38518,1.9986 3.8189799,2.6027 1.4338,0.6042 2.9740994,0.9155 4.5299994,0.9155 1.5559,0 3.0961,-0.3113 4.53,-0.9155 1.4338,-0.6041 2.7322,-1.4891 3.819,-2.6027 z",g="M11.4352 10.5208C10.6865 11.8758 9.96921 13.1879 9.23694 14.4902C9.04888 14.8246 8.9558 15.0969 9.10604 15.5219C9.52083 16.6959 8.93569 17.8385 7.83598 18.1486C6.79886 18.4411 5.78841 17.7073 5.58264 16.5119C5.4003 15.4539 6.16298 14.4167 7.2466 14.2513C7.33735 14.2373 7.43008 14.2357 7.58264 14.2234L9.23094 11.2478C8.19425 10.138 7.57721 8.84086 7.71376 7.23333C7.81029 6.09705 8.22537 5.11506 8.98396 4.31023C10.4369 2.76895 12.6536 2.51939 14.3644 3.70239C16.0075 4.83875 16.76 7.05222 16.1185 8.94669C15.6349 8.80553 15.1478 8.66317 14.6124 8.50682C14.8138 7.45349 14.6649 6.50767 14.005 5.69737C13.569 5.16239 13.0096 4.88198 12.3735 4.77866C11.0982 4.57126 9.84614 5.45328 9.47461 6.80083C9.0529 8.33011 9.69118 9.57944 11.4352 10.5209V10.5208Z M13.5743 8.91924C14.1018 9.92105 14.6374 10.938 15.1682 11.9456C17.8511 11.0519 19.874 12.6509 20.5997 14.3627C21.4763 16.4306 20.8771 18.8797 19.1556 20.1554C17.3886 21.465 15.1539 21.2413 13.5884 19.559C13.9874 19.1994 14.3884 18.8383 14.8168 18.4524C16.363 19.5306 17.7154 19.4798 18.7195 18.2031C19.5757 17.1139 19.5571 15.4899 18.6761 14.4236C17.6593 13.1931 16.2975 13.1556 14.6513 14.3367C13.9684 13.0325 13.2737 11.7386 12.6124 10.425C12.3894 9.98221 12.1433 9.72528 11.6407 9.63161C10.8015 9.47496 10.2597 8.69907 10.2271 7.82982C10.1952 6.97015 10.6656 6.19305 11.4009 5.89031C12.1293 5.5903 12.9841 5.83242 13.474 6.49913C13.8744 7.04384 14.0017 7.65692 13.791 8.32872C13.7324 8.51606 13.6565 8.69733 13.5743 8.91931V8.91924Z M14.8345 17.1074H11.6046C11.295 18.4782 10.6264 19.5849 9.47421 20.2887C8.57851 20.8357 7.61316 21.0211 6.58571 20.8425C4.69395 20.5141 3.14713 18.6807 3.01094 16.6163C2.85682 14.2776 4.34994 12.1988 6.34013 11.7319C6.47753 12.2691 6.6164 12.8115 6.7538 13.3474C4.92781 14.3503 4.29581 15.614 4.80686 17.1942C5.25672 18.5847 6.53462 19.347 7.92217 19.0522C9.33915 18.7512 10.0536 17.4834 9.96635 15.4488C11.3097 15.4488 12.6541 15.4338 13.9975 15.4561C14.5221 15.465 14.9271 15.4065 15.3223 14.9085C15.9729 14.0893 17.1705 14.1632 17.8712 14.937C18.5873 15.7277 18.5531 17.0001 17.7952 17.7575C17.0641 18.4883 15.909 18.4493 15.2249 17.6618C15.0843 17.4995 14.9736 17.3068 14.8345 17.1074Z",y="M12 22C7.664 22 4 19.965 4 17.556V6.444C4 4.035 7.664 2 12 2C16.336 2 20 4.035 20 6.444V17.556C20 19.965 16.337 22 12 22ZM6 14.9V17.559C6.07 18.112 8.309 19.781 12 19.781C15.691 19.781 17.931 18.107 18 17.553V14.9C16.1794 15.9554 14.1039 16.4905 12 16.447C9.89606 16.4906 7.82058 15.9554 6 14.9ZM6 9.341V12C6.07 12.553 8.309 14.222 12 14.222C15.691 14.222 17.931 12.548 18 11.994V9.341C16.1795 10.3968 14.104 10.9323 12 10.889C9.89596 10.9323 7.82046 10.3968 6 9.341ZM12 4.222C8.308 4.222 6.069 5.896 6 6.451C6.07 7 8.311 8.666 12 8.666C15.689 8.666 17.931 6.992 18 6.438C17.93 5.887 15.689 4.222 12 4.222Z",p="M14 2C15.8299 1.99913 17.6049 2.62567 19.0288 3.77513C20.4527 4.92458 21.4395 6.52748 21.8246 8.31647C22.2097 10.1055 21.9699 11.9724 21.145 13.6059C20.3202 15.2395 18.9602 16.5408 17.292 17.293C16.7587 18.4719 15.9475 19.5039 14.9278 20.3004C13.9082 21.097 12.7105 21.6343 11.4376 21.8663C10.1647 22.0984 8.85446 22.0182 7.61933 21.6327C6.3842 21.2472 5.261 20.5678 4.34608 19.6529C3.43115 18.738 2.7518 17.6148 2.36628 16.3796C1.98076 15.1445 1.90058 13.8343 2.13262 12.5614C2.36466 11.2884 2.90199 10.0908 3.69854 9.07114C4.49508 8.05148 5.52705 7.24024 6.70596 6.707C7.34011 5.30389 8.36555 4.1135 9.65931 3.27861C10.9531 2.44371 12.4602 1.99976 14 2ZM9.99996 8C9.21203 8 8.43182 8.1552 7.70386 8.45672C6.97591 8.75825 6.31447 9.20021 5.75732 9.75736C5.20017 10.3145 4.75822 10.9759 4.45669 11.7039C4.15516 12.4319 3.99996 13.2121 3.99996 14C3.99996 14.7879 4.15516 15.5681 4.45669 16.2961C4.75822 17.0241 5.20017 17.6855 5.75732 18.2426C6.31447 18.7998 6.97591 19.2417 7.70386 19.5433C8.43182 19.8448 9.21203 20 9.99996 20C11.5913 20 13.1174 19.3679 14.2426 18.2426C15.3678 17.1174 16 15.5913 16 14C16 12.4087 15.3678 10.8826 14.2426 9.75736C13.1174 8.63214 11.5913 8 9.99996 8ZM11 9V10H13V12H8.99996C8.87502 11.9998 8.75451 12.0463 8.66218 12.1305C8.56985 12.2147 8.51238 12.3304 8.50109 12.4548C8.4898 12.5793 8.52551 12.7034 8.60118 12.8028C8.67686 12.9023 8.78702 12.9697 8.90996 12.992L8.99996 13H11C11.663 13 12.2989 13.2634 12.7677 13.7322C13.2366 14.2011 13.5 14.837 13.5 15.5C13.5 16.163 13.2366 16.7989 12.7677 17.2678C12.2989 17.7366 11.663 18 11 18V19H8.99996V18H6.99996V16H11C11.1249 16.0002 11.2454 15.9537 11.3377 15.8695C11.4301 15.7853 11.4875 15.6696 11.4988 15.5452C11.5101 15.4207 11.4744 15.2966 11.3987 15.1972C11.3231 15.0977 11.2129 15.0303 11.09 15.008L11 15H8.99996C8.33692 15 7.70104 14.7366 7.2322 14.2678C6.76336 13.7989 6.49996 13.163 6.49996 12.5C6.49996 11.837 6.76336 11.2011 7.2322 10.7322C7.70104 10.2634 8.33692 10 8.99996 10V9H11ZM14 4C13.1526 3.99901 12.3148 4.17794 11.5418 4.52496C10.7688 4.87198 10.0783 5.37918 9.51596 6.013C10.6462 5.94439 11.7782 6.1165 12.837 6.51795C13.8958 6.9194 14.8573 7.54105 15.6579 8.34178C16.4586 9.14252 17.0801 10.1041 17.4814 11.1629C17.8827 12.2218 18.0547 13.3537 17.986 14.484C18.8952 13.6756 19.5372 12.6099 19.8268 11.4283C20.1164 10.2467 20.04 9.00492 19.6076 7.86772C19.1752 6.73053 18.4074 5.75164 17.4059 5.06088C16.4044 4.37013 15.2166 4.00014 14 4Z",m="m 18.081457,19.819029 h -1.737539 c 0,-2.398996 -1.944783,-4.343914 -4.343913,-4.343914 -2.3990779,0 -4.3439269,1.944918 -4.3439269,4.343914 H 5.9185126 c 0,-3.358595 2.7227765,-6.081452 6.0814924,-6.081452 3.358729,0 6.081452,2.722857 6.081452,6.081452 z m 3.473595,0 c 0,-0.456099 -0.08995,-0.907754 -0.264475,-1.329245 -0.174522,-0.421356 -0.430379,-0.804333 -0.752893,-1.126848 -0.322649,-0.322514 -0.705492,-0.578371 -1.126983,-0.752893 -0.421356,-0.174656 -0.873011,-0.264475 -1.329244,-0.264475 v -1.739155 c 0.592645,0 1.180174,0.100997 1.737673,0.298141 0.08645,0.03057 0.172232,0.06343 0.257203,0.09857 0.632371,0.262052 1.207107,0.645972 1.691081,1.13008 0.484108,0.483974 0.868028,1.058575 1.129945,1.691081 0.03528,0.08497 0.06814,0.170751 0.09871,0.257203 0.197144,0.557499 0.298141,1.145028 0.298141,1.737539 z M 18.870708,8.714525 C 18.626297,8.5899091 18.355897,8.5249484 18.081457,8.5249484 V 6.787383 c 0.548746,0 1.089681,0.1298811 1.578503,0.3791262 0.05386,0.027444 0.106921,0.056262 0.15917,0.086399 0.421625,0.2434681 0.788039,0.573214 1.074868,0.9683919 0.322246,0.4441004 0.534876,0.958198 0.620252,1.5002243 0.08537,0.5420396 0.04134,1.0965896 -0.128871,1.6182816 -0.170078,0.521679 -0.461351,0.995674 -0.84985,1.38323 -0.388498,0.387422 -0.86318,0.677483 -1.385398,0.846214 -0.464583,0.150147 -0.95502,0.200511 -1.439128,0.148532 -0.05993,-0.0065 -0.119715,-0.01441 -0.17937,-0.02397 -0.541474,-0.08672 -1.054669,-0.30043 -1.497706,-0.623483 l -9.43e-4,-6.74e-4 1.024236,-1.403618 c 0.221653,0.161729 0.478453,0.268637 0.749258,0.312051 0.270939,0.04336 0.548342,0.02209 0.809316,-0.06231 0.261109,-0.08437 0.498517,-0.229356 0.692699,-0.423094 0.194317,-0.193751 0.339886,-0.430742 0.424857,-0.691568 0.08511,-0.260839 0.107191,-0.538107 0.0645,-0.8091135 C 19.755165,9.7209991 19.648917,9.4639571 19.487728,9.2419136 19.326538,9.0198701 19.115119,8.8391543 18.870708,8.714525 Z M 12.000005,4.1809675 c -2.3990779,0 -4.3439269,1.94485 -4.3439269,4.343927 0,2.3990765 1.944849,4.3439805 4.3439269,4.3439805 2.39913,0 4.343913,-1.944904 4.343913,-4.3439805 0,-2.399077 -1.944783,-4.343927 -4.343913,-4.343927 z m -2.6063489,4.343927 c 0,-1.4394516 1.1668969,-2.6063481 2.6063489,-2.6063481 1.439397,0 2.606375,1.1668965 2.606375,2.6063481 0,1.4394516 -1.166978,2.6063475 -2.606375,2.6063475 -1.439452,0 -2.6063489,-1.1668959 -2.6063489,-2.6063475 z M 2.4450112,19.819029 c 0,-0.456099 0.089846,-0.907754 0.264408,-1.329245 0.1745483,-0.421356 0.4304054,-0.804333 0.7529468,-1.126848 0.3225414,-0.322514 0.7054651,-0.578371 1.1268886,-0.753028 0.4214234,-0.174521 0.8731053,-0.26434 1.3292445,-0.26434 v -1.739289 c -0.5925783,0 -1.1801338,0.101131 -1.7375654,0.29814 -0.086507,0.03057 -0.172286,0.06356 -0.2572575,0.09871 -0.6324247,0.261917 -1.2070796,0.645972 -1.6911206,1.129946 -0.4840411,0.484108 -0.8680017,1.058709 -1.1299724,1.691215 -0.035187,0.08484 -0.068085,0.170616 -0.098666,0.257203 -0.1970907,0.557365 -0.2981273,1.145028 -0.2981273,1.737539 z M 5.1292745,8.7144846 C 5.3736987,8.5898687 5.6441531,8.5248945 5.9184991,8.5248945 V 6.7873291 c -0.548719,0 -1.0896412,0.1298811 -1.5784897,0.3791262 -0.053838,0.027457 -0.1068809,0.056262 -0.1590757,0.086399 C 3.7592275,7.4963224 3.3927864,7.8260682 3.1059841,8.2212461 2.7836851,8.6653465 2.5711352,9.1794441 2.4857194,9.7214839 2.4003034,10.26351 2.4444594,10.81806 2.614577,11.339752 c 0.1701045,0.521693 0.4613372,0.995728 0.8498493,1.38315 0.3885122,0.387556 0.8632616,0.677482 1.3853984,0.846213 0.4646229,0.150148 0.9550066,0.200511 1.4391688,0.148667 0.059924,-0.0065 0.1197546,-0.01441 0.1794231,-0.02397 0.5414475,-0.08686 1.0546565,-0.30043 1.4976925,-0.623618 l 9.16e-4,-6.73e-4 -1.024263,-1.403524 c -0.221626,0.161715 -0.4784122,0.268623 -0.7493109,0.312038 -0.2708988,0.04341 -0.5482208,0.022 -0.8092758,-0.06231 C 5.1231204,11.831361 4.8857525,11.686371 4.6915031,11.492633 4.4972538,11.298882 4.3516442,11.061905 4.2665919,10.801065 4.1815397,10.540226 4.1594552,10.262958 4.2021564,9.9919515 4.244871,9.7209453 4.3511459,9.4639032 4.512282,9.2418597 4.6734315,9.0198162 4.8848637,8.8391004 5.1292745,8.7144846 Z",v="M21.2664 20.9981H2.73337C2.37611 20.9981 2.04599 20.8075 1.86737 20.4981C1.68874 20.1887 1.68874 19.8075 1.86737 19.4981L11.1334 3.49811C11.3121 3.18923 11.642 2.99902 11.9989 2.99902C12.3558 2.99902 12.6856 3.18923 12.8644 3.49811L22.1304 19.4981C22.3089 19.8074 22.309 20.1883 22.1306 20.4977C21.9522 20.807 21.6225 20.9977 21.2654 20.9981H21.2664ZM12.0004 5.99811L4.46937 18.9981H19.5334L12.0004 5.99811ZM12.9954 14.9991H10.9954V9.99811H12.9954V14.9991Z M11.0004 16.0001H13.0004V18.0001H11.0004V16.0001Z",w="M10 16.5L16 12L10 7.5V16.5ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",z="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z",D="M17.001 20H6.00098C4.89641 20 4.00098 19.1046 4.00098 18V7C4.00098 5.89543 4.89641 5 6.00098 5H10.001V7H6.00098V18H17.001V14H19.001V18C19.001 19.1046 18.1055 20 17.001 20ZM11.701 13.707L10.291 12.293L16.584 6H13.001V4H20.001V11H18.001V7.415L11.701 13.707Z",I="M19.14,7.5A2.86,2.86 0 0,1 22,10.36V14.14A2.86,2.86 0 0,1 19.14,17H12C12,17.39 12.32,17.96 12.71,17.96H17V19.64A2.86,2.86 0 0,1 14.14,22.5H9.86A2.86,2.86 0 0,1 7,19.64V15.89C7,14.31 8.28,13.04 9.86,13.04H15.11C16.69,13.04 17.96,11.76 17.96,10.18V7.5H19.14M14.86,19.29C14.46,19.29 14.14,19.59 14.14,20.18C14.14,20.77 14.46,20.89 14.86,20.89A0.71,0.71 0 0,0 15.57,20.18C15.57,19.59 15.25,19.29 14.86,19.29M4.86,17.5C3.28,17.5 2,16.22 2,14.64V10.86C2,9.28 3.28,8 4.86,8H12C12,7.61 11.68,7.04 11.29,7.04H7V5.36C7,3.78 8.28,2.5 9.86,2.5H14.14C15.72,2.5 17,3.78 17,5.36V9.11C17,10.69 15.72,11.96 14.14,11.96H8.89C7.31,11.96 6.04,13.24 6.04,14.82V17.5H4.86M9.14,5.71C9.54,5.71 9.86,5.41 9.86,4.82C9.86,4.23 9.54,4.11 9.14,4.11C8.75,4.11 8.43,4.23 8.43,4.82C8.43,5.41 8.75,5.71 9.14,5.71Z",k="M12 2.79883C6.48 2.79883 2 7.27883 2 12.7988C2 18.3188 6.48 22.7988 12 22.7988C17.52 22.7988 22 18.3188 22 12.7988C22 7.27883 17.52 2.79883 12 2.79883ZM13 17.7988H11V15.7988H13V17.7988ZM13 13.7988H11V7.79883H13V13.7988Z",S="M4 6.79883H2V20.7988C2 21.8988 2.9 22.7988 4 22.7988H18V20.7988H4V6.79883ZM20 2.79883H8C6.9 2.79883 6 3.69883 6 4.79883V16.7988C6 17.8988 6.9 18.7988 8 18.7988H20C21.1 18.7988 22 17.8988 22 16.7988V4.79883C22 3.69883 21.1 2.79883 20 2.79883ZM20 16.7988H8V4.79883H20V16.7988ZM13 15.7988H15V11.7988H19V9.79883H15V5.79883H13V9.79883H9V11.7988H13V15.7988Z",R="M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z",O="M12.0106 3C12.7162 3.00738 13.419 3.08585 14.1073 3.23355C14.2539 3.26498 14.3867 3.33961 14.487 3.44702C14.5873 3.55444 14.6502 3.68926 14.6668 3.83264L14.8302 5.24223C14.8533 5.44108 14.9246 5.63196 15.0385 5.79949C15.1524 5.96702 15.3057 6.10652 15.4861 6.20675C15.6664 6.30698 15.8687 6.36514 16.0768 6.37655C16.2848 6.38795 16.4927 6.35229 16.6837 6.27242L18.0296 5.70471C18.1664 5.64687 18.3185 5.63127 18.4649 5.66004C18.6112 5.68882 18.7447 5.76055 18.8468 5.86533C19.8196 6.86331 20.544 8.06013 20.9656 9.36575C21.0098 9.50296 21.0085 9.64997 20.9618 9.78642C20.9151 9.92287 20.8254 10.042 20.7051 10.1273L19.5111 10.9729C19.3431 11.0913 19.2064 11.246 19.1123 11.4245C19.0182 11.6031 18.9691 11.8004 18.9692 12.0005C18.9693 12.2007 19.0185 12.3979 19.1128 12.5764C19.2071 12.7549 19.3439 12.9095 19.5121 13.0277L20.707 13.8724C20.8275 13.9577 20.9174 14.077 20.9641 14.2137C21.0108 14.3503 21.012 14.4975 20.9676 14.6349C20.5461 15.9403 19.822 17.1371 18.8497 18.1353C18.7478 18.24 18.6145 18.3118 18.4683 18.3407C18.3222 18.3697 18.1702 18.3543 18.0335 18.2968L16.6818 17.7273C16.491 17.6468 16.2832 17.6106 16.0751 17.6216C15.867 17.6326 15.6646 17.6905 15.4842 17.7907C15.3038 17.8908 15.1504 18.0304 15.0367 18.198C14.9229 18.3657 14.8518 18.5567 14.8293 18.7556L14.6668 20.1643C14.6504 20.3061 14.5888 20.4396 14.4904 20.5465C14.3919 20.6534 14.2615 20.7285 14.1169 20.7615C12.7247 21.0795 11.2743 21.0795 9.88213 20.7615C9.73754 20.7285 9.60711 20.6534 9.50867 20.5465C9.41024 20.4396 9.34861 20.3061 9.33223 20.1643L9.1688 18.7575C9.14515 18.5594 9.07349 18.3694 8.95956 18.2027C8.84564 18.0361 8.69262 17.8974 8.51278 17.7977C8.33294 17.6981 8.13129 17.6403 7.924 17.6291C7.71671 17.6178 7.50955 17.6533 7.31915 17.7328L5.96651 18.3014C5.82979 18.359 5.67785 18.3743 5.53165 18.3454C5.38546 18.3164 5.25222 18.2446 5.15032 18.1399C4.17749 17.1407 3.45337 15.9426 3.03245 14.6358C2.98803 14.4984 2.98924 14.3512 3.03593 14.2146C3.08262 14.078 3.17246 13.9587 3.29298 13.8733L4.48891 13.0277C4.657 12.9094 4.79369 12.7547 4.88792 12.5762C4.98214 12.3977 5.03125 12.2004 5.03125 12.0003C5.03125 11.8002 4.98214 11.6029 4.88792 11.4244C4.79369 11.2459 4.657 11.0912 4.48891 10.9729L3.29394 10.1292C3.17325 10.0439 3.08322 9.92468 3.03635 9.78803C2.98949 9.65138 2.98813 9.50411 3.03245 9.36668C3.45431 8.06097 4.17909 6.86414 5.15224 5.86625C5.25425 5.76167 5.38755 5.69005 5.53373 5.66128C5.67992 5.63251 5.83181 5.64801 5.96844 5.70563L7.31434 6.27334C7.50567 6.35298 7.71378 6.38842 7.92196 6.37681C8.13014 6.3652 8.33259 6.30687 8.51303 6.2065C8.69347 6.10614 8.84689 5.96653 8.96094 5.7989C9.075 5.63127 9.14652 5.44029 9.16976 5.24131L9.33319 3.83264C9.34969 3.68897 9.4126 3.55385 9.51312 3.44624C9.61363 3.33864 9.7467 3.26394 9.89366 3.23262C10.5839 3.08585 11.2876 3.00831 12.0106 3ZM12.0106 4.38466C11.5742 4.38953 11.1387 4.42563 10.7079 4.49267L10.6031 5.39454C10.5552 5.80954 10.4062 6.20789 10.1684 6.55746C9.93062 6.90704 9.61056 7.19804 9.23408 7.407C8.85761 7.61596 8.43525 7.73702 8.00108 7.76042C7.56692 7.78381 7.1331 7.70889 6.73464 7.54169L5.87134 7.17799C5.32143 7.81874 4.88375 8.54112 4.57543 9.31683L5.34259 9.8587C5.69273 10.1058 5.97742 10.4285 6.17363 10.8008C6.36985 11.1731 6.47209 11.5845 6.47209 12.0017C6.47209 12.4189 6.36985 12.8303 6.17363 13.2026C5.97742 13.5749 5.69273 13.8976 5.34259 14.1447L4.57543 14.6875C4.88306 15.4647 5.32048 16.1884 5.87038 16.8309L6.74137 16.4645C7.13888 16.2978 7.57159 16.2231 8.00466 16.2463C8.43774 16.2696 8.85908 16.3902 9.23476 16.5983C9.61045 16.8065 9.92999 17.0964 10.1677 17.4448C10.4053 17.7932 10.5545 18.1904 10.6031 18.6042L10.707 19.5126C11.5626 19.651 12.4365 19.651 13.2921 19.5126L13.3959 18.6042C13.4435 18.1895 13.592 17.7913 13.8295 17.442C14.0671 17.0926 14.3869 16.8018 14.7631 16.5931C15.1394 16.3844 15.5615 16.2637 15.9954 16.2407C16.4293 16.2177 16.8627 16.2931 17.2606 16.4608L18.1296 16.8263C18.6792 16.1852 19.1165 15.4625 19.4246 14.6866L18.6574 14.1438C18.3071 13.8968 18.0222 13.5741 17.8259 13.2018C17.6296 12.8295 17.5272 12.4181 17.5272 12.0008C17.5272 11.5835 17.6296 11.172 17.8259 10.7997C18.0222 10.4274 18.3071 10.1047 18.6574 9.85777L19.4226 9.31591C19.1143 8.5402 18.6766 7.81781 18.1267 7.17706L17.2654 7.53985C16.8671 7.70725 16.4335 7.78239 15.9994 7.75919C15.5653 7.73599 15.143 7.61511 14.7666 7.4063C14.3902 7.1975 14.0701 6.90662 13.8324 6.55715C13.5946 6.20769 13.4457 5.80943 13.3978 5.39454L13.2921 4.49359C12.8683 4.42707 12.4399 4.39097 12.0106 4.38559V4.38466ZM11.9981 8.53865C12.9542 8.53865 13.8712 8.90336 14.5473 9.55255C15.2233 10.2017 15.6032 11.0822 15.6032 12.0003C15.6032 12.9184 15.2233 13.7989 14.5473 14.4481C13.8712 15.0973 12.9542 15.462 11.9981 15.462C11.0419 15.462 10.125 15.0973 9.44889 14.4481C8.7728 13.7989 8.39298 12.9184 8.39298 12.0003C8.39298 11.0822 8.7728 10.2017 9.44889 9.55255C10.125 8.90336 11.0419 8.53865 11.9981 8.53865ZM11.9981 9.92331C11.4244 9.92331 10.8742 10.1421 10.4686 10.5316C10.0629 10.9212 9.83502 11.4495 9.83502 12.0003C9.83502 12.5512 10.0629 13.0794 10.4686 13.469C10.8742 13.8585 11.4244 14.0773 11.9981 14.0773C12.5718 14.0773 13.1219 13.8585 13.5276 13.469C13.9332 13.0794 14.1611 12.5512 14.1611 12.0003C14.1611 11.4495 13.9332 10.9212 13.5276 10.5316C13.1219 10.1421 12.5718 9.92331 11.9981 9.92331Z",_="M7.5,5.6L5,7L6.4,4.5L5,2L7.5,3.4L10,2L8.6,4.5L10,7L7.5,5.6M19.5,15.4L22,14L20.6,16.5L22,19L19.5,17.6L17,19L18.4,16.5L17,14L19.5,15.4M22,2L20.6,4.5L22,7L19.5,5.6L17,7L18.4,4.5L17,2L19.5,3.4L22,2M13.34,12.78L15.78,10.34L13.66,8.22L11.22,10.66L13.34,12.78M14.37,7.29L16.71,9.63C17.1,10 17.1,10.65 16.71,11.04L5.04,22.71C4.65,23.1 4,23.1 3.63,22.71L1.29,20.37C0.9,20 0.9,19.35 1.29,18.96L12.96,7.29C13.35,6.9 14,6.9 14.37,7.29Z",x="M21.4 7.5C22.2 8.3 22.2 9.6 21.4 10.3L18.6 13.1L10.8 5.3L13.6 2.5C14.4 1.7 15.7 1.7 16.4 2.5L18.2 4.3L21.2 1.3L22.6 2.7L19.6 5.7L21.4 7.5M15.6 13.3L14.2 11.9L11.4 14.7L9.3 12.6L12.1 9.8L10.7 8.4L7.9 11.2L6.4 9.8L3.6 12.6C2.8 13.4 2.8 14.7 3.6 15.4L5.4 17.2L1.4 21.2L2.8 22.6L6.8 18.6L8.6 20.4C9.4 21.2 10.7 21.2 11.4 20.4L14.2 17.6L12.8 16.2L15.6 13.3Z",E="M12 6.5C15.79 6.5 19.17 8.63 20.82 12C19.17 15.37 15.8 17.5 12 17.5C8.2 17.5 4.83 15.37 3.18 12C4.83 8.63 8.21 6.5 12 6.5ZM12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 9.5C13.38 9.5 14.5 10.62 14.5 12C14.5 13.38 13.38 14.5 12 14.5C10.62 14.5 9.5 13.38 9.5 12C9.5 10.62 10.62 9.5 12 9.5ZM12 7.5C9.52 7.5 7.5 9.52 7.5 12C7.5 14.48 9.52 16.5 12 16.5C14.48 16.5 16.5 14.48 16.5 12C16.5 9.52 14.48 7.5 12 7.5Z",F={d:"M2 3C2 2.44772 2.44772 2 3 2H21C21.5523 2 22 2.44772 22 3V10C22 10.5523 21.5523 11 21 11H3C2.44772 11 2 10.5523 2 10V3ZM4 4V9H20V4H4ZM10 14C10 13.4477 10.4477 13 11 13H21C21.5523 13 22 13.4477 22 14V21C22 21.5523 21.5523 22 21 22H11C10.4477 22 10 21.5523 10 21V14ZM12 15V20H20V15H12ZM3 13C2.44772 13 2 13.4477 2 14V21C2 21.5523 2.44772 22 3 22H7C7.55228 22 8 21.5523 8 21V14C8 13.4477 7.55228 13 7 13H3ZM4 20V15H6V20H4Z",fillRule:"evenodd",clipRule:"evenodd"},j="M12.4142 18.2114L10.9992 16.7984L15.5992 12.1984L10.9992 7.59841L12.4142 6.19141L18.4242 12.2014L12.4152 18.2114H12.4142ZM6.9892 18.2114L5.5752 16.7984L10.1752 12.1984L5.5752 7.60541L6.9892 6.19141L13.0002 12.2014L6.9902 18.2114H6.9892Z",q="M10.0719 8.02397L5.7146 3.66666L6.33332 3.04794L11 7.71461V8.33333L6.33332 13L5.7146 12.3813L10.0719 8.02397Z",B="M7.97612 10.0719L12.3334 5.7146L12.9521 6.33332L8.28548 11L7.66676 11L3.0001 6.33332L3.61882 5.7146L7.97612 10.0719Z",G="M15.4286 9.33333V18.2222H8.57143V9.33333H15.4286ZM14.1429 4H9.85714L9 4.88889H6V6.66667H18V4.88889H15L14.1429 4ZM17.1429 7.55556H6.85714V18.2222C6.85714 19.2 7.62857 20 8.57143 20H15.4286C16.3714 20 17.1429 19.2 17.1429 18.2222V7.55556Z",J="M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z",K="M20 8H17.19C16.74 7.22 16.12 6.55 15.37 6.04L17 4.41L15.59 3L13.42 5.17C12.96 5.06 12.49 5 12 5C11.51 5 11.04 5.06 10.59 5.17L8.41 3L7 4.41L8.62 6.04C7.88 6.55 7.26 7.22 6.81 8H4V10H6.09C6.04 10.33 6 10.66 6 11V12H4V14H6V15C6 15.34 6.04 15.67 6.09 16H4V18H6.81C7.85 19.79 9.78 21 12 21C14.22 21 16.15 19.79 17.19 18H20V16H17.91C17.96 15.67 18 15.34 18 15V14H20V12H18V11C18 10.66 17.96 10.33 17.91 10H20V8ZM16 12V15C16 15.22 15.97 15.47 15.93 15.7L15.83 16.35L15.46 17C14.74 18.24 13.42 19 12 19C10.58 19 9.26 18.23 8.54 17L8.17 16.36L8.07 15.71C8.03 15.48 8 15.23 8 15V11C8 10.77 8.03 10.52 8.07 10.3L8.17 9.65L8.54 9C8.84 8.48 9.26 8.03 9.75 7.69L10.32 7.3L11.06 7.12C11.37 7.04 11.69 7 12 7C12.32 7 12.63 7.04 12.95 7.12L13.63 7.28L14.24 7.7C14.74 8.04 15.15 8.48 15.45 9.01L15.83 9.66L15.93 10.31C15.97 10.53 16 10.78 16 11V12ZM10 14H14V16H10V14ZM10 10H14V12H10V10Z";export{R as A,w as B,n as C,c as D,h as E,m as F,p as G,D as H,x as I,a as J,f as K,O as L,e as M,u as N,k as O,F as a,y as b,A as c,t as d,v as e,Z as f,z as g,S as h,o as i,d as j,_ as k,b as l,l as m,J as n,K as o,I as p,j as q,G as r,r as s,E as t,s as u,M as v,g as w,B as x,q as y,i as z}; -//# sourceMappingURL=icons.11151937.js.map +import"./registerWidgets.89616af0.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},L=new Error().stack;L&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[L]="2341d2ad-26fb-430d-9e30-fd7277c08d6a",C._sentryDebugIdIdentifier="sentry-dbid-2341d2ad-26fb-430d-9e30-fd7277c08d6a")}catch{}})();const M="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",Z="M6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM8 9H16V19H8V9ZM15.5 4L14.5 3H9.5L8.5 4H5V6H19V4H15.5Z",s="M18.15 7.23525C16.7 5.78525 14.71 4.88525 12.5 4.88525C8.08001 4.88525 4.51001 8.46525 4.51001 12.8853C4.51001 17.3053 8.08001 20.8853 12.5 20.8853C16.23 20.8853 19.34 18.3353 20.23 14.8853H18.15C17.33 17.2153 15.11 18.8853 12.5 18.8853C9.19001 18.8853 6.50001 16.1953 6.50001 12.8853C6.50001 9.57525 9.19001 6.88525 12.5 6.88525C14.16 6.88525 15.64 7.57525 16.72 8.66525L13.5 11.8853H20.5V4.88525L18.15 7.23525Z",n="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",o="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",c="M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",e="M11.8484 17.098C11.8664 17.1211 11.8894 17.1398 11.9157 17.1526C11.9419 17.1655 11.9708 17.1721 12 17.1721C12.0292 17.1721 12.0581 17.1655 12.0843 17.1526C12.1106 17.1398 12.1336 17.1211 12.1516 17.098L14.8468 13.6763C14.9455 13.5507 14.8564 13.3648 14.6952 13.3648H12.912V5.19318C12.912 5.08693 12.8254 5 12.7195 5H11.2757C11.1698 5 11.0832 5.08693 11.0832 5.19318V13.3624H9.30481C9.14358 13.3624 9.05455 13.5483 9.15321 13.6739L11.8484 17.098ZM20.8075 15.2528H19.3636C19.2578 15.2528 19.1711 15.3398 19.1711 15.446V19.1648H4.82888V15.446C4.82888 15.3398 4.74225 15.2528 4.63636 15.2528H3.19251C3.08663 15.2528 3 15.3398 3 15.446V20.2273C3 20.6547 3.34412 21 3.77005 21H20.2299C20.6559 21 21 20.6547 21 20.2273V15.446C21 15.3398 20.9134 15.2528 20.8075 15.2528Z",t="M10.4122 15.9425L14.9037 12.2121C14.9338 12.1869 14.958 12.1549 14.9747 12.1184C14.9913 12.0819 15 12.0419 15 12.0014C15 11.9609 14.9913 11.9209 14.9747 11.8845C14.958 11.848 14.9338 11.8159 14.9037 11.7908L10.4122 8.058C10.2455 7.91993 10 8.04372 10 8.2675V15.7306C10 15.9544 10.2455 16.0805 10.4122 15.9425Z M20.28 3H3.72C3.32175 3 3 3.32175 3 3.72V20.28C3 20.6783 3.32175 21 3.72 21H20.28C20.6783 21 21 20.6783 21 20.28V3.72C21 3.32175 20.6783 3 20.28 3ZM19.38 19.38H4.62V4.62H19.38V19.38Z",a="M12.1373 17.7157C12.1373 17.8719 12.2539 17.9997 12.3946 17.9997H18.7426C18.8833 17.9997 19 17.8719 19 17.7157V16.0116C19 15.8553 18.8833 15.7275 18.7426 15.7275H12.3946C12.2539 15.7275 12.1373 15.8553 12.1373 16.0116V17.7157ZM5.44951 17.9323L12.0377 12.2163C12.1681 12.1027 12.1681 11.8932 12.0377 11.7796L5.44951 6.06723C5.40974 6.03224 5.3611 6.00979 5.30936 6.00255C5.25763 5.99531 5.20497 6.00358 5.15764 6.02638C5.11031 6.04918 5.0703 6.08556 5.04236 6.13119C5.01442 6.17681 4.99972 6.22978 5 6.2838V8.50982C5 8.59503 5.03432 8.67313 5.09951 8.72639L8.86716 11.9997L5.09951 15.2731C5.06884 15.2997 5.04407 15.3328 5.0269 15.3701C5.00973 15.4075 5.00055 15.4483 5 15.4897V17.7157C5 17.9571 5.27108 18.0885 5.44951 17.9323Z",d="M15 18H3V16H15V18ZM21 13H3V11H21V13ZM15 8H3V6H15V8Z",l="M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z",r="M18.7375 11.0838C18.1142 8.06508 15.3367 5.79883 12 5.79883C9.35083 5.79883 7.05 7.23383 5.90417 9.33383C3.145 9.61383 1 11.8451 1 14.5488C1 17.4451 3.46583 19.7988 6.5 19.7988H18.4167C20.9467 19.7988 23 17.8388 23 15.4238C23 13.1138 21.1208 11.2413 18.7375 11.0838ZM18.4167 18.0488H6.5C4.47417 18.0488 2.83333 16.4826 2.83333 14.5488C2.83333 12.7551 4.23583 11.2588 6.09667 11.0751L7.0775 10.9788L7.53583 10.1476C8.40667 8.54633 10.1117 7.54883 12 7.54883C14.4017 7.54883 16.4733 9.17633 16.9408 11.4251L17.2158 12.7376L18.6183 12.8338C20.0483 12.9213 21.1667 14.0676 21.1667 15.4238C21.1667 16.8676 19.9292 18.0488 18.4167 18.0488ZM8.33333 13.6738H10.6708V16.2988H13.3292V13.6738H15.6667L12 10.1738L8.33333 13.6738Z",i="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",A="M12 22C6.49 22 2 17.51 2 12C2 6.49 6.49 2 12 2C17.51 2 22 6.04 22 11C22 14.31 19.31 17 16 17H14.23C13.95 17 13.73 17.22 13.73 17.5C13.73 17.62 13.78 17.73 13.86 17.83C14.27 18.3 14.5 18.89 14.5 19.5C14.5 20.88 13.38 22 12 22ZM12 4C7.59 4 4 7.59 4 12C4 16.41 7.59 20 12 20C12.28 20 12.5 19.78 12.5 19.5C12.5 19.34 12.42 19.22 12.36 19.15C11.95 18.69 11.73 18.1 11.73 17.5C11.73 16.12 12.85 15 14.23 15H16C18.21 15 20 13.21 20 11C20 7.14 16.41 4 12 4Z M6.5 13C7.32843 13 8 12.3284 8 11.5C8 10.6716 7.32843 10 6.5 10C5.67157 10 5 10.6716 5 11.5C5 12.3284 5.67157 13 6.5 13Z M9.5 9C10.3284 9 11 8.32843 11 7.5C11 6.67157 10.3284 6 9.5 6C8.67157 6 8 6.67157 8 7.5C8 8.32843 8.67157 9 9.5 9Z M14.5 9C15.3284 9 16 8.32843 16 7.5C16 6.67157 15.3284 6 14.5 6C13.6716 6 13 6.67157 13 7.5C13 8.32843 13.6716 9 14.5 9Z M17.5 13C18.3284 13 19 12.3284 19 11.5C19 10.6716 18.3284 10 17.5 10C16.6716 10 16 10.6716 16 11.5C16 12.3284 16.6716 13 17.5 13Z",u="M21 11.11V5C21 3.9 20.11 3 19 3H14.82C14.4 1.84 13.3 1 12 1S9.6 1.84 9.18 3H5C3.9 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H11.11C12.37 22.24 14.09 23 16 23C19.87 23 23 19.87 23 16C23 14.09 22.24 12.37 21 11.11M12 3C12.55 3 13 3.45 13 4S12.55 5 12 5 11 4.55 11 4 11.45 3 12 3M5 19V5H7V7H17V5H19V9.68C18.09 9.25 17.08 9 16 9H7V11H11.1C10.5 11.57 10.04 12.25 9.68 13H7V15H9.08C9.03 15.33 9 15.66 9 16C9 17.08 9.25 18.09 9.68 19H5M16 21C13.24 21 11 18.76 11 16S13.24 11 16 11 21 13.24 21 16 18.76 21 16 21M16.5 16.25L19.36 17.94L18.61 19.16L15 17V12H16.5V16.25Z",f="M12.0125 2C11.0798 2 10.1926 2.18775 9.32834 2.56324C5.75685 4.06509 4.05085 8.31251 5.52933 11.9967C6.62119 14.7189 9.16906 16.4788 12.0125 16.4788C12.9452 16.4788 13.8323 16.2911 14.6966 15.9156C18.2681 14.3904 19.9741 10.1663 18.4956 6.45862C17.4036 3.7599 14.8559 2 12.0125 2ZM6.43928 11.1988C6.00704 9.93174 6.00704 8.57065 6.43928 7.27995H7.94068C7.82691 7.91359 7.75868 8.59403 7.75868 9.22766C7.75868 9.83775 7.82691 10.4948 7.98622 11.1754L6.43929 11.1752L6.43928 11.1988ZM8.89605 9.22754C8.89605 8.54709 8.96428 7.88987 9.10074 7.27982H11.4438V11.1987L9.14628 11.1989C8.98697 10.5417 8.89605 9.86117 8.89605 9.22754ZM12.5812 3.47826C13.3774 3.80678 14.1053 4.81593 14.583 6.10646H12.5812V3.47826ZM11.4438 3.47826V6.10646H9.44191C9.9197 4.81593 10.6475 3.80679 11.4438 3.47826ZM11.4438 12.372V14.9768C10.6931 14.6249 9.9879 13.5923 9.51012 12.372H11.4438ZM12.5812 14.9768V12.372H14.5148C14.037 13.5922 13.3319 14.6247 12.5812 14.9768ZM12.5812 11.1987V7.2797H14.9242C15.0606 7.91333 15.1289 8.57039 15.1289 9.22741C15.1289 9.86105 15.0379 10.5181 14.8786 11.1751H12.5811L12.5812 11.1987ZM16.0842 7.2797H17.5856C18.0179 8.59378 17.995 9.95487 17.5856 11.1986H16.0389C16.1982 10.5182 16.2664 9.83754 16.2664 9.25088C16.2662 8.59399 16.198 7.91333 16.0842 7.2797ZM17.0625 6.10638H15.7886C15.5384 5.26158 15.1744 4.48715 14.7195 3.85351C15.6749 4.36994 16.4938 5.14438 17.0625 6.10638ZM9.30547 3.85368C8.87322 4.48732 8.50921 5.26175 8.23632 6.10654H6.98515C7.53114 5.14438 8.32739 4.36998 9.30547 3.85368ZM6.96244 12.372H8.30452C8.60029 13.2402 8.987 14.0616 9.48745 14.7421C8.46384 14.2258 7.57667 13.4044 6.96244 12.372ZM14.5375 14.7186C15.0152 14.0382 15.4246 13.2168 15.6976 12.372H17.0396C16.4711 13.3576 15.6067 14.2024 14.5375 14.7186ZM5.09509 22C5.70932 22 6.30072 21.7184 6.71027 21.2256C6.89227 20.9908 7.02873 20.7327 7.11965 20.4277H10.0106C10.2609 21.3429 11.0571 22 12.0125 22C12.9679 22 13.7641 21.3429 14.0143 20.4277H16.9054C17.1556 21.3429 17.9518 22 18.9072 22C20.0673 22 21 21.0378 21 19.8411C21 18.6443 20.0673 17.6822 18.9072 17.6822C17.9518 17.6822 17.1556 18.3392 16.9054 19.2544L14.0143 19.2543C13.8097 18.5268 13.2637 17.9636 12.5812 17.7758V17.2619C12.5812 16.9333 12.331 16.6752 12.0125 16.6752C11.694 16.6752 11.4438 16.9333 11.4438 17.2619V17.7758C10.7387 17.987 10.1926 18.5502 10.0106 19.2543H7.0969C6.8922 18.4799 6.25527 17.8698 5.50459 17.729C4.75391 17.5883 3.98049 17.8698 3.48004 18.48C3.07066 18.9729 2.91134 19.6299 3.04779 20.2634C3.2071 21.1082 3.86671 21.8123 4.68563 21.953C4.82209 22 4.95864 22 5.09509 22ZM18.9298 18.8553C19.453 18.8553 19.8852 19.3012 19.8852 19.8409C19.8852 20.3806 19.453 20.8265 18.9298 20.8265C18.4294 20.8265 18.02 20.4276 17.9744 19.9113V19.8409V19.7705C18.02 19.2778 18.4293 18.8553 18.9298 18.8553ZM12.0125 18.8553C12.5356 18.8553 12.9679 19.3012 12.9679 19.8409C12.9679 20.3806 12.5356 20.8265 12.0125 20.8265C11.4893 20.8265 11.057 20.3806 11.057 19.8409C11.057 19.3012 11.4893 18.8553 12.0125 18.8553ZM4.16243 20.0522C4.11689 19.7471 4.18512 19.4655 4.36712 19.2308C4.54913 18.9961 4.82204 18.8789 5.09513 18.8789C5.16337 18.8789 5.2316 18.8789 5.27714 18.9023C5.64114 18.9727 5.95961 19.2778 6.02782 19.6767C6.07336 19.9818 6.00512 20.2633 5.82312 20.4981C5.59558 20.7796 5.25443 20.897 4.89042 20.8266C4.52642 20.7326 4.23067 20.4275 4.16243 20.0522Z",h="m 14.6454,15.0573 2.5899,-2.3906 H 7 V 11.3333 H 17.2353 L 14.6454,8.94267 15.6667,8 20,12 15.6667,16 Z M 5.375,22 h 8.25 c 0.3646,-4e-4 0.7141,-0.151 0.9719,-0.4188 0.2578,-0.2679 0.4027,-0.631 0.4031,-1.0098 v -2.1428 h -1.375 v 2.1428 H 5.375 V 3.42857 h 8.25 V 5.57143 H 15 V 3.42857 C 14.9996,3.04981 14.8547,2.68666 14.5969,2.41884 14.3391,2.15101 13.9896,2.00038 13.625,2 H 5.375 C 5.01044,2.00038 4.66091,2.15101 4.40313,2.41884 4.14535,2.68666 4.00036,3.04981 4,3.42857 V 20.5714 c 3.6e-4,0.3788 0.14535,0.7419 0.40313,1.0098 C 4.66091,21.849 5.01044,21.9996 5.375,22 Z",b="m 20.348814,20.43092 c 2.2301,-2.2386 3.4802,-5.2708 3.4759,-8.4304 -0.0024,-0.1951 -0.0815,-0.3813 -0.2202,-0.5184 -0.1388,-0.1371 -0.3259,-0.2139 -0.5209,-0.2139 -0.1952,0 -0.3823,0.0768 -0.5211,0.2139 -0.1388,0.1371 -0.2178,0.3233 -0.2202,0.5184 0.0031,2.769 -1.093,5.4261 -3.0475,7.3876 -0.9488,0.9741 -2.0832,1.7483 -3.3361,2.277 -1.2529,0.5286 -2.599,0.801 -3.9588,0.801 -1.3599,0 -2.7059994,-0.2724 -3.9588994,-0.801 -1.2528999,-0.5287 -2.3871999,-1.3029 -3.3360399,-2.277 -1.9519,-1.9634 -3.0475,-4.6195 -3.0475,-7.3881 0,-2.7686005 1.0956,-5.4247 3.0475,-7.38813 0.94334,-0.96663 2.06914,-1.73639 3.3121399,-2.26465 1.2431,-0.52825 2.5785994,-0.8045 3.9291994,-0.81272 0.2884,0.00903 0.5618,0.13038 0.762,0.33815 0.2003,0.20776 0.3113,0.48553 0.3096,0.77404 -0.0016,0.28852 -0.1159,0.56496 -0.3185,0.7704 -0.2026,0.20543 -0.4775,0.32357 -0.7659,0.32925 -0.0268,6e-5 -0.0535,0.00154 -0.08,0.00444 -2.0547994,0.06617 -4.0044994,0.92415 -5.4413993,2.39452 -1.5175,1.5276 -2.36911,3.5933995 -2.36911,5.7466 0,2.1532 0.85161,4.2189 2.36911,5.7465 0.7414,0.7594 1.6270999,1.3629 2.6050999,1.7749 0.978,0.412 2.0285994,0.6242 3.0897994,0.6242 1.0612,0 2.1117,-0.2122 3.0898,-0.6242 0.9779,-0.412 1.8636,-1.0155 2.605,-1.7749 1.5198,-1.526 2.3718,-3.5928 2.3688,-5.7465 0.0031,-0.3392 -0.061,-0.6759 -0.1887,-0.9902 -0.1277,-0.3143 -0.3163,-0.6002 -0.5552,-0.8412 -0.2388,-0.2410005 -0.5229,-0.4323005 -0.8361,-0.5628005 -0.3131,-0.1306 -0.649,-0.1978 -0.9883,-0.1978 -0.3393,0 -0.6751,0.0672 -0.9883,0.1978 -0.3131,0.1305 -0.5972,0.3218 -0.8361,0.5628005 -0.2388,0.241 -0.4274,0.5269 -0.5552,0.8412 -0.1276,0.3143 -0.1917,0.651 -0.1886,0.9902 0,0.0216 0.0014,0.0419 0.0031,0.0627 -0.0017,0.0208 -0.0031,0.0415 -0.0031,0.0627 0.0049,0.5915 -0.1662,1.171 -0.4913,1.6652 -0.325,0.4941 -0.7896,0.8805 -1.3346,1.1102 -0.5451,0.2296 -1.1461,0.2923 -1.7268,0.1799 -0.5807,-0.1125 -1.1149,-0.3948 -1.5347994,-0.8114 -0.42,-0.4165 -0.7067,-0.9483 -0.8239,-1.5281 -0.1172,-0.5798 -0.0595,-1.1813 0.1657,-1.7281 0.2252,-0.547 0.6079,-1.0147005 1.0992994,-1.3438005 0.4915,-0.3291 1.0696,-0.5048 1.6611,-0.5049 0.0981,0.0012 0.1954,-0.0171 0.2864,-0.0538 0.0909,-0.0367 0.1737,-0.0911 0.2435,-0.1601 0.0697,-0.0689 0.1252,-0.151 0.163,-0.2415 0.0378,-0.0905 0.0573,-0.1877 0.0573,-0.2858 0,-0.0981 -0.0195,-0.1951995 -0.0573,-0.2856995 -0.0378,-0.0905 -0.0933,-0.1726 -0.163,-0.2416 -0.0698,-0.0689 -0.1526,-0.1233 -0.2435,-0.16 -0.091,-0.0367 -0.1883,-0.055 -0.2864,-0.0539 -0.8778,0.0049 -1.7345,0.2697 -2.4619994,0.7608995 -0.7274,0.4912 -1.2931,1.1869 -1.6257,1.9992005 -0.3325,0.8124 -0.417,1.7051 -0.2428,2.5654 0.1743,0.8603 0.5994,1.6497 1.2218,2.2687 0.6225,0.619 1.4142994,1.0397 2.2755994,1.2092 0.8612,0.1694 1.7534,0.0799 2.5639,-0.2571 0.8105,-0.337 1.5031,-0.9065 1.9902,-1.6367 0.4872,-0.7303 0.7471,-1.5884 0.7471,-2.4662 0,-0.0216 -0.0014,-0.0419 -0.0031,-0.0627 0.0017,-0.0208 0.0031,-0.0415 0.0031,-0.0627 -0.0029,-0.1444 0.023,-0.288 0.0764,-0.4223 0.0532,-0.1343 0.1328,-0.2566 0.2338,-0.3597 0.1012,-0.1032 0.2219,-0.1851 0.355,-0.2411 0.1332,-0.0559 0.2763,-0.0847 0.4207,-0.0847 0.1444,0 0.2875,0.0288 0.4206,0.0847 0.1332,0.056 0.2539,0.1379 0.355,0.2411 0.101,0.1031 0.1806,0.2254 0.2339,0.3597 0.0533,0.1343 0.0792,0.2779 0.0763,0.4223 0.002,1.7632 -0.696,3.4551 -1.9407,4.7041 -0.6034,0.62 -1.325,1.1127 -2.122,1.4492 -0.7971,0.3365 -1.6535,0.5098 -2.5187,0.5098 -0.8651,0 -1.7215,-0.1733 -2.5185994,-0.5098 -0.7971,-0.3365 -1.5186,-0.8292 -2.1221,-1.4492 -1.2429999,-1.25 -1.9406999,-2.9413 -1.9406999,-4.7041 0,-1.7629 0.6977,-3.4541005 1.9406999,-4.7042 0.6039,-0.6192 1.3255,-1.1115 2.1224,-1.4479 0.7967994,-0.3364 1.6527994,-0.5101 2.5177994,-0.5111 0.0666,-2e-4 0.1328,-0.0093 0.1969,-0.0272 0.631,-0.0968 1.204,-0.42314 1.6092,-0.91644 0.4051,-0.4933 0.6139,-1.11882 0.5862,-1.75657 -0.0277,-0.63776 -0.29,-1.24283 -0.7364,-1.69914 -0.4464,-0.45632 -1.0455,-0.73175 -1.6825,-0.77346 -0.0266,-0.0029 -0.0534,-0.00438 -0.0802,-0.00443 -0.015,0 -0.0298,0 -0.0447,0 -0.0074,0 -0.0145,0 -0.0216,0 -0.0072,0 -0.0145,8.6e-4 -0.0217,0.00108 -1.5409,0.01212 -3.0640994,0.32913 -4.4818994,0.93276 -1.4178999,0.60363 -2.7021399,1.48195 -3.7788799,2.5843 -2.22634,2.2409 -3.47585998,5.2714995 -3.47585998,8.4304 0,3.1588 1.24951998,6.1894 3.47585998,8.4303 1.08669,1.1136 2.38518,1.9986 3.8189799,2.6027 1.4338,0.6042 2.9740994,0.9155 4.5299994,0.9155 1.5559,0 3.0961,-0.3113 4.53,-0.9155 1.4338,-0.6041 2.7322,-1.4891 3.819,-2.6027 z",g="M11.4352 10.5208C10.6865 11.8758 9.96921 13.1879 9.23694 14.4902C9.04888 14.8246 8.9558 15.0969 9.10604 15.5219C9.52083 16.6959 8.93569 17.8385 7.83598 18.1486C6.79886 18.4411 5.78841 17.7073 5.58264 16.5119C5.4003 15.4539 6.16298 14.4167 7.2466 14.2513C7.33735 14.2373 7.43008 14.2357 7.58264 14.2234L9.23094 11.2478C8.19425 10.138 7.57721 8.84086 7.71376 7.23333C7.81029 6.09705 8.22537 5.11506 8.98396 4.31023C10.4369 2.76895 12.6536 2.51939 14.3644 3.70239C16.0075 4.83875 16.76 7.05222 16.1185 8.94669C15.6349 8.80553 15.1478 8.66317 14.6124 8.50682C14.8138 7.45349 14.6649 6.50767 14.005 5.69737C13.569 5.16239 13.0096 4.88198 12.3735 4.77866C11.0982 4.57126 9.84614 5.45328 9.47461 6.80083C9.0529 8.33011 9.69118 9.57944 11.4352 10.5209V10.5208Z M13.5743 8.91924C14.1018 9.92105 14.6374 10.938 15.1682 11.9456C17.8511 11.0519 19.874 12.6509 20.5997 14.3627C21.4763 16.4306 20.8771 18.8797 19.1556 20.1554C17.3886 21.465 15.1539 21.2413 13.5884 19.559C13.9874 19.1994 14.3884 18.8383 14.8168 18.4524C16.363 19.5306 17.7154 19.4798 18.7195 18.2031C19.5757 17.1139 19.5571 15.4899 18.6761 14.4236C17.6593 13.1931 16.2975 13.1556 14.6513 14.3367C13.9684 13.0325 13.2737 11.7386 12.6124 10.425C12.3894 9.98221 12.1433 9.72528 11.6407 9.63161C10.8015 9.47496 10.2597 8.69907 10.2271 7.82982C10.1952 6.97015 10.6656 6.19305 11.4009 5.89031C12.1293 5.5903 12.9841 5.83242 13.474 6.49913C13.8744 7.04384 14.0017 7.65692 13.791 8.32872C13.7324 8.51606 13.6565 8.69733 13.5743 8.91931V8.91924Z M14.8345 17.1074H11.6046C11.295 18.4782 10.6264 19.5849 9.47421 20.2887C8.57851 20.8357 7.61316 21.0211 6.58571 20.8425C4.69395 20.5141 3.14713 18.6807 3.01094 16.6163C2.85682 14.2776 4.34994 12.1988 6.34013 11.7319C6.47753 12.2691 6.6164 12.8115 6.7538 13.3474C4.92781 14.3503 4.29581 15.614 4.80686 17.1942C5.25672 18.5847 6.53462 19.347 7.92217 19.0522C9.33915 18.7512 10.0536 17.4834 9.96635 15.4488C11.3097 15.4488 12.6541 15.4338 13.9975 15.4561C14.5221 15.465 14.9271 15.4065 15.3223 14.9085C15.9729 14.0893 17.1705 14.1632 17.8712 14.937C18.5873 15.7277 18.5531 17.0001 17.7952 17.7575C17.0641 18.4883 15.909 18.4493 15.2249 17.6618C15.0843 17.4995 14.9736 17.3068 14.8345 17.1074Z",y="M12 22C7.664 22 4 19.965 4 17.556V6.444C4 4.035 7.664 2 12 2C16.336 2 20 4.035 20 6.444V17.556C20 19.965 16.337 22 12 22ZM6 14.9V17.559C6.07 18.112 8.309 19.781 12 19.781C15.691 19.781 17.931 18.107 18 17.553V14.9C16.1794 15.9554 14.1039 16.4905 12 16.447C9.89606 16.4906 7.82058 15.9554 6 14.9ZM6 9.341V12C6.07 12.553 8.309 14.222 12 14.222C15.691 14.222 17.931 12.548 18 11.994V9.341C16.1795 10.3968 14.104 10.9323 12 10.889C9.89596 10.9323 7.82046 10.3968 6 9.341ZM12 4.222C8.308 4.222 6.069 5.896 6 6.451C6.07 7 8.311 8.666 12 8.666C15.689 8.666 17.931 6.992 18 6.438C17.93 5.887 15.689 4.222 12 4.222Z",p="M14 2C15.8299 1.99913 17.6049 2.62567 19.0288 3.77513C20.4527 4.92458 21.4395 6.52748 21.8246 8.31647C22.2097 10.1055 21.9699 11.9724 21.145 13.6059C20.3202 15.2395 18.9602 16.5408 17.292 17.293C16.7587 18.4719 15.9475 19.5039 14.9278 20.3004C13.9082 21.097 12.7105 21.6343 11.4376 21.8663C10.1647 22.0984 8.85446 22.0182 7.61933 21.6327C6.3842 21.2472 5.261 20.5678 4.34608 19.6529C3.43115 18.738 2.7518 17.6148 2.36628 16.3796C1.98076 15.1445 1.90058 13.8343 2.13262 12.5614C2.36466 11.2884 2.90199 10.0908 3.69854 9.07114C4.49508 8.05148 5.52705 7.24024 6.70596 6.707C7.34011 5.30389 8.36555 4.1135 9.65931 3.27861C10.9531 2.44371 12.4602 1.99976 14 2ZM9.99996 8C9.21203 8 8.43182 8.1552 7.70386 8.45672C6.97591 8.75825 6.31447 9.20021 5.75732 9.75736C5.20017 10.3145 4.75822 10.9759 4.45669 11.7039C4.15516 12.4319 3.99996 13.2121 3.99996 14C3.99996 14.7879 4.15516 15.5681 4.45669 16.2961C4.75822 17.0241 5.20017 17.6855 5.75732 18.2426C6.31447 18.7998 6.97591 19.2417 7.70386 19.5433C8.43182 19.8448 9.21203 20 9.99996 20C11.5913 20 13.1174 19.3679 14.2426 18.2426C15.3678 17.1174 16 15.5913 16 14C16 12.4087 15.3678 10.8826 14.2426 9.75736C13.1174 8.63214 11.5913 8 9.99996 8ZM11 9V10H13V12H8.99996C8.87502 11.9998 8.75451 12.0463 8.66218 12.1305C8.56985 12.2147 8.51238 12.3304 8.50109 12.4548C8.4898 12.5793 8.52551 12.7034 8.60118 12.8028C8.67686 12.9023 8.78702 12.9697 8.90996 12.992L8.99996 13H11C11.663 13 12.2989 13.2634 12.7677 13.7322C13.2366 14.2011 13.5 14.837 13.5 15.5C13.5 16.163 13.2366 16.7989 12.7677 17.2678C12.2989 17.7366 11.663 18 11 18V19H8.99996V18H6.99996V16H11C11.1249 16.0002 11.2454 15.9537 11.3377 15.8695C11.4301 15.7853 11.4875 15.6696 11.4988 15.5452C11.5101 15.4207 11.4744 15.2966 11.3987 15.1972C11.3231 15.0977 11.2129 15.0303 11.09 15.008L11 15H8.99996C8.33692 15 7.70104 14.7366 7.2322 14.2678C6.76336 13.7989 6.49996 13.163 6.49996 12.5C6.49996 11.837 6.76336 11.2011 7.2322 10.7322C7.70104 10.2634 8.33692 10 8.99996 10V9H11ZM14 4C13.1526 3.99901 12.3148 4.17794 11.5418 4.52496C10.7688 4.87198 10.0783 5.37918 9.51596 6.013C10.6462 5.94439 11.7782 6.1165 12.837 6.51795C13.8958 6.9194 14.8573 7.54105 15.6579 8.34178C16.4586 9.14252 17.0801 10.1041 17.4814 11.1629C17.8827 12.2218 18.0547 13.3537 17.986 14.484C18.8952 13.6756 19.5372 12.6099 19.8268 11.4283C20.1164 10.2467 20.04 9.00492 19.6076 7.86772C19.1752 6.73053 18.4074 5.75164 17.4059 5.06088C16.4044 4.37013 15.2166 4.00014 14 4Z",m="m 18.081457,19.819029 h -1.737539 c 0,-2.398996 -1.944783,-4.343914 -4.343913,-4.343914 -2.3990779,0 -4.3439269,1.944918 -4.3439269,4.343914 H 5.9185126 c 0,-3.358595 2.7227765,-6.081452 6.0814924,-6.081452 3.358729,0 6.081452,2.722857 6.081452,6.081452 z m 3.473595,0 c 0,-0.456099 -0.08995,-0.907754 -0.264475,-1.329245 -0.174522,-0.421356 -0.430379,-0.804333 -0.752893,-1.126848 -0.322649,-0.322514 -0.705492,-0.578371 -1.126983,-0.752893 -0.421356,-0.174656 -0.873011,-0.264475 -1.329244,-0.264475 v -1.739155 c 0.592645,0 1.180174,0.100997 1.737673,0.298141 0.08645,0.03057 0.172232,0.06343 0.257203,0.09857 0.632371,0.262052 1.207107,0.645972 1.691081,1.13008 0.484108,0.483974 0.868028,1.058575 1.129945,1.691081 0.03528,0.08497 0.06814,0.170751 0.09871,0.257203 0.197144,0.557499 0.298141,1.145028 0.298141,1.737539 z M 18.870708,8.714525 C 18.626297,8.5899091 18.355897,8.5249484 18.081457,8.5249484 V 6.787383 c 0.548746,0 1.089681,0.1298811 1.578503,0.3791262 0.05386,0.027444 0.106921,0.056262 0.15917,0.086399 0.421625,0.2434681 0.788039,0.573214 1.074868,0.9683919 0.322246,0.4441004 0.534876,0.958198 0.620252,1.5002243 0.08537,0.5420396 0.04134,1.0965896 -0.128871,1.6182816 -0.170078,0.521679 -0.461351,0.995674 -0.84985,1.38323 -0.388498,0.387422 -0.86318,0.677483 -1.385398,0.846214 -0.464583,0.150147 -0.95502,0.200511 -1.439128,0.148532 -0.05993,-0.0065 -0.119715,-0.01441 -0.17937,-0.02397 -0.541474,-0.08672 -1.054669,-0.30043 -1.497706,-0.623483 l -9.43e-4,-6.74e-4 1.024236,-1.403618 c 0.221653,0.161729 0.478453,0.268637 0.749258,0.312051 0.270939,0.04336 0.548342,0.02209 0.809316,-0.06231 0.261109,-0.08437 0.498517,-0.229356 0.692699,-0.423094 0.194317,-0.193751 0.339886,-0.430742 0.424857,-0.691568 0.08511,-0.260839 0.107191,-0.538107 0.0645,-0.8091135 C 19.755165,9.7209991 19.648917,9.4639571 19.487728,9.2419136 19.326538,9.0198701 19.115119,8.8391543 18.870708,8.714525 Z M 12.000005,4.1809675 c -2.3990779,0 -4.3439269,1.94485 -4.3439269,4.343927 0,2.3990765 1.944849,4.3439805 4.3439269,4.3439805 2.39913,0 4.343913,-1.944904 4.343913,-4.3439805 0,-2.399077 -1.944783,-4.343927 -4.343913,-4.343927 z m -2.6063489,4.343927 c 0,-1.4394516 1.1668969,-2.6063481 2.6063489,-2.6063481 1.439397,0 2.606375,1.1668965 2.606375,2.6063481 0,1.4394516 -1.166978,2.6063475 -2.606375,2.6063475 -1.439452,0 -2.6063489,-1.1668959 -2.6063489,-2.6063475 z M 2.4450112,19.819029 c 0,-0.456099 0.089846,-0.907754 0.264408,-1.329245 0.1745483,-0.421356 0.4304054,-0.804333 0.7529468,-1.126848 0.3225414,-0.322514 0.7054651,-0.578371 1.1268886,-0.753028 0.4214234,-0.174521 0.8731053,-0.26434 1.3292445,-0.26434 v -1.739289 c -0.5925783,0 -1.1801338,0.101131 -1.7375654,0.29814 -0.086507,0.03057 -0.172286,0.06356 -0.2572575,0.09871 -0.6324247,0.261917 -1.2070796,0.645972 -1.6911206,1.129946 -0.4840411,0.484108 -0.8680017,1.058709 -1.1299724,1.691215 -0.035187,0.08484 -0.068085,0.170616 -0.098666,0.257203 -0.1970907,0.557365 -0.2981273,1.145028 -0.2981273,1.737539 z M 5.1292745,8.7144846 C 5.3736987,8.5898687 5.6441531,8.5248945 5.9184991,8.5248945 V 6.7873291 c -0.548719,0 -1.0896412,0.1298811 -1.5784897,0.3791262 -0.053838,0.027457 -0.1068809,0.056262 -0.1590757,0.086399 C 3.7592275,7.4963224 3.3927864,7.8260682 3.1059841,8.2212461 2.7836851,8.6653465 2.5711352,9.1794441 2.4857194,9.7214839 2.4003034,10.26351 2.4444594,10.81806 2.614577,11.339752 c 0.1701045,0.521693 0.4613372,0.995728 0.8498493,1.38315 0.3885122,0.387556 0.8632616,0.677482 1.3853984,0.846213 0.4646229,0.150148 0.9550066,0.200511 1.4391688,0.148667 0.059924,-0.0065 0.1197546,-0.01441 0.1794231,-0.02397 0.5414475,-0.08686 1.0546565,-0.30043 1.4976925,-0.623618 l 9.16e-4,-6.73e-4 -1.024263,-1.403524 c -0.221626,0.161715 -0.4784122,0.268623 -0.7493109,0.312038 -0.2708988,0.04341 -0.5482208,0.022 -0.8092758,-0.06231 C 5.1231204,11.831361 4.8857525,11.686371 4.6915031,11.492633 4.4972538,11.298882 4.3516442,11.061905 4.2665919,10.801065 4.1815397,10.540226 4.1594552,10.262958 4.2021564,9.9919515 4.244871,9.7209453 4.3511459,9.4639032 4.512282,9.2418597 4.6734315,9.0198162 4.8848637,8.8391004 5.1292745,8.7144846 Z",v="M21.2664 20.9981H2.73337C2.37611 20.9981 2.04599 20.8075 1.86737 20.4981C1.68874 20.1887 1.68874 19.8075 1.86737 19.4981L11.1334 3.49811C11.3121 3.18923 11.642 2.99902 11.9989 2.99902C12.3558 2.99902 12.6856 3.18923 12.8644 3.49811L22.1304 19.4981C22.3089 19.8074 22.309 20.1883 22.1306 20.4977C21.9522 20.807 21.6225 20.9977 21.2654 20.9981H21.2664ZM12.0004 5.99811L4.46937 18.9981H19.5334L12.0004 5.99811ZM12.9954 14.9991H10.9954V9.99811H12.9954V14.9991Z M11.0004 16.0001H13.0004V18.0001H11.0004V16.0001Z",w="M10 16.5L16 12L10 7.5V16.5ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",z="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z",D="M17.001 20H6.00098C4.89641 20 4.00098 19.1046 4.00098 18V7C4.00098 5.89543 4.89641 5 6.00098 5H10.001V7H6.00098V18H17.001V14H19.001V18C19.001 19.1046 18.1055 20 17.001 20ZM11.701 13.707L10.291 12.293L16.584 6H13.001V4H20.001V11H18.001V7.415L11.701 13.707Z",I="M19.14,7.5A2.86,2.86 0 0,1 22,10.36V14.14A2.86,2.86 0 0,1 19.14,17H12C12,17.39 12.32,17.96 12.71,17.96H17V19.64A2.86,2.86 0 0,1 14.14,22.5H9.86A2.86,2.86 0 0,1 7,19.64V15.89C7,14.31 8.28,13.04 9.86,13.04H15.11C16.69,13.04 17.96,11.76 17.96,10.18V7.5H19.14M14.86,19.29C14.46,19.29 14.14,19.59 14.14,20.18C14.14,20.77 14.46,20.89 14.86,20.89A0.71,0.71 0 0,0 15.57,20.18C15.57,19.59 15.25,19.29 14.86,19.29M4.86,17.5C3.28,17.5 2,16.22 2,14.64V10.86C2,9.28 3.28,8 4.86,8H12C12,7.61 11.68,7.04 11.29,7.04H7V5.36C7,3.78 8.28,2.5 9.86,2.5H14.14C15.72,2.5 17,3.78 17,5.36V9.11C17,10.69 15.72,11.96 14.14,11.96H8.89C7.31,11.96 6.04,13.24 6.04,14.82V17.5H4.86M9.14,5.71C9.54,5.71 9.86,5.41 9.86,4.82C9.86,4.23 9.54,4.11 9.14,4.11C8.75,4.11 8.43,4.23 8.43,4.82C8.43,5.41 8.75,5.71 9.14,5.71Z",k="M12 2.79883C6.48 2.79883 2 7.27883 2 12.7988C2 18.3188 6.48 22.7988 12 22.7988C17.52 22.7988 22 18.3188 22 12.7988C22 7.27883 17.52 2.79883 12 2.79883ZM13 17.7988H11V15.7988H13V17.7988ZM13 13.7988H11V7.79883H13V13.7988Z",S="M4 6.79883H2V20.7988C2 21.8988 2.9 22.7988 4 22.7988H18V20.7988H4V6.79883ZM20 2.79883H8C6.9 2.79883 6 3.69883 6 4.79883V16.7988C6 17.8988 6.9 18.7988 8 18.7988H20C21.1 18.7988 22 17.8988 22 16.7988V4.79883C22 3.69883 21.1 2.79883 20 2.79883ZM20 16.7988H8V4.79883H20V16.7988ZM13 15.7988H15V11.7988H19V9.79883H15V5.79883H13V9.79883H9V11.7988H13V15.7988Z",R="M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z",O="M12.0106 3C12.7162 3.00738 13.419 3.08585 14.1073 3.23355C14.2539 3.26498 14.3867 3.33961 14.487 3.44702C14.5873 3.55444 14.6502 3.68926 14.6668 3.83264L14.8302 5.24223C14.8533 5.44108 14.9246 5.63196 15.0385 5.79949C15.1524 5.96702 15.3057 6.10652 15.4861 6.20675C15.6664 6.30698 15.8687 6.36514 16.0768 6.37655C16.2848 6.38795 16.4927 6.35229 16.6837 6.27242L18.0296 5.70471C18.1664 5.64687 18.3185 5.63127 18.4649 5.66004C18.6112 5.68882 18.7447 5.76055 18.8468 5.86533C19.8196 6.86331 20.544 8.06013 20.9656 9.36575C21.0098 9.50296 21.0085 9.64997 20.9618 9.78642C20.9151 9.92287 20.8254 10.042 20.7051 10.1273L19.5111 10.9729C19.3431 11.0913 19.2064 11.246 19.1123 11.4245C19.0182 11.6031 18.9691 11.8004 18.9692 12.0005C18.9693 12.2007 19.0185 12.3979 19.1128 12.5764C19.2071 12.7549 19.3439 12.9095 19.5121 13.0277L20.707 13.8724C20.8275 13.9577 20.9174 14.077 20.9641 14.2137C21.0108 14.3503 21.012 14.4975 20.9676 14.6349C20.5461 15.9403 19.822 17.1371 18.8497 18.1353C18.7478 18.24 18.6145 18.3118 18.4683 18.3407C18.3222 18.3697 18.1702 18.3543 18.0335 18.2968L16.6818 17.7273C16.491 17.6468 16.2832 17.6106 16.0751 17.6216C15.867 17.6326 15.6646 17.6905 15.4842 17.7907C15.3038 17.8908 15.1504 18.0304 15.0367 18.198C14.9229 18.3657 14.8518 18.5567 14.8293 18.7556L14.6668 20.1643C14.6504 20.3061 14.5888 20.4396 14.4904 20.5465C14.3919 20.6534 14.2615 20.7285 14.1169 20.7615C12.7247 21.0795 11.2743 21.0795 9.88213 20.7615C9.73754 20.7285 9.60711 20.6534 9.50867 20.5465C9.41024 20.4396 9.34861 20.3061 9.33223 20.1643L9.1688 18.7575C9.14515 18.5594 9.07349 18.3694 8.95956 18.2027C8.84564 18.0361 8.69262 17.8974 8.51278 17.7977C8.33294 17.6981 8.13129 17.6403 7.924 17.6291C7.71671 17.6178 7.50955 17.6533 7.31915 17.7328L5.96651 18.3014C5.82979 18.359 5.67785 18.3743 5.53165 18.3454C5.38546 18.3164 5.25222 18.2446 5.15032 18.1399C4.17749 17.1407 3.45337 15.9426 3.03245 14.6358C2.98803 14.4984 2.98924 14.3512 3.03593 14.2146C3.08262 14.078 3.17246 13.9587 3.29298 13.8733L4.48891 13.0277C4.657 12.9094 4.79369 12.7547 4.88792 12.5762C4.98214 12.3977 5.03125 12.2004 5.03125 12.0003C5.03125 11.8002 4.98214 11.6029 4.88792 11.4244C4.79369 11.2459 4.657 11.0912 4.48891 10.9729L3.29394 10.1292C3.17325 10.0439 3.08322 9.92468 3.03635 9.78803C2.98949 9.65138 2.98813 9.50411 3.03245 9.36668C3.45431 8.06097 4.17909 6.86414 5.15224 5.86625C5.25425 5.76167 5.38755 5.69005 5.53373 5.66128C5.67992 5.63251 5.83181 5.64801 5.96844 5.70563L7.31434 6.27334C7.50567 6.35298 7.71378 6.38842 7.92196 6.37681C8.13014 6.3652 8.33259 6.30687 8.51303 6.2065C8.69347 6.10614 8.84689 5.96653 8.96094 5.7989C9.075 5.63127 9.14652 5.44029 9.16976 5.24131L9.33319 3.83264C9.34969 3.68897 9.4126 3.55385 9.51312 3.44624C9.61363 3.33864 9.7467 3.26394 9.89366 3.23262C10.5839 3.08585 11.2876 3.00831 12.0106 3ZM12.0106 4.38466C11.5742 4.38953 11.1387 4.42563 10.7079 4.49267L10.6031 5.39454C10.5552 5.80954 10.4062 6.20789 10.1684 6.55746C9.93062 6.90704 9.61056 7.19804 9.23408 7.407C8.85761 7.61596 8.43525 7.73702 8.00108 7.76042C7.56692 7.78381 7.1331 7.70889 6.73464 7.54169L5.87134 7.17799C5.32143 7.81874 4.88375 8.54112 4.57543 9.31683L5.34259 9.8587C5.69273 10.1058 5.97742 10.4285 6.17363 10.8008C6.36985 11.1731 6.47209 11.5845 6.47209 12.0017C6.47209 12.4189 6.36985 12.8303 6.17363 13.2026C5.97742 13.5749 5.69273 13.8976 5.34259 14.1447L4.57543 14.6875C4.88306 15.4647 5.32048 16.1884 5.87038 16.8309L6.74137 16.4645C7.13888 16.2978 7.57159 16.2231 8.00466 16.2463C8.43774 16.2696 8.85908 16.3902 9.23476 16.5983C9.61045 16.8065 9.92999 17.0964 10.1677 17.4448C10.4053 17.7932 10.5545 18.1904 10.6031 18.6042L10.707 19.5126C11.5626 19.651 12.4365 19.651 13.2921 19.5126L13.3959 18.6042C13.4435 18.1895 13.592 17.7913 13.8295 17.442C14.0671 17.0926 14.3869 16.8018 14.7631 16.5931C15.1394 16.3844 15.5615 16.2637 15.9954 16.2407C16.4293 16.2177 16.8627 16.2931 17.2606 16.4608L18.1296 16.8263C18.6792 16.1852 19.1165 15.4625 19.4246 14.6866L18.6574 14.1438C18.3071 13.8968 18.0222 13.5741 17.8259 13.2018C17.6296 12.8295 17.5272 12.4181 17.5272 12.0008C17.5272 11.5835 17.6296 11.172 17.8259 10.7997C18.0222 10.4274 18.3071 10.1047 18.6574 9.85777L19.4226 9.31591C19.1143 8.5402 18.6766 7.81781 18.1267 7.17706L17.2654 7.53985C16.8671 7.70725 16.4335 7.78239 15.9994 7.75919C15.5653 7.73599 15.143 7.61511 14.7666 7.4063C14.3902 7.1975 14.0701 6.90662 13.8324 6.55715C13.5946 6.20769 13.4457 5.80943 13.3978 5.39454L13.2921 4.49359C12.8683 4.42707 12.4399 4.39097 12.0106 4.38559V4.38466ZM11.9981 8.53865C12.9542 8.53865 13.8712 8.90336 14.5473 9.55255C15.2233 10.2017 15.6032 11.0822 15.6032 12.0003C15.6032 12.9184 15.2233 13.7989 14.5473 14.4481C13.8712 15.0973 12.9542 15.462 11.9981 15.462C11.0419 15.462 10.125 15.0973 9.44889 14.4481C8.7728 13.7989 8.39298 12.9184 8.39298 12.0003C8.39298 11.0822 8.7728 10.2017 9.44889 9.55255C10.125 8.90336 11.0419 8.53865 11.9981 8.53865ZM11.9981 9.92331C11.4244 9.92331 10.8742 10.1421 10.4686 10.5316C10.0629 10.9212 9.83502 11.4495 9.83502 12.0003C9.83502 12.5512 10.0629 13.0794 10.4686 13.469C10.8742 13.8585 11.4244 14.0773 11.9981 14.0773C12.5718 14.0773 13.1219 13.8585 13.5276 13.469C13.9332 13.0794 14.1611 12.5512 14.1611 12.0003C14.1611 11.4495 13.9332 10.9212 13.5276 10.5316C13.1219 10.1421 12.5718 9.92331 11.9981 9.92331Z",_="M7.5,5.6L5,7L6.4,4.5L5,2L7.5,3.4L10,2L8.6,4.5L10,7L7.5,5.6M19.5,15.4L22,14L20.6,16.5L22,19L19.5,17.6L17,19L18.4,16.5L17,14L19.5,15.4M22,2L20.6,4.5L22,7L19.5,5.6L17,7L18.4,4.5L17,2L19.5,3.4L22,2M13.34,12.78L15.78,10.34L13.66,8.22L11.22,10.66L13.34,12.78M14.37,7.29L16.71,9.63C17.1,10 17.1,10.65 16.71,11.04L5.04,22.71C4.65,23.1 4,23.1 3.63,22.71L1.29,20.37C0.9,20 0.9,19.35 1.29,18.96L12.96,7.29C13.35,6.9 14,6.9 14.37,7.29Z",x="M21.4 7.5C22.2 8.3 22.2 9.6 21.4 10.3L18.6 13.1L10.8 5.3L13.6 2.5C14.4 1.7 15.7 1.7 16.4 2.5L18.2 4.3L21.2 1.3L22.6 2.7L19.6 5.7L21.4 7.5M15.6 13.3L14.2 11.9L11.4 14.7L9.3 12.6L12.1 9.8L10.7 8.4L7.9 11.2L6.4 9.8L3.6 12.6C2.8 13.4 2.8 14.7 3.6 15.4L5.4 17.2L1.4 21.2L2.8 22.6L6.8 18.6L8.6 20.4C9.4 21.2 10.7 21.2 11.4 20.4L14.2 17.6L12.8 16.2L15.6 13.3Z",E="M12 6.5C15.79 6.5 19.17 8.63 20.82 12C19.17 15.37 15.8 17.5 12 17.5C8.2 17.5 4.83 15.37 3.18 12C4.83 8.63 8.21 6.5 12 6.5ZM12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 9.5C13.38 9.5 14.5 10.62 14.5 12C14.5 13.38 13.38 14.5 12 14.5C10.62 14.5 9.5 13.38 9.5 12C9.5 10.62 10.62 9.5 12 9.5ZM12 7.5C9.52 7.5 7.5 9.52 7.5 12C7.5 14.48 9.52 16.5 12 16.5C14.48 16.5 16.5 14.48 16.5 12C16.5 9.52 14.48 7.5 12 7.5Z",F={d:"M2 3C2 2.44772 2.44772 2 3 2H21C21.5523 2 22 2.44772 22 3V10C22 10.5523 21.5523 11 21 11H3C2.44772 11 2 10.5523 2 10V3ZM4 4V9H20V4H4ZM10 14C10 13.4477 10.4477 13 11 13H21C21.5523 13 22 13.4477 22 14V21C22 21.5523 21.5523 22 21 22H11C10.4477 22 10 21.5523 10 21V14ZM12 15V20H20V15H12ZM3 13C2.44772 13 2 13.4477 2 14V21C2 21.5523 2.44772 22 3 22H7C7.55228 22 8 21.5523 8 21V14C8 13.4477 7.55228 13 7 13H3ZM4 20V15H6V20H4Z",fillRule:"evenodd",clipRule:"evenodd"},j="M12.4142 18.2114L10.9992 16.7984L15.5992 12.1984L10.9992 7.59841L12.4142 6.19141L18.4242 12.2014L12.4152 18.2114H12.4142ZM6.9892 18.2114L5.5752 16.7984L10.1752 12.1984L5.5752 7.60541L6.9892 6.19141L13.0002 12.2014L6.9902 18.2114H6.9892Z",q="M10.0719 8.02397L5.7146 3.66666L6.33332 3.04794L11 7.71461V8.33333L6.33332 13L5.7146 12.3813L10.0719 8.02397Z",B="M7.97612 10.0719L12.3334 5.7146L12.9521 6.33332L8.28548 11L7.66676 11L3.0001 6.33332L3.61882 5.7146L7.97612 10.0719Z",G="M15.4286 9.33333V18.2222H8.57143V9.33333H15.4286ZM14.1429 4H9.85714L9 4.88889H6V6.66667H18V4.88889H15L14.1429 4ZM17.1429 7.55556H6.85714V18.2222C6.85714 19.2 7.62857 20 8.57143 20H15.4286C16.3714 20 17.1429 19.2 17.1429 18.2222V7.55556Z",J="M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z",K="M20 8H17.19C16.74 7.22 16.12 6.55 15.37 6.04L17 4.41L15.59 3L13.42 5.17C12.96 5.06 12.49 5 12 5C11.51 5 11.04 5.06 10.59 5.17L8.41 3L7 4.41L8.62 6.04C7.88 6.55 7.26 7.22 6.81 8H4V10H6.09C6.04 10.33 6 10.66 6 11V12H4V14H6V15C6 15.34 6.04 15.67 6.09 16H4V18H6.81C7.85 19.79 9.78 21 12 21C14.22 21 16.15 19.79 17.19 18H20V16H17.91C17.96 15.67 18 15.34 18 15V14H20V12H18V11C18 10.66 17.96 10.33 17.91 10H20V8ZM16 12V15C16 15.22 15.97 15.47 15.93 15.7L15.83 16.35L15.46 17C14.74 18.24 13.42 19 12 19C10.58 19 9.26 18.23 8.54 17L8.17 16.36L8.07 15.71C8.03 15.48 8 15.23 8 15V11C8 10.77 8.03 10.52 8.07 10.3L8.17 9.65L8.54 9C8.84 8.48 9.26 8.03 9.75 7.69L10.32 7.3L11.06 7.12C11.37 7.04 11.69 7 12 7C12.32 7 12.63 7.04 12.95 7.12L13.63 7.28L14.24 7.7C14.74 8.04 15.15 8.48 15.45 9.01L15.83 9.66L15.93 10.31C15.97 10.53 16 10.78 16 11V12ZM10 14H14V16H10V14ZM10 10H14V12H10V10Z";export{R as A,w as B,n as C,c as D,b as E,m as F,p as G,D as H,x as I,a as J,u as K,O as L,e as M,f as N,k as O,F as a,y as b,A as c,t as d,v as e,Z as f,z as g,S as h,o as i,l as j,_ as k,h as l,d as m,J as n,K as o,I as p,j as q,G as r,r as s,E as t,s as u,M as v,g as w,B as x,q as y,i as z}; +//# sourceMappingURL=icons.9cfdae6d.js.map diff --git a/abstra_statics/dist/assets/index.a2df0371.js b/abstra_statics/dist/assets/index.d40cd19f.js similarity index 97% rename from abstra_statics/dist/assets/index.a2df0371.js rename to abstra_statics/dist/assets/index.d40cd19f.js index 06f8a92952..a56827b511 100644 --- a/abstra_statics/dist/assets/index.a2df0371.js +++ b/abstra_statics/dist/assets/index.d40cd19f.js @@ -1,2 +1,2 @@ -import{p as y}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="35424404-d561-40cf-9191-6e2442662f49",e._sentryDebugIdIdentifier="sentry-dbid-35424404-d561-40cf-9191-6e2442662f49")}catch{}})();var d={exports:{}};(function(e,i){(function(r,s,t){e.exports=t(),e.exports.default=t()})("slugify",y,function(){var r=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),s=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function t(n,a){if(typeof n!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var h=s[a.locale]||{},c=a.replacement===void 0?"-":a.replacement,f=a.trim===void 0?!0:a.trim,o=n.normalize().split("").reduce(function(m,u){var l=h[u]||r[u]||u;return l===c&&(l=" "),m+l.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(o=o.replace(/[^A-Za-z0-9\s]/g,"")),f&&(o=o.trim()),o=o.replace(/\s+/g,c),a.lower&&(o=o.toLowerCase()),o}return t.extend=function(n){Object.assign(r,n)},t})})(d);const g=d.exports,E=()=>{const{hostname:e}=window.location;return e.includes("abstra.run")?null:e.startsWith("localhost")?{}.VITE_CNAME?{}.VITE_CNAME:null:e};function A(e,i){const r=document,s=e.matched.slice().reverse().find(n=>n.meta&&n.meta.title),t=i.matched.slice().reverse().find(n=>n.meta&&n.meta.metaTags);s?r.title=s.meta.title:t&&(r.title=t.meta.title)}function O(e,i,r={}){if(i.startsWith("http")){const s=new URLSearchParams(r),t=new URL(i);t.search=s.toString(),window.location.href=t.toString()}else e.push({path:i,query:r})}export{E as g,O as r,g as s,A as u}; -//# sourceMappingURL=index.a2df0371.js.map +import{p as y}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="e4128098-da35-4e00-b290-b7debd259b32",e._sentryDebugIdIdentifier="sentry-dbid-e4128098-da35-4e00-b290-b7debd259b32")}catch{}})();var d={exports:{}};(function(e,i){(function(r,s,t){e.exports=t(),e.exports.default=t()})("slugify",y,function(){var r=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),s=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function t(n,a){if(typeof n!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var h=s[a.locale]||{},c=a.replacement===void 0?"-":a.replacement,f=a.trim===void 0?!0:a.trim,o=n.normalize().split("").reduce(function(m,u){var l=h[u]||r[u]||u;return l===c&&(l=" "),m+l.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(o=o.replace(/[^A-Za-z0-9\s]/g,"")),f&&(o=o.trim()),o=o.replace(/\s+/g,c),a.lower&&(o=o.toLowerCase()),o}return t.extend=function(n){Object.assign(r,n)},t})})(d);const g=d.exports,E=()=>{const{hostname:e}=window.location;return e.includes("abstra.run")?null:e.startsWith("localhost")?{}.VITE_CNAME?{}.VITE_CNAME:null:e};function A(e,i){const r=document,s=e.matched.slice().reverse().find(n=>n.meta&&n.meta.title),t=i.matched.slice().reverse().find(n=>n.meta&&n.meta.metaTags);s?r.title=s.meta.title:t&&(r.title=t.meta.title)}function O(e,i,r={}){if(i.startsWith("http")){const s=new URLSearchParams(r),t=new URL(i);t.search=s.toString(),window.location.href=t.toString()}else e.push({path:i,query:r})}export{E as g,O as r,g as s,A as u}; +//# sourceMappingURL=index.d40cd19f.js.map diff --git a/abstra_statics/dist/assets/index.a86d8064.js b/abstra_statics/dist/assets/index.dae46ea1.js similarity index 76% rename from abstra_statics/dist/assets/index.a86d8064.js rename to abstra_statics/dist/assets/index.dae46ea1.js index 83b62cda59..9478df856f 100644 --- a/abstra_statics/dist/assets/index.a86d8064.js +++ b/abstra_statics/dist/assets/index.dae46ea1.js @@ -1,2 +1,2 @@ -import{p as C}from"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_=new Error().stack;_&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[_]="bdbec4f0-f1df-4460-a0da-4dc38e7664ac",r._sentryDebugIdIdentifier="sentry-dbid-bdbec4f0-f1df-4460-a0da-4dc38e7664ac")}catch{}})();var Et={},$e={};Object.defineProperty($e,"__esModule",{value:!0});var Ae={},Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.airtable=void 0;Te.airtable={label:"Airtable",settings:{baseId:{label:"Base ID",type:"string",description:"The Airtable base ID to connect to",required:!0,secret:!1},apiKey:{label:"API Key",type:"string",description:"The api key to access the database",required:!0,secret:!0}},methods:{list_records:{label:"List Records",params:{table_id:{label:"Table ID",type:"string",required:!0,description:"The ID of the table to get"},fields:{label:"Fields",type:"array",required:!1,description:"The fields to return",items:{type:"string"}},filter_by_formula:{label:"Filter By Formula",type:"string",required:!1,description:"The formula to filter by"},max_records:{label:"Max Records",type:"number",description:"The maximum number of records to return",required:!1},view:{label:"View",type:"string",description:"The view to use",required:!1},sort:{label:"Sort",type:"array",description:"The sort to use",required:!1,items:{type:"object",values:{field:{type:"string"},direction:{type:"options",values:["asc","desc"]}}}},include_record_id:{label:"Include Record ID",type:"boolean",description:"Whether to include the record ID",required:!1}},returns:{records:{label:"Records",type:"array",description:"The records returned",items:{type:"any"}}}},update_record:{label:"Update Record",params:{table_id:{label:"Table ID",type:"string",required:!0,description:"The ID of the table to get"},fields:{label:"Fields",type:"any",required:!0,description:"The fields to update"},record_id:{label:"Record ID",type:"string",required:!0,description:"The ID of the record to update"},include_record_id:{label:"Include Record ID",type:"boolean",description:"Whether to include the record ID",required:!1}},returns:{record:{label:"Record",type:"any",description:"The record returned"}}}}};var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.postgres=void 0;Ze.postgres={label:"Postgres",settings:{connectionString:{label:"Connection String",type:"string",description:"The connection string for the Postgres database",required:!0,secret:!0}},methods:{query:{label:"Query",params:{query:{label:"SQL Query",type:"string",required:!0,description:"The SQL query to execute"},params:{label:"Query Parameters",type:"array",required:!1,description:"The parameters to pass to the query",items:{type:"any"}}},returns:{result:{label:"Result Rows",type:"array",items:{type:"any"},description:"The query result"}}}}};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.connectorNames=r.schema=void 0;const _=Te,d=Ze;r.schema={airtable:_.airtable,postgres:d.postgres},r.connectorNames=Object.keys(r.schema)})(Ae);var re={},ze={},Ee={},D={},Ce={},pe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getParsedType=r.ZodParsedType=r.objectUtil=r.util=void 0;var _;(function(i){i.assertEqual=y=>y;function u(y){}i.assertIs=u;function c(y){throw new Error}i.assertNever=c,i.arrayToEnum=y=>{const f={};for(const p of y)f[p]=p;return f},i.getValidEnumValues=y=>{const f=i.objectKeys(y).filter(R=>typeof y[y[R]]!="number"),p={};for(const R of f)p[R]=y[R];return i.objectValues(p)},i.objectValues=y=>i.objectKeys(y).map(function(f){return y[f]}),i.objectKeys=typeof Object.keys=="function"?y=>Object.keys(y):y=>{const f=[];for(const p in y)Object.prototype.hasOwnProperty.call(y,p)&&f.push(p);return f},i.find=(y,f)=>{for(const p of y)if(f(p))return p},i.isInteger=typeof Number.isInteger=="function"?y=>Number.isInteger(y):y=>typeof y=="number"&&isFinite(y)&&Math.floor(y)===y;function m(y,f=" | "){return y.map(p=>typeof p=="string"?`'${p}'`:p).join(f)}i.joinValues=m,i.jsonStringifyReplacer=(y,f)=>typeof f=="bigint"?f.toString():f})(_=r.util||(r.util={})),function(i){i.mergeShapes=(u,c)=>({...u,...c})}(r.objectUtil||(r.objectUtil={})),r.ZodParsedType=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const d=i=>{switch(typeof i){case"undefined":return r.ZodParsedType.undefined;case"string":return r.ZodParsedType.string;case"number":return isNaN(i)?r.ZodParsedType.nan:r.ZodParsedType.number;case"boolean":return r.ZodParsedType.boolean;case"function":return r.ZodParsedType.function;case"bigint":return r.ZodParsedType.bigint;case"symbol":return r.ZodParsedType.symbol;case"object":return Array.isArray(i)?r.ZodParsedType.array:i===null?r.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?r.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?r.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?r.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?r.ZodParsedType.date:r.ZodParsedType.object;default:return r.ZodParsedType.unknown}};r.getParsedType=d})(pe);var V={};Object.defineProperty(V,"__esModule",{value:!0});V.ZodError=V.quotelessJson=V.ZodIssueCode=void 0;const Be=pe;V.ZodIssueCode=Be.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const xt=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");V.quotelessJson=xt;class xe extends Error{constructor(_){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const d=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,d):this.__proto__=d,this.name="ZodError",this.issues=_}get errors(){return this.issues}format(_){const d=_||function(c){return c.message},i={_errors:[]},u=c=>{for(const m of c.issues)if(m.code==="invalid_union")m.unionErrors.map(u);else if(m.code==="invalid_return_type")u(m.returnTypeError);else if(m.code==="invalid_arguments")u(m.argumentsError);else if(m.path.length===0)i._errors.push(d(m));else{let y=i,f=0;for(;fd.message){const d={},i=[];for(const u of this.issues)u.path.length>0?(d[u.path[0]]=d[u.path[0]]||[],d[u.path[0]].push(_(u))):i.push(_(u));return{formErrors:i,fieldErrors:d}}get formErrors(){return this.flatten()}}V.ZodError=xe;xe.create=r=>new xe(r);Object.defineProperty(Ce,"__esModule",{value:!0});const Y=pe,w=V,St=(r,_)=>{let d;switch(r.code){case w.ZodIssueCode.invalid_type:r.received===Y.ZodParsedType.undefined?d="Required":d=`Expected ${r.expected}, received ${r.received}`;break;case w.ZodIssueCode.invalid_literal:d=`Invalid literal value, expected ${JSON.stringify(r.expected,Y.util.jsonStringifyReplacer)}`;break;case w.ZodIssueCode.unrecognized_keys:d=`Unrecognized key(s) in object: ${Y.util.joinValues(r.keys,", ")}`;break;case w.ZodIssueCode.invalid_union:d="Invalid input";break;case w.ZodIssueCode.invalid_union_discriminator:d=`Invalid discriminator value. Expected ${Y.util.joinValues(r.options)}`;break;case w.ZodIssueCode.invalid_enum_value:d=`Invalid enum value. Expected ${Y.util.joinValues(r.options)}, received '${r.received}'`;break;case w.ZodIssueCode.invalid_arguments:d="Invalid function arguments";break;case w.ZodIssueCode.invalid_return_type:d="Invalid function return type";break;case w.ZodIssueCode.invalid_date:d="Invalid date";break;case w.ZodIssueCode.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(d=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(d=`${d} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?d=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?d=`Invalid input: must end with "${r.validation.endsWith}"`:Y.util.assertNever(r.validation):r.validation!=="regex"?d=`Invalid ${r.validation}`:d="Invalid";break;case w.ZodIssueCode.too_small:r.type==="array"?d=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?d=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?d=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?d=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:d="Invalid input";break;case w.ZodIssueCode.too_big:r.type==="array"?d=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?d=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?d=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?d=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?d=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:d="Invalid input";break;case w.ZodIssueCode.custom:d="Invalid input";break;case w.ZodIssueCode.invalid_intersection_types:d="Intersection results could not be merged";break;case w.ZodIssueCode.not_multiple_of:d=`Number must be a multiple of ${r.multipleOf}`;break;case w.ZodIssueCode.not_finite:d="Number must be finite";break;default:d=_.defaultError,Y.util.assertNever(r)}return{message:d}};Ce.default=St;var At=C&&C.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(D,"__esModule",{value:!0});D.getErrorMap=D.setErrorMap=D.defaultErrorMap=void 0;const qe=At(Ce);D.defaultErrorMap=qe.default;let Ke=qe.default;function jt(r){Ke=r}D.setErrorMap=jt;function Dt(){return Ke}D.getErrorMap=Dt;var je={};(function(r){var _=C&&C.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0}),r.isAsync=r.isValid=r.isDirty=r.isAborted=r.OK=r.DIRTY=r.INVALID=r.ParseStatus=r.addIssueToContext=r.EMPTY_PATH=r.makeIssue=void 0;const d=D,i=_(Ce),u=T=>{const{data:N,path:x,errorMaps:O,issueData:k}=T,L=[...x,...k.path||[]],$={...k,path:L};let P="";const Pe=O.filter(E=>!!E).slice().reverse();for(const E of Pe)P=E($,{data:N,defaultError:P}).message;return{...k,path:L,message:k.message||P}};r.makeIssue=u,r.EMPTY_PATH=[];function c(T,N){const x=(0,r.makeIssue)({issueData:N,data:T.data,path:T.path,errorMaps:[T.common.contextualErrorMap,T.schemaErrorMap,(0,d.getErrorMap)(),i.default].filter(O=>!!O)});T.common.issues.push(x)}r.addIssueToContext=c;class m{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(N,x){const O=[];for(const k of x){if(k.status==="aborted")return r.INVALID;k.status==="dirty"&&N.dirty(),O.push(k.value)}return{status:N.value,value:O}}static async mergeObjectAsync(N,x){const O=[];for(const k of x)O.push({key:await k.key,value:await k.value});return m.mergeObjectSync(N,O)}static mergeObjectSync(N,x){const O={};for(const k of x){const{key:L,value:$}=k;if(L.status==="aborted"||$.status==="aborted")return r.INVALID;L.status==="dirty"&&N.dirty(),$.status==="dirty"&&N.dirty(),(typeof $.value<"u"||k.alwaysSet)&&(O[L.value]=$.value)}return{status:N.value,value:O}}}r.ParseStatus=m,r.INVALID=Object.freeze({status:"aborted"});const y=T=>({status:"dirty",value:T});r.DIRTY=y;const f=T=>({status:"valid",value:T});r.OK=f;const p=T=>T.status==="aborted";r.isAborted=p;const R=T=>T.status==="dirty";r.isDirty=R;const ke=T=>T.status==="valid";r.isValid=ke;const we=T=>typeof Promise<"u"&&T instanceof Promise;r.isAsync=we})(je);var We={};Object.defineProperty(We,"__esModule",{value:!0});var Je={},Ye={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorUtil=void 0,function(_){_.errToObj=d=>typeof d=="string"?{message:d}:d||{},_.toString=d=>typeof d=="string"?d:d==null?void 0:d.message}(r.errorUtil||(r.errorUtil={}))})(Ye);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.discriminatedUnion=r.date=r.boolean=r.bigint=r.array=r.any=r.coerce=r.ZodFirstPartyTypeKind=r.late=r.ZodSchema=r.Schema=r.custom=r.ZodPipeline=r.ZodBranded=r.BRAND=r.ZodNaN=r.ZodCatch=r.ZodDefault=r.ZodNullable=r.ZodOptional=r.ZodTransformer=r.ZodEffects=r.ZodPromise=r.ZodNativeEnum=r.ZodEnum=r.ZodLiteral=r.ZodLazy=r.ZodFunction=r.ZodSet=r.ZodMap=r.ZodRecord=r.ZodTuple=r.ZodIntersection=r.ZodDiscriminatedUnion=r.ZodUnion=r.ZodObject=r.ZodArray=r.ZodVoid=r.ZodNever=r.ZodUnknown=r.ZodAny=r.ZodNull=r.ZodUndefined=r.ZodSymbol=r.ZodDate=r.ZodBoolean=r.ZodBigInt=r.ZodNumber=r.ZodString=r.ZodType=void 0,r.NEVER=r.void=r.unknown=r.union=r.undefined=r.tuple=r.transformer=r.symbol=r.string=r.strictObject=r.set=r.record=r.promise=r.preprocess=r.pipeline=r.ostring=r.optional=r.onumber=r.oboolean=r.object=r.number=r.nullable=r.null=r.never=r.nativeEnum=r.nan=r.map=r.literal=r.lazy=r.intersection=r.instanceof=r.function=r.enum=r.effect=void 0;const _=D,d=Ye,i=je,u=pe,c=V;class m{constructor(e,t,s,o){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const y=(a,e)=>{if((0,i.isValid)(e))return{success:!0,data:e.value};if(!a.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new c.ZodError(a.common.issues);return this._error=t,this._error}}};function f(a){if(!a)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:o}=a;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(h,l)=>h.code!=="invalid_type"?{message:l.defaultError}:typeof l.data>"u"?{message:s!=null?s:l.defaultError}:{message:t!=null?t:l.defaultError},description:o}}class p{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,u.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,i.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const o={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},n=this._parseSync({data:e,path:o.path,parent:o});return y(o,n)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},o=this._parse({data:e,path:s.path,parent:s}),n=await((0,i.isAsync)(o)?o:Promise.resolve(o));return y(s,n)}refine(e,t){const s=o=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(o):t;return this._refinement((o,n)=>{const h=e(o),l=()=>n.addIssue({code:c.ZodIssueCode.custom,...s(o)});return typeof Promise<"u"&&h instanceof Promise?h.then(v=>v?!0:(l(),!1)):h?!0:(l(),!1)})}refinement(e,t){return this._refinement((s,o)=>e(s)?!0:(o.addIssue(typeof t=="function"?t(s,o):t),!1))}_refinement(e){return new A({schema:this,typeName:I.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return M.create(this,this._def)}nullable(){return J.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return S.create(this,this._def)}promise(){return F.create(this,this._def)}or(e){return ie.create([this,e],this._def)}and(e){return oe.create(this,e,this._def)}transform(e){return new A({...f(this._def),schema:this,typeName:I.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new fe({...f(this._def),innerType:this,defaultValue:t,typeName:I.ZodDefault})}brand(){return new Ve({typeName:I.ZodBranded,type:this,...f(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ie({...f(this._def),innerType:this,catchValue:t,typeName:I.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return he.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}r.ZodType=p,r.Schema=p,r.ZodSchema=p;const R=/^c[^\s-]{8,}$/i,ke=/^[a-z][a-z0-9]*$/,we=/[0-9A-HJKMNP-TV-Z]{26}/,T=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,N=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,x=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,O=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,k=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,L=a=>a.precision?a.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`):a.precision===0?a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function $(a,e){return!!((e==="v4"||!e)&&O.test(a)||(e==="v6"||!e)&&k.test(a))}class P extends p{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement(o=>e.test(o),{validation:t,code:c.ZodIssueCode.invalid_string,...d.errorUtil.errToObj(s)}),this.nonempty=e=>this.min(1,d.errorUtil.errToObj(e)),this.trim=()=>new P({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new P({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new P({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.ZodParsedType.string){const n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.string,received:n.parsedType}),i.INVALID}const s=new i.ParseStatus;let o;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:c.ZodIssueCode.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="length"){const h=e.data.length>n.value,l=e.data.length"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...d.errorUtil.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...d.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...d.errorUtil.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...d.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...d.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...d.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...d.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...d.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new P({checks:[],typeName:I.ZodString,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...f(a)})};function Pe(a,e){const t=(a.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,o=t>s?t:s,n=parseInt(a.toFixed(o).replace(".","")),h=parseInt(e.toFixed(o).replace(".",""));return n%h/Math.pow(10,o)}class E extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.ZodParsedType.number){const n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.number,received:n.parsedType}),i.INVALID}let s;const o=new i.ParseStatus;for(const n of this._def.checks)n.kind==="int"?u.util.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:n.message}),o.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),o.dirty()):n.kind==="multipleOf"?Pe(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),o.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.not_finite,message:n.message}),o.dirty()):u.util.assertNever(n);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,d.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.errorUtil.toString(t))}setLimit(e,t,s,o){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:d.errorUtil.toString(o)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:d.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:d.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:d.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:d.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:d.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:d.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:d.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:d.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&u.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.valuenew E({checks:[],typeName:I.ZodNumber,coerce:(a==null?void 0:a.coerce)||!1,...f(a)});class z extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==u.ZodParsedType.bigint){const n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.bigint,received:n.parsedType}),i.INVALID}let s;const o=new i.ParseStatus;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),o.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),o.dirty()):u.util.assertNever(n);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,d.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.errorUtil.toString(t))}setLimit(e,t,s,o){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:d.errorUtil.toString(o)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:d.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:d.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:d.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:d.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new z({checks:[],typeName:I.ZodBigInt,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...f(a)})};class se extends p{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==u.ZodParsedType.boolean){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.boolean,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodBoolean=se,se.create=a=>new se({typeName:I.ZodBoolean,coerce:(a==null?void 0:a.coerce)||!1,...f(a)});class q extends p{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.ZodParsedType.date){const n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.date,received:n.parsedType}),i.INVALID}if(isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_date}),i.INVALID}const s=new i.ParseStatus;let o;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:c.ZodIssueCode.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):u.util.assertNever(n);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:d.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:d.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew q({checks:[],coerce:(a==null?void 0:a.coerce)||!1,typeName:I.ZodDate,...f(a)});class me extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.symbol){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.symbol,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodSymbol=me,me.create=a=>new me({typeName:I.ZodSymbol,...f(a)});class ae extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.undefined,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodUndefined=ae,ae.create=a=>new ae({typeName:I.ZodUndefined,...f(a)});class ne extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.null){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.null,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodNull=ne,ne.create=a=>new ne({typeName:I.ZodNull,...f(a)});class G extends p{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}}r.ZodAny=G,G.create=a=>new G({typeName:I.ZodAny,...f(a)});class K extends p{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}}r.ZodUnknown=K,K.create=a=>new K({typeName:I.ZodUnknown,...f(a)});class U extends p{_parse(e){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.never,received:t.parsedType}),i.INVALID}}r.ZodNever=U,U.create=a=>new U({typeName:I.ZodNever,...f(a)});class ye extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.void,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodVoid=ye,ye.create=a=>new ye({typeName:I.ZodVoid,...f(a)});class S extends p{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),o=this._def;if(t.parsedType!==u.ZodParsedType.array)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:t.parsedType}),i.INVALID;if(o.exactLength!==null){const h=t.data.length>o.exactLength.value,l=t.data.lengtho.maxLength.value&&((0,i.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((h,l)=>o.type._parseAsync(new m(t,h,t.path,l)))).then(h=>i.ParseStatus.mergeArray(s,h));const n=[...t.data].map((h,l)=>o.type._parseSync(new m(t,h,t.path,l)));return i.ParseStatus.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new S({...this._def,minLength:{value:e,message:d.errorUtil.toString(t)}})}max(e,t){return new S({...this._def,maxLength:{value:e,message:d.errorUtil.toString(t)}})}length(e,t){return new S({...this._def,exactLength:{value:e,message:d.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}r.ZodArray=S,S.create=(a,e)=>new S({type:a,minLength:null,maxLength:null,exactLength:null,typeName:I.ZodArray,...f(e)});function H(a){if(a instanceof Z){const e={};for(const t in a.shape){const s=a.shape[t];e[t]=M.create(H(s))}return new Z({...a._def,shape:()=>e})}else return a instanceof S?new S({...a._def,type:H(a.element)}):a instanceof M?M.create(H(a.unwrap())):a instanceof J?J.create(H(a.unwrap())):a instanceof j?j.create(a.items.map(e=>H(e))):a}class Z extends p{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=u.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.ZodParsedType.object){const g=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(g,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:g.parsedType}),i.INVALID}const{status:s,ctx:o}=this._processInputParams(e),{shape:n,keys:h}=this._getCached(),l=[];if(!(this._def.catchall instanceof U&&this._def.unknownKeys==="strip"))for(const g in o.data)h.includes(g)||l.push(g);const v=[];for(const g of h){const b=n[g],ee=o.data[g];v.push({key:{status:"valid",value:g},value:b._parse(new m(o,ee,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof U){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of l)v.push({key:{status:"valid",value:b},value:{status:"valid",value:o.data[b]}});else if(g==="strict")l.length>0&&((0,i.addIssueToContext)(o,{code:c.ZodIssueCode.unrecognized_keys,keys:l}),s.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const b of l){const ee=o.data[b];v.push({key:{status:"valid",value:b},value:g._parse(new m(o,ee,o.path,b)),alwaysSet:b in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of v){const ee=await b.key;g.push({key:ee,value:await b.value,alwaysSet:b.alwaysSet})}return g}).then(g=>i.ParseStatus.mergeObjectSync(s,g)):i.ParseStatus.mergeObjectSync(s,v)}get shape(){return this._def.shape()}strict(e){return d.errorUtil.errToObj,new Z({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var o,n,h,l;const v=(h=(n=(o=this._def).errorMap)===null||n===void 0?void 0:n.call(o,t,s).message)!==null&&h!==void 0?h:s.defaultError;return t.code==="unrecognized_keys"?{message:(l=d.errorUtil.errToObj(e).message)!==null&&l!==void 0?l:v}:{message:v}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(e){return new Z({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:I.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){const t={};return u.util.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new Z({...this._def,shape:()=>t})}omit(e){const t={};return u.util.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new Z({...this._def,shape:()=>t})}deepPartial(){return H(this)}partial(e){const t={};return u.util.objectKeys(this.shape).forEach(s=>{const o=this.shape[s];e&&!e[s]?t[s]=o:t[s]=o.optional()}),new Z({...this._def,shape:()=>t})}required(e){const t={};return u.util.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof M;)n=n._def.innerType;t[s]=n}}),new Z({...this._def,shape:()=>t})}keyof(){return De(u.util.objectKeys(this.shape))}}r.ZodObject=Z,Z.create=(a,e)=>new Z({shape:()=>a,unknownKeys:"strip",catchall:U.create(),typeName:I.ZodObject,...f(e)}),Z.strictCreate=(a,e)=>new Z({shape:()=>a,unknownKeys:"strict",catchall:U.create(),typeName:I.ZodObject,...f(e)}),Z.lazycreate=(a,e)=>new Z({shape:a,unknownKeys:"strip",catchall:U.create(),typeName:I.ZodObject,...f(e)});class ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function o(n){for(const l of n)if(l.result.status==="valid")return l.result;for(const l of n)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;const h=n.map(l=>new c.ZodError(l.ctx.common.issues));return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:h}),i.INVALID}if(t.common.async)return Promise.all(s.map(async n=>{const h={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:h}),ctx:h}})).then(o);{let n;const h=[];for(const v of s){const g={...t,common:{...t.common,issues:[]},parent:null},b=v._parseSync({data:t.data,path:t.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!n&&(n={result:b,ctx:g}),g.common.issues.length&&h.push(g.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const l=h.map(v=>new c.ZodError(v));return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:l}),i.INVALID}}get options(){return this._def.options}}r.ZodUnion=ie,ie.create=(a,e)=>new ie({options:a,typeName:I.ZodUnion,...f(e)});const _e=a=>a instanceof ue?_e(a.schema):a instanceof A?_e(a.innerType()):a instanceof ce?[a.value]:a instanceof B?a.options:a instanceof le?Object.keys(a.enum):a instanceof fe?_e(a._def.innerType):a instanceof ae?[void 0]:a instanceof ne?[null]:null;class ve extends p{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.object)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:t.parsedType}),i.INVALID;const s=this.discriminator,o=t.data[s],n=this.optionsMap.get(o);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):((0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const o=new Map;for(const n of t){const h=_e(n.shape[e]);if(!h)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const l of h){if(o.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);o.set(l,n)}}return new ve({typeName:I.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:o,...f(s)})}}r.ZodDiscriminatedUnion=ve;function Ne(a,e){const t=(0,u.getParsedType)(a),s=(0,u.getParsedType)(e);if(a===e)return{valid:!0,data:a};if(t===u.ZodParsedType.object&&s===u.ZodParsedType.object){const o=u.util.objectKeys(e),n=u.util.objectKeys(a).filter(l=>o.indexOf(l)!==-1),h={...a,...e};for(const l of n){const v=Ne(a[l],e[l]);if(!v.valid)return{valid:!1};h[l]=v.data}return{valid:!0,data:h}}else if(t===u.ZodParsedType.array&&s===u.ZodParsedType.array){if(a.length!==e.length)return{valid:!1};const o=[];for(let n=0;n{if((0,i.isAborted)(n)||(0,i.isAborted)(h))return i.INVALID;const l=Ne(n.value,h.value);return l.valid?(((0,i.isDirty)(n)||(0,i.isDirty)(h))&&t.dirty(),{status:t.value,value:l.data}):((0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([n,h])=>o(n,h)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}r.ZodIntersection=oe,oe.create=(a,e,t)=>new oe({left:a,right:e,typeName:I.ZodIntersection,...f(t)});class j extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.array)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:s.parsedType}),i.INVALID;if(s.data.lengththis._def.items.length&&((0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((h,l)=>{const v=this._def.items[l]||this._def.rest;return v?v._parse(new m(s,h,s.path,l)):null}).filter(h=>!!h);return s.common.async?Promise.all(n).then(h=>i.ParseStatus.mergeArray(t,h)):i.ParseStatus.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new j({...this._def,rest:e})}}r.ZodTuple=j,j.create=(a,e)=>{if(!Array.isArray(a))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new j({items:a,typeName:I.ZodTuple,rest:null,...f(e)})};class de extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.object)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:s.parsedType}),i.INVALID;const o=[],n=this._def.keyType,h=this._def.valueType;for(const l in s.data)o.push({key:n._parse(new m(s,l,s.path,l)),value:h._parse(new m(s,s.data[l],s.path,l))});return s.common.async?i.ParseStatus.mergeObjectAsync(t,o):i.ParseStatus.mergeObjectSync(t,o)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof p?new de({keyType:e,valueType:t,typeName:I.ZodRecord,...f(s)}):new de({keyType:P.create(),valueType:e,typeName:I.ZodRecord,...f(t)})}}r.ZodRecord=de;class ge extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.map)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.map,received:s.parsedType}),i.INVALID;const o=this._def.keyType,n=this._def.valueType,h=[...s.data.entries()].map(([l,v],g)=>({key:o._parse(new m(s,l,s.path,[g,"key"])),value:n._parse(new m(s,v,s.path,[g,"value"]))}));if(s.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const v of h){const g=await v.key,b=await v.value;if(g.status==="aborted"||b.status==="aborted")return i.INVALID;(g.status==="dirty"||b.status==="dirty")&&t.dirty(),l.set(g.value,b.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const v of h){const g=v.key,b=v.value;if(g.status==="aborted"||b.status==="aborted")return i.INVALID;(g.status==="dirty"||b.status==="dirty")&&t.dirty(),l.set(g.value,b.value)}return{status:t.value,value:l}}}}r.ZodMap=ge,ge.create=(a,e,t)=>new ge({valueType:e,keyType:a,typeName:I.ZodMap,...f(t)});class W extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.set)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.set,received:s.parsedType}),i.INVALID;const o=this._def;o.minSize!==null&&s.data.sizeo.maxSize.value&&((0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),t.dirty());const n=this._def.valueType;function h(v){const g=new Set;for(const b of v){if(b.status==="aborted")return i.INVALID;b.status==="dirty"&&t.dirty(),g.add(b.value)}return{status:t.value,value:g}}const l=[...s.data.values()].map((v,g)=>n._parse(new m(s,v,s.path,g)));return s.common.async?Promise.all(l).then(v=>h(v)):h(l)}min(e,t){return new W({...this._def,minSize:{value:e,message:d.errorUtil.toString(t)}})}max(e,t){return new W({...this._def,maxSize:{value:e,message:d.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}r.ZodSet=W,W.create=(a,e)=>new W({valueType:a,minSize:null,maxSize:null,typeName:I.ZodSet,...f(e)});class X extends p{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.function)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.function,received:t.parsedType}),i.INVALID;function s(l,v){return(0,i.makeIssue)({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(g=>!!g),issueData:{code:c.ZodIssueCode.invalid_arguments,argumentsError:v}})}function o(l,v){return(0,i.makeIssue)({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(g=>!!g),issueData:{code:c.ZodIssueCode.invalid_return_type,returnTypeError:v}})}const n={errorMap:t.common.contextualErrorMap},h=t.data;return this._def.returns instanceof F?(0,i.OK)(async(...l)=>{const v=new c.ZodError([]),g=await this._def.args.parseAsync(l,n).catch(Oe=>{throw v.addIssue(s(l,Oe)),v}),b=await h(...g);return await this._def.returns._def.type.parseAsync(b,n).catch(Oe=>{throw v.addIssue(o(b,Oe)),v})}):(0,i.OK)((...l)=>{const v=this._def.args.safeParse(l,n);if(!v.success)throw new c.ZodError([s(l,v.error)]);const g=h(...v.data),b=this._def.returns.safeParse(g,n);if(!b.success)throw new c.ZodError([o(g,b.error)]);return b.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new X({...this._def,args:j.create(e).rest(K.create())})}returns(e){return new X({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new X({args:e||j.create([]).rest(K.create()),returns:t||K.create(),typeName:I.ZodFunction,...f(s)})}}r.ZodFunction=X;class ue extends p{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}r.ZodLazy=ue,ue.create=(a,e)=>new ue({getter:a,typeName:I.ZodLazy,...f(e)});class ce extends p{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}r.ZodLiteral=ce,ce.create=(a,e)=>new ce({value:a,typeName:I.ZodLiteral,...f(e)});function De(a,e){return new B({values:a,typeName:I.ZodEnum,...f(e)})}class B extends p{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return(0,i.addIssueToContext)(t,{expected:u.util.joinValues(s),received:t.parsedType,code:c.ZodIssueCode.invalid_type}),i.INVALID}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return(0,i.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_enum_value,options:s}),i.INVALID}return(0,i.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return B.create(e)}exclude(e){return B.create(this.options.filter(t=>!e.includes(t)))}}r.ZodEnum=B,B.create=De;class le extends p{_parse(e){const t=u.util.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.ZodParsedType.string&&s.parsedType!==u.ZodParsedType.number){const o=u.util.objectValues(t);return(0,i.addIssueToContext)(s,{expected:u.util.joinValues(o),received:s.parsedType,code:c.ZodIssueCode.invalid_type}),i.INVALID}if(t.indexOf(e.data)===-1){const o=u.util.objectValues(t);return(0,i.addIssueToContext)(s,{received:s.data,code:c.ZodIssueCode.invalid_enum_value,options:o}),i.INVALID}return(0,i.OK)(e.data)}get enum(){return this._def.values}}r.ZodNativeEnum=le,le.create=(a,e)=>new le({values:a,typeName:I.ZodNativeEnum,...f(e)});class F extends p{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.promise&&t.common.async===!1)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.promise,received:t.parsedType}),i.INVALID;const s=t.parsedType===u.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,i.OK)(s.then(o=>this._def.type.parseAsync(o,{path:t.path,errorMap:t.common.contextualErrorMap})))}}r.ZodPromise=F,F.create=(a,e)=>new F({type:a,typeName:I.ZodPromise,...f(e)});class A extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===I.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),o=this._def.effect||null;if(o.type==="preprocess"){const h=o.transform(s.data);return s.common.async?Promise.resolve(h).then(l=>this._def.schema._parseAsync({data:l,path:s.path,parent:s})):this._def.schema._parseSync({data:h,path:s.path,parent:s})}const n={addIssue:h=>{(0,i.addIssueToContext)(s,h),h.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),o.type==="refinement"){const h=l=>{const v=o.refinement(l,n);if(s.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(s.common.async===!1){const l=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?i.INVALID:(l.status==="dirty"&&t.dirty(),h(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(l=>l.status==="aborted"?i.INVALID:(l.status==="dirty"&&t.dirty(),h(l.value).then(()=>({status:t.value,value:l.value}))))}if(o.type==="transform")if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!(0,i.isValid)(h))return h;const l=o.transform(h.value,n);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>(0,i.isValid)(h)?Promise.resolve(o.transform(h.value,n)).then(l=>({status:t.value,value:l})):h);u.util.assertNever(o)}}r.ZodEffects=A,r.ZodTransformer=A,A.create=(a,e,t)=>new A({schema:a,typeName:I.ZodEffects,effect:e,...f(t)}),A.createWithPreprocess=(a,e,t)=>new A({schema:e,effect:{type:"preprocess",transform:a},typeName:I.ZodEffects,...f(t)});class M extends p{_parse(e){return this._getType(e)===u.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}r.ZodOptional=M,M.create=(a,e)=>new M({innerType:a,typeName:I.ZodOptional,...f(e)});class J extends p{_parse(e){return this._getType(e)===u.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}r.ZodNullable=J,J.create=(a,e)=>new J({innerType:a,typeName:I.ZodNullable,...f(e)});class fe extends p{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.ZodParsedType.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}r.ZodDefault=fe,fe.create=(a,e)=>new fe({innerType:a,typeName:I.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...f(e)});class Ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return(0,i.isAsync)(o)?o.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new c.ZodError(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new c.ZodError(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}r.ZodCatch=Ie,Ie.create=(a,e)=>new Ie({innerType:a,typeName:I.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...f(e)});class be extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.nan){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.nan,received:s.parsedType}),i.INVALID}return{status:"valid",value:e.data}}}r.ZodNaN=be,be.create=a=>new be({typeName:I.ZodNaN,...f(a)}),r.BRAND=Symbol("zod_brand");class Ve extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}r.ZodBranded=Ve;class he extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?i.INVALID:n.status==="dirty"?(t.dirty(),(0,i.DIRTY)(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?i.INVALID:o.status==="dirty"?(t.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(e,t){return new he({in:e,out:t,typeName:I.ZodPipeline})}}r.ZodPipeline=he;const Qe=(a,e={},t)=>a?G.create().superRefine((s,o)=>{var n,h;if(!a(s)){const l=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,v=(h=(n=l.fatal)!==null&&n!==void 0?n:t)!==null&&h!==void 0?h:!0,g=typeof l=="string"?{message:l}:l;o.addIssue({code:"custom",...g,fatal:v})}}):G.create();r.custom=Qe,r.late={object:Z.lazycreate};var I;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline"})(I=r.ZodFirstPartyTypeKind||(r.ZodFirstPartyTypeKind={}));const Ge=(a,e={message:`Input not instance of ${a.name}`})=>(0,r.custom)(t=>t instanceof a,e);r.instanceof=Ge;const Re=P.create;r.string=Re;const Ue=E.create;r.number=Ue;const He=be.create;r.nan=He;const Xe=z.create;r.bigint=Xe;const Me=se.create;r.boolean=Me;const Fe=q.create;r.date=Fe;const et=me.create;r.symbol=et;const tt=ae.create;r.undefined=tt;const rt=ne.create;r.null=rt;const st=G.create;r.any=st;const at=K.create;r.unknown=at;const nt=U.create;r.never=nt;const it=ye.create;r.void=it;const ot=S.create;r.array=ot;const dt=Z.create;r.object=dt;const ut=Z.strictCreate;r.strictObject=ut;const ct=ie.create;r.union=ct;const lt=ve.create;r.discriminatedUnion=lt;const ft=oe.create;r.intersection=ft;const ht=j.create;r.tuple=ht;const pt=de.create;r.record=pt;const mt=ge.create;r.map=mt;const yt=W.create;r.set=yt;const _t=X.create;r.function=_t;const vt=ue.create;r.lazy=vt;const gt=ce.create;r.literal=gt;const It=B.create;r.enum=It;const bt=le.create;r.nativeEnum=bt;const Tt=F.create;r.promise=Tt;const Le=A.create;r.effect=Le,r.transformer=Le;const Zt=M.create;r.optional=Zt;const Ct=J.create;r.nullable=Ct;const kt=A.createWithPreprocess;r.preprocess=kt;const wt=he.create;r.pipeline=wt;const Pt=()=>Re().optional();r.ostring=Pt;const Nt=()=>Ue().optional();r.onumber=Nt;const Ot=()=>Me().optional();r.oboolean=Ot,r.coerce={string:a=>P.create({...a,coerce:!0}),number:a=>E.create({...a,coerce:!0}),boolean:a=>se.create({...a,coerce:!0}),bigint:a=>z.create({...a,coerce:!0}),date:a=>q.create({...a,coerce:!0})},r.NEVER=i.INVALID})(Je);(function(r){var _=C&&C.__createBinding||(Object.create?function(i,u,c,m){m===void 0&&(m=c),Object.defineProperty(i,m,{enumerable:!0,get:function(){return u[c]}})}:function(i,u,c,m){m===void 0&&(m=c),i[m]=u[c]}),d=C&&C.__exportStar||function(i,u){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&_(u,i,c)};Object.defineProperty(r,"__esModule",{value:!0}),d(D,r),d(je,r),d(We,r),d(pe,r),d(Je,r),d(V,r)})(Ee);(function(r){var _=C&&C.__createBinding||(Object.create?function(m,y,f,p){p===void 0&&(p=f),Object.defineProperty(m,p,{enumerable:!0,get:function(){return y[f]}})}:function(m,y,f,p){p===void 0&&(p=f),m[p]=y[f]}),d=C&&C.__setModuleDefault||(Object.create?function(m,y){Object.defineProperty(m,"default",{enumerable:!0,value:y})}:function(m,y){m.default=y}),i=C&&C.__importStar||function(m){if(m&&m.__esModule)return m;var y={};if(m!=null)for(var f in m)f!=="default"&&Object.prototype.hasOwnProperty.call(m,f)&&_(y,m,f);return d(y,m),y},u=C&&C.__exportStar||function(m,y){for(var f in m)f!=="default"&&!Object.prototype.hasOwnProperty.call(y,f)&&_(y,m,f)};Object.defineProperty(r,"__esModule",{value:!0}),r.z=void 0;const c=i(Ee);r.z=c,u(Ee,r),r.default=c})(ze);Object.defineProperty(re,"__esModule",{value:!0});re.parseExecution=re.validateType=void 0;const Q=ze,Se=Ae,Vt=Q.z.object({connectorType:Q.z.enum(Se.connectorNames),settings:Q.z.record(Q.z.string()),methodName:Q.z.string(),params:Q.z.record(Q.z.any())});function te(r,_){return r.type==="string"?typeof _=="string":r.type==="options"?typeof _=="string"&&r.values.includes(_):r.type==="number"?typeof _=="number":r.type==="boolean"?typeof _=="boolean":r.type==="object"?typeof _=="object"&&Object.keys(r.values).every(d=>_&&d in _&&te(r.values[d],_[d])):r.type==="array"?Array.isArray(_)&&_.every(d=>te(r.items,d)):r.type==="union"?r.values.some(d=>te(d,_)):r.type==="any"}re.validateType=te;function Rt(r){try{const _=Vt.parse(r);if(!(_.connectorType in Se.schema))throw new Error(`Invalid connector: ${_.connectorType}`);const d=_.connectorType,i=Se.schema[d];if(Object.keys(_.settings).map(f=>f in i.settings).includes(!1))throw new Error("Invalid settings - Extra settings provided");const u={};for(const f in i.settings)if(f in _.settings)if(te(i.settings[f],_.settings[f]))u[f]=_.settings[f];else throw new Error(`Invalid setting: ${f}`);else if(i.settings[f].required)throw new Error(`Missing setting: ${f}`);if(!(_.methodName in i.methods))throw new Error(`Invalid method: ${_.methodName}`);const c=_.methodName,m=i.methods[c];if(Object.keys(_.params).map(f=>f in m.params).includes(!1))throw new Error("Invalid params - Extra params provided");const y={};for(const f in m.params)if(f in _.params)if(te(m.params[f],_.params[f]))y[f]=_.params[f];else throw new Error(`Invalid param: ${f}`);else if(m.params[f].required)throw new Error(`Missing param: ${f}`);return{result:{connectorType:d,methodName:c,params:y,settings:u}}}catch(_){return{error:_.message}}}re.parseExecution=Rt;(function(r){var _=C&&C.__createBinding||(Object.create?function(i,u,c,m){m===void 0&&(m=c);var y=Object.getOwnPropertyDescriptor(u,c);(!y||("get"in y?!u.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(i,m,y)}:function(i,u,c,m){m===void 0&&(m=c),i[m]=u[c]}),d=C&&C.__exportStar||function(i,u){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&_(u,i,c)};Object.defineProperty(r,"__esModule",{value:!0}),d($e,r),d(Ae,r),d(re,r)})(Et);export{Et as b}; -//# sourceMappingURL=index.a86d8064.js.map +import{p as C}from"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_=new Error().stack;_&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[_]="8bd52e1d-51ee-457e-bb74-976c100c32c8",r._sentryDebugIdIdentifier="sentry-dbid-8bd52e1d-51ee-457e-bb74-976c100c32c8")}catch{}})();var Et={},$e={};Object.defineProperty($e,"__esModule",{value:!0});var Ae={},Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.airtable=void 0;Te.airtable={label:"Airtable",settings:{baseId:{label:"Base ID",type:"string",description:"The Airtable base ID to connect to",required:!0,secret:!1},apiKey:{label:"API Key",type:"string",description:"The api key to access the database",required:!0,secret:!0}},methods:{list_records:{label:"List Records",params:{table_id:{label:"Table ID",type:"string",required:!0,description:"The ID of the table to get"},fields:{label:"Fields",type:"array",required:!1,description:"The fields to return",items:{type:"string"}},filter_by_formula:{label:"Filter By Formula",type:"string",required:!1,description:"The formula to filter by"},max_records:{label:"Max Records",type:"number",description:"The maximum number of records to return",required:!1},view:{label:"View",type:"string",description:"The view to use",required:!1},sort:{label:"Sort",type:"array",description:"The sort to use",required:!1,items:{type:"object",values:{field:{type:"string"},direction:{type:"options",values:["asc","desc"]}}}},include_record_id:{label:"Include Record ID",type:"boolean",description:"Whether to include the record ID",required:!1}},returns:{records:{label:"Records",type:"array",description:"The records returned",items:{type:"any"}}}},update_record:{label:"Update Record",params:{table_id:{label:"Table ID",type:"string",required:!0,description:"The ID of the table to get"},fields:{label:"Fields",type:"any",required:!0,description:"The fields to update"},record_id:{label:"Record ID",type:"string",required:!0,description:"The ID of the record to update"},include_record_id:{label:"Include Record ID",type:"boolean",description:"Whether to include the record ID",required:!1}},returns:{record:{label:"Record",type:"any",description:"The record returned"}}}}};var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.postgres=void 0;Ze.postgres={label:"Postgres",settings:{connectionString:{label:"Connection String",type:"string",description:"The connection string for the Postgres database",required:!0,secret:!0}},methods:{query:{label:"Query",params:{query:{label:"SQL Query",type:"string",required:!0,description:"The SQL query to execute"},params:{label:"Query Parameters",type:"array",required:!1,description:"The parameters to pass to the query",items:{type:"any"}}},returns:{result:{label:"Result Rows",type:"array",items:{type:"any"},description:"The query result"}}}}};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.connectorNames=r.schema=void 0;const _=Te,d=Ze;r.schema={airtable:_.airtable,postgres:d.postgres},r.connectorNames=Object.keys(r.schema)})(Ae);var re={},ze={},Ee={},D={},Ce={},pe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getParsedType=r.ZodParsedType=r.objectUtil=r.util=void 0;var _;(function(i){i.assertEqual=y=>y;function u(y){}i.assertIs=u;function c(y){throw new Error}i.assertNever=c,i.arrayToEnum=y=>{const f={};for(const p of y)f[p]=p;return f},i.getValidEnumValues=y=>{const f=i.objectKeys(y).filter(R=>typeof y[y[R]]!="number"),p={};for(const R of f)p[R]=y[R];return i.objectValues(p)},i.objectValues=y=>i.objectKeys(y).map(function(f){return y[f]}),i.objectKeys=typeof Object.keys=="function"?y=>Object.keys(y):y=>{const f=[];for(const p in y)Object.prototype.hasOwnProperty.call(y,p)&&f.push(p);return f},i.find=(y,f)=>{for(const p of y)if(f(p))return p},i.isInteger=typeof Number.isInteger=="function"?y=>Number.isInteger(y):y=>typeof y=="number"&&isFinite(y)&&Math.floor(y)===y;function m(y,f=" | "){return y.map(p=>typeof p=="string"?`'${p}'`:p).join(f)}i.joinValues=m,i.jsonStringifyReplacer=(y,f)=>typeof f=="bigint"?f.toString():f})(_=r.util||(r.util={})),function(i){i.mergeShapes=(u,c)=>({...u,...c})}(r.objectUtil||(r.objectUtil={})),r.ZodParsedType=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const d=i=>{switch(typeof i){case"undefined":return r.ZodParsedType.undefined;case"string":return r.ZodParsedType.string;case"number":return isNaN(i)?r.ZodParsedType.nan:r.ZodParsedType.number;case"boolean":return r.ZodParsedType.boolean;case"function":return r.ZodParsedType.function;case"bigint":return r.ZodParsedType.bigint;case"symbol":return r.ZodParsedType.symbol;case"object":return Array.isArray(i)?r.ZodParsedType.array:i===null?r.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?r.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?r.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?r.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?r.ZodParsedType.date:r.ZodParsedType.object;default:return r.ZodParsedType.unknown}};r.getParsedType=d})(pe);var V={};Object.defineProperty(V,"__esModule",{value:!0});V.ZodError=V.quotelessJson=V.ZodIssueCode=void 0;const Be=pe;V.ZodIssueCode=Be.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const xt=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");V.quotelessJson=xt;class xe extends Error{constructor(_){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const d=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,d):this.__proto__=d,this.name="ZodError",this.issues=_}get errors(){return this.issues}format(_){const d=_||function(c){return c.message},i={_errors:[]},u=c=>{for(const m of c.issues)if(m.code==="invalid_union")m.unionErrors.map(u);else if(m.code==="invalid_return_type")u(m.returnTypeError);else if(m.code==="invalid_arguments")u(m.argumentsError);else if(m.path.length===0)i._errors.push(d(m));else{let y=i,f=0;for(;fd.message){const d={},i=[];for(const u of this.issues)u.path.length>0?(d[u.path[0]]=d[u.path[0]]||[],d[u.path[0]].push(_(u))):i.push(_(u));return{formErrors:i,fieldErrors:d}}get formErrors(){return this.flatten()}}V.ZodError=xe;xe.create=r=>new xe(r);Object.defineProperty(Ce,"__esModule",{value:!0});const Y=pe,w=V,St=(r,_)=>{let d;switch(r.code){case w.ZodIssueCode.invalid_type:r.received===Y.ZodParsedType.undefined?d="Required":d=`Expected ${r.expected}, received ${r.received}`;break;case w.ZodIssueCode.invalid_literal:d=`Invalid literal value, expected ${JSON.stringify(r.expected,Y.util.jsonStringifyReplacer)}`;break;case w.ZodIssueCode.unrecognized_keys:d=`Unrecognized key(s) in object: ${Y.util.joinValues(r.keys,", ")}`;break;case w.ZodIssueCode.invalid_union:d="Invalid input";break;case w.ZodIssueCode.invalid_union_discriminator:d=`Invalid discriminator value. Expected ${Y.util.joinValues(r.options)}`;break;case w.ZodIssueCode.invalid_enum_value:d=`Invalid enum value. Expected ${Y.util.joinValues(r.options)}, received '${r.received}'`;break;case w.ZodIssueCode.invalid_arguments:d="Invalid function arguments";break;case w.ZodIssueCode.invalid_return_type:d="Invalid function return type";break;case w.ZodIssueCode.invalid_date:d="Invalid date";break;case w.ZodIssueCode.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(d=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(d=`${d} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?d=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?d=`Invalid input: must end with "${r.validation.endsWith}"`:Y.util.assertNever(r.validation):r.validation!=="regex"?d=`Invalid ${r.validation}`:d="Invalid";break;case w.ZodIssueCode.too_small:r.type==="array"?d=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?d=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?d=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?d=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:d="Invalid input";break;case w.ZodIssueCode.too_big:r.type==="array"?d=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?d=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?d=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?d=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?d=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:d="Invalid input";break;case w.ZodIssueCode.custom:d="Invalid input";break;case w.ZodIssueCode.invalid_intersection_types:d="Intersection results could not be merged";break;case w.ZodIssueCode.not_multiple_of:d=`Number must be a multiple of ${r.multipleOf}`;break;case w.ZodIssueCode.not_finite:d="Number must be finite";break;default:d=_.defaultError,Y.util.assertNever(r)}return{message:d}};Ce.default=St;var At=C&&C.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(D,"__esModule",{value:!0});D.getErrorMap=D.setErrorMap=D.defaultErrorMap=void 0;const qe=At(Ce);D.defaultErrorMap=qe.default;let Ke=qe.default;function jt(r){Ke=r}D.setErrorMap=jt;function Dt(){return Ke}D.getErrorMap=Dt;var je={};(function(r){var _=C&&C.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0}),r.isAsync=r.isValid=r.isDirty=r.isAborted=r.OK=r.DIRTY=r.INVALID=r.ParseStatus=r.addIssueToContext=r.EMPTY_PATH=r.makeIssue=void 0;const d=D,i=_(Ce),u=T=>{const{data:N,path:x,errorMaps:O,issueData:k}=T,L=[...x,...k.path||[]],$={...k,path:L};let P="";const Pe=O.filter(E=>!!E).slice().reverse();for(const E of Pe)P=E($,{data:N,defaultError:P}).message;return{...k,path:L,message:k.message||P}};r.makeIssue=u,r.EMPTY_PATH=[];function c(T,N){const x=(0,r.makeIssue)({issueData:N,data:T.data,path:T.path,errorMaps:[T.common.contextualErrorMap,T.schemaErrorMap,(0,d.getErrorMap)(),i.default].filter(O=>!!O)});T.common.issues.push(x)}r.addIssueToContext=c;class m{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(N,x){const O=[];for(const k of x){if(k.status==="aborted")return r.INVALID;k.status==="dirty"&&N.dirty(),O.push(k.value)}return{status:N.value,value:O}}static async mergeObjectAsync(N,x){const O=[];for(const k of x)O.push({key:await k.key,value:await k.value});return m.mergeObjectSync(N,O)}static mergeObjectSync(N,x){const O={};for(const k of x){const{key:L,value:$}=k;if(L.status==="aborted"||$.status==="aborted")return r.INVALID;L.status==="dirty"&&N.dirty(),$.status==="dirty"&&N.dirty(),(typeof $.value<"u"||k.alwaysSet)&&(O[L.value]=$.value)}return{status:N.value,value:O}}}r.ParseStatus=m,r.INVALID=Object.freeze({status:"aborted"});const y=T=>({status:"dirty",value:T});r.DIRTY=y;const f=T=>({status:"valid",value:T});r.OK=f;const p=T=>T.status==="aborted";r.isAborted=p;const R=T=>T.status==="dirty";r.isDirty=R;const ke=T=>T.status==="valid";r.isValid=ke;const we=T=>typeof Promise<"u"&&T instanceof Promise;r.isAsync=we})(je);var We={};Object.defineProperty(We,"__esModule",{value:!0});var Je={},Ye={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorUtil=void 0,function(_){_.errToObj=d=>typeof d=="string"?{message:d}:d||{},_.toString=d=>typeof d=="string"?d:d==null?void 0:d.message}(r.errorUtil||(r.errorUtil={}))})(Ye);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.discriminatedUnion=r.date=r.boolean=r.bigint=r.array=r.any=r.coerce=r.ZodFirstPartyTypeKind=r.late=r.ZodSchema=r.Schema=r.custom=r.ZodPipeline=r.ZodBranded=r.BRAND=r.ZodNaN=r.ZodCatch=r.ZodDefault=r.ZodNullable=r.ZodOptional=r.ZodTransformer=r.ZodEffects=r.ZodPromise=r.ZodNativeEnum=r.ZodEnum=r.ZodLiteral=r.ZodLazy=r.ZodFunction=r.ZodSet=r.ZodMap=r.ZodRecord=r.ZodTuple=r.ZodIntersection=r.ZodDiscriminatedUnion=r.ZodUnion=r.ZodObject=r.ZodArray=r.ZodVoid=r.ZodNever=r.ZodUnknown=r.ZodAny=r.ZodNull=r.ZodUndefined=r.ZodSymbol=r.ZodDate=r.ZodBoolean=r.ZodBigInt=r.ZodNumber=r.ZodString=r.ZodType=void 0,r.NEVER=r.void=r.unknown=r.union=r.undefined=r.tuple=r.transformer=r.symbol=r.string=r.strictObject=r.set=r.record=r.promise=r.preprocess=r.pipeline=r.ostring=r.optional=r.onumber=r.oboolean=r.object=r.number=r.nullable=r.null=r.never=r.nativeEnum=r.nan=r.map=r.literal=r.lazy=r.intersection=r.instanceof=r.function=r.enum=r.effect=void 0;const _=D,d=Ye,i=je,u=pe,c=V;class m{constructor(e,t,s,o){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const y=(n,e)=>{if((0,i.isValid)(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new c.ZodError(n.common.issues);return this._error=t,this._error}}};function f(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:o}=n;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(h,l)=>h.code!=="invalid_type"?{message:l.defaultError}:typeof l.data>"u"?{message:s!=null?s:l.defaultError}:{message:t!=null?t:l.defaultError},description:o}}class p{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,u.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,i.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const o={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},a=this._parseSync({data:e,path:o.path,parent:o});return y(o,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},o=this._parse({data:e,path:s.path,parent:s}),a=await((0,i.isAsync)(o)?o:Promise.resolve(o));return y(s,a)}refine(e,t){const s=o=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(o):t;return this._refinement((o,a)=>{const h=e(o),l=()=>a.addIssue({code:c.ZodIssueCode.custom,...s(o)});return typeof Promise<"u"&&h instanceof Promise?h.then(v=>v?!0:(l(),!1)):h?!0:(l(),!1)})}refinement(e,t){return this._refinement((s,o)=>e(s)?!0:(o.addIssue(typeof t=="function"?t(s,o):t),!1))}_refinement(e){return new A({schema:this,typeName:I.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return M.create(this,this._def)}nullable(){return J.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return S.create(this,this._def)}promise(){return F.create(this,this._def)}or(e){return ie.create([this,e],this._def)}and(e){return oe.create(this,e,this._def)}transform(e){return new A({...f(this._def),schema:this,typeName:I.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new fe({...f(this._def),innerType:this,defaultValue:t,typeName:I.ZodDefault})}brand(){return new Ve({typeName:I.ZodBranded,type:this,...f(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ie({...f(this._def),innerType:this,catchValue:t,typeName:I.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return he.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}r.ZodType=p,r.Schema=p,r.ZodSchema=p;const R=/^c[^\s-]{8,}$/i,ke=/^[a-z][a-z0-9]*$/,we=/[0-9A-HJKMNP-TV-Z]{26}/,T=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,N=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,x=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,O=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,k=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,L=n=>n.precision?n.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}Z$`):n.precision===0?n.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):n.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function $(n,e){return!!((e==="v4"||!e)&&O.test(n)||(e==="v6"||!e)&&k.test(n))}class P extends p{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement(o=>e.test(o),{validation:t,code:c.ZodIssueCode.invalid_string,...d.errorUtil.errToObj(s)}),this.nonempty=e=>this.min(1,d.errorUtil.errToObj(e)),this.trim=()=>new P({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new P({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new P({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.ZodParsedType.string){const a=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(a,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.string,received:a.parsedType}),i.INVALID}const s=new i.ParseStatus;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:c.ZodIssueCode.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const h=e.data.length>a.value,l=e.data.length"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...d.errorUtil.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...d.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...d.errorUtil.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...d.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...d.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...d.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...d.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...d.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new P({checks:[],typeName:I.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...f(n)})};function Pe(n,e){const t=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,o=t>s?t:s,a=parseInt(n.toFixed(o).replace(".","")),h=parseInt(e.toFixed(o).replace(".",""));return a%h/Math.pow(10,o)}class E extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.ZodParsedType.number){const a=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(a,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.number,received:a.parsedType}),i.INVALID}let s;const o=new i.ParseStatus;for(const a of this._def.checks)a.kind==="int"?u.util.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?Pe(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.not_finite,message:a.message}),o.dirty()):u.util.assertNever(a);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,d.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.errorUtil.toString(t))}setLimit(e,t,s,o){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:d.errorUtil.toString(o)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:d.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:d.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:d.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:d.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:d.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:d.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:d.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:d.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&u.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.valuenew E({checks:[],typeName:I.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...f(n)});class z extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==u.ZodParsedType.bigint){const a=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(a,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.bigint,received:a.parsedType}),i.INVALID}let s;const o=new i.ParseStatus;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):u.util.assertNever(a);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,d.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.errorUtil.toString(t))}setLimit(e,t,s,o){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:d.errorUtil.toString(o)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:d.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:d.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:d.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:d.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new z({checks:[],typeName:I.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...f(n)})};class se extends p{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==u.ZodParsedType.boolean){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.boolean,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodBoolean=se,se.create=n=>new se({typeName:I.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...f(n)});class q extends p{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.ZodParsedType.date){const a=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(a,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.date,received:a.parsedType}),i.INVALID}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(a,{code:c.ZodIssueCode.invalid_date}),i.INVALID}const s=new i.ParseStatus;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:c.ZodIssueCode.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):u.util.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:d.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:d.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew q({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:I.ZodDate,...f(n)});class me extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.symbol){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.symbol,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodSymbol=me,me.create=n=>new me({typeName:I.ZodSymbol,...f(n)});class ne extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.undefined,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodUndefined=ne,ne.create=n=>new ne({typeName:I.ZodUndefined,...f(n)});class ae extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.null){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.null,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodNull=ae,ae.create=n=>new ae({typeName:I.ZodNull,...f(n)});class G extends p{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}}r.ZodAny=G,G.create=n=>new G({typeName:I.ZodAny,...f(n)});class K extends p{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}}r.ZodUnknown=K,K.create=n=>new K({typeName:I.ZodUnknown,...f(n)});class U extends p{_parse(e){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.never,received:t.parsedType}),i.INVALID}}r.ZodNever=U,U.create=n=>new U({typeName:I.ZodNever,...f(n)});class ye extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.void,received:s.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}r.ZodVoid=ye,ye.create=n=>new ye({typeName:I.ZodVoid,...f(n)});class S extends p{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),o=this._def;if(t.parsedType!==u.ZodParsedType.array)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:t.parsedType}),i.INVALID;if(o.exactLength!==null){const h=t.data.length>o.exactLength.value,l=t.data.lengtho.maxLength.value&&((0,i.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((h,l)=>o.type._parseAsync(new m(t,h,t.path,l)))).then(h=>i.ParseStatus.mergeArray(s,h));const a=[...t.data].map((h,l)=>o.type._parseSync(new m(t,h,t.path,l)));return i.ParseStatus.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new S({...this._def,minLength:{value:e,message:d.errorUtil.toString(t)}})}max(e,t){return new S({...this._def,maxLength:{value:e,message:d.errorUtil.toString(t)}})}length(e,t){return new S({...this._def,exactLength:{value:e,message:d.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}r.ZodArray=S,S.create=(n,e)=>new S({type:n,minLength:null,maxLength:null,exactLength:null,typeName:I.ZodArray,...f(e)});function H(n){if(n instanceof Z){const e={};for(const t in n.shape){const s=n.shape[t];e[t]=M.create(H(s))}return new Z({...n._def,shape:()=>e})}else return n instanceof S?new S({...n._def,type:H(n.element)}):n instanceof M?M.create(H(n.unwrap())):n instanceof J?J.create(H(n.unwrap())):n instanceof j?j.create(n.items.map(e=>H(e))):n}class Z extends p{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=u.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.ZodParsedType.object){const g=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(g,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:g.parsedType}),i.INVALID}const{status:s,ctx:o}=this._processInputParams(e),{shape:a,keys:h}=this._getCached(),l=[];if(!(this._def.catchall instanceof U&&this._def.unknownKeys==="strip"))for(const g in o.data)h.includes(g)||l.push(g);const v=[];for(const g of h){const b=a[g],ee=o.data[g];v.push({key:{status:"valid",value:g},value:b._parse(new m(o,ee,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof U){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of l)v.push({key:{status:"valid",value:b},value:{status:"valid",value:o.data[b]}});else if(g==="strict")l.length>0&&((0,i.addIssueToContext)(o,{code:c.ZodIssueCode.unrecognized_keys,keys:l}),s.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const b of l){const ee=o.data[b];v.push({key:{status:"valid",value:b},value:g._parse(new m(o,ee,o.path,b)),alwaysSet:b in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of v){const ee=await b.key;g.push({key:ee,value:await b.value,alwaysSet:b.alwaysSet})}return g}).then(g=>i.ParseStatus.mergeObjectSync(s,g)):i.ParseStatus.mergeObjectSync(s,v)}get shape(){return this._def.shape()}strict(e){return d.errorUtil.errToObj,new Z({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var o,a,h,l;const v=(h=(a=(o=this._def).errorMap)===null||a===void 0?void 0:a.call(o,t,s).message)!==null&&h!==void 0?h:s.defaultError;return t.code==="unrecognized_keys"?{message:(l=d.errorUtil.errToObj(e).message)!==null&&l!==void 0?l:v}:{message:v}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(e){return new Z({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:I.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){const t={};return u.util.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new Z({...this._def,shape:()=>t})}omit(e){const t={};return u.util.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new Z({...this._def,shape:()=>t})}deepPartial(){return H(this)}partial(e){const t={};return u.util.objectKeys(this.shape).forEach(s=>{const o=this.shape[s];e&&!e[s]?t[s]=o:t[s]=o.optional()}),new Z({...this._def,shape:()=>t})}required(e){const t={};return u.util.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof M;)a=a._def.innerType;t[s]=a}}),new Z({...this._def,shape:()=>t})}keyof(){return De(u.util.objectKeys(this.shape))}}r.ZodObject=Z,Z.create=(n,e)=>new Z({shape:()=>n,unknownKeys:"strip",catchall:U.create(),typeName:I.ZodObject,...f(e)}),Z.strictCreate=(n,e)=>new Z({shape:()=>n,unknownKeys:"strict",catchall:U.create(),typeName:I.ZodObject,...f(e)}),Z.lazycreate=(n,e)=>new Z({shape:n,unknownKeys:"strip",catchall:U.create(),typeName:I.ZodObject,...f(e)});class ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function o(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;const h=a.map(l=>new c.ZodError(l.ctx.common.issues));return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:h}),i.INVALID}if(t.common.async)return Promise.all(s.map(async a=>{const h={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:h}),ctx:h}})).then(o);{let a;const h=[];for(const v of s){const g={...t,common:{...t.common,issues:[]},parent:null},b=v._parseSync({data:t.data,path:t.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!a&&(a={result:b,ctx:g}),g.common.issues.length&&h.push(g.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const l=h.map(v=>new c.ZodError(v));return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:l}),i.INVALID}}get options(){return this._def.options}}r.ZodUnion=ie,ie.create=(n,e)=>new ie({options:n,typeName:I.ZodUnion,...f(e)});const _e=n=>n instanceof ue?_e(n.schema):n instanceof A?_e(n.innerType()):n instanceof ce?[n.value]:n instanceof B?n.options:n instanceof le?Object.keys(n.enum):n instanceof fe?_e(n._def.innerType):n instanceof ne?[void 0]:n instanceof ae?[null]:null;class ve extends p{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.object)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:t.parsedType}),i.INVALID;const s=this.discriminator,o=t.data[s],a=this.optionsMap.get(o);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):((0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const o=new Map;for(const a of t){const h=_e(a.shape[e]);if(!h)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const l of h){if(o.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);o.set(l,a)}}return new ve({typeName:I.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:o,...f(s)})}}r.ZodDiscriminatedUnion=ve;function Ne(n,e){const t=(0,u.getParsedType)(n),s=(0,u.getParsedType)(e);if(n===e)return{valid:!0,data:n};if(t===u.ZodParsedType.object&&s===u.ZodParsedType.object){const o=u.util.objectKeys(e),a=u.util.objectKeys(n).filter(l=>o.indexOf(l)!==-1),h={...n,...e};for(const l of a){const v=Ne(n[l],e[l]);if(!v.valid)return{valid:!1};h[l]=v.data}return{valid:!0,data:h}}else if(t===u.ZodParsedType.array&&s===u.ZodParsedType.array){if(n.length!==e.length)return{valid:!1};const o=[];for(let a=0;a{if((0,i.isAborted)(a)||(0,i.isAborted)(h))return i.INVALID;const l=Ne(a.value,h.value);return l.valid?(((0,i.isDirty)(a)||(0,i.isDirty)(h))&&t.dirty(),{status:t.value,value:l.data}):((0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,h])=>o(a,h)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}r.ZodIntersection=oe,oe.create=(n,e,t)=>new oe({left:n,right:e,typeName:I.ZodIntersection,...f(t)});class j extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.array)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:s.parsedType}),i.INVALID;if(s.data.lengththis._def.items.length&&((0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((h,l)=>{const v=this._def.items[l]||this._def.rest;return v?v._parse(new m(s,h,s.path,l)):null}).filter(h=>!!h);return s.common.async?Promise.all(a).then(h=>i.ParseStatus.mergeArray(t,h)):i.ParseStatus.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new j({...this._def,rest:e})}}r.ZodTuple=j,j.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new j({items:n,typeName:I.ZodTuple,rest:null,...f(e)})};class de extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.object)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:s.parsedType}),i.INVALID;const o=[],a=this._def.keyType,h=this._def.valueType;for(const l in s.data)o.push({key:a._parse(new m(s,l,s.path,l)),value:h._parse(new m(s,s.data[l],s.path,l))});return s.common.async?i.ParseStatus.mergeObjectAsync(t,o):i.ParseStatus.mergeObjectSync(t,o)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof p?new de({keyType:e,valueType:t,typeName:I.ZodRecord,...f(s)}):new de({keyType:P.create(),valueType:e,typeName:I.ZodRecord,...f(t)})}}r.ZodRecord=de;class ge extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.map)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.map,received:s.parsedType}),i.INVALID;const o=this._def.keyType,a=this._def.valueType,h=[...s.data.entries()].map(([l,v],g)=>({key:o._parse(new m(s,l,s.path,[g,"key"])),value:a._parse(new m(s,v,s.path,[g,"value"]))}));if(s.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const v of h){const g=await v.key,b=await v.value;if(g.status==="aborted"||b.status==="aborted")return i.INVALID;(g.status==="dirty"||b.status==="dirty")&&t.dirty(),l.set(g.value,b.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const v of h){const g=v.key,b=v.value;if(g.status==="aborted"||b.status==="aborted")return i.INVALID;(g.status==="dirty"||b.status==="dirty")&&t.dirty(),l.set(g.value,b.value)}return{status:t.value,value:l}}}}r.ZodMap=ge,ge.create=(n,e,t)=>new ge({valueType:e,keyType:n,typeName:I.ZodMap,...f(t)});class W extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.ZodParsedType.set)return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.set,received:s.parsedType}),i.INVALID;const o=this._def;o.minSize!==null&&s.data.sizeo.maxSize.value&&((0,i.addIssueToContext)(s,{code:c.ZodIssueCode.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),t.dirty());const a=this._def.valueType;function h(v){const g=new Set;for(const b of v){if(b.status==="aborted")return i.INVALID;b.status==="dirty"&&t.dirty(),g.add(b.value)}return{status:t.value,value:g}}const l=[...s.data.values()].map((v,g)=>a._parse(new m(s,v,s.path,g)));return s.common.async?Promise.all(l).then(v=>h(v)):h(l)}min(e,t){return new W({...this._def,minSize:{value:e,message:d.errorUtil.toString(t)}})}max(e,t){return new W({...this._def,maxSize:{value:e,message:d.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}r.ZodSet=W,W.create=(n,e)=>new W({valueType:n,minSize:null,maxSize:null,typeName:I.ZodSet,...f(e)});class X extends p{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.function)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.function,received:t.parsedType}),i.INVALID;function s(l,v){return(0,i.makeIssue)({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(g=>!!g),issueData:{code:c.ZodIssueCode.invalid_arguments,argumentsError:v}})}function o(l,v){return(0,i.makeIssue)({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(g=>!!g),issueData:{code:c.ZodIssueCode.invalid_return_type,returnTypeError:v}})}const a={errorMap:t.common.contextualErrorMap},h=t.data;return this._def.returns instanceof F?(0,i.OK)(async(...l)=>{const v=new c.ZodError([]),g=await this._def.args.parseAsync(l,a).catch(Oe=>{throw v.addIssue(s(l,Oe)),v}),b=await h(...g);return await this._def.returns._def.type.parseAsync(b,a).catch(Oe=>{throw v.addIssue(o(b,Oe)),v})}):(0,i.OK)((...l)=>{const v=this._def.args.safeParse(l,a);if(!v.success)throw new c.ZodError([s(l,v.error)]);const g=h(...v.data),b=this._def.returns.safeParse(g,a);if(!b.success)throw new c.ZodError([o(g,b.error)]);return b.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new X({...this._def,args:j.create(e).rest(K.create())})}returns(e){return new X({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new X({args:e||j.create([]).rest(K.create()),returns:t||K.create(),typeName:I.ZodFunction,...f(s)})}}r.ZodFunction=X;class ue extends p{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}r.ZodLazy=ue,ue.create=(n,e)=>new ue({getter:n,typeName:I.ZodLazy,...f(e)});class ce extends p{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}r.ZodLiteral=ce,ce.create=(n,e)=>new ce({value:n,typeName:I.ZodLiteral,...f(e)});function De(n,e){return new B({values:n,typeName:I.ZodEnum,...f(e)})}class B extends p{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return(0,i.addIssueToContext)(t,{expected:u.util.joinValues(s),received:t.parsedType,code:c.ZodIssueCode.invalid_type}),i.INVALID}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return(0,i.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_enum_value,options:s}),i.INVALID}return(0,i.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return B.create(e)}exclude(e){return B.create(this.options.filter(t=>!e.includes(t)))}}r.ZodEnum=B,B.create=De;class le extends p{_parse(e){const t=u.util.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.ZodParsedType.string&&s.parsedType!==u.ZodParsedType.number){const o=u.util.objectValues(t);return(0,i.addIssueToContext)(s,{expected:u.util.joinValues(o),received:s.parsedType,code:c.ZodIssueCode.invalid_type}),i.INVALID}if(t.indexOf(e.data)===-1){const o=u.util.objectValues(t);return(0,i.addIssueToContext)(s,{received:s.data,code:c.ZodIssueCode.invalid_enum_value,options:o}),i.INVALID}return(0,i.OK)(e.data)}get enum(){return this._def.values}}r.ZodNativeEnum=le,le.create=(n,e)=>new le({values:n,typeName:I.ZodNativeEnum,...f(e)});class F extends p{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.promise&&t.common.async===!1)return(0,i.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.promise,received:t.parsedType}),i.INVALID;const s=t.parsedType===u.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,i.OK)(s.then(o=>this._def.type.parseAsync(o,{path:t.path,errorMap:t.common.contextualErrorMap})))}}r.ZodPromise=F,F.create=(n,e)=>new F({type:n,typeName:I.ZodPromise,...f(e)});class A extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===I.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),o=this._def.effect||null;if(o.type==="preprocess"){const h=o.transform(s.data);return s.common.async?Promise.resolve(h).then(l=>this._def.schema._parseAsync({data:l,path:s.path,parent:s})):this._def.schema._parseSync({data:h,path:s.path,parent:s})}const a={addIssue:h=>{(0,i.addIssueToContext)(s,h),h.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="refinement"){const h=l=>{const v=o.refinement(l,a);if(s.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(s.common.async===!1){const l=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?i.INVALID:(l.status==="dirty"&&t.dirty(),h(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(l=>l.status==="aborted"?i.INVALID:(l.status==="dirty"&&t.dirty(),h(l.value).then(()=>({status:t.value,value:l.value}))))}if(o.type==="transform")if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!(0,i.isValid)(h))return h;const l=o.transform(h.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>(0,i.isValid)(h)?Promise.resolve(o.transform(h.value,a)).then(l=>({status:t.value,value:l})):h);u.util.assertNever(o)}}r.ZodEffects=A,r.ZodTransformer=A,A.create=(n,e,t)=>new A({schema:n,typeName:I.ZodEffects,effect:e,...f(t)}),A.createWithPreprocess=(n,e,t)=>new A({schema:e,effect:{type:"preprocess",transform:n},typeName:I.ZodEffects,...f(t)});class M extends p{_parse(e){return this._getType(e)===u.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}r.ZodOptional=M,M.create=(n,e)=>new M({innerType:n,typeName:I.ZodOptional,...f(e)});class J extends p{_parse(e){return this._getType(e)===u.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}r.ZodNullable=J,J.create=(n,e)=>new J({innerType:n,typeName:I.ZodNullable,...f(e)});class fe extends p{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.ZodParsedType.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}r.ZodDefault=fe,fe.create=(n,e)=>new fe({innerType:n,typeName:I.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...f(e)});class Ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return(0,i.isAsync)(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new c.ZodError(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new c.ZodError(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}r.ZodCatch=Ie,Ie.create=(n,e)=>new Ie({innerType:n,typeName:I.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...f(e)});class be extends p{_parse(e){if(this._getType(e)!==u.ZodParsedType.nan){const s=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(s,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.nan,received:s.parsedType}),i.INVALID}return{status:"valid",value:e.data}}}r.ZodNaN=be,be.create=n=>new be({typeName:I.ZodNaN,...f(n)}),r.BRAND=Symbol("zod_brand");class Ve extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}r.ZodBranded=Ve;class he extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?i.INVALID:a.status==="dirty"?(t.dirty(),(0,i.DIRTY)(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?i.INVALID:o.status==="dirty"?(t.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(e,t){return new he({in:e,out:t,typeName:I.ZodPipeline})}}r.ZodPipeline=he;const Qe=(n,e={},t)=>n?G.create().superRefine((s,o)=>{var a,h;if(!n(s)){const l=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,v=(h=(a=l.fatal)!==null&&a!==void 0?a:t)!==null&&h!==void 0?h:!0,g=typeof l=="string"?{message:l}:l;o.addIssue({code:"custom",...g,fatal:v})}}):G.create();r.custom=Qe,r.late={object:Z.lazycreate};var I;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline"})(I=r.ZodFirstPartyTypeKind||(r.ZodFirstPartyTypeKind={}));const Ge=(n,e={message:`Input not instance of ${n.name}`})=>(0,r.custom)(t=>t instanceof n,e);r.instanceof=Ge;const Re=P.create;r.string=Re;const Ue=E.create;r.number=Ue;const He=be.create;r.nan=He;const Xe=z.create;r.bigint=Xe;const Me=se.create;r.boolean=Me;const Fe=q.create;r.date=Fe;const et=me.create;r.symbol=et;const tt=ne.create;r.undefined=tt;const rt=ae.create;r.null=rt;const st=G.create;r.any=st;const nt=K.create;r.unknown=nt;const at=U.create;r.never=at;const it=ye.create;r.void=it;const ot=S.create;r.array=ot;const dt=Z.create;r.object=dt;const ut=Z.strictCreate;r.strictObject=ut;const ct=ie.create;r.union=ct;const lt=ve.create;r.discriminatedUnion=lt;const ft=oe.create;r.intersection=ft;const ht=j.create;r.tuple=ht;const pt=de.create;r.record=pt;const mt=ge.create;r.map=mt;const yt=W.create;r.set=yt;const _t=X.create;r.function=_t;const vt=ue.create;r.lazy=vt;const gt=ce.create;r.literal=gt;const It=B.create;r.enum=It;const bt=le.create;r.nativeEnum=bt;const Tt=F.create;r.promise=Tt;const Le=A.create;r.effect=Le,r.transformer=Le;const Zt=M.create;r.optional=Zt;const Ct=J.create;r.nullable=Ct;const kt=A.createWithPreprocess;r.preprocess=kt;const wt=he.create;r.pipeline=wt;const Pt=()=>Re().optional();r.ostring=Pt;const Nt=()=>Ue().optional();r.onumber=Nt;const Ot=()=>Me().optional();r.oboolean=Ot,r.coerce={string:n=>P.create({...n,coerce:!0}),number:n=>E.create({...n,coerce:!0}),boolean:n=>se.create({...n,coerce:!0}),bigint:n=>z.create({...n,coerce:!0}),date:n=>q.create({...n,coerce:!0})},r.NEVER=i.INVALID})(Je);(function(r){var _=C&&C.__createBinding||(Object.create?function(i,u,c,m){m===void 0&&(m=c),Object.defineProperty(i,m,{enumerable:!0,get:function(){return u[c]}})}:function(i,u,c,m){m===void 0&&(m=c),i[m]=u[c]}),d=C&&C.__exportStar||function(i,u){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&_(u,i,c)};Object.defineProperty(r,"__esModule",{value:!0}),d(D,r),d(je,r),d(We,r),d(pe,r),d(Je,r),d(V,r)})(Ee);(function(r){var _=C&&C.__createBinding||(Object.create?function(m,y,f,p){p===void 0&&(p=f),Object.defineProperty(m,p,{enumerable:!0,get:function(){return y[f]}})}:function(m,y,f,p){p===void 0&&(p=f),m[p]=y[f]}),d=C&&C.__setModuleDefault||(Object.create?function(m,y){Object.defineProperty(m,"default",{enumerable:!0,value:y})}:function(m,y){m.default=y}),i=C&&C.__importStar||function(m){if(m&&m.__esModule)return m;var y={};if(m!=null)for(var f in m)f!=="default"&&Object.prototype.hasOwnProperty.call(m,f)&&_(y,m,f);return d(y,m),y},u=C&&C.__exportStar||function(m,y){for(var f in m)f!=="default"&&!Object.prototype.hasOwnProperty.call(y,f)&&_(y,m,f)};Object.defineProperty(r,"__esModule",{value:!0}),r.z=void 0;const c=i(Ee);r.z=c,u(Ee,r),r.default=c})(ze);Object.defineProperty(re,"__esModule",{value:!0});re.parseExecution=re.validateType=void 0;const Q=ze,Se=Ae,Vt=Q.z.object({connectorType:Q.z.enum(Se.connectorNames),settings:Q.z.record(Q.z.string()),methodName:Q.z.string(),params:Q.z.record(Q.z.any())});function te(r,_){return r.type==="string"?typeof _=="string":r.type==="options"?typeof _=="string"&&r.values.includes(_):r.type==="number"?typeof _=="number":r.type==="boolean"?typeof _=="boolean":r.type==="object"?typeof _=="object"&&Object.keys(r.values).every(d=>_&&d in _&&te(r.values[d],_[d])):r.type==="array"?Array.isArray(_)&&_.every(d=>te(r.items,d)):r.type==="union"?r.values.some(d=>te(d,_)):r.type==="any"}re.validateType=te;function Rt(r){try{const _=Vt.parse(r);if(!(_.connectorType in Se.schema))throw new Error(`Invalid connector: ${_.connectorType}`);const d=_.connectorType,i=Se.schema[d];if(Object.keys(_.settings).map(f=>f in i.settings).includes(!1))throw new Error("Invalid settings - Extra settings provided");const u={};for(const f in i.settings)if(f in _.settings)if(te(i.settings[f],_.settings[f]))u[f]=_.settings[f];else throw new Error(`Invalid setting: ${f}`);else if(i.settings[f].required)throw new Error(`Missing setting: ${f}`);if(!(_.methodName in i.methods))throw new Error(`Invalid method: ${_.methodName}`);const c=_.methodName,m=i.methods[c];if(Object.keys(_.params).map(f=>f in m.params).includes(!1))throw new Error("Invalid params - Extra params provided");const y={};for(const f in m.params)if(f in _.params)if(te(m.params[f],_.params[f]))y[f]=_.params[f];else throw new Error(`Invalid param: ${f}`);else if(m.params[f].required)throw new Error(`Missing param: ${f}`);return{result:{connectorType:d,methodName:c,params:y,settings:u}}}catch(_){return{error:_.message}}}re.parseExecution=Rt;(function(r){var _=C&&C.__createBinding||(Object.create?function(i,u,c,m){m===void 0&&(m=c);var y=Object.getOwnPropertyDescriptor(u,c);(!y||("get"in y?!u.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(i,m,y)}:function(i,u,c,m){m===void 0&&(m=c),i[m]=u[c]}),d=C&&C.__exportStar||function(i,u){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&_(u,i,c)};Object.defineProperty(r,"__esModule",{value:!0}),d($e,r),d(Ae,r),d(re,r)})(Et);export{Et as b}; +//# sourceMappingURL=index.dae46ea1.js.map diff --git a/abstra_statics/dist/assets/javascript.f90e66cb.js b/abstra_statics/dist/assets/javascript.ad911371.js similarity index 64% rename from abstra_statics/dist/assets/javascript.f90e66cb.js rename to abstra_statics/dist/assets/javascript.ad911371.js index 6c09661bff..d9fede147f 100644 --- a/abstra_statics/dist/assets/javascript.f90e66cb.js +++ b/abstra_statics/dist/assets/javascript.ad911371.js @@ -1,7 +1,7 @@ -import{conf as i,language as e}from"./typescript.8aa88c16.js";import"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="218567e3-273c-46a8-b239-2f634c39bcb8",t._sentryDebugIdIdentifier="sentry-dbid-218567e3-273c-46a8-b239-2f634c39bcb8")}catch{}})();/*!----------------------------------------------------------------------------- +import{conf as i,language as e}from"./typescript.ac0b7aa1.js";import"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="ab86b0f2-6092-4628-81fb-e8dbb733c320",t._sentryDebugIdIdentifier="sentry-dbid-ab86b0f2-6092-4628-81fb-e8dbb733c320")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var d=i,c={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{d as conf,c as language}; -//# sourceMappingURL=javascript.f90e66cb.js.map + *-----------------------------------------------------------------------------*/var d=i,f={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{d as conf,f as language}; +//# sourceMappingURL=javascript.ad911371.js.map diff --git a/abstra_statics/dist/assets/jobs.2ad85710.js b/abstra_statics/dist/assets/jobs.310261dd.js similarity index 61% rename from abstra_statics/dist/assets/jobs.2ad85710.js rename to abstra_statics/dist/assets/jobs.310261dd.js index 6728cd46ae..f1ed9f11c6 100644 --- a/abstra_statics/dist/assets/jobs.2ad85710.js +++ b/abstra_statics/dist/assets/jobs.310261dd.js @@ -1,2 +1,2 @@ -var n=Object.defineProperty;var o=(s,e,t)=>e in s?n(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>(o(s,typeof e!="symbol"?e+"":e,t),t);import{A as d}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="9a98df80-839d-434b-81a6-b6049a90f405",s._sentryDebugIdIdentifier="sentry-dbid-9a98df80-839d-434b-81a6-b6049a90f405")}catch{}})();class c{async list(){return await(await fetch("/_editor/api/jobs")).json()}async create(){return await(await fetch("/_editor/api/jobs",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(e){return await(await fetch(`/_editor/api/jobs/${e}`)).json()}async update(e,t){return await(await fetch(`/_editor/api/jobs/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}async delete(e){await fetch(`/_editor/api/jobs/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async test(e){return(await fetch(`/_editor/api/jobs/${e}/test`,{method:"POST",headers:{"Content-Type":"application/json"}})).json()}}const r=new c;class a{constructor(e){i(this,"record");this.record=d.create(r,e,"identifier")}static async list(){return(await r.list()).map(t=>new a(t))}static async create(){const e=await r.create();return new a(e)}static async get(e){const t=await r.get(e);return new a(t)}async delete(){await r.delete(this.identifier)}async duplicate(){return this}async save(){await this.record.save()}onUpdate(e){this.record.pubsub.subscribe("update",e)}hasChanges(){return this.record.hasChanges()}get schedule(){return this.record.get("schedule")}set schedule(e){this.record.set("schedule",e)}get title(){return this.record.get("title")}get file(){return this.record.get("file")}set file(e){this.record.set("file",e)}get identifier(){return this.record.get("identifier")}set identifier(e){this.record.set("identifier",e)}async test(){return r.test(this.identifier)}get routeName(){return"job"}}export{a as J}; -//# sourceMappingURL=jobs.2ad85710.js.map +var n=Object.defineProperty;var o=(s,e,t)=>e in s?n(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>(o(s,typeof e!="symbol"?e+"":e,t),t);import{A as c}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="b0843f75-a406-47fa-a992-7e48a32da619",s._sentryDebugIdIdentifier="sentry-dbid-b0843f75-a406-47fa-a992-7e48a32da619")}catch{}})();class d{async list(){return await(await fetch("/_editor/api/jobs")).json()}async create(){return await(await fetch("/_editor/api/jobs",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(e){return await(await fetch(`/_editor/api/jobs/${e}`)).json()}async update(e,t){return await(await fetch(`/_editor/api/jobs/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}async delete(e){await fetch(`/_editor/api/jobs/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async test(e){return(await fetch(`/_editor/api/jobs/${e}/test`,{method:"POST",headers:{"Content-Type":"application/json"}})).json()}}const a=new d;class r{constructor(e){i(this,"record");this.record=c.create(a,e,"identifier")}static async list(){return(await a.list()).map(t=>new r(t))}static async create(){const e=await a.create();return new r(e)}static async get(e){const t=await a.get(e);return new r(t)}async delete(){await a.delete(this.identifier)}async duplicate(){return this}async save(){await this.record.save()}onUpdate(e){this.record.pubsub.subscribe("update",e)}hasChanges(){return this.record.hasChanges()}get schedule(){return this.record.get("schedule")}set schedule(e){this.record.set("schedule",e)}get title(){return this.record.get("title")}get file(){return this.record.get("file")}set file(e){this.record.set("file",e)}get identifier(){return this.record.get("identifier")}set identifier(e){this.record.set("identifier",e)}async test(){return a.test(this.identifier)}get routeName(){return"job"}}export{r as J}; +//# sourceMappingURL=jobs.310261dd.js.map diff --git a/abstra_statics/dist/assets/jsonMode.9952188c.js b/abstra_statics/dist/assets/jsonMode.8ce8b65f.js similarity index 99% rename from abstra_statics/dist/assets/jsonMode.9952188c.js rename to abstra_statics/dist/assets/jsonMode.8ce8b65f.js index bcff320607..5a099f67d3 100644 --- a/abstra_statics/dist/assets/jsonMode.9952188c.js +++ b/abstra_statics/dist/assets/jsonMode.8ce8b65f.js @@ -1,4 +1,4 @@ -var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var A=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1184914e-5943-42bd-a65c-bd4494add5ae",e._sentryDebugIdIdentifier="sentry-dbid-1184914e-5943-42bd-a65c-bd4494add5ae")}catch{}})();/*!----------------------------------------------------------------------------- +var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var A=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56130dc2-0654-4755-8943-044653c2a78a",e._sentryDebugIdIdentifier="sentry-dbid-56130dc2-0654-4755-8943-044653c2a78a")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license @@ -9,4 +9,4 @@ var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,config `+e.value+"\n```\n"}}function pt(e){if(!!e)return Array.isArray(e)?e.map(We):[We(e)]}var qt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDocumentHighlights(r.toString(),L(n))).then(t=>{if(!!t)return t.map(a=>({range:y(a.range),kind:_t(a.kind)}))})}};function _t(e){switch(e){case U.Read:return l.languages.DocumentHighlightKind.Read;case U.Write:return l.languages.DocumentHighlightKind.Write;case U.Text:return l.languages.DocumentHighlightKind.Text}return l.languages.DocumentHighlightKind.Text}var Xt=class{constructor(e){this._worker=e}provideDefinition(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.findDefinition(r.toString(),L(n))).then(t=>{if(!!t)return[qe(t)]})}};function qe(e){return{uri:l.Uri.parse(e.uri),range:y(e.range)}}var Jt=class{constructor(e){this._worker=e}provideReferences(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.findReferences(t.toString(),L(n))).then(a=>{if(!!a)return a.map(qe)})}},Yt=class{constructor(e){this._worker=e}provideRenameEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.doRename(t.toString(),L(n),i)).then(a=>mt(a))}};function mt(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=l.Uri.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:y(t.range),text:t.newText}})}return{edits:n}}var kt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentSymbols(i.toString())).then(r=>{if(!!r)return r.map(t=>({name:t.name,detail:"",containerName:t.containerName,kind:wt(t.kind),range:y(t.location.range),selectionRange:y(t.location.range),tags:[]}))})}};function wt(e){let n=l.languages.SymbolKind;switch(e){case _.File:return n.Array;case _.Module:return n.Module;case _.Namespace:return n.Namespace;case _.Package:return n.Package;case _.Class:return n.Class;case _.Method:return n.Method;case _.Property:return n.Property;case _.Field:return n.Field;case _.Constructor:return n.Constructor;case _.Enum:return n.Enum;case _.Interface:return n.Interface;case _.Function:return n.Function;case _.Variable:return n.Variable;case _.Constant:return n.Constant;case _.String:return n.String;case _.Number:return n.Number;case _.Boolean:return n.Boolean;case _.Array:return n.Array}return n.Function}var $t=class{constructor(e){this._worker=e}provideLinks(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentLinks(i.toString())).then(r=>{if(!!r)return{links:r.map(t=>({range:y(t.range),url:t.target}))}})}},bt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.format(r.toString(),null,Xe(n)).then(a=>{if(!(!a||a.length===0))return a.map(X)}))}},Ct=class{constructor(e){this._worker=e}provideDocumentRangeFormattingEdits(e,n,i,r){const t=e.uri;return this._worker(t).then(a=>a.format(t.toString(),Be(n),Xe(i)).then(s=>{if(!(!s||s.length===0))return s.map(X)}))}};function Xe(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Et=class{constructor(e){this._worker=e}provideDocumentColors(e,n){const i=e.uri;return this._worker(i).then(r=>r.findDocumentColors(i.toString())).then(r=>{if(!!r)return r.map(t=>({color:t.color,range:y(t.range)}))})}provideColorPresentations(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getColorPresentations(r.toString(),n.color,Be(n.range))).then(t=>{if(!!t)return t.map(a=>{let s={label:a.label};return a.textEdit&&(s.textEdit=X(a.textEdit)),a.additionalTextEdits&&(s.additionalTextEdits=a.additionalTextEdits.map(X)),s})})}},At=class{constructor(e){this._worker=e}provideFoldingRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getFoldingRanges(r.toString(),n)).then(t=>{if(!!t)return t.map(a=>{const s={start:a.startLine+1,end:a.endLine+1};return typeof a.kind<"u"&&(s.kind=yt(a.kind)),s})})}};function yt(e){switch(e){case W.Comment:return l.languages.FoldingRangeKind.Comment;case W.Imports:return l.languages.FoldingRangeKind.Imports;case W.Region:return l.languages.FoldingRangeKind.Region}}var It=class{constructor(e){this._worker=e}provideSelectionRanges(e,n,i){const r=e.uri;return this._worker(r).then(t=>t.getSelectionRanges(r.toString(),n.map(L))).then(t=>{if(!!t)return t.map(a=>{const s=[];for(;a;)s.push({range:y(a.range)}),a=a.parent;return s})})}};function St(e,n){n===void 0&&(n=!1);var i=e.length,r=0,t="",a=0,s=16,u=0,c=0,d=0,v=0,g=0;function b(f,C){for(var I=0,E=0;I=48&&k<=57)E=E*16+k-48;else if(k>=65&&k<=70)E=E*16+k-65+10;else if(k>=97&&k<=102)E=E*16+k-97+10;else break;r++,I++}return I=i){f+=e.substring(C,r),g=2;break}var I=e.charCodeAt(r);if(I===34){f+=e.substring(C,r),r++;break}if(I===92){if(f+=e.substring(C,r),r++,r>=i){g=2;break}var E=e.charCodeAt(r++);switch(E){case 34:f+='"';break;case 92:f+="\\";break;case 47:f+="/";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=` `;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:var k=b(4,!0);k>=0?f+=String.fromCharCode(k):g=4;break;default:g=5}C=r;continue}if(I>=0&&I<=31)if(F(I)){f+=e.substring(C,r),g=2;break}else g=6;r++}return f}function j(){if(t="",g=0,a=r,c=u,v=d,r>=i)return a=i,s=17;var f=e.charCodeAt(r);if(ee(f)){do r++,t+=String.fromCharCode(f),f=e.charCodeAt(r);while(ee(f));return s=15}if(F(f))return r++,t+=String.fromCharCode(f),f===13&&e.charCodeAt(r)===10&&(r++,t+=` `),u++,d=r,s=14;switch(f){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,t=M(),s=10;case 47:var C=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&f<=15);return f}return{setPosition:h,getPosition:function(){return r},scan:n?$e:j,getToken:function(){return s},getTokenValue:function(){return t},getTokenOffset:function(){return a},getTokenLength:function(){return r-a},getTokenStartLine:function(){return c},getTokenStartCharacter:function(){return a-v},getTokenError:function(){return g}}}function ee(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function F(e){return e===10||e===13||e===8232||e===8233}function R(e){return e>=48&&e<=57}var Ue;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ue||(Ue={}));var Tt=St;function Dt(e){return{getInitialState:()=>new K(null,null,!1,null),tokenize:(n,i)=>Wt(e,n,i)}}var Ve="delimiter.bracket.json",He="delimiter.array.json",Pt="delimiter.colon.json",Lt="delimiter.comma.json",Mt="keyword.json",Rt="keyword.json",Nt="string.value.json",Ot="number.json",xt="string.key.json",jt="comment.block.json",Ft="comment.line.json",O=class{constructor(e,n){this.parent=e,this.type=n}static pop(e){return e?e.parent:null}static push(e,n){return new O(e,n)}static equals(e,n){if(!e&&!n)return!0;if(!e||!n)return!1;for(;e&&n;){if(e===n)return!0;if(e.type!==n.type)return!1;e=e.parent,n=n.parent}return!0}},K=class{constructor(e,n,i,r){A(this,"_state");A(this,"scanError");A(this,"lastWasColon");A(this,"parents");this._state=e,this.scanError=n,this.lastWasColon=i,this.parents=r}clone(){return new K(this._state,this.scanError,this.lastWasColon,this.parents)}equals(e){return e===this?!0:!e||!(e instanceof K)?!1:this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&O.equals(this.parents,e.parents)}getStateData(){return this._state}setStateData(e){this._state=e}};function Wt(e,n,i,r=0){let t=0,a=!1;switch(i.scanError){case 2:n='"'+n,t=1;break;case 1:n="/*"+n,t=2;break}const s=Tt(n);let u=i.lastWasColon,c=i.parents;const d={tokens:[],endState:i.clone()};for(;;){let v=r+s.getPosition(),g="";const b=s.scan();if(b===17)break;if(v===r+s.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+n.substr(s.getPosition(),3));switch(a&&(v-=t),a=t>0,b){case 1:c=O.push(c,0),g=Ve,u=!1;break;case 2:c=O.pop(c),g=Ve,u=!1;break;case 3:c=O.push(c,1),g=He,u=!1;break;case 4:c=O.pop(c),g=He,u=!1;break;case 6:g=Pt,u=!0;break;case 5:g=Lt,u=!1;break;case 8:case 9:g=Mt,u=!1;break;case 7:g=Rt,u=!1;break;case 10:const S=(c?c.type:0)===1;g=u||S?Nt:xt,u=!1;break;case 11:g=Ot,u=!1;break}if(e)switch(b){case 12:g=Ft;break;case 13:g=jt;break}d.endState=new K(i.getStateData(),s.getTokenError(),u,c),d.tokens.push({startIndex:v,scopes:g})}return d}var Ut=class extends ot{constructor(e,n,i){super(e,n,i.onDidChange),this._disposables.push(l.editor.onWillDisposeModel(r=>{this._resetSchema(r.uri)})),this._disposables.push(l.editor.onDidChangeModelLanguage(r=>{this._resetSchema(r.model.uri)}))}_resetSchema(e){this._worker().then(n=>{n.resetSchema(e.toString())})}};function Gt(e){const n=[],i=[],r=new at(e);n.push(r);const t=(...u)=>r.getLanguageServiceWorker(...u);function a(){const{languageId:u,modeConfiguration:c}=e;Je(i),c.documentFormattingEdits&&i.push(l.languages.registerDocumentFormattingEditProvider(u,new bt(t))),c.documentRangeFormattingEdits&&i.push(l.languages.registerDocumentRangeFormattingEditProvider(u,new Ct(t))),c.completionItems&&i.push(l.languages.registerCompletionItemProvider(u,new dt(t,[" ",":",'"']))),c.hovers&&i.push(l.languages.registerHoverProvider(u,new ht(t))),c.documentSymbols&&i.push(l.languages.registerDocumentSymbolProvider(u,new kt(t))),c.tokens&&i.push(l.languages.setTokensProvider(u,Dt(!0))),c.colors&&i.push(l.languages.registerColorProvider(u,new Et(t))),c.foldingRanges&&i.push(l.languages.registerFoldingRangeProvider(u,new At(t))),c.diagnostics&&i.push(new Ut(u,t,e)),c.selectionRanges&&i.push(l.languages.registerSelectionRangeProvider(u,new It(t)))}a(),n.push(l.languages.setLanguageConfiguration(e.languageId,Vt));let s=e.modeConfiguration;return e.onDidChange(u=>{u.modeConfiguration!==s&&(s=u.modeConfiguration,a())}),n.push(ze(i)),ze(n)}function ze(e){return{dispose:()=>Je(e)}}function Je(e){for(;e.length;)e.pop().dispose()}var Vt={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{dt as CompletionAdapter,Xt as DefinitionAdapter,ot as DiagnosticsAdapter,Et as DocumentColorAdapter,bt as DocumentFormattingEditProvider,qt as DocumentHighlightAdapter,$t as DocumentLinkAdapter,Ct as DocumentRangeFormattingEditProvider,kt as DocumentSymbolAdapter,At as FoldingRangeAdapter,ht as HoverAdapter,Jt as ReferenceAdapter,Yt as RenameAdapter,It as SelectionRangeAdapter,at as WorkerManager,L as fromPosition,Be as fromRange,Gt as setupMode,y as toRange,X as toTextEdit}; -//# sourceMappingURL=jsonMode.9952188c.js.map +//# sourceMappingURL=jsonMode.8ce8b65f.js.map diff --git a/abstra_statics/dist/assets/liquid.022aa170.js b/abstra_statics/dist/assets/liquid.f7b7c7fe.js similarity index 93% rename from abstra_statics/dist/assets/liquid.022aa170.js rename to abstra_statics/dist/assets/liquid.f7b7c7fe.js index 8c0b094645..36668bbb56 100644 --- a/abstra_statics/dist/assets/liquid.022aa170.js +++ b/abstra_statics/dist/assets/liquid.f7b7c7fe.js @@ -1,7 +1,7 @@ -import{m as d}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="550a5aa4-8033-40c8-93c3-5b8659f2d258",t._sentryDebugIdIdentifier="sentry-dbid-550a5aa4-8033-40c8-93c3-5b8659f2d258")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as d}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4c6487c9-3d68-4ace-a5a7-5c88483f7e4a",t._sentryDebugIdIdentifier="sentry-dbid-4c6487c9-3d68-4ace-a5a7-5c88483f7e4a")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/var s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,m=Object.prototype.hasOwnProperty,a=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!m.call(t,r)&&r!==i&&s(t,r,{get:()=>e[r],enumerable:!(o=c(e,r))||o.enumerable});return t},p=(t,e,i)=>(a(t,e,"default"),i&&a(i,e,"default")),n={};p(n,d);var l=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],g={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${l.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${l.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:n.languages.IndentAction.Indent}}]},b={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{g as conf,b as language}; -//# sourceMappingURL=liquid.022aa170.js.map +//# sourceMappingURL=liquid.f7b7c7fe.js.map diff --git a/abstra_statics/dist/assets/login.bbc5e7c0.js b/abstra_statics/dist/assets/login.6c1df514.js similarity index 71% rename from abstra_statics/dist/assets/login.bbc5e7c0.js rename to abstra_statics/dist/assets/login.6c1df514.js index fdf688e3cd..70e9eda8f2 100644 --- a/abstra_statics/dist/assets/login.bbc5e7c0.js +++ b/abstra_statics/dist/assets/login.6c1df514.js @@ -1,2 +1,2 @@ -import"./registerWidgets.ca6243ef.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="40c35be7-8b9e-43bc-bb2c-319c1843f808",n._sentryDebugIdIdentifier="sentry-dbid-40c35be7-8b9e-43bc-bb2c-319c1843f808")}catch{}})();class s{async get(){return(await fetch("/_editor/api/login")).json()}async create(e){return(await fetch("/_editor/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e})})).json()}async delete(){await fetch("/_editor/api/login",{method:"DELETE"})}}const r=new s;class o{constructor(e,t){this.projectId=e,this.authorId=t}static async get(){const e=await r.get();return e.logged?new o(e.project_id,e.author_id):null}static async create(e){const t=await r.create(e);if(!t.logged)throw new Error("Failed to login");return new o(t.project_id,t.author_id)}async delete(){return r.delete()}}export{o as L}; -//# sourceMappingURL=login.bbc5e7c0.js.map +import"./registerWidgets.89616af0.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="97c38f01-b8d5-4f6d-bed3-851910ea41b3",n._sentryDebugIdIdentifier="sentry-dbid-97c38f01-b8d5-4f6d-bed3-851910ea41b3")}catch{}})();class s{async get(){return(await fetch("/_editor/api/login")).json()}async create(e){return(await fetch("/_editor/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e})})).json()}async delete(){await fetch("/_editor/api/login",{method:"DELETE"})}}const r=new s;class o{constructor(e,t){this.projectId=e,this.authorId=t}static async get(){const e=await r.get();return e.logged?new o(e.project_id,e.author_id):null}static async create(e){const t=await r.create(e);if(!t.logged)throw new Error("Failed to login");return new o(t.project_id,t.author_id)}async delete(){return r.delete()}}export{o as L}; +//# sourceMappingURL=login.6c1df514.js.map diff --git a/abstra_statics/dist/assets/lottie.9d24e472.js b/abstra_statics/dist/assets/lottie.fc57e5ac.js similarity index 99% rename from abstra_statics/dist/assets/lottie.9d24e472.js rename to abstra_statics/dist/assets/lottie.fc57e5ac.js index 7f23892c16..1d90b119af 100644 --- a/abstra_statics/dist/assets/lottie.9d24e472.js +++ b/abstra_statics/dist/assets/lottie.fc57e5ac.js @@ -1,4 +1,4 @@ -import{p as commonjsGlobal}from"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="7d56d768-57e6-443a-9275-69613ef15700",t._sentryDebugIdIdentifier="sentry-dbid-7d56d768-57e6-443a-9275-69613ef15700")}catch{}})();var lottie={exports:{}};(function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i=t.length,s;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),t[e]=r.length===1?"0"+r:r;return function(i,s,a){return i<0&&(i=0),s<0&&(s=0),a<0&&(a=0),"#"+t[i]+t[s]+t[a]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(t)}var dataManager=function(){var t=1,e=[],r,i,s={onmessage:function(){},postMessage:function(P){r({data:P})}},a={postMessage:function(P){s.onmessage({data:P})}};function n(c){if(window.Worker&&window.Blob&&getWebWorker()){var P=new Blob(["var _workerSelf = self; self.onmessage = ",c.toString()],{type:"text/javascript"}),v=URL.createObjectURL(P);return new Worker(v)}return r=c,s}function p(){i||(i=n(function(P){function v(){function x(w,M){var A,S,T=w.length,V,F,G,N;for(S=0;S=0;M-=1)if(w[M].ty==="sh")if(w[M].ks.k.i)g(w[M].ks.k);else for(T=w[M].ks.k.length,S=0;SA[0]?!0:A[0]>w[0]?!1:w[1]>A[1]?!0:A[1]>w[1]?!1:w[2]>A[2]?!0:A[2]>w[2]?!1:null}var E=function(){var w=[4,4,14];function M(S){var T=S.t.d;S.t.d={k:[{s:T,t:0}]}}function A(S){var T,V=S.length;for(T=0;T=0;T-=1)if(S[T].ty==="sh")if(S[T].ks.k.i)S[T].ks.k.c=S[T].closed;else for(G=S[T].ks.k.length,F=0;F500)&&(this._imageLoaded(),clearInterval(l)),u+=1}.bind(this),50)}function a(o){var u=i(o,this.assetsPath,this.path),l=createNS("image");isSafari?this.testImageLoaded(l):l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){h.img=t,this._imageLoaded()}.bind(this),!1),l.setAttributeNS("http://www.w3.org/1999/xlink","href",u),this._elementHelper.append?this._elementHelper.append(l):this._elementHelper.appendChild(l);var h={img:l,assetData:o};return h}function n(o){var u=i(o,this.assetsPath,this.path),l=createTag("img");l.crossOrigin="anonymous",l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){h.img=t,this._imageLoaded()}.bind(this),!1),l.src=u;var h={img:l,assetData:o};return h}function p(o){var u={assetData:o},l=i(o,this.assetsPath,this.path);return dataManager.loadData(l,function(h){u.img=h,this._footageLoaded()}.bind(this),function(){u.img={},this._footageLoaded()}.bind(this)),u}function f(o,u){this.imagesLoadedCb=u;var l,h=o.length;for(l=0;l1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),t[e]=r.length===1?"0"+r:r;return function(i,s,a){return i<0&&(i=0),s<0&&(s=0),a<0&&(a=0),"#"+t[i]+t[s]+t[a]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(t)}var dataManager=function(){var t=1,e=[],r,i,s={onmessage:function(){},postMessage:function(P){r({data:P})}},a={postMessage:function(P){s.onmessage({data:P})}};function n(c){if(window.Worker&&window.Blob&&getWebWorker()){var P=new Blob(["var _workerSelf = self; self.onmessage = ",c.toString()],{type:"text/javascript"}),v=URL.createObjectURL(P);return new Worker(v)}return r=c,s}function p(){i||(i=n(function(P){function v(){function x(w,M){var A,S,T=w.length,V,F,G,N;for(S=0;S=0;M-=1)if(w[M].ty==="sh")if(w[M].ks.k.i)g(w[M].ks.k);else for(T=w[M].ks.k.length,S=0;SA[0]?!0:A[0]>w[0]?!1:w[1]>A[1]?!0:A[1]>w[1]?!1:w[2]>A[2]?!0:A[2]>w[2]?!1:null}var E=function(){var w=[4,4,14];function M(S){var T=S.t.d;S.t.d={k:[{s:T,t:0}]}}function A(S){var T,V=S.length;for(T=0;T=0;T-=1)if(S[T].ty==="sh")if(S[T].ks.k.i)S[T].ks.k.c=S[T].closed;else for(G=S[T].ks.k.length,F=0;F500)&&(this._imageLoaded(),clearInterval(l)),u+=1}.bind(this),50)}function a(o){var u=i(o,this.assetsPath,this.path),l=createNS("image");isSafari?this.testImageLoaded(l):l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){h.img=t,this._imageLoaded()}.bind(this),!1),l.setAttributeNS("http://www.w3.org/1999/xlink","href",u),this._elementHelper.append?this._elementHelper.append(l):this._elementHelper.appendChild(l);var h={img:l,assetData:o};return h}function n(o){var u=i(o,this.assetsPath,this.path),l=createTag("img");l.crossOrigin="anonymous",l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){h.img=t,this._imageLoaded()}.bind(this),!1),l.src=u;var h={img:l,assetData:o};return h}function p(o){var u={assetData:o},l=i(o,this.assetsPath,this.path);return dataManager.loadData(l,function(h){u.img=h,this._footageLoaded()}.bind(this),function(){u.img={},this._footageLoaded()}.bind(this)),u}function f(o,u){this.imagesLoadedCb=u;var l,h=o.length;for(l=0;lthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,r,i=e.length,s=t.layers,a,n=s.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,e=0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,i=t.length;for(r=0;r=0;A-=1)e[A].animation.destroy(M)}function _(M,A,S){var T=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),V,F=T.length;for(V=0;V0?h=_:l=_;while(Math.abs(E)>a&&++k=s?x(l,L,h,g):I===0?L:d(l,E,E+f,h,g)}},t}(),pooling=function(){function t(e){return e.concat(createSizedArray(e.length))}return{double:t}}(),poolFactory=function(){return function(t,e,r){var i=0,s=t,a=createSizedArray(s),n={newElement:p,release:f};function p(){var m;return i?(i-=1,m=a[i]):m=e(),m}function f(m){i===s&&(a=pooling.double(a),s*=2),r&&r(m),a[i]=m,i+=1}return n}}(),bezierLengthPool=function(){function t(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,t)}(),segmentsLengthPool=function(){function t(){return{lengths:[],totalLength:0}}function e(r){var i,s=r.lengths.length;for(i=0;i-.001&&u<.001}function r(c,P,v,d,x,o,u,l,h){if(v===0&&o===0&&h===0)return e(c,P,d,x,u,l);var g=t.sqrt(t.pow(d-c,2)+t.pow(x-P,2)+t.pow(o-v,2)),b=t.sqrt(t.pow(u-c,2)+t.pow(l-P,2)+t.pow(h-v,2)),E=t.sqrt(t.pow(u-d,2)+t.pow(l-x,2)+t.pow(h-o,2)),_;return g>b?g>E?_=g-b-E:_=E-b-g:E>b?_=E-b-g:_=b-g-E,_>-1e-4&&_<1e-4}var i=function(){return function(c,P,v,d){var x=getDefaultCurveSegments(),o,u,l,h,g,b=0,E,_=[],k=[],R=bezierLengthPool.newElement();for(l=v.length,o=0;ou?-1:1,g=!0;g;)if(d[o]<=u&&d[o+1]>u?(l=(u-d[o])/(d[o+1]-d[o]),g=!1):o+=h,o<0||o>=x-1){if(o===x-1)return v[o];g=!1}return v[o]+(v[o+1]-v[o])*l}function m(c,P,v,d,x,o){var u=f(x,o),l=1-u,h=t.round((l*l*l*c[0]+(u*l*l+l*u*l+l*l*u)*v[0]+(u*u*l+l*u*u+u*l*u)*d[0]+u*u*u*P[0])*1e3)/1e3,g=t.round((l*l*l*c[1]+(u*l*l+l*u*l+l*l*u)*v[1]+(u*u*l+l*u*u+u*l*u)*d[1]+u*u*u*P[1])*1e3)/1e3;return[h,g]}var y=createTypedArray("float32",8);function C(c,P,v,d,x,o,u){x<0?x=0:x>1&&(x=1);var l=f(x,u);o=o>1?1:o;var h=f(o,u),g,b=c.length,E=1-l,_=1-h,k=E*E*E,R=l*E*E*3,L=l*l*E*3,I=l*l*l,B=E*E*_,D=l*E*_+E*l*_+E*E*h,w=l*l*_+E*l*h+l*E*h,M=l*l*h,A=E*_*_,S=l*_*_+E*h*_+E*_*h,T=l*h*_+E*h*h+l*_*h,V=l*h*h,F=_*_*_,G=h*_*_+_*h*_+_*_*h,N=h*h*_+_*h*h+h*_*h,z=h*h*h;for(g=0;g=k.t-u){_.h&&(_=k),h=0;break}if(k.t-u>x){h=g;break}g=A||x=A?V.points.length-1:0;for(I=V.points[F].point.length,L=0;L=z&&G=A)l[0]=T[0],l[1]=T[1],l[2]=T[2];else if(x<=S)l[0]=_.s[0],l[1]=_.s[1],l[2]=_.s[2];else{var $=a(_.s),W=a(T),X=(x-S)/(A-S);s(l,i($,W,X))}else for(g=0;g=A?B=1:x1e-6?(I=Math.acos(B),D=Math.sin(I),w=Math.sin((1-u)*I)/D,M=Math.sin(u*I)/D):(w=1-u,M=u),l[0]=w*h+M*_,l[1]=w*g+M*k,l[2]=w*b+M*R,l[3]=w*E+M*L,l}function s(x,o){var u=o[0],l=o[1],h=o[2],g=o[3],b=Math.atan2(2*l*g-2*u*h,1-2*l*l-2*h*h),E=Math.asin(2*u*l+2*h*g),_=Math.atan2(2*u*g-2*l*h,1-2*u*u-2*h*h);x[0]=b/degToRads,x[1]=E/degToRads,x[2]=_/degToRads}function a(x){var o=x[0]*degToRads,u=x[1]*degToRads,l=x[2]*degToRads,h=Math.cos(o/2),g=Math.cos(u/2),b=Math.cos(l/2),E=Math.sin(o/2),_=Math.sin(u/2),k=Math.sin(l/2),R=h*g*b-E*_*k,L=E*_*b+h*g*k,I=E*g*b+h*_*k,B=h*_*b-E*g*k;return[L,I,B,R]}function n(){var x=this.comp.renderedFrame-this.offsetTime,o=this.keyframes[0].t-this.offsetTime,u=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(x===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=u&&x>=u||this._caching.lastFrame=x&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var l=this.interpolateValue(x,this._caching);this.pv=l}return this._caching.lastFrame=x,this.pv}function p(x){var o;if(this.propType==="unidimensional")o=x*this.mult,e(this.v-o)>1e-5&&(this.v=o,this._mdf=!0);else for(var u=0,l=this.v.length;u1e-5&&(this.v[u]=o,this._mdf=!0),u+=1}function f(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var x,o=this.effectsSequence.length,u=this.kf?this.pv:this.data.k;for(x=0;x=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,p){this.setXYAt(t,e,"v",n,p),this.setXYAt(r,i,"o",n,p),this.setXYAt(s,a,"i",n,p)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a=this._length-1,n=this._length,p;for(p=s;p=D[D.length-1].t-this.offsetTime)g=D[D.length-1].s?D[D.length-1].s[0]:D[D.length-2].e[0],E=!0;else{for(var w=h,M=D.length-1,A=!0,S,T,V;A&&(S=D[w],T=D[w+1],!(T.t-this.offsetTime>o));)w=T.t-this.offsetTime)I=1;else if(ol&&o>l)||(this._caching.lastIndex=h0||A>-1e-6&&A<0?i(A*S)/S:A}function M(){var A=this.props,S=w(A[0]),T=w(A[1]),V=w(A[4]),F=w(A[5]),G=w(A[12]),N=w(A[13]);return"matrix("+S+","+T+","+V+","+F+","+G+","+N+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=p,this.rotateZ=f,this.skew=y,this.skewFromAxis=C,this.shear=m,this.scale=c,this.setTransform=P,this.translate=v,this.transform=d,this.applyToPoint=h,this.applyToX=g,this.applyToY=b,this.applyToZ=E,this.applyToPointArray=I,this.applyToTriplePoints=L,this.applyToPointStringified=B,this.toCSS=D,this.to2dCSS=M,this.clone=u,this.cloneFromProps=l,this.equals=o,this.inversePoints=R,this.inversePoint=k,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=x,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(t)}var lottie={};function setLocation(t){setLocationHref(t)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.10.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n=[],p,f=a.length,m;for(p=0;pi+r)){var y,C;m.s*s<=i?y=0:y=(m.s*s-i)/r,m.e*s>=i+r?C=1:C=(m.e*s-i)/r,n.push([y,C])}return n.length||n.push([0,0]),n},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e1?e=1+i:this.s.v<0?e=0+i:e=this.s.v+i,this.e.v>1?r=1+i:this.e.v<0?r=0+i:r=this.e.v+i,e>r){var s=e;e=r,r=s}e=Math.round(e*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var a,n,p=this.shapes.length,f,m,y,C,c,P=0;if(r===e)for(n=0;n=0;n-=1)if(d=this.shapes[n],d.shape._mdf){for(x=d.localShapeCollection,x.releaseShapes(),this.m===2&&p>1?(h=this.calculateShapeEdges(e,r,d.totalShapeLength,l,P),l+=d.totalShapeLength):h=[[o,u]],m=h.length,f=0;f=1?v.push({s:d.totalShapeLength*(o-1),e:d.totalShapeLength*(u-1)}):(v.push({s:d.totalShapeLength*o,e:d.totalShapeLength}),v.push({s:0,e:d.totalShapeLength*(u-1)}));var g=this.addShapes(d,v[0]);if(v[0].s!==v[0].e){if(v.length>1){var b=d.shape.paths.shapes[d.shape.paths._length-1];if(b.c){var E=g.pop();this.addPaths(g,x),g=this.addShapes(d,v[1],E)}else this.addPaths(g,x),g=this.addShapes(d,v[1])}this.addPaths(g,x)}}d.shape.paths=x}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}else e.s<=m&&e.e>=m+y.addedLength?(this.addSegment(s[a].v[p-1],s[a].o[p-1],s[a].i[p],s[a].v[p],r,C,x),x=!1):(P=bez.getNewSegment(s[a].v[p-1],s[a].v[p],s[a].o[p-1],s[a].i[p],(e.s-m)/y.addedLength,(e.e-m)/y.addedLength,c[p-1]),this.addSegmentFromArray(P,r,C,x),x=!1,r.c=!1),m+=y.addedLength,C+=1;if(s[a].c&&c.length){if(y=c[p-1],m<=e.e){var o=c[p-1].addedLength;e.s<=m&&e.e>=m+o?(this.addSegment(s[a].v[p-1],s[a].o[p-1],s[a].i[0],s[a].v[0],r,C,x),x=!1):(P=bez.getNewSegment(s[a].v[p-1],s[a].v[0],s[a].o[p-1],s[a].i[0],(e.s-m)/o,(e.e-m)/o,c[p-1]),this.addSegmentFromArray(P,r,C,x),x=!1,r.c=!1)}else r.c=!1;m+=y.addedLength,C+=1}if(r._length&&(r.setXYAt(r.v[d][0],r.v[d][1],"i",d),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),m>e.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(y=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/m,0),C=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/m,0)):(y=this.p.pv,C=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/m,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){y=[],C=[];var c=this.px,P=this.py;c._caching.lastFrame+c.offsetTime<=c.keyframes[0].t?(y[0]=c.getValueAtTime((c.keyframes[0].t+.01)/m,0),y[1]=P.getValueAtTime((P.keyframes[0].t+.01)/m,0),C[0]=c.getValueAtTime(c.keyframes[0].t/m,0),C[1]=P.getValueAtTime(P.keyframes[0].t/m,0)):c._caching.lastFrame+c.offsetTime>=c.keyframes[c.keyframes.length-1].t?(y[0]=c.getValueAtTime(c.keyframes[c.keyframes.length-1].t/m,0),y[1]=P.getValueAtTime(P.keyframes[P.keyframes.length-1].t/m,0),C[0]=c.getValueAtTime((c.keyframes[c.keyframes.length-1].t-.01)/m,0),C[1]=P.getValueAtTime((P.keyframes[P.keyframes.length-1].t-.01)/m,0)):(y=[c.pv,P.pv],C[0]=c.getValueAtTime((c._caching.lastFrame+c.offsetTime-.01)/m,c.offsetTime),C[1]=P.getValueAtTime((P._caching.lastFrame+P.offsetTime-.01)/m,P.offsetTime))}else C=t,y=C;this.v.rotate(-Math.atan2(y[1]-C[1],y[0]-C[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function i(){if(!this.a.k)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function s(){}function a(f){this._addDynamicProperty(f),this.elem.addDynamicProperty(f),this._isDirty=!0}function n(f,m,y){if(this.elem=f,this.frameId=-1,this.propType="transform",this.data=m,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(y||f),m.p&&m.p.s?(this.px=PropertyFactory.getProp(f,m.p.x,0,0,this),this.py=PropertyFactory.getProp(f,m.p.y,0,0,this),m.p.z&&(this.pz=PropertyFactory.getProp(f,m.p.z,0,0,this))):this.p=PropertyFactory.getProp(f,m.p||{k:[0,0,0]},1,0,this),m.rx){if(this.rx=PropertyFactory.getProp(f,m.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(f,m.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(f,m.rz,0,degToRads,this),m.or.k[0].ti){var C,c=m.or.k.length;for(C=0;C0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e0?Math.floor(c):Math.ceil(c),d=this.pMatrix.props,x=this.rMatrix.props,o=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var u=0;if(c>0){for(;uv;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),u-=1;P&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-P,!0),u-=P)}i=this.data.m===1?0:this._currentCopies-1,s=this.data.m===1?1:-1,a=this._currentCopies;for(var l,h;a;){if(e=this.elemsData[i].it,r=e[e.length-1].transform.mProps.v.props,h=r.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),u!==0){for((i!==0&&s===1||i!==this._currentCopies-1&&s===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]),this.matrix.transform(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9],o[10],o[11],o[12],o[13],o[14],o[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),l=0;l0&&i<1?[e]:[]:[e-i,e+i].filter(function(s){return s>0&&s<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),s=lerpPoint(e,r,t),a=lerpPoint(r,i,t),n=lerpPoint(s,a,t);return[new PolynomialBezier(this.points[0],e,s,n,!0),new PolynomialBezier(n,a,i,this.points[3],!0)]};function extrema(t,e){var r=t.points[0][e],i=t.points[t.points.length-1][e];if(r>i){var s=i;i=r,r=s}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&a[n]<1){var p=t.point(a[n])[e];pi&&(i=p)}return{min:r,max:i}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}};function intersectData(t,e,r){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return Math.abs(t.cx-e.cx)*2=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i){s.push([t.t,e.t]);return}var n=splitData(t),p=splitData(e);intersectsImpl(n[0],p[0],r+1,i,s,a),intersectsImpl(n[0],p[1],r+1,i,s,a),intersectsImpl(n[1],p[0],r+1,i,s,a),intersectsImpl(n[1],p[1],r+1,i,s,a)}}PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,r),i},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)};function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,i){var s=[t[0],t[1],1],a=[e[0],e[1],1],n=[r[0],r[1],1],p=[i[0],i[1],1],f=crossProduct(crossProduct(s,a),crossProduct(n,p));return floatZero(f[2])?null:[f[0]/f[2],f[1]/f[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(t,e,r,i,s,a,n){var p=r-Math.PI/2,f=r+Math.PI/2,m=e[0]+Math.cos(r)*i*s,y=e[1]-Math.sin(r)*i*s;t.setTripleAt(m,y,m+Math.cos(p)*a,y-Math.sin(p)*a,m+Math.cos(f)*n,y-Math.sin(f)*n,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],i=-Math.PI*.5,s=[Math.cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]];return s}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,i=(e+1)%t.length(),s=t.v[r],a=t.v[i],n=getPerpendicularVector(s,a);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function zigZagCorner(t,e,r,i,s,a,n){var p=getProjectingAngle(e,r),f=e.v[r%e._length],m=e.v[r===0?e._length-1:r-1],y=e.v[(r+1)%e._length],C=a===2?Math.sqrt(Math.pow(f[0]-m[0],2)+Math.pow(f[1]-m[1],2)):0,c=a===2?Math.sqrt(Math.pow(f[0]-y[0],2)+Math.pow(f[1]-y[1],2)):0;setPoint(t,e.v[r%e._length],p,n,i,c/((s+1)*2),C/((s+1)*2))}function zigZagSegment(t,e,r,i,s,a){for(var n=0;n1&&e.length>1&&(s=getIntersection(t[0],e[e.length-1]),s)?[[t[0].split(s[0])[0]],[e[e.length-1].split(s[1])[1]]]:[r,i]}function pruneIntersections(t){for(var e,r=1;r1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r=t.inflectionPoints(),i,s,a,n;if(r.length===0)return[offsetSegment(t,e)];if(r.length===1||floatEqual(r[1],1))return a=t.split(r[0]),i=a[0],s=a[1],[offsetSegment(i,e),offsetSegment(s,e)];a=t.split(r[0]),i=a[0];var p=(r[1]-r[0])/(1-r[0]);return a=a[1].split(p),n=a[0],s=a[1],[offsetSegment(i,e),offsetSegment(n,e),offsetSegment(s,e)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,i){var s=shapePool.newElement();s.c=t.c;var a=t.length();t.c||(a-=1);var n,p,f,m=[];for(n=0;n=0;n-=1)f=PolynomialBezier.shapeSegmentInverted(t,n),m.push(offsetSegmentSplit(f,e));m=pruneIntersections(m);var y=null,C=null;for(n=0;n0&&(R=!1),R){var B=createTag("style");B.setAttribute("f-forigin",b[E].fOrigin),B.setAttribute("f-origin",b[E].origin),B.setAttribute("f-family",b[E].fFamily),B.type="text/css",B.innerText="@font-face {font-family: "+b[E].fFamily+"; font-style: normal; src: url('"+b[E].fPath+"');}",g.appendChild(B)}}else if(b[E].fOrigin==="g"||b[E].origin===1){for(L=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),I=0;Ie?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,r=this.renderableComponents.length;for(e=0;e.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(t){var e,r=this.layers.length,i;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e],i.ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=this.elements[e]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",c),this.element.maskedElement.setAttribute(u,"url("+getLocationHref()+"#"+c+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e=this.element.finalTransform.mat,r,i=this.masksProperties.length;for(r=0;r1&&(i+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==i){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+i:i),r.elem.setAttribute("d",n)),r.lastPath=i}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};t.createFilter=e,t.createAlphaToLuminanceFilter=r;function e(i,s){var a=createNS("filter");return a.setAttribute("id",i),s!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function r(){var i=createNS("feColorMatrix");return i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),i}return t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(t){var e,r="SourceGraphic",i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;this.filters=[];var p;for(e=0;e=0&&(i=this.shapeModifiers[e].processShapes(this._isFirstFrame),!i);e-=1);}},searchProcessedElement:function(e){for(var r=this.processedElements,i=0,s=r.length;i.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)o=c.transformers[R].mProps._mdf||o,k-=1,R-=1;if(o)for(k=g-c.styles[l].lvl,R=c.transformers.length-1;k>0;)_=c.transformers[R].mProps.v.props,E.transform(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15]),k-=1,R-=1}else E=t;if(b=c.sh.paths,d=b._length,o){for(x="",v=0;v=1?B=.99:B<=-1&&(B=-.99);var D=L*B,w=Math.cos(I+c.a.v)*D+x[0],M=Math.sin(I+c.a.v)*D+x[1];v.setAttribute("fx",w),v.setAttribute("fy",M),d&&!c.g._collapsable&&(c.of.setAttribute("fx",w),c.of.setAttribute("fy",M))}}}function y(C,c,P){var v=c.style,d=c.d;d&&(d._mdf||P)&&d.dashStr&&(v.pElem.setAttribute("stroke-dasharray",d.dashStr),v.pElem.setAttribute("stroke-dashoffset",d.dashoffset[0])),c.c&&(c.c._mdf||P)&&v.pElem.setAttribute("stroke","rgb("+bmFloor(c.c.v[0])+","+bmFloor(c.c.v[1])+","+bmFloor(c.c.v[2])+")"),(c.o._mdf||P)&&v.pElem.setAttribute("stroke-opacity",c.o.v),(c.w._mdf||P)&&(v.pElem.setAttribute("stroke-width",c.w.v),v.msElem&&v.msElem.setAttribute("stroke-width",c.w.v))}return r}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e=this.shapes.length,r,i,s=this.stylesList.length,a,n=[],p=!1;for(i=0;i1&&p&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;f-=1){if(x=this.searchProcessedElement(t[f]),x?e[f]=r[x-1]:t[f]._render=n,t[f].ty==="fl"||t[f].ty==="st"||t[f].ty==="gf"||t[f].ty==="gs"||t[f].ty==="no")x?e[f].style.closed=!1:e[f]=this.createStyleElement(t[f],s),t[f]._render&&e[f].style.pElem.parentNode!==i&&i.appendChild(e[f].style.pElem),c.push(e[f].style);else if(t[f].ty==="gr"){if(!x)e[f]=this.createGroupElement(t[f]);else for(C=e[f].it.length,y=0;y1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!t)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var i,s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e=[],r=0,i=t.length,s,a,n=!1;r=55296&&s<=56319?(a=t.charCodeAt(r+1),a>=56320&&a<=57343?(n||FontManager.isModifier(s,a)?(e[e.length-1]+=t.substr(r,2),n=!1):e.push(t.substr(r,2)),r+=1):e.push(t.charAt(r))):s>56319?(a=t.charCodeAt(r+1),FontManager.isZeroWidthJoiner(s,a)?(n=!0,e[e.length-1]+=t.substr(r,2),r+=1):e.push(t.charAt(r))):FontManager.isZeroWidthJoiner(s)?(e[e.length-1]+=t.charAt(r),n=!0):e.push(t.charAt(r)),r+=1;return e},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e=this.elem.globalData.fontManager,r=this.data,i=[],s,a,n,p=0,f,m=r.m.g,y=0,C=0,c=0,P=[],v=0,d=0,x,o,u=e.getFontByName(t.f),l,h=0,g=getFontProperties(u);t.fWeight=g.weight,t.fStyle=g.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),a=t.finalText.length,t.finalLineHeight=t.lh;var b=t.tr/1e3*t.finalSize,E;if(t.sz)for(var _=!0,k=t.sz[0],R=t.sz[1],L,I;_;){I=this.buildFinalText(t.t),L=0,v=0,a=I.length,b=t.tr/1e3*t.finalSize;var B=-1;for(s=0;sk&&I[s]!==" "?(B===-1?a+=1:s=B,L+=t.finalLineHeight||t.finalSize*1.2,I.splice(s,B===s?1:0,"\r"),B=-1,v=0):(v+=h,v+=b);L+=u.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Rd?v:d,v=-2*b,f="",n=!0,c+=1):f=w,e.chars?(l=e.getCharData(w,u.fStyle,e.getFontByName(t.f).fFamily),h=n?0:l.w*t.finalSize/100):h=e.measureText(f,t.f,t.finalSize),w===" "?D+=h+b:(v+=h+b+D,D=0),i.push({l:h,an:h,add:y,n,anIndexes:[],val:f,line:c,animatorJustifyOffset:0}),m==2){if(y+=h,f===""||f===" "||s===a-1){for((f===""||f===" ")&&(y-=h);C<=s;)i[C].an=y,i[C].ind=p,i[C].extra=h,C+=1;p+=1,y=0}}else if(m==3){if(y+=h,f===""||s===a-1){for(f===""&&(y-=h);C<=s;)i[C].an=y,i[C].ind=p,i[C].extra=h,C+=1;y=0,p+=1}}else i[p].ind=p,i[p].extra=0,p+=1;if(t.l=i,d=v>d?v:d,P.push(v),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=d,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=P;var M=r.a,A,S;o=M.length;var T,V,F=[];for(x=0;x0?p=this.ne.v/100:f=-this.ne.v/100,this.xe.v>0?m=1-this.xe.v/100:y=1+this.xe.v/100;var C=BezierFactory.getBezierEasing(p,f,m,y).get,c=0,P=this.finalS,v=this.finalE,d=this.data.sh;if(d===2)v===P?c=n>=v?1:0:c=t(0,e(.5/(v-P)+(n-P)/(v-P),1)),c=C(c);else if(d===3)v===P?c=n>=v?0:1:c=1-t(0,e(.5/(v-P)+(n-P)/(v-P),1)),c=C(c);else if(d===4)v===P?c=0:(c=t(0,e(.5/(v-P)+(n-P)/(v-P),1)),c<.5?c*=2:c=1-2*(c-.5)),c=C(c);else if(d===5){if(v===P)c=0;else{var x=v-P;n=e(t(0,n+.5-P),v-P);var o=-x/2+n,u=x/2;c=Math.sqrt(1-o*o/(u*u))}c=C(c)}else d===6?(v===P?c=0:(n=e(t(0,n+.5-P),v-P),c=(1+Math.cos(Math.PI+Math.PI*2*n/(v-P)))/2),c=C(c)):(n>=r(P)&&(n-P<0?c=t(0,e(e(v,1)-(P-n),1)):c=t(0,e(v-n,1))),c=C(c));if(this.sm.v!==100){var l=this.sm.v*.01;l===0&&(l=1e-8);var h=.5-l*.5;c1&&(c=1))}return c*this.a.v},getValue:function(n){this.iterateDynamicProperties(),this._mdf=n||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,n&&this.data.r===2&&(this.e.v=this._currentTextLength);var p=this.data.r===2?1:100/this.data.totalChars,f=this.o.v/p,m=this.s.v/p+f,y=this.e.v/p+f;if(m>y){var C=m;m=y,y=C}this.finalS=m,this.finalE=y}},extendPrototype([DynamicPropertyContainer],i);function s(a,n,p){return new i(a,n)}return{getTextSelectorProp:s}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e=this._textData.a.length,r,i=PropertyFactory.getProp;for(t=0;t=v+Q||!g?(k=(v+Q-x)/d.partialLength,z=h.point[0]+(d.point[0]-h.point[0])*k,q=h.point[1]+(d.point[1]-h.point[1])*k,a.translate(-r[0]*c[y].an*.005,-(r[1]*D)*.01),o=!1):g&&(x+=d.partialLength,u+=1,u>=g.length&&(u=0,l+=1,b[l]?g=b[l].points:L.v.c?(u=0,l=0,g=b[l].points):(x-=d.partialLength,g=null)),g&&(h=d,d=g[u],E=d.partialLength));N=c[y].an/2-c[y].add,a.translate(-N,0,0)}else N=c[y].an/2-c[y].add,a.translate(-N,0,0),a.translate(-r[0]*c[y].an*.005,-r[1]*D*.01,0);for(S=0;St?this.textSpans[t].span:createNS(p?"g":"text"),l<=t){if(f.setAttribute("stroke-linecap","butt"),f.setAttribute("stroke-linejoin","round"),f.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=f,p){var g=createNS("g");f.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=f,this.layerElement.appendChild(f)}f.style.display="inherit"}if(m.reset(),C&&(n[t].n&&(c=-d,P+=r.yOffset,P+=v?1:0,v=!1),this.applyTextPropertiesToMatrix(r,m,n[t].line,c,P),c+=n[t].l||0,c+=d),p){h=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var b;if(h.t===1)b=new SVGCompElement(h.data,this.globalData,this);else{var E=emptyShapeData;h.data&&h.data.shapes&&(E=this.buildShapeData(h.data,r.finalSize)),b=new SVGShapeElement(E,this.globalData,this)}if(this.textSpans[t].glyph){var _=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(_.layerElement),_.destroy()}this.textSpans[t].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[t].childSpan.appendChild(b.layerElement),h.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else C&&f.setAttribute("transform","translate("+m.props[12]+","+m.props[13]+")"),f.textContent=n[t].val,f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}C&&f&&f.setAttribute("d",y)}for(;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)n=e.transforms[i].transform.mProps.v.props,e.finalTransform.transform(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}e._mdf=a},processSequences:function(e){var r,i=this.sequenceList.length;for(r=0;r=1){this.buffers=[];var e=this.globalData.canvasContext,r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r);var i=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(i),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var r=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=r}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var i=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(i.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var s=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=s.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(s,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var r=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(r),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(r),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,n=r.length,p;for(a=0;a=0;a-=1){if(C=this.searchProcessedElement(t[a]),C?e[a]=r[C-1]:t[a]._shouldRender=i,t[a].ty==="fl"||t[a].ty==="st"||t[a].ty==="gf"||t[a].ty==="gs")C?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],v),m.push(e[a].style);else if(t[a].ty==="gr"){if(!C)e[a]=this.createGroupElement(t[a]);else for(f=e[a].it.length,p=0;p=0;s-=1)e[s].ty==="tr"?(n=r[s].transform,this.renderShapeTransform(t,n)):e[s].ty==="sh"||e[s].ty==="el"||e[s].ty==="rc"||e[s].ty==="sr"?this.renderPath(e[s],r[s]):e[s].ty==="fl"?this.renderFill(e[s],r[s],n):e[s].ty==="st"?this.renderStroke(e[s],r[s],n):e[s].ty==="gf"||e[s].ty==="gs"?this.renderGradientFill(e[s],r[s],n):e[s].ty==="gr"?this.renderShape(n,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r=t.trNodes,i=e.paths,s,a,n,p=i._length;r.length=0;var f=t.transforms.finalTransform;for(n=0;n=1?y=.99:y<=-1&&(y=-.99);var C=f*y,c=Math.cos(m+e.a.v)*C+n[0],P=Math.sin(m+e.a.v)*C+n[1];s=a.createRadialGradient(c,P,0,n[0],n[1],f)}var v,d=t.g.p,x=e.g.c,o=1;for(v=0;va&&f==="xMidYMid slice"||ss&&p==="meet"||as&&p==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:m==="xMax"&&(as&&p==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,y==="YMid"&&(a>s&&p==="meet"||as&&p==="meet"||a=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if(!(this.renderedFrame===t&&this.renderConfig.clearCanvas===!0&&!e||this.destroyed||t===-1)){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var r,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip();var e,r=this.layers.length;for(e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&e.clearCanvas!==void 0?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects,this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();e.transform=r,e.webkitTransform=r}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?(t=createNS("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(t=createTag("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)};function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r0&&f<1&&s[c].push(this.calculateF(f,t,e,r,i,c))):(m=n*n-4*p*a,m>=0&&(y=(-n+bmSqrt(m))/(2*a),y>0&&y<1&&s[c].push(this.calculateF(y,t,e,r,i,c)),C=(-n-bmSqrt(m))/(2*a),C>0&&C<1&&s[c].push(this.calculateF(C,t,e,r,i,c)))));this.shapeBoundingBox.left=bmMin.apply(null,s[0]),this.shapeBoundingBox.top=bmMin.apply(null,s[1]),this.shapeBoundingBox.right=bmMax.apply(null,s[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,s[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;rr&&(r=s)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;e-=1){var i=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;this.p?s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:s=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],p=Math.sqrt(n[2]*n[2]+n[0]*n[0]),f=Math.atan2(n[1],p),m=Math.atan2(n[0],-n[2]);this.mat.rotateY(m).rotateX(-f)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var y=!this._prevMat.equals(this.mat);if((y||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var C,c,P;for(e=0;e=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r=createTag("div"),i,s;styleDiv(r);var a=createTag("div");if(styleDiv(a),e==="3d"){i=r.style,i.width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n,s=a.style;var p="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.transform=p,s.webkitTransform=p}r.appendChild(a);var f={container:a,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(f),f},HybridRendererBase.prototype.build3dContainers=function(){var t,e=this.layers.length,r,i="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;rr?(s=t/this.globalData.compSize.w,a=t/this.globalData.compSize.w,n=0,p=(e-this.globalData.compSize.h*(t/this.globalData.compSize.w))/2):(s=e/this.globalData.compSize.h,a=e/this.globalData.compSize.h,n=(t-this.globalData.compSize.w*(e/this.globalData.compSize.h))/2,p=0);var f=this.resizerElem.style;f.webkitTransform="matrix3d("+s+",0,0,0,0,"+a+",0,0,0,0,1,0,"+n+","+p+",0,1)",f.transform=f.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t=this.globalData.compSize.w,e=this.globalData.compSize.h,r,i=this.threeDElements.length;for(r=0;r=m;)L/=2,I/=2,B>>>=1;return(L+B)/I};return k.int32=function(){return _.g(4)|0},k.quick=function(){return _.g(4)/4294967296},k.double=k,x(u(_.S),t),(h.pass||g||function(R,L,I,B){return B&&(B.S&&v(B,_),R.state=function(){return v(_,{})}),I?(e[n]=R,L):R})(k,E,"global"in h?h.global:this==e,h.state)}e["seed"+n]=c;function P(l){var h,g=l.length,b=this,E=0,_=b.i=b.j=0,k=b.S=[];for(g||(l=[g++]);Er){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,i=Math.min(t.length,e.length),s=0;for(r=0;r.5?m/(2-s-a):m/(s+a),s){case e:n=(r-i)/m+(r1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e=t[0],r=t[1],i=t[2],s,a,n;if(r===0)s=i,n=i,a=i;else{var p=i<.5?i*(1+r):i+r-i*r,f=2*i-p;s=hue2rgb(f,p,e+1/3),a=hue2rgb(f,p,e),n=hue2rgb(f,p,e-1/3)}return[s,a,n,t[3]]}function linear(t,e,r,i,s){if((i===void 0||s===void 0)&&(i=e,s=r,e=0,r=1),r=r)return s;var n=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*n;var p,f=i.length,m=createTypedArray("float32",f);for(p=0;p1){for(s=0;s1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var p,f=s.length,m=createTypedArray("float32",f);for(p=0;pdata.k[e].t&&tdata.k[e+1].t-t?(i=e+2,s=data.k[e+1].t):(i=e+1,s=data.k[e].t);break}i===-1&&(i=e+1,s=data.k[e].t)}var a={};return a.index=i,a.time=s/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;rx.length-1)&&(P=x.length-1),l=x[x.length-1-P].t,u=o-l);var h,g,b;if(c==="pingpong"){var E=Math.floor((d-l)/u);if(E%2!==0)return this.getValueAtTime((u-(d-l)%u+l)/this.comp.globalData.frameRate,0)}else if(c==="offset"){var _=this.getValueAtTime(l/this.comp.globalData.frameRate,0),k=this.getValueAtTime(o/this.comp.globalData.frameRate,0),R=this.getValueAtTime(((d-l)%u+l)/this.comp.globalData.frameRate,0),L=Math.floor((d-l)/u);if(this.pv.length){for(b=new Array(_.length),g=b.length,h=0;h=o)return this.pv;var u,l;v?(P?u=Math.abs(this.elem.comp.globalData.frameRate*P):u=Math.max(0,this.elem.data.op-o),l=o+u):((!P||P>x.length-1)&&(P=x.length-1),l=x[P].t,u=l-o);var h,g,b;if(c==="pingpong"){var E=Math.floor((o-d)/u);if(E%2===0)return this.getValueAtTime(((o-d)%u+o)/this.comp.globalData.frameRate,0)}else if(c==="offset"){var _=this.getValueAtTime(o/this.comp.globalData.frameRate,0),k=this.getValueAtTime(l/this.comp.globalData.frameRate,0),R=this.getValueAtTime((u-(o-d)%u+o)/this.comp.globalData.frameRate,0),L=Math.floor((o-d)/u)+1;if(this.pv.length){for(b=new Array(_.length),g=b.length,h=0;h1?(x-d)/(P-1):1,u=0,l=0,h;this.pv.length?h=createTypedArray("float32",this.pv.length):h=0;for(var g;uu){var E=l,_=d.c&&l===h-1?0:l+1,k=(u-g)/o[l].addedLength;b=bez.getPointInSegment(d.v[E],d.v[_],d.o[E],d.i[_],k,o[l]);break}else g+=o[l].addedLength;l+=1}return b||(b=d.c?[d.v[0][0],d.v[0][1]]:[d.v[d._length-1][0],d.v[d._length-1][1]]),b},vectorOnPath:function(P,v,d){P==1?P=this.v.c:P==0&&(P=.999);var x=this.pointOnPath(P,v),o=this.pointOnPath(P+.001,v),u=o[0]-x[0],l=o[1]-x[1],h=Math.sqrt(Math.pow(u,2)+Math.pow(l,2));if(h===0)return[0,0];var g=d==="tangent"?[u/h,l/h]:[-l/h,u/h];return g},tangentOnPath:function(P,v){return this.vectorOnPath(P,v,"tangent")},normalOnPath:function(P,v){return this.vectorOnPath(P,v,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([y],f),extendPrototype([y],m),m.prototype.getValueAtTime=p,m.prototype.initiateExpression=ExpressionManager.initiateExpression;var C=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(c,P,v,d,x){var o=C(c,P,v,d,x);return o.propertyIndex=P.ix,o.lock=!1,v===3?expressionHelpers.searchExpressions(c,P.pt,o):v===4&&expressionHelpers.searchExpressions(c,P.ks,o),o.k&&c.addDynamicProperty(o),o}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function t(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,r){var i=this.calculateExpression(r);if(e.t!==i){var s={};return this.copyData(s,e),s.t=i.toString(),s.__complete=!1,s}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),r=this.searchExpressions();return this.kf=e||r,this.kf},TextProperty.prototype.searchExpressions=t}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function t(e,r){var i=createNS("feMerge");i.setAttribute("result",e);var s,a;for(a=0;a=m?C=v<0?i:s:C=i+P*Math.pow((p-t)/v,1/r),y[c]=C,c+=1,a+=256/(n-1);return y.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function SVGDropShadowEffect(t,e,r,i,s){var a=e.container.globalData.renderConfig.filterSize,n=e.data.fs||a;t.setAttribute("x",n.x||a.x),t.setAttribute("y",n.y||a.y),t.setAttribute("width",n.width||a.width),t.setAttribute("height",n.height||a.height),this.filterManager=e;var p=createNS("feGaussianBlur");p.setAttribute("in","SourceAlpha"),p.setAttribute("result",i+"_drop_shadow_1"),p.setAttribute("stdDeviation","0"),this.feGaussianBlur=p,t.appendChild(p);var f=createNS("feOffset");f.setAttribute("dx","25"),f.setAttribute("dy","0"),f.setAttribute("in",i+"_drop_shadow_1"),f.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=f,t.appendChild(f);var m=createNS("feFlood");m.setAttribute("flood-color","#00ff00"),m.setAttribute("flood-opacity","1"),m.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=m,t.appendChild(m);var y=createNS("feComposite");y.setAttribute("in",i+"_drop_shadow_3"),y.setAttribute("in2",i+"_drop_shadow_2"),y.setAttribute("operator","in"),y.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(y);var C=this.createMergeNode(i,[i+"_drop_shadow_4",s]);t.appendChild(C)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(e[0]*255),Math.round(e[1]*255),Math.round(e[2]*255)))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;et in r?c(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var o=(r,t,e)=>(d(r,typeof t!="symbol"?t+"":t,e),e);import{C as a}from"./gateway.fa3322de.js";import{A as u}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="d4de7592-04b2-4ecd-89da-a59e5365335c",r._sentryDebugIdIdentifier="sentry-dbid-d4de7592-04b2-4ecd-89da-a59e5365335c")}catch{}})();class l{constructor(){o(this,"urlPath","members")}async create(t){return a.post(`organizations/${t.organizationId}/${this.urlPath}`,{email:t.email})}async delete(t){await a.delete(`${this.urlPath}/${t}`)}async list(t){return a.get(`organizations/${t}/${this.urlPath}`)}async get(t,e){return a.get(`organizations/${t}/${this.urlPath}/${e}`)}async update(t,e){return a.patch(`${this.urlPath}/${t}`,e)}async duplicate(t){return a.post(`${this.urlPath}/${t}/duplicate`,{})}async login(){return a.post("authors",{})}}const s=new l;class i{constructor(t){o(this,"record");this.record=u.create(s,t,"id")}static async login(){return s.login()}static async list(t){return(await s.list(t)).map(n=>new i(n))}static async create(t,e){const n=await s.create({organizationId:t,email:e});return new i(n)}static async get(t,e){const n=await s.get(t,e);return new i(n)}async delete(){await s.delete(this.email)}async save(){return this.record.save()}hasChanges(){return this.record.hasChanges()}get email(){return this.record.get("email")}set email(t){this.record.set("email",t)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get role(){return this.record.get("role")}set role(t){this.record.set("role",t)}get id(){return this.record.get("id")}get authorId(){return this.record.get("authorId")}}export{i as M}; -//# sourceMappingURL=member.f1e6c466.js.map +var o=Object.defineProperty;var d=(r,t,e)=>t in r?o(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var c=(r,t,e)=>(d(r,typeof t!="symbol"?t+"":t,e),e);import{C as a}from"./gateway.0deebb85.js";import{A as u}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="d941f7f1-fcf7-4aac-b8cc-4213fc2b6eee",r._sentryDebugIdIdentifier="sentry-dbid-d941f7f1-fcf7-4aac-b8cc-4213fc2b6eee")}catch{}})();class l{constructor(){c(this,"urlPath","members")}async create(t){return a.post(`organizations/${t.organizationId}/${this.urlPath}`,{email:t.email})}async delete(t){await a.delete(`${this.urlPath}/${t}`)}async list(t){return a.get(`organizations/${t}/${this.urlPath}`)}async get(t,e){return a.get(`organizations/${t}/${this.urlPath}/${e}`)}async update(t,e){return a.patch(`${this.urlPath}/${t}`,e)}async duplicate(t){return a.post(`${this.urlPath}/${t}/duplicate`,{})}async login(){return a.post("authors",{})}}const s=new l;class i{constructor(t){c(this,"record");this.record=u.create(s,t,"id")}static async login(){return s.login()}static async list(t){return(await s.list(t)).map(n=>new i(n))}static async create(t,e){const n=await s.create({organizationId:t,email:e});return new i(n)}static async get(t,e){const n=await s.get(t,e);return new i(n)}async delete(){await s.delete(this.email)}async save(){return this.record.save()}hasChanges(){return this.record.hasChanges()}get email(){return this.record.get("email")}set email(t){this.record.set("email",t)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get role(){return this.record.get("role")}set role(t){this.record.set("role",t)}get id(){return this.record.get("id")}get authorId(){return this.record.get("authorId")}}export{i as M}; +//# sourceMappingURL=member.f4131337.js.map diff --git a/abstra_statics/dist/assets/organization.007992e9.js b/abstra_statics/dist/assets/organization.007992e9.js deleted file mode 100644 index 55f31a065f..0000000000 --- a/abstra_statics/dist/assets/organization.007992e9.js +++ /dev/null @@ -1,2 +0,0 @@ -var c=Object.defineProperty;var h=(a,t,e)=>t in a?c(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var i=(a,t,e)=>(h(a,typeof t!="symbol"?t+"":t,e),e);import{C as n}from"./gateway.fa3322de.js";import{A as d}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="87f8c7e5-0693-4af3-93fa-85a3d192a6b5",a._sentryDebugIdIdentifier="sentry-dbid-87f8c7e5-0693-4af3-93fa-85a3d192a6b5")}catch{}})();class o{constructor(){i(this,"urlPath","organizations")}async create(t){return n.post(`${this.urlPath}`,t)}async delete(t){await n.delete(`${this.urlPath}/${t}`)}async list(){return n.get(`${this.urlPath}`)}async get(t){return n.get(`${this.urlPath}/${t}`)}async update(t,e){return n.patch(`${this.urlPath}/${t}`,e)}}const s=new o;class r{constructor(t){i(this,"initialState");i(this,"changes");i(this,"record");this.record=d.create(s,t,"id"),this.initialState=t,this.changes={}}static async list(){const t=await s.list();return console.log(t),t.map(e=>new r(e))}static async create(t){const e=await s.create({name:t});return new r(e)}static async get(t){const e=await s.get(t);return new r(e)}async delete(){await s.delete(this.id)}async save(){Object.keys(this.changes).length!==0&&(this.initialState=await s.update(this.id,this.changes),this.changes={})}get(t){var e;return(e=this.changes[t])!=null?e:this.initialState[t]}set(t,e){this.changes[t]=e}hasChanges(){return Object.keys(this.changes).length>0}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}get name(){return this.record.get("name")}}export{r as O}; -//# sourceMappingURL=organization.007992e9.js.map diff --git a/abstra_statics/dist/assets/organization.682269f4.js b/abstra_statics/dist/assets/organization.682269f4.js new file mode 100644 index 0000000000..54848f70fb --- /dev/null +++ b/abstra_statics/dist/assets/organization.682269f4.js @@ -0,0 +1,2 @@ +var c=Object.defineProperty;var d=(s,t,e)=>t in s?c(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var i=(s,t,e)=>(d(s,typeof t!="symbol"?t+"":t,e),e);import{C as n}from"./gateway.0deebb85.js";import{A as h}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="b7f15d63-8661-433f-8b8d-dcc20d662e94",s._sentryDebugIdIdentifier="sentry-dbid-b7f15d63-8661-433f-8b8d-dcc20d662e94")}catch{}})();class o{constructor(){i(this,"urlPath","organizations")}async create(t){return n.post(`${this.urlPath}`,t)}async delete(t){await n.delete(`${this.urlPath}/${t}`)}async list(){return n.get(`${this.urlPath}`)}async get(t){return n.get(`${this.urlPath}/${t}`)}async update(t,e){return n.patch(`${this.urlPath}/${t}`,e)}}const a=new o;class r{constructor(t){i(this,"initialState");i(this,"changes");i(this,"record");this.record=h.create(a,t,"id"),this.initialState=t,this.changes={}}static async list(){const t=await a.list();return console.log(t),t.map(e=>new r(e))}static async create(t){const e=await a.create({name:t});return new r(e)}static async get(t){const e=await a.get(t);return new r(e)}async delete(){await a.delete(this.id)}async save(){Object.keys(this.changes).length!==0&&(this.initialState=await a.update(this.id,this.changes),this.changes={})}get(t){var e;return(e=this.changes[t])!=null?e:this.initialState[t]}set(t,e){this.changes[t]=e}hasChanges(){return Object.keys(this.changes).length>0}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}get name(){return this.record.get("name")}}export{r as O}; +//# sourceMappingURL=organization.682269f4.js.map diff --git a/abstra_statics/dist/assets/passwordlessManager.0ab78ba0.js b/abstra_statics/dist/assets/passwordlessManager.884221ca.js similarity index 83% rename from abstra_statics/dist/assets/passwordlessManager.0ab78ba0.js rename to abstra_statics/dist/assets/passwordlessManager.884221ca.js index 9c6704756f..b5aec038c5 100644 --- a/abstra_statics/dist/assets/passwordlessManager.0ab78ba0.js +++ b/abstra_statics/dist/assets/passwordlessManager.884221ca.js @@ -1,2 +1,2 @@ -var g=Object.defineProperty;var b=(r,e,t)=>e in r?g(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var u=(r,e,t)=>(b(r,typeof e!="symbol"?e+"":e,t),t);import{u as f}from"./registerWidgets.ca6243ef.js";import{P as y}from"./pubsub.581c075e.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="40d3c554-f27c-4214-9257-e436cb23cb3d",r._sentryDebugIdIdentifier="sentry-dbid-40d3c554-f27c-4214-9257-e436cb23cb3d")}catch{}})();const v=()=>window.location.host.includes(".abstra.io"),m={passwordless:"/api/passwordless","cloud-api":"/api/cloud-api"},I={passwordless:"https://passwordless.abstra.cloud","cloud-api":"https://cloud-api.abstra.cloud"},h=r=>{const e="VITE_"+f.toUpper(f.snakeCase(r)),t={VITE_SENTRY_RELEASE:"3039e73e67633e0764bdf2169a1cdca9d01b94b0",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}[e];return t||(v()?m[r]:I[r])};class a{static get(e){try{const t=localStorage.getItem(e);return t&&JSON.parse(t)}catch{return null}}static set(e,t){localStorage.setItem(e,JSON.stringify(t))}static pop(e){const t=a.get(e);return a.remove(e),t}static remove(e){localStorage.removeItem(e)}}function l(r){this.message=r}l.prototype=new Error,l.prototype.name="InvalidCharacterError";var w=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(r){var e=String(r).replace(/=+$/,"");if(e.length%4==1)throw new l("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,n,s=0,o=0,p="";n=e.charAt(o++);~n&&(t=s%4?64*t+n:n,s++%4)?p+=String.fromCharCode(255&t>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return p};function E(r){var e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(w(t).replace(/(.)/g,function(n,s){var o=s.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(e)}catch{return w(e)}}function d(r){this.message=r}function S(r,e){if(typeof r!="string")throw new d("Invalid token specified");var t=(e=e||{}).header===!0?0:1;try{return JSON.parse(E(r.split(".")[t]))}catch(n){throw new d("Invalid token specified: "+n.message)}}d.prototype=new Error,d.prototype.name="InvalidTokenError";const i=class{constructor(){u(this,"pubsub");this.pubsub=new y}async authenticate(e){try{const t=await fetch(`${h("passwordless")}/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})});if(!t.ok)throw new Error(await t.text());return null}catch(t){return t.message}}async verify(e,t){const n=await fetch(`${h("passwordless")}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e,token:t})});if(!n.ok)throw new Error(await n.text());const s=await n.json();this.saveJWT(s.jwt);const o=this.getUser();return this.pubsub.publish("authenticated",o),o}saveJWT(e){a.set(i.key,e)}getJWT(){return a.get(i.key)}getUser(){const e=this.getJWT();if(e)try{const t=S(e);if(t.exp&&t.exp>Date.now()/1e3)return{jwt:e,claims:t}}catch{console.warn("Invalid JWT")}return null}removeUser(){a.remove(i.key)}getUserHeaders(e="User-Authorization"){const t=this.getJWT();return t?{[e]:`Bearer ${t}`}:{}}};let c=i;u(c,"key","hackerforms:auth:jwt");const J=new c;export{J as p,h as t}; -//# sourceMappingURL=passwordlessManager.0ab78ba0.js.map +var b=Object.defineProperty;var g=(r,e,t)=>e in r?b(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var u=(r,e,t)=>(g(r,typeof e!="symbol"?e+"":e,t),t);import{u as f}from"./registerWidgets.89616af0.js";import{P as y}from"./pubsub.d7600aa1.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="4403b846-3a1e-4a13-9967-ecb4c601cd08",r._sentryDebugIdIdentifier="sentry-dbid-4403b846-3a1e-4a13-9967-ecb4c601cd08")}catch{}})();const v=()=>window.location.host.includes(".abstra.io"),m={passwordless:"/api/passwordless","cloud-api":"/api/cloud-api"},I={passwordless:"https://passwordless.abstra.cloud","cloud-api":"https://cloud-api.abstra.cloud"},h=r=>{const e="VITE_"+f.toUpper(f.snakeCase(r)),t={VITE_SENTRY_RELEASE:"ba54a4797e68560a0b98bebe59520f59d916467f",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}[e];return t||(v()?m[r]:I[r])};class a{static get(e){try{const t=localStorage.getItem(e);return t&&JSON.parse(t)}catch{return null}}static set(e,t){localStorage.setItem(e,JSON.stringify(t))}static pop(e){const t=a.get(e);return a.remove(e),t}static remove(e){localStorage.removeItem(e)}}function l(r){this.message=r}l.prototype=new Error,l.prototype.name="InvalidCharacterError";var w=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(r){var e=String(r).replace(/=+$/,"");if(e.length%4==1)throw new l("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,n,s=0,o=0,p="";n=e.charAt(o++);~n&&(t=s%4?64*t+n:n,s++%4)?p+=String.fromCharCode(255&t>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return p};function E(r){var e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(w(t).replace(/(.)/g,function(n,s){var o=s.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(e)}catch{return w(e)}}function d(r){this.message=r}function S(r,e){if(typeof r!="string")throw new d("Invalid token specified");var t=(e=e||{}).header===!0?0:1;try{return JSON.parse(E(r.split(".")[t]))}catch(n){throw new d("Invalid token specified: "+n.message)}}d.prototype=new Error,d.prototype.name="InvalidTokenError";const i=class{constructor(){u(this,"pubsub");this.pubsub=new y}async authenticate(e){try{const t=await fetch(`${h("passwordless")}/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})});if(!t.ok)throw new Error(await t.text());return null}catch(t){return t.message}}async verify(e,t){const n=await fetch(`${h("passwordless")}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e,token:t})});if(!n.ok)throw new Error(await n.text());const s=await n.json();this.saveJWT(s.jwt);const o=this.getUser();return this.pubsub.publish("authenticated",o),o}saveJWT(e){a.set(i.key,e)}getJWT(){return a.get(i.key)}getUser(){const e=this.getJWT();if(e)try{const t=S(e);if(t.exp&&t.exp>Date.now()/1e3)return{jwt:e,claims:t}}catch{console.warn("Invalid JWT")}return null}removeUser(){a.remove(i.key)}getUserHeaders(e="User-Authorization"){const t=this.getJWT();return t?{[e]:`Bearer ${t}`}:{}}};let c=i;u(c,"key","hackerforms:auth:jwt");const J=new c;export{J as p,h as t}; +//# sourceMappingURL=passwordlessManager.884221ca.js.map diff --git a/abstra_statics/dist/assets/player.8ca40ee1.js b/abstra_statics/dist/assets/player.8ca40ee1.js new file mode 100644 index 0000000000..c65da151d0 --- /dev/null +++ b/abstra_statics/dist/assets/player.8ca40ee1.js @@ -0,0 +1,2 @@ +import{q as o,a as r,b as i,t as c,f as d,g as p,_,h as f,k as u,T as l,P as h,C as b,M as g,s as y,i as m,j as s,l as v,m as w,n as k}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7856f032-36fb-468d-b53a-f3cf84acdac2",e._sentryDebugIdIdentifier="sentry-dbid-7856f032-36fb-468d-b53a-f3cf84acdac2")}catch{}})();const I={};function A(e,t){const n=r("router-view");return i(),c(n,{style:{"min-height":"100vh","box-sizing":"border-box",width:"100%"}})}const x=o(I,[["render",A]]),a=d({history:p("/"),routes:[{path:"/:path(.*)*",name:"player",component:()=>_(()=>import("./Player.0779238b.js"),["assets/Player.0779238b.js","assets/index.d40cd19f.js","assets/registerWidgets.89616af0.js","assets/registerWidgets.448db7e9.css","assets/uuid.d6201508.js","assets/broker.67106cf5.js","assets/passwordlessManager.884221ca.js","assets/pubsub.d7600aa1.js","assets/icons.9cfdae6d.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.5682728a.js","assets/Passwordless.ac83d40c.js","assets/CircularLoading.0fb686c0.js","assets/lottie.fc57e5ac.js","assets/CircularLoading.f81b57b4.css","assets/Passwordless.86ac0c56.css","assets/executeJs.dfd1b55f.js","assets/PlayerNavbar.2a5ed820.js","assets/PlayerNavbar.adff8b48.css","assets/WidgetsFrame.2b06573d.js","assets/colors.bc71fdf2.js","assets/WidgetsFrame.701a818b.css","assets/Modal.73e976a2.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/broker.5f3abad8.css","assets/DashPlayer.2457a054.js","assets/runnerData.bd24d7de.js","assets/DashPlayer.ef4a798d.css","assets/asyncComputed.8ac91a75.js","assets/Player.20a058fa.css"])}],scrollBehavior(e){if(e.hash)return{el:e.hash}}});class D{static init(){setInterval(()=>fetch("/_healthcheck"),20*1e3)}}const W=()=>{const e=f({render:()=>u(x)});l.init(),D.init(),e.use(a),e.use(h),e.mount("#app"),e.component("VSelect",b),e.component("Markdown",g),e.component("Message",y),m(e,a),s(e,v),s(e,w),s(e,k)};W(); +//# sourceMappingURL=player.8ca40ee1.js.map diff --git a/abstra_statics/dist/assets/player.a18b536b.js b/abstra_statics/dist/assets/player.a18b536b.js deleted file mode 100644 index 9469161847..0000000000 --- a/abstra_statics/dist/assets/player.a18b536b.js +++ /dev/null @@ -1,2 +0,0 @@ -import{q as r,a,b as i,t as c,f as d,g as p,_,h as u,k as l,T as h,P as f,C as g,M as y,s as m,i as b,j as s,l as v,m as w,n as k}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="06dd3538-0076-45c1-8578-809c1ad00238",e._sentryDebugIdIdentifier="sentry-dbid-06dd3538-0076-45c1-8578-809c1ad00238")}catch{}})();const I={};function A(e,t){const n=a("router-view");return i(),c(n,{style:{"min-height":"100vh","box-sizing":"border-box",width:"100%"}})}const x=r(I,[["render",A]]),o=d({history:p("/"),routes:[{path:"/:path(.*)*",name:"player",component:()=>_(()=>import("./Player.daf19edf.js"),["assets/Player.daf19edf.js","assets/index.a2df0371.js","assets/registerWidgets.ca6243ef.js","assets/registerWidgets.448db7e9.css","assets/uuid.f763745d.js","assets/broker.a62f2378.js","assets/passwordlessManager.0ab78ba0.js","assets/pubsub.581c075e.js","assets/icons.11151937.js","assets/ActionButton.vue_vue_type_script_setup_true_lang.cdfb7200.js","assets/Passwordless.65114c07.js","assets/CircularLoading.5630a601.js","assets/lottie.9d24e472.js","assets/CircularLoading.f81b57b4.css","assets/Passwordless.86ac0c56.css","assets/executeJs.c3858a9c.js","assets/PlayerNavbar.e3146994.js","assets/PlayerNavbar.adff8b48.css","assets/WidgetsFrame.8af89817.js","assets/colors.4425ff79.js","assets/WidgetsFrame.701a818b.css","assets/Modal.2f8d0c91.js","assets/Modal.5aaf8eba.css","assets/executeJs.887e9a58.css","assets/broker.5f3abad8.css","assets/DashPlayer.6a8897dd.js","assets/runnerData.170ae941.js","assets/DashPlayer.ef4a798d.css","assets/asyncComputed.3cb2e10b.js","assets/Player.20a058fa.css"])}],scrollBehavior(e){if(e.hash)return{el:e.hash}}});class D{static init(){setInterval(()=>fetch("/_healthcheck"),20*1e3)}}const W=()=>{const e=u({render:()=>l(x)});h.init(),D.init(),e.use(o),e.use(f),e.mount("#app"),e.component("VSelect",g),e.component("Markdown",y),e.component("Message",m),b(e,o),s(e,v),s(e,w),s(e,k)};W(); -//# sourceMappingURL=player.a18b536b.js.map diff --git a/abstra_statics/dist/assets/project.a27ed749.js b/abstra_statics/dist/assets/project.a27ed749.js new file mode 100644 index 0000000000..c93221be4b --- /dev/null +++ b/abstra_statics/dist/assets/project.a27ed749.js @@ -0,0 +1,2 @@ +var c=Object.defineProperty;var o=(r,t,e)=>t in r?c(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var d=(r,t,e)=>(o(r,typeof t!="symbol"?t+"":t,e),e);import{C as s}from"./gateway.0deebb85.js";import{A as u}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="e4e64593-7002-43fd-8c2f-22b259199635",r._sentryDebugIdIdentifier="sentry-dbid-e4e64593-7002-43fd-8c2f-22b259199635")}catch{}})();class h{constructor(){d(this,"urlPath","projects")}async create({name:t,organizationId:e}){return s.post(`organizations/${e}/${this.urlPath}`,{name:t})}async delete(t){await s.delete(`/${this.urlPath}/${t}`)}async list(t){return s.get(`organizations/${t}/${this.urlPath}`)}async get(t){return s.get(`${this.urlPath}/${t}`)}async update(t,e){return s.patch(`${this.urlPath}/${t}`,e)}async duplicate(t){return s.post(`${this.urlPath}/${t}/duplicate`,{})}}const a=new h;class n{constructor(t){d(this,"record");this.record=u.create(a,t,"id")}static async list(t){return(await a.list(t)).map(i=>new n(i))}static async create({name:t,organizationId:e}){const i=await a.create({organizationId:e,name:t});return new n(i)}static async get(t){const e=await a.get(t);return new n(e)}async delete(){await a.delete(this.id)}async save(){return this.record.save()}hasChanges(){return this.record.hasChanges()}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}async duplicate(){return await a.duplicate(this.id)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get organizationId(){return this.record.get("organizationId")}get subdomain(){return this.record.get("subdomain")}set subdomain(t){this.record.set("subdomain",t)}}export{n as P}; +//# sourceMappingURL=project.a27ed749.js.map diff --git a/abstra_statics/dist/assets/project.f2b2a33c.js b/abstra_statics/dist/assets/project.f2b2a33c.js deleted file mode 100644 index 7d60944118..0000000000 --- a/abstra_statics/dist/assets/project.f2b2a33c.js +++ /dev/null @@ -1,2 +0,0 @@ -var c=Object.defineProperty;var o=(r,t,e)=>t in r?c(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var d=(r,t,e)=>(o(r,typeof t!="symbol"?t+"":t,e),e);import{C as a}from"./gateway.fa3322de.js";import{A as u}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="3426fc18-171e-4276-a9e3-1e720b0d4d93",r._sentryDebugIdIdentifier="sentry-dbid-3426fc18-171e-4276-a9e3-1e720b0d4d93")}catch{}})();class h{constructor(){d(this,"urlPath","projects")}async create({name:t,organizationId:e}){return a.post(`organizations/${e}/${this.urlPath}`,{name:t})}async delete(t){await a.delete(`/${this.urlPath}/${t}`)}async list(t){return a.get(`organizations/${t}/${this.urlPath}`)}async get(t){return a.get(`${this.urlPath}/${t}`)}async update(t,e){return a.patch(`${this.urlPath}/${t}`,e)}async duplicate(t){return a.post(`${this.urlPath}/${t}/duplicate`,{})}}const s=new h;class n{constructor(t){d(this,"record");this.record=u.create(s,t,"id")}static async list(t){return(await s.list(t)).map(i=>new n(i))}static async create({name:t,organizationId:e}){const i=await s.create({organizationId:e,name:t});return new n(i)}static async get(t){const e=await s.get(t);return new n(e)}async delete(){await s.delete(this.id)}async save(){return this.record.save()}hasChanges(){return this.record.hasChanges()}get id(){return this.record.get("id")}set id(t){this.record.set("id",t)}async duplicate(){return await s.duplicate(this.id)}get name(){return this.record.get("name")}set name(t){this.record.set("name",t)}get organizationId(){return this.record.get("organizationId")}get subdomain(){return this.record.get("subdomain")}set subdomain(t){this.record.set("subdomain",t)}}export{n as P}; -//# sourceMappingURL=project.f2b2a33c.js.map diff --git a/abstra_statics/dist/assets/pubsub.581c075e.js b/abstra_statics/dist/assets/pubsub.d7600aa1.js similarity index 66% rename from abstra_statics/dist/assets/pubsub.581c075e.js rename to abstra_statics/dist/assets/pubsub.d7600aa1.js index bcbdc5c654..3146777cad 100644 --- a/abstra_statics/dist/assets/pubsub.581c075e.js +++ b/abstra_statics/dist/assets/pubsub.d7600aa1.js @@ -1,2 +1,2 @@ -var c=Object.defineProperty;var o=(e,s,t)=>s in e?c(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var r=(e,s,t)=>(o(e,typeof s!="symbol"?s+"":s,t),t);import"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="bb1ca76c-1937-4bf4-a2ee-e288f338d738",e._sentryDebugIdIdentifier="sentry-dbid-bb1ca76c-1937-4bf4-a2ee-e288f338d738")}catch{}})();class f{constructor(){r(this,"topics");r(this,"subUid");this.topics={},this.subUid=-1}subscribe(s,t){const i=(++this.subUid).toString();return this.topics[s]||(this.topics[s]=[]),this.topics[s].push({token:i,func:t}),i}async wait(s){return new Promise(t=>{const i=this.subscribe(s,n=>{this.unsubscribe(i),t(n)})})}async publish(s,...t){if(!this.topics[s])return!1;const i=this.topics[s];let n=i?i.length:0;for(;n--;)await i[n].func(t[0]);return!0}unsubscribe(s){for(const t in this.topics)if(this.topics[t]){for(let i=0,n=this.topics[t].length;is in e?d(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var r=(e,s,t)=>(o(e,typeof s!="symbol"?s+"":s,t),t);import"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="812254be-a532-4a3d-b018-d01b62ddd4dd",e._sentryDebugIdIdentifier="sentry-dbid-812254be-a532-4a3d-b018-d01b62ddd4dd")}catch{}})();class c{constructor(){r(this,"topics");r(this,"subUid");this.topics={},this.subUid=-1}subscribe(s,t){const i=(++this.subUid).toString();return this.topics[s]||(this.topics[s]=[]),this.topics[s].push({token:i,func:t}),i}async wait(s){return new Promise(t=>{const i=this.subscribe(s,n=>{this.unsubscribe(i),t(n)})})}async publish(s,...t){if(!this.topics[s])return!1;const i=this.topics[s];let n=i?i.length:0;for(;n--;)await i[n].func(t[0]);return!0}unsubscribe(s){for(const t in this.topics)if(this.topics[t]){for(let i=0,n=this.topics[t].length;i{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!d.call(t,r)&&r!==n&&l(t,r,{get:()=>e[r],enumerable:!(s=c(e,r))||s.enumerable});return t},g=(t,e,n)=>(o(t,e,"default"),n&&o(n,e,"default")),i={};g(i,a);var b={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},m={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]]}};export{b as conf,m as language}; -//# sourceMappingURL=python.1cd2abe3.js.map + *-----------------------------------------------------------------------------*/var l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,o=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!d.call(t,r)&&r!==n&&l(t,r,{get:()=>e[r],enumerable:!(s=c(e,r))||s.enumerable});return t},g=(t,e,n)=>(o(t,e,"default"),n&&o(n,e,"default")),i={};g(i,a);var m={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},f={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]]}};export{m as conf,f as language}; +//# sourceMappingURL=python.3eb11cc2.js.map diff --git a/abstra_statics/dist/assets/razor.a734f30f.js b/abstra_statics/dist/assets/razor.5b8183f8.js similarity index 94% rename from abstra_statics/dist/assets/razor.a734f30f.js rename to abstra_statics/dist/assets/razor.5b8183f8.js index 740b6f8011..26618e981e 100644 --- a/abstra_statics/dist/assets/razor.a734f30f.js +++ b/abstra_statics/dist/assets/razor.5b8183f8.js @@ -1,7 +1,7 @@ -import{m as s}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4f3f3840-ef5a-4059-b910-589b05a036fc",t._sentryDebugIdIdentifier="sentry-dbid-4f3f3840-ef5a-4059-b910-589b05a036fc")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as c}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="7d4cfcd9-f31c-442e-bbc7-816a3487cd80",t._sentryDebugIdIdentifier="sentry-dbid-7d4cfcd9-f31c-442e-bbc7-816a3487cd80")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,i=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!p.call(t,o)&&o!==r&&c(t,o,{get:()=>e[o],enumerable:!(a=l(e,o))||a.enumerable});return t},h=(t,e,r)=>(i(t,e,"default"),r&&i(r,e,"default")),n={};h(n,s);var m=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],y={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:n.languages.IndentAction.Indent}}]},k={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{y as conf,k as language}; -//# sourceMappingURL=razor.a734f30f.js.map + *-----------------------------------------------------------------------------*/var s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,i=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!p.call(t,o)&&o!==r&&s(t,o,{get:()=>e[o],enumerable:!(a=l(e,o))||a.enumerable});return t},h=(t,e,r)=>(i(t,e,"default"),r&&i(r,e,"default")),n={};h(n,c);var m=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],y={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:n.languages.IndentAction.Indent}}]},k={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{y as conf,k as language}; +//# sourceMappingURL=razor.5b8183f8.js.map diff --git a/abstra_statics/dist/assets/registerWidgets.ca6243ef.js b/abstra_statics/dist/assets/registerWidgets.89616af0.js similarity index 99% rename from abstra_statics/dist/assets/registerWidgets.ca6243ef.js rename to abstra_statics/dist/assets/registerWidgets.89616af0.js index 7bc147b106..6928d76e53 100644 --- a/abstra_statics/dist/assets/registerWidgets.ca6243ef.js +++ b/abstra_statics/dist/assets/registerWidgets.89616af0.js @@ -1,4 +1,4 @@ -var D4=Object.defineProperty;var M4=(e,t,n)=>t in e?D4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Si=(e,t,n)=>(M4(e,typeof t!="symbol"?t+"":t,n),n);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fb237b59-e1f4-4adb-ac07-f86e2d15e78b",e._sentryDebugIdIdentifier="sentry-dbid-fb237b59-e1f4-4adb-ac07-f86e2d15e78b")}catch{}})();(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const d of a.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function vg(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const k4="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",P4=vg(k4);function Zn(e){if(ut(e)){const t={};for(let n=0;n{if(n){const r=n.split($4);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ct(e){let t="";if(Qn(e))t=e;else if(ut(e))for(let n=0;nHs(n,t))}const pt=e=>Qn(e)?e:e==null?"":ut(e)||$n(e)&&(e.toString===VD||!It(e.toString))?JSON.stringify(e,YD,2):String(e),YD=(e,t)=>t&&t.__v_isRef?YD(e,t.value):Jc(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:ec(t)?{[`Set(${t.size})`]:[...t.values()]}:$n(t)&&!ut(t)&&!qD(t)?String(t):t,An={},Zc=[],Do=()=>{},z4=()=>!1,Y4=/^on[^a-z]/,Zp=e=>Y4.test(e),Oy=e=>e.startsWith("onUpdate:"),ar=Object.assign,wy=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},V4=Object.prototype.hasOwnProperty,on=(e,t)=>V4.call(e,t),ut=Array.isArray,Jc=e=>Qu(e)==="[object Map]",ec=e=>Qu(e)==="[object Set]",Fw=e=>Qu(e)==="[object Date]",q4=e=>Qu(e)==="[object RegExp]",It=e=>typeof e=="function",Qn=e=>typeof e=="string",_p=e=>typeof e=="symbol",$n=e=>e!==null&&typeof e=="object",Ry=e=>$n(e)&&It(e.then)&&It(e.catch),VD=Object.prototype.toString,Qu=e=>VD.call(e),j4=e=>Qu(e).slice(8,-1),qD=e=>Qu(e)==="[object Object]",xy=e=>Qn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Hd=vg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yg=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W4=/-(\w)/g,Ci=yg(e=>e.replace(W4,(t,n)=>n?n.toUpperCase():"")),K4=/\B([A-Z])/g,uo=yg(e=>e.replace(K4,"-$1").toLowerCase()),Jp=yg(e=>e.charAt(0).toUpperCase()+e.slice(1)),zd=yg(e=>e?`on${Jp(e)}`:""),yu=(e,t)=>!Object.is(e,t),eu=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},xm=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Im=e=>{const t=Qn(e)?Number(e):NaN;return isNaN(t)?e:t};let Bw;const Q4=()=>Bw||(Bw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Pi;class Iy{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Pi,!t&&Pi&&(this.index=(Pi.scopes||(Pi.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Pi;try{return Pi=this,t()}finally{Pi=n}}}on(){Pi=this}off(){Pi=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},KD=e=>(e.w&zs)>0,QD=e=>(e.n&zs)>0,J4=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(l==="length"||l>=u)&&s.push(o)})}else switch(n!==void 0&&s.push(d.get(n)),t){case"add":ut(e)?xy(n)&&s.push(d.get("length")):(s.push(d.get(Rl)),Jc(e)&&s.push(d.get(ov)));break;case"delete":ut(e)||(s.push(d.get(Rl)),Jc(e)&&s.push(d.get(ov)));break;case"set":Jc(e)&&s.push(d.get(Rl));break}if(s.length===1)s[0]&&av(s[0]);else{const u=[];for(const o of s)o&&u.push(...o);av(Ny(u))}}function av(e,t){const n=ut(e)?e:[...e];for(const r of n)r.computed&&Gw(r);for(const r of n)r.computed||Gw(r)}function Gw(e,t){(e!==Io||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function r6(e,t){var n;return(n=Nm.get(e))===null||n===void 0?void 0:n.get(t)}const i6=vg("__proto__,__v_isRef,__isVue"),JD=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_p)),o6=Cg(),a6=Cg(!1,!0),s6=Cg(!0),l6=Cg(!0,!0),Hw=c6();function c6(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Dt(this);for(let a=0,d=this.length;a{e[t]=function(...n){Xu();const r=Dt(this)[t].apply(this,n);return Zu(),r}}),e}function u6(e){const t=Dt(this);return Ti(t,"has",e),t.hasOwnProperty(e)}function Cg(e=!1,t=!1){return function(r,i,a){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&a===(e?t?a1:o1:t?i1:r1).get(r))return r;const d=ut(r);if(!e){if(d&&on(Hw,i))return Reflect.get(Hw,i,a);if(i==="hasOwnProperty")return u6}const s=Reflect.get(r,i,a);return(_p(i)?JD.has(i):i6(i))||(e||Ti(r,"get",i),t)?s:Er(s)?d&&xy(i)?s:s.value:$n(s)?e?Dy(s):Kt(s):s}}const d6=e1(),p6=e1(!0);function e1(e=!1){return function(n,r,i,a){let d=n[r];if(Ll(d)&&Er(d)&&!Er(i))return!1;if(!e&&(!mp(i)&&!Ll(i)&&(d=Dt(d),i=Dt(i)),!ut(n)&&Er(d)&&!Er(i)))return d.value=i,!0;const s=ut(n)&&xy(r)?Number(r)e,Tg=e=>Reflect.getPrototypeOf(e);function i_(e,t,n=!1,r=!1){e=e.__v_raw;const i=Dt(e),a=Dt(t);n||(t!==a&&Ti(i,"get",t),Ti(i,"get",a));const{has:d}=Tg(i),s=r?Ay:n?Py:gp;if(d.call(i,t))return s(e.get(t));if(d.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function o_(e,t=!1){const n=this.__v_raw,r=Dt(n),i=Dt(e);return t||(e!==i&&Ti(r,"has",e),Ti(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function a_(e,t=!1){return e=e.__v_raw,!t&&Ti(Dt(e),"iterate",Rl),Reflect.get(e,"size",e)}function zw(e){e=Dt(e);const t=Dt(this);return Tg(t).has.call(t,e)||(t.add(e),za(t,"add",e,e)),this}function Yw(e,t){t=Dt(t);const n=Dt(this),{has:r,get:i}=Tg(n);let a=r.call(n,e);a||(e=Dt(e),a=r.call(n,e));const d=i.call(n,e);return n.set(e,t),a?yu(t,d)&&za(n,"set",e,t):za(n,"add",e,t),this}function Vw(e){const t=Dt(this),{has:n,get:r}=Tg(t);let i=n.call(t,e);i||(e=Dt(e),i=n.call(t,e)),r&&r.call(t,e);const a=t.delete(e);return i&&za(t,"delete",e,void 0),a}function qw(){const e=Dt(this),t=e.size!==0,n=e.clear();return t&&za(e,"clear",void 0,void 0),n}function s_(e,t){return function(r,i){const a=this,d=a.__v_raw,s=Dt(d),u=t?Ay:e?Py:gp;return!e&&Ti(s,"iterate",Rl),d.forEach((o,l)=>r.call(i,u(o),u(l),a))}}function l_(e,t,n){return function(...r){const i=this.__v_raw,a=Dt(i),d=Jc(a),s=e==="entries"||e===Symbol.iterator&&d,u=e==="keys"&&d,o=i[e](...r),l=n?Ay:t?Py:gp;return!t&&Ti(a,"iterate",u?ov:Rl),{next(){const{value:c,done:p}=o.next();return p?{value:c,done:p}:{value:s?[l(c[0]),l(c[1])]:l(c),done:p}},[Symbol.iterator](){return this}}}}function gs(e){return function(...t){return e==="delete"?!1:this}}function b6(){const e={get(a){return i_(this,a)},get size(){return a_(this)},has:o_,add:zw,set:Yw,delete:Vw,clear:qw,forEach:s_(!1,!1)},t={get(a){return i_(this,a,!1,!0)},get size(){return a_(this)},has:o_,add:zw,set:Yw,delete:Vw,clear:qw,forEach:s_(!1,!0)},n={get(a){return i_(this,a,!0)},get size(){return a_(this,!0)},has(a){return o_.call(this,a,!0)},add:gs("add"),set:gs("set"),delete:gs("delete"),clear:gs("clear"),forEach:s_(!0,!1)},r={get(a){return i_(this,a,!0,!0)},get size(){return a_(this,!0)},has(a){return o_.call(this,a,!0)},add:gs("add"),set:gs("set"),delete:gs("delete"),clear:gs("clear"),forEach:s_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=l_(a,!1,!1),n[a]=l_(a,!0,!1),t[a]=l_(a,!1,!0),r[a]=l_(a,!0,!0)}),[e,n,t,r]}const[S6,v6,E6,y6]=b6();function Og(e,t){const n=t?e?y6:E6:e?v6:S6;return(r,i,a)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(on(n,i)&&i in r?n:r,i,a)}const C6={get:Og(!1,!1)},T6={get:Og(!1,!0)},O6={get:Og(!0,!1)},w6={get:Og(!0,!0)},r1=new WeakMap,i1=new WeakMap,o1=new WeakMap,a1=new WeakMap;function R6(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function x6(e){return e.__v_skip||!Object.isExtensible(e)?0:R6(j4(e))}function Kt(e){return Ll(e)?e:wg(e,!1,t1,C6,r1)}function s1(e){return wg(e,!1,g6,T6,i1)}function Dy(e){return wg(e,!0,n1,O6,o1)}function I6(e){return wg(e,!0,h6,w6,a1)}function wg(e,t,n,r,i){if(!$n(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const d=x6(e);if(d===0)return e;const s=new Proxy(e,d===2?r:n);return i.set(e,s),s}function xl(e){return Ll(e)?xl(e.__v_raw):!!(e&&e.__v_isReactive)}function Ll(e){return!!(e&&e.__v_isReadonly)}function mp(e){return!!(e&&e.__v_isShallow)}function My(e){return xl(e)||Ll(e)}function Dt(e){const t=e&&e.__v_raw;return t?Dt(t):e}function ky(e){return Rm(e,"__v_skip",!0),e}const gp=e=>$n(e)?Kt(e):e,Py=e=>$n(e)?Dy(e):e;function Ly(e){Ps&&Io&&(e=Dt(e),ZD(e.dep||(e.dep=Ny())))}function Rg(e,t){e=Dt(e);const n=e.dep;n&&av(n)}function Er(e){return!!(e&&e.__v_isRef===!0)}function ke(e){return l1(e,!1)}function Ie(e){return l1(e,!0)}function l1(e,t){return Er(e)?e:new N6(e,t)}class N6{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Dt(t),this._value=n?t:gp(t)}get value(){return Ly(this),this._value}set value(t){const n=this.__v_isShallow||mp(t)||Ll(t);t=n?t:Dt(t),yu(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:gp(t),Rg(this))}}function A6(e){Rg(e)}function Ve(e){return Er(e)?e.value:e}const D6={get:(e,t,n)=>Ve(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Er(i)&&!Er(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $y(e){return xl(e)?e:new Proxy(e,D6)}class M6{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Ly(this),()=>Rg(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function k6(e){return new M6(e)}function tu(e){const t=ut(e)?new Array(e.length):{};for(const n in e)t[n]=cn(e,n);return t}class P6{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return r6(Dt(this._object),this._key)}}function cn(e,t,n){const r=e[t];return Er(r)?r:new P6(e,t,n)}var c1;class L6{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[c1]=!1,this._dirty=!0,this.effect=new ef(t,()=>{this._dirty||(this._dirty=!0,Rg(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=Dt(this);return Ly(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}c1="__v_isReadonly";function $6(e,t,n=!1){let r,i;const a=It(e);return a?(r=e,i=Do):(r=e.get,i=e.set),new L6(r,i,a||!i,n)}function F6(e,...t){}function B6(e,t){}function Ua(e,t,n,r){let i;try{i=r?e(...r):e()}catch(a){tc(a,t,n)}return i}function Fi(e,t,n,r){if(It(e)){const a=Ua(e,t,n,r);return a&&Ry(a)&&a.catch(d=>{tc(d,t,n)}),a}const i=[];for(let a=0;a>>1;bp(Jr[r])Zo&&Jr.splice(t,1)}function By(e){ut(e)?nu.push(...e):(!Oa||!Oa.includes(e,e.allowRecurse?hl+1:hl))&&nu.push(e),d1()}function jw(e,t=hp?Zo+1:0){for(;tbp(n)-bp(r)),hl=0;hle.id==null?1/0:e.id,z6=(e,t)=>{const n=bp(e)-bp(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function p1(e){sv=!1,hp=!0,Jr.sort(z6);const t=Do;try{for(Zo=0;ZoHc.emit(i,...a)),c_=[]):typeof window<"u"&&window.HTMLElement&&!(!((r=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{f1(a,t)}),setTimeout(()=>{Hc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,c_=[])},3e3)):c_=[]}function Y6(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||An;let i=n;const a=t.startsWith("update:"),d=a&&t.slice(7);if(d&&d in r){const l=`${d==="modelValue"?"model":d}Modifiers`,{number:c,trim:p}=r[l]||An;p&&(i=n.map(f=>Qn(f)?f.trim():f)),c&&(i=n.map(xm))}let s,u=r[s=zd(t)]||r[s=zd(Ci(t))];!u&&a&&(u=r[s=zd(uo(t))]),u&&Fi(u,e,6,i);const o=r[s+"Once"];if(o){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Fi(o,e,6,i)}}function _1(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const a=e.emits;let d={},s=!1;if(!It(e)){const u=o=>{const l=_1(o,t,!0);l&&(s=!0,ar(d,l))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!a&&!s?($n(e)&&r.set(e,null),null):(ut(a)?a.forEach(u=>d[u]=null):ar(d,a),$n(e)&&r.set(e,d),d)}function Ig(e,t){return!e||!Zp(t)?!1:(t=t.slice(2).replace(/Once$/,""),on(e,t[0].toLowerCase()+t.slice(1))||on(e,uo(t))||on(e,t))}let Ur=null,Ng=null;function Sp(e){const t=Ur;return Ur=e,Ng=e&&e.type.__scopeId||null,t}function m1(e){Ng=e}function g1(){Ng=null}const V6=e=>kn;function kn(e,t=Ur,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&_v(-1);const a=Sp(t);let d;try{d=e(...i)}finally{Sp(a),r._d&&_v(1)}return d};return r._n=!0,r._c=!0,r._d=!0,r}function sm(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:a,propsOptions:[d],slots:s,attrs:u,emit:o,render:l,renderCache:c,data:p,setupState:f,ctx:m,inheritAttrs:g}=e;let h,b;const v=Sp(e);try{if(n.shapeFlag&4){const y=i||r;h=Li(l.call(y,y,c,a,f,p,m)),b=u}else{const y=t;h=Li(y.length>1?y(a,{attrs:u,slots:s,emit:o}):y(a,null)),b=t.props?u:j6(u)}}catch(y){qd.length=0,tc(y,e,1),h=N(Hr)}let E=h;if(b&&g!==!1){const y=Object.keys(b),{shapeFlag:T}=E;y.length&&T&7&&(d&&y.some(Oy)&&(b=W6(b,d)),E=fi(E,b))}return n.dirs&&(E=fi(E),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition&&(E.transition=n.transition),h=E,Sp(v),h}function q6(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||Zp(n))&&((t||(t={}))[n]=e[n]);return t},W6=(e,t)=>{const n={};for(const r in e)(!Oy(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function K6(e,t,n){const{props:r,children:i,component:a}=e,{props:d,children:s,patchFlag:u}=t,o=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return r?Ww(r,d,o):!!d;if(u&8){const l=t.dynamicProps;for(let c=0;ce.__isSuspense,Q6={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,a,d,s,u,o){e==null?Z6(t,n,r,i,a,d,s,u,o):J6(e,t,n,r,i,d,s,u,o)},hydrate:eY,create:Gy,normalize:tY},X6=Q6;function vp(e,t){const n=e.props&&e.props[t];It(n)&&n()}function Z6(e,t,n,r,i,a,d,s,u){const{p:o,o:{createElement:l}}=u,c=l("div"),p=e.suspense=Gy(e,i,r,t,c,n,a,d,s,u);o(null,p.pendingBranch=e.ssContent,c,null,r,p,a,d),p.deps>0?(vp(e,"onPending"),vp(e,"onFallback"),o(null,e.ssFallback,t,n,r,null,a,d),ru(p,e.ssFallback)):p.resolve()}function J6(e,t,n,r,i,a,d,s,{p:u,um:o,o:{createElement:l}}){const c=t.suspense=e.suspense;c.vnode=t,t.el=e.el;const p=t.ssContent,f=t.ssFallback,{activeBranch:m,pendingBranch:g,isInFallback:h,isHydrating:b}=c;if(g)c.pendingBranch=p,No(p,g)?(u(g,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0?c.resolve():h&&(u(m,f,n,r,i,null,a,d,s),ru(c,f))):(c.pendingId++,b?(c.isHydrating=!1,c.activeBranch=g):o(g,i,c),c.deps=0,c.effects.length=0,c.hiddenContainer=l("div"),h?(u(null,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0?c.resolve():(u(m,f,n,r,i,null,a,d,s),ru(c,f))):m&&No(p,m)?(u(m,p,n,r,i,c,a,d,s),c.resolve(!0)):(u(null,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0&&c.resolve()));else if(m&&No(p,m))u(m,p,n,r,i,c,a,d,s),ru(c,p);else if(vp(t,"onPending"),c.pendingBranch=p,c.pendingId++,u(null,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0)c.resolve();else{const{timeout:v,pendingId:E}=c;v>0?setTimeout(()=>{c.pendingId===E&&c.fallback(f)},v):v===0&&c.fallback(f)}}function Gy(e,t,n,r,i,a,d,s,u,o,l=!1){const{p:c,m:p,um:f,n:m,o:{parentNode:g,remove:h}}=o,b=e.props?Im(e.props.timeout):void 0,v={vnode:e,parent:t,parentComponent:n,isSVG:d,container:r,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:l,isUnmounted:!1,effects:[],resolve(E=!1){const{vnode:y,activeBranch:T,pendingBranch:O,pendingId:C,effects:R,parentComponent:x,container:I}=v;if(v.isHydrating)v.isHydrating=!1;else if(!E){const A=T&&O.transition&&O.transition.mode==="out-in";A&&(T.transition.afterLeave=()=>{C===v.pendingId&&p(O,I,D,0)});let{anchor:D}=v;T&&(D=m(T),f(T,x,v,!0)),A||p(O,I,D,0)}ru(v,O),v.pendingBranch=null,v.isInFallback=!1;let k=v.parent,L=!1;for(;k;){if(k.pendingBranch){k.effects.push(...R),L=!0;break}k=k.parent}L||By(R),v.effects=[],vp(y,"onResolve")},fallback(E){if(!v.pendingBranch)return;const{vnode:y,activeBranch:T,parentComponent:O,container:C,isSVG:R}=v;vp(y,"onFallback");const x=m(T),I=()=>{!v.isInFallback||(c(null,E,C,x,O,null,R,s,u),ru(v,E))},k=E.transition&&E.transition.mode==="out-in";k&&(T.transition.afterLeave=I),v.isInFallback=!0,f(T,O,null,!0),k||I()},move(E,y,T){v.activeBranch&&p(v.activeBranch,E,y,T),v.container=E},next(){return v.activeBranch&&m(v.activeBranch)},registerDep(E,y){const T=!!v.pendingBranch;T&&v.deps++;const O=E.vnode.el;E.asyncDep.catch(C=>{tc(C,E,0)}).then(C=>{if(E.isUnmounted||v.isUnmounted||v.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:R}=E;mv(E,C,!1),O&&(R.el=O);const x=!O&&E.subTree.el;y(E,R,g(O||E.subTree.el),O?null:m(E.subTree),v,d,u),x&&h(x),Uy(E,R.el),T&&--v.deps===0&&v.resolve()})},unmount(E,y){v.isUnmounted=!0,v.activeBranch&&f(v.activeBranch,n,E,y),v.pendingBranch&&f(v.pendingBranch,n,E,y)}};return v}function eY(e,t,n,r,i,a,d,s,u){const o=t.suspense=Gy(t,r,n,e.parentNode,document.createElement("div"),null,i,a,d,s,!0),l=u(e,o.pendingBranch=t.ssContent,n,o,a,d);return o.deps===0&&o.resolve(),l}function tY(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Kw(r?n.default:n),e.ssFallback=r?Kw(n.fallback):N(Hr)}function Kw(e){let t;if(It(e)){const n=Fl&&e._c;n&&(e._d=!1,Se()),e=e(),n&&(e._d=!0,t=yi,G1())}return ut(e)&&(e=q6(e)),e=Li(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function b1(e,t){t&&t.pendingBranch?ut(e)?t.effects.push(...e):t.effects.push(e):By(e)}function ru(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,i=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=i,Uy(r,i))}function $t(e,t){if(ir){let n=ir.provides;const r=ir.parent&&ir.parent.provides;r===n&&(n=ir.provides=Object.create(r)),n[e]=t}}function bt(e,t,n=!1){const r=ir||Ur;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&It(t)?t.call(r.proxy):t}}function Ht(e,t){return tf(e,null,t)}function S1(e,t){return tf(e,null,{flush:"post"})}function nY(e,t){return tf(e,null,{flush:"sync"})}const u_={};function ze(e,t,n){return tf(e,t,n)}function tf(e,t,{immediate:n,deep:r,flush:i,onTrack:a,onTrigger:d}=An){const s=WD()===(ir==null?void 0:ir.scope)?ir:null;let u,o=!1,l=!1;if(Er(e)?(u=()=>e.value,o=mp(e)):xl(e)?(u=()=>e,r=!0):ut(e)?(l=!0,o=e.some(E=>xl(E)||mp(E)),u=()=>e.map(E=>{if(Er(E))return E.value;if(xl(E))return Tl(E);if(It(E))return Ua(E,s,2)})):It(e)?t?u=()=>Ua(e,s,2):u=()=>{if(!(s&&s.isUnmounted))return c&&c(),Fi(e,s,3,[p])}:u=Do,t&&r){const E=u;u=()=>Tl(E())}let c,p=E=>{c=b.onStop=()=>{Ua(E,s,4)}},f;if(Tu)if(p=Do,t?n&&Fi(t,s,3,[u(),l?[]:void 0,p]):u(),i==="sync"){const E=X1();f=E.__watcherHandles||(E.__watcherHandles=[])}else return Do;let m=l?new Array(e.length).fill(u_):u_;const g=()=>{if(!!b.active)if(t){const E=b.run();(r||o||(l?E.some((y,T)=>yu(y,m[T])):yu(E,m)))&&(c&&c(),Fi(t,s,3,[E,m===u_?void 0:l&&m[0]===u_?[]:m,p]),m=E)}else b.run()};g.allowRecurse=!!t;let h;i==="sync"?h=g:i==="post"?h=()=>Br(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),h=()=>xg(g));const b=new ef(u,h);t?n?g():m=b.run():i==="post"?Br(b.run.bind(b),s&&s.suspense):b.run();const v=()=>{b.stop(),s&&s.scope&&wy(s.scope.effects,b)};return f&&f.push(v),v}function rY(e,t,n){const r=this.proxy,i=Qn(e)?e.includes(".")?v1(r,e):()=>r[e]:e.bind(r,r);let a;It(t)?a=t:(a=t.handler,n=t);const d=ir;Ys(this);const s=tf(i,a.bind(r),n);return d?Ys(d):Ls(),s}function v1(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Tl(n,t)});else if(qD(e))for(const n in e)Tl(e[n],t);return e}function Hy(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return it(()=>{e.isMounted=!0}),tn(()=>{e.isUnmounting=!0}),e}const ro=[Function,Array],iY={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ro,onEnter:ro,onAfterEnter:ro,onEnterCancelled:ro,onBeforeLeave:ro,onLeave:ro,onAfterLeave:ro,onLeaveCancelled:ro,onBeforeAppear:ro,onAppear:ro,onAfterAppear:ro,onAppearCancelled:ro},setup(e,{slots:t}){const n=mr(),r=Hy();let i;return()=>{const a=t.default&&Ag(t.default(),!0);if(!a||!a.length)return;let d=a[0];if(a.length>1){for(const g of a)if(g.type!==Hr){d=g;break}}const s=Dt(e),{mode:u}=s;if(r.isLeaving)return Bb(d);const o=Qw(d);if(!o)return Bb(d);const l=Cu(o,s,r,n);$l(o,l);const c=n.subTree,p=c&&Qw(c);let f=!1;const{getTransitionKey:m}=o.type;if(m){const g=m();i===void 0?i=g:g!==i&&(i=g,f=!0)}if(p&&p.type!==Hr&&(!No(o,p)||f)){const g=Cu(p,s,r,n);if($l(p,g),u==="out-in")return r.isLeaving=!0,g.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},Bb(d);u==="in-out"&&o.type!==Hr&&(g.delayLeave=(h,b,v)=>{const E=E1(r,p);E[String(p.key)]=p,h._leaveCb=()=>{b(),h._leaveCb=void 0,delete l.delayedLeave},l.delayedLeave=v})}return d}}},zy=iY;function E1(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Cu(e,t,n,r){const{appear:i,mode:a,persisted:d=!1,onBeforeEnter:s,onEnter:u,onAfterEnter:o,onEnterCancelled:l,onBeforeLeave:c,onLeave:p,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:g,onAppear:h,onAfterAppear:b,onAppearCancelled:v}=t,E=String(e.key),y=E1(n,e),T=(R,x)=>{R&&Fi(R,r,9,x)},O=(R,x)=>{const I=x[1];T(R,x),ut(R)?R.every(k=>k.length<=1)&&I():R.length<=1&&I()},C={mode:a,persisted:d,beforeEnter(R){let x=s;if(!n.isMounted)if(i)x=g||s;else return;R._leaveCb&&R._leaveCb(!0);const I=y[E];I&&No(e,I)&&I.el._leaveCb&&I.el._leaveCb(),T(x,[R])},enter(R){let x=u,I=o,k=l;if(!n.isMounted)if(i)x=h||u,I=b||o,k=v||l;else return;let L=!1;const A=R._enterCb=D=>{L||(L=!0,D?T(k,[R]):T(I,[R]),C.delayedLeave&&C.delayedLeave(),R._enterCb=void 0)};x?O(x,[R,A]):A()},leave(R,x){const I=String(e.key);if(R._enterCb&&R._enterCb(!0),n.isUnmounting)return x();T(c,[R]);let k=!1;const L=R._leaveCb=A=>{k||(k=!0,x(),A?T(m,[R]):T(f,[R]),R._leaveCb=void 0,y[I]===e&&delete y[I])};y[I]=e,p?O(p,[R,L]):L()},clone(R){return Cu(R,t,n,r)}};return C}function Bb(e){if(nf(e))return e=fi(e),e.children=null,e}function Qw(e){return nf(e)?e.children?e.children[0]:void 0:e}function $l(e,t){e.shapeFlag&6&&e.component?$l(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ag(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader;function oY(e){It(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,timeout:a,suspensible:d=!0,onError:s}=e;let u=null,o,l=0;const c=()=>(l++,u=null,p()),p=()=>{let f;return u||(f=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),s)return new Promise((g,h)=>{s(m,()=>g(c()),()=>h(m),l+1)});throw m}).then(m=>f!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),o=m,m)))};return Te({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return o},setup(){const f=ir;if(o)return()=>Ub(o,f);const m=v=>{u=null,tc(v,f,13,!r)};if(d&&f.suspense||Tu)return p().then(v=>()=>Ub(v,f)).catch(v=>(m(v),()=>r?N(r,{error:v}):null));const g=ke(!1),h=ke(),b=ke(!!i);return i&&setTimeout(()=>{b.value=!1},i),a!=null&&setTimeout(()=>{if(!g.value&&!h.value){const v=new Error(`Async component timed out after ${a}ms.`);m(v),h.value=v}},a),p().then(()=>{g.value=!0,f.parent&&nf(f.parent.vnode)&&xg(f.parent.update)}).catch(v=>{m(v),h.value=v}),()=>{if(g.value&&o)return Ub(o,f);if(h.value&&r)return N(r,{error:h.value});if(n&&!b.value)return N(n)}}})}function Ub(e,t){const{ref:n,props:r,children:i,ce:a}=t.vnode,d=N(e,r,i);return d.ref=n,d.ce=a,delete t.vnode.ce,d}const nf=e=>e.type.__isKeepAlive,aY={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=mr(),r=n.ctx;if(!r.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const i=new Map,a=new Set;let d=null;const s=n.suspense,{renderer:{p:u,m:o,um:l,o:{createElement:c}}}=r,p=c("div");r.activate=(v,E,y,T,O)=>{const C=v.component;o(v,E,y,0,s),u(C.vnode,v,E,y,C,s,T,v.slotScopeIds,O),Br(()=>{C.isDeactivated=!1,C.a&&eu(C.a);const R=v.props&&v.props.onVnodeMounted;R&&vi(R,C.parent,v)},s)},r.deactivate=v=>{const E=v.component;o(v,p,null,1,s),Br(()=>{E.da&&eu(E.da);const y=v.props&&v.props.onVnodeUnmounted;y&&vi(y,E.parent,v),E.isDeactivated=!0},s)};function f(v){Gb(v),l(v,n,s,!0)}function m(v){i.forEach((E,y)=>{const T=hv(E.type);T&&(!v||!v(T))&&g(y)})}function g(v){const E=i.get(v);!d||!No(E,d)?f(E):d&&Gb(d),i.delete(v),a.delete(v)}ze(()=>[e.include,e.exclude],([v,E])=>{v&&m(y=>Ld(v,y)),E&&m(y=>!Ld(E,y))},{flush:"post",deep:!0});let h=null;const b=()=>{h!=null&&i.set(h,Hb(n.subTree))};return it(b),Hi(b),tn(()=>{i.forEach(v=>{const{subTree:E,suspense:y}=n,T=Hb(E);if(v.type===T.type&&v.key===T.key){Gb(T);const O=T.component.da;O&&Br(O,y);return}f(v)})}),()=>{if(h=null,!t.default)return null;const v=t.default(),E=v[0];if(v.length>1)return d=null,v;if(!yr(E)||!(E.shapeFlag&4)&&!(E.shapeFlag&128))return d=null,E;let y=Hb(E);const T=y.type,O=hv(Il(y)?y.type.__asyncResolved||{}:T),{include:C,exclude:R,max:x}=e;if(C&&(!O||!Ld(C,O))||R&&O&&Ld(R,O))return d=y,E;const I=y.key==null?T:y.key,k=i.get(I);return y.el&&(y=fi(y),E.shapeFlag&128&&(E.ssContent=y)),h=I,k?(y.el=k.el,y.component=k.component,y.transition&&$l(y,y.transition),y.shapeFlag|=512,a.delete(I),a.add(I)):(a.add(I),x&&a.size>parseInt(x,10)&&g(a.values().next().value)),y.shapeFlag|=256,d=y,h1(E.type)?E:y}}},sY=aY;function Ld(e,t){return ut(e)?e.some(n=>Ld(n,t)):Qn(e)?e.split(",").includes(t):q4(e)?e.test(t):!1}function Dg(e,t){y1(e,"a",t)}function Yy(e,t){y1(e,"da",t)}function y1(e,t,n=ir){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Mg(t,r,n),n){let i=n.parent;for(;i&&i.parent;)nf(i.parent.vnode)&&lY(r,t,n,i),i=i.parent}}function lY(e,t,n,r){const i=Mg(t,e,r,!0);zi(()=>{wy(r[t],i)},n)}function Gb(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Hb(e){return e.shapeFlag&128?e.ssContent:e}function Mg(e,t,n=ir,r=!1){if(n){const i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...d)=>{if(n.isUnmounted)return;Xu(),Ys(n);const s=Fi(t,n,e,d);return Ls(),Zu(),s});return r?i.unshift(a):i.push(a),a}}const Ka=e=>(t,n=ir)=>(!Tu||e==="sp")&&Mg(e,(...r)=>t(...r),n),Vy=Ka("bm"),it=Ka("m"),qy=Ka("bu"),Hi=Ka("u"),tn=Ka("bum"),zi=Ka("um"),C1=Ka("sp"),T1=Ka("rtg"),O1=Ka("rtc");function w1(e,t=ir){Mg("ec",e,t)}function ur(e,t){const n=Ur;if(n===null)return e;const r=Pg(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let a=0;at(d,s,void 0,a&&a[s]));else{const d=Object.keys(e);i=new Array(d.length);for(let s=0,u=d.length;s{const a=r.fn(...i);return a&&(a.key=r.key),a}:r.fn)}return e}function ln(e,t,n={},r,i){if(Ur.isCE||Ur.parent&&Il(Ur.parent)&&Ur.parent.isCE)return t!=="default"&&(n.name=t),N("slot",n,r&&r());let a=e[t];a&&a._c&&(a._d=!1),Se();const d=a&&x1(a(n)),s=Vn(Xe,{key:n.key||d&&d.key||`_${t}`},d||(r?r():[]),d&&e._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),a&&a._c&&(a._d=!0),s}function x1(e){return e.some(t=>yr(t)?!(t.type===Hr||t.type===Xe&&!x1(t.children)):!0)?e:null}function I1(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:zd(r)]=e[r];return n}const lv=e=>e?V1(e)?Pg(e)||e.proxy:lv(e.parent):null,Yd=ar(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lv(e.parent),$root:e=>lv(e.root),$emit:e=>e.emit,$options:e=>Qy(e),$forceUpdate:e=>e.f||(e.f=()=>xg(e.update)),$nextTick:e=>e.n||(e.n=en.bind(e.proxy)),$watch:e=>rY.bind(e)}),zb=(e,t)=>e!==An&&!e.__isScriptSetup&&on(e,t),cv={get({_:e},t){const{ctx:n,setupState:r,data:i,props:a,accessCache:d,type:s,appContext:u}=e;let o;if(t[0]!=="$"){const f=d[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else{if(zb(r,t))return d[t]=1,r[t];if(i!==An&&on(i,t))return d[t]=2,i[t];if((o=e.propsOptions[0])&&on(o,t))return d[t]=3,a[t];if(n!==An&&on(n,t))return d[t]=4,n[t];uv&&(d[t]=0)}}const l=Yd[t];let c,p;if(l)return t==="$attrs"&&Ti(e,"get",t),l(e);if((c=s.__cssModules)&&(c=c[t]))return c;if(n!==An&&on(n,t))return d[t]=4,n[t];if(p=u.config.globalProperties,on(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:a}=e;return zb(i,t)?(i[t]=n,!0):r!==An&&on(r,t)?(r[t]=n,!0):on(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},d){let s;return!!n[d]||e!==An&&on(e,d)||zb(t,d)||(s=a[0])&&on(s,d)||on(r,d)||on(Yd,d)||on(i.config.globalProperties,d)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:on(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},uY=ar({},cv,{get(e,t){if(t!==Symbol.unscopables)return cv.get(e,t,e)},has(e,t){return t[0]!=="_"&&!P4(t)}});let uv=!0;function dY(e){const t=Qy(e),n=e.proxy,r=e.ctx;uv=!1,t.beforeCreate&&Zw(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:d,watch:s,provide:u,inject:o,created:l,beforeMount:c,mounted:p,beforeUpdate:f,updated:m,activated:g,deactivated:h,beforeDestroy:b,beforeUnmount:v,destroyed:E,unmounted:y,render:T,renderTracked:O,renderTriggered:C,errorCaptured:R,serverPrefetch:x,expose:I,inheritAttrs:k,components:L,directives:A,filters:D}=t;if(o&&pY(o,r,null,e.appContext.config.unwrapInjectedRef),d)for(const z in d){const H=d[z];It(H)&&(r[z]=H.bind(n))}if(i){const z=i.call(n,n);$n(z)&&(e.data=Kt(z))}if(uv=!0,a)for(const z in a){const H=a[z],V=It(H)?H.bind(n,n):It(H.get)?H.get.bind(n,n):Do,W=!It(H)&&It(H.set)?H.set.bind(n):Do,te=B({get:V,set:W});Object.defineProperty(r,z,{enumerable:!0,configurable:!0,get:()=>te.value,set:X=>te.value=X})}if(s)for(const z in s)N1(s[z],r,n,z);if(u){const z=It(u)?u.call(n):u;Reflect.ownKeys(z).forEach(H=>{$t(H,z[H])})}l&&Zw(l,e,"c");function F(z,H){ut(H)?H.forEach(V=>z(V.bind(n))):H&&z(H.bind(n))}if(F(Vy,c),F(it,p),F(qy,f),F(Hi,m),F(Dg,g),F(Yy,h),F(w1,R),F(O1,O),F(T1,C),F(tn,v),F(zi,y),F(C1,x),ut(I))if(I.length){const z=e.exposed||(e.exposed={});I.forEach(H=>{Object.defineProperty(z,H,{get:()=>n[H],set:V=>n[H]=V})})}else e.exposed||(e.exposed={});T&&e.render===Do&&(e.render=T),k!=null&&(e.inheritAttrs=k),L&&(e.components=L),A&&(e.directives=A)}function pY(e,t,n=Do,r=!1){ut(e)&&(e=dv(e));for(const i in e){const a=e[i];let d;$n(a)?"default"in a?d=bt(a.from||i,a.default,!0):d=bt(a.from||i):d=bt(a),Er(d)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>d.value,set:s=>d.value=s}):t[i]=d}}function Zw(e,t,n){Fi(ut(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function N1(e,t,n,r){const i=r.includes(".")?v1(n,r):()=>n[r];if(Qn(e)){const a=t[e];It(a)&&ze(i,a)}else if(It(e))ze(i,e.bind(n));else if($n(e))if(ut(e))e.forEach(a=>N1(a,t,n,r));else{const a=It(e.handler)?e.handler.bind(n):t[e.handler];It(a)&&ze(i,a,e)}}function Qy(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:d}}=e.appContext,s=a.get(t);let u;return s?u=s:!i.length&&!n&&!r?u=t:(u={},i.length&&i.forEach(o=>Dm(u,o,d,!0)),Dm(u,t,d)),$n(t)&&a.set(t,u),u}function Dm(e,t,n,r=!1){const{mixins:i,extends:a}=t;a&&Dm(e,a,n,!0),i&&i.forEach(d=>Dm(e,d,n,!0));for(const d in t)if(!(r&&d==="expose")){const s=fY[d]||n&&n[d];e[d]=s?s(e[d],t[d]):t[d]}return e}const fY={data:Jw,props:_l,emits:_l,methods:_l,computed:_l,beforeCreate:ai,created:ai,beforeMount:ai,mounted:ai,beforeUpdate:ai,updated:ai,beforeDestroy:ai,beforeUnmount:ai,destroyed:ai,unmounted:ai,activated:ai,deactivated:ai,errorCaptured:ai,serverPrefetch:ai,components:_l,directives:_l,watch:mY,provide:Jw,inject:_Y};function Jw(e,t){return t?e?function(){return ar(It(e)?e.call(this,this):e,It(t)?t.call(this,this):t)}:t:e}function _Y(e,t){return _l(dv(e),dv(t))}function dv(e){if(ut(e)){const t={};for(let n=0;n0)&&!(d&16)){if(d&8){const l=e.vnode.dynamicProps;for(let c=0;c{u=!0;const[p,f]=D1(c,t,!0);ar(d,p),f&&s.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}if(!a&&!u)return $n(e)&&r.set(e,Zc),Zc;if(ut(a))for(let l=0;l-1,f[1]=g<0||m-1||on(f,"default"))&&s.push(c)}}}const o=[d,s];return $n(e)&&r.set(e,o),o}function eR(e){return e[0]!=="$"}function tR(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function nR(e,t){return tR(e)===tR(t)}function rR(e,t){return ut(t)?t.findIndex(n=>nR(n,e)):It(t)&&nR(t,e)?0:-1}const M1=e=>e[0]==="_"||e==="$stable",Xy=e=>ut(e)?e.map(Li):[Li(e)],bY=(e,t,n)=>{if(t._n)return t;const r=kn((...i)=>Xy(t(...i)),n);return r._c=!1,r},k1=(e,t,n)=>{const r=e._ctx;for(const i in e){if(M1(i))continue;const a=e[i];if(It(a))t[i]=bY(i,a,r);else if(a!=null){const d=Xy(a);t[i]=()=>d}}},P1=(e,t)=>{const n=Xy(t);e.slots.default=()=>n},SY=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Dt(t),Rm(t,"_",n)):k1(t,e.slots={})}else e.slots={},t&&P1(e,t);Rm(e.slots,kg,1)},vY=(e,t,n)=>{const{vnode:r,slots:i}=e;let a=!0,d=An;if(r.shapeFlag&32){const s=t._;s?n&&s===1?a=!1:(ar(i,t),!n&&s===1&&delete i._):(a=!t.$stable,k1(t,i)),d=t}else t&&(P1(e,t),d={default:1});if(a)for(const s in i)!M1(s)&&!(s in d)&&delete i[s]};function L1(){return{app:null,config:{isNativeTag:z4,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let EY=0;function yY(e,t){return function(r,i=null){It(r)||(r=Object.assign({},r)),i!=null&&!$n(i)&&(i=null);const a=L1(),d=new Set;let s=!1;const u=a.app={_uid:EY++,_component:r,_props:i,_container:null,_context:a,_instance:null,version:J1,get config(){return a.config},set config(o){},use(o,...l){return d.has(o)||(o&&It(o.install)?(d.add(o),o.install(u,...l)):It(o)&&(d.add(o),o(u,...l))),u},mixin(o){return a.mixins.includes(o)||a.mixins.push(o),u},component(o,l){return l?(a.components[o]=l,u):a.components[o]},directive(o,l){return l?(a.directives[o]=l,u):a.directives[o]},mount(o,l,c){if(!s){const p=N(r,i);return p.appContext=a,l&&t?t(p,o):e(p,o,c),s=!0,u._container=o,o.__vue_app__=u,Pg(p.component)||p.component.proxy}},unmount(){s&&(e(null,u._container),delete u._container.__vue_app__)},provide(o,l){return a.provides[o]=l,u}};return u}}function Mm(e,t,n,r,i=!1){if(ut(e)){e.forEach((p,f)=>Mm(p,t&&(ut(t)?t[f]:t),n,r,i));return}if(Il(r)&&!i)return;const a=r.shapeFlag&4?Pg(r.component)||r.component.proxy:r.el,d=i?null:a,{i:s,r:u}=e,o=t&&t.r,l=s.refs===An?s.refs={}:s.refs,c=s.setupState;if(o!=null&&o!==u&&(Qn(o)?(l[o]=null,on(c,o)&&(c[o]=null)):Er(o)&&(o.value=null)),It(u))Ua(u,s,12,[d,l]);else{const p=Qn(u),f=Er(u);if(p||f){const m=()=>{if(e.f){const g=p?on(c,u)?c[u]:l[u]:u.value;i?ut(g)&&wy(g,a):ut(g)?g.includes(a)||g.push(a):p?(l[u]=[a],on(c,u)&&(c[u]=l[u])):(u.value=[a],e.k&&(l[e.k]=u.value))}else p?(l[u]=d,on(c,u)&&(c[u]=d)):f&&(u.value=d,e.k&&(l[e.k]=d))};d?(m.id=-1,Br(m,n)):m()}}}let hs=!1;const d_=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",p_=e=>e.nodeType===8;function CY(e){const{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:d,remove:s,insert:u,createComment:o}}=e,l=(b,v)=>{if(!v.hasChildNodes()){n(null,b,v),Am(),v._vnode=b;return}hs=!1,c(v.firstChild,b,null,null,null),Am(),v._vnode=b,hs&&console.error("Hydration completed but contains mismatches.")},c=(b,v,E,y,T,O=!1)=>{const C=p_(b)&&b.data==="[",R=()=>g(b,v,E,y,T,C),{type:x,ref:I,shapeFlag:k,patchFlag:L}=v;let A=b.nodeType;v.el=b,L===-2&&(O=!1,v.dynamicChildren=null);let D=null;switch(x){case ta:A!==3?v.children===""?(u(v.el=i(""),d(b),b),D=b):D=R():(b.data!==v.children&&(hs=!0,b.data=v.children),D=a(b));break;case Hr:A!==8||C?D=R():D=a(b);break;case Al:if(C&&(b=a(b),A=b.nodeType),A===1||A===3){D=b;const $=!v.children.length;for(let F=0;F{O=O||!!v.dynamicChildren;const{type:C,props:R,patchFlag:x,shapeFlag:I,dirs:k}=v,L=C==="input"&&k||C==="option";if(L||x!==-1){if(k&&Qo(v,null,E,"created"),R)if(L||!O||x&48)for(const D in R)(L&&D.endsWith("value")||Zp(D)&&!Hd(D))&&r(b,D,null,R[D],!1,void 0,E);else R.onClick&&r(b,"onClick",null,R.onClick,!1,void 0,E);let A;if((A=R&&R.onVnodeBeforeMount)&&vi(A,E,v),k&&Qo(v,null,E,"beforeMount"),((A=R&&R.onVnodeMounted)||k)&&b1(()=>{A&&vi(A,E,v),k&&Qo(v,null,E,"mounted")},y),I&16&&!(R&&(R.innerHTML||R.textContent))){let D=f(b.firstChild,v,b,E,y,T,O);for(;D;){hs=!0;const $=D;D=D.nextSibling,s($)}}else I&8&&b.textContent!==v.children&&(hs=!0,b.textContent=v.children)}return b.nextSibling},f=(b,v,E,y,T,O,C)=>{C=C||!!v.dynamicChildren;const R=v.children,x=R.length;for(let I=0;I{const{slotScopeIds:C}=v;C&&(T=T?T.concat(C):C);const R=d(b),x=f(a(b),v,R,E,y,T,O);return x&&p_(x)&&x.data==="]"?a(v.anchor=x):(hs=!0,u(v.anchor=o("]"),R,x),x)},g=(b,v,E,y,T,O)=>{if(hs=!0,v.el=null,O){const x=h(b);for(;;){const I=a(b);if(I&&I!==x)s(I);else break}}const C=a(b),R=d(b);return s(b),n(null,v,R,C,E,y,d_(R),T),C},h=b=>{let v=0;for(;b;)if(b=a(b),b&&p_(b)&&(b.data==="["&&v++,b.data==="]")){if(v===0)return a(b);v--}return b};return[l,c]}const Br=b1;function $1(e){return B1(e)}function F1(e){return B1(e,CY)}function B1(e,t){const n=Q4();n.__VUE__=!0;const{insert:r,remove:i,patchProp:a,createElement:d,createText:s,createComment:u,setText:o,setElementText:l,parentNode:c,nextSibling:p,setScopeId:f=Do,insertStaticContent:m}=e,g=(U,j,J,pe=null,ae=null,be=null,ve=!1,ge=null,ce=!!j.dynamicChildren)=>{if(U===j)return;U&&!No(U,j)&&(pe=q(U),X(U,ae,be,!0),U=null),j.patchFlag===-2&&(ce=!1,j.dynamicChildren=null);const{type:ee,ref:Ne,shapeFlag:Oe}=j;switch(ee){case ta:h(U,j,J,pe);break;case Hr:b(U,j,J,pe);break;case Al:U==null&&v(j,J,pe,ve);break;case Xe:L(U,j,J,pe,ae,be,ve,ge,ce);break;default:Oe&1?T(U,j,J,pe,ae,be,ve,ge,ce):Oe&6?A(U,j,J,pe,ae,be,ve,ge,ce):(Oe&64||Oe&128)&&ee.process(U,j,J,pe,ae,be,ve,ge,ce,re)}Ne!=null&&ae&&Mm(Ne,U&&U.ref,be,j||U,!j)},h=(U,j,J,pe)=>{if(U==null)r(j.el=s(j.children),J,pe);else{const ae=j.el=U.el;j.children!==U.children&&o(ae,j.children)}},b=(U,j,J,pe)=>{U==null?r(j.el=u(j.children||""),J,pe):j.el=U.el},v=(U,j,J,pe)=>{[U.el,U.anchor]=m(U.children,j,J,pe,U.el,U.anchor)},E=({el:U,anchor:j},J,pe)=>{let ae;for(;U&&U!==j;)ae=p(U),r(U,J,pe),U=ae;r(j,J,pe)},y=({el:U,anchor:j})=>{let J;for(;U&&U!==j;)J=p(U),i(U),U=J;i(j)},T=(U,j,J,pe,ae,be,ve,ge,ce)=>{ve=ve||j.type==="svg",U==null?O(j,J,pe,ae,be,ve,ge,ce):x(U,j,ae,be,ve,ge,ce)},O=(U,j,J,pe,ae,be,ve,ge)=>{let ce,ee;const{type:Ne,props:Oe,shapeFlag:Ae,transition:ue,dirs:ie}=U;if(ce=U.el=d(U.type,be,Oe&&Oe.is,Oe),Ae&8?l(ce,U.children):Ae&16&&R(U.children,ce,null,pe,ae,be&&Ne!=="foreignObject",ve,ge),ie&&Qo(U,null,pe,"created"),C(ce,U,U.scopeId,ve,pe),Oe){for(const Le in Oe)Le!=="value"&&!Hd(Le)&&a(ce,Le,null,Oe[Le],be,U.children,pe,ae,Z);"value"in Oe&&a(ce,"value",null,Oe.value),(ee=Oe.onVnodeBeforeMount)&&vi(ee,pe,U)}ie&&Qo(U,null,pe,"beforeMount");const Ee=(!ae||ae&&!ae.pendingBranch)&&ue&&!ue.persisted;Ee&&ue.beforeEnter(ce),r(ce,j,J),((ee=Oe&&Oe.onVnodeMounted)||Ee||ie)&&Br(()=>{ee&&vi(ee,pe,U),Ee&&ue.enter(ce),ie&&Qo(U,null,pe,"mounted")},ae)},C=(U,j,J,pe,ae)=>{if(J&&f(U,J),pe)for(let be=0;be{for(let ee=ce;ee{const ge=j.el=U.el;let{patchFlag:ce,dynamicChildren:ee,dirs:Ne}=j;ce|=U.patchFlag&16;const Oe=U.props||An,Ae=j.props||An;let ue;J&&cl(J,!1),(ue=Ae.onVnodeBeforeUpdate)&&vi(ue,J,j,U),Ne&&Qo(j,U,J,"beforeUpdate"),J&&cl(J,!0);const ie=ae&&j.type!=="foreignObject";if(ee?I(U.dynamicChildren,ee,ge,J,pe,ie,be):ve||H(U,j,ge,null,J,pe,ie,be,!1),ce>0){if(ce&16)k(ge,j,Oe,Ae,J,pe,ae);else if(ce&2&&Oe.class!==Ae.class&&a(ge,"class",null,Ae.class,ae),ce&4&&a(ge,"style",Oe.style,Ae.style,ae),ce&8){const Ee=j.dynamicProps;for(let Le=0;Le{ue&&vi(ue,J,j,U),Ne&&Qo(j,U,J,"updated")},pe)},I=(U,j,J,pe,ae,be,ve)=>{for(let ge=0;ge{if(J!==pe){if(J!==An)for(const ge in J)!Hd(ge)&&!(ge in pe)&&a(U,ge,J[ge],null,ve,j.children,ae,be,Z);for(const ge in pe){if(Hd(ge))continue;const ce=pe[ge],ee=J[ge];ce!==ee&&ge!=="value"&&a(U,ge,ee,ce,ve,j.children,ae,be,Z)}"value"in pe&&a(U,"value",J.value,pe.value)}},L=(U,j,J,pe,ae,be,ve,ge,ce)=>{const ee=j.el=U?U.el:s(""),Ne=j.anchor=U?U.anchor:s("");let{patchFlag:Oe,dynamicChildren:Ae,slotScopeIds:ue}=j;ue&&(ge=ge?ge.concat(ue):ue),U==null?(r(ee,J,pe),r(Ne,J,pe),R(j.children,J,Ne,ae,be,ve,ge,ce)):Oe>0&&Oe&64&&Ae&&U.dynamicChildren?(I(U.dynamicChildren,Ae,J,ae,be,ve,ge),(j.key!=null||ae&&j===ae.subTree)&&Zy(U,j,!0)):H(U,j,J,Ne,ae,be,ve,ge,ce)},A=(U,j,J,pe,ae,be,ve,ge,ce)=>{j.slotScopeIds=ge,U==null?j.shapeFlag&512?ae.ctx.activate(j,J,pe,ve,ce):D(j,J,pe,ae,be,ve,ce):$(U,j,ce)},D=(U,j,J,pe,ae,be,ve)=>{const ge=U.component=Y1(U,pe,ae);if(nf(U)&&(ge.ctx.renderer=re),q1(ge),ge.asyncDep){if(ae&&ae.registerDep(ge,F),!U.el){const ce=ge.subTree=N(Hr);b(null,ce,j,J)}return}F(ge,U,j,J,ae,be,ve)},$=(U,j,J)=>{const pe=j.component=U.component;if(K6(U,j,J))if(pe.asyncDep&&!pe.asyncResolved){z(pe,j,J);return}else pe.next=j,H6(pe.update),pe.update();else j.el=U.el,pe.vnode=j},F=(U,j,J,pe,ae,be,ve)=>{const ge=()=>{if(U.isMounted){let{next:Ne,bu:Oe,u:Ae,parent:ue,vnode:ie}=U,Ee=Ne,Le;cl(U,!1),Ne?(Ne.el=ie.el,z(U,Ne,ve)):Ne=ie,Oe&&eu(Oe),(Le=Ne.props&&Ne.props.onVnodeBeforeUpdate)&&vi(Le,ue,Ne,ie),cl(U,!0);const We=sm(U),Ke=U.subTree;U.subTree=We,g(Ke,We,c(Ke.el),q(Ke),U,ae,be),Ne.el=We.el,Ee===null&&Uy(U,We.el),Ae&&Br(Ae,ae),(Le=Ne.props&&Ne.props.onVnodeUpdated)&&Br(()=>vi(Le,ue,Ne,ie),ae)}else{let Ne;const{el:Oe,props:Ae}=j,{bm:ue,m:ie,parent:Ee}=U,Le=Il(j);if(cl(U,!1),ue&&eu(ue),!Le&&(Ne=Ae&&Ae.onVnodeBeforeMount)&&vi(Ne,Ee,j),cl(U,!0),Oe&&me){const We=()=>{U.subTree=sm(U),me(Oe,U.subTree,U,ae,null)};Le?j.type.__asyncLoader().then(()=>!U.isUnmounted&&We()):We()}else{const We=U.subTree=sm(U);g(null,We,J,pe,U,ae,be),j.el=We.el}if(ie&&Br(ie,ae),!Le&&(Ne=Ae&&Ae.onVnodeMounted)){const We=j;Br(()=>vi(Ne,Ee,We),ae)}(j.shapeFlag&256||Ee&&Il(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&U.a&&Br(U.a,ae),U.isMounted=!0,j=J=pe=null}},ce=U.effect=new ef(ge,()=>xg(ee),U.scope),ee=U.update=()=>ce.run();ee.id=U.uid,cl(U,!0),ee()},z=(U,j,J)=>{j.component=U;const pe=U.vnode.props;U.vnode=j,U.next=null,hY(U,j.props,pe,J),vY(U,j.children,J),Xu(),jw(),Zu()},H=(U,j,J,pe,ae,be,ve,ge,ce=!1)=>{const ee=U&&U.children,Ne=U?U.shapeFlag:0,Oe=j.children,{patchFlag:Ae,shapeFlag:ue}=j;if(Ae>0){if(Ae&128){W(ee,Oe,J,pe,ae,be,ve,ge,ce);return}else if(Ae&256){V(ee,Oe,J,pe,ae,be,ve,ge,ce);return}}ue&8?(Ne&16&&Z(ee,ae,be),Oe!==ee&&l(J,Oe)):Ne&16?ue&16?W(ee,Oe,J,pe,ae,be,ve,ge,ce):Z(ee,ae,be,!0):(Ne&8&&l(J,""),ue&16&&R(Oe,J,pe,ae,be,ve,ge,ce))},V=(U,j,J,pe,ae,be,ve,ge,ce)=>{U=U||Zc,j=j||Zc;const ee=U.length,Ne=j.length,Oe=Math.min(ee,Ne);let Ae;for(Ae=0;AeNe?Z(U,ae,be,!0,!1,Oe):R(j,J,pe,ae,be,ve,ge,ce,Oe)},W=(U,j,J,pe,ae,be,ve,ge,ce)=>{let ee=0;const Ne=j.length;let Oe=U.length-1,Ae=Ne-1;for(;ee<=Oe&&ee<=Ae;){const ue=U[ee],ie=j[ee]=ce?Es(j[ee]):Li(j[ee]);if(No(ue,ie))g(ue,ie,J,null,ae,be,ve,ge,ce);else break;ee++}for(;ee<=Oe&&ee<=Ae;){const ue=U[Oe],ie=j[Ae]=ce?Es(j[Ae]):Li(j[Ae]);if(No(ue,ie))g(ue,ie,J,null,ae,be,ve,ge,ce);else break;Oe--,Ae--}if(ee>Oe){if(ee<=Ae){const ue=Ae+1,ie=ueAe)for(;ee<=Oe;)X(U[ee],ae,be,!0),ee++;else{const ue=ee,ie=ee,Ee=new Map;for(ee=ie;ee<=Ae;ee++){const qe=j[ee]=ce?Es(j[ee]):Li(j[ee]);qe.key!=null&&Ee.set(qe.key,ee)}let Le,We=0;const Ke=Ae-ie+1;let xe=!1,Me=0;const Pe=new Array(Ke);for(ee=0;ee=Ke){X(qe,ae,be,!0);continue}let Je;if(qe.key!=null)Je=Ee.get(qe.key);else for(Le=ie;Le<=Ae;Le++)if(Pe[Le-ie]===0&&No(qe,j[Le])){Je=Le;break}Je===void 0?X(qe,ae,be,!0):(Pe[Je-ie]=ee+1,Je>=Me?Me=Je:xe=!0,g(qe,j[Je],J,null,ae,be,ve,ge,ce),We++)}const Qe=xe?TY(Pe):Zc;for(Le=Qe.length-1,ee=Ke-1;ee>=0;ee--){const qe=ie+ee,Je=j[qe],et=qe+1{const{el:be,type:ve,transition:ge,children:ce,shapeFlag:ee}=U;if(ee&6){te(U.component.subTree,j,J,pe);return}if(ee&128){U.suspense.move(j,J,pe);return}if(ee&64){ve.move(U,j,J,re);return}if(ve===Xe){r(be,j,J);for(let Oe=0;Oege.enter(be),ae);else{const{leave:Oe,delayLeave:Ae,afterLeave:ue}=ge,ie=()=>r(be,j,J),Ee=()=>{Oe(be,()=>{ie(),ue&&ue()})};Ae?Ae(be,ie,Ee):Ee()}else r(be,j,J)},X=(U,j,J,pe=!1,ae=!1)=>{const{type:be,props:ve,ref:ge,children:ce,dynamicChildren:ee,shapeFlag:Ne,patchFlag:Oe,dirs:Ae}=U;if(ge!=null&&Mm(ge,null,J,U,!0),Ne&256){j.ctx.deactivate(U);return}const ue=Ne&1&&Ae,ie=!Il(U);let Ee;if(ie&&(Ee=ve&&ve.onVnodeBeforeUnmount)&&vi(Ee,j,U),Ne&6)Q(U.component,J,pe);else{if(Ne&128){U.suspense.unmount(J,pe);return}ue&&Qo(U,null,j,"beforeUnmount"),Ne&64?U.type.remove(U,j,J,ae,re,pe):ee&&(be!==Xe||Oe>0&&Oe&64)?Z(ee,j,J,!1,!0):(be===Xe&&Oe&384||!ae&&Ne&16)&&Z(ce,j,J),pe&&ne(U)}(ie&&(Ee=ve&&ve.onVnodeUnmounted)||ue)&&Br(()=>{Ee&&vi(Ee,j,U),ue&&Qo(U,null,j,"unmounted")},J)},ne=U=>{const{type:j,el:J,anchor:pe,transition:ae}=U;if(j===Xe){oe(J,pe);return}if(j===Al){y(U);return}const be=()=>{i(J),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(U.shapeFlag&1&&ae&&!ae.persisted){const{leave:ve,delayLeave:ge}=ae,ce=()=>ve(J,be);ge?ge(U.el,be,ce):ce()}else be()},oe=(U,j)=>{let J;for(;U!==j;)J=p(U),i(U),U=J;i(j)},Q=(U,j,J)=>{const{bum:pe,scope:ae,update:be,subTree:ve,um:ge}=U;pe&&eu(pe),ae.stop(),be&&(be.active=!1,X(ve,U,j,J)),ge&&Br(ge,j),Br(()=>{U.isUnmounted=!0},j),j&&j.pendingBranch&&!j.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===j.pendingId&&(j.deps--,j.deps===0&&j.resolve())},Z=(U,j,J,pe=!1,ae=!1,be=0)=>{for(let ve=be;veU.shapeFlag&6?q(U.component.subTree):U.shapeFlag&128?U.suspense.next():p(U.anchor||U.el),se=(U,j,J)=>{U==null?j._vnode&&X(j._vnode,null,null,!0):g(j._vnode||null,U,j,null,null,null,J),jw(),Am(),j._vnode=U},re={p:g,um:X,m:te,r:ne,mt:D,mc:R,pc:H,pbc:I,n:q,o:e};let _e,me;return t&&([_e,me]=t(re)),{render:se,hydrate:_e,createApp:yY(se,_e)}}function cl({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Zy(e,t,n=!1){const r=e.children,i=t.children;if(ut(r)&&ut(i))for(let a=0;a>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,d=n[a-1];a-- >0;)n[a]=d,d=t[d];return n}const OY=e=>e.__isTeleport,Vd=e=>e&&(e.disabled||e.disabled===""),iR=e=>typeof SVGElement<"u"&&e instanceof SVGElement,fv=(e,t)=>{const n=e&&e.to;return Qn(n)?t?t(n):null:n},wY={__isTeleport:!0,process(e,t,n,r,i,a,d,s,u,o){const{mc:l,pc:c,pbc:p,o:{insert:f,querySelector:m,createText:g,createComment:h}}=o,b=Vd(t.props);let{shapeFlag:v,children:E,dynamicChildren:y}=t;if(e==null){const T=t.el=g(""),O=t.anchor=g("");f(T,n,r),f(O,n,r);const C=t.target=fv(t.props,m),R=t.targetAnchor=g("");C&&(f(R,C),d=d||iR(C));const x=(I,k)=>{v&16&&l(E,I,k,i,a,d,s,u)};b?x(n,O):C&&x(C,R)}else{t.el=e.el;const T=t.anchor=e.anchor,O=t.target=e.target,C=t.targetAnchor=e.targetAnchor,R=Vd(e.props),x=R?n:O,I=R?T:C;if(d=d||iR(O),y?(p(e.dynamicChildren,y,x,i,a,d,s),Zy(e,t,!0)):u||c(e,t,x,I,i,a,d,s,!1),b)R||f_(t,n,T,o,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const k=t.target=fv(t.props,m);k&&f_(t,k,null,o,0)}else R&&f_(t,O,C,o,1)}U1(t)},remove(e,t,n,r,{um:i,o:{remove:a}},d){const{shapeFlag:s,children:u,anchor:o,targetAnchor:l,target:c,props:p}=e;if(c&&a(l),(d||!Vd(p))&&(a(o),s&16))for(let f=0;f0?yi||Zc:null,G1(),Fl>0&&yi&&yi.push(e),e}function Re(e,t,n,r,i,a){return H1(He(e,t,n,r,i,a,!0))}function Vn(e,t,n,r,i){return H1(N(e,t,n,r,i,!0))}function yr(e){return e?e.__v_isVNode===!0:!1}function No(e,t){return e.type===t.type&&e.key===t.key}function xY(e){}const kg="__vInternal",z1=({key:e})=>e!=null?e:null,lm=({ref:e,ref_key:t,ref_for:n})=>e!=null?Qn(e)||Er(e)||It(e)?{i:Ur,r:e,k:t,f:!!n}:e:null;function He(e,t=null,n=null,r=0,i=null,a=e===Xe?0:1,d=!1,s=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&z1(t),ref:t&&lm(t),scopeId:Ng,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ur};return s?(Jy(u,n),a&128&&e.normalize(u)):n&&(u.shapeFlag|=Qn(n)?8:16),Fl>0&&!d&&yi&&(u.patchFlag>0||a&6)&&u.patchFlag!==32&&yi.push(u),u}const N=IY;function IY(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===R1)&&(e=Hr),yr(e)){const s=fi(e,t,!0);return n&&Jy(s,n),Fl>0&&!a&&yi&&(s.shapeFlag&6?yi[yi.indexOf(e)]=s:yi.push(s)),s.patchFlag|=-2,s}if($Y(e)&&(e=e.__vccOpts),t){t=lo(t);let{class:s,style:u}=t;s&&!Qn(s)&&(t.class=ct(s)),$n(u)&&(My(u)&&!ut(u)&&(u=ar({},u)),t.style=Zn(u))}const d=Qn(e)?1:h1(e)?128:OY(e)?64:$n(e)?4:It(e)?2:0;return He(e,t,n,r,i,d,a,!0)}function lo(e){return e?My(e)||kg in e?ar({},e):e:null}function fi(e,t,n=!1){const{props:r,ref:i,patchFlag:a,children:d}=e,s=t?$a(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&z1(s),ref:t&&t.ref?n&&i?ut(i)?i.concat(lm(t)):[i,lm(t)]:lm(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Xe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fi(e.ssContent),ssFallback:e.ssFallback&&fi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Pn(e=" ",t=0){return N(ta,null,e,t)}function NY(e,t){const n=N(Al,null,e);return n.staticCount=t,n}function Lt(e="",t=!1){return t?(Se(),Vn(Hr,null,e)):N(Hr,null,e)}function Li(e){return e==null||typeof e=="boolean"?N(Hr):ut(e)?N(Xe,null,e.slice()):typeof e=="object"?Es(e):N(ta,null,String(e))}function Es(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fi(e)}function Jy(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ut(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Jy(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(kg in t)?t._ctx=Ur:i===3&&Ur&&(Ur.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else It(t)?(t={default:t,_ctx:Ur},n=32):(t=String(t),r&64?(n=16,t=[Pn(t)]):n=8);e.children=t,e.shapeFlag|=n}function $a(...e){const t={};for(let n=0;nir||Ur,Ys=e=>{ir=e,e.scope.on()},Ls=()=>{ir&&ir.scope.off(),ir=null};function V1(e){return e.vnode.shapeFlag&4}let Tu=!1;function q1(e,t=!1){Tu=t;const{props:n,children:r}=e.vnode,i=V1(e);gY(e,n,i,t),SY(e,r);const a=i?MY(e,t):void 0;return Tu=!1,a}function MY(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=ky(new Proxy(e.ctx,cv));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?W1(e):null;Ys(e),Xu();const a=Ua(r,e,0,[e.props,i]);if(Zu(),Ls(),Ry(a)){if(a.then(Ls,Ls),t)return a.then(d=>{mv(e,d,t)}).catch(d=>{tc(d,e,0)});e.asyncDep=a}else mv(e,a,t)}else j1(e,t)}function mv(e,t,n){It(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:$n(t)&&(e.setupState=$y(t)),j1(e,n)}let km,gv;function kY(e){km=e,gv=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,uY))}}const PY=()=>!km;function j1(e,t,n){const r=e.type;if(!e.render){if(!t&&km&&!r.render){const i=r.template||Qy(e).template;if(i){const{isCustomElement:a,compilerOptions:d}=e.appContext.config,{delimiters:s,compilerOptions:u}=r,o=ar(ar({isCustomElement:a,delimiters:s},d),u);r.render=km(i,o)}}e.render=r.render||Do,gv&&gv(e)}Ys(e),Xu(),dY(e),Zu(),Ls()}function LY(e){return new Proxy(e.attrs,{get(t,n){return Ti(e,"get","$attrs"),t[n]}})}function W1(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=LY(e))},slots:e.slots,emit:e.emit,expose:t}}function Pg(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy($y(ky(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Yd)return Yd[n](e)},has(t,n){return n in t||n in Yd}}))}function hv(e,t=!0){return It(e)?e.displayName||e.name:e.name||t&&e.__name}function $Y(e){return It(e)&&"__vccOpts"in e}const B=(e,t)=>$6(e,t,Tu);function FY(){return null}function BY(){return null}function UY(e){}function GY(e,t){return null}function HY(){return K1().slots}function zY(){return K1().attrs}function K1(){const e=mr();return e.setupContext||(e.setupContext=W1(e))}function YY(e,t){const n=ut(e)?e.reduce((r,i)=>(r[i]={},r),{}):e;for(const r in t){const i=n[r];i?ut(i)||It(i)?n[r]={type:i,default:t[r]}:i.default=t[r]:i===null&&(n[r]={default:t[r]})}return n}function VY(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function qY(e){const t=mr();let n=e();return Ls(),Ry(n)&&(n=n.catch(r=>{throw Ys(t),r})),[n,()=>Ys(t)]}function Bl(e,t,n){const r=arguments.length;return r===2?$n(t)&&!ut(t)?yr(t)?N(e,null,[t]):N(e,t):N(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&yr(n)&&(n=[n]),N(e,t,n))}const Q1=Symbol(""),X1=()=>bt(Q1);function jY(){}function WY(e,t,n,r){const i=n[r];if(i&&Z1(i,e))return i;const a=t();return a.memo=e.slice(),n[r]=a}function Z1(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r0&&yi&&yi.push(e),!0}const J1="3.2.47",KY={createComponentInstance:Y1,setupComponent:q1,renderComponentRoot:sm,setCurrentRenderingInstance:Sp,isVNode:yr,normalizeVNode:Li},QY=KY,XY=null,ZY=null,JY="http://www.w3.org/2000/svg",bl=typeof document<"u"?document:null,oR=bl&&bl.createElement("template"),eV={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?bl.createElementNS(JY,e):bl.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>bl.createTextNode(e),createComment:e=>bl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>bl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,a){const d=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{oR.innerHTML=r?`${e}`:e;const s=oR.content;if(r){const u=s.firstChild;for(;u.firstChild;)s.appendChild(u.firstChild);s.removeChild(u)}t.insertBefore(s,n)}return[d?d.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function tV(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function nV(e,t,n){const r=e.style,i=Qn(n);if(n&&!i){if(t&&!Qn(t))for(const a in t)n[a]==null&&bv(r,a,"");for(const a in n)bv(r,a,n[a])}else{const a=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=a)}}const aR=/\s*!important$/;function bv(e,t,n){if(ut(n))n.forEach(r=>bv(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=rV(e,t);aR.test(n)?e.setProperty(uo(r),n.replace(aR,""),"important"):e[r]=n}}const sR=["Webkit","Moz","ms"],Yb={};function rV(e,t){const n=Yb[t];if(n)return n;let r=Ci(t);if(r!=="filter"&&r in e)return Yb[t]=r;r=Jp(r);for(let i=0;iVb||(cV.then(()=>Vb=0),Vb=Date.now());function dV(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Fi(pV(r,n.value),t,5,[r])};return n.value=e,n.attached=uV(),n}function pV(e,t){if(ut(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const uR=/^on[a-z]/,fV=(e,t,n,r,i=!1,a,d,s,u)=>{t==="class"?tV(e,r,i):t==="style"?nV(e,n,r):Zp(t)?Oy(t)||sV(e,t,n,r,d):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_V(e,t,r,i))?oV(e,t,r,a,d,s,u):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),iV(e,t,r,i))};function _V(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&uR.test(t)&&It(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||uR.test(t)&&Qn(n)?!1:t in e}function eM(e,t){const n=Te(e);class r extends Lg{constructor(a){super(n,a,t)}}return r.def=n,r}const mV=e=>eM(e,gM),gV=typeof HTMLElement<"u"?HTMLElement:class{};class Lg extends gV{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,en(()=>{this._connected||(Gl(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r{for(const i of r)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const t=(r,i=!1)=>{const{props:a,styles:d}=r;let s;if(a&&!ut(a))for(const u in a){const o=a[u];(o===Number||o&&o.type===Number)&&(u in this._props&&(this._props[u]=Im(this._props[u])),(s||(s=Object.create(null)))[Ci(u)]=!0)}this._numberProps=s,i&&this._resolveProps(r),this._applyStyles(d),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=ut(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&r.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of r.map(Ci))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(t){let n=this.getAttribute(t);const r=Ci(t);this._numberProps&&this._numberProps[r]&&(n=Im(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,i=!0){n!==this._props[t]&&(this._props[t]=n,i&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(uo(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(uo(t),n+""):n||this.removeAttribute(uo(t))))}_update(){Gl(this._createVNode(),this.shadowRoot)}_createVNode(){const t=N(this._def,ar({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(a,d)=>{this.dispatchEvent(new CustomEvent(a,{detail:d}))};n.emit=(a,...d)=>{r(a,d),uo(a)!==a&&r(uo(a),d)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof Lg){n.parent=i._instance,n.provides=i._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function hV(e="$style"){{const t=mr();if(!t)return An;const n=t.type.__cssModules;if(!n)return An;const r=n[e];return r||An}}function bV(e){const t=mr();if(!t)return;const n=t.ut=(i=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(a=>vv(a,i))},r=()=>{const i=e(t.proxy);Sv(t.subTree,i),n(i)};S1(r),it(()=>{const i=new MutationObserver(r);i.observe(t.subTree.el.parentNode,{childList:!0}),zi(()=>i.disconnect())})}function Sv(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Sv(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)vv(e.el,t);else if(e.type===Xe)e.children.forEach(n=>Sv(n,t));else if(e.type===Al){let{el:n,anchor:r}=e;for(;n&&(vv(n,t),n!==r);)n=n.nextSibling}}function vv(e,t){if(e.nodeType===1){const n=e.style;for(const r in t)n.setProperty(`--${r}`,t[r])}}const bs="transition",wd="animation",Yi=(e,{slots:t})=>Bl(zy,nM(e),t);Yi.displayName="Transition";const tM={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},SV=Yi.props=ar({},zy.props,tM),ul=(e,t=[])=>{ut(e)?e.forEach(n=>n(...t)):e&&e(...t)},dR=e=>e?ut(e)?e.some(t=>t.length>1):e.length>1:!1;function nM(e){const t={};for(const L in e)L in tM||(t[L]=e[L]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:d=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:u=a,appearActiveClass:o=d,appearToClass:l=s,leaveFromClass:c=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=vV(i),g=m&&m[0],h=m&&m[1],{onBeforeEnter:b,onEnter:v,onEnterCancelled:E,onLeave:y,onLeaveCancelled:T,onBeforeAppear:O=b,onAppear:C=v,onAppearCancelled:R=E}=t,x=(L,A,D)=>{vs(L,A?l:s),vs(L,A?o:d),D&&D()},I=(L,A)=>{L._isLeaving=!1,vs(L,c),vs(L,f),vs(L,p),A&&A()},k=L=>(A,D)=>{const $=L?C:v,F=()=>x(A,L,D);ul($,[A,F]),pR(()=>{vs(A,L?u:a),Ca(A,L?l:s),dR($)||fR(A,r,g,F)})};return ar(t,{onBeforeEnter(L){ul(b,[L]),Ca(L,a),Ca(L,d)},onBeforeAppear(L){ul(O,[L]),Ca(L,u),Ca(L,o)},onEnter:k(!1),onAppear:k(!0),onLeave(L,A){L._isLeaving=!0;const D=()=>I(L,A);Ca(L,c),iM(),Ca(L,p),pR(()=>{!L._isLeaving||(vs(L,c),Ca(L,f),dR(y)||fR(L,r,h,D))}),ul(y,[L,D])},onEnterCancelled(L){x(L,!1),ul(E,[L])},onAppearCancelled(L){x(L,!0),ul(R,[L])},onLeaveCancelled(L){I(L),ul(T,[L])}})}function vV(e){if(e==null)return null;if($n(e))return[qb(e.enter),qb(e.leave)];{const t=qb(e);return[t,t]}}function qb(e){return Im(e)}function Ca(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function vs(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function pR(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let EV=0;function fR(e,t,n,r){const i=e._endId=++EV,a=()=>{i===e._endId&&r()};if(n)return setTimeout(a,n);const{type:d,timeout:s,propCount:u}=rM(e,t);if(!d)return r();const o=d+"end";let l=0;const c=()=>{e.removeEventListener(o,p),a()},p=f=>{f.target===e&&++l>=u&&c()};setTimeout(()=>{l(n[m]||"").split(", "),i=r(`${bs}Delay`),a=r(`${bs}Duration`),d=_R(i,a),s=r(`${wd}Delay`),u=r(`${wd}Duration`),o=_R(s,u);let l=null,c=0,p=0;t===bs?d>0&&(l=bs,c=d,p=a.length):t===wd?o>0&&(l=wd,c=o,p=u.length):(c=Math.max(d,o),l=c>0?d>o?bs:wd:null,p=l?l===bs?a.length:u.length:0);const f=l===bs&&/\b(transform|all)(,|$)/.test(r(`${bs}Property`).toString());return{type:l,timeout:c,propCount:p,hasTransform:f}}function _R(e,t){for(;e.lengthmR(n)+mR(e[r])))}function mR(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function iM(){return document.body.offsetHeight}const oM=new WeakMap,aM=new WeakMap,sM={name:"TransitionGroup",props:ar({},SV,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=mr(),r=Hy();let i,a;return Hi(()=>{if(!i.length)return;const d=e.moveClass||`${e.name||"v"}-move`;if(!wV(i[0].el,n.vnode.el,d))return;i.forEach(CV),i.forEach(TV);const s=i.filter(OV);iM(),s.forEach(u=>{const o=u.el,l=o.style;Ca(o,d),l.transform=l.webkitTransform=l.transitionDuration="";const c=o._moveCb=p=>{p&&p.target!==o||(!p||/transform$/.test(p.propertyName))&&(o.removeEventListener("transitionend",c),o._moveCb=null,vs(o,d))};o.addEventListener("transitionend",c)})}),()=>{const d=Dt(e),s=nM(d);let u=d.tag||Xe;i=a,a=t.default?Ag(t.default()):[];for(let o=0;odelete e.mode;sM.props;const e0=sM;function CV(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function TV(e){aM.set(e,e.el.getBoundingClientRect())}function OV(e){const t=oM.get(e),n=aM.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${r}px,${i}px)`,a.transitionDuration="0s",e}}function wV(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(d=>{d.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(d=>d&&r.classList.add(d)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:a}=rM(r);return i.removeChild(r),a}const Vs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ut(t)?n=>eu(t,n):t};function RV(e){e.target.composing=!0}function gR(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ul={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=Vs(i);const a=r||i.props&&i.props.type==="number";Pa(e,t?"change":"input",d=>{if(d.target.composing)return;let s=e.value;n&&(s=s.trim()),a&&(s=xm(s)),e._assign(s)}),n&&Pa(e,"change",()=>{e.value=e.value.trim()}),t||(Pa(e,"compositionstart",RV),Pa(e,"compositionend",gR),Pa(e,"change",gR))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},a){if(e._assign=Vs(a),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&xm(e.value)===t))return;const d=t==null?"":t;e.value!==d&&(e.value=d)}},t0={deep:!0,created(e,t,n){e._assign=Vs(n),Pa(e,"change",()=>{const r=e._modelValue,i=Ou(e),a=e.checked,d=e._assign;if(ut(r)){const s=Eg(r,i),u=s!==-1;if(a&&!u)d(r.concat(i));else if(!a&&u){const o=[...r];o.splice(s,1),d(o)}}else if(ec(r)){const s=new Set(r);a?s.add(i):s.delete(i),d(s)}else d(cM(e,a))})},mounted:hR,beforeUpdate(e,t,n){e._assign=Vs(n),hR(e,t,n)}};function hR(e,{value:t,oldValue:n},r){e._modelValue=t,ut(t)?e.checked=Eg(t,r.props.value)>-1:ec(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Hs(t,cM(e,!0)))}const n0={created(e,{value:t},n){e.checked=Hs(t,n.props.value),e._assign=Vs(n),Pa(e,"change",()=>{e._assign(Ou(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=Vs(r),t!==n&&(e.checked=Hs(t,r.props.value))}},lM={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=ec(t);Pa(e,"change",()=>{const a=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>n?xm(Ou(d)):Ou(d));e._assign(e.multiple?i?new Set(a):a:a[0])}),e._assign=Vs(r)},mounted(e,{value:t}){bR(e,t)},beforeUpdate(e,t,n){e._assign=Vs(n)},updated(e,{value:t}){bR(e,t)}};function bR(e,t){const n=e.multiple;if(!(n&&!ut(t)&&!ec(t))){for(let r=0,i=e.options.length;r-1:a.selected=t.has(d);else if(Hs(Ou(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ou(e){return"_value"in e?e._value:e.value}function cM(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const uM={created(e,t,n){__(e,t,n,null,"created")},mounted(e,t,n){__(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){__(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){__(e,t,n,r,"updated")}};function dM(e,t){switch(e){case"SELECT":return lM;case"TEXTAREA":return Ul;default:switch(t){case"checkbox":return t0;case"radio":return n0;default:return Ul}}}function __(e,t,n,r,i){const d=dM(e.tagName,n.props&&n.props.type)[i];d&&d(e,t,n,r)}function xV(){Ul.getSSRProps=({value:e})=>({value:e}),n0.getSSRProps=({value:e},t)=>{if(t.props&&Hs(t.props.value,e))return{checked:!0}},t0.getSSRProps=({value:e},t)=>{if(ut(e)){if(t.props&&Eg(e,t.props.value)>-1)return{checked:!0}}else if(ec(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},uM.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=dM(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const IV=["ctrl","shift","alt","meta"],NV={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>IV.some(n=>e[`${n}Key`]&&!t.includes(n))},li=(e,t)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=uo(n.key);if(t.some(i=>i===r||AV[i]===r))return e(n)},Ya={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Rd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Rd(e,!0),r.enter(e)):r.leave(e,()=>{Rd(e,!1)}):Rd(e,t))},beforeUnmount(e,{value:t}){Rd(e,t)}};function Rd(e,t){e.style.display=t?e._vod:"none"}function DV(){Ya.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const fM=ar({patchProp:fV},eV);let jd,SR=!1;function _M(){return jd||(jd=$1(fM))}function mM(){return jd=SR?jd:F1(fM),SR=!0,jd}const Gl=(...e)=>{_M().render(...e)},gM=(...e)=>{mM().hydrate(...e)},MV=(...e)=>{const t=_M().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=hM(r);if(!i)return;const a=t._component;!It(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const d=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),d},t},kV=(...e)=>{const t=mM().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=hM(r);if(i)return n(i,!0,i instanceof SVGElement)},t};function hM(e){return Qn(e)?document.querySelector(e):e}let vR=!1;const PV=()=>{vR||(vR=!0,xV(),DV())},LV=()=>{},$V=Object.freeze(Object.defineProperty({__proto__:null,compile:LV,EffectScope:Iy,ReactiveEffect:ef,customRef:k6,effect:t6,effectScope:X4,getCurrentScope:WD,isProxy:My,isReactive:xl,isReadonly:Ll,isRef:Er,isShallow:mp,markRaw:ky,onScopeDispose:Z4,proxyRefs:$y,reactive:Kt,readonly:Dy,ref:ke,shallowReactive:s1,shallowReadonly:I6,shallowRef:Ie,stop:n6,toRaw:Dt,toRef:cn,toRefs:tu,triggerRef:A6,unref:Ve,camelize:Ci,capitalize:Jp,normalizeClass:ct,normalizeProps:so,normalizeStyle:Zn,toDisplayString:pt,toHandlerKey:zd,BaseTransition:zy,Comment:Hr,Fragment:Xe,KeepAlive:sY,Static:Al,Suspense:X6,Teleport:rf,Text:ta,assertNumber:B6,callWithAsyncErrorHandling:Fi,callWithErrorHandling:Ua,cloneVNode:fi,compatUtils:ZY,computed:B,createBlock:Vn,createCommentVNode:Lt,createElementBlock:Re,createElementVNode:He,createHydrationRenderer:F1,createPropsRestProxy:VY,createRenderer:$1,createSlots:Ky,createStaticVNode:NY,createTextVNode:Pn,createVNode:N,defineAsyncComponent:oY,defineComponent:Te,defineEmits:BY,defineExpose:UY,defineProps:FY,get devtools(){return Hc},getCurrentInstance:mr,getTransitionRawChildren:Ag,guardReactiveProps:lo,h:Bl,handleError:tc,initCustomFormatter:jY,inject:bt,isMemoSame:Z1,isRuntimeOnly:PY,isVNode:yr,mergeDefaults:YY,mergeProps:$a,nextTick:en,onActivated:Dg,onBeforeMount:Vy,onBeforeUnmount:tn,onBeforeUpdate:qy,onDeactivated:Yy,onErrorCaptured:w1,onMounted:it,onRenderTracked:O1,onRenderTriggered:T1,onServerPrefetch:C1,onUnmounted:zi,onUpdated:Hi,openBlock:Se,popScopeId:g1,provide:$t,pushScopeId:m1,queuePostFlushCb:By,registerRuntimeCompiler:kY,renderList:On,renderSlot:ln,resolveComponent:Nl,resolveDirective:Ju,resolveDynamicComponent:iu,resolveFilter:XY,resolveTransitionHooks:Cu,setBlockTracking:_v,setDevtoolsHook:f1,setTransitionHooks:$l,ssrContextKey:Q1,ssrUtils:QY,toHandlers:I1,transformVNodeArgs:xY,useAttrs:zY,useSSRContext:X1,useSlots:HY,useTransitionState:Hy,version:J1,warn:F6,watch:ze,watchEffect:Ht,watchPostEffect:S1,watchSyncEffect:nY,withAsyncContext:qY,withCtx:kn,withDefaults:GY,withDirectives:ur,withMemo:WY,withScopeId:V6,Transition:Yi,TransitionGroup:e0,VueElement:Lg,createApp:MV,createSSRApp:kV,defineCustomElement:eM,defineSSRCustomElement:mV,hydrate:gM,initDirectivesForSSR:PV,render:Gl,useCssModule:hV,useCssVars:bV,vModelCheckbox:t0,vModelDynamic:uM,vModelRadio:n0,vModelSelect:lM,vModelText:Ul,vShow:Ya,withKeys:pM,withModifiers:li},Symbol.toStringTag,{value:"Module"}));var FV=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};FV.SENTRY_RELEASE={id:"3039e73e67633e0764bdf2169a1cdca9d01b94b0"};const BV="modulepreload",UV=function(e){return"/"+e},ER={},bM=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=UV(a),a in ER)return;ER[a]=!0;const d=a.endsWith(".css"),s=d?'[rel="stylesheet"]':"";if(!!r)for(let l=i.length-1;l>=0;l--){const c=i[l];if(c.href===a&&(!d||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const o=document.createElement("link");if(o.rel=d?"stylesheet":BV,d||(o.as="script",o.crossOrigin=""),o.href=a,document.head.appendChild(o),d)return new Promise((l,c)=>{o.addEventListener("load",l),o.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};var zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function GV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function HV(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var jt={exports:{}};/** +var D4=Object.defineProperty;var M4=(e,t,n)=>t in e?D4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Si=(e,t,n)=>(M4(e,typeof t!="symbol"?t+"":t,n),n);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1fb685fa-aca0-430d-947b-fef84adb50ab",e._sentryDebugIdIdentifier="sentry-dbid-1fb685fa-aca0-430d-947b-fef84adb50ab")}catch{}})();(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const d of a.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function vg(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const k4="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",P4=vg(k4);function Zn(e){if(ut(e)){const t={};for(let n=0;n{if(n){const r=n.split($4);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ct(e){let t="";if(Qn(e))t=e;else if(ut(e))for(let n=0;nHs(n,t))}const pt=e=>Qn(e)?e:e==null?"":ut(e)||$n(e)&&(e.toString===VD||!It(e.toString))?JSON.stringify(e,YD,2):String(e),YD=(e,t)=>t&&t.__v_isRef?YD(e,t.value):Jc(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:ec(t)?{[`Set(${t.size})`]:[...t.values()]}:$n(t)&&!ut(t)&&!qD(t)?String(t):t,An={},Zc=[],Do=()=>{},z4=()=>!1,Y4=/^on[^a-z]/,Zp=e=>Y4.test(e),Oy=e=>e.startsWith("onUpdate:"),ar=Object.assign,wy=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},V4=Object.prototype.hasOwnProperty,on=(e,t)=>V4.call(e,t),ut=Array.isArray,Jc=e=>Qu(e)==="[object Map]",ec=e=>Qu(e)==="[object Set]",Fw=e=>Qu(e)==="[object Date]",q4=e=>Qu(e)==="[object RegExp]",It=e=>typeof e=="function",Qn=e=>typeof e=="string",_p=e=>typeof e=="symbol",$n=e=>e!==null&&typeof e=="object",Ry=e=>$n(e)&&It(e.then)&&It(e.catch),VD=Object.prototype.toString,Qu=e=>VD.call(e),j4=e=>Qu(e).slice(8,-1),qD=e=>Qu(e)==="[object Object]",xy=e=>Qn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Hd=vg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yg=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W4=/-(\w)/g,Ci=yg(e=>e.replace(W4,(t,n)=>n?n.toUpperCase():"")),K4=/\B([A-Z])/g,uo=yg(e=>e.replace(K4,"-$1").toLowerCase()),Jp=yg(e=>e.charAt(0).toUpperCase()+e.slice(1)),zd=yg(e=>e?`on${Jp(e)}`:""),yu=(e,t)=>!Object.is(e,t),eu=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},xm=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Im=e=>{const t=Qn(e)?Number(e):NaN;return isNaN(t)?e:t};let Bw;const Q4=()=>Bw||(Bw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Pi;class Iy{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Pi,!t&&Pi&&(this.index=(Pi.scopes||(Pi.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Pi;try{return Pi=this,t()}finally{Pi=n}}}on(){Pi=this}off(){Pi=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},KD=e=>(e.w&zs)>0,QD=e=>(e.n&zs)>0,J4=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(l==="length"||l>=u)&&s.push(o)})}else switch(n!==void 0&&s.push(d.get(n)),t){case"add":ut(e)?xy(n)&&s.push(d.get("length")):(s.push(d.get(Rl)),Jc(e)&&s.push(d.get(ov)));break;case"delete":ut(e)||(s.push(d.get(Rl)),Jc(e)&&s.push(d.get(ov)));break;case"set":Jc(e)&&s.push(d.get(Rl));break}if(s.length===1)s[0]&&av(s[0]);else{const u=[];for(const o of s)o&&u.push(...o);av(Ny(u))}}function av(e,t){const n=ut(e)?e:[...e];for(const r of n)r.computed&&Gw(r);for(const r of n)r.computed||Gw(r)}function Gw(e,t){(e!==Io||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function r6(e,t){var n;return(n=Nm.get(e))===null||n===void 0?void 0:n.get(t)}const i6=vg("__proto__,__v_isRef,__isVue"),JD=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_p)),o6=Cg(),a6=Cg(!1,!0),s6=Cg(!0),l6=Cg(!0,!0),Hw=c6();function c6(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Dt(this);for(let a=0,d=this.length;a{e[t]=function(...n){Xu();const r=Dt(this)[t].apply(this,n);return Zu(),r}}),e}function u6(e){const t=Dt(this);return Ti(t,"has",e),t.hasOwnProperty(e)}function Cg(e=!1,t=!1){return function(r,i,a){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&a===(e?t?a1:o1:t?i1:r1).get(r))return r;const d=ut(r);if(!e){if(d&&on(Hw,i))return Reflect.get(Hw,i,a);if(i==="hasOwnProperty")return u6}const s=Reflect.get(r,i,a);return(_p(i)?JD.has(i):i6(i))||(e||Ti(r,"get",i),t)?s:Er(s)?d&&xy(i)?s:s.value:$n(s)?e?Dy(s):Kt(s):s}}const d6=e1(),p6=e1(!0);function e1(e=!1){return function(n,r,i,a){let d=n[r];if(Ll(d)&&Er(d)&&!Er(i))return!1;if(!e&&(!mp(i)&&!Ll(i)&&(d=Dt(d),i=Dt(i)),!ut(n)&&Er(d)&&!Er(i)))return d.value=i,!0;const s=ut(n)&&xy(r)?Number(r)e,Tg=e=>Reflect.getPrototypeOf(e);function i_(e,t,n=!1,r=!1){e=e.__v_raw;const i=Dt(e),a=Dt(t);n||(t!==a&&Ti(i,"get",t),Ti(i,"get",a));const{has:d}=Tg(i),s=r?Ay:n?Py:gp;if(d.call(i,t))return s(e.get(t));if(d.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function o_(e,t=!1){const n=this.__v_raw,r=Dt(n),i=Dt(e);return t||(e!==i&&Ti(r,"has",e),Ti(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function a_(e,t=!1){return e=e.__v_raw,!t&&Ti(Dt(e),"iterate",Rl),Reflect.get(e,"size",e)}function zw(e){e=Dt(e);const t=Dt(this);return Tg(t).has.call(t,e)||(t.add(e),za(t,"add",e,e)),this}function Yw(e,t){t=Dt(t);const n=Dt(this),{has:r,get:i}=Tg(n);let a=r.call(n,e);a||(e=Dt(e),a=r.call(n,e));const d=i.call(n,e);return n.set(e,t),a?yu(t,d)&&za(n,"set",e,t):za(n,"add",e,t),this}function Vw(e){const t=Dt(this),{has:n,get:r}=Tg(t);let i=n.call(t,e);i||(e=Dt(e),i=n.call(t,e)),r&&r.call(t,e);const a=t.delete(e);return i&&za(t,"delete",e,void 0),a}function qw(){const e=Dt(this),t=e.size!==0,n=e.clear();return t&&za(e,"clear",void 0,void 0),n}function s_(e,t){return function(r,i){const a=this,d=a.__v_raw,s=Dt(d),u=t?Ay:e?Py:gp;return!e&&Ti(s,"iterate",Rl),d.forEach((o,l)=>r.call(i,u(o),u(l),a))}}function l_(e,t,n){return function(...r){const i=this.__v_raw,a=Dt(i),d=Jc(a),s=e==="entries"||e===Symbol.iterator&&d,u=e==="keys"&&d,o=i[e](...r),l=n?Ay:t?Py:gp;return!t&&Ti(a,"iterate",u?ov:Rl),{next(){const{value:c,done:p}=o.next();return p?{value:c,done:p}:{value:s?[l(c[0]),l(c[1])]:l(c),done:p}},[Symbol.iterator](){return this}}}}function gs(e){return function(...t){return e==="delete"?!1:this}}function b6(){const e={get(a){return i_(this,a)},get size(){return a_(this)},has:o_,add:zw,set:Yw,delete:Vw,clear:qw,forEach:s_(!1,!1)},t={get(a){return i_(this,a,!1,!0)},get size(){return a_(this)},has:o_,add:zw,set:Yw,delete:Vw,clear:qw,forEach:s_(!1,!0)},n={get(a){return i_(this,a,!0)},get size(){return a_(this,!0)},has(a){return o_.call(this,a,!0)},add:gs("add"),set:gs("set"),delete:gs("delete"),clear:gs("clear"),forEach:s_(!0,!1)},r={get(a){return i_(this,a,!0,!0)},get size(){return a_(this,!0)},has(a){return o_.call(this,a,!0)},add:gs("add"),set:gs("set"),delete:gs("delete"),clear:gs("clear"),forEach:s_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=l_(a,!1,!1),n[a]=l_(a,!0,!1),t[a]=l_(a,!1,!0),r[a]=l_(a,!0,!0)}),[e,n,t,r]}const[S6,v6,E6,y6]=b6();function Og(e,t){const n=t?e?y6:E6:e?v6:S6;return(r,i,a)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(on(n,i)&&i in r?n:r,i,a)}const C6={get:Og(!1,!1)},T6={get:Og(!1,!0)},O6={get:Og(!0,!1)},w6={get:Og(!0,!0)},r1=new WeakMap,i1=new WeakMap,o1=new WeakMap,a1=new WeakMap;function R6(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function x6(e){return e.__v_skip||!Object.isExtensible(e)?0:R6(j4(e))}function Kt(e){return Ll(e)?e:wg(e,!1,t1,C6,r1)}function s1(e){return wg(e,!1,g6,T6,i1)}function Dy(e){return wg(e,!0,n1,O6,o1)}function I6(e){return wg(e,!0,h6,w6,a1)}function wg(e,t,n,r,i){if(!$n(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const d=x6(e);if(d===0)return e;const s=new Proxy(e,d===2?r:n);return i.set(e,s),s}function xl(e){return Ll(e)?xl(e.__v_raw):!!(e&&e.__v_isReactive)}function Ll(e){return!!(e&&e.__v_isReadonly)}function mp(e){return!!(e&&e.__v_isShallow)}function My(e){return xl(e)||Ll(e)}function Dt(e){const t=e&&e.__v_raw;return t?Dt(t):e}function ky(e){return Rm(e,"__v_skip",!0),e}const gp=e=>$n(e)?Kt(e):e,Py=e=>$n(e)?Dy(e):e;function Ly(e){Ps&&Io&&(e=Dt(e),ZD(e.dep||(e.dep=Ny())))}function Rg(e,t){e=Dt(e);const n=e.dep;n&&av(n)}function Er(e){return!!(e&&e.__v_isRef===!0)}function ke(e){return l1(e,!1)}function Ie(e){return l1(e,!0)}function l1(e,t){return Er(e)?e:new N6(e,t)}class N6{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Dt(t),this._value=n?t:gp(t)}get value(){return Ly(this),this._value}set value(t){const n=this.__v_isShallow||mp(t)||Ll(t);t=n?t:Dt(t),yu(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:gp(t),Rg(this))}}function A6(e){Rg(e)}function Ve(e){return Er(e)?e.value:e}const D6={get:(e,t,n)=>Ve(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Er(i)&&!Er(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $y(e){return xl(e)?e:new Proxy(e,D6)}class M6{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Ly(this),()=>Rg(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function k6(e){return new M6(e)}function tu(e){const t=ut(e)?new Array(e.length):{};for(const n in e)t[n]=cn(e,n);return t}class P6{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return r6(Dt(this._object),this._key)}}function cn(e,t,n){const r=e[t];return Er(r)?r:new P6(e,t,n)}var c1;class L6{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[c1]=!1,this._dirty=!0,this.effect=new ef(t,()=>{this._dirty||(this._dirty=!0,Rg(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=Dt(this);return Ly(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}c1="__v_isReadonly";function $6(e,t,n=!1){let r,i;const a=It(e);return a?(r=e,i=Do):(r=e.get,i=e.set),new L6(r,i,a||!i,n)}function F6(e,...t){}function B6(e,t){}function Ua(e,t,n,r){let i;try{i=r?e(...r):e()}catch(a){tc(a,t,n)}return i}function Fi(e,t,n,r){if(It(e)){const a=Ua(e,t,n,r);return a&&Ry(a)&&a.catch(d=>{tc(d,t,n)}),a}const i=[];for(let a=0;a>>1;bp(Jr[r])Zo&&Jr.splice(t,1)}function By(e){ut(e)?nu.push(...e):(!Oa||!Oa.includes(e,e.allowRecurse?hl+1:hl))&&nu.push(e),d1()}function jw(e,t=hp?Zo+1:0){for(;tbp(n)-bp(r)),hl=0;hle.id==null?1/0:e.id,z6=(e,t)=>{const n=bp(e)-bp(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function p1(e){sv=!1,hp=!0,Jr.sort(z6);const t=Do;try{for(Zo=0;ZoHc.emit(i,...a)),c_=[]):typeof window<"u"&&window.HTMLElement&&!(!((r=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{f1(a,t)}),setTimeout(()=>{Hc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,c_=[])},3e3)):c_=[]}function Y6(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||An;let i=n;const a=t.startsWith("update:"),d=a&&t.slice(7);if(d&&d in r){const l=`${d==="modelValue"?"model":d}Modifiers`,{number:c,trim:p}=r[l]||An;p&&(i=n.map(f=>Qn(f)?f.trim():f)),c&&(i=n.map(xm))}let s,u=r[s=zd(t)]||r[s=zd(Ci(t))];!u&&a&&(u=r[s=zd(uo(t))]),u&&Fi(u,e,6,i);const o=r[s+"Once"];if(o){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Fi(o,e,6,i)}}function _1(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const a=e.emits;let d={},s=!1;if(!It(e)){const u=o=>{const l=_1(o,t,!0);l&&(s=!0,ar(d,l))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!a&&!s?($n(e)&&r.set(e,null),null):(ut(a)?a.forEach(u=>d[u]=null):ar(d,a),$n(e)&&r.set(e,d),d)}function Ig(e,t){return!e||!Zp(t)?!1:(t=t.slice(2).replace(/Once$/,""),on(e,t[0].toLowerCase()+t.slice(1))||on(e,uo(t))||on(e,t))}let Ur=null,Ng=null;function Sp(e){const t=Ur;return Ur=e,Ng=e&&e.type.__scopeId||null,t}function m1(e){Ng=e}function g1(){Ng=null}const V6=e=>kn;function kn(e,t=Ur,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&_v(-1);const a=Sp(t);let d;try{d=e(...i)}finally{Sp(a),r._d&&_v(1)}return d};return r._n=!0,r._c=!0,r._d=!0,r}function sm(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:a,propsOptions:[d],slots:s,attrs:u,emit:o,render:l,renderCache:c,data:p,setupState:f,ctx:m,inheritAttrs:g}=e;let h,b;const v=Sp(e);try{if(n.shapeFlag&4){const y=i||r;h=Li(l.call(y,y,c,a,f,p,m)),b=u}else{const y=t;h=Li(y.length>1?y(a,{attrs:u,slots:s,emit:o}):y(a,null)),b=t.props?u:j6(u)}}catch(y){qd.length=0,tc(y,e,1),h=N(Hr)}let E=h;if(b&&g!==!1){const y=Object.keys(b),{shapeFlag:T}=E;y.length&&T&7&&(d&&y.some(Oy)&&(b=W6(b,d)),E=fi(E,b))}return n.dirs&&(E=fi(E),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition&&(E.transition=n.transition),h=E,Sp(v),h}function q6(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||Zp(n))&&((t||(t={}))[n]=e[n]);return t},W6=(e,t)=>{const n={};for(const r in e)(!Oy(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function K6(e,t,n){const{props:r,children:i,component:a}=e,{props:d,children:s,patchFlag:u}=t,o=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return r?Ww(r,d,o):!!d;if(u&8){const l=t.dynamicProps;for(let c=0;ce.__isSuspense,Q6={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,a,d,s,u,o){e==null?Z6(t,n,r,i,a,d,s,u,o):J6(e,t,n,r,i,d,s,u,o)},hydrate:eY,create:Gy,normalize:tY},X6=Q6;function vp(e,t){const n=e.props&&e.props[t];It(n)&&n()}function Z6(e,t,n,r,i,a,d,s,u){const{p:o,o:{createElement:l}}=u,c=l("div"),p=e.suspense=Gy(e,i,r,t,c,n,a,d,s,u);o(null,p.pendingBranch=e.ssContent,c,null,r,p,a,d),p.deps>0?(vp(e,"onPending"),vp(e,"onFallback"),o(null,e.ssFallback,t,n,r,null,a,d),ru(p,e.ssFallback)):p.resolve()}function J6(e,t,n,r,i,a,d,s,{p:u,um:o,o:{createElement:l}}){const c=t.suspense=e.suspense;c.vnode=t,t.el=e.el;const p=t.ssContent,f=t.ssFallback,{activeBranch:m,pendingBranch:g,isInFallback:h,isHydrating:b}=c;if(g)c.pendingBranch=p,No(p,g)?(u(g,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0?c.resolve():h&&(u(m,f,n,r,i,null,a,d,s),ru(c,f))):(c.pendingId++,b?(c.isHydrating=!1,c.activeBranch=g):o(g,i,c),c.deps=0,c.effects.length=0,c.hiddenContainer=l("div"),h?(u(null,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0?c.resolve():(u(m,f,n,r,i,null,a,d,s),ru(c,f))):m&&No(p,m)?(u(m,p,n,r,i,c,a,d,s),c.resolve(!0)):(u(null,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0&&c.resolve()));else if(m&&No(p,m))u(m,p,n,r,i,c,a,d,s),ru(c,p);else if(vp(t,"onPending"),c.pendingBranch=p,c.pendingId++,u(null,p,c.hiddenContainer,null,i,c,a,d,s),c.deps<=0)c.resolve();else{const{timeout:v,pendingId:E}=c;v>0?setTimeout(()=>{c.pendingId===E&&c.fallback(f)},v):v===0&&c.fallback(f)}}function Gy(e,t,n,r,i,a,d,s,u,o,l=!1){const{p:c,m:p,um:f,n:m,o:{parentNode:g,remove:h}}=o,b=e.props?Im(e.props.timeout):void 0,v={vnode:e,parent:t,parentComponent:n,isSVG:d,container:r,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:l,isUnmounted:!1,effects:[],resolve(E=!1){const{vnode:y,activeBranch:T,pendingBranch:O,pendingId:C,effects:R,parentComponent:x,container:I}=v;if(v.isHydrating)v.isHydrating=!1;else if(!E){const A=T&&O.transition&&O.transition.mode==="out-in";A&&(T.transition.afterLeave=()=>{C===v.pendingId&&p(O,I,D,0)});let{anchor:D}=v;T&&(D=m(T),f(T,x,v,!0)),A||p(O,I,D,0)}ru(v,O),v.pendingBranch=null,v.isInFallback=!1;let k=v.parent,L=!1;for(;k;){if(k.pendingBranch){k.effects.push(...R),L=!0;break}k=k.parent}L||By(R),v.effects=[],vp(y,"onResolve")},fallback(E){if(!v.pendingBranch)return;const{vnode:y,activeBranch:T,parentComponent:O,container:C,isSVG:R}=v;vp(y,"onFallback");const x=m(T),I=()=>{!v.isInFallback||(c(null,E,C,x,O,null,R,s,u),ru(v,E))},k=E.transition&&E.transition.mode==="out-in";k&&(T.transition.afterLeave=I),v.isInFallback=!0,f(T,O,null,!0),k||I()},move(E,y,T){v.activeBranch&&p(v.activeBranch,E,y,T),v.container=E},next(){return v.activeBranch&&m(v.activeBranch)},registerDep(E,y){const T=!!v.pendingBranch;T&&v.deps++;const O=E.vnode.el;E.asyncDep.catch(C=>{tc(C,E,0)}).then(C=>{if(E.isUnmounted||v.isUnmounted||v.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:R}=E;mv(E,C,!1),O&&(R.el=O);const x=!O&&E.subTree.el;y(E,R,g(O||E.subTree.el),O?null:m(E.subTree),v,d,u),x&&h(x),Uy(E,R.el),T&&--v.deps===0&&v.resolve()})},unmount(E,y){v.isUnmounted=!0,v.activeBranch&&f(v.activeBranch,n,E,y),v.pendingBranch&&f(v.pendingBranch,n,E,y)}};return v}function eY(e,t,n,r,i,a,d,s,u){const o=t.suspense=Gy(t,r,n,e.parentNode,document.createElement("div"),null,i,a,d,s,!0),l=u(e,o.pendingBranch=t.ssContent,n,o,a,d);return o.deps===0&&o.resolve(),l}function tY(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Kw(r?n.default:n),e.ssFallback=r?Kw(n.fallback):N(Hr)}function Kw(e){let t;if(It(e)){const n=Fl&&e._c;n&&(e._d=!1,Se()),e=e(),n&&(e._d=!0,t=yi,G1())}return ut(e)&&(e=q6(e)),e=Li(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function b1(e,t){t&&t.pendingBranch?ut(e)?t.effects.push(...e):t.effects.push(e):By(e)}function ru(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,i=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=i,Uy(r,i))}function $t(e,t){if(ir){let n=ir.provides;const r=ir.parent&&ir.parent.provides;r===n&&(n=ir.provides=Object.create(r)),n[e]=t}}function bt(e,t,n=!1){const r=ir||Ur;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&It(t)?t.call(r.proxy):t}}function Ht(e,t){return tf(e,null,t)}function S1(e,t){return tf(e,null,{flush:"post"})}function nY(e,t){return tf(e,null,{flush:"sync"})}const u_={};function ze(e,t,n){return tf(e,t,n)}function tf(e,t,{immediate:n,deep:r,flush:i,onTrack:a,onTrigger:d}=An){const s=WD()===(ir==null?void 0:ir.scope)?ir:null;let u,o=!1,l=!1;if(Er(e)?(u=()=>e.value,o=mp(e)):xl(e)?(u=()=>e,r=!0):ut(e)?(l=!0,o=e.some(E=>xl(E)||mp(E)),u=()=>e.map(E=>{if(Er(E))return E.value;if(xl(E))return Tl(E);if(It(E))return Ua(E,s,2)})):It(e)?t?u=()=>Ua(e,s,2):u=()=>{if(!(s&&s.isUnmounted))return c&&c(),Fi(e,s,3,[p])}:u=Do,t&&r){const E=u;u=()=>Tl(E())}let c,p=E=>{c=b.onStop=()=>{Ua(E,s,4)}},f;if(Tu)if(p=Do,t?n&&Fi(t,s,3,[u(),l?[]:void 0,p]):u(),i==="sync"){const E=X1();f=E.__watcherHandles||(E.__watcherHandles=[])}else return Do;let m=l?new Array(e.length).fill(u_):u_;const g=()=>{if(!!b.active)if(t){const E=b.run();(r||o||(l?E.some((y,T)=>yu(y,m[T])):yu(E,m)))&&(c&&c(),Fi(t,s,3,[E,m===u_?void 0:l&&m[0]===u_?[]:m,p]),m=E)}else b.run()};g.allowRecurse=!!t;let h;i==="sync"?h=g:i==="post"?h=()=>Br(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),h=()=>xg(g));const b=new ef(u,h);t?n?g():m=b.run():i==="post"?Br(b.run.bind(b),s&&s.suspense):b.run();const v=()=>{b.stop(),s&&s.scope&&wy(s.scope.effects,b)};return f&&f.push(v),v}function rY(e,t,n){const r=this.proxy,i=Qn(e)?e.includes(".")?v1(r,e):()=>r[e]:e.bind(r,r);let a;It(t)?a=t:(a=t.handler,n=t);const d=ir;Ys(this);const s=tf(i,a.bind(r),n);return d?Ys(d):Ls(),s}function v1(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Tl(n,t)});else if(qD(e))for(const n in e)Tl(e[n],t);return e}function Hy(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return it(()=>{e.isMounted=!0}),tn(()=>{e.isUnmounting=!0}),e}const ro=[Function,Array],iY={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ro,onEnter:ro,onAfterEnter:ro,onEnterCancelled:ro,onBeforeLeave:ro,onLeave:ro,onAfterLeave:ro,onLeaveCancelled:ro,onBeforeAppear:ro,onAppear:ro,onAfterAppear:ro,onAppearCancelled:ro},setup(e,{slots:t}){const n=mr(),r=Hy();let i;return()=>{const a=t.default&&Ag(t.default(),!0);if(!a||!a.length)return;let d=a[0];if(a.length>1){for(const g of a)if(g.type!==Hr){d=g;break}}const s=Dt(e),{mode:u}=s;if(r.isLeaving)return Bb(d);const o=Qw(d);if(!o)return Bb(d);const l=Cu(o,s,r,n);$l(o,l);const c=n.subTree,p=c&&Qw(c);let f=!1;const{getTransitionKey:m}=o.type;if(m){const g=m();i===void 0?i=g:g!==i&&(i=g,f=!0)}if(p&&p.type!==Hr&&(!No(o,p)||f)){const g=Cu(p,s,r,n);if($l(p,g),u==="out-in")return r.isLeaving=!0,g.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},Bb(d);u==="in-out"&&o.type!==Hr&&(g.delayLeave=(h,b,v)=>{const E=E1(r,p);E[String(p.key)]=p,h._leaveCb=()=>{b(),h._leaveCb=void 0,delete l.delayedLeave},l.delayedLeave=v})}return d}}},zy=iY;function E1(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Cu(e,t,n,r){const{appear:i,mode:a,persisted:d=!1,onBeforeEnter:s,onEnter:u,onAfterEnter:o,onEnterCancelled:l,onBeforeLeave:c,onLeave:p,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:g,onAppear:h,onAfterAppear:b,onAppearCancelled:v}=t,E=String(e.key),y=E1(n,e),T=(R,x)=>{R&&Fi(R,r,9,x)},O=(R,x)=>{const I=x[1];T(R,x),ut(R)?R.every(k=>k.length<=1)&&I():R.length<=1&&I()},C={mode:a,persisted:d,beforeEnter(R){let x=s;if(!n.isMounted)if(i)x=g||s;else return;R._leaveCb&&R._leaveCb(!0);const I=y[E];I&&No(e,I)&&I.el._leaveCb&&I.el._leaveCb(),T(x,[R])},enter(R){let x=u,I=o,k=l;if(!n.isMounted)if(i)x=h||u,I=b||o,k=v||l;else return;let L=!1;const A=R._enterCb=D=>{L||(L=!0,D?T(k,[R]):T(I,[R]),C.delayedLeave&&C.delayedLeave(),R._enterCb=void 0)};x?O(x,[R,A]):A()},leave(R,x){const I=String(e.key);if(R._enterCb&&R._enterCb(!0),n.isUnmounting)return x();T(c,[R]);let k=!1;const L=R._leaveCb=A=>{k||(k=!0,x(),A?T(m,[R]):T(f,[R]),R._leaveCb=void 0,y[I]===e&&delete y[I])};y[I]=e,p?O(p,[R,L]):L()},clone(R){return Cu(R,t,n,r)}};return C}function Bb(e){if(nf(e))return e=fi(e),e.children=null,e}function Qw(e){return nf(e)?e.children?e.children[0]:void 0:e}function $l(e,t){e.shapeFlag&6&&e.component?$l(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ag(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader;function oY(e){It(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,timeout:a,suspensible:d=!0,onError:s}=e;let u=null,o,l=0;const c=()=>(l++,u=null,p()),p=()=>{let f;return u||(f=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),s)return new Promise((g,h)=>{s(m,()=>g(c()),()=>h(m),l+1)});throw m}).then(m=>f!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),o=m,m)))};return Te({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return o},setup(){const f=ir;if(o)return()=>Ub(o,f);const m=v=>{u=null,tc(v,f,13,!r)};if(d&&f.suspense||Tu)return p().then(v=>()=>Ub(v,f)).catch(v=>(m(v),()=>r?N(r,{error:v}):null));const g=ke(!1),h=ke(),b=ke(!!i);return i&&setTimeout(()=>{b.value=!1},i),a!=null&&setTimeout(()=>{if(!g.value&&!h.value){const v=new Error(`Async component timed out after ${a}ms.`);m(v),h.value=v}},a),p().then(()=>{g.value=!0,f.parent&&nf(f.parent.vnode)&&xg(f.parent.update)}).catch(v=>{m(v),h.value=v}),()=>{if(g.value&&o)return Ub(o,f);if(h.value&&r)return N(r,{error:h.value});if(n&&!b.value)return N(n)}}})}function Ub(e,t){const{ref:n,props:r,children:i,ce:a}=t.vnode,d=N(e,r,i);return d.ref=n,d.ce=a,delete t.vnode.ce,d}const nf=e=>e.type.__isKeepAlive,aY={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=mr(),r=n.ctx;if(!r.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const i=new Map,a=new Set;let d=null;const s=n.suspense,{renderer:{p:u,m:o,um:l,o:{createElement:c}}}=r,p=c("div");r.activate=(v,E,y,T,O)=>{const C=v.component;o(v,E,y,0,s),u(C.vnode,v,E,y,C,s,T,v.slotScopeIds,O),Br(()=>{C.isDeactivated=!1,C.a&&eu(C.a);const R=v.props&&v.props.onVnodeMounted;R&&vi(R,C.parent,v)},s)},r.deactivate=v=>{const E=v.component;o(v,p,null,1,s),Br(()=>{E.da&&eu(E.da);const y=v.props&&v.props.onVnodeUnmounted;y&&vi(y,E.parent,v),E.isDeactivated=!0},s)};function f(v){Gb(v),l(v,n,s,!0)}function m(v){i.forEach((E,y)=>{const T=hv(E.type);T&&(!v||!v(T))&&g(y)})}function g(v){const E=i.get(v);!d||!No(E,d)?f(E):d&&Gb(d),i.delete(v),a.delete(v)}ze(()=>[e.include,e.exclude],([v,E])=>{v&&m(y=>Ld(v,y)),E&&m(y=>!Ld(E,y))},{flush:"post",deep:!0});let h=null;const b=()=>{h!=null&&i.set(h,Hb(n.subTree))};return it(b),Hi(b),tn(()=>{i.forEach(v=>{const{subTree:E,suspense:y}=n,T=Hb(E);if(v.type===T.type&&v.key===T.key){Gb(T);const O=T.component.da;O&&Br(O,y);return}f(v)})}),()=>{if(h=null,!t.default)return null;const v=t.default(),E=v[0];if(v.length>1)return d=null,v;if(!yr(E)||!(E.shapeFlag&4)&&!(E.shapeFlag&128))return d=null,E;let y=Hb(E);const T=y.type,O=hv(Il(y)?y.type.__asyncResolved||{}:T),{include:C,exclude:R,max:x}=e;if(C&&(!O||!Ld(C,O))||R&&O&&Ld(R,O))return d=y,E;const I=y.key==null?T:y.key,k=i.get(I);return y.el&&(y=fi(y),E.shapeFlag&128&&(E.ssContent=y)),h=I,k?(y.el=k.el,y.component=k.component,y.transition&&$l(y,y.transition),y.shapeFlag|=512,a.delete(I),a.add(I)):(a.add(I),x&&a.size>parseInt(x,10)&&g(a.values().next().value)),y.shapeFlag|=256,d=y,h1(E.type)?E:y}}},sY=aY;function Ld(e,t){return ut(e)?e.some(n=>Ld(n,t)):Qn(e)?e.split(",").includes(t):q4(e)?e.test(t):!1}function Dg(e,t){y1(e,"a",t)}function Yy(e,t){y1(e,"da",t)}function y1(e,t,n=ir){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Mg(t,r,n),n){let i=n.parent;for(;i&&i.parent;)nf(i.parent.vnode)&&lY(r,t,n,i),i=i.parent}}function lY(e,t,n,r){const i=Mg(t,e,r,!0);zi(()=>{wy(r[t],i)},n)}function Gb(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Hb(e){return e.shapeFlag&128?e.ssContent:e}function Mg(e,t,n=ir,r=!1){if(n){const i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...d)=>{if(n.isUnmounted)return;Xu(),Ys(n);const s=Fi(t,n,e,d);return Ls(),Zu(),s});return r?i.unshift(a):i.push(a),a}}const Ka=e=>(t,n=ir)=>(!Tu||e==="sp")&&Mg(e,(...r)=>t(...r),n),Vy=Ka("bm"),it=Ka("m"),qy=Ka("bu"),Hi=Ka("u"),tn=Ka("bum"),zi=Ka("um"),C1=Ka("sp"),T1=Ka("rtg"),O1=Ka("rtc");function w1(e,t=ir){Mg("ec",e,t)}function ur(e,t){const n=Ur;if(n===null)return e;const r=Pg(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let a=0;at(d,s,void 0,a&&a[s]));else{const d=Object.keys(e);i=new Array(d.length);for(let s=0,u=d.length;s{const a=r.fn(...i);return a&&(a.key=r.key),a}:r.fn)}return e}function ln(e,t,n={},r,i){if(Ur.isCE||Ur.parent&&Il(Ur.parent)&&Ur.parent.isCE)return t!=="default"&&(n.name=t),N("slot",n,r&&r());let a=e[t];a&&a._c&&(a._d=!1),Se();const d=a&&x1(a(n)),s=Vn(Xe,{key:n.key||d&&d.key||`_${t}`},d||(r?r():[]),d&&e._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),a&&a._c&&(a._d=!0),s}function x1(e){return e.some(t=>yr(t)?!(t.type===Hr||t.type===Xe&&!x1(t.children)):!0)?e:null}function I1(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:zd(r)]=e[r];return n}const lv=e=>e?V1(e)?Pg(e)||e.proxy:lv(e.parent):null,Yd=ar(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lv(e.parent),$root:e=>lv(e.root),$emit:e=>e.emit,$options:e=>Qy(e),$forceUpdate:e=>e.f||(e.f=()=>xg(e.update)),$nextTick:e=>e.n||(e.n=en.bind(e.proxy)),$watch:e=>rY.bind(e)}),zb=(e,t)=>e!==An&&!e.__isScriptSetup&&on(e,t),cv={get({_:e},t){const{ctx:n,setupState:r,data:i,props:a,accessCache:d,type:s,appContext:u}=e;let o;if(t[0]!=="$"){const f=d[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else{if(zb(r,t))return d[t]=1,r[t];if(i!==An&&on(i,t))return d[t]=2,i[t];if((o=e.propsOptions[0])&&on(o,t))return d[t]=3,a[t];if(n!==An&&on(n,t))return d[t]=4,n[t];uv&&(d[t]=0)}}const l=Yd[t];let c,p;if(l)return t==="$attrs"&&Ti(e,"get",t),l(e);if((c=s.__cssModules)&&(c=c[t]))return c;if(n!==An&&on(n,t))return d[t]=4,n[t];if(p=u.config.globalProperties,on(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:a}=e;return zb(i,t)?(i[t]=n,!0):r!==An&&on(r,t)?(r[t]=n,!0):on(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},d){let s;return!!n[d]||e!==An&&on(e,d)||zb(t,d)||(s=a[0])&&on(s,d)||on(r,d)||on(Yd,d)||on(i.config.globalProperties,d)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:on(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},uY=ar({},cv,{get(e,t){if(t!==Symbol.unscopables)return cv.get(e,t,e)},has(e,t){return t[0]!=="_"&&!P4(t)}});let uv=!0;function dY(e){const t=Qy(e),n=e.proxy,r=e.ctx;uv=!1,t.beforeCreate&&Zw(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:d,watch:s,provide:u,inject:o,created:l,beforeMount:c,mounted:p,beforeUpdate:f,updated:m,activated:g,deactivated:h,beforeDestroy:b,beforeUnmount:v,destroyed:E,unmounted:y,render:T,renderTracked:O,renderTriggered:C,errorCaptured:R,serverPrefetch:x,expose:I,inheritAttrs:k,components:L,directives:A,filters:D}=t;if(o&&pY(o,r,null,e.appContext.config.unwrapInjectedRef),d)for(const z in d){const H=d[z];It(H)&&(r[z]=H.bind(n))}if(i){const z=i.call(n,n);$n(z)&&(e.data=Kt(z))}if(uv=!0,a)for(const z in a){const H=a[z],V=It(H)?H.bind(n,n):It(H.get)?H.get.bind(n,n):Do,W=!It(H)&&It(H.set)?H.set.bind(n):Do,te=B({get:V,set:W});Object.defineProperty(r,z,{enumerable:!0,configurable:!0,get:()=>te.value,set:X=>te.value=X})}if(s)for(const z in s)N1(s[z],r,n,z);if(u){const z=It(u)?u.call(n):u;Reflect.ownKeys(z).forEach(H=>{$t(H,z[H])})}l&&Zw(l,e,"c");function F(z,H){ut(H)?H.forEach(V=>z(V.bind(n))):H&&z(H.bind(n))}if(F(Vy,c),F(it,p),F(qy,f),F(Hi,m),F(Dg,g),F(Yy,h),F(w1,R),F(O1,O),F(T1,C),F(tn,v),F(zi,y),F(C1,x),ut(I))if(I.length){const z=e.exposed||(e.exposed={});I.forEach(H=>{Object.defineProperty(z,H,{get:()=>n[H],set:V=>n[H]=V})})}else e.exposed||(e.exposed={});T&&e.render===Do&&(e.render=T),k!=null&&(e.inheritAttrs=k),L&&(e.components=L),A&&(e.directives=A)}function pY(e,t,n=Do,r=!1){ut(e)&&(e=dv(e));for(const i in e){const a=e[i];let d;$n(a)?"default"in a?d=bt(a.from||i,a.default,!0):d=bt(a.from||i):d=bt(a),Er(d)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>d.value,set:s=>d.value=s}):t[i]=d}}function Zw(e,t,n){Fi(ut(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function N1(e,t,n,r){const i=r.includes(".")?v1(n,r):()=>n[r];if(Qn(e)){const a=t[e];It(a)&&ze(i,a)}else if(It(e))ze(i,e.bind(n));else if($n(e))if(ut(e))e.forEach(a=>N1(a,t,n,r));else{const a=It(e.handler)?e.handler.bind(n):t[e.handler];It(a)&&ze(i,a,e)}}function Qy(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:d}}=e.appContext,s=a.get(t);let u;return s?u=s:!i.length&&!n&&!r?u=t:(u={},i.length&&i.forEach(o=>Dm(u,o,d,!0)),Dm(u,t,d)),$n(t)&&a.set(t,u),u}function Dm(e,t,n,r=!1){const{mixins:i,extends:a}=t;a&&Dm(e,a,n,!0),i&&i.forEach(d=>Dm(e,d,n,!0));for(const d in t)if(!(r&&d==="expose")){const s=fY[d]||n&&n[d];e[d]=s?s(e[d],t[d]):t[d]}return e}const fY={data:Jw,props:_l,emits:_l,methods:_l,computed:_l,beforeCreate:ai,created:ai,beforeMount:ai,mounted:ai,beforeUpdate:ai,updated:ai,beforeDestroy:ai,beforeUnmount:ai,destroyed:ai,unmounted:ai,activated:ai,deactivated:ai,errorCaptured:ai,serverPrefetch:ai,components:_l,directives:_l,watch:mY,provide:Jw,inject:_Y};function Jw(e,t){return t?e?function(){return ar(It(e)?e.call(this,this):e,It(t)?t.call(this,this):t)}:t:e}function _Y(e,t){return _l(dv(e),dv(t))}function dv(e){if(ut(e)){const t={};for(let n=0;n0)&&!(d&16)){if(d&8){const l=e.vnode.dynamicProps;for(let c=0;c{u=!0;const[p,f]=D1(c,t,!0);ar(d,p),f&&s.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}if(!a&&!u)return $n(e)&&r.set(e,Zc),Zc;if(ut(a))for(let l=0;l-1,f[1]=g<0||m-1||on(f,"default"))&&s.push(c)}}}const o=[d,s];return $n(e)&&r.set(e,o),o}function eR(e){return e[0]!=="$"}function tR(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function nR(e,t){return tR(e)===tR(t)}function rR(e,t){return ut(t)?t.findIndex(n=>nR(n,e)):It(t)&&nR(t,e)?0:-1}const M1=e=>e[0]==="_"||e==="$stable",Xy=e=>ut(e)?e.map(Li):[Li(e)],bY=(e,t,n)=>{if(t._n)return t;const r=kn((...i)=>Xy(t(...i)),n);return r._c=!1,r},k1=(e,t,n)=>{const r=e._ctx;for(const i in e){if(M1(i))continue;const a=e[i];if(It(a))t[i]=bY(i,a,r);else if(a!=null){const d=Xy(a);t[i]=()=>d}}},P1=(e,t)=>{const n=Xy(t);e.slots.default=()=>n},SY=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Dt(t),Rm(t,"_",n)):k1(t,e.slots={})}else e.slots={},t&&P1(e,t);Rm(e.slots,kg,1)},vY=(e,t,n)=>{const{vnode:r,slots:i}=e;let a=!0,d=An;if(r.shapeFlag&32){const s=t._;s?n&&s===1?a=!1:(ar(i,t),!n&&s===1&&delete i._):(a=!t.$stable,k1(t,i)),d=t}else t&&(P1(e,t),d={default:1});if(a)for(const s in i)!M1(s)&&!(s in d)&&delete i[s]};function L1(){return{app:null,config:{isNativeTag:z4,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let EY=0;function yY(e,t){return function(r,i=null){It(r)||(r=Object.assign({},r)),i!=null&&!$n(i)&&(i=null);const a=L1(),d=new Set;let s=!1;const u=a.app={_uid:EY++,_component:r,_props:i,_container:null,_context:a,_instance:null,version:J1,get config(){return a.config},set config(o){},use(o,...l){return d.has(o)||(o&&It(o.install)?(d.add(o),o.install(u,...l)):It(o)&&(d.add(o),o(u,...l))),u},mixin(o){return a.mixins.includes(o)||a.mixins.push(o),u},component(o,l){return l?(a.components[o]=l,u):a.components[o]},directive(o,l){return l?(a.directives[o]=l,u):a.directives[o]},mount(o,l,c){if(!s){const p=N(r,i);return p.appContext=a,l&&t?t(p,o):e(p,o,c),s=!0,u._container=o,o.__vue_app__=u,Pg(p.component)||p.component.proxy}},unmount(){s&&(e(null,u._container),delete u._container.__vue_app__)},provide(o,l){return a.provides[o]=l,u}};return u}}function Mm(e,t,n,r,i=!1){if(ut(e)){e.forEach((p,f)=>Mm(p,t&&(ut(t)?t[f]:t),n,r,i));return}if(Il(r)&&!i)return;const a=r.shapeFlag&4?Pg(r.component)||r.component.proxy:r.el,d=i?null:a,{i:s,r:u}=e,o=t&&t.r,l=s.refs===An?s.refs={}:s.refs,c=s.setupState;if(o!=null&&o!==u&&(Qn(o)?(l[o]=null,on(c,o)&&(c[o]=null)):Er(o)&&(o.value=null)),It(u))Ua(u,s,12,[d,l]);else{const p=Qn(u),f=Er(u);if(p||f){const m=()=>{if(e.f){const g=p?on(c,u)?c[u]:l[u]:u.value;i?ut(g)&&wy(g,a):ut(g)?g.includes(a)||g.push(a):p?(l[u]=[a],on(c,u)&&(c[u]=l[u])):(u.value=[a],e.k&&(l[e.k]=u.value))}else p?(l[u]=d,on(c,u)&&(c[u]=d)):f&&(u.value=d,e.k&&(l[e.k]=d))};d?(m.id=-1,Br(m,n)):m()}}}let hs=!1;const d_=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",p_=e=>e.nodeType===8;function CY(e){const{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:d,remove:s,insert:u,createComment:o}}=e,l=(b,v)=>{if(!v.hasChildNodes()){n(null,b,v),Am(),v._vnode=b;return}hs=!1,c(v.firstChild,b,null,null,null),Am(),v._vnode=b,hs&&console.error("Hydration completed but contains mismatches.")},c=(b,v,E,y,T,O=!1)=>{const C=p_(b)&&b.data==="[",R=()=>g(b,v,E,y,T,C),{type:x,ref:I,shapeFlag:k,patchFlag:L}=v;let A=b.nodeType;v.el=b,L===-2&&(O=!1,v.dynamicChildren=null);let D=null;switch(x){case ta:A!==3?v.children===""?(u(v.el=i(""),d(b),b),D=b):D=R():(b.data!==v.children&&(hs=!0,b.data=v.children),D=a(b));break;case Hr:A!==8||C?D=R():D=a(b);break;case Al:if(C&&(b=a(b),A=b.nodeType),A===1||A===3){D=b;const $=!v.children.length;for(let F=0;F{O=O||!!v.dynamicChildren;const{type:C,props:R,patchFlag:x,shapeFlag:I,dirs:k}=v,L=C==="input"&&k||C==="option";if(L||x!==-1){if(k&&Qo(v,null,E,"created"),R)if(L||!O||x&48)for(const D in R)(L&&D.endsWith("value")||Zp(D)&&!Hd(D))&&r(b,D,null,R[D],!1,void 0,E);else R.onClick&&r(b,"onClick",null,R.onClick,!1,void 0,E);let A;if((A=R&&R.onVnodeBeforeMount)&&vi(A,E,v),k&&Qo(v,null,E,"beforeMount"),((A=R&&R.onVnodeMounted)||k)&&b1(()=>{A&&vi(A,E,v),k&&Qo(v,null,E,"mounted")},y),I&16&&!(R&&(R.innerHTML||R.textContent))){let D=f(b.firstChild,v,b,E,y,T,O);for(;D;){hs=!0;const $=D;D=D.nextSibling,s($)}}else I&8&&b.textContent!==v.children&&(hs=!0,b.textContent=v.children)}return b.nextSibling},f=(b,v,E,y,T,O,C)=>{C=C||!!v.dynamicChildren;const R=v.children,x=R.length;for(let I=0;I{const{slotScopeIds:C}=v;C&&(T=T?T.concat(C):C);const R=d(b),x=f(a(b),v,R,E,y,T,O);return x&&p_(x)&&x.data==="]"?a(v.anchor=x):(hs=!0,u(v.anchor=o("]"),R,x),x)},g=(b,v,E,y,T,O)=>{if(hs=!0,v.el=null,O){const x=h(b);for(;;){const I=a(b);if(I&&I!==x)s(I);else break}}const C=a(b),R=d(b);return s(b),n(null,v,R,C,E,y,d_(R),T),C},h=b=>{let v=0;for(;b;)if(b=a(b),b&&p_(b)&&(b.data==="["&&v++,b.data==="]")){if(v===0)return a(b);v--}return b};return[l,c]}const Br=b1;function $1(e){return B1(e)}function F1(e){return B1(e,CY)}function B1(e,t){const n=Q4();n.__VUE__=!0;const{insert:r,remove:i,patchProp:a,createElement:d,createText:s,createComment:u,setText:o,setElementText:l,parentNode:c,nextSibling:p,setScopeId:f=Do,insertStaticContent:m}=e,g=(U,j,J,pe=null,ae=null,be=null,ve=!1,ge=null,ce=!!j.dynamicChildren)=>{if(U===j)return;U&&!No(U,j)&&(pe=q(U),X(U,ae,be,!0),U=null),j.patchFlag===-2&&(ce=!1,j.dynamicChildren=null);const{type:ee,ref:Ne,shapeFlag:Oe}=j;switch(ee){case ta:h(U,j,J,pe);break;case Hr:b(U,j,J,pe);break;case Al:U==null&&v(j,J,pe,ve);break;case Xe:L(U,j,J,pe,ae,be,ve,ge,ce);break;default:Oe&1?T(U,j,J,pe,ae,be,ve,ge,ce):Oe&6?A(U,j,J,pe,ae,be,ve,ge,ce):(Oe&64||Oe&128)&&ee.process(U,j,J,pe,ae,be,ve,ge,ce,re)}Ne!=null&&ae&&Mm(Ne,U&&U.ref,be,j||U,!j)},h=(U,j,J,pe)=>{if(U==null)r(j.el=s(j.children),J,pe);else{const ae=j.el=U.el;j.children!==U.children&&o(ae,j.children)}},b=(U,j,J,pe)=>{U==null?r(j.el=u(j.children||""),J,pe):j.el=U.el},v=(U,j,J,pe)=>{[U.el,U.anchor]=m(U.children,j,J,pe,U.el,U.anchor)},E=({el:U,anchor:j},J,pe)=>{let ae;for(;U&&U!==j;)ae=p(U),r(U,J,pe),U=ae;r(j,J,pe)},y=({el:U,anchor:j})=>{let J;for(;U&&U!==j;)J=p(U),i(U),U=J;i(j)},T=(U,j,J,pe,ae,be,ve,ge,ce)=>{ve=ve||j.type==="svg",U==null?O(j,J,pe,ae,be,ve,ge,ce):x(U,j,ae,be,ve,ge,ce)},O=(U,j,J,pe,ae,be,ve,ge)=>{let ce,ee;const{type:Ne,props:Oe,shapeFlag:Ae,transition:ue,dirs:ie}=U;if(ce=U.el=d(U.type,be,Oe&&Oe.is,Oe),Ae&8?l(ce,U.children):Ae&16&&R(U.children,ce,null,pe,ae,be&&Ne!=="foreignObject",ve,ge),ie&&Qo(U,null,pe,"created"),C(ce,U,U.scopeId,ve,pe),Oe){for(const Le in Oe)Le!=="value"&&!Hd(Le)&&a(ce,Le,null,Oe[Le],be,U.children,pe,ae,Z);"value"in Oe&&a(ce,"value",null,Oe.value),(ee=Oe.onVnodeBeforeMount)&&vi(ee,pe,U)}ie&&Qo(U,null,pe,"beforeMount");const Ee=(!ae||ae&&!ae.pendingBranch)&&ue&&!ue.persisted;Ee&&ue.beforeEnter(ce),r(ce,j,J),((ee=Oe&&Oe.onVnodeMounted)||Ee||ie)&&Br(()=>{ee&&vi(ee,pe,U),Ee&&ue.enter(ce),ie&&Qo(U,null,pe,"mounted")},ae)},C=(U,j,J,pe,ae)=>{if(J&&f(U,J),pe)for(let be=0;be{for(let ee=ce;ee{const ge=j.el=U.el;let{patchFlag:ce,dynamicChildren:ee,dirs:Ne}=j;ce|=U.patchFlag&16;const Oe=U.props||An,Ae=j.props||An;let ue;J&&cl(J,!1),(ue=Ae.onVnodeBeforeUpdate)&&vi(ue,J,j,U),Ne&&Qo(j,U,J,"beforeUpdate"),J&&cl(J,!0);const ie=ae&&j.type!=="foreignObject";if(ee?I(U.dynamicChildren,ee,ge,J,pe,ie,be):ve||H(U,j,ge,null,J,pe,ie,be,!1),ce>0){if(ce&16)k(ge,j,Oe,Ae,J,pe,ae);else if(ce&2&&Oe.class!==Ae.class&&a(ge,"class",null,Ae.class,ae),ce&4&&a(ge,"style",Oe.style,Ae.style,ae),ce&8){const Ee=j.dynamicProps;for(let Le=0;Le{ue&&vi(ue,J,j,U),Ne&&Qo(j,U,J,"updated")},pe)},I=(U,j,J,pe,ae,be,ve)=>{for(let ge=0;ge{if(J!==pe){if(J!==An)for(const ge in J)!Hd(ge)&&!(ge in pe)&&a(U,ge,J[ge],null,ve,j.children,ae,be,Z);for(const ge in pe){if(Hd(ge))continue;const ce=pe[ge],ee=J[ge];ce!==ee&&ge!=="value"&&a(U,ge,ee,ce,ve,j.children,ae,be,Z)}"value"in pe&&a(U,"value",J.value,pe.value)}},L=(U,j,J,pe,ae,be,ve,ge,ce)=>{const ee=j.el=U?U.el:s(""),Ne=j.anchor=U?U.anchor:s("");let{patchFlag:Oe,dynamicChildren:Ae,slotScopeIds:ue}=j;ue&&(ge=ge?ge.concat(ue):ue),U==null?(r(ee,J,pe),r(Ne,J,pe),R(j.children,J,Ne,ae,be,ve,ge,ce)):Oe>0&&Oe&64&&Ae&&U.dynamicChildren?(I(U.dynamicChildren,Ae,J,ae,be,ve,ge),(j.key!=null||ae&&j===ae.subTree)&&Zy(U,j,!0)):H(U,j,J,Ne,ae,be,ve,ge,ce)},A=(U,j,J,pe,ae,be,ve,ge,ce)=>{j.slotScopeIds=ge,U==null?j.shapeFlag&512?ae.ctx.activate(j,J,pe,ve,ce):D(j,J,pe,ae,be,ve,ce):$(U,j,ce)},D=(U,j,J,pe,ae,be,ve)=>{const ge=U.component=Y1(U,pe,ae);if(nf(U)&&(ge.ctx.renderer=re),q1(ge),ge.asyncDep){if(ae&&ae.registerDep(ge,F),!U.el){const ce=ge.subTree=N(Hr);b(null,ce,j,J)}return}F(ge,U,j,J,ae,be,ve)},$=(U,j,J)=>{const pe=j.component=U.component;if(K6(U,j,J))if(pe.asyncDep&&!pe.asyncResolved){z(pe,j,J);return}else pe.next=j,H6(pe.update),pe.update();else j.el=U.el,pe.vnode=j},F=(U,j,J,pe,ae,be,ve)=>{const ge=()=>{if(U.isMounted){let{next:Ne,bu:Oe,u:Ae,parent:ue,vnode:ie}=U,Ee=Ne,Le;cl(U,!1),Ne?(Ne.el=ie.el,z(U,Ne,ve)):Ne=ie,Oe&&eu(Oe),(Le=Ne.props&&Ne.props.onVnodeBeforeUpdate)&&vi(Le,ue,Ne,ie),cl(U,!0);const We=sm(U),Ke=U.subTree;U.subTree=We,g(Ke,We,c(Ke.el),q(Ke),U,ae,be),Ne.el=We.el,Ee===null&&Uy(U,We.el),Ae&&Br(Ae,ae),(Le=Ne.props&&Ne.props.onVnodeUpdated)&&Br(()=>vi(Le,ue,Ne,ie),ae)}else{let Ne;const{el:Oe,props:Ae}=j,{bm:ue,m:ie,parent:Ee}=U,Le=Il(j);if(cl(U,!1),ue&&eu(ue),!Le&&(Ne=Ae&&Ae.onVnodeBeforeMount)&&vi(Ne,Ee,j),cl(U,!0),Oe&&me){const We=()=>{U.subTree=sm(U),me(Oe,U.subTree,U,ae,null)};Le?j.type.__asyncLoader().then(()=>!U.isUnmounted&&We()):We()}else{const We=U.subTree=sm(U);g(null,We,J,pe,U,ae,be),j.el=We.el}if(ie&&Br(ie,ae),!Le&&(Ne=Ae&&Ae.onVnodeMounted)){const We=j;Br(()=>vi(Ne,Ee,We),ae)}(j.shapeFlag&256||Ee&&Il(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&U.a&&Br(U.a,ae),U.isMounted=!0,j=J=pe=null}},ce=U.effect=new ef(ge,()=>xg(ee),U.scope),ee=U.update=()=>ce.run();ee.id=U.uid,cl(U,!0),ee()},z=(U,j,J)=>{j.component=U;const pe=U.vnode.props;U.vnode=j,U.next=null,hY(U,j.props,pe,J),vY(U,j.children,J),Xu(),jw(),Zu()},H=(U,j,J,pe,ae,be,ve,ge,ce=!1)=>{const ee=U&&U.children,Ne=U?U.shapeFlag:0,Oe=j.children,{patchFlag:Ae,shapeFlag:ue}=j;if(Ae>0){if(Ae&128){W(ee,Oe,J,pe,ae,be,ve,ge,ce);return}else if(Ae&256){V(ee,Oe,J,pe,ae,be,ve,ge,ce);return}}ue&8?(Ne&16&&Z(ee,ae,be),Oe!==ee&&l(J,Oe)):Ne&16?ue&16?W(ee,Oe,J,pe,ae,be,ve,ge,ce):Z(ee,ae,be,!0):(Ne&8&&l(J,""),ue&16&&R(Oe,J,pe,ae,be,ve,ge,ce))},V=(U,j,J,pe,ae,be,ve,ge,ce)=>{U=U||Zc,j=j||Zc;const ee=U.length,Ne=j.length,Oe=Math.min(ee,Ne);let Ae;for(Ae=0;AeNe?Z(U,ae,be,!0,!1,Oe):R(j,J,pe,ae,be,ve,ge,ce,Oe)},W=(U,j,J,pe,ae,be,ve,ge,ce)=>{let ee=0;const Ne=j.length;let Oe=U.length-1,Ae=Ne-1;for(;ee<=Oe&&ee<=Ae;){const ue=U[ee],ie=j[ee]=ce?Es(j[ee]):Li(j[ee]);if(No(ue,ie))g(ue,ie,J,null,ae,be,ve,ge,ce);else break;ee++}for(;ee<=Oe&&ee<=Ae;){const ue=U[Oe],ie=j[Ae]=ce?Es(j[Ae]):Li(j[Ae]);if(No(ue,ie))g(ue,ie,J,null,ae,be,ve,ge,ce);else break;Oe--,Ae--}if(ee>Oe){if(ee<=Ae){const ue=Ae+1,ie=ueAe)for(;ee<=Oe;)X(U[ee],ae,be,!0),ee++;else{const ue=ee,ie=ee,Ee=new Map;for(ee=ie;ee<=Ae;ee++){const qe=j[ee]=ce?Es(j[ee]):Li(j[ee]);qe.key!=null&&Ee.set(qe.key,ee)}let Le,We=0;const Ke=Ae-ie+1;let xe=!1,Me=0;const Pe=new Array(Ke);for(ee=0;ee=Ke){X(qe,ae,be,!0);continue}let Je;if(qe.key!=null)Je=Ee.get(qe.key);else for(Le=ie;Le<=Ae;Le++)if(Pe[Le-ie]===0&&No(qe,j[Le])){Je=Le;break}Je===void 0?X(qe,ae,be,!0):(Pe[Je-ie]=ee+1,Je>=Me?Me=Je:xe=!0,g(qe,j[Je],J,null,ae,be,ve,ge,ce),We++)}const Qe=xe?TY(Pe):Zc;for(Le=Qe.length-1,ee=Ke-1;ee>=0;ee--){const qe=ie+ee,Je=j[qe],et=qe+1{const{el:be,type:ve,transition:ge,children:ce,shapeFlag:ee}=U;if(ee&6){te(U.component.subTree,j,J,pe);return}if(ee&128){U.suspense.move(j,J,pe);return}if(ee&64){ve.move(U,j,J,re);return}if(ve===Xe){r(be,j,J);for(let Oe=0;Oege.enter(be),ae);else{const{leave:Oe,delayLeave:Ae,afterLeave:ue}=ge,ie=()=>r(be,j,J),Ee=()=>{Oe(be,()=>{ie(),ue&&ue()})};Ae?Ae(be,ie,Ee):Ee()}else r(be,j,J)},X=(U,j,J,pe=!1,ae=!1)=>{const{type:be,props:ve,ref:ge,children:ce,dynamicChildren:ee,shapeFlag:Ne,patchFlag:Oe,dirs:Ae}=U;if(ge!=null&&Mm(ge,null,J,U,!0),Ne&256){j.ctx.deactivate(U);return}const ue=Ne&1&&Ae,ie=!Il(U);let Ee;if(ie&&(Ee=ve&&ve.onVnodeBeforeUnmount)&&vi(Ee,j,U),Ne&6)Q(U.component,J,pe);else{if(Ne&128){U.suspense.unmount(J,pe);return}ue&&Qo(U,null,j,"beforeUnmount"),Ne&64?U.type.remove(U,j,J,ae,re,pe):ee&&(be!==Xe||Oe>0&&Oe&64)?Z(ee,j,J,!1,!0):(be===Xe&&Oe&384||!ae&&Ne&16)&&Z(ce,j,J),pe&&ne(U)}(ie&&(Ee=ve&&ve.onVnodeUnmounted)||ue)&&Br(()=>{Ee&&vi(Ee,j,U),ue&&Qo(U,null,j,"unmounted")},J)},ne=U=>{const{type:j,el:J,anchor:pe,transition:ae}=U;if(j===Xe){oe(J,pe);return}if(j===Al){y(U);return}const be=()=>{i(J),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(U.shapeFlag&1&&ae&&!ae.persisted){const{leave:ve,delayLeave:ge}=ae,ce=()=>ve(J,be);ge?ge(U.el,be,ce):ce()}else be()},oe=(U,j)=>{let J;for(;U!==j;)J=p(U),i(U),U=J;i(j)},Q=(U,j,J)=>{const{bum:pe,scope:ae,update:be,subTree:ve,um:ge}=U;pe&&eu(pe),ae.stop(),be&&(be.active=!1,X(ve,U,j,J)),ge&&Br(ge,j),Br(()=>{U.isUnmounted=!0},j),j&&j.pendingBranch&&!j.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===j.pendingId&&(j.deps--,j.deps===0&&j.resolve())},Z=(U,j,J,pe=!1,ae=!1,be=0)=>{for(let ve=be;veU.shapeFlag&6?q(U.component.subTree):U.shapeFlag&128?U.suspense.next():p(U.anchor||U.el),se=(U,j,J)=>{U==null?j._vnode&&X(j._vnode,null,null,!0):g(j._vnode||null,U,j,null,null,null,J),jw(),Am(),j._vnode=U},re={p:g,um:X,m:te,r:ne,mt:D,mc:R,pc:H,pbc:I,n:q,o:e};let _e,me;return t&&([_e,me]=t(re)),{render:se,hydrate:_e,createApp:yY(se,_e)}}function cl({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Zy(e,t,n=!1){const r=e.children,i=t.children;if(ut(r)&&ut(i))for(let a=0;a>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,d=n[a-1];a-- >0;)n[a]=d,d=t[d];return n}const OY=e=>e.__isTeleport,Vd=e=>e&&(e.disabled||e.disabled===""),iR=e=>typeof SVGElement<"u"&&e instanceof SVGElement,fv=(e,t)=>{const n=e&&e.to;return Qn(n)?t?t(n):null:n},wY={__isTeleport:!0,process(e,t,n,r,i,a,d,s,u,o){const{mc:l,pc:c,pbc:p,o:{insert:f,querySelector:m,createText:g,createComment:h}}=o,b=Vd(t.props);let{shapeFlag:v,children:E,dynamicChildren:y}=t;if(e==null){const T=t.el=g(""),O=t.anchor=g("");f(T,n,r),f(O,n,r);const C=t.target=fv(t.props,m),R=t.targetAnchor=g("");C&&(f(R,C),d=d||iR(C));const x=(I,k)=>{v&16&&l(E,I,k,i,a,d,s,u)};b?x(n,O):C&&x(C,R)}else{t.el=e.el;const T=t.anchor=e.anchor,O=t.target=e.target,C=t.targetAnchor=e.targetAnchor,R=Vd(e.props),x=R?n:O,I=R?T:C;if(d=d||iR(O),y?(p(e.dynamicChildren,y,x,i,a,d,s),Zy(e,t,!0)):u||c(e,t,x,I,i,a,d,s,!1),b)R||f_(t,n,T,o,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const k=t.target=fv(t.props,m);k&&f_(t,k,null,o,0)}else R&&f_(t,O,C,o,1)}U1(t)},remove(e,t,n,r,{um:i,o:{remove:a}},d){const{shapeFlag:s,children:u,anchor:o,targetAnchor:l,target:c,props:p}=e;if(c&&a(l),(d||!Vd(p))&&(a(o),s&16))for(let f=0;f0?yi||Zc:null,G1(),Fl>0&&yi&&yi.push(e),e}function Re(e,t,n,r,i,a){return H1(He(e,t,n,r,i,a,!0))}function Vn(e,t,n,r,i){return H1(N(e,t,n,r,i,!0))}function yr(e){return e?e.__v_isVNode===!0:!1}function No(e,t){return e.type===t.type&&e.key===t.key}function xY(e){}const kg="__vInternal",z1=({key:e})=>e!=null?e:null,lm=({ref:e,ref_key:t,ref_for:n})=>e!=null?Qn(e)||Er(e)||It(e)?{i:Ur,r:e,k:t,f:!!n}:e:null;function He(e,t=null,n=null,r=0,i=null,a=e===Xe?0:1,d=!1,s=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&z1(t),ref:t&&lm(t),scopeId:Ng,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ur};return s?(Jy(u,n),a&128&&e.normalize(u)):n&&(u.shapeFlag|=Qn(n)?8:16),Fl>0&&!d&&yi&&(u.patchFlag>0||a&6)&&u.patchFlag!==32&&yi.push(u),u}const N=IY;function IY(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===R1)&&(e=Hr),yr(e)){const s=fi(e,t,!0);return n&&Jy(s,n),Fl>0&&!a&&yi&&(s.shapeFlag&6?yi[yi.indexOf(e)]=s:yi.push(s)),s.patchFlag|=-2,s}if($Y(e)&&(e=e.__vccOpts),t){t=lo(t);let{class:s,style:u}=t;s&&!Qn(s)&&(t.class=ct(s)),$n(u)&&(My(u)&&!ut(u)&&(u=ar({},u)),t.style=Zn(u))}const d=Qn(e)?1:h1(e)?128:OY(e)?64:$n(e)?4:It(e)?2:0;return He(e,t,n,r,i,d,a,!0)}function lo(e){return e?My(e)||kg in e?ar({},e):e:null}function fi(e,t,n=!1){const{props:r,ref:i,patchFlag:a,children:d}=e,s=t?$a(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&z1(s),ref:t&&t.ref?n&&i?ut(i)?i.concat(lm(t)):[i,lm(t)]:lm(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Xe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fi(e.ssContent),ssFallback:e.ssFallback&&fi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Pn(e=" ",t=0){return N(ta,null,e,t)}function NY(e,t){const n=N(Al,null,e);return n.staticCount=t,n}function Lt(e="",t=!1){return t?(Se(),Vn(Hr,null,e)):N(Hr,null,e)}function Li(e){return e==null||typeof e=="boolean"?N(Hr):ut(e)?N(Xe,null,e.slice()):typeof e=="object"?Es(e):N(ta,null,String(e))}function Es(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fi(e)}function Jy(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ut(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Jy(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(kg in t)?t._ctx=Ur:i===3&&Ur&&(Ur.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else It(t)?(t={default:t,_ctx:Ur},n=32):(t=String(t),r&64?(n=16,t=[Pn(t)]):n=8);e.children=t,e.shapeFlag|=n}function $a(...e){const t={};for(let n=0;nir||Ur,Ys=e=>{ir=e,e.scope.on()},Ls=()=>{ir&&ir.scope.off(),ir=null};function V1(e){return e.vnode.shapeFlag&4}let Tu=!1;function q1(e,t=!1){Tu=t;const{props:n,children:r}=e.vnode,i=V1(e);gY(e,n,i,t),SY(e,r);const a=i?MY(e,t):void 0;return Tu=!1,a}function MY(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=ky(new Proxy(e.ctx,cv));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?W1(e):null;Ys(e),Xu();const a=Ua(r,e,0,[e.props,i]);if(Zu(),Ls(),Ry(a)){if(a.then(Ls,Ls),t)return a.then(d=>{mv(e,d,t)}).catch(d=>{tc(d,e,0)});e.asyncDep=a}else mv(e,a,t)}else j1(e,t)}function mv(e,t,n){It(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:$n(t)&&(e.setupState=$y(t)),j1(e,n)}let km,gv;function kY(e){km=e,gv=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,uY))}}const PY=()=>!km;function j1(e,t,n){const r=e.type;if(!e.render){if(!t&&km&&!r.render){const i=r.template||Qy(e).template;if(i){const{isCustomElement:a,compilerOptions:d}=e.appContext.config,{delimiters:s,compilerOptions:u}=r,o=ar(ar({isCustomElement:a,delimiters:s},d),u);r.render=km(i,o)}}e.render=r.render||Do,gv&&gv(e)}Ys(e),Xu(),dY(e),Zu(),Ls()}function LY(e){return new Proxy(e.attrs,{get(t,n){return Ti(e,"get","$attrs"),t[n]}})}function W1(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=LY(e))},slots:e.slots,emit:e.emit,expose:t}}function Pg(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy($y(ky(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Yd)return Yd[n](e)},has(t,n){return n in t||n in Yd}}))}function hv(e,t=!0){return It(e)?e.displayName||e.name:e.name||t&&e.__name}function $Y(e){return It(e)&&"__vccOpts"in e}const B=(e,t)=>$6(e,t,Tu);function FY(){return null}function BY(){return null}function UY(e){}function GY(e,t){return null}function HY(){return K1().slots}function zY(){return K1().attrs}function K1(){const e=mr();return e.setupContext||(e.setupContext=W1(e))}function YY(e,t){const n=ut(e)?e.reduce((r,i)=>(r[i]={},r),{}):e;for(const r in t){const i=n[r];i?ut(i)||It(i)?n[r]={type:i,default:t[r]}:i.default=t[r]:i===null&&(n[r]={default:t[r]})}return n}function VY(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function qY(e){const t=mr();let n=e();return Ls(),Ry(n)&&(n=n.catch(r=>{throw Ys(t),r})),[n,()=>Ys(t)]}function Bl(e,t,n){const r=arguments.length;return r===2?$n(t)&&!ut(t)?yr(t)?N(e,null,[t]):N(e,t):N(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&yr(n)&&(n=[n]),N(e,t,n))}const Q1=Symbol(""),X1=()=>bt(Q1);function jY(){}function WY(e,t,n,r){const i=n[r];if(i&&Z1(i,e))return i;const a=t();return a.memo=e.slice(),n[r]=a}function Z1(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r0&&yi&&yi.push(e),!0}const J1="3.2.47",KY={createComponentInstance:Y1,setupComponent:q1,renderComponentRoot:sm,setCurrentRenderingInstance:Sp,isVNode:yr,normalizeVNode:Li},QY=KY,XY=null,ZY=null,JY="http://www.w3.org/2000/svg",bl=typeof document<"u"?document:null,oR=bl&&bl.createElement("template"),eV={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?bl.createElementNS(JY,e):bl.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>bl.createTextNode(e),createComment:e=>bl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>bl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,a){const d=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{oR.innerHTML=r?`${e}`:e;const s=oR.content;if(r){const u=s.firstChild;for(;u.firstChild;)s.appendChild(u.firstChild);s.removeChild(u)}t.insertBefore(s,n)}return[d?d.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function tV(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function nV(e,t,n){const r=e.style,i=Qn(n);if(n&&!i){if(t&&!Qn(t))for(const a in t)n[a]==null&&bv(r,a,"");for(const a in n)bv(r,a,n[a])}else{const a=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=a)}}const aR=/\s*!important$/;function bv(e,t,n){if(ut(n))n.forEach(r=>bv(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=rV(e,t);aR.test(n)?e.setProperty(uo(r),n.replace(aR,""),"important"):e[r]=n}}const sR=["Webkit","Moz","ms"],Yb={};function rV(e,t){const n=Yb[t];if(n)return n;let r=Ci(t);if(r!=="filter"&&r in e)return Yb[t]=r;r=Jp(r);for(let i=0;iVb||(cV.then(()=>Vb=0),Vb=Date.now());function dV(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Fi(pV(r,n.value),t,5,[r])};return n.value=e,n.attached=uV(),n}function pV(e,t){if(ut(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const uR=/^on[a-z]/,fV=(e,t,n,r,i=!1,a,d,s,u)=>{t==="class"?tV(e,r,i):t==="style"?nV(e,n,r):Zp(t)?Oy(t)||sV(e,t,n,r,d):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_V(e,t,r,i))?oV(e,t,r,a,d,s,u):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),iV(e,t,r,i))};function _V(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&uR.test(t)&&It(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||uR.test(t)&&Qn(n)?!1:t in e}function eM(e,t){const n=Te(e);class r extends Lg{constructor(a){super(n,a,t)}}return r.def=n,r}const mV=e=>eM(e,gM),gV=typeof HTMLElement<"u"?HTMLElement:class{};class Lg extends gV{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,en(()=>{this._connected||(Gl(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r{for(const i of r)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const t=(r,i=!1)=>{const{props:a,styles:d}=r;let s;if(a&&!ut(a))for(const u in a){const o=a[u];(o===Number||o&&o.type===Number)&&(u in this._props&&(this._props[u]=Im(this._props[u])),(s||(s=Object.create(null)))[Ci(u)]=!0)}this._numberProps=s,i&&this._resolveProps(r),this._applyStyles(d),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=ut(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&r.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of r.map(Ci))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(t){let n=this.getAttribute(t);const r=Ci(t);this._numberProps&&this._numberProps[r]&&(n=Im(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,i=!0){n!==this._props[t]&&(this._props[t]=n,i&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(uo(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(uo(t),n+""):n||this.removeAttribute(uo(t))))}_update(){Gl(this._createVNode(),this.shadowRoot)}_createVNode(){const t=N(this._def,ar({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(a,d)=>{this.dispatchEvent(new CustomEvent(a,{detail:d}))};n.emit=(a,...d)=>{r(a,d),uo(a)!==a&&r(uo(a),d)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof Lg){n.parent=i._instance,n.provides=i._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function hV(e="$style"){{const t=mr();if(!t)return An;const n=t.type.__cssModules;if(!n)return An;const r=n[e];return r||An}}function bV(e){const t=mr();if(!t)return;const n=t.ut=(i=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(a=>vv(a,i))},r=()=>{const i=e(t.proxy);Sv(t.subTree,i),n(i)};S1(r),it(()=>{const i=new MutationObserver(r);i.observe(t.subTree.el.parentNode,{childList:!0}),zi(()=>i.disconnect())})}function Sv(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Sv(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)vv(e.el,t);else if(e.type===Xe)e.children.forEach(n=>Sv(n,t));else if(e.type===Al){let{el:n,anchor:r}=e;for(;n&&(vv(n,t),n!==r);)n=n.nextSibling}}function vv(e,t){if(e.nodeType===1){const n=e.style;for(const r in t)n.setProperty(`--${r}`,t[r])}}const bs="transition",wd="animation",Yi=(e,{slots:t})=>Bl(zy,nM(e),t);Yi.displayName="Transition";const tM={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},SV=Yi.props=ar({},zy.props,tM),ul=(e,t=[])=>{ut(e)?e.forEach(n=>n(...t)):e&&e(...t)},dR=e=>e?ut(e)?e.some(t=>t.length>1):e.length>1:!1;function nM(e){const t={};for(const L in e)L in tM||(t[L]=e[L]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:d=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:u=a,appearActiveClass:o=d,appearToClass:l=s,leaveFromClass:c=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=vV(i),g=m&&m[0],h=m&&m[1],{onBeforeEnter:b,onEnter:v,onEnterCancelled:E,onLeave:y,onLeaveCancelled:T,onBeforeAppear:O=b,onAppear:C=v,onAppearCancelled:R=E}=t,x=(L,A,D)=>{vs(L,A?l:s),vs(L,A?o:d),D&&D()},I=(L,A)=>{L._isLeaving=!1,vs(L,c),vs(L,f),vs(L,p),A&&A()},k=L=>(A,D)=>{const $=L?C:v,F=()=>x(A,L,D);ul($,[A,F]),pR(()=>{vs(A,L?u:a),Ca(A,L?l:s),dR($)||fR(A,r,g,F)})};return ar(t,{onBeforeEnter(L){ul(b,[L]),Ca(L,a),Ca(L,d)},onBeforeAppear(L){ul(O,[L]),Ca(L,u),Ca(L,o)},onEnter:k(!1),onAppear:k(!0),onLeave(L,A){L._isLeaving=!0;const D=()=>I(L,A);Ca(L,c),iM(),Ca(L,p),pR(()=>{!L._isLeaving||(vs(L,c),Ca(L,f),dR(y)||fR(L,r,h,D))}),ul(y,[L,D])},onEnterCancelled(L){x(L,!1),ul(E,[L])},onAppearCancelled(L){x(L,!0),ul(R,[L])},onLeaveCancelled(L){I(L),ul(T,[L])}})}function vV(e){if(e==null)return null;if($n(e))return[qb(e.enter),qb(e.leave)];{const t=qb(e);return[t,t]}}function qb(e){return Im(e)}function Ca(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function vs(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function pR(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let EV=0;function fR(e,t,n,r){const i=e._endId=++EV,a=()=>{i===e._endId&&r()};if(n)return setTimeout(a,n);const{type:d,timeout:s,propCount:u}=rM(e,t);if(!d)return r();const o=d+"end";let l=0;const c=()=>{e.removeEventListener(o,p),a()},p=f=>{f.target===e&&++l>=u&&c()};setTimeout(()=>{l(n[m]||"").split(", "),i=r(`${bs}Delay`),a=r(`${bs}Duration`),d=_R(i,a),s=r(`${wd}Delay`),u=r(`${wd}Duration`),o=_R(s,u);let l=null,c=0,p=0;t===bs?d>0&&(l=bs,c=d,p=a.length):t===wd?o>0&&(l=wd,c=o,p=u.length):(c=Math.max(d,o),l=c>0?d>o?bs:wd:null,p=l?l===bs?a.length:u.length:0);const f=l===bs&&/\b(transform|all)(,|$)/.test(r(`${bs}Property`).toString());return{type:l,timeout:c,propCount:p,hasTransform:f}}function _R(e,t){for(;e.lengthmR(n)+mR(e[r])))}function mR(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function iM(){return document.body.offsetHeight}const oM=new WeakMap,aM=new WeakMap,sM={name:"TransitionGroup",props:ar({},SV,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=mr(),r=Hy();let i,a;return Hi(()=>{if(!i.length)return;const d=e.moveClass||`${e.name||"v"}-move`;if(!wV(i[0].el,n.vnode.el,d))return;i.forEach(CV),i.forEach(TV);const s=i.filter(OV);iM(),s.forEach(u=>{const o=u.el,l=o.style;Ca(o,d),l.transform=l.webkitTransform=l.transitionDuration="";const c=o._moveCb=p=>{p&&p.target!==o||(!p||/transform$/.test(p.propertyName))&&(o.removeEventListener("transitionend",c),o._moveCb=null,vs(o,d))};o.addEventListener("transitionend",c)})}),()=>{const d=Dt(e),s=nM(d);let u=d.tag||Xe;i=a,a=t.default?Ag(t.default()):[];for(let o=0;odelete e.mode;sM.props;const e0=sM;function CV(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function TV(e){aM.set(e,e.el.getBoundingClientRect())}function OV(e){const t=oM.get(e),n=aM.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${r}px,${i}px)`,a.transitionDuration="0s",e}}function wV(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(d=>{d.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(d=>d&&r.classList.add(d)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:a}=rM(r);return i.removeChild(r),a}const Vs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ut(t)?n=>eu(t,n):t};function RV(e){e.target.composing=!0}function gR(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ul={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=Vs(i);const a=r||i.props&&i.props.type==="number";Pa(e,t?"change":"input",d=>{if(d.target.composing)return;let s=e.value;n&&(s=s.trim()),a&&(s=xm(s)),e._assign(s)}),n&&Pa(e,"change",()=>{e.value=e.value.trim()}),t||(Pa(e,"compositionstart",RV),Pa(e,"compositionend",gR),Pa(e,"change",gR))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},a){if(e._assign=Vs(a),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&xm(e.value)===t))return;const d=t==null?"":t;e.value!==d&&(e.value=d)}},t0={deep:!0,created(e,t,n){e._assign=Vs(n),Pa(e,"change",()=>{const r=e._modelValue,i=Ou(e),a=e.checked,d=e._assign;if(ut(r)){const s=Eg(r,i),u=s!==-1;if(a&&!u)d(r.concat(i));else if(!a&&u){const o=[...r];o.splice(s,1),d(o)}}else if(ec(r)){const s=new Set(r);a?s.add(i):s.delete(i),d(s)}else d(cM(e,a))})},mounted:hR,beforeUpdate(e,t,n){e._assign=Vs(n),hR(e,t,n)}};function hR(e,{value:t,oldValue:n},r){e._modelValue=t,ut(t)?e.checked=Eg(t,r.props.value)>-1:ec(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Hs(t,cM(e,!0)))}const n0={created(e,{value:t},n){e.checked=Hs(t,n.props.value),e._assign=Vs(n),Pa(e,"change",()=>{e._assign(Ou(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=Vs(r),t!==n&&(e.checked=Hs(t,r.props.value))}},lM={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=ec(t);Pa(e,"change",()=>{const a=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>n?xm(Ou(d)):Ou(d));e._assign(e.multiple?i?new Set(a):a:a[0])}),e._assign=Vs(r)},mounted(e,{value:t}){bR(e,t)},beforeUpdate(e,t,n){e._assign=Vs(n)},updated(e,{value:t}){bR(e,t)}};function bR(e,t){const n=e.multiple;if(!(n&&!ut(t)&&!ec(t))){for(let r=0,i=e.options.length;r-1:a.selected=t.has(d);else if(Hs(Ou(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ou(e){return"_value"in e?e._value:e.value}function cM(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const uM={created(e,t,n){__(e,t,n,null,"created")},mounted(e,t,n){__(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){__(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){__(e,t,n,r,"updated")}};function dM(e,t){switch(e){case"SELECT":return lM;case"TEXTAREA":return Ul;default:switch(t){case"checkbox":return t0;case"radio":return n0;default:return Ul}}}function __(e,t,n,r,i){const d=dM(e.tagName,n.props&&n.props.type)[i];d&&d(e,t,n,r)}function xV(){Ul.getSSRProps=({value:e})=>({value:e}),n0.getSSRProps=({value:e},t)=>{if(t.props&&Hs(t.props.value,e))return{checked:!0}},t0.getSSRProps=({value:e},t)=>{if(ut(e)){if(t.props&&Eg(e,t.props.value)>-1)return{checked:!0}}else if(ec(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},uM.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=dM(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const IV=["ctrl","shift","alt","meta"],NV={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>IV.some(n=>e[`${n}Key`]&&!t.includes(n))},li=(e,t)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=uo(n.key);if(t.some(i=>i===r||AV[i]===r))return e(n)},Ya={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Rd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Rd(e,!0),r.enter(e)):r.leave(e,()=>{Rd(e,!1)}):Rd(e,t))},beforeUnmount(e,{value:t}){Rd(e,t)}};function Rd(e,t){e.style.display=t?e._vod:"none"}function DV(){Ya.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const fM=ar({patchProp:fV},eV);let jd,SR=!1;function _M(){return jd||(jd=$1(fM))}function mM(){return jd=SR?jd:F1(fM),SR=!0,jd}const Gl=(...e)=>{_M().render(...e)},gM=(...e)=>{mM().hydrate(...e)},MV=(...e)=>{const t=_M().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=hM(r);if(!i)return;const a=t._component;!It(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const d=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),d},t},kV=(...e)=>{const t=mM().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=hM(r);if(i)return n(i,!0,i instanceof SVGElement)},t};function hM(e){return Qn(e)?document.querySelector(e):e}let vR=!1;const PV=()=>{vR||(vR=!0,xV(),DV())},LV=()=>{},$V=Object.freeze(Object.defineProperty({__proto__:null,compile:LV,EffectScope:Iy,ReactiveEffect:ef,customRef:k6,effect:t6,effectScope:X4,getCurrentScope:WD,isProxy:My,isReactive:xl,isReadonly:Ll,isRef:Er,isShallow:mp,markRaw:ky,onScopeDispose:Z4,proxyRefs:$y,reactive:Kt,readonly:Dy,ref:ke,shallowReactive:s1,shallowReadonly:I6,shallowRef:Ie,stop:n6,toRaw:Dt,toRef:cn,toRefs:tu,triggerRef:A6,unref:Ve,camelize:Ci,capitalize:Jp,normalizeClass:ct,normalizeProps:so,normalizeStyle:Zn,toDisplayString:pt,toHandlerKey:zd,BaseTransition:zy,Comment:Hr,Fragment:Xe,KeepAlive:sY,Static:Al,Suspense:X6,Teleport:rf,Text:ta,assertNumber:B6,callWithAsyncErrorHandling:Fi,callWithErrorHandling:Ua,cloneVNode:fi,compatUtils:ZY,computed:B,createBlock:Vn,createCommentVNode:Lt,createElementBlock:Re,createElementVNode:He,createHydrationRenderer:F1,createPropsRestProxy:VY,createRenderer:$1,createSlots:Ky,createStaticVNode:NY,createTextVNode:Pn,createVNode:N,defineAsyncComponent:oY,defineComponent:Te,defineEmits:BY,defineExpose:UY,defineProps:FY,get devtools(){return Hc},getCurrentInstance:mr,getTransitionRawChildren:Ag,guardReactiveProps:lo,h:Bl,handleError:tc,initCustomFormatter:jY,inject:bt,isMemoSame:Z1,isRuntimeOnly:PY,isVNode:yr,mergeDefaults:YY,mergeProps:$a,nextTick:en,onActivated:Dg,onBeforeMount:Vy,onBeforeUnmount:tn,onBeforeUpdate:qy,onDeactivated:Yy,onErrorCaptured:w1,onMounted:it,onRenderTracked:O1,onRenderTriggered:T1,onServerPrefetch:C1,onUnmounted:zi,onUpdated:Hi,openBlock:Se,popScopeId:g1,provide:$t,pushScopeId:m1,queuePostFlushCb:By,registerRuntimeCompiler:kY,renderList:On,renderSlot:ln,resolveComponent:Nl,resolveDirective:Ju,resolveDynamicComponent:iu,resolveFilter:XY,resolveTransitionHooks:Cu,setBlockTracking:_v,setDevtoolsHook:f1,setTransitionHooks:$l,ssrContextKey:Q1,ssrUtils:QY,toHandlers:I1,transformVNodeArgs:xY,useAttrs:zY,useSSRContext:X1,useSlots:HY,useTransitionState:Hy,version:J1,warn:F6,watch:ze,watchEffect:Ht,watchPostEffect:S1,watchSyncEffect:nY,withAsyncContext:qY,withCtx:kn,withDefaults:GY,withDirectives:ur,withMemo:WY,withScopeId:V6,Transition:Yi,TransitionGroup:e0,VueElement:Lg,createApp:MV,createSSRApp:kV,defineCustomElement:eM,defineSSRCustomElement:mV,hydrate:gM,initDirectivesForSSR:PV,render:Gl,useCssModule:hV,useCssVars:bV,vModelCheckbox:t0,vModelDynamic:uM,vModelRadio:n0,vModelSelect:lM,vModelText:Ul,vShow:Ya,withKeys:pM,withModifiers:li},Symbol.toStringTag,{value:"Module"}));var FV=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};FV.SENTRY_RELEASE={id:"ba54a4797e68560a0b98bebe59520f59d916467f"};const BV="modulepreload",UV=function(e){return"/"+e},ER={},bM=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=UV(a),a in ER)return;ER[a]=!0;const d=a.endsWith(".css"),s=d?'[rel="stylesheet"]':"";if(!!r)for(let l=i.length-1;l>=0;l--){const c=i[l];if(c.href===a&&(!d||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const o=document.createElement("link");if(o.rel=d?"stylesheet":BV,d||(o.as="script",o.crossOrigin=""),o.href=a,document.head.appendChild(o),d)return new Promise((l,c)=>{o.addEventListener("load",l),o.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};var zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function GV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function HV(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var jt={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -129,7 +129,7 @@ found in ${t.map((i,a)=>`${(a===0?"---> ":KZ(" ",5+a*2))+(Array.isArray(i)?`${op(i[0])}... (${i[1]} recursive calls)`:op(i))}`).join(` `)}`}return` -(found in ${op(e)})`},XZ=(e,t)=>{const{errorHandler:n,warnHandler:r,silent:i}=e.config;e.config.errorHandler=(a,d,s)=>{const u=op(d,!1),o=d?QZ(d):"",l={componentName:u,lifecycleHook:s,trace:o};if(t.attachProps&&d&&(d.$options&&d.$options.propsData?l.propsData=d.$options.propsData:d.$props&&(l.propsData=d.$props)),setTimeout(()=>{Tr().withScope(c=>{c.setContext("vue",l),Tr().captureException(a)})}),typeof n=="function"&&n.call(e,a,d,s),t.logErrors){const c=typeof console<"u",p=`Error in ${s}: "${a&&a.toString()}"`;r?r.call(null,p,d,o):c&&!i&&console.error(`[Vue warn]: ${p}${o}`)}}},fI="ui.vue",ZZ={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function hE(){return Tr().getScope().getTransaction()}function JZ(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{e.$root&&e.$root.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.finish(t),e.$root.$_sentryRootSpan=void 0)},n)}const eJ=e=>{const t=(e.hooks||[]).concat(wP).filter((r,i,a)=>a.indexOf(r)===i),n={};for(const r of t){const i=ZZ[r];if(!i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bu.warn(`Unknown hook: ${r}`);continue}for(const a of i)n[a]=function(){const d=this.$root===this;if(d){const o=hE();o&&(this.$_sentryRootSpan=this.$_sentryRootSpan||o.startChild({description:"Application Render",op:`${fI}.render`}))}const s=op(this,!1),u=Array.isArray(e.trackComponents)?e.trackComponents.indexOf(s)>-1:e.trackComponents;if(!(!d&&!u))if(this.$_sentrySpans=this.$_sentrySpans||{},a==i[0]){const o=this.$root&&this.$root.$_sentryRootSpan||hE();if(o){const l=this.$_sentrySpans[r];l&&!l.endTimestamp&&l.finish(),this.$_sentrySpans[r]=o.startChild({description:`Vue <${s}>`,op:`${fI}.${r}`})}}else{const o=this.$_sentrySpans[r];if(!o)return;o.finish(),JZ(this,U0(),e.timeout)}}}return n},tJ=$o,nJ={Vue:tJ.Vue,attachProps:!0,logErrors:!0,hooks:wP,timeout:2e3,trackComponents:!1,_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Fm}],version:Fm}}};function rJ(e={}){const t={...nJ,...e};if(A9(t),!t.Vue&&!t.app){console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).");return}t.app?vP(t.app).forEach(r=>_I(r,t)):t.Vue&&_I(t.Vue,t)}const _I=(e,t)=>{const n=e;(n._instance&&n._instance.isMounted)===!0&&console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`."),XZ(e,t),VZ(t)&&e.mixin(eJ({...t,...t.tracingOptions}))};function iJ(e,t={}){return(n,r=!0,i=!0)=>{const a={"routing.instrumentation":"vue-router"};r&&Sn&&Sn.location&&n({name:Sn.location.pathname,op:"pageload",tags:a,metadata:{source:"url"}}),e.onError(d=>ZM(d)),e.beforeEach((d,s,u)=>{const o=s.name==null&&s.matched.length===0,l={params:d.params,query:d.query};let c=d.path,p="url";if(d.name&&t.routeLabel!=="path"?(c=d.name.toString(),p="custom"):d.matched[0]&&d.matched[0].path&&(c=d.matched[0].path,p="route"),r&&o){const f=hE();f&&(f.metadata.source!=="custom"&&f.setName(c,p),f.setData("params",l.params),f.setData("query",l.query))}i&&!o&&n({name:c,op:"navigation",tags:a,data:l,metadata:{source:p}}),u&&u()})}}const wCe=(e,t)=>{rJ({app:e,dsn:"https://92a7a6b6bf4d455dab113338d8518956@o1317386.ingest.sentry.io/6570769",replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new Qm({routingInstrumentation:iJ(t)}),new Ap],enabled:!0,tracesSampleRate:1,release:"3039e73e67633e0764bdf2169a1cdca9d01b94b0"})};var Gn={innerWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},width(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth(e,t){if(e){let n=e.offsetWidth;if(t){let r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0},getOuterHeight(e,t){if(e){let n=e.offsetHeight;if(t){let r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getClientHeight(e,t){if(e){let n=e.clientHeight;if(t){let r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getViewport(){let e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0],i=e.innerWidth||n.clientWidth||r.clientWidth,a=e.innerHeight||n.clientHeight||r.clientHeight;return{width:i,height:a}},getOffset(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index(e){if(e){let t=e.parentNode.childNodes,n=0;for(let r=0;rl.height?(c=s.top+u-r,e.style.transformOrigin="bottom",c<0&&(c=u)):(c=a+s.top+u,e.style.transformOrigin="top"),s.left+i>l.width?p=Math.max(0,s.left+o+d-i):p=s.left+o,e.style.top=c+"px",e.style.left=p+"px"}},relativePosition(e,t){if(e){let n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e);const r=t.offsetHeight,i=t.getBoundingClientRect(),a=this.getViewport();let d,s;i.top+r+n.height>a.height?(d=-1*n.height,e.style.transformOrigin="bottom",i.top+d<0&&(d=-1*i.top)):(d=r,e.style.transformOrigin="top"),n.width>a.width?s=i.left*-1:i.left+n.width>a.width?s=(i.left+n.width-a.width)*-1:s=0,e.style.top=d+"px",e.style.left=s+"px"}},getParents(e,t=[]){return e.parentNode===null?t:this.getParents(e.parentNode,t.concat([e.parentNode]))},getScrollableParents(e){let t=[];if(e){let n=this.getParents(e);const r=/(auto|scroll)/,i=a=>{let d=window.getComputedStyle(a,null);return r.test(d.getPropertyValue("overflow"))||r.test(d.getPropertyValue("overflowX"))||r.test(d.getPropertyValue("overflowY"))};for(let a of n){let d=a.nodeType===1&&a.dataset.scrollselectors;if(d){let s=d.split(",");for(let u of s){let o=this.findSingle(a,u);o&&i(o)&&t.push(o)}}a.nodeType!==9&&i(a)&&t.push(a)}}return t},getHiddenElementOuterHeight(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementOuterWidth(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementDimensions(e){if(e){let t={};return e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",t}return 0},fadeIn(e,t){if(e){e.style.opacity=0;let n=+new Date,r=0,i=function(){r=+e.style.opacity+(new Date().getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))};i()}},fadeOut(e,t){if(e){let n=1,r=50,i=t,a=r/i,d=setInterval(()=>{n-=a,n<=0&&(n=0,clearInterval(d)),e.style.opacity=n},r)}},getUserAgent(){return navigator.userAgent},appendChild(e,t){if(this.isElement(t))t.appendChild(e);else if(t.el&&t.elElement)t.elElement.appendChild(e);else throw new Error("Cannot append "+t+" to "+e)},isElement(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},scrollInView(e,t){let n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),a=i?parseFloat(i):0,d=e.getBoundingClientRect(),u=t.getBoundingClientRect().top+document.body.scrollTop-(d.top+document.body.scrollTop)-r-a,o=e.scrollTop,l=e.clientHeight,c=this.getOuterHeight(t);u<0?e.scrollTop=o+u:u+c>l&&(e.scrollTop=o+u-l+c)},clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}},getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth(){if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=t,t},getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},isVisible(e){return e&&e.offsetParent!=null},invokeElementMethod(e,t,n){e[t].apply(e,n)},isExist(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&e.parentNode)},isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},focus(e,t){e&&document.activeElement!==e&&e.focus(t)},isFocusableElement(e,t=""){return this.isElement(e)?e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, +(found in ${op(e)})`},XZ=(e,t)=>{const{errorHandler:n,warnHandler:r,silent:i}=e.config;e.config.errorHandler=(a,d,s)=>{const u=op(d,!1),o=d?QZ(d):"",l={componentName:u,lifecycleHook:s,trace:o};if(t.attachProps&&d&&(d.$options&&d.$options.propsData?l.propsData=d.$options.propsData:d.$props&&(l.propsData=d.$props)),setTimeout(()=>{Tr().withScope(c=>{c.setContext("vue",l),Tr().captureException(a)})}),typeof n=="function"&&n.call(e,a,d,s),t.logErrors){const c=typeof console<"u",p=`Error in ${s}: "${a&&a.toString()}"`;r?r.call(null,p,d,o):c&&!i&&console.error(`[Vue warn]: ${p}${o}`)}}},fI="ui.vue",ZZ={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function hE(){return Tr().getScope().getTransaction()}function JZ(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{e.$root&&e.$root.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.finish(t),e.$root.$_sentryRootSpan=void 0)},n)}const eJ=e=>{const t=(e.hooks||[]).concat(wP).filter((r,i,a)=>a.indexOf(r)===i),n={};for(const r of t){const i=ZZ[r];if(!i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Bu.warn(`Unknown hook: ${r}`);continue}for(const a of i)n[a]=function(){const d=this.$root===this;if(d){const o=hE();o&&(this.$_sentryRootSpan=this.$_sentryRootSpan||o.startChild({description:"Application Render",op:`${fI}.render`}))}const s=op(this,!1),u=Array.isArray(e.trackComponents)?e.trackComponents.indexOf(s)>-1:e.trackComponents;if(!(!d&&!u))if(this.$_sentrySpans=this.$_sentrySpans||{},a==i[0]){const o=this.$root&&this.$root.$_sentryRootSpan||hE();if(o){const l=this.$_sentrySpans[r];l&&!l.endTimestamp&&l.finish(),this.$_sentrySpans[r]=o.startChild({description:`Vue <${s}>`,op:`${fI}.${r}`})}}else{const o=this.$_sentrySpans[r];if(!o)return;o.finish(),JZ(this,U0(),e.timeout)}}}return n},tJ=$o,nJ={Vue:tJ.Vue,attachProps:!0,logErrors:!0,hooks:wP,timeout:2e3,trackComponents:!1,_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Fm}],version:Fm}}};function rJ(e={}){const t={...nJ,...e};if(A9(t),!t.Vue&&!t.app){console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).");return}t.app?vP(t.app).forEach(r=>_I(r,t)):t.Vue&&_I(t.Vue,t)}const _I=(e,t)=>{const n=e;(n._instance&&n._instance.isMounted)===!0&&console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`."),XZ(e,t),VZ(t)&&e.mixin(eJ({...t,...t.tracingOptions}))};function iJ(e,t={}){return(n,r=!0,i=!0)=>{const a={"routing.instrumentation":"vue-router"};r&&Sn&&Sn.location&&n({name:Sn.location.pathname,op:"pageload",tags:a,metadata:{source:"url"}}),e.onError(d=>ZM(d)),e.beforeEach((d,s,u)=>{const o=s.name==null&&s.matched.length===0,l={params:d.params,query:d.query};let c=d.path,p="url";if(d.name&&t.routeLabel!=="path"?(c=d.name.toString(),p="custom"):d.matched[0]&&d.matched[0].path&&(c=d.matched[0].path,p="route"),r&&o){const f=hE();f&&(f.metadata.source!=="custom"&&f.setName(c,p),f.setData("params",l.params),f.setData("query",l.query))}i&&!o&&n({name:c,op:"navigation",tags:a,data:l,metadata:{source:p}}),u&&u()})}}const wCe=(e,t)=>{rJ({app:e,dsn:"https://92a7a6b6bf4d455dab113338d8518956@o1317386.ingest.sentry.io/6570769",replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new Qm({routingInstrumentation:iJ(t)}),new Ap],enabled:!0,tracesSampleRate:1,release:"ba54a4797e68560a0b98bebe59520f59d916467f"})};var Gn={innerWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},width(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth(e,t){if(e){let n=e.offsetWidth;if(t){let r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0},getOuterHeight(e,t){if(e){let n=e.offsetHeight;if(t){let r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getClientHeight(e,t){if(e){let n=e.clientHeight;if(t){let r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getViewport(){let e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0],i=e.innerWidth||n.clientWidth||r.clientWidth,a=e.innerHeight||n.clientHeight||r.clientHeight;return{width:i,height:a}},getOffset(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index(e){if(e){let t=e.parentNode.childNodes,n=0;for(let r=0;rl.height?(c=s.top+u-r,e.style.transformOrigin="bottom",c<0&&(c=u)):(c=a+s.top+u,e.style.transformOrigin="top"),s.left+i>l.width?p=Math.max(0,s.left+o+d-i):p=s.left+o,e.style.top=c+"px",e.style.left=p+"px"}},relativePosition(e,t){if(e){let n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e);const r=t.offsetHeight,i=t.getBoundingClientRect(),a=this.getViewport();let d,s;i.top+r+n.height>a.height?(d=-1*n.height,e.style.transformOrigin="bottom",i.top+d<0&&(d=-1*i.top)):(d=r,e.style.transformOrigin="top"),n.width>a.width?s=i.left*-1:i.left+n.width>a.width?s=(i.left+n.width-a.width)*-1:s=0,e.style.top=d+"px",e.style.left=s+"px"}},getParents(e,t=[]){return e.parentNode===null?t:this.getParents(e.parentNode,t.concat([e.parentNode]))},getScrollableParents(e){let t=[];if(e){let n=this.getParents(e);const r=/(auto|scroll)/,i=a=>{let d=window.getComputedStyle(a,null);return r.test(d.getPropertyValue("overflow"))||r.test(d.getPropertyValue("overflowX"))||r.test(d.getPropertyValue("overflowY"))};for(let a of n){let d=a.nodeType===1&&a.dataset.scrollselectors;if(d){let s=d.split(",");for(let u of s){let o=this.findSingle(a,u);o&&i(o)&&t.push(o)}}a.nodeType!==9&&i(a)&&t.push(a)}}return t},getHiddenElementOuterHeight(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementOuterWidth(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementDimensions(e){if(e){let t={};return e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",t}return 0},fadeIn(e,t){if(e){e.style.opacity=0;let n=+new Date,r=0,i=function(){r=+e.style.opacity+(new Date().getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))};i()}},fadeOut(e,t){if(e){let n=1,r=50,i=t,a=r/i,d=setInterval(()=>{n-=a,n<=0&&(n=0,clearInterval(d)),e.style.opacity=n},r)}},getUserAgent(){return navigator.userAgent},appendChild(e,t){if(this.isElement(t))t.appendChild(e);else if(t.el&&t.elElement)t.elElement.appendChild(e);else throw new Error("Cannot append "+t+" to "+e)},isElement(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},scrollInView(e,t){let n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),a=i?parseFloat(i):0,d=e.getBoundingClientRect(),u=t.getBoundingClientRect().top+document.body.scrollTop-(d.top+document.body.scrollTop)-r-a,o=e.scrollTop,l=e.clientHeight,c=this.getOuterHeight(t);u<0?e.scrollTop=o+u:u+c>l&&(e.scrollTop=o+u-l+c)},clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}},getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth(){if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=t,t},getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},isVisible(e){return e&&e.offsetParent!=null},invokeElementMethod(e,t,n){e[t].apply(e,n)},isExist(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&e.parentNode)},isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},focus(e,t){e&&document.activeElement!==e&&e.focus(t)},isFocusableElement(e,t=""){return this.isElement(e)?e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, @@ -177,7 +177,7 @@ ${t.map((i,a)=>`${(a===0?"---> ":KZ(" ",5+a*2))+(Array.isArray(i)?`${op(i[0])}.. .p-message-leave-active .p-message-close { display: none; } -`;bJ(SJ);fJ.render=hJ;const vJ={key:0,class:"label-container"},EJ={class:"label"},yJ={key:0,class:"required"},mn=Te({__name:"Label",props:{label:null,required:{type:Boolean}},setup(e){return(t,n)=>e.label?(Se(),Re("div",vJ,[He("h3",EJ,pt(e.label),1),e.label&&e.required?(Se(),Re("span",yJ," * ")):Lt("",!0)])):Lt("",!0)}});const CJ={class:"answer-sheet-input"},TJ={class:"sheet"},OJ={class:"options"},wJ={class:"sheet-content"},RJ={class:"questions"},xJ={class:"answers-container"},IJ=["onClick"],NJ=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=(d,s)=>n.response.value?n.response.value[d]==s:!1,i=()=>Array(n.data.numberOfQuestions+1).fill(null).reduce((d,s,u)=>({...d,[u]:null})),a=(d,s)=>{if(n.data.disabled)return;const u=String(d),o=n.response.value;o[u]===s?o[u]=null:o[u]=s,n.response.setValue(o),t("change",n.response)};return it(()=>{n.response.value||n.response.setValue(i()),t("setInitialValue",n.response)}),(d,s)=>(Se(),Re("div",CJ,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",TJ,[He("div",OJ,[(Se(!0),Re(Xe,null,On(e.data.options,u=>(Se(),Re("p",{key:u},pt(u),1))),128))]),He("div",wJ,[He("div",RJ,[(Se(!0),Re(Xe,null,On(e.data.numberOfQuestions,u=>(Se(),Re("p",{key:`question - ${u}`,class:"question"},pt(u),1))),128))]),He("div",xJ,[(Se(!0),Re(Xe,null,On(e.data.numberOfQuestions,u=>(Se(),Re("div",{key:`answer - ${u}`,class:"answers"},[(Se(!0),Re(Xe,null,On(e.data.options,o=>(Se(),Re("div",{key:`answer-${u}-option-${o}`,class:ct(["box-input","radiobox",{disabled:e.data.disabled}]),onClick:l=>a(u,o)},[He("div",{class:ct(["box",{checked:r(u,o)}])},null,2)],10,IJ))),128))]))),128))])])])]))}});const AJ=Qt(NJ,[["__scopeId","data-v-20006d61"]]),DJ={class:"search"},MJ=["active","onClick"],kJ={key:0,class:"image-container"},PJ=["src"],LJ={class:"text-container"},$J={key:0,class:"extra"},FJ={key:0,class:"left"},BJ={key:1,class:"right"},UJ={key:1,class:"card-title"},GJ={key:2,class:"card-subtitle"},HJ={key:3,class:"card-description"},zJ=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue","card-click"],setup(e,{emit:t}){const n=e;function r(p,f){return jt.exports.isEqual(jt.exports.omit(p,["image"]),jt.exports.omit(f,["image"]))}const i=B(()=>jt.exports.isArray(n.response.value)?n.response.value.filter(p=>p!==null):n.response.value!==null?[n.response.value]:[]),a=B(()=>{var p;return(p=n.data.options)!=null?p:[]}),d=B(()=>{var p;return(p=n.data.searchable)!=null?p:!1}),s=ke("");function u(p){return s.value?p.filter(f=>f.title.toLowerCase().includes(s.value.toLowerCase())||f.description.toLowerCase().includes(s.value.toLowerCase())):p}const o=()=>{const p=n.data.initialValue;return p?jt.exports.isArray(p)?p.map(f=>a.value.find(m=>r(m,f))).filter(f=>f):a.value.filter(f=>r(f,p)):[]};function l(p){return i.value.some(f=>r(f,p))}function c(p){var g;if(t("card-click",p),n.data.disabled)return;const f=l(p);let m=[...i.value];f?m=m.filter(h=>!r(h,p)):m=[p,...m],n.response.setValue(n.data.multiple?m:(g=m[0])!=null?g:null),t("change",n.response)}return it(()=>{n.response.value||n.response.setValue(o()),t("setInitialValue",n.response)}),ze(()=>n.data.options,(p,f)=>{(p.length!=f.length||p.some((m,g)=>!r(m,f[g])))&&n.response.setValue(o())}),(p,f)=>{var m;return Se(),Re("div",{class:"cards-input",style:Zn({"--grid-columns":(m=e.data.columns)!=null?m:2})},[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",DJ,[Ve(d)?ur((Se(),Re("input",{key:0,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value=g),type:"text",class:"input",placeholder:"Search..."},null,512)),[[Ul,s.value]]):Lt("",!0)]),He("div",{class:ct(["cards",e.data.layout||"list"])},[(Se(!0),Re(Xe,null,On(u(Ve(a)),g=>(Se(),Re("div",{key:g.title,class:ct(["card","clickable",e.data.layout||"list",{disabled:e.data.disabled}]),active:l(g),onClick:h=>c(g)},[g.image?(Se(),Re("div",kJ,[He("img",{class:"card-image",src:g.image},null,8,PJ)])):Lt("",!0),He("main",LJ,[g.topLeftExtra||g.topRightExtra?(Se(),Re("div",$J,[g.topLeftExtra?(Se(),Re("p",FJ,pt(g.topLeftExtra),1)):Lt("",!0),g.topRightExtra?(Se(),Re("p",BJ,pt(g.topRightExtra),1)):Lt("",!0)])):Lt("",!0),g.title?(Se(),Re("h1",UJ,pt(g.title),1)):Lt("",!0),g.subtitle?(Se(),Re("h2",GJ,pt(g.subtitle),1)):Lt("",!0),g.description?(Se(),Re("p",HJ,pt(g.description),1)):Lt("",!0)])],10,MJ))),128))],2)],4)}}});const YJ=Qt(zJ,[["__scopeId","data-v-6647eb75"]]),VJ={class:"box-input checkbox"},qJ=Te({__name:"component",props:{data:null,hasError:{type:Boolean},page:null,response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=B(()=>{var d;return(d=n.response.value)!=null?d:!1}),i=()=>{n.data.disabled||a(!n.response.value)},a=d=>{n.data.required&&d===!1&&(d=null),n.response.setValue(d),t("change",n.response)};return it(()=>{n.response.value==null&&a(n.data.initialValue),t("setInitialValue",n.response)}),(d,s)=>{const u=Nl("Markdown");return Se(),Re("div",VJ,[He("div",{class:ct(["box",{checked:Ve(r),disabled:e.data.disabled}]),onClick:s[0]||(s[0]=o=>i())},null,2),N(u,{source:e.data.label,html:""},null,8,["source"])])}}});const jJ=Qt(qJ,[["__scopeId","data-v-2dde0520"]]),WJ={class:"checklist-input"},KJ={class:"choices"},QJ={key:0,class:"checklist-box"},XJ=["active","onClick"],ZJ={key:1,class:"checklist-box"},JJ=["onClick"],eee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},page:null,response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=B(()=>{var l;return(l=n.response.value)!=null?l:[]}),i=B(()=>n.page&&(!n.page.actions||!n.page.actions.length)&&n.page.widgets.indexOf(n.data)===n.page.widgets.length-1),a=B(()=>{var l,c;return(c=(l=n.data.options)==null?void 0:l.map(p=>typeof p=="object"?p:{label:p,value:p}))!=null?c:[]}),d=(l,c=!0)=>{n.response.setValue(l),c&&t("change",n.response)},s=l=>{var p;if(n.data.disabled)return;let c=r.value;(p=r.value)!=null&&p.includes(l)?c=c.filter(f=>f!=l):c.push(l),d(c)},u=()=>{let l=n.data.initialValue;return jt.exports.isArray(l)?l=l.filter(c=>c!=null):l!=null?l=[l]:l=[],l=l.filter(c=>a.value.find(p=>p.value==c)),l},o=()=>{d(u(),!1),t("setInitialValue",n.response)};return it(()=>{n.response.value||o()}),ze(()=>n.data.options,(l,c)=>{jt.exports.isEqual(l,c)||o()}),(l,c)=>{const p=Nl("Markdown");return Se(),Re("div",WJ,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",KJ,[Ve(i)?(Se(),Re("div",QJ,[(Se(!0),Re(Xe,null,On(Ve(a),f=>(Se(),Re("div",{key:f.value,class:ct(["checklist-button",{disabled:e.data.disabled}]),active:Ve(r).includes(f.value),onClick:m=>s(f.value)},[N(p,{source:f.label,html:""},null,8,["source"])],10,XJ))),128))])):(Se(),Re("div",ZJ,[(Se(!0),Re(Xe,null,On(Ve(a),f=>(Se(),Re("div",{key:f.value,class:ct(["box-input","checklist",{disabled:e.data.disabled}]),onClick:m=>s(f.value)},[He("div",{class:ct(["box",{checked:Ve(r).includes(f.value)}])},null,2),N(p,{class:"option-label",source:f.label,html:""},null,8,["source"])],10,JJ))),128))]))])])}}});const tee=Qt(eee,[["__scopeId","data-v-397e3fed"]]),nee=Te({__name:"component",props:{data:null,hasError:{type:Boolean}},emits:["click"],setup(e,{emit:t}){return(n,r)=>(Se(),Re("button",{class:ct(["click-input","button",{disabled:e.data.disabled}]),onClick:r[0]||(r[0]=i=>t("click"))},pt(e.data.label),3))}}),ree=()=>navigator.userAgent.includes("Mac OS X"),bI=e=>ree()?e.metaKey:e.ctrlKey,Ma=class{constructor(t,n){Si(this,"inputElements",[]);Si(this,"lastFocusedElement",null);Si(this,"actions",[]);Si(this,"next",()=>{});Si(this,"handleWindowKeyDown",t=>{var r;if(this.shouldIgnoreKeydown(t)||bI(t))return;const n=(r=this.lastFocusedElement)!=null?r:this.inputElements[0];if(document.activeElement!==n){if(t.key==="Enter"&&!n){t.stopImmediatePropagation(),this.next();return}n==null||n.focus()}});this.inputElements=[],this.next=n,t&&window.addEventListener("keydown",this.handleWindowKeyDown)}static init(t,n){var r;(r=Ma.instance)==null||r.clearWindowListener(),Ma.instance=new Ma(t,n)}static addInput(t,n=!1){var r;!Ma.instance||(r=Ma.instance)==null||r.addInput(t,n)}static addAction(t){var n;!Ma.instance||(n=Ma.instance)==null||n.addAction(t)}clearWindowListener(){window.removeEventListener("keydown",this.handleWindowKeyDown)}blurCurrentlyFocusedElement(){!document.activeElement||!document.activeElement.blur||document.activeElement.blur()}shouldIgnoreKeydown(t,n=!1){const r=!!document.querySelector("[aria-expanded='true']"),i=t.key==="Enter",a=n?i&&!bI(t):i&&t.shiftKey,d=this.actions.some(u=>u.isFocused),s=t.key==="Tab";return r||a||s||d}addInput(t,n=!1){this.inputElements.length===0&&t.focus();const i=this.inputElements.length;this.inputElements.push(t),t.addEventListener("keydown",a=>{var d;if(!this.shouldIgnoreKeydown(a,n)&&a.key==="Enter"){if(this.blurCurrentlyFocusedElement(),!this.inputElements[i+1]){a.stopImmediatePropagation(),this.selectDefaultAction();return}(d=this.inputElements[i+1])==null||d.focus()}}),t.addEventListener("focus",a=>this.lastFocusedElement=a.target,!0)}selectDefaultAction(){var n;if(this.actions.length===0)return this.next();if(this.actions.length===1)return this.next(this.actions[0]);const t=(n=this.actions.find(r=>r.isDefault))!=null?n:this.actions[this.actions.length-1];t==null||t.focusOnButton()}addAction(t){this.actions.push(t);const n=-1,r=1,i=a=>{const d=this.actions.indexOf(t),s=this.actions[d+a];!s||s.focusOnButton()};t.addKeydownListener(a=>{a.key==="ArrowLeft"?i(n):a.key==="ArrowRight"&&i(r)})}};let Cr=Ma;Si(Cr,"instance",null);const iee={0:/\d/,a:/[a-zA-Z]/,"*":/./};function Bs(e,t){var d;if(e.length===0||t.length===0)return"";const n=oee(e,t),r=n[0],i=iee[r];if(!i)return r+Bs(n.slice(1),t.startsWith(r)?t.slice(1):t);const a=t.match(i);return a?a[0]+Bs(n.slice(1),t.slice(((d=a.index)!=null?d:0)+1)):""}function Mp(e,t){if(e.includes("|")){const n=NP(e);return n[n.length-1].length==t.length}return t.length===e.length}function oee(e,t){if(!e.includes("|"))return e;const n=NP(e);for(const r of n)if(t.replace(/\D/g,"").length<=r.replace(/\D/g,"").length)return r;return n[0]}function NP(e){return e.split("|").sort((n,r)=>n.length-r.length)}const aee=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],see=["00","15","30","45"],AP=aee.flatMap(e=>see.map(t=>({hour:e,minute:t}))),DP=e=>({hour:Number(e.hour),minute:Number(e.minute)}),lee=()=>AP.map(e=>{const t=Number(e.hour),n=t<12?"AM":"PM",r=t%12;return{label:`${`${r==0?"12":r}`.padStart(2,"0")}:${e.minute} ${n}`,value:DP(e)}}),cee=()=>AP.map(e=>({label:`${e.hour}:${e.minute}`,value:DP(e)})),MP=e=>e.replace(/\D/g,""),uee=e=>e.length!==MP(e).length,pS=e=>{const t=dee(e);let n,r;if(n=0,t=="00000000000")return!1;for(let i=1;i<=9;i++)n=n+parseInt(t.substring(i-1,i))*(11-i);if(r=n*10%11,(r==10||r==11)&&(r=0),r!=parseInt(t.substring(9,10)))return!1;n=0;for(let i=1;i<=10;i++)n=n+parseInt(t.substring(i-1,i))*(12-i);return r=n*10%11,(r==10||r==11)&&(r=0),r==parseInt(t.substring(10,11))},dee=e=>e.split(".").join("").split("-").join(""),fS=e=>{if(!e||!(typeof e=="string")||e.length>18)return!1;const n=/^\d{14}$/.test(e),r=/^\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}$/.test(e);if(!(n||r))return!1;const i=e.toString().match(/\d/g),a=Array.isArray(i)?i.map(Number):[];if(a.length!==14||[...new Set(a)].length===1)return!1;const s=c=>{const p=a.slice(0,c);let f=c-7,m=0;for(let h=c;h>=1;h--){const b=p[c-h];m+=b*f--,f<2&&(f=9)}const g=11-m%11;return g>9?0:g},u=a.slice(12);return s(12)!==u[0]?!1:s(13)===u[1]};function SE(e){return new Promise((t,n)=>{const r=document.createElement("script");r.src=e,r.onload=t,r.onerror=n,document.head.appendChild(r)})}const pee=(e,t)=>{const n={};return Object.keys(e).forEach(r=>{const i=e[r].constructor.name;i==="Number"?n[r]=Number(t[r]):i==="Boolean"?n[r]=t[r]==="true":i==="Date"?n[r]=new Date(t[r]):i==="String"?n[r]=t[r].toString():i==="Object"||i==="Array"?n[r]=JSON.parse(t[r]):i==="Null"&&(n[r]=null)}),n},fee=["disabled","placeholder"],_ee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r="00.000.000/0000-00";n.response.setValidation(o=>{var c;const l=[];return o&&!fS(o)&&l.push((c=n.data.invalidMessage)!=null?c:""),l});const i=(o,l=!0)=>{o!=u.value.value&&(u.value.value=o),o!=n.response.value&&n.response.setValue(o),console.log(l),l&&t("change",n.response)},a=ke(!1),d=o=>{const l=Bs(r,o),c=Mp(r,o)&&fS(o);a.value=!c,i(l,c)},s=o=>{const l=o.target;Mp(r,l.value)&&fS(l.value)&&o.preventDefault()},u=ke();return it(()=>{var o,l;i((l=(o=n.response.value)!=null?o:n.data.initialValue)!=null?l:"",!1),t("setInitialValue",n.response),Cr.addInput(u.value)}),ze(()=>n.response.value,o=>i(o!=null?o:"",!1)),(o,l)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("input",{ref_key:"input",ref:u,class:ct(["input",(e.hasError||a.value)&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:l[0]||(l[0]=c=>d(c.target.value)),onKeypress:l[1]||(l[1]=c=>s(c))},null,42,fee)],64))}}),mee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=(s,u=!0)=>{s!==n.response.value&&(n.response.setValue(s),u&&t("change",n.response))},i=ke();let a=null;const d=async(s,u,o)=>{const c=(await bM(()=>import("./editor.main.71e27b19.js").then(p=>p.e),["assets/editor.main.71e27b19.js","assets/editor.30d77c87.css"])).editor.create(s,{language:o,value:u,minimap:{enabled:!1},readOnly:n.data.disabled,contextmenu:!0,automaticLayout:!0,tabSize:4,renderWhitespace:"none",guides:{indentation:!1},theme:"vs",fontFamily:"monospace",lineNumbers:"on",scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,renderLineHighlight:"all",scrollbar:{alwaysConsumeMouseWheel:!1}});c.onDidChangeModelContent(()=>{r(String(c.getValue()))}),a=c};return it(()=>{var s;n.data.initialValue&&!n.response.value&&n.response.setValue(n.data.initialValue),t("setInitialValue",n.response),d(i.value,(s=n.response.value)!=null?s:"",n.data.language),Cr.addInput(i.value,!0)}),ze(()=>n.response.value,(s,u)=>{u!=s&&(a==null?void 0:a.getValue())!==s&&(a==null||a.setValue(s!=null?s:""))}),(s,u)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",{ref_key:"editor",ref:i,class:"input code-editor",style:{height:"500px"}},null,512)],64))}});const gee=Qt(mee,[["__scopeId","data-v-1c95e27e"]]),hee={class:"cpf-input"},bee=["disabled","placeholder"],See=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r="000.000.000-00";n.response.setValidation(o=>{var c;const l=[];return o&&!pS(o)&&l.push((c=n.data.invalidMessage)!=null?c:""),l});const i=(o,l=!0)=>{o!=u.value.value&&(u.value.value=o),o!=n.response.value&&n.response.setValue(o),l&&t("change",n.response)},a=ke(!1),d=o=>{const l=Bs(r,o),c=Mp(r,o)&&pS(o);a.value=!c,i(l,c)},s=o=>{const l=o.target;Mp(r,l.value)&&pS(l.value)&&o.preventDefault()},u=ke();return it(()=>{var o,l;i((l=(o=n.response.value)!=null?o:n.data.initialValue)!=null?l:"",!1),t("setInitialValue",n.response),Cr.addInput(u.value)}),ze(()=>n.response.value,o=>i(o!=null?o:"",!1)),(o,l)=>(Se(),Re("div",hee,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("input",{ref_key:"input",ref:u,class:ct(["input",(e.hasError||a.value)&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:l[0]||(l[0]=c=>d(c.target.value)),onKeypress:l[1]||(l[1]=c=>s(c))},null,42,bee)]))}}),vee={class:"currency-input"},Eee={class:"input-wrapper"},yee=["disabled","placeholder","step"],Cee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(!1);n.response.setValidation(l=>{const c=[];return n.data.min&&l&&ln.data.max&&c.push(`The maximum value allowed is ${n.data.max}`),c});const i=Intl.NumberFormat("en-US",{maximumFractionDigits:0,currency:n.data.currency,style:"currency",currencyDisplay:"symbol"}).format(0),a=i.replace("0",""),d=i.length*15+"px",s=(l,c=!0)=>{const p=String(l),f=Number(l);p!=o.value.value&&(o.value.value=p),f!=n.response.value&&n.response.setValue(f),c&&t("change",n.response)},u=l=>{n.response.clearErrors(),s(l)},o=ke();return it(()=>{var l,c;s((c=(l=n.response.value)!=null?l:n.data.initialValue)!=null?c:"",!1),t("setInitialValue",n.response),Cr.addInput(o.value)}),ze(()=>n.response.value,l=>s(l!=null?l:"",!1)),(l,c)=>(Se(),Re("div",vee,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",Eee,[He("div",{class:ct(["symbol",{focused:r.value}])},pt(Ve(a)),3),He("input",{ref_key:"input",ref:o,style:Zn({paddingLeft:d}),class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,type:"number",placeholder:e.data.placeholder,step:e.data.step,onInput:c[0]||(c[0]=p=>u(p.target.value))},null,46,yee)])]))}});const Tee=Qt(Cee,[["__scopeId","data-v-623617b6"]]),Oee={class:"custom-input",style:{height:"100%",width:"100%"}},wee=["id","src"],Ree=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","custom-event","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(),i=Math.random().toString(36).slice(2),a=ke("");let d="";const s=(c,p=!0)=>{c!=n.response.value&&(d=c,n.response.setValue(c)),p&&t("change",n.response)},u=c=>typeof c=="object"&&c!==null&&"type"in c&&"id"in c&&c.id===i,o=c=>{!u(c.data)||(c.data.type==="change"?s(c.data.payload):t(c.data.type,c.data.payload))};it(()=>{var c,p;s((p=(c=n.response.value)!=null?c:n.data.initialValue)!=null?p:"",!1),t("setInitialValue",n.response),window.addEventListener("message",o),l()}),tn(()=>{window.removeEventListener("message",o)}),ze(()=>n.response.value,(c,p)=>{jt.exports.isEqual(c,p)||d&&jt.exports.isEqual(d,c)||l()}),ze(()=>n.data.initialValue,(c,p)=>{jt.exports.isEqual(c,p)||l()}),ze(()=>`${n.data.htmlHead}${n.data.htmlBody}${n.data.css}${n.data.js}`,()=>l());const l=()=>{var b,v;const c="script",p=(v=(b=n.response.value)!=null?b:n.data.initialValue)!=null?v:"",{htmlHead:f,htmlBody:m,css:g,js:h}=n.data;a.value=window.btoa(` +`;bJ(SJ);fJ.render=hJ;const vJ={key:0,class:"label-container"},EJ={class:"label"},yJ={key:0,class:"required"},mn=Te({__name:"Label",props:{label:null,required:{type:Boolean}},setup(e){return(t,n)=>e.label?(Se(),Re("div",vJ,[He("h3",EJ,pt(e.label),1),e.label&&e.required?(Se(),Re("span",yJ," * ")):Lt("",!0)])):Lt("",!0)}});const CJ={class:"answer-sheet-input"},TJ={class:"sheet"},OJ={class:"options"},wJ={class:"sheet-content"},RJ={class:"questions"},xJ={class:"answers-container"},IJ=["onClick"],NJ=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=(d,s)=>n.response.value?n.response.value[d]==s:!1,i=()=>Array(n.data.numberOfQuestions+1).fill(null).reduce((d,s,u)=>({...d,[u]:null})),a=(d,s)=>{if(n.data.disabled)return;const u=String(d),o=n.response.value;o[u]===s?o[u]=null:o[u]=s,n.response.setValue(o),t("change",n.response)};return it(()=>{n.response.value||n.response.setValue(i()),t("setInitialValue",n.response)}),(d,s)=>(Se(),Re("div",CJ,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",TJ,[He("div",OJ,[(Se(!0),Re(Xe,null,On(e.data.options,u=>(Se(),Re("p",{key:u},pt(u),1))),128))]),He("div",wJ,[He("div",RJ,[(Se(!0),Re(Xe,null,On(e.data.numberOfQuestions,u=>(Se(),Re("p",{key:`question - ${u}`,class:"question"},pt(u),1))),128))]),He("div",xJ,[(Se(!0),Re(Xe,null,On(e.data.numberOfQuestions,u=>(Se(),Re("div",{key:`answer - ${u}`,class:"answers"},[(Se(!0),Re(Xe,null,On(e.data.options,o=>(Se(),Re("div",{key:`answer-${u}-option-${o}`,class:ct(["box-input","radiobox",{disabled:e.data.disabled}]),onClick:l=>a(u,o)},[He("div",{class:ct(["box",{checked:r(u,o)}])},null,2)],10,IJ))),128))]))),128))])])])]))}});const AJ=Qt(NJ,[["__scopeId","data-v-20006d61"]]),DJ={class:"search"},MJ=["active","onClick"],kJ={key:0,class:"image-container"},PJ=["src"],LJ={class:"text-container"},$J={key:0,class:"extra"},FJ={key:0,class:"left"},BJ={key:1,class:"right"},UJ={key:1,class:"card-title"},GJ={key:2,class:"card-subtitle"},HJ={key:3,class:"card-description"},zJ=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue","card-click"],setup(e,{emit:t}){const n=e;function r(p,f){return jt.exports.isEqual(jt.exports.omit(p,["image"]),jt.exports.omit(f,["image"]))}const i=B(()=>jt.exports.isArray(n.response.value)?n.response.value.filter(p=>p!==null):n.response.value!==null?[n.response.value]:[]),a=B(()=>{var p;return(p=n.data.options)!=null?p:[]}),d=B(()=>{var p;return(p=n.data.searchable)!=null?p:!1}),s=ke("");function u(p){return s.value?p.filter(f=>f.title.toLowerCase().includes(s.value.toLowerCase())||f.description.toLowerCase().includes(s.value.toLowerCase())):p}const o=()=>{const p=n.data.initialValue;return p?jt.exports.isArray(p)?p.map(f=>a.value.find(m=>r(m,f))).filter(f=>f):a.value.filter(f=>r(f,p)):[]};function l(p){return i.value.some(f=>r(f,p))}function c(p){var g;if(t("card-click",p),n.data.disabled)return;const f=l(p);let m=[...i.value];f?m=m.filter(h=>!r(h,p)):m=[p,...m],n.response.setValue(n.data.multiple?m:(g=m[0])!=null?g:null),t("change",n.response)}return it(()=>{n.response.value||n.response.setValue(o()),t("setInitialValue",n.response)}),ze(()=>n.data.options,(p,f)=>{(p.length!=f.length||p.some((m,g)=>!r(m,f[g])))&&n.response.setValue(o())}),(p,f)=>{var m;return Se(),Re("div",{class:"cards-input",style:Zn({"--grid-columns":(m=e.data.columns)!=null?m:2})},[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",DJ,[Ve(d)?ur((Se(),Re("input",{key:0,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value=g),type:"text",class:"input",placeholder:"Search..."},null,512)),[[Ul,s.value]]):Lt("",!0)]),He("div",{class:ct(["cards",e.data.layout||"list"])},[(Se(!0),Re(Xe,null,On(u(Ve(a)),g=>(Se(),Re("div",{key:g.title,class:ct(["card","clickable",e.data.layout||"list",{disabled:e.data.disabled}]),active:l(g),onClick:h=>c(g)},[g.image?(Se(),Re("div",kJ,[He("img",{class:"card-image",src:g.image},null,8,PJ)])):Lt("",!0),He("main",LJ,[g.topLeftExtra||g.topRightExtra?(Se(),Re("div",$J,[g.topLeftExtra?(Se(),Re("p",FJ,pt(g.topLeftExtra),1)):Lt("",!0),g.topRightExtra?(Se(),Re("p",BJ,pt(g.topRightExtra),1)):Lt("",!0)])):Lt("",!0),g.title?(Se(),Re("h1",UJ,pt(g.title),1)):Lt("",!0),g.subtitle?(Se(),Re("h2",GJ,pt(g.subtitle),1)):Lt("",!0),g.description?(Se(),Re("p",HJ,pt(g.description),1)):Lt("",!0)])],10,MJ))),128))],2)],4)}}});const YJ=Qt(zJ,[["__scopeId","data-v-6647eb75"]]),VJ={class:"box-input checkbox"},qJ=Te({__name:"component",props:{data:null,hasError:{type:Boolean},page:null,response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=B(()=>{var d;return(d=n.response.value)!=null?d:!1}),i=()=>{n.data.disabled||a(!n.response.value)},a=d=>{n.data.required&&d===!1&&(d=null),n.response.setValue(d),t("change",n.response)};return it(()=>{n.response.value==null&&a(n.data.initialValue),t("setInitialValue",n.response)}),(d,s)=>{const u=Nl("Markdown");return Se(),Re("div",VJ,[He("div",{class:ct(["box",{checked:Ve(r),disabled:e.data.disabled}]),onClick:s[0]||(s[0]=o=>i())},null,2),N(u,{source:e.data.label,html:""},null,8,["source"])])}}});const jJ=Qt(qJ,[["__scopeId","data-v-2dde0520"]]),WJ={class:"checklist-input"},KJ={class:"choices"},QJ={key:0,class:"checklist-box"},XJ=["active","onClick"],ZJ={key:1,class:"checklist-box"},JJ=["onClick"],eee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},page:null,response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=B(()=>{var l;return(l=n.response.value)!=null?l:[]}),i=B(()=>n.page&&(!n.page.actions||!n.page.actions.length)&&n.page.widgets.indexOf(n.data)===n.page.widgets.length-1),a=B(()=>{var l,c;return(c=(l=n.data.options)==null?void 0:l.map(p=>typeof p=="object"?p:{label:p,value:p}))!=null?c:[]}),d=(l,c=!0)=>{n.response.setValue(l),c&&t("change",n.response)},s=l=>{var p;if(n.data.disabled)return;let c=r.value;(p=r.value)!=null&&p.includes(l)?c=c.filter(f=>f!=l):c.push(l),d(c)},u=()=>{let l=n.data.initialValue;return jt.exports.isArray(l)?l=l.filter(c=>c!=null):l!=null?l=[l]:l=[],l=l.filter(c=>a.value.find(p=>p.value==c)),l},o=()=>{d(u(),!1),t("setInitialValue",n.response)};return it(()=>{n.response.value||o()}),ze(()=>n.data.options,(l,c)=>{jt.exports.isEqual(l,c)||o()}),(l,c)=>{const p=Nl("Markdown");return Se(),Re("div",WJ,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",KJ,[Ve(i)?(Se(),Re("div",QJ,[(Se(!0),Re(Xe,null,On(Ve(a),f=>(Se(),Re("div",{key:f.value,class:ct(["checklist-button",{disabled:e.data.disabled}]),active:Ve(r).includes(f.value),onClick:m=>s(f.value)},[N(p,{source:f.label,html:""},null,8,["source"])],10,XJ))),128))])):(Se(),Re("div",ZJ,[(Se(!0),Re(Xe,null,On(Ve(a),f=>(Se(),Re("div",{key:f.value,class:ct(["box-input","checklist",{disabled:e.data.disabled}]),onClick:m=>s(f.value)},[He("div",{class:ct(["box",{checked:Ve(r).includes(f.value)}])},null,2),N(p,{class:"option-label",source:f.label,html:""},null,8,["source"])],10,JJ))),128))]))])])}}});const tee=Qt(eee,[["__scopeId","data-v-397e3fed"]]),nee=Te({__name:"component",props:{data:null,hasError:{type:Boolean}},emits:["click"],setup(e,{emit:t}){return(n,r)=>(Se(),Re("button",{class:ct(["click-input","button",{disabled:e.data.disabled}]),onClick:r[0]||(r[0]=i=>t("click"))},pt(e.data.label),3))}}),ree=()=>navigator.userAgent.includes("Mac OS X"),bI=e=>ree()?e.metaKey:e.ctrlKey,Ma=class{constructor(t,n){Si(this,"inputElements",[]);Si(this,"lastFocusedElement",null);Si(this,"actions",[]);Si(this,"next",()=>{});Si(this,"handleWindowKeyDown",t=>{var r;if(this.shouldIgnoreKeydown(t)||bI(t))return;const n=(r=this.lastFocusedElement)!=null?r:this.inputElements[0];if(document.activeElement!==n){if(t.key==="Enter"&&!n){t.stopImmediatePropagation(),this.next();return}n==null||n.focus()}});this.inputElements=[],this.next=n,t&&window.addEventListener("keydown",this.handleWindowKeyDown)}static init(t,n){var r;(r=Ma.instance)==null||r.clearWindowListener(),Ma.instance=new Ma(t,n)}static addInput(t,n=!1){var r;!Ma.instance||(r=Ma.instance)==null||r.addInput(t,n)}static addAction(t){var n;!Ma.instance||(n=Ma.instance)==null||n.addAction(t)}clearWindowListener(){window.removeEventListener("keydown",this.handleWindowKeyDown)}blurCurrentlyFocusedElement(){!document.activeElement||!document.activeElement.blur||document.activeElement.blur()}shouldIgnoreKeydown(t,n=!1){const r=!!document.querySelector("[aria-expanded='true']"),i=t.key==="Enter",a=n?i&&!bI(t):i&&t.shiftKey,d=this.actions.some(u=>u.isFocused),s=t.key==="Tab";return r||a||s||d}addInput(t,n=!1){this.inputElements.length===0&&t.focus();const i=this.inputElements.length;this.inputElements.push(t),t.addEventListener("keydown",a=>{var d;if(!this.shouldIgnoreKeydown(a,n)&&a.key==="Enter"){if(this.blurCurrentlyFocusedElement(),!this.inputElements[i+1]){a.stopImmediatePropagation(),this.selectDefaultAction();return}(d=this.inputElements[i+1])==null||d.focus()}}),t.addEventListener("focus",a=>this.lastFocusedElement=a.target,!0)}selectDefaultAction(){var n;if(this.actions.length===0)return this.next();if(this.actions.length===1)return this.next(this.actions[0]);const t=(n=this.actions.find(r=>r.isDefault))!=null?n:this.actions[this.actions.length-1];t==null||t.focusOnButton()}addAction(t){this.actions.push(t);const n=-1,r=1,i=a=>{const d=this.actions.indexOf(t),s=this.actions[d+a];!s||s.focusOnButton()};t.addKeydownListener(a=>{a.key==="ArrowLeft"?i(n):a.key==="ArrowRight"&&i(r)})}};let Cr=Ma;Si(Cr,"instance",null);const iee={0:/\d/,a:/[a-zA-Z]/,"*":/./};function Bs(e,t){var d;if(e.length===0||t.length===0)return"";const n=oee(e,t),r=n[0],i=iee[r];if(!i)return r+Bs(n.slice(1),t.startsWith(r)?t.slice(1):t);const a=t.match(i);return a?a[0]+Bs(n.slice(1),t.slice(((d=a.index)!=null?d:0)+1)):""}function Mp(e,t){if(e.includes("|")){const n=NP(e);return n[n.length-1].length==t.length}return t.length===e.length}function oee(e,t){if(!e.includes("|"))return e;const n=NP(e);for(const r of n)if(t.replace(/\D/g,"").length<=r.replace(/\D/g,"").length)return r;return n[0]}function NP(e){return e.split("|").sort((n,r)=>n.length-r.length)}const aee=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],see=["00","15","30","45"],AP=aee.flatMap(e=>see.map(t=>({hour:e,minute:t}))),DP=e=>({hour:Number(e.hour),minute:Number(e.minute)}),lee=()=>AP.map(e=>{const t=Number(e.hour),n=t<12?"AM":"PM",r=t%12;return{label:`${`${r==0?"12":r}`.padStart(2,"0")}:${e.minute} ${n}`,value:DP(e)}}),cee=()=>AP.map(e=>({label:`${e.hour}:${e.minute}`,value:DP(e)})),MP=e=>e.replace(/\D/g,""),uee=e=>e.length!==MP(e).length,pS=e=>{const t=dee(e);let n,r;if(n=0,t=="00000000000")return!1;for(let i=1;i<=9;i++)n=n+parseInt(t.substring(i-1,i))*(11-i);if(r=n*10%11,(r==10||r==11)&&(r=0),r!=parseInt(t.substring(9,10)))return!1;n=0;for(let i=1;i<=10;i++)n=n+parseInt(t.substring(i-1,i))*(12-i);return r=n*10%11,(r==10||r==11)&&(r=0),r==parseInt(t.substring(10,11))},dee=e=>e.split(".").join("").split("-").join(""),fS=e=>{if(!e||!(typeof e=="string")||e.length>18)return!1;const n=/^\d{14}$/.test(e),r=/^\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}$/.test(e);if(!(n||r))return!1;const i=e.toString().match(/\d/g),a=Array.isArray(i)?i.map(Number):[];if(a.length!==14||[...new Set(a)].length===1)return!1;const s=c=>{const p=a.slice(0,c);let f=c-7,m=0;for(let h=c;h>=1;h--){const b=p[c-h];m+=b*f--,f<2&&(f=9)}const g=11-m%11;return g>9?0:g},u=a.slice(12);return s(12)!==u[0]?!1:s(13)===u[1]};function SE(e){return new Promise((t,n)=>{const r=document.createElement("script");r.src=e,r.onload=t,r.onerror=n,document.head.appendChild(r)})}const pee=(e,t)=>{const n={};return Object.keys(e).forEach(r=>{const i=e[r].constructor.name;i==="Number"?n[r]=Number(t[r]):i==="Boolean"?n[r]=t[r]==="true":i==="Date"?n[r]=new Date(t[r]):i==="String"?n[r]=t[r].toString():i==="Object"||i==="Array"?n[r]=JSON.parse(t[r]):i==="Null"&&(n[r]=null)}),n},fee=["disabled","placeholder"],_ee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r="00.000.000/0000-00";n.response.setValidation(o=>{var c;const l=[];return o&&!fS(o)&&l.push((c=n.data.invalidMessage)!=null?c:""),l});const i=(o,l=!0)=>{o!=u.value.value&&(u.value.value=o),o!=n.response.value&&n.response.setValue(o),console.log(l),l&&t("change",n.response)},a=ke(!1),d=o=>{const l=Bs(r,o),c=Mp(r,o)&&fS(o);a.value=!c,i(l,c)},s=o=>{const l=o.target;Mp(r,l.value)&&fS(l.value)&&o.preventDefault()},u=ke();return it(()=>{var o,l;i((l=(o=n.response.value)!=null?o:n.data.initialValue)!=null?l:"",!1),t("setInitialValue",n.response),Cr.addInput(u.value)}),ze(()=>n.response.value,o=>i(o!=null?o:"",!1)),(o,l)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("input",{ref_key:"input",ref:u,class:ct(["input",(e.hasError||a.value)&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:l[0]||(l[0]=c=>d(c.target.value)),onKeypress:l[1]||(l[1]=c=>s(c))},null,42,fee)],64))}}),mee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=(s,u=!0)=>{s!==n.response.value&&(n.response.setValue(s),u&&t("change",n.response))},i=ke();let a=null;const d=async(s,u,o)=>{const c=(await bM(()=>import("./editor.main.1c8cebfc.js").then(p=>p.e),["assets/editor.main.1c8cebfc.js","assets/editor.30d77c87.css"])).editor.create(s,{language:o,value:u,minimap:{enabled:!1},readOnly:n.data.disabled,contextmenu:!0,automaticLayout:!0,tabSize:4,renderWhitespace:"none",guides:{indentation:!1},theme:"vs",fontFamily:"monospace",lineNumbers:"on",scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,renderLineHighlight:"all",scrollbar:{alwaysConsumeMouseWheel:!1}});c.onDidChangeModelContent(()=>{r(String(c.getValue()))}),a=c};return it(()=>{var s;n.data.initialValue&&!n.response.value&&n.response.setValue(n.data.initialValue),t("setInitialValue",n.response),d(i.value,(s=n.response.value)!=null?s:"",n.data.language),Cr.addInput(i.value,!0)}),ze(()=>n.response.value,(s,u)=>{u!=s&&(a==null?void 0:a.getValue())!==s&&(a==null||a.setValue(s!=null?s:""))}),(s,u)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",{ref_key:"editor",ref:i,class:"input code-editor",style:{height:"500px"}},null,512)],64))}});const gee=Qt(mee,[["__scopeId","data-v-1c95e27e"]]),hee={class:"cpf-input"},bee=["disabled","placeholder"],See=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r="000.000.000-00";n.response.setValidation(o=>{var c;const l=[];return o&&!pS(o)&&l.push((c=n.data.invalidMessage)!=null?c:""),l});const i=(o,l=!0)=>{o!=u.value.value&&(u.value.value=o),o!=n.response.value&&n.response.setValue(o),l&&t("change",n.response)},a=ke(!1),d=o=>{const l=Bs(r,o),c=Mp(r,o)&&pS(o);a.value=!c,i(l,c)},s=o=>{const l=o.target;Mp(r,l.value)&&pS(l.value)&&o.preventDefault()},u=ke();return it(()=>{var o,l;i((l=(o=n.response.value)!=null?o:n.data.initialValue)!=null?l:"",!1),t("setInitialValue",n.response),Cr.addInput(u.value)}),ze(()=>n.response.value,o=>i(o!=null?o:"",!1)),(o,l)=>(Se(),Re("div",hee,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("input",{ref_key:"input",ref:u,class:ct(["input",(e.hasError||a.value)&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:l[0]||(l[0]=c=>d(c.target.value)),onKeypress:l[1]||(l[1]=c=>s(c))},null,42,bee)]))}}),vee={class:"currency-input"},Eee={class:"input-wrapper"},yee=["disabled","placeholder","step"],Cee=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(!1);n.response.setValidation(l=>{const c=[];return n.data.min&&l&&ln.data.max&&c.push(`The maximum value allowed is ${n.data.max}`),c});const i=Intl.NumberFormat("en-US",{maximumFractionDigits:0,currency:n.data.currency,style:"currency",currencyDisplay:"symbol"}).format(0),a=i.replace("0",""),d=i.length*15+"px",s=(l,c=!0)=>{const p=String(l),f=Number(l);p!=o.value.value&&(o.value.value=p),f!=n.response.value&&n.response.setValue(f),c&&t("change",n.response)},u=l=>{n.response.clearErrors(),s(l)},o=ke();return it(()=>{var l,c;s((c=(l=n.response.value)!=null?l:n.data.initialValue)!=null?c:"",!1),t("setInitialValue",n.response),Cr.addInput(o.value)}),ze(()=>n.response.value,l=>s(l!=null?l:"",!1)),(l,c)=>(Se(),Re("div",vee,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",Eee,[He("div",{class:ct(["symbol",{focused:r.value}])},pt(Ve(a)),3),He("input",{ref_key:"input",ref:o,style:Zn({paddingLeft:d}),class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,type:"number",placeholder:e.data.placeholder,step:e.data.step,onInput:c[0]||(c[0]=p=>u(p.target.value))},null,46,yee)])]))}});const Tee=Qt(Cee,[["__scopeId","data-v-623617b6"]]),Oee={class:"custom-input",style:{height:"100%",width:"100%"}},wee=["id","src"],Ree=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","custom-event","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(),i=Math.random().toString(36).slice(2),a=ke("");let d="";const s=(c,p=!0)=>{c!=n.response.value&&(d=c,n.response.setValue(c)),p&&t("change",n.response)},u=c=>typeof c=="object"&&c!==null&&"type"in c&&"id"in c&&c.id===i,o=c=>{!u(c.data)||(c.data.type==="change"?s(c.data.payload):t(c.data.type,c.data.payload))};it(()=>{var c,p;s((p=(c=n.response.value)!=null?c:n.data.initialValue)!=null?p:"",!1),t("setInitialValue",n.response),window.addEventListener("message",o),l()}),tn(()=>{window.removeEventListener("message",o)}),ze(()=>n.response.value,(c,p)=>{jt.exports.isEqual(c,p)||d&&jt.exports.isEqual(d,c)||l()}),ze(()=>n.data.initialValue,(c,p)=>{jt.exports.isEqual(c,p)||l()}),ze(()=>`${n.data.htmlHead}${n.data.htmlBody}${n.data.css}${n.data.js}`,()=>l());const l=()=>{var b,v;const c="script",p=(v=(b=n.response.value)!=null?b:n.data.initialValue)!=null?v:"",{htmlHead:f,htmlBody:m,css:g,js:h}=n.data;a.value=window.btoa(` @@ -675,5 +675,5 @@ summary tabindex target title type usemap value width wmode wrap`,Ype=`onCopy on &${t}-row:hover > td, > td${t}-cell-row-hover, &${t}-row${t}-row-selected > td - `]:{borderTopColor:"transparent","&:first-child":{borderStartStartRadius:l,borderEndStartRadius:l},"&:last-child":{borderStartEndRadius:l,borderEndEndRadius:l}}},[`${t}-footer`]:{padding:`${r}px ${i}px`,color:v,background:E}})}},Oye=Or("Table",e=>{const{controlItemBgActive:t,controlItemBgActiveHover:n,colorTextPlaceholder:r,colorTextHeading:i,colorSplit:a,colorBorderSecondary:d,fontSize:s,padding:u,paddingXS:o,paddingSM:l,controlHeight:c,colorFillAlter:p,colorIcon:f,colorIconHover:m,opacityLoading:g,colorBgContainer:h,borderRadiusLG:b,colorFillContent:v,colorFillSecondary:E,controlInteractiveSize:y}=e,T=new Kn(f),O=new Kn(m),C=t,R=2,x=new Kn(E).onBackground(h).toHexString(),I=new Kn(v).onBackground(h).toHexString(),k=new Kn(p).onBackground(h).toHexString(),L=_n(e,{tableFontSize:s,tableBg:h,tableRadius:b,tablePaddingVertical:u,tablePaddingHorizontal:u,tablePaddingVerticalMiddle:l,tablePaddingHorizontalMiddle:o,tablePaddingVerticalSmall:o,tablePaddingHorizontalSmall:o,tableBorderColor:d,tableHeaderTextColor:i,tableHeaderBg:k,tableFooterTextColor:i,tableFooterBg:k,tableHeaderCellSplitColor:d,tableHeaderSortBg:x,tableHeaderSortHoverBg:I,tableHeaderIconColor:T.clone().setAlpha(T.getAlpha()*g).toRgbString(),tableHeaderIconColorHover:O.clone().setAlpha(O.getAlpha()*g).toRgbString(),tableBodySortBg:k,tableFixedHeaderSortActiveBg:x,tableHeaderFilterActiveBg:v,tableFilterDropdownBg:h,tableRowHoverBg:k,tableSelectedRowBg:C,tableSelectedRowHoverBg:n,zIndexTableFixed:R,zIndexTableSticky:R+1,tableFontSizeMiddle:s,tableFontSizeSmall:s,tableSelectionColumnWidth:c,tableExpandIconBg:h,tableExpandColumnWidth:y+2*e.padding,tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollBg:a});return[Tye(L),lye(L),HD(L),vye(L),iye(L),QEe(L),uye(L),nye(L),HD(L),eye(L),_ye(L),aye(L),yye(L),ZEe(L),gye(L),bye(L),pye(L)]}),wye=[],qB=()=>({prefixCls:rr(),columns:Nr(),rowKey:Xr([String,Function]),tableLayout:rr(),rowClassName:Xr([String,Function]),title:Bt(),footer:Bt(),id:rr(),showHeader:Ct(),components:an(),customRow:Bt(),customHeaderRow:Bt(),direction:rr(),expandFixed:Xr([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:Nr(),defaultExpandedRowKeys:Nr(),expandedRowRender:Bt(),expandRowByClick:Ct(),expandIcon:Bt(),onExpand:Bt(),onExpandedRowsChange:Bt(),"onUpdate:expandedRowKeys":Bt(),defaultExpandAllRows:Ct(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:Ct(),expandedRowClassName:Bt(),childrenColumnName:rr(),rowExpandable:Bt(),sticky:Xr([Boolean,Object]),dropdownPrefixCls:String,dataSource:Nr(),pagination:Xr([Boolean,Object]),loading:Xr([Boolean,Object]),size:rr(),bordered:Ct(),locale:an(),onChange:Bt(),onResizeColumn:Bt(),rowSelection:an(),getPopupContainer:Bt(),scroll:an(),sortDirections:Nr(),showSorterTooltip:Xr([Boolean,Object],!0),transformCellText:Bt()}),Rye=Te({name:"InteralTable",inheritAttrs:!1,props:Vr(M(M({},qB()),{contextSlots:an()}),{rowKey:"key"}),setup(e,t){let{attrs:n,slots:r,expose:i,emit:a}=t;Yr(!(typeof e.rowKey=="function"&&e.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),hve(B(()=>e.contextSlots)),bve({onResizeColumn:(ae,be)=>{a("resizeColumn",ae,be)}});const d=Q$(),s=B(()=>{const ae=new Set(Object.keys(d.value).filter(be=>d.value[be]));return e.columns.filter(be=>!be.responsive||be.responsive.some(ve=>ae.has(ve)))}),{size:u,renderEmpty:o,direction:l,prefixCls:c,configProvider:p}=dn("table",e),[f,m]=Oye(c),g=B(()=>{var ae;return e.transformCellText||((ae=p.transformCellText)===null||ae===void 0?void 0:ae.value)}),[h]=NC("Table",Ws.Table,cn(e,"locale")),b=B(()=>e.dataSource||wye),v=B(()=>p.getPrefixCls("dropdown",e.dropdownPrefixCls)),E=B(()=>e.childrenColumnName||"children"),y=B(()=>b.value.some(ae=>ae==null?void 0:ae[E.value])?"nest":e.expandedRowRender?"row":null),T=Kt({body:null}),O=ae=>{M(T,ae)},C=B(()=>typeof e.rowKey=="function"?e.rowKey:ae=>ae==null?void 0:ae[e.rowKey]),[R]=uEe(b,E,C),x={},I=function(ae,be){let ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:ge,scroll:ce,onChange:ee}=e,Ne=M(M({},x),ae);ve&&(x.resetPagination(),Ne.pagination.current&&(Ne.pagination.current=1),ge&&ge.onChange&&ge.onChange(1,Ne.pagination.pageSize)),ce&&ce.scrollToFirstRowOnChange!==!1&&T.body&&Ole(0,{getContainer:()=>T.body}),ee==null||ee(Ne.pagination,Ne.filters,Ne.sorter,{currentDataSource:GD(vy(b.value,Ne.sorterStates,E.value),Ne.filterStates),action:be})},k=(ae,be)=>{I({sorter:ae,sorterStates:be},"sort",!1)},[L,A,D,$]=mEe({prefixCls:c,mergedColumns:s,onSorterChange:k,sortDirections:B(()=>e.sortDirections||["ascend","descend"]),tableLocale:h,showSorterTooltip:cn(e,"showSorterTooltip")}),F=B(()=>vy(b.value,A.value,E.value)),z=(ae,be)=>{I({filters:ae,filterStates:be},"filter",!0)},[H,V,W]=VEe({prefixCls:c,locale:h,dropdownPrefixCls:v,mergedColumns:s,onFilterChange:z,getPopupContainer:cn(e,"getPopupContainer")}),te=B(()=>GD(F.value,V.value)),[X]=WEe(cn(e,"contextSlots")),ne=B(()=>{const ae={},be=W.value;return Object.keys(be).forEach(ve=>{be[ve]!==null&&(ae[ve]=be[ve])}),M(M({},D.value),{filters:ae})}),[oe]=qEe(ne),Q=(ae,be)=>{I({pagination:M(M({},x.pagination),{current:ae,pageSize:be})},"paginate")},[Z,q]=cEe(B(()=>te.value.length),cn(e,"pagination"),Q);Ht(()=>{x.sorter=$.value,x.sorterStates=A.value,x.filters=W.value,x.filterStates=V.value,x.pagination=e.pagination===!1?{}:lEe(Z.value,e.pagination),x.resetPagination=q});const se=B(()=>{if(e.pagination===!1||!Z.value.pageSize)return te.value;const{current:ae=1,total:be,pageSize:ve=my}=Z.value;return Yr(ae>0,"Table","`current` should be positive number."),te.value.lengthve?te.value.slice((ae-1)*ve,ae*ve):te.value:te.value.slice((ae-1)*ve,ae*ve)});Ht(()=>{en(()=>{const{total:ae,pageSize:be=my}=Z.value;te.value.lengthbe&&Yr(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const re=B(()=>e.showExpandColumn===!1?-1:y.value==="nest"&&e.expandIconColumnIndex===void 0?e.rowSelection?1:0:e.expandIconColumnIndex>0&&e.rowSelection?e.expandIconColumnIndex-1:e.expandIconColumnIndex),_e=ke();ze(()=>e.rowSelection,()=>{_e.value=e.rowSelection?M({},e.rowSelection):e.rowSelection},{deep:!0,immediate:!0});const[me,U]=pEe(_e,{prefixCls:c,data:te,pageData:se,getRowKey:C,getRecordByKey:R,expandType:y,childrenColumnName:E,locale:h,getPopupContainer:B(()=>e.getPopupContainer)}),j=(ae,be,ve)=>{let ge;const{rowClassName:ce}=e;return typeof ce=="function"?ge=Ue(ce(ae,be,ve)):ge=Ue(ce),Ue({[`${c.value}-row-selected`]:U.value.has(C.value(ae,be))},ge)};i({selectedKeySet:U});const J=B(()=>typeof e.indentSize=="number"?e.indentSize:15),pe=ae=>oe(me(H(L(X(ae)))));return()=>{var ae;const{expandIcon:be=r.expandIcon||jEe(h.value),pagination:ve,loading:ge,bordered:ce}=e;let ee,Ne;if(ve!==!1&&((ae=Z.value)===null||ae===void 0?void 0:ae.total)){let ie;Z.value.size?ie=Z.value.size:ie=u.value==="small"||u.value==="middle"?"small":void 0;const Ee=Ke=>N(rve,he(he({},Z.value),{},{class:[`${c.value}-pagination ${c.value}-pagination-${Ke}`,Z.value.class],size:ie}),null),Le=l.value==="rtl"?"left":"right",{position:We}=Z.value;if(We!==null&&Array.isArray(We)){const Ke=We.find(Pe=>Pe.includes("top")),xe=We.find(Pe=>Pe.includes("bottom")),Me=We.every(Pe=>`${Pe}`=="none");!Ke&&!xe&&!Me&&(Ne=Ee(Le)),Ke&&(ee=Ee(Ke.toLowerCase().replace("top",""))),xe&&(Ne=Ee(xe.toLowerCase().replace("bottom","")))}else Ne=Ee(Le)}let Oe;typeof ge=="boolean"?Oe={spinning:ge}:typeof ge=="object"&&(Oe=M({spinning:!0},ge));const Ae=Ue(`${c.value}-wrapper`,{[`${c.value}-wrapper-rtl`]:l.value==="rtl"},n.class,m.value),ue=dr(e,["columns"]);return f(N("div",{class:Ae,style:n.style},[N(fp,he({spinning:!1},Oe),{default:()=>[ee,N(aEe,he(he(he({},n),ue),{},{expandedRowKeys:e.expandedRowKeys,defaultExpandedRowKeys:e.defaultExpandedRowKeys,expandIconColumnIndex:re.value,indentSize:J.value,expandIcon:be,columns:s.value,direction:l.value,prefixCls:c.value,class:Ue({[`${c.value}-middle`]:u.value==="middle",[`${c.value}-small`]:u.value==="small",[`${c.value}-bordered`]:ce,[`${c.value}-empty`]:b.value.length===0}),data:se.value,rowKey:C.value,rowClassName:j,internalHooks:_y,internalRefs:T,onUpdateInternalRefs:O,transformColumns:pe,transformCellText:g.value}),M(M({},r),{emptyText:()=>{var ie,Ee;return((ie=r.emptyText)===null||ie===void 0?void 0:ie.call(r))||((Ee=e.locale)===null||Ee===void 0?void 0:Ee.emptyText)||o("Table")}})),Ne]})]))}}}),xye=Te({name:"ATable",inheritAttrs:!1,props:Vr(qB(),{rowKey:"key"}),slots:Object,setup(e,t){let{attrs:n,slots:r,expose:i}=t;const a=ke();return i({table:a}),()=>{var d;const s=e.columns||$B((d=r.default)===null||d===void 0?void 0:d.call(r));return N(Rye,he(he(he({ref:a},n),e),{},{columns:s||[],expandedRowRender:r.expandedRowRender,contextSlots:M({},r)}),r)}}}),JS=xye,ev=Te({name:"ATableColumn",slots:Object,render(){return null}}),tv=Te({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),Cy=Wve,Ty=Xve,nv=M(Zve,{Cell:Ty,Row:Cy,name:"ATableSummary"}),Iye=M(JS,{SELECTION_ALL:gy,SELECTION_INVERT:hy,SELECTION_NONE:by,SELECTION_COLUMN:Aa,EXPAND_COLUMN:Rs,Column:ev,ColumnGroup:tv,Summary:nv,install:e=>(e.component(nv.name,nv),e.component(Ty.name,Ty),e.component(Cy.name,Cy),e.component(JS.name,JS),e.component(ev.name,ev),e.component(tv.name,tv),e)}),Nye={style:{padding:"8px"}},Aye=["onclick"],Dye={key:1,class:"buttons"},Mye={key:0},kye=Te({__name:"ATable",props:{data:null,columns:null,enableSearch:{type:Boolean},editable:{type:Boolean},mainColor:null,actions:null,rowsPerPage:null,selectedIndexes:null,selectable:null,selectionDisabled:{type:Boolean}},emits:["rowEdit","actionClick","rowClick","update:selectedIndexes"],setup(e,{emit:t}){const n=e,r=B(()=>{var E;return(E=n.mainColor)!=null?E:"#D14056"}),i=Kt({searchText:"",searchedColumn:""}),a=ke(),d=B(()=>n.rowsPerPage),s=B(()=>n.data.map((y,T)=>({...y,key:T}))),u=B(()=>{const E=n.columns.map((y,T)=>({title:y.title,dataIndex:y.key,key:y.key,customFilterDropdown:!0,sorter:{compare:(O,C)=>typeof O[y.key]=="number"&&typeof C[y.key]=="number"?O[y.key]-C[y.key]:typeof O[y.key]=="string"&&typeof C[y.key]=="string"?O[y.key].localeCompare(C[y.key]):1,multiple:T},onFilter:(O,C)=>C[y.key].toString().toLowerCase().includes(O.toString().toLowerCase()),onFilterDropdownOpenChange:O=>{O&&en().then(()=>{a.value.focus()})}}));if(n.editable||n.actions){const y=n.editable?80:0,T=n.actions?40:0;E.push({title:"",dataIndex:"buttons",width:y+T,fixed:"right",align:"center"})}return E}),o=(E,y,T)=>{y(),i.searchText=E[0],i.searchedColumn=T},l=E=>{E({confirm:!0}),i.searchText=""},c=Kt({}),p=E=>{t("rowClick",{row:E})},f=(E,y)=>{t("actionClick",{action:E,row:y})},m=E=>{c[E.index]={...E}},g=E=>{const y=n.data.filter(T=>T.index===E.index);t("rowEdit",{oldRow:y[0],newRow:c[E.index]}),delete c[E.index]},h=E=>{delete c[E.index]},b=ke([]),v=()=>n.selectable?{type:{multiple:"checkbox",single:"radio"}[n.selectable],selectedRowKeys:Ve(b),onChange:y=>{b.value=y,t("update:selectedIndexes",y)},getCheckboxProps:y=>({disabled:n.selectionDisabled,name:y[n.columns[0].key]})}:void 0;return(E,y)=>(Se(),Vn(Ve(_B),{theme:{token:{colorPrimary:Ve(r)}},class:"ant-table"},{default:kn(()=>[(Se(),Vn(Ve(Iye),{key:Ve(d),"data-source":Ve(s),columns:Ve(u),pagination:{position:["bottomCenter"],defaultPageSize:n.rowsPerPage,showSizeChanger:!n.rowsPerPage},"row-selection":v(),scroll:{x:n.columns.length*200}},Ky({bodyCell:kn(({column:T,text:O,record:C})=>[n.columns.map(R=>R.key).includes(T.dataIndex)?(Se(),Re("div",{key:0,onclick:()=>p(C)},[c[C.index]?(Se(),Vn(Ve(fr),{key:0,value:c[C.index][T.dataIndex],"onUpdate:value":R=>c[C.index][T.dataIndex]=R,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):(Se(),Re(Xe,{key:1},[Pn(pt(O),1)],64))],8,Aye)):T.dataIndex==="buttons"?(Se(),Re("div",Dye,[c[C.index]?(Se(),Vn(Ve(Ar),{key:0,type:"text",onClick:R=>g(C)},{default:kn(()=>[N(Ve(Noe),{"two-tone-color":Ve(r)},null,8,["two-tone-color"])]),_:2},1032,["onClick"])):Lt("",!0),c[C.index]?(Se(),Vn(Ve(fve),{key:1,title:"Sure to cancel?",onConfirm:R=>h(C)},{default:kn(()=>[N(Ve(Ar),{type:"text"},{default:kn(()=>[N(Ve(rie),{"two-tone-color":Ve(r)},null,8,["two-tone-color"])]),_:1})]),_:2},1032,["onConfirm"])):Lt("",!0),n.editable&&!c[C.index]?(Se(),Vn(Ve(Ar),{key:2,type:"text",onClick:R=>m(C)},{default:kn(()=>[N(Ve(Sie),{"two-tone-color":Ve(r)},null,8,["two-tone-color"])]),_:2},1032,["onClick"])):Lt("",!0),n.actions&&!c[C.index]?(Se(),Vn(Ve(Gs),{key:3,trigger:"click"},{overlay:kn(()=>[N(Ve(go),null,{default:kn(()=>[(Se(!0),Re(Xe,null,On(n.actions,R=>(Se(),Vn(Ve(ju),{key:R,type:"text",onClick:x=>f(R,C)},{default:kn(()=>[Pn(pt(R),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:kn(()=>[N(Ve(Ar),{type:"text"},{default:kn(()=>[N(Ve(moe),{style:Zn({color:Ve(r)})},null,8,["style"])]),_:1})]),_:2},1024)):Lt("",!0)])):(Se(),Re(Xe,{key:2},[i.searchText&&i.searchedColumn===T.dataIndex?(Se(),Re("span",Mye,[(Se(!0),Re(Xe,null,On(O.toString().split(new RegExp(`(?<=${i.searchText})|(?=${i.searchText})`,"i")),(R,x)=>(Se(),Re(Xe,null,[R.toLowerCase()===i.searchText.toLowerCase()?(Se(),Re("mark",{key:x,class:"highlight"},pt(R),1)):(Se(),Re(Xe,{key:1},[Pn(pt(R),1)],64))],64))),256))])):Lt("",!0)],64))]),_:2},[n.enableSearch?{name:"customFilterDropdown",fn:kn(({setSelectedKeys:T,selectedKeys:O,confirm:C,clearFilters:R,column:x})=>[He("div",Nye,[N(Ve(fr),{ref_key:"searchInput",ref:a,placeholder:`Search ${x.dataIndex}`,value:O[0],style:{width:"188px","margin-bottom":"8px",display:"block"},onChange:I=>T(I.target.value?[I.target.value]:[]),onPressEnter:I=>o(O,C,x.dataIndex)},null,8,["placeholder","value","onChange","onPressEnter"]),N(Ve(Ar),{type:"primary",size:"small",style:{width:"90px","margin-right":"8px"},onClick:I=>o(O,C,x.dataIndex)},{icon:kn(()=>[N(Ve(kp))]),default:kn(()=>[Pn(" Search ")]),_:2},1032,["onClick"]),N(Ve(Ar),{size:"small",style:{width:"90px"},onClick:I=>l(R)},{default:kn(()=>[Pn(" Reset ")]),_:2},1032,["onClick"])])]),key:"0"}:void 0,n.enableSearch?{name:"customFilterIcon",fn:kn(({filtered:T})=>[N(Ve(kp),{style:Zn({color:T?"#108ee9":void 0})},null,8,["style"])]),key:"1"}:void 0]),1032,["data-source","columns","pagination","row-selection","scroll"]))]),_:1},8,["theme"]))}});const jB=Qt(kye,[["__scopeId","data-v-72b2e327"]]),Pye=["height","width"],Lye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},runtime:null,containerHeight:null,containerWidth:null,zoom:null,response:null},emits:["change"],setup(e,{emit:t}){const n=e,r=55+32,i=68,a=10;ze(n.data.table.data,()=>{});const d=B(()=>n.runtime==="dash"),s=ke([]),u=m=>m==null?[]:jt.exports.isArray(m)?m:[m],o=B(()=>(n.data.displayIndex?n.data.table.schema.fields:n.data.table.schema.fields.filter(m=>m.name!="index")).map(m=>({...m,title:m.name.toString(),key:m.name.toString()}))),l=ke([]),c=m=>{const g=u(m),h=n.data.multiple?g:g[0]||null;jt.exports.isEqual(h,l.value)||(l.value=h),jt.exports.isEqual(h,n.response.value)||(n.response.setValue(h),t("change",n.response))};ze(()=>n.response.value,()=>c(n.response.value)),ze(()=>s.value,()=>{c(n.data.table.data.filter(m=>s.value.includes(m.index)))});const p=B(()=>!d.value||typeof n.containerHeight!="number"?a:Math.trunc((n.containerHeight-r)/i)),f=ke(null);return it(()=>c(n.response.value)),(m,g)=>(Se(),Re("div",{height:e.containerHeight,width:e.containerWidth},[N(mn,{ref_key:"label",ref:f,label:n.data.label,required:!1},null,8,["label"]),N(jB,{data:e.data.table.data,"onUpdate:data":g[0]||(g[0]=h=>e.data.table.data=h),"selected-indexes":s.value,"onUpdate:selectedIndexes":g[1]||(g[1]=h=>s.value=h),columns:Ve(o),"rows-per-page":Ve(p),"enable-search":"",selectable:e.data.multiple?"multiple":"single","selection-disabled":n.data.disabled},null,8,["data","selected-indexes","columns","rows-per-page","selectable","selection-disabled"])],8,Pye))}}),$ye={class:"password-input"},Fye=["pattern","required","disabled","placeholder"],Bye=["required","placeholder"],Uye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r=(u,o=!0)=>{u=String(u).trim(),u!=s.value.value&&(s.value.value=u),u!=n.response.value&&n.response.setValue(u),o&&t("change",n.response)},i=B(()=>n.data.pattern?n.data.pattern:[()=>{const m=n.data.lowercaseRequired;let g="";return m&&(g+="(?=.*[a-z])"),g},()=>{const m=n.data.uppercaseRequired;let g="";return m&&(g+="(?=.*[A-Z])"),g},()=>{const m=n.data.digitRequired;let g="";return m&&(g+="(?=.*\\d)"),g},()=>{const m=n.data.specialRequired;let g="";return m&&(g+="(?=.*[!?@#$\\-%^&+=])"),g},()=>{var v,E,y;const m=(v=n.data.minLength)!=null?v:null,g=(E=n.data.maxLength)!=null?E:null,h=(y=n.data.size)!=null?y:null;let b="";return h?b+=`(.{${h},${h}})`:m&&g?b+=`(.{${m},${g}})`:m?b+=`(.{${m},})`:g&&(b+=`(.{,${g}})`),b}].reduce((m,g)=>m+g(),"")||null),a=u=>[()=>n.data.digitRequired&&!/[0-9]/.test(u)?"Your password must have at least one digit between 0 and 9":null,()=>{const m=/[a-z]/g;return n.data.lowercaseRequired&&!m.test(u)?"Your password must have at least one lowercase letter":null},()=>{var v,E,y;const m=(v=n.data.minLength)!=null?v:null,g=(E=n.data.maxLength)!=null?E:null,h=(y=n.data.size)!=null?y:null,b=u.length;return h&&b!==h?`Your password must have ${h} characters`:m&&g&&(bg)?`Your password must have between ${m} and ${g} characters`:m&&bg?`Your password must have at most ${g} characters`:null},()=>n.data.specialRequired&&!/[!?@#$\-%^&+=]/g.test(u)?"Your password must have at least one special character":null,()=>{const m=/[A-Z]/g;return n.data.uppercaseRequired&&!m.test(u)?"Your password must have at leat one uppercase letter":null}].reduce((m,g)=>{const h=g();return h&&m.push(h),m},[]),d=u=>{n.response.clearErrors(),r(u)},s=ke();return it(()=>{var u;r((u=n.response.value)!=null?u:"",!1),en().then(()=>Cr.addInput(s.value)),n.response.setValidation(()=>{var o,l,c;return(o=s.value)!=null&&o.checkValidity()?[]:a((c=(l=s.value)==null?void 0:l.value)!=null?c:"")})}),ze(()=>n.response.value,u=>r(u!=null?u:"",!1)),(u,o)=>(Se(),Re("div",$ye,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),Ve(i)?(Se(),Re("input",{key:0,ref_key:"input",ref:s,type:"password",pattern:Ve(i),required:!!e.data.required,class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:o[0]||(o[0]=l=>d(l.target.value))},null,42,Fye)):(Se(),Re("input",{key:1,ref_key:"input",ref:s,type:"password",required:!!e.data.required,class:ct(["input",e.hasError&&"error"]),placeholder:e.data.placeholder,onInput:o[1]||(o[1]=l=>d(l.target.value))},null,42,Bye))]))}}),rv=[{code:"+93",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+355",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+213",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+376",placeholder:"000-000",mask:"000-000"},{code:"+244",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+1",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+54",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+374",placeholder:"00-000-000",mask:"00-000-000"},{code:"+297",placeholder:"000-0000",mask:"000-0000"},{code:"+61",placeholder:"0-0000-0000",mask:"0-0000-0000"},{code:"+43",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+994",placeholder:"00-000-00-00",mask:"00-000-00-00"},{code:"+973",placeholder:"0000-0000",mask:"0000-0000"},{code:"+880",placeholder:"1000-000000",mask:"1000-000000"},{code:"+375",placeholder:"(00)000-00-00",mask:"(00)000-00-00"},{code:"+32",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+501",placeholder:"000-0000",mask:"000-0000"},{code:"+229",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+975",placeholder:"17-000-000",mask:"17-000-000|0-000-000"},{code:"+591",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+387",placeholder:"00-0000",mask:"00-0000|00-00000"},{code:"+267",placeholder:"00-000-000",mask:"00-000-000"},{code:"+55",placeholder:"(00)0000-0000",mask:"(00)0000-0000|(00)00000-0000"},{code:"+673",placeholder:"000-0000",mask:"000-0000"},{code:"+359",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+226",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+257",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+855",placeholder:"00-000-000",mask:"00-000-000"},{code:"+237",placeholder:"0000-0000",mask:"0000-0000"},{code:"+238",placeholder:"(000)00-00",mask:"(000)00-00"},{code:"+236",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+235",placeholder:"00-00-00-00",mask:"00-00-00-00"},{code:"+56",placeholder:"0-0000-0000",mask:"0-0000-0000"},{code:"+86",placeholder:"(000)0000-000",mask:"(000)0000-000|(000)0000-0000|00-00000-00000"},{code:"+57",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+269",placeholder:"00-00000",mask:"00-00000"},{code:"+242",placeholder:"00-00000",mask:"00-00000"},{code:"+506",placeholder:"0000-0000",mask:"0000-0000"},{code:"+385",placeholder:"00-000-000",mask:"00-000-000"},{code:"+53",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+357",placeholder:"00-000-000",mask:"00-000-000"},{code:"+420",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+243",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+45",placeholder:"00-00-00-00",mask:"00-00-00-00"},{code:"+253",placeholder:"00-00-00-00",mask:"00-00-00-00"},{code:"+593",placeholder:"0-000-0000",mask:"0-000-0000|00-000-0000"},{code:"+20",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+503",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+240",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+291",placeholder:"0-000-000",mask:"0-000-000"},{code:"+372",placeholder:"000-0000",mask:"000-0000|0000-0000"},{code:"+268",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+251",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+679",placeholder:"00-00000",mask:"00-00000"},{code:"+358",placeholder:"(000)000-00-00",mask:"(000)000-00-00"},{code:"+33",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+241",placeholder:"0-00-00-00",mask:"0-00-00-00"},{code:"+220",placeholder:"(000)00-00",mask:"(000)00-00"},{code:"+995",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+49",placeholder:"000-000",mask:"000-000|(000)00-00|(000)00-000|(000)00-0000|(000)000-0000|(0000)000-0000"},{code:"+233",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+30",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+502",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+224",placeholder:"00-000-000",mask:"00-000-000|00-000-0000"},{code:"+245",placeholder:"0-000000",mask:"0-000000"},{code:"+592",placeholder:"000-0000",mask:"000-0000"},{code:"+509",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+504",placeholder:"0000-0000",mask:"0000-0000"},{code:"+852",placeholder:"0000-0000",mask:"0000-0000"},{code:"+36",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+354",placeholder:"000-0000",mask:"000-0000"},{code:"+91",placeholder:"(0000)000-000",mask:"(0000)000-000"},{code:"+62",placeholder:"00-000-00",mask:"00-000-00|00-000-000|00-000-0000|(800)000-000|(800)000-00-000"},{code:"+98",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+924",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+353",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+972",placeholder:"0-000-0000",mask:"0-000-0000|50-000-0000"},{code:"+39",placeholder:"(000)0000-000",mask:"(000)0000-000"},{code:"+225",placeholder:"00-000-000",mask:"00-000-000"},{code:"+81",placeholder:"(000)000-000",mask:"(000)000-000|00-0000-0000"},{code:"+962",placeholder:"0-0000-0000",mask:"0-0000-0000"},{code:"+77",placeholder:"(600)000-00-00",mask:"(600)000-00-00|(700)000-00-00"},{code:"+254",placeholder:"000-000000",mask:"000-000000"},{code:"+850",placeholder:"000-000",mask:"000-000|0000-0000|00-000-000|000-0000-000|191-000-0000|0000-0000000000000"},{code:"+82",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+965",placeholder:"0000-0000",mask:"0000-0000"},{code:"+996",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+856",placeholder:"00-000-000",mask:"00-000-000|(2000)000-000"},{code:"+371",placeholder:"00-000-000",mask:"00-000-000"},{code:"+961",placeholder:"0-000-000",mask:"0-000-000|00-000-000"},{code:"+266",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+231",placeholder:"00-000-000",mask:"00-000-000"},{code:"+218",placeholder:"00-000-000",mask:"00-000-000|21-000-0000"},{code:"+423",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+370",placeholder:"(000)00-000",mask:"(000)00-000"},{code:"+352",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+261",placeholder:"00-00-00000",mask:"00-00-00000"},{code:"+265",placeholder:"1-000-000",mask:"1-000-000|0-0000-0000"},{code:"+60",placeholder:"0-000-000",mask:"0-000-000|00-000-000|(000)000-000|00-000-0000"},{code:"+960",placeholder:"000-0000",mask:"000-0000"},{code:"+223",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+356",placeholder:"0000-0000",mask:"0000-0000"},{code:"+596",placeholder:"(000)00-00-00",mask:"(000)00-00-00"},{code:"+222",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+230",placeholder:"000-0000",mask:"000-0000"},{code:"+52",placeholder:"00-00-0000",mask:"00-00-0000|(000)000-0000"},{code:"+691",placeholder:"000-0000",mask:"000-0000"},{code:"+373",placeholder:"0000-0000",mask:"0000-0000"},{code:"+377",placeholder:"00-000-000",mask:"00-000-000|(000)000-000"},{code:"+976",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+382",placeholder:"00-000-000",mask:"00-000-000"},{code:"+212",placeholder:"00-0000-000",mask:"00-0000-000"},{code:"+258",placeholder:"00-000-000",mask:"00-000-000"},{code:"+95",placeholder:"000-000",mask:"000-000|0-000-000|00-000-000"},{code:"+674",placeholder:"000-0000",mask:"000-0000"},{code:"+977",placeholder:"00-000-000",mask:"00-000-000"},{code:"+31",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+24",placeholder:"0-000-000",mask:"0-000-000|(000)000-000|(000)000-0000"},{code:"+505",placeholder:"0000-0000",mask:"0000-0000"},{code:"+227",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+234",placeholder:"00-000-00",mask:"00-000-00|00-000-000|(000)000-0000"},{code:"+389",placeholder:"00-000-000",mask:"00-000-000"},{code:"+47",placeholder:"(000)00-000",mask:"(000)00-000"},{code:"+968",placeholder:"00-000-000",mask:"00-000-000"},{code:"+92",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+680",placeholder:"000-0000",mask:"000-0000"},{code:"+970",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+507",placeholder:"000-0000",mask:"000-0000"},{code:"+675",placeholder:"(000)00-000",mask:"(000)00-000"},{code:"+595",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+51",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+63",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+48",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+351",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+974",placeholder:"0000-0000",mask:"0000-0000"},{code:"+40",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+7",placeholder:"(000)000-00-00",mask:"(000)000-00-00"},{code:"+250",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+685",placeholder:"00-0000",mask:"00-0000"},{code:"+378",placeholder:"0000-000000",mask:"0000-000000"},{code:"+239",placeholder:"00-00000",mask:"00-00000"},{code:"+966",placeholder:"0-000-0000",mask:"0-000-0000|50-0000-0000"},{code:"+221",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+381",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+248",placeholder:"0-000-000",mask:"0-000-000"},{code:"+232",placeholder:"00-000000",mask:"00-000000"},{code:"+65",placeholder:"0000-0000",mask:"0000-0000"},{code:"+421",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+386",placeholder:"00-000-000",mask:"00-000-000"},{code:"+677",placeholder:"00000",mask:"00000|000-0000"},{code:"+252",placeholder:"0-000-000",mask:"0-000-000|00-000-000"},{code:"+27",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+211",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+34",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+94",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+249",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+597",placeholder:"000-000",mask:"000-000|000-0000"},{code:"+46",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+41",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+963",placeholder:"00-0000-000",mask:"00-0000-000"},{code:"+992",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+255",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+66",placeholder:"00-000-000",mask:"00-000-000|00-000-0000"},{code:"+670",placeholder:"000-0000",mask:"000-0000|770-00000|780-00000"},{code:"+228",placeholder:"00-000-000",mask:"00-000-000"},{code:"+676",placeholder:"00000",mask:"00000"},{code:"+216",placeholder:"00-000-000",mask:"00-000-000"},{code:"+90",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+993",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+256",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+380",placeholder:"(00)000-00-00",mask:"(00)000-00-00"},{code:"+971",placeholder:"0-000-0000",mask:"0-000-0000|50-000-0000"},{code:"+44",placeholder:"00-0000-0000",mask:"00-0000-0000"},{code:"+598",placeholder:"0-000-00-00",mask:"0-000-00-00"},{code:"+998",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+678",placeholder:"00000",mask:"00000|00-00000"},{code:"+58",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+84",placeholder:"00-0000-000",mask:"00-0000-000|(000)0000-000"},{code:"+967",placeholder:"0-000-000",mask:"0-000-000|00-000-000|000-000-000"},{code:"+260",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+263",placeholder:"",mask:""}],Gye={class:"phone-input"},Hye={class:"flex"},zye=["disabled","placeholder"],Yye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(Math.random().toString(36).substr(2,9)),i=B(()=>{var b;return n.data.placeholder||((b=u.value)==null?void 0:b.placeholder)||""}),a=ke(rv),d=b=>{a.value=rv.filter(v=>v.code.toString().includes(b.query))},s=ke(""),u=ke(null),o=b=>{var v;s.value=u.value?Bs(((v=u.value)==null?void 0:v.mask)||"",b.target.value):b.target.value},l=()=>{var b;s.value=Bs(((b=u.value)==null?void 0:b.mask)||"",s.value),u.value&&m({countryCode:u.value.code,nationalNumber:s.value})},c=(b,v)=>({masked:`${b?b.code:""} ${v}`,raw:parseInt(`${b?b.code:""} ${v}`.replace(/\D/g,"")),countryCode:(b==null?void 0:b.code)||"",nationalNumber:v.replace(/\D/g,"")}),p=b=>{if(!!b){if(typeof b!="string"&&typeof b!="number")throw new Error("Invalid selectedOption code format");if(typeof b=="number"&&(b=b.toString()),b=b.trim(),b.startsWith("+")&&(b=b.slice(1)),uee(b))throw new Error("Invalid selectedOption code format");return`+${b}`}},f=b=>{if(!b)return null;if(typeof b=="number")return b.toString();if(typeof b=="string")return MP(b);throw new Error("Invalid national number format. It must contain only digit characters")},m=(b,v=!0)=>{var T;if(!b){s.value="",u.value=null;return}const E=rv.filter(O=>O.code===p(b.countryCode));if(!E.length)return;u.value=E[0];const y=f(b.nationalNumber);b.nationalNumber&&(s.value=Bs((T=u.value)==null?void 0:T.mask,y||"")),v&&(t("change",b),n.response.setValue(c(u.value,s.value)))},g=ke(),h=()=>{var E,y,T,O,C,R,x;const b=(T=(E=n.response.value)==null?void 0:E.countryCode)!=null?T:(y=n.data.initialValue)==null?void 0:y.countryCode,v=(x=(R=(O=n.response.value)==null?void 0:O.nationalNumber)!=null?R:(C=n.data.initialValue)==null?void 0:C.nationalNumber)!=null?x:"";return b?{countryCode:b,nationalNumber:v}:null};return it(()=>{const b=h();b&&m(b,!1);const v=document.querySelector(`#country-code-input-${r.value}`);v&&Cr.addInput(v),g.value&&Cr.addInput(g.value),t("setInitialValue",n.response)}),ze(()=>n.response.value,(b,v)=>{jt.exports.isEqual(b,v)||!n.response.value||m(n.response.value)}),(b,v)=>(Se(),Re("div",Gye,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",Hye,[N(Ve(H0),{modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=E=>u.value=E),class:"select",pt:{input:{id:`country-code-input-${r.value}`}},"append-to":"self",dropdown:!0,suggestions:a.value,"option-label":"code",placeholder:"+00","force-selection":"",onComplete:v[1]||(v[1]=E=>d(E)),onItemSelect:v[2]||(v[2]=E=>l()),onItemUnselect:v[3]||(v[3]=E=>l())},{option:kn(E=>[He("span",null,pt(E.option.code),1)]),_:1},8,["modelValue","pt","suggestions"]),ur(He("input",{ref_key:"nationalNumberInput",ref:g,"onUpdate:modelValue":v[4]||(v[4]=E=>s.value=E),class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:Ve(i),onInput:o,onChange:v[5]||(v[5]=E=>l())},null,42,zye),[[Ul,s.value]])])]))}});const Vye=Qt(Yye,[["__scopeId","data-v-b6afb140"]]),qye={class:"rating-input"},jye={ref:"input",class:"rating-icons"},Wye=["onClick"],Kye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=s=>{var u;return s<((u=n.response.value)!=null?u:0)},i=B(()=>{var s,u;return Array((s=n.data.max)!=null?s:5).fill((u=n.data.char)!=null?u:"\u2B50")}),a=(s,u=!0)=>{n.response.setValue(s),u&&t("change",n.response)},d=s=>{n.data.disabled||a(s==n.response.value?null:s)};return it(()=>{var s,u;a((u=(s=n.response.value)!=null?s:n.data.initialValue)!=null?u:null,!1),t("setInitialValue",n.response)}),(s,u)=>(Se(),Re("div",qye,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",jye,[(Se(!0),Re(Xe,null,On(Ve(i),(o,l)=>(Se(),Re("div",{key:l,class:ct(["rating-icon",{active:r(l),disabled:e.data.disabled}]),tabindex:"0",onClick:c=>d(l+1)},pt(o),11,Wye))),128))],512)]))}});const Qye=Qt(Kye,[["__scopeId","data-v-68649f0f"]]);const Xye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(null);window.document&&bM(()=>import("./vue-quill.esm-bundler.f4c20868.js"),[]).then(s=>{r.value=s.QuillEditor});const i=(s,u=!0)=>{s!=d.value.getHTML()&&d.value.setHTML(s),s!=n.response.value&&n.response.setValue(s),u&&t("change",n.response)},a=()=>{var u,o;const s=(o=(u=d.value)==null?void 0:u.getHTML())!=null?o:"";i(s)},d=ke();return it(async()=>{var s,u,o;i((u=(s=n.response.value)!=null?s:n.data.initialValue)!=null?u:"",!1),t("setInitialValue",n.response),Cr.addInput((o=d.value)==null?void 0:o.getEditor(),!0),console.log("importing quill")}),ze(()=>n.response.value,s=>i(s!=null?s:"",!1)),(s,u)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),r.value?(Se(),Vn(iu(r.value),{key:0,ref_key:"input",ref:d,style:{height:"100%"},class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,"onUpdate:content":u[0]||(u[0]=o=>a())},null,40,["class","disabled","placeholder"])):Lt("",!0)],64))}});const Zye={class:"tag-input"},Jye={class:"tags"},e0e=["onClick"],t0e={class:"remove-icon",viewBox:"0 0 24 24"},n0e=["d"],r0e=["disabled","placeholder"],i0e=Te({__name:"component",props:{data:null,response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=Dee,i=(o,l=!0)=>{var c;(c=n.response)==null||c.setValue(o),l&&t("change",n.response)},a=B(()=>{var o,l;return(l=(o=n.response)==null?void 0:o.value)!=null?l:[]}),d=o=>{if(n.data.disabled||!o)return;let l=a.value;l.find(c=>c===o)||(l=[...l,o],i(l),u.value.value="")},s=o=>{if(n.data.disabled)return;const l=a.value.filter((c,p)=>p!==o);i(l)},u=ke();return it(()=>{var o,l,c;i((c=(l=(o=n.response)==null?void 0:o.value)!=null?l:n.data.initialValue)!=null?c:[],!1),t("setInitialValue",n.response),Cr.addInput(u.value,!0)}),(o,l)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",Zye,[He("div",Jye,[(Se(!0),Re(Xe,null,On(Ve(a),(c,p)=>(Se(),Re("div",{key:c,class:"tag"},[Pn(pt(c)+" ",1),He("button",{class:"remove-tag",onClick:f=>s(p)},[(Se(),Re("svg",t0e,[He("path",{d:Ve(r)},null,8,n0e)]))],8,e0e)]))),128))]),He("input",{ref_key:"input",ref:u,class:ct(["input",{disabled:e.data.disabled}]),disabled:e.data.disabled,type:"text",placeholder:e.data.placeholder,onChange:l[0]||(l[0]=c=>d(c.target.value)),onKeyup:l[1]||(l[1]=pM(c=>d(c.target.value),["enter"]))},null,42,r0e)])],64))}});const o0e=Qt(i0e,[["__scopeId","data-v-dd0f7570"]]),a0e={class:"text-input"},s0e=["disabled","placeholder"],l0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r=(s,u=!0)=>{s!=d.value.value&&(d.value.value=s),s!=n.response.value&&n.response.setValue(s),u&&t("change",n.response)},i=s=>{const u=n.data.mask?Bs(n.data.mask,s):s;r(u)},a=s=>{const u=s.target;n.data.mask&&Mp(n.data.mask,u.value)&&s.preventDefault()},d=ke();return it(()=>{var s,u;r((u=(s=n.response.value)!=null?s:n.data.initialValue)!=null?u:"",!1),t("setInitialValue",n.response),Cr.addInput(d.value)}),ze(()=>n.response.value,s=>r(s!=null?s:"",!1)),(s,u)=>(Se(),Re("div",a0e,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("input",{ref_key:"input",ref:d,class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onKeypress:u[0]||(u[0]=o=>a(o)),onInput:u[1]||(u[1]=o=>i(o.target.value))},null,42,s0e)]))}}),c0e=["disabled","placeholder"],u0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=(d,s=!0)=>{d!=a.value.value&&(a.value.value=d),d!=n.response.value&&n.response.setValue(d),s&&t("change",n.response)},i=d=>{r(d)},a=ke();return it(()=>{var d,s;r((s=(d=n.response.value)!=null?d:n.data.initialValue)!=null?s:"",!1),t("setInitialValue",n.response),Cr.addInput(a.value,!0)}),ze(()=>n.response.value,d=>r(d!=null?d:"",!1)),(d,s)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("textarea",{ref_key:"input",ref:a,style:{height:"100%"},class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:s[0]||(s[0]=u=>i(u.target.value))},null,42,c0e)],64))}});const d0e={class:"time-input"},p0e=["disabled"],f0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){var o,l;const n=e,r=B(()=>n.data.format==="ampm"?lee():cee()),i=B(()=>r.value.find(c=>jt.exports.isEqual(c.value,n.response.value))),a=ke((l=(o=i.value)==null?void 0:o.value)!=null?l:null),d=(c,p=!0)=>{if(typeof c=="string"){const[f,m]=c.split(":");c={hour:parseInt(f),minute:parseInt(m)}}n.response.setValue(c!=null?c:null),p&&t("change",n.response)},s=()=>{var p,f;let c=n.data.initialValue;return c===""?null:(f=(p=r.value.find(m=>m.label===c))==null?void 0:p.value)!=null?f:null},u=()=>{d(n.response.value||s()||null,!1),t("setInitialValue",n.response)};return it(()=>{u()}),(c,p)=>(Se(),Re("div",d0e,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),ur(He("input",{"onUpdate:modelValue":p[0]||(p[0]=f=>a.value=f),type:"time",class:"input",disabled:e.data.disabled,onChange:p[1]||(p[1]=f=>d(f.target.value))},null,40,p0e),[[Ul,a.value]])]))}});const _0e=Qt(f0e,[["__scopeId","data-v-05b46d78"]]),m0e={class:"toggle-input"},g0e={class:"label"},h0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r={background:"#ffffff",border:"1px solid #ced4da",color:"#495057",transition:"background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s"},i={...r,background:"var(--color-main)",border:"1px solid #ced4da"},a=B(()=>n.response.value=="1"),d=(u,o=!0)=>{n.response.setValue(u),o&&t("change",n.response)},s=()=>{n.data.disabled||d(a.value?"0":"1")};return it(()=>{var u;d((u=n.response.value)!=null?u:"0",!1),t("setInitialValue",n.response)}),(u,o)=>(Se(),Re("div",m0e,[He("div",g0e,pt(e.data.label),1),He("div",{class:ct(["toggle-box",e.data.disabled&&"disabled"]),style:Zn(Ve(a)?i:r),onClick:s},[N(Q5,{path:Ve(a)?Ve(ene):Ve(tne),widget:"25",height:"25",fill:Ve(a)?"#ffffff":"#000000"},null,8,["path","fill"]),He("span",{class:"toggle-text",style:Zn(Ve(a)?"color: #fff":"color: #000")},pt(Ve(a)?n.data.onText:n.data.offText),5)],6)]))}});const b0e=Qt(h0e,[["__scopeId","data-v-4eb73b47"]]),S0e={key:0,class:"upload-input"},v0e=["multiple","disabled"],E0e={key:0,class:"span-error"},y0e={class:"uploaded-files"},C0e=["src"],T0e=["onClick"],O0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=B(()=>jt.exports.isArray(n.response.value)?n.response.value:n.response.value!=null?[n.response.value]:[]),i=Kt({files:[],isLoading:!1,assetURL:"",error:""}),a=async(c,p=!0)=>{var v;const f=n.data.multiple?c:(v=c[0])!=null?v:null;jt.exports.isEqual(f,n.response.value)||n.response.setValue(f);const m=i.files.filter(E=>c.includes(E.url)),g=m.map(E=>E.url),h=c.filter(E=>!g.includes(E)),b=await Promise.all(h.map(async E=>{var O;const y=await fetch(E).then(C=>C.blob());return{file:new File([y],(O=E.split("/").pop())!=null?O:""),url:E}}));i.files=[...m,...b],p&&t("change",n.response)},d=c=>{i.files=i.files.filter((p,f)=>f!==c),a(r.value.filter((p,f)=>f!==c))},u=z0({state:i,props:n,clearErrors:()=>{i.error="",n.response.clearErrors()},setValue:a}),o=()=>{let c=n.data.initialValue;return jt.exports.isArray(c)?c=c.filter(p=>p!=null):c?c=[c]:c=[],c},l=()=>{const c=o();r.value.length?a(r.value,!1):c.length?a(c,!1):a([]),t("setInitialValue",n.response)};return it(()=>{l()}),ze(()=>n.response.value,(c,p)=>{jt.exports.isEqual(c,p)||a(r.value,!1)}),(c,p)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),i.isLoading?(Se(),Vn(Y0,{key:1})):(Se(),Re("div",S0e,[He("input",{ref:"input",type:"file",class:ct(["input",e.hasError&&"error"]),style:{display:"none"},accept:"video/*",multiple:e.data.multiple,disabled:e.data.disabled,onChange:p[0]||(p[0]=f=>Ve(u)(f)),onDragover:p[1]||(p[1]=li(()=>{},["prevent"]))},null,42,v0e),He("button",{class:ct(["button",{disabled:e.data.disabled}]),onClick:p[2]||(p[2]=f=>c.$refs.input.click())},[N(pf,{class:"icon",path:Ve(Mee)},null,8,["path"]),Pn(" Upload Video ")],2),i.error?(Se(),Re("span",E0e,pt(i.error),1)):Lt("",!0),He("div",y0e,[(Se(!0),Re(Xe,null,On(i.files,(f,m)=>(Se(),Re("div",{key:m,class:"video-file"},[He("video",{src:f.url,controls:!0},null,8,C0e),He("span",{onClick:g=>d(m)},"X",8,T0e)]))),128))])]))],64))}});const w0e=Qt(O0e,[["__scopeId","data-v-687e0d3a"]]),R0e={"answer-sheet-input":AJ,"cards-input":YJ,"checkbox-input":jJ,"checklist-input":tee,"click-input":nee,"cnpj-input":_ee,"code-input":gee,"cpf-input":See,"currency-input":Tee,"custom-input":Ree,"date-input":Aee,"dropdown-input":_te,"email-input":hte,"file-input":Ite,"image-input":$te,"kanban-board-input":Kte,"list-input":dne,"multiple-choice-input":vne,"nps-input":Rne,"number-input":Ane,"number-slider-input":Pne,"pandas-row-selection-input":Lye,"password-input":Uye,"phone-input":Vye,"rating-input":Qye,"rich-text-input":Xye,"tag-input":o0e,"text-input":l0e,"textarea-input":u0e,"time-input":_0e,"toggle-input":b0e,"video-input":w0e},DCe=e=>R0e.hasOwnProperty(e),x0e=e=>(m1("data-v-64b8373a"),e=e(),g1(),e),I0e={class:"file-output"},N0e=["href"],A0e=x0e(()=>He("iframe",{src:"about:blank",name:"iframe_a",class:"target-frame"},null,-1)),D0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>{var r;return Se(),Re("div",I0e,[He("a",{href:e.data.fileUrl,class:"download-button button",target:"iframe_a"},[N(pf,{class:"icon",path:Ve(kP)},null,8,["path"]),Pn(" "+pt((r=e.data.downloadText)!=null?r:"Download"),1)],8,N0e),A0e])}}});const M0e=Qt(D0e,[["__scopeId","data-v-64b8373a"]]),k0e=["innerHTML"],P0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re("div",{innerHTML:e.data.html},null,8,k0e))}}),L0e=["src","width","height"],$0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re("iframe",{class:"iframe",src:e.data.url,width:e.data.width,height:e.data.height},null,8,L0e))}});const F0e=Qt($0e,[["__scopeId","data-v-1f59d435"]]),B0e=["src","alt"],U0e={key:0,class:"subtitle center"},G0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!1},null,8,["label"]),He("img",{class:"image",src:e.data.imageUrl,alt:e.data.subtitle},null,8,B0e),e.data.subtitle?(Se(),Re("div",U0e,pt(e.data.subtitle),1)):Lt("",!0)],64))}});const H0e=Qt(G0e,[["__scopeId","data-v-fe95b470"]]),z0e=Te({__name:"component",props:{data:null},setup(e){const t=ke(null);return it(async()=>{await Promise.all([SE("https://polyfill.io/v3/polyfill.min.js?features=es6"),SE("https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js")]),window.MathJax.typesetPromise([t.value])}),(n,r)=>(Se(),Re("div",{ref_key:"latex",ref:t,class:"latex"},pt(e.data.text),513))}});const Y0e=Qt(z0e,[["__scopeId","data-v-93c800e2"]]),V0e=["href","target"],q0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re("a",{class:"link",href:e.data.linkUrl,target:e.data.sameTab?"":"_blank"},pt(e.data.linkText),9,V0e))}}),j0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>{const r=Nl("Markdown");return Se(),Vn(r,{class:"markdown-output",source:e.data.text,html:""},null,8,["source"])}}});const W0e=Qt(j0e,[["__scopeId","data-v-450605a7"]]),K0e=["height","width"],Q0e=Te({__name:"component",props:{data:null,runtime:null,containerHeight:null,containerWidth:null,zoom:null},emits:["row-click","action-click","row-edit"],setup(e,{emit:t}){const n=e,r=55+32,i=68,a=10,d=ke(null),s=B(()=>n.runtime==="dash"),u=({action:f,row:m})=>{t("action-click",{action:f,data:m})};function o({row:f}){t("row-click",{data:f.data,index:f.index})}function l({oldRow:f,newRow:m}){const g=pee(f,m);t("row-edit",{old:f,new:g,index:f.index})}ze(n.data.table.data,()=>{});const c=B(()=>(n.data.displayIndex?n.data.table.schema.fields:n.data.table.schema.fields.filter(f=>f.name!="index")).map(f=>({...f,title:f.name.toString(),key:f.name.toString()}))),p=B(()=>!s.value||typeof n.containerHeight!="number"?a:Math.trunc((n.containerHeight-r)/i));return(f,m)=>{var g;return Se(),Re("div",{height:e.containerHeight,width:e.containerWidth},[N(mn,{ref_key:"label",ref:d,label:n.data.label,required:!1},null,8,["label"]),N(jB,{data:e.data.table.data,"onUpdate:data":m[0]||(m[0]=h=>e.data.table.data=h),columns:Ve(c),"rows-per-page":Ve(p),"enable-search":"",editable:e.data.editable,actions:(g=n.data.actions)!=null&&g.length?n.data.actions:void 0,onActionClick:u,onRowClick:o,onRowEdit:l},null,8,["data","columns","rows-per-page","editable","actions"])],8,K0e)}}}),X0e=Te({__name:"component",props:{data:null},setup(e){const t=e,n=ke(null);it(async()=>{r()});const r=async()=>{await SE("https://cdn.plot.ly/plotly-latest.min.js"),Plotly.newPlot(n.value,t.data.figure.data,t.data.figure.layout)};return ze(()=>t.data.figure,r,{deep:!0}),(i,a)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!1},null,8,["label"]),He("div",{ref_key:"root",ref:n,class:"chart"},null,512)],64))}});const Z0e=Qt(X0e,[["__scopeId","data-v-cbdcf11a"]]),J0e={class:"progress-output"},eCe={class:"progress-container"},tCe={class:"progress-text label"},nCe=Te({__name:"component",props:{data:null},setup(e){const t=e,n=B(()=>{const{current:r,total:i}=t.data;return{width:`calc(${Math.min(100*r/i,100).toFixed(2)}% - 6px)`}});return(r,i)=>(Se(),Re("div",J0e,[He("div",eCe,[He("div",{class:"progress-content",style:Zn(Ve(n))},null,4)]),He("div",tCe,pt(e.data.text),1)]))}});const rCe=Qt(nCe,[["__scopeId","data-v-752753e3"]]),iCe=Te({__name:"component",props:{data:null},setup(e){const t=e;function n(i){switch(i){case"small":return"12px";case"medium":return"16px";case"large":return"24px";default:return"16px"}}const r=B(()=>({fontSize:n(t.data.size)}));return(i,a)=>(Se(),Re("div",{class:"text",style:Zn(Ve(r))},pt(e.data.text),5))}}),oCe={class:"start-widget"},aCe={class:"title"},sCe={class:"start-message"},lCe=Te({__name:"component",props:{form:{type:Object,required:!0}},setup(e){return(t,n)=>(Se(),Re("div",oCe,[He("div",aCe,pt(e.form.welcomeTitle||e.form.title),1),He("div",sCe,pt(e.form.startMessage),1)]))}});const cCe=Qt(lCe,[["__scopeId","data-v-9cd9cf8d"]]),uCe={class:"text"},dCe=Te({__name:"component",props:{form:{type:Object,required:!0}},setup(e){return(t,n)=>{var r;return Se(),Re("div",uCe,pt((r=e.form.endMessage)!=null?r:"Thank you"),1)}}});const pCe=Qt(dCe,[["__scopeId","data-v-1baab646"]]),fCe={class:"text"},_Ce={key:0,class:"session-id"},mCe=Te({__name:"component",props:{form:{type:Object,required:!0},sessionId:{type:String,required:!1}},setup(e){return(t,n)=>{var r;return Se(),Re("div",fCe,[Pn(pt((r=e.form.errorMessage)!=null?r:"Oops.. something went wrong")+" ",1),e.sessionId?(Se(),Re("div",_Ce,"Reference: "+pt(e.sessionId),1)):Lt("",!0)])}}});const gCe=Qt(mCe,[["__scopeId","data-v-9c18087d"]]),MCe={start:cCe,end:pCe,error:gCe},kCe={"file-output":M0e,"html-output":P0e,"iframe-output":F0e,"image-output":H0e,"latex-output":Y0e,"link-output":q0e,"markdown-output":W0e,"pandas-output":Q0e,"plotly-output":Z0e,"progress-output":rCe,"text-output":iCe},PCe=(e,t)=>{Object.keys(t).forEach(n=>{e.component(n,t[n])})};export{HV as $,Zn as A,ln as B,OCe as C,Lt as D,li as E,Xe as F,ct as G,yCe as H,Q5 as I,CCe as J,B as K,On as L,TCe as M,pt as N,m1 as O,xCe as P,g1 as Q,Ie as R,ky as S,Qd as T,Pn as U,jt as V,ur as W,lM as X,zi as Y,Ul as Z,bM as _,Nl as a,q5 as a0,GV as a1,ze as a2,t0 as a3,ACe as a4,Cr as a5,ICe as a6,NCe as a7,iu as a8,DCe as a9,G0 as aA,$P as aB,LP as aC,Ju as aD,$t as aa,bt as ab,Ya as ac,pf as ad,en as ae,pM as af,ZM as ag,vCe as ah,NY as ai,e0 as aj,$6 as ak,tn as al,$a as am,I1 as an,Ds as ao,Ky as ap,Yi as aq,F5 as ar,uM as as,gI as at,dS as au,Nn as av,Gn as aw,zee as ax,oJ as ay,RCe as az,Se as b,Re as c,Te as d,N as e,ECe as f,SCe as g,MV as h,wCe as i,PCe as j,Bl as k,R0e as l,kCe as m,MCe as n,it as o,zc as p,Qt as q,ke as r,fJ as s,Vn as t,bCe as u,Kt as v,kn as w,He as x,HY as y,Ve as z}; -//# sourceMappingURL=registerWidgets.ca6243ef.js.map + `]:{borderTopColor:"transparent","&:first-child":{borderStartStartRadius:l,borderEndStartRadius:l},"&:last-child":{borderStartEndRadius:l,borderEndEndRadius:l}}},[`${t}-footer`]:{padding:`${r}px ${i}px`,color:v,background:E}})}},Oye=Or("Table",e=>{const{controlItemBgActive:t,controlItemBgActiveHover:n,colorTextPlaceholder:r,colorTextHeading:i,colorSplit:a,colorBorderSecondary:d,fontSize:s,padding:u,paddingXS:o,paddingSM:l,controlHeight:c,colorFillAlter:p,colorIcon:f,colorIconHover:m,opacityLoading:g,colorBgContainer:h,borderRadiusLG:b,colorFillContent:v,colorFillSecondary:E,controlInteractiveSize:y}=e,T=new Kn(f),O=new Kn(m),C=t,R=2,x=new Kn(E).onBackground(h).toHexString(),I=new Kn(v).onBackground(h).toHexString(),k=new Kn(p).onBackground(h).toHexString(),L=_n(e,{tableFontSize:s,tableBg:h,tableRadius:b,tablePaddingVertical:u,tablePaddingHorizontal:u,tablePaddingVerticalMiddle:l,tablePaddingHorizontalMiddle:o,tablePaddingVerticalSmall:o,tablePaddingHorizontalSmall:o,tableBorderColor:d,tableHeaderTextColor:i,tableHeaderBg:k,tableFooterTextColor:i,tableFooterBg:k,tableHeaderCellSplitColor:d,tableHeaderSortBg:x,tableHeaderSortHoverBg:I,tableHeaderIconColor:T.clone().setAlpha(T.getAlpha()*g).toRgbString(),tableHeaderIconColorHover:O.clone().setAlpha(O.getAlpha()*g).toRgbString(),tableBodySortBg:k,tableFixedHeaderSortActiveBg:x,tableHeaderFilterActiveBg:v,tableFilterDropdownBg:h,tableRowHoverBg:k,tableSelectedRowBg:C,tableSelectedRowHoverBg:n,zIndexTableFixed:R,zIndexTableSticky:R+1,tableFontSizeMiddle:s,tableFontSizeSmall:s,tableSelectionColumnWidth:c,tableExpandIconBg:h,tableExpandColumnWidth:y+2*e.padding,tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollBg:a});return[Tye(L),lye(L),HD(L),vye(L),iye(L),QEe(L),uye(L),nye(L),HD(L),eye(L),_ye(L),aye(L),yye(L),ZEe(L),gye(L),bye(L),pye(L)]}),wye=[],qB=()=>({prefixCls:rr(),columns:Nr(),rowKey:Xr([String,Function]),tableLayout:rr(),rowClassName:Xr([String,Function]),title:Bt(),footer:Bt(),id:rr(),showHeader:Ct(),components:an(),customRow:Bt(),customHeaderRow:Bt(),direction:rr(),expandFixed:Xr([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:Nr(),defaultExpandedRowKeys:Nr(),expandedRowRender:Bt(),expandRowByClick:Ct(),expandIcon:Bt(),onExpand:Bt(),onExpandedRowsChange:Bt(),"onUpdate:expandedRowKeys":Bt(),defaultExpandAllRows:Ct(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:Ct(),expandedRowClassName:Bt(),childrenColumnName:rr(),rowExpandable:Bt(),sticky:Xr([Boolean,Object]),dropdownPrefixCls:String,dataSource:Nr(),pagination:Xr([Boolean,Object]),loading:Xr([Boolean,Object]),size:rr(),bordered:Ct(),locale:an(),onChange:Bt(),onResizeColumn:Bt(),rowSelection:an(),getPopupContainer:Bt(),scroll:an(),sortDirections:Nr(),showSorterTooltip:Xr([Boolean,Object],!0),transformCellText:Bt()}),Rye=Te({name:"InteralTable",inheritAttrs:!1,props:Vr(M(M({},qB()),{contextSlots:an()}),{rowKey:"key"}),setup(e,t){let{attrs:n,slots:r,expose:i,emit:a}=t;Yr(!(typeof e.rowKey=="function"&&e.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),hve(B(()=>e.contextSlots)),bve({onResizeColumn:(ae,be)=>{a("resizeColumn",ae,be)}});const d=Q$(),s=B(()=>{const ae=new Set(Object.keys(d.value).filter(be=>d.value[be]));return e.columns.filter(be=>!be.responsive||be.responsive.some(ve=>ae.has(ve)))}),{size:u,renderEmpty:o,direction:l,prefixCls:c,configProvider:p}=dn("table",e),[f,m]=Oye(c),g=B(()=>{var ae;return e.transformCellText||((ae=p.transformCellText)===null||ae===void 0?void 0:ae.value)}),[h]=NC("Table",Ws.Table,cn(e,"locale")),b=B(()=>e.dataSource||wye),v=B(()=>p.getPrefixCls("dropdown",e.dropdownPrefixCls)),E=B(()=>e.childrenColumnName||"children"),y=B(()=>b.value.some(ae=>ae==null?void 0:ae[E.value])?"nest":e.expandedRowRender?"row":null),T=Kt({body:null}),O=ae=>{M(T,ae)},C=B(()=>typeof e.rowKey=="function"?e.rowKey:ae=>ae==null?void 0:ae[e.rowKey]),[R]=uEe(b,E,C),x={},I=function(ae,be){let ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:ge,scroll:ce,onChange:ee}=e,Ne=M(M({},x),ae);ve&&(x.resetPagination(),Ne.pagination.current&&(Ne.pagination.current=1),ge&&ge.onChange&&ge.onChange(1,Ne.pagination.pageSize)),ce&&ce.scrollToFirstRowOnChange!==!1&&T.body&&Ole(0,{getContainer:()=>T.body}),ee==null||ee(Ne.pagination,Ne.filters,Ne.sorter,{currentDataSource:GD(vy(b.value,Ne.sorterStates,E.value),Ne.filterStates),action:be})},k=(ae,be)=>{I({sorter:ae,sorterStates:be},"sort",!1)},[L,A,D,$]=mEe({prefixCls:c,mergedColumns:s,onSorterChange:k,sortDirections:B(()=>e.sortDirections||["ascend","descend"]),tableLocale:h,showSorterTooltip:cn(e,"showSorterTooltip")}),F=B(()=>vy(b.value,A.value,E.value)),z=(ae,be)=>{I({filters:ae,filterStates:be},"filter",!0)},[H,V,W]=VEe({prefixCls:c,locale:h,dropdownPrefixCls:v,mergedColumns:s,onFilterChange:z,getPopupContainer:cn(e,"getPopupContainer")}),te=B(()=>GD(F.value,V.value)),[X]=WEe(cn(e,"contextSlots")),ne=B(()=>{const ae={},be=W.value;return Object.keys(be).forEach(ve=>{be[ve]!==null&&(ae[ve]=be[ve])}),M(M({},D.value),{filters:ae})}),[oe]=qEe(ne),Q=(ae,be)=>{I({pagination:M(M({},x.pagination),{current:ae,pageSize:be})},"paginate")},[Z,q]=cEe(B(()=>te.value.length),cn(e,"pagination"),Q);Ht(()=>{x.sorter=$.value,x.sorterStates=A.value,x.filters=W.value,x.filterStates=V.value,x.pagination=e.pagination===!1?{}:lEe(Z.value,e.pagination),x.resetPagination=q});const se=B(()=>{if(e.pagination===!1||!Z.value.pageSize)return te.value;const{current:ae=1,total:be,pageSize:ve=my}=Z.value;return Yr(ae>0,"Table","`current` should be positive number."),te.value.lengthve?te.value.slice((ae-1)*ve,ae*ve):te.value:te.value.slice((ae-1)*ve,ae*ve)});Ht(()=>{en(()=>{const{total:ae,pageSize:be=my}=Z.value;te.value.lengthbe&&Yr(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const re=B(()=>e.showExpandColumn===!1?-1:y.value==="nest"&&e.expandIconColumnIndex===void 0?e.rowSelection?1:0:e.expandIconColumnIndex>0&&e.rowSelection?e.expandIconColumnIndex-1:e.expandIconColumnIndex),_e=ke();ze(()=>e.rowSelection,()=>{_e.value=e.rowSelection?M({},e.rowSelection):e.rowSelection},{deep:!0,immediate:!0});const[me,U]=pEe(_e,{prefixCls:c,data:te,pageData:se,getRowKey:C,getRecordByKey:R,expandType:y,childrenColumnName:E,locale:h,getPopupContainer:B(()=>e.getPopupContainer)}),j=(ae,be,ve)=>{let ge;const{rowClassName:ce}=e;return typeof ce=="function"?ge=Ue(ce(ae,be,ve)):ge=Ue(ce),Ue({[`${c.value}-row-selected`]:U.value.has(C.value(ae,be))},ge)};i({selectedKeySet:U});const J=B(()=>typeof e.indentSize=="number"?e.indentSize:15),pe=ae=>oe(me(H(L(X(ae)))));return()=>{var ae;const{expandIcon:be=r.expandIcon||jEe(h.value),pagination:ve,loading:ge,bordered:ce}=e;let ee,Ne;if(ve!==!1&&((ae=Z.value)===null||ae===void 0?void 0:ae.total)){let ie;Z.value.size?ie=Z.value.size:ie=u.value==="small"||u.value==="middle"?"small":void 0;const Ee=Ke=>N(rve,he(he({},Z.value),{},{class:[`${c.value}-pagination ${c.value}-pagination-${Ke}`,Z.value.class],size:ie}),null),Le=l.value==="rtl"?"left":"right",{position:We}=Z.value;if(We!==null&&Array.isArray(We)){const Ke=We.find(Pe=>Pe.includes("top")),xe=We.find(Pe=>Pe.includes("bottom")),Me=We.every(Pe=>`${Pe}`=="none");!Ke&&!xe&&!Me&&(Ne=Ee(Le)),Ke&&(ee=Ee(Ke.toLowerCase().replace("top",""))),xe&&(Ne=Ee(xe.toLowerCase().replace("bottom","")))}else Ne=Ee(Le)}let Oe;typeof ge=="boolean"?Oe={spinning:ge}:typeof ge=="object"&&(Oe=M({spinning:!0},ge));const Ae=Ue(`${c.value}-wrapper`,{[`${c.value}-wrapper-rtl`]:l.value==="rtl"},n.class,m.value),ue=dr(e,["columns"]);return f(N("div",{class:Ae,style:n.style},[N(fp,he({spinning:!1},Oe),{default:()=>[ee,N(aEe,he(he(he({},n),ue),{},{expandedRowKeys:e.expandedRowKeys,defaultExpandedRowKeys:e.defaultExpandedRowKeys,expandIconColumnIndex:re.value,indentSize:J.value,expandIcon:be,columns:s.value,direction:l.value,prefixCls:c.value,class:Ue({[`${c.value}-middle`]:u.value==="middle",[`${c.value}-small`]:u.value==="small",[`${c.value}-bordered`]:ce,[`${c.value}-empty`]:b.value.length===0}),data:se.value,rowKey:C.value,rowClassName:j,internalHooks:_y,internalRefs:T,onUpdateInternalRefs:O,transformColumns:pe,transformCellText:g.value}),M(M({},r),{emptyText:()=>{var ie,Ee;return((ie=r.emptyText)===null||ie===void 0?void 0:ie.call(r))||((Ee=e.locale)===null||Ee===void 0?void 0:Ee.emptyText)||o("Table")}})),Ne]})]))}}}),xye=Te({name:"ATable",inheritAttrs:!1,props:Vr(qB(),{rowKey:"key"}),slots:Object,setup(e,t){let{attrs:n,slots:r,expose:i}=t;const a=ke();return i({table:a}),()=>{var d;const s=e.columns||$B((d=r.default)===null||d===void 0?void 0:d.call(r));return N(Rye,he(he(he({ref:a},n),e),{},{columns:s||[],expandedRowRender:r.expandedRowRender,contextSlots:M({},r)}),r)}}}),JS=xye,ev=Te({name:"ATableColumn",slots:Object,render(){return null}}),tv=Te({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),Cy=Wve,Ty=Xve,nv=M(Zve,{Cell:Ty,Row:Cy,name:"ATableSummary"}),Iye=M(JS,{SELECTION_ALL:gy,SELECTION_INVERT:hy,SELECTION_NONE:by,SELECTION_COLUMN:Aa,EXPAND_COLUMN:Rs,Column:ev,ColumnGroup:tv,Summary:nv,install:e=>(e.component(nv.name,nv),e.component(Ty.name,Ty),e.component(Cy.name,Cy),e.component(JS.name,JS),e.component(ev.name,ev),e.component(tv.name,tv),e)}),Nye={style:{padding:"8px"}},Aye=["onclick"],Dye={key:1,class:"buttons"},Mye={key:0},kye=Te({__name:"ATable",props:{data:null,columns:null,enableSearch:{type:Boolean},editable:{type:Boolean},mainColor:null,actions:null,rowsPerPage:null,selectedIndexes:null,selectable:null,selectionDisabled:{type:Boolean}},emits:["rowEdit","actionClick","rowClick","update:selectedIndexes"],setup(e,{emit:t}){const n=e,r=B(()=>{var E;return(E=n.mainColor)!=null?E:"#D14056"}),i=Kt({searchText:"",searchedColumn:""}),a=ke(),d=B(()=>n.rowsPerPage),s=B(()=>n.data.map((y,T)=>({...y,key:T}))),u=B(()=>{const E=n.columns.map((y,T)=>({title:y.title,dataIndex:y.key,key:y.key,customFilterDropdown:!0,sorter:{compare:(O,C)=>typeof O[y.key]=="number"&&typeof C[y.key]=="number"?O[y.key]-C[y.key]:typeof O[y.key]=="string"&&typeof C[y.key]=="string"?O[y.key].localeCompare(C[y.key]):1,multiple:T},onFilter:(O,C)=>C[y.key].toString().toLowerCase().includes(O.toString().toLowerCase()),onFilterDropdownOpenChange:O=>{O&&en().then(()=>{a.value.focus()})}}));if(n.editable||n.actions){const y=n.editable?80:0,T=n.actions?40:0;E.push({title:"",dataIndex:"buttons",width:y+T,fixed:"right",align:"center"})}return E}),o=(E,y,T)=>{y(),i.searchText=E[0],i.searchedColumn=T},l=E=>{E({confirm:!0}),i.searchText=""},c=Kt({}),p=E=>{t("rowClick",{row:E})},f=(E,y)=>{t("actionClick",{action:E,row:y})},m=E=>{c[E.index]={...E}},g=E=>{const y=n.data.filter(T=>T.index===E.index);t("rowEdit",{oldRow:y[0],newRow:c[E.index]}),delete c[E.index]},h=E=>{delete c[E.index]},b=ke([]),v=()=>n.selectable?{type:{multiple:"checkbox",single:"radio"}[n.selectable],selectedRowKeys:Ve(b),onChange:y=>{b.value=y,t("update:selectedIndexes",y)},getCheckboxProps:y=>({disabled:n.selectionDisabled,name:y[n.columns[0].key]})}:void 0;return(E,y)=>(Se(),Vn(Ve(_B),{theme:{token:{colorPrimary:Ve(r)}},class:"ant-table"},{default:kn(()=>[(Se(),Vn(Ve(Iye),{key:Ve(d),"data-source":Ve(s),columns:Ve(u),pagination:{position:["bottomCenter"],defaultPageSize:n.rowsPerPage,showSizeChanger:!n.rowsPerPage},"row-selection":v(),scroll:{x:n.columns.length*200}},Ky({bodyCell:kn(({column:T,text:O,record:C})=>[n.columns.map(R=>R.key).includes(T.dataIndex)?(Se(),Re("div",{key:0,onclick:()=>p(C)},[c[C.index]?(Se(),Vn(Ve(fr),{key:0,value:c[C.index][T.dataIndex],"onUpdate:value":R=>c[C.index][T.dataIndex]=R,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):(Se(),Re(Xe,{key:1},[Pn(pt(O),1)],64))],8,Aye)):T.dataIndex==="buttons"?(Se(),Re("div",Dye,[c[C.index]?(Se(),Vn(Ve(Ar),{key:0,type:"text",onClick:R=>g(C)},{default:kn(()=>[N(Ve(Noe),{"two-tone-color":Ve(r)},null,8,["two-tone-color"])]),_:2},1032,["onClick"])):Lt("",!0),c[C.index]?(Se(),Vn(Ve(fve),{key:1,title:"Sure to cancel?",onConfirm:R=>h(C)},{default:kn(()=>[N(Ve(Ar),{type:"text"},{default:kn(()=>[N(Ve(rie),{"two-tone-color":Ve(r)},null,8,["two-tone-color"])]),_:1})]),_:2},1032,["onConfirm"])):Lt("",!0),n.editable&&!c[C.index]?(Se(),Vn(Ve(Ar),{key:2,type:"text",onClick:R=>m(C)},{default:kn(()=>[N(Ve(Sie),{"two-tone-color":Ve(r)},null,8,["two-tone-color"])]),_:2},1032,["onClick"])):Lt("",!0),n.actions&&!c[C.index]?(Se(),Vn(Ve(Gs),{key:3,trigger:"click"},{overlay:kn(()=>[N(Ve(go),null,{default:kn(()=>[(Se(!0),Re(Xe,null,On(n.actions,R=>(Se(),Vn(Ve(ju),{key:R,type:"text",onClick:x=>f(R,C)},{default:kn(()=>[Pn(pt(R),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:kn(()=>[N(Ve(Ar),{type:"text"},{default:kn(()=>[N(Ve(moe),{style:Zn({color:Ve(r)})},null,8,["style"])]),_:1})]),_:2},1024)):Lt("",!0)])):(Se(),Re(Xe,{key:2},[i.searchText&&i.searchedColumn===T.dataIndex?(Se(),Re("span",Mye,[(Se(!0),Re(Xe,null,On(O.toString().split(new RegExp(`(?<=${i.searchText})|(?=${i.searchText})`,"i")),(R,x)=>(Se(),Re(Xe,null,[R.toLowerCase()===i.searchText.toLowerCase()?(Se(),Re("mark",{key:x,class:"highlight"},pt(R),1)):(Se(),Re(Xe,{key:1},[Pn(pt(R),1)],64))],64))),256))])):Lt("",!0)],64))]),_:2},[n.enableSearch?{name:"customFilterDropdown",fn:kn(({setSelectedKeys:T,selectedKeys:O,confirm:C,clearFilters:R,column:x})=>[He("div",Nye,[N(Ve(fr),{ref_key:"searchInput",ref:a,placeholder:`Search ${x.dataIndex}`,value:O[0],style:{width:"188px","margin-bottom":"8px",display:"block"},onChange:I=>T(I.target.value?[I.target.value]:[]),onPressEnter:I=>o(O,C,x.dataIndex)},null,8,["placeholder","value","onChange","onPressEnter"]),N(Ve(Ar),{type:"primary",size:"small",style:{width:"90px","margin-right":"8px"},onClick:I=>o(O,C,x.dataIndex)},{icon:kn(()=>[N(Ve(kp))]),default:kn(()=>[Pn(" Search ")]),_:2},1032,["onClick"]),N(Ve(Ar),{size:"small",style:{width:"90px"},onClick:I=>l(R)},{default:kn(()=>[Pn(" Reset ")]),_:2},1032,["onClick"])])]),key:"0"}:void 0,n.enableSearch?{name:"customFilterIcon",fn:kn(({filtered:T})=>[N(Ve(kp),{style:Zn({color:T?"#108ee9":void 0})},null,8,["style"])]),key:"1"}:void 0]),1032,["data-source","columns","pagination","row-selection","scroll"]))]),_:1},8,["theme"]))}});const jB=Qt(kye,[["__scopeId","data-v-72b2e327"]]),Pye=["height","width"],Lye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},runtime:null,containerHeight:null,containerWidth:null,zoom:null,response:null},emits:["change"],setup(e,{emit:t}){const n=e,r=55+32,i=68,a=10;ze(n.data.table.data,()=>{});const d=B(()=>n.runtime==="dash"),s=ke([]),u=m=>m==null?[]:jt.exports.isArray(m)?m:[m],o=B(()=>(n.data.displayIndex?n.data.table.schema.fields:n.data.table.schema.fields.filter(m=>m.name!="index")).map(m=>({...m,title:m.name.toString(),key:m.name.toString()}))),l=ke([]),c=m=>{const g=u(m),h=n.data.multiple?g:g[0]||null;jt.exports.isEqual(h,l.value)||(l.value=h),jt.exports.isEqual(h,n.response.value)||(n.response.setValue(h),t("change",n.response))};ze(()=>n.response.value,()=>c(n.response.value)),ze(()=>s.value,()=>{c(n.data.table.data.filter(m=>s.value.includes(m.index)))});const p=B(()=>!d.value||typeof n.containerHeight!="number"?a:Math.trunc((n.containerHeight-r)/i)),f=ke(null);return it(()=>c(n.response.value)),(m,g)=>(Se(),Re("div",{height:e.containerHeight,width:e.containerWidth},[N(mn,{ref_key:"label",ref:f,label:n.data.label,required:!1},null,8,["label"]),N(jB,{data:e.data.table.data,"onUpdate:data":g[0]||(g[0]=h=>e.data.table.data=h),"selected-indexes":s.value,"onUpdate:selectedIndexes":g[1]||(g[1]=h=>s.value=h),columns:Ve(o),"rows-per-page":Ve(p),"enable-search":"",selectable:e.data.multiple?"multiple":"single","selection-disabled":n.data.disabled},null,8,["data","selected-indexes","columns","rows-per-page","selectable","selection-disabled"])],8,Pye))}}),$ye={class:"password-input"},Fye=["pattern","required","disabled","placeholder"],Bye=["required","placeholder"],Uye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r=(u,o=!0)=>{u=String(u).trim(),u!=s.value.value&&(s.value.value=u),u!=n.response.value&&n.response.setValue(u),o&&t("change",n.response)},i=B(()=>n.data.pattern?n.data.pattern:[()=>{const m=n.data.lowercaseRequired;let g="";return m&&(g+="(?=.*[a-z])"),g},()=>{const m=n.data.uppercaseRequired;let g="";return m&&(g+="(?=.*[A-Z])"),g},()=>{const m=n.data.digitRequired;let g="";return m&&(g+="(?=.*\\d)"),g},()=>{const m=n.data.specialRequired;let g="";return m&&(g+="(?=.*[!?@#$\\-%^&+=])"),g},()=>{var v,E,y;const m=(v=n.data.minLength)!=null?v:null,g=(E=n.data.maxLength)!=null?E:null,h=(y=n.data.size)!=null?y:null;let b="";return h?b+=`(.{${h},${h}})`:m&&g?b+=`(.{${m},${g}})`:m?b+=`(.{${m},})`:g&&(b+=`(.{,${g}})`),b}].reduce((m,g)=>m+g(),"")||null),a=u=>[()=>n.data.digitRequired&&!/[0-9]/.test(u)?"Your password must have at least one digit between 0 and 9":null,()=>{const m=/[a-z]/g;return n.data.lowercaseRequired&&!m.test(u)?"Your password must have at least one lowercase letter":null},()=>{var v,E,y;const m=(v=n.data.minLength)!=null?v:null,g=(E=n.data.maxLength)!=null?E:null,h=(y=n.data.size)!=null?y:null,b=u.length;return h&&b!==h?`Your password must have ${h} characters`:m&&g&&(bg)?`Your password must have between ${m} and ${g} characters`:m&&bg?`Your password must have at most ${g} characters`:null},()=>n.data.specialRequired&&!/[!?@#$\-%^&+=]/g.test(u)?"Your password must have at least one special character":null,()=>{const m=/[A-Z]/g;return n.data.uppercaseRequired&&!m.test(u)?"Your password must have at leat one uppercase letter":null}].reduce((m,g)=>{const h=g();return h&&m.push(h),m},[]),d=u=>{n.response.clearErrors(),r(u)},s=ke();return it(()=>{var u;r((u=n.response.value)!=null?u:"",!1),en().then(()=>Cr.addInput(s.value)),n.response.setValidation(()=>{var o,l,c;return(o=s.value)!=null&&o.checkValidity()?[]:a((c=(l=s.value)==null?void 0:l.value)!=null?c:"")})}),ze(()=>n.response.value,u=>r(u!=null?u:"",!1)),(u,o)=>(Se(),Re("div",$ye,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),Ve(i)?(Se(),Re("input",{key:0,ref_key:"input",ref:s,type:"password",pattern:Ve(i),required:!!e.data.required,class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:o[0]||(o[0]=l=>d(l.target.value))},null,42,Fye)):(Se(),Re("input",{key:1,ref_key:"input",ref:s,type:"password",required:!!e.data.required,class:ct(["input",e.hasError&&"error"]),placeholder:e.data.placeholder,onInput:o[1]||(o[1]=l=>d(l.target.value))},null,42,Bye))]))}}),rv=[{code:"+93",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+355",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+213",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+376",placeholder:"000-000",mask:"000-000"},{code:"+244",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+1",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+54",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+374",placeholder:"00-000-000",mask:"00-000-000"},{code:"+297",placeholder:"000-0000",mask:"000-0000"},{code:"+61",placeholder:"0-0000-0000",mask:"0-0000-0000"},{code:"+43",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+994",placeholder:"00-000-00-00",mask:"00-000-00-00"},{code:"+973",placeholder:"0000-0000",mask:"0000-0000"},{code:"+880",placeholder:"1000-000000",mask:"1000-000000"},{code:"+375",placeholder:"(00)000-00-00",mask:"(00)000-00-00"},{code:"+32",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+501",placeholder:"000-0000",mask:"000-0000"},{code:"+229",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+975",placeholder:"17-000-000",mask:"17-000-000|0-000-000"},{code:"+591",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+387",placeholder:"00-0000",mask:"00-0000|00-00000"},{code:"+267",placeholder:"00-000-000",mask:"00-000-000"},{code:"+55",placeholder:"(00)0000-0000",mask:"(00)0000-0000|(00)00000-0000"},{code:"+673",placeholder:"000-0000",mask:"000-0000"},{code:"+359",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+226",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+257",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+855",placeholder:"00-000-000",mask:"00-000-000"},{code:"+237",placeholder:"0000-0000",mask:"0000-0000"},{code:"+238",placeholder:"(000)00-00",mask:"(000)00-00"},{code:"+236",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+235",placeholder:"00-00-00-00",mask:"00-00-00-00"},{code:"+56",placeholder:"0-0000-0000",mask:"0-0000-0000"},{code:"+86",placeholder:"(000)0000-000",mask:"(000)0000-000|(000)0000-0000|00-00000-00000"},{code:"+57",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+269",placeholder:"00-00000",mask:"00-00000"},{code:"+242",placeholder:"00-00000",mask:"00-00000"},{code:"+506",placeholder:"0000-0000",mask:"0000-0000"},{code:"+385",placeholder:"00-000-000",mask:"00-000-000"},{code:"+53",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+357",placeholder:"00-000-000",mask:"00-000-000"},{code:"+420",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+243",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+45",placeholder:"00-00-00-00",mask:"00-00-00-00"},{code:"+253",placeholder:"00-00-00-00",mask:"00-00-00-00"},{code:"+593",placeholder:"0-000-0000",mask:"0-000-0000|00-000-0000"},{code:"+20",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+503",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+240",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+291",placeholder:"0-000-000",mask:"0-000-000"},{code:"+372",placeholder:"000-0000",mask:"000-0000|0000-0000"},{code:"+268",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+251",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+679",placeholder:"00-00000",mask:"00-00000"},{code:"+358",placeholder:"(000)000-00-00",mask:"(000)000-00-00"},{code:"+33",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+241",placeholder:"0-00-00-00",mask:"0-00-00-00"},{code:"+220",placeholder:"(000)00-00",mask:"(000)00-00"},{code:"+995",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+49",placeholder:"000-000",mask:"000-000|(000)00-00|(000)00-000|(000)00-0000|(000)000-0000|(0000)000-0000"},{code:"+233",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+30",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+502",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+224",placeholder:"00-000-000",mask:"00-000-000|00-000-0000"},{code:"+245",placeholder:"0-000000",mask:"0-000000"},{code:"+592",placeholder:"000-0000",mask:"000-0000"},{code:"+509",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+504",placeholder:"0000-0000",mask:"0000-0000"},{code:"+852",placeholder:"0000-0000",mask:"0000-0000"},{code:"+36",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+354",placeholder:"000-0000",mask:"000-0000"},{code:"+91",placeholder:"(0000)000-000",mask:"(0000)000-000"},{code:"+62",placeholder:"00-000-00",mask:"00-000-00|00-000-000|00-000-0000|(800)000-000|(800)000-00-000"},{code:"+98",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+924",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+353",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+972",placeholder:"0-000-0000",mask:"0-000-0000|50-000-0000"},{code:"+39",placeholder:"(000)0000-000",mask:"(000)0000-000"},{code:"+225",placeholder:"00-000-000",mask:"00-000-000"},{code:"+81",placeholder:"(000)000-000",mask:"(000)000-000|00-0000-0000"},{code:"+962",placeholder:"0-0000-0000",mask:"0-0000-0000"},{code:"+77",placeholder:"(600)000-00-00",mask:"(600)000-00-00|(700)000-00-00"},{code:"+254",placeholder:"000-000000",mask:"000-000000"},{code:"+850",placeholder:"000-000",mask:"000-000|0000-0000|00-000-000|000-0000-000|191-000-0000|0000-0000000000000"},{code:"+82",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+965",placeholder:"0000-0000",mask:"0000-0000"},{code:"+996",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+856",placeholder:"00-000-000",mask:"00-000-000|(2000)000-000"},{code:"+371",placeholder:"00-000-000",mask:"00-000-000"},{code:"+961",placeholder:"0-000-000",mask:"0-000-000|00-000-000"},{code:"+266",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+231",placeholder:"00-000-000",mask:"00-000-000"},{code:"+218",placeholder:"00-000-000",mask:"00-000-000|21-000-0000"},{code:"+423",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+370",placeholder:"(000)00-000",mask:"(000)00-000"},{code:"+352",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+261",placeholder:"00-00-00000",mask:"00-00-00000"},{code:"+265",placeholder:"1-000-000",mask:"1-000-000|0-0000-0000"},{code:"+60",placeholder:"0-000-000",mask:"0-000-000|00-000-000|(000)000-000|00-000-0000"},{code:"+960",placeholder:"000-0000",mask:"000-0000"},{code:"+223",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+356",placeholder:"0000-0000",mask:"0000-0000"},{code:"+596",placeholder:"(000)00-00-00",mask:"(000)00-00-00"},{code:"+222",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+230",placeholder:"000-0000",mask:"000-0000"},{code:"+52",placeholder:"00-00-0000",mask:"00-00-0000|(000)000-0000"},{code:"+691",placeholder:"000-0000",mask:"000-0000"},{code:"+373",placeholder:"0000-0000",mask:"0000-0000"},{code:"+377",placeholder:"00-000-000",mask:"00-000-000|(000)000-000"},{code:"+976",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+382",placeholder:"00-000-000",mask:"00-000-000"},{code:"+212",placeholder:"00-0000-000",mask:"00-0000-000"},{code:"+258",placeholder:"00-000-000",mask:"00-000-000"},{code:"+95",placeholder:"000-000",mask:"000-000|0-000-000|00-000-000"},{code:"+674",placeholder:"000-0000",mask:"000-0000"},{code:"+977",placeholder:"00-000-000",mask:"00-000-000"},{code:"+31",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+24",placeholder:"0-000-000",mask:"0-000-000|(000)000-000|(000)000-0000"},{code:"+505",placeholder:"0000-0000",mask:"0000-0000"},{code:"+227",placeholder:"00-00-0000",mask:"00-00-0000"},{code:"+234",placeholder:"00-000-00",mask:"00-000-00|00-000-000|(000)000-0000"},{code:"+389",placeholder:"00-000-000",mask:"00-000-000"},{code:"+47",placeholder:"(000)00-000",mask:"(000)00-000"},{code:"+968",placeholder:"00-000-000",mask:"00-000-000"},{code:"+92",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+680",placeholder:"000-0000",mask:"000-0000"},{code:"+970",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+507",placeholder:"000-0000",mask:"000-0000"},{code:"+675",placeholder:"(000)00-000",mask:"(000)00-000"},{code:"+595",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+51",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+63",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+48",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+351",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+974",placeholder:"0000-0000",mask:"0000-0000"},{code:"+40",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+7",placeholder:"(000)000-00-00",mask:"(000)000-00-00"},{code:"+250",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+685",placeholder:"00-0000",mask:"00-0000"},{code:"+378",placeholder:"0000-000000",mask:"0000-000000"},{code:"+239",placeholder:"00-00000",mask:"00-00000"},{code:"+966",placeholder:"0-000-0000",mask:"0-000-0000|50-0000-0000"},{code:"+221",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+381",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+248",placeholder:"0-000-000",mask:"0-000-000"},{code:"+232",placeholder:"00-000000",mask:"00-000000"},{code:"+65",placeholder:"0000-0000",mask:"0000-0000"},{code:"+421",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+386",placeholder:"00-000-000",mask:"00-000-000"},{code:"+677",placeholder:"00000",mask:"00000|000-0000"},{code:"+252",placeholder:"0-000-000",mask:"0-000-000|00-000-000"},{code:"+27",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+211",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+34",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+94",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+249",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+597",placeholder:"000-000",mask:"000-000|000-0000"},{code:"+46",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+41",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+963",placeholder:"00-0000-000",mask:"00-0000-000"},{code:"+992",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+255",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+66",placeholder:"00-000-000",mask:"00-000-000|00-000-0000"},{code:"+670",placeholder:"000-0000",mask:"000-0000|770-00000|780-00000"},{code:"+228",placeholder:"00-000-000",mask:"00-000-000"},{code:"+676",placeholder:"00000",mask:"00000"},{code:"+216",placeholder:"00-000-000",mask:"00-000-000"},{code:"+90",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+993",placeholder:"0-000-0000",mask:"0-000-0000"},{code:"+256",placeholder:"(000)000-000",mask:"(000)000-000"},{code:"+380",placeholder:"(00)000-00-00",mask:"(00)000-00-00"},{code:"+971",placeholder:"0-000-0000",mask:"0-000-0000|50-000-0000"},{code:"+44",placeholder:"00-0000-0000",mask:"00-0000-0000"},{code:"+598",placeholder:"0-000-00-00",mask:"0-000-00-00"},{code:"+998",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+678",placeholder:"00000",mask:"00000|00-00000"},{code:"+58",placeholder:"(000)000-0000",mask:"(000)000-0000"},{code:"+84",placeholder:"00-0000-000",mask:"00-0000-000|(000)0000-000"},{code:"+967",placeholder:"0-000-000",mask:"0-000-000|00-000-000|000-000-000"},{code:"+260",placeholder:"00-000-0000",mask:"00-000-0000"},{code:"+263",placeholder:"",mask:""}],Gye={class:"phone-input"},Hye={class:"flex"},zye=["disabled","placeholder"],Yye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(Math.random().toString(36).substr(2,9)),i=B(()=>{var b;return n.data.placeholder||((b=u.value)==null?void 0:b.placeholder)||""}),a=ke(rv),d=b=>{a.value=rv.filter(v=>v.code.toString().includes(b.query))},s=ke(""),u=ke(null),o=b=>{var v;s.value=u.value?Bs(((v=u.value)==null?void 0:v.mask)||"",b.target.value):b.target.value},l=()=>{var b;s.value=Bs(((b=u.value)==null?void 0:b.mask)||"",s.value),u.value&&m({countryCode:u.value.code,nationalNumber:s.value})},c=(b,v)=>({masked:`${b?b.code:""} ${v}`,raw:parseInt(`${b?b.code:""} ${v}`.replace(/\D/g,"")),countryCode:(b==null?void 0:b.code)||"",nationalNumber:v.replace(/\D/g,"")}),p=b=>{if(!!b){if(typeof b!="string"&&typeof b!="number")throw new Error("Invalid selectedOption code format");if(typeof b=="number"&&(b=b.toString()),b=b.trim(),b.startsWith("+")&&(b=b.slice(1)),uee(b))throw new Error("Invalid selectedOption code format");return`+${b}`}},f=b=>{if(!b)return null;if(typeof b=="number")return b.toString();if(typeof b=="string")return MP(b);throw new Error("Invalid national number format. It must contain only digit characters")},m=(b,v=!0)=>{var T;if(!b){s.value="",u.value=null;return}const E=rv.filter(O=>O.code===p(b.countryCode));if(!E.length)return;u.value=E[0];const y=f(b.nationalNumber);b.nationalNumber&&(s.value=Bs((T=u.value)==null?void 0:T.mask,y||"")),v&&(t("change",b),n.response.setValue(c(u.value,s.value)))},g=ke(),h=()=>{var E,y,T,O,C,R,x;const b=(T=(E=n.response.value)==null?void 0:E.countryCode)!=null?T:(y=n.data.initialValue)==null?void 0:y.countryCode,v=(x=(R=(O=n.response.value)==null?void 0:O.nationalNumber)!=null?R:(C=n.data.initialValue)==null?void 0:C.nationalNumber)!=null?x:"";return b?{countryCode:b,nationalNumber:v}:null};return it(()=>{const b=h();b&&m(b,!1);const v=document.querySelector(`#country-code-input-${r.value}`);v&&Cr.addInput(v),g.value&&Cr.addInput(g.value),t("setInitialValue",n.response)}),ze(()=>n.response.value,(b,v)=>{jt.exports.isEqual(b,v)||!n.response.value||m(n.response.value)}),(b,v)=>(Se(),Re("div",Gye,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",Hye,[N(Ve(H0),{modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=E=>u.value=E),class:"select",pt:{input:{id:`country-code-input-${r.value}`}},"append-to":"self",dropdown:!0,suggestions:a.value,"option-label":"code",placeholder:"+00","force-selection":"",onComplete:v[1]||(v[1]=E=>d(E)),onItemSelect:v[2]||(v[2]=E=>l()),onItemUnselect:v[3]||(v[3]=E=>l())},{option:kn(E=>[He("span",null,pt(E.option.code),1)]),_:1},8,["modelValue","pt","suggestions"]),ur(He("input",{ref_key:"nationalNumberInput",ref:g,"onUpdate:modelValue":v[4]||(v[4]=E=>s.value=E),class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:Ve(i),onInput:o,onChange:v[5]||(v[5]=E=>l())},null,42,zye),[[Ul,s.value]])])]))}});const Vye=Qt(Yye,[["__scopeId","data-v-b6afb140"]]),qye={class:"rating-input"},jye={ref:"input",class:"rating-icons"},Wye=["onClick"],Kye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=s=>{var u;return s<((u=n.response.value)!=null?u:0)},i=B(()=>{var s,u;return Array((s=n.data.max)!=null?s:5).fill((u=n.data.char)!=null?u:"\u2B50")}),a=(s,u=!0)=>{n.response.setValue(s),u&&t("change",n.response)},d=s=>{n.data.disabled||a(s==n.response.value?null:s)};return it(()=>{var s,u;a((u=(s=n.response.value)!=null?s:n.data.initialValue)!=null?u:null,!1),t("setInitialValue",n.response)}),(s,u)=>(Se(),Re("div",qye,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",jye,[(Se(!0),Re(Xe,null,On(Ve(i),(o,l)=>(Se(),Re("div",{key:l,class:ct(["rating-icon",{active:r(l),disabled:e.data.disabled}]),tabindex:"0",onClick:c=>d(l+1)},pt(o),11,Wye))),128))],512)]))}});const Qye=Qt(Kye,[["__scopeId","data-v-68649f0f"]]);const Xye=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=ke(null);window.document&&bM(()=>import("./vue-quill.esm-bundler.9116f2eb.js"),[]).then(s=>{r.value=s.QuillEditor});const i=(s,u=!0)=>{s!=d.value.getHTML()&&d.value.setHTML(s),s!=n.response.value&&n.response.setValue(s),u&&t("change",n.response)},a=()=>{var u,o;const s=(o=(u=d.value)==null?void 0:u.getHTML())!=null?o:"";i(s)},d=ke();return it(async()=>{var s,u,o;i((u=(s=n.response.value)!=null?s:n.data.initialValue)!=null?u:"",!1),t("setInitialValue",n.response),Cr.addInput((o=d.value)==null?void 0:o.getEditor(),!0),console.log("importing quill")}),ze(()=>n.response.value,s=>i(s!=null?s:"",!1)),(s,u)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),r.value?(Se(),Vn(iu(r.value),{key:0,ref_key:"input",ref:d,style:{height:"100%"},class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,"onUpdate:content":u[0]||(u[0]=o=>a())},null,40,["class","disabled","placeholder"])):Lt("",!0)],64))}});const Zye={class:"tag-input"},Jye={class:"tags"},e0e=["onClick"],t0e={class:"remove-icon",viewBox:"0 0 24 24"},n0e=["d"],r0e=["disabled","placeholder"],i0e=Te({__name:"component",props:{data:null,response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=Dee,i=(o,l=!0)=>{var c;(c=n.response)==null||c.setValue(o),l&&t("change",n.response)},a=B(()=>{var o,l;return(l=(o=n.response)==null?void 0:o.value)!=null?l:[]}),d=o=>{if(n.data.disabled||!o)return;let l=a.value;l.find(c=>c===o)||(l=[...l,o],i(l),u.value.value="")},s=o=>{if(n.data.disabled)return;const l=a.value.filter((c,p)=>p!==o);i(l)},u=ke();return it(()=>{var o,l,c;i((c=(l=(o=n.response)==null?void 0:o.value)!=null?l:n.data.initialValue)!=null?c:[],!1),t("setInitialValue",n.response),Cr.addInput(u.value,!0)}),(o,l)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("div",Zye,[He("div",Jye,[(Se(!0),Re(Xe,null,On(Ve(a),(c,p)=>(Se(),Re("div",{key:c,class:"tag"},[Pn(pt(c)+" ",1),He("button",{class:"remove-tag",onClick:f=>s(p)},[(Se(),Re("svg",t0e,[He("path",{d:Ve(r)},null,8,n0e)]))],8,e0e)]))),128))]),He("input",{ref_key:"input",ref:u,class:ct(["input",{disabled:e.data.disabled}]),disabled:e.data.disabled,type:"text",placeholder:e.data.placeholder,onChange:l[0]||(l[0]=c=>d(c.target.value)),onKeyup:l[1]||(l[1]=pM(c=>d(c.target.value),["enter"]))},null,42,r0e)])],64))}});const o0e=Qt(i0e,[["__scopeId","data-v-dd0f7570"]]),a0e={class:"text-input"},s0e=["disabled","placeholder"],l0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","enter","setInitialValue"],setup(e,{emit:t}){const n=e,r=(s,u=!0)=>{s!=d.value.value&&(d.value.value=s),s!=n.response.value&&n.response.setValue(s),u&&t("change",n.response)},i=s=>{const u=n.data.mask?Bs(n.data.mask,s):s;r(u)},a=s=>{const u=s.target;n.data.mask&&Mp(n.data.mask,u.value)&&s.preventDefault()},d=ke();return it(()=>{var s,u;r((u=(s=n.response.value)!=null?s:n.data.initialValue)!=null?u:"",!1),t("setInitialValue",n.response),Cr.addInput(d.value)}),ze(()=>n.response.value,s=>r(s!=null?s:"",!1)),(s,u)=>(Se(),Re("div",a0e,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("input",{ref_key:"input",ref:d,class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onKeypress:u[0]||(u[0]=o=>a(o)),onInput:u[1]||(u[1]=o=>i(o.target.value))},null,42,s0e)]))}}),c0e=["disabled","placeholder"],u0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=(d,s=!0)=>{d!=a.value.value&&(a.value.value=d),d!=n.response.value&&n.response.setValue(d),s&&t("change",n.response)},i=d=>{r(d)},a=ke();return it(()=>{var d,s;r((s=(d=n.response.value)!=null?d:n.data.initialValue)!=null?s:"",!1),t("setInitialValue",n.response),Cr.addInput(a.value,!0)}),ze(()=>n.response.value,d=>r(d!=null?d:"",!1)),(d,s)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),He("textarea",{ref_key:"input",ref:a,style:{height:"100%"},class:ct(["input",e.hasError&&"error",e.data.disabled&&"disabled"]),disabled:e.data.disabled,placeholder:e.data.placeholder,onInput:s[0]||(s[0]=u=>i(u.target.value))},null,42,c0e)],64))}});const d0e={class:"time-input"},p0e=["disabled"],f0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){var o,l;const n=e,r=B(()=>n.data.format==="ampm"?lee():cee()),i=B(()=>r.value.find(c=>jt.exports.isEqual(c.value,n.response.value))),a=ke((l=(o=i.value)==null?void 0:o.value)!=null?l:null),d=(c,p=!0)=>{if(typeof c=="string"){const[f,m]=c.split(":");c={hour:parseInt(f),minute:parseInt(m)}}n.response.setValue(c!=null?c:null),p&&t("change",n.response)},s=()=>{var p,f;let c=n.data.initialValue;return c===""?null:(f=(p=r.value.find(m=>m.label===c))==null?void 0:p.value)!=null?f:null},u=()=>{d(n.response.value||s()||null,!1),t("setInitialValue",n.response)};return it(()=>{u()}),(c,p)=>(Se(),Re("div",d0e,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),ur(He("input",{"onUpdate:modelValue":p[0]||(p[0]=f=>a.value=f),type:"time",class:"input",disabled:e.data.disabled,onChange:p[1]||(p[1]=f=>d(f.target.value))},null,40,p0e),[[Ul,a.value]])]))}});const _0e=Qt(f0e,[["__scopeId","data-v-05b46d78"]]),m0e={class:"toggle-input"},g0e={class:"label"},h0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r={background:"#ffffff",border:"1px solid #ced4da",color:"#495057",transition:"background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s"},i={...r,background:"var(--color-main)",border:"1px solid #ced4da"},a=B(()=>n.response.value=="1"),d=(u,o=!0)=>{n.response.setValue(u),o&&t("change",n.response)},s=()=>{n.data.disabled||d(a.value?"0":"1")};return it(()=>{var u;d((u=n.response.value)!=null?u:"0",!1),t("setInitialValue",n.response)}),(u,o)=>(Se(),Re("div",m0e,[He("div",g0e,pt(e.data.label),1),He("div",{class:ct(["toggle-box",e.data.disabled&&"disabled"]),style:Zn(Ve(a)?i:r),onClick:s},[N(Q5,{path:Ve(a)?Ve(ene):Ve(tne),widget:"25",height:"25",fill:Ve(a)?"#ffffff":"#000000"},null,8,["path","fill"]),He("span",{class:"toggle-text",style:Zn(Ve(a)?"color: #fff":"color: #000")},pt(Ve(a)?n.data.onText:n.data.offText),5)],6)]))}});const b0e=Qt(h0e,[["__scopeId","data-v-4eb73b47"]]),S0e={key:0,class:"upload-input"},v0e=["multiple","disabled"],E0e={key:0,class:"span-error"},y0e={class:"uploaded-files"},C0e=["src"],T0e=["onClick"],O0e=Te({__name:"component",props:{data:null,hasError:{type:Boolean},response:null},emits:["change","setInitialValue"],setup(e,{emit:t}){const n=e,r=B(()=>jt.exports.isArray(n.response.value)?n.response.value:n.response.value!=null?[n.response.value]:[]),i=Kt({files:[],isLoading:!1,assetURL:"",error:""}),a=async(c,p=!0)=>{var v;const f=n.data.multiple?c:(v=c[0])!=null?v:null;jt.exports.isEqual(f,n.response.value)||n.response.setValue(f);const m=i.files.filter(E=>c.includes(E.url)),g=m.map(E=>E.url),h=c.filter(E=>!g.includes(E)),b=await Promise.all(h.map(async E=>{var O;const y=await fetch(E).then(C=>C.blob());return{file:new File([y],(O=E.split("/").pop())!=null?O:""),url:E}}));i.files=[...m,...b],p&&t("change",n.response)},d=c=>{i.files=i.files.filter((p,f)=>f!==c),a(r.value.filter((p,f)=>f!==c))},u=z0({state:i,props:n,clearErrors:()=>{i.error="",n.response.clearErrors()},setValue:a}),o=()=>{let c=n.data.initialValue;return jt.exports.isArray(c)?c=c.filter(p=>p!=null):c?c=[c]:c=[],c},l=()=>{const c=o();r.value.length?a(r.value,!1):c.length?a(c,!1):a([]),t("setInitialValue",n.response)};return it(()=>{l()}),ze(()=>n.response.value,(c,p)=>{jt.exports.isEqual(c,p)||a(r.value,!1)}),(c,p)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!!e.data.required},null,8,["label","required"]),i.isLoading?(Se(),Vn(Y0,{key:1})):(Se(),Re("div",S0e,[He("input",{ref:"input",type:"file",class:ct(["input",e.hasError&&"error"]),style:{display:"none"},accept:"video/*",multiple:e.data.multiple,disabled:e.data.disabled,onChange:p[0]||(p[0]=f=>Ve(u)(f)),onDragover:p[1]||(p[1]=li(()=>{},["prevent"]))},null,42,v0e),He("button",{class:ct(["button",{disabled:e.data.disabled}]),onClick:p[2]||(p[2]=f=>c.$refs.input.click())},[N(pf,{class:"icon",path:Ve(Mee)},null,8,["path"]),Pn(" Upload Video ")],2),i.error?(Se(),Re("span",E0e,pt(i.error),1)):Lt("",!0),He("div",y0e,[(Se(!0),Re(Xe,null,On(i.files,(f,m)=>(Se(),Re("div",{key:m,class:"video-file"},[He("video",{src:f.url,controls:!0},null,8,C0e),He("span",{onClick:g=>d(m)},"X",8,T0e)]))),128))])]))],64))}});const w0e=Qt(O0e,[["__scopeId","data-v-687e0d3a"]]),R0e={"answer-sheet-input":AJ,"cards-input":YJ,"checkbox-input":jJ,"checklist-input":tee,"click-input":nee,"cnpj-input":_ee,"code-input":gee,"cpf-input":See,"currency-input":Tee,"custom-input":Ree,"date-input":Aee,"dropdown-input":_te,"email-input":hte,"file-input":Ite,"image-input":$te,"kanban-board-input":Kte,"list-input":dne,"multiple-choice-input":vne,"nps-input":Rne,"number-input":Ane,"number-slider-input":Pne,"pandas-row-selection-input":Lye,"password-input":Uye,"phone-input":Vye,"rating-input":Qye,"rich-text-input":Xye,"tag-input":o0e,"text-input":l0e,"textarea-input":u0e,"time-input":_0e,"toggle-input":b0e,"video-input":w0e},DCe=e=>R0e.hasOwnProperty(e),x0e=e=>(m1("data-v-64b8373a"),e=e(),g1(),e),I0e={class:"file-output"},N0e=["href"],A0e=x0e(()=>He("iframe",{src:"about:blank",name:"iframe_a",class:"target-frame"},null,-1)),D0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>{var r;return Se(),Re("div",I0e,[He("a",{href:e.data.fileUrl,class:"download-button button",target:"iframe_a"},[N(pf,{class:"icon",path:Ve(kP)},null,8,["path"]),Pn(" "+pt((r=e.data.downloadText)!=null?r:"Download"),1)],8,N0e),A0e])}}});const M0e=Qt(D0e,[["__scopeId","data-v-64b8373a"]]),k0e=["innerHTML"],P0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re("div",{innerHTML:e.data.html},null,8,k0e))}}),L0e=["src","width","height"],$0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re("iframe",{class:"iframe",src:e.data.url,width:e.data.width,height:e.data.height},null,8,L0e))}});const F0e=Qt($0e,[["__scopeId","data-v-1f59d435"]]),B0e=["src","alt"],U0e={key:0,class:"subtitle center"},G0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!1},null,8,["label"]),He("img",{class:"image",src:e.data.imageUrl,alt:e.data.subtitle},null,8,B0e),e.data.subtitle?(Se(),Re("div",U0e,pt(e.data.subtitle),1)):Lt("",!0)],64))}});const H0e=Qt(G0e,[["__scopeId","data-v-fe95b470"]]),z0e=Te({__name:"component",props:{data:null},setup(e){const t=ke(null);return it(async()=>{await Promise.all([SE("https://polyfill.io/v3/polyfill.min.js?features=es6"),SE("https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js")]),window.MathJax.typesetPromise([t.value])}),(n,r)=>(Se(),Re("div",{ref_key:"latex",ref:t,class:"latex"},pt(e.data.text),513))}});const Y0e=Qt(z0e,[["__scopeId","data-v-93c800e2"]]),V0e=["href","target"],q0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>(Se(),Re("a",{class:"link",href:e.data.linkUrl,target:e.data.sameTab?"":"_blank"},pt(e.data.linkText),9,V0e))}}),j0e=Te({__name:"component",props:{data:null},setup(e){return(t,n)=>{const r=Nl("Markdown");return Se(),Vn(r,{class:"markdown-output",source:e.data.text,html:""},null,8,["source"])}}});const W0e=Qt(j0e,[["__scopeId","data-v-450605a7"]]),K0e=["height","width"],Q0e=Te({__name:"component",props:{data:null,runtime:null,containerHeight:null,containerWidth:null,zoom:null},emits:["row-click","action-click","row-edit"],setup(e,{emit:t}){const n=e,r=55+32,i=68,a=10,d=ke(null),s=B(()=>n.runtime==="dash"),u=({action:f,row:m})=>{t("action-click",{action:f,data:m})};function o({row:f}){t("row-click",{data:f.data,index:f.index})}function l({oldRow:f,newRow:m}){const g=pee(f,m);t("row-edit",{old:f,new:g,index:f.index})}ze(n.data.table.data,()=>{});const c=B(()=>(n.data.displayIndex?n.data.table.schema.fields:n.data.table.schema.fields.filter(f=>f.name!="index")).map(f=>({...f,title:f.name.toString(),key:f.name.toString()}))),p=B(()=>!s.value||typeof n.containerHeight!="number"?a:Math.trunc((n.containerHeight-r)/i));return(f,m)=>{var g;return Se(),Re("div",{height:e.containerHeight,width:e.containerWidth},[N(mn,{ref_key:"label",ref:d,label:n.data.label,required:!1},null,8,["label"]),N(jB,{data:e.data.table.data,"onUpdate:data":m[0]||(m[0]=h=>e.data.table.data=h),columns:Ve(c),"rows-per-page":Ve(p),"enable-search":"",editable:e.data.editable,actions:(g=n.data.actions)!=null&&g.length?n.data.actions:void 0,onActionClick:u,onRowClick:o,onRowEdit:l},null,8,["data","columns","rows-per-page","editable","actions"])],8,K0e)}}}),X0e=Te({__name:"component",props:{data:null},setup(e){const t=e,n=ke(null);it(async()=>{r()});const r=async()=>{await SE("https://cdn.plot.ly/plotly-latest.min.js"),Plotly.newPlot(n.value,t.data.figure.data,t.data.figure.layout)};return ze(()=>t.data.figure,r,{deep:!0}),(i,a)=>(Se(),Re(Xe,null,[N(mn,{label:e.data.label,required:!1},null,8,["label"]),He("div",{ref_key:"root",ref:n,class:"chart"},null,512)],64))}});const Z0e=Qt(X0e,[["__scopeId","data-v-cbdcf11a"]]),J0e={class:"progress-output"},eCe={class:"progress-container"},tCe={class:"progress-text label"},nCe=Te({__name:"component",props:{data:null},setup(e){const t=e,n=B(()=>{const{current:r,total:i}=t.data;return{width:`calc(${Math.min(100*r/i,100).toFixed(2)}% - 6px)`}});return(r,i)=>(Se(),Re("div",J0e,[He("div",eCe,[He("div",{class:"progress-content",style:Zn(Ve(n))},null,4)]),He("div",tCe,pt(e.data.text),1)]))}});const rCe=Qt(nCe,[["__scopeId","data-v-752753e3"]]),iCe=Te({__name:"component",props:{data:null},setup(e){const t=e;function n(i){switch(i){case"small":return"12px";case"medium":return"16px";case"large":return"24px";default:return"16px"}}const r=B(()=>({fontSize:n(t.data.size)}));return(i,a)=>(Se(),Re("div",{class:"text",style:Zn(Ve(r))},pt(e.data.text),5))}}),oCe={class:"start-widget"},aCe={class:"title"},sCe={class:"start-message"},lCe=Te({__name:"component",props:{form:{type:Object,required:!0}},setup(e){return(t,n)=>(Se(),Re("div",oCe,[He("div",aCe,pt(e.form.welcomeTitle||e.form.title),1),He("div",sCe,pt(e.form.startMessage),1)]))}});const cCe=Qt(lCe,[["__scopeId","data-v-9cd9cf8d"]]),uCe={class:"text"},dCe=Te({__name:"component",props:{form:{type:Object,required:!0}},setup(e){return(t,n)=>{var r;return Se(),Re("div",uCe,pt((r=e.form.endMessage)!=null?r:"Thank you"),1)}}});const pCe=Qt(dCe,[["__scopeId","data-v-1baab646"]]),fCe={class:"text"},_Ce={key:0,class:"session-id"},mCe=Te({__name:"component",props:{form:{type:Object,required:!0},sessionId:{type:String,required:!1}},setup(e){return(t,n)=>{var r;return Se(),Re("div",fCe,[Pn(pt((r=e.form.errorMessage)!=null?r:"Oops.. something went wrong")+" ",1),e.sessionId?(Se(),Re("div",_Ce,"Reference: "+pt(e.sessionId),1)):Lt("",!0)])}}});const gCe=Qt(mCe,[["__scopeId","data-v-9c18087d"]]),MCe={start:cCe,end:pCe,error:gCe},kCe={"file-output":M0e,"html-output":P0e,"iframe-output":F0e,"image-output":H0e,"latex-output":Y0e,"link-output":q0e,"markdown-output":W0e,"pandas-output":Q0e,"plotly-output":Z0e,"progress-output":rCe,"text-output":iCe},PCe=(e,t)=>{Object.keys(t).forEach(n=>{e.component(n,t[n])})};export{HV as $,Zn as A,ln as B,OCe as C,Lt as D,li as E,Xe as F,ct as G,yCe as H,Q5 as I,CCe as J,B as K,On as L,TCe as M,pt as N,m1 as O,xCe as P,g1 as Q,Ie as R,ky as S,Qd as T,Pn as U,jt as V,ur as W,lM as X,zi as Y,Ul as Z,bM as _,Nl as a,q5 as a0,GV as a1,ze as a2,t0 as a3,ACe as a4,Cr as a5,ICe as a6,NCe as a7,iu as a8,DCe as a9,G0 as aA,$P as aB,LP as aC,Ju as aD,$t as aa,bt as ab,Ya as ac,pf as ad,en as ae,pM as af,ZM as ag,vCe as ah,NY as ai,e0 as aj,$6 as ak,tn as al,$a as am,I1 as an,Ds as ao,Ky as ap,Yi as aq,F5 as ar,uM as as,gI as at,dS as au,Nn as av,Gn as aw,zee as ax,oJ as ay,RCe as az,Se as b,Re as c,Te as d,N as e,ECe as f,SCe as g,MV as h,wCe as i,PCe as j,Bl as k,R0e as l,kCe as m,MCe as n,it as o,zc as p,Qt as q,ke as r,fJ as s,Vn as t,bCe as u,Kt as v,kn as w,He as x,HY as y,Ve as z}; +//# sourceMappingURL=registerWidgets.89616af0.js.map diff --git a/abstra_statics/dist/assets/runnerData.170ae941.js b/abstra_statics/dist/assets/runnerData.bd24d7de.js similarity index 99% rename from abstra_statics/dist/assets/runnerData.170ae941.js rename to abstra_statics/dist/assets/runnerData.bd24d7de.js index bce77752fd..4de352dc47 100644 --- a/abstra_statics/dist/assets/runnerData.170ae941.js +++ b/abstra_statics/dist/assets/runnerData.bd24d7de.js @@ -1,4 +1,4 @@ -import{V as d}from"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="522c736c-a209-406d-8ea7-7b5cf74e2e25",e._sentryDebugIdIdentifier="sentry-dbid-522c736c-a209-406d-8ea7-7b5cf74e2e25")}catch{}})();const w={"answer-sheet-input":{name:"Answer sheet",description:"Retrieve the answers from a test on usual answersheet",type:"answer-sheet-input",events:[{key:"change",description:"Function or expression to be run when the input value changes",payloadSchema:[]}],autoHeight:!0,dashProperties:{minWidth:200,minHeight:350,initialWidth:200,initialHeight:350},pythonAPI:{name:"read_answer_sheet",params:[{argName:"label",description:"The label to display to the user",typeName:"str",isKwarg:!1,default:null,dashesInitialValue:'"Answer Sheet Title"'},{argName:"options",description:"The options which can be chosen as an answer",typeName:"list",typeDescription:["list[str]"],isKwarg:!1,default:'["A", "B", "C", "D", "E"]',dashesInitialValue:'["A", "B", "C", "D", "E"]'},{argName:"number_of_questions",description:"Number of questions the answersheet will cover",typeName:"int",isKwarg:!1,default:"5",dashesInitialValue:"5"},{argName:"disabled",description:"whether the input is disabled. Defaults to False.",typeName:"bool",isKwarg:!0,default:"False"},{argName:"required",description:'Whether the input is required or not eg. "this field is required". Defaults to True.',typeName:"Union[bool, str]",typeDescription:["bool","str"],isKwarg:!0,default:"True",formOnly:!0},{argName:"hint",description:"A tooltip displayed to the user. Defaults to None.",typeName:"str",isKwarg:!0,default:"None"},{argName:"end_program",description:"Whether the program should end after the widget is shown. Defaults to False.",typeName:"bool",isKwarg:!0,default:"False",formOnly:!0},{argName:"full_width",description:"Whether the input should use full screen width. Defaults to False.",typeName:"bool",isKwarg:!0,default:"False",formOnly:!0},{argName:"button_text",description:"What text to display on the button when the widget is not part of a Page. Defaults to 'Next'.",typeName:"str",isKwarg:!0,default:"Next",formOnly:!0}],returns:[{typeName:null,typeDescription:"list: The values/value selected by the user"}]},brokerAPI:{params:[{argName:"label",typeName:"string",description:"The label of the input"},{argName:"options",typeName:"array",description:"The options which can be chosen as an answer"},{argName:"numberOfQuestions",typeName:"number",description:"Number of questions the answersheet will cover"},{argName:"key",typeName:"string",description:"The key of the input on the returning object"},{argName:"disabled",typeName:"boolean",description:"Whether the input is disabled"},{argName:"hint",typeName:["string","null"],description:"message describing the input",default:null,isOptional:!0},{argName:"end_program",typeName:["boolean","null"],description:"End program after this widget is shown",default:!1,isOptional:!0},{argName:"required",typeName:["boolean","string"],description:"Whether the input is required or not",default:!0,isOptional:!0,formOnly:!0},{argName:"columns",typeName:"number",description:"number of columns this input will take",isOptional:!0,formOnly:!0},{argName:"fullWidth",typeName:"boolean",description:"Whether the widget should take up the full width of the page",isOptional:!0,formOnly:!0}]},examples:[{props:{label:"SAT - 2023",options:["A","B","C","D","E"],numberOfQuestions:5},name:"Basic Example",description:"The following example demonstrate some of the available functionality for read_answer_sheet",key:"example1",code:`from abstra.forms import read_answer_sheet +import{V as d}from"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39007963-a78f-4f44-856d-34de009a3256",e._sentryDebugIdIdentifier="sentry-dbid-39007963-a78f-4f44-856d-34de009a3256")}catch{}})();const w={"answer-sheet-input":{name:"Answer sheet",description:"Retrieve the answers from a test on usual answersheet",type:"answer-sheet-input",events:[{key:"change",description:"Function or expression to be run when the input value changes",payloadSchema:[]}],autoHeight:!0,dashProperties:{minWidth:200,minHeight:350,initialWidth:200,initialHeight:350},pythonAPI:{name:"read_answer_sheet",params:[{argName:"label",description:"The label to display to the user",typeName:"str",isKwarg:!1,default:null,dashesInitialValue:'"Answer Sheet Title"'},{argName:"options",description:"The options which can be chosen as an answer",typeName:"list",typeDescription:["list[str]"],isKwarg:!1,default:'["A", "B", "C", "D", "E"]',dashesInitialValue:'["A", "B", "C", "D", "E"]'},{argName:"number_of_questions",description:"Number of questions the answersheet will cover",typeName:"int",isKwarg:!1,default:"5",dashesInitialValue:"5"},{argName:"disabled",description:"whether the input is disabled. Defaults to False.",typeName:"bool",isKwarg:!0,default:"False"},{argName:"required",description:'Whether the input is required or not eg. "this field is required". Defaults to True.',typeName:"Union[bool, str]",typeDescription:["bool","str"],isKwarg:!0,default:"True",formOnly:!0},{argName:"hint",description:"A tooltip displayed to the user. Defaults to None.",typeName:"str",isKwarg:!0,default:"None"},{argName:"end_program",description:"Whether the program should end after the widget is shown. Defaults to False.",typeName:"bool",isKwarg:!0,default:"False",formOnly:!0},{argName:"full_width",description:"Whether the input should use full screen width. Defaults to False.",typeName:"bool",isKwarg:!0,default:"False",formOnly:!0},{argName:"button_text",description:"What text to display on the button when the widget is not part of a Page. Defaults to 'Next'.",typeName:"str",isKwarg:!0,default:"Next",formOnly:!0}],returns:[{typeName:null,typeDescription:"list: The values/value selected by the user"}]},brokerAPI:{params:[{argName:"label",typeName:"string",description:"The label of the input"},{argName:"options",typeName:"array",description:"The options which can be chosen as an answer"},{argName:"numberOfQuestions",typeName:"number",description:"Number of questions the answersheet will cover"},{argName:"key",typeName:"string",description:"The key of the input on the returning object"},{argName:"disabled",typeName:"boolean",description:"Whether the input is disabled"},{argName:"hint",typeName:["string","null"],description:"message describing the input",default:null,isOptional:!0},{argName:"end_program",typeName:["boolean","null"],description:"End program after this widget is shown",default:!1,isOptional:!0},{argName:"required",typeName:["boolean","string"],description:"Whether the input is required or not",default:!0,isOptional:!0,formOnly:!0},{argName:"columns",typeName:"number",description:"number of columns this input will take",isOptional:!0,formOnly:!0},{argName:"fullWidth",typeName:"boolean",description:"Whether the widget should take up the full width of the page",isOptional:!0,formOnly:!0}]},examples:[{props:{label:"SAT - 2023",options:["A","B","C","D","E"],numberOfQuestions:5},name:"Basic Example",description:"The following example demonstrate some of the available functionality for read_answer_sheet",key:"example1",code:`from abstra.forms import read_answer_sheet answer_sheet = read_answer_sheet("SAT - 2023", ["A", "B", "C", "D", "E"], 5) # answer_sheet = { '1': 'A', '2': None, '3': 'C' } @@ -491,4 +491,4 @@ for i in range(10): display("Hello world!") `}]}},h=e=>"type"in e&&e.type in w,K=e=>"type"in e&&e.type in w,F=e=>d.exports.upperFirst(d.exports.camelCase(e)),P=(e,t)=>d.exports.pickBy(e,a=>{const i=t[a.type].pythonAPI.params,r=d.exports.pickBy(a.props,(o,s)=>{const l=i.find(p=>p.argName===s),u=o.trim();return!(!l||u.length===0)});return!i.some(o=>{if(!o.isKwarg&&!(o.argName in r)&&!o.default)return!0})});function I(e,t){const a=(i,r)=>{var n;return((n=i.toLocaleLowerCase().match(new RegExp(r.toLocaleLowerCase().replace(/(\\)/g,"\\\\"),"g")))!=null?n:[]).length/i.length};return t.reduce((i,r)=>i+10*a(e.type,r)+5*a(e.name,r)+1*a(e.description,r),0)}function A(e,t){return e.length!==t.length?!1:e.every(a=>t.includes(a))}const g=(e,t)=>{for(const a in t){if(a===e)return t[a];const i=t[a];if(h(i))continue;const r=g(e,i.slot);if(r)return r}return null},x=(e,t)=>{for(const a in t){const i=t[a];if(h(i))continue;if(a===e)return i;const r=x(e,i.slot);if(r)return r}return null},q=(e,t)=>g(e,m(t)),H=(e,t)=>{const a=g(e,m(t));if(!a)throw new Error("widget not found");return a.id=e,a},E=(e,t)=>x(e,m(t)),m=e=>e.version==="0.1"?e.widgets:e.slot,S=e=>e.version==="0.1"?"/widgets":"/slot",O="#414a58",_="DM Sans",T="Inter";function B(e){var t,a,i,r,n,o,s,l,u,p,f,c,y,N,b;return{id:e.id,path:e.path,theme:(t=e.workspace.theme)!=null?t:"#FFFFFF",brandName:(a=e.workspace.brand_name)!=null?a:null,title:e.title,isLocal:(i=e.is_local)!=null?i:!1,startMessage:(r=e.start_message)!=null?r:null,endMessage:(n=e.end_message)!=null?n:null,errorMessage:(o=e.error_message)!=null?o:null,timeoutMessage:(s=e.timeout_message)!=null?s:null,startButtonText:(l=e.start_button_text)!=null?l:null,restartButtonText:(u=e.restart_button_text)!=null?u:null,logoUrl:e.workspace.logo_url,mainColor:(p=e.workspace.main_color)!=null?p:O,fontFamily:(f=e.workspace.font_family)!=null?f:_,autoStart:(c=e.auto_start)!=null?c:!1,allowRestart:e.allow_restart,welcomeTitle:(y=e.welcome_title)!=null?y:null,runtimeType:"form",sidebar:(b=(N=e.workspace)==null?void 0:N.sidebar)!=null?b:[]}}function C(e){var t,a,i,r,n,o,s;return{id:e.path,path:e.path,title:e.title,theme:(t=e.workspace.theme)!=null?t:"#FFFFFF",brandName:e.workspace.brand_name,logoUrl:e.workspace.logo_url,mainColor:(a=e.workspace.main_color)!=null?a:O,fontFamily:(i=e.workspace.font_family)!=null?i:T,layout:e.layout,workspaceName:(n=(r=e.workspace)==null?void 0:r.name)!=null?n:"Untitled Workspace",runtimeType:"dash",sidebar:(s=(o=e.workspace)==null?void 0:o.sidebar)!=null?s:[]}}const V=e=>({...e,slot:k(m(e))}),W=e=>{var t,a;return{...e,id:(t=e.id)!=null?t:"",variable:(a=e.variable)!=null?a:null,props:Object.keys(e.props),events:Object.keys(e.events),position:{rowStart:e.rowStart,rowEnd:e.rowEnd,colStart:e.colStart,colEnd:e.colEnd}}},D=e=>({...e,slot:k(e.slot),props:e.props,position:{row:e.row,height:e.height,order:e.order}}),k=e=>{if(!e)throw new Error("Slot is undefined");return Object.keys(e).reduce((t,a)=>{const i=e[a];return h(i)?{...t,[a]:W(i)}:{...t,[a]:D(i)}},{})};export{H as a,m as b,S as c,V as d,E as e,g as f,F as g,q as h,h as i,P as j,A as k,K as l,C as m,B as r,I as s,w}; -//# sourceMappingURL=runnerData.170ae941.js.map +//# sourceMappingURL=runnerData.bd24d7de.js.map diff --git a/abstra_statics/dist/assets/tables.94b40ff0.js b/abstra_statics/dist/assets/tables.b83ad23f.js similarity index 92% rename from abstra_statics/dist/assets/tables.94b40ff0.js rename to abstra_statics/dist/assets/tables.b83ad23f.js index 80a37536ac..b685a9817e 100644 --- a/abstra_statics/dist/assets/tables.94b40ff0.js +++ b/abstra_statics/dist/assets/tables.b83ad23f.js @@ -1,2 +1,2 @@ -var d=Object.defineProperty;var p=(a,e,t)=>e in a?d(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var c=(a,e,t)=>(p(a,typeof e!="symbol"?e+"":e,t),t);import{A as u}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="132a7f82-f6d1-4fcf-a5a1-e6a4b25969d3",a._sentryDebugIdIdentifier="sentry-dbid-132a7f82-f6d1-4fcf-a5a1-e6a4b25969d3")}catch{}})();class y{async list(){return await(await fetch("/_editor/api/tables")).json()}async create(){return await(await fetch("/_editor/api/tables",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(e){return await(await fetch(`/_editor/api/tables/${e}`)).json()}async update(e,t){return await(await fetch(`/_editor/api/tables/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}async delete(e){await fetch(`/_editor/api/tables/${e}`,{method:"DELETE"})}async duplicate(e){return await(await fetch(`/_editor/api/tables/${e}/duplicate`,{method:"POST"})).json()}async dbTypes(){return(await fetch("/_editor/api/workspace/db-types")).json()}async selectRow(e,t,s){return(await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",where:t,params:s})})).json()}async insertRow(e,t){const s=await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"insert",values:t})});return s.ok?{type:"insert-row:success",row:await s.json()}:{type:"insert-row:error",reason:await s.text()}}async updateRow(e,t,s,r){const o=await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",params:r,where:t,set:s})});return o.ok?{type:"update-row:success",row:await o.json()}:{type:"update-row:error",reason:await o.text()}}async deleteRow(e,t,s){await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",where:t,params:s})})}}const n=new y;class i{constructor(e){c(this,"record");this.record=u.create(n,e,"name")}static async list(){return(await n.list()).map(t=>new i(t))}static async create(){const e=await n.create();return new i(e)}static async get(e){const t=await n.get(e);return new i(t)}async delete(){await n.delete(this.name)}async duplicate(){const e=await n.duplicate(this.name);return new i(e)}async save(){await this.record.save()}onUpdate(e){this.record.pubsub.subscribe("update",e)}hasChanges(){return this.record.hasChanges()}get name(){return this.record.get("name")}set name(e){this.record.set("name",e)}getColumns(){return this.record.get("columns").map(e=>new Proxy(e,{get:(t,s)=>t[s],set:(t,s,r)=>(this.record.set("columns",this.record.get("columns").map(o=>o.name===t.name?{...o,[s]:r}:o)),!0)}))}async addColumn(e,t){const s={name:e,default:null,not_null:!1,primary_key:!1,type:t};this.record.set("columns",[...this.record.get("columns").map(r=>r),s])}static async dbTypes(){return n.dbTypes()}async deleteColumn(e){this.record.set("columns",this.record.get("columns").filter(t=>t.name!==e))}async select(e={}){const t=Object.keys(e).map(s=>`${s} = :${s}`).join(" AND ");return n.selectRow(this.name,t,e)}async insertRow(e){return n.insertRow(this.name,e)}async updateRow(e,t){const s=Object.keys(e).map(r=>`${r} = :${r}`).join(" AND ");return n.updateRow(this.name,s,t,e)}async deleteRow(e){const t=Object.keys(e).map(s=>`${s} = :${s}`).join(" AND ");return n.deleteRow(this.name,t,e)}}export{i as T}; -//# sourceMappingURL=tables.94b40ff0.js.map +var d=Object.defineProperty;var p=(a,e,t)=>e in a?d(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var c=(a,e,t)=>(p(a,typeof e!="symbol"?e+"":e,t),t);import{A as u}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="edc5b18a-f734-49a9-ba52-898f0dd1c5fb",a._sentryDebugIdIdentifier="sentry-dbid-edc5b18a-f734-49a9-ba52-898f0dd1c5fb")}catch{}})();class y{async list(){return await(await fetch("/_editor/api/tables")).json()}async create(){return await(await fetch("/_editor/api/tables",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async get(e){return await(await fetch(`/_editor/api/tables/${e}`)).json()}async update(e,t){return await(await fetch(`/_editor/api/tables/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}async delete(e){await fetch(`/_editor/api/tables/${e}`,{method:"DELETE"})}async duplicate(e){return await(await fetch(`/_editor/api/tables/${e}/duplicate`,{method:"POST"})).json()}async dbTypes(){return(await fetch("/_editor/api/workspace/db-types")).json()}async selectRow(e,t,s){return(await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",where:t,params:s})})).json()}async insertRow(e,t){const s=await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"insert",values:t})});return s.ok?{type:"insert-row:success",row:await s.json()}:{type:"insert-row:error",reason:await s.text()}}async updateRow(e,t,s,r){const o=await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",params:r,where:t,set:s})});return o.ok?{type:"update-row:success",row:await o.json()}:{type:"update-row:error",reason:await o.text()}}async deleteRow(e,t,s){await fetch(`/_editor/api/tables/${e}/rows`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",where:t,params:s})})}}const n=new y;class i{constructor(e){c(this,"record");this.record=u.create(n,e,"name")}static async list(){return(await n.list()).map(t=>new i(t))}static async create(){const e=await n.create();return new i(e)}static async get(e){const t=await n.get(e);return new i(t)}async delete(){await n.delete(this.name)}async duplicate(){const e=await n.duplicate(this.name);return new i(e)}async save(){await this.record.save()}onUpdate(e){this.record.pubsub.subscribe("update",e)}hasChanges(){return this.record.hasChanges()}get name(){return this.record.get("name")}set name(e){this.record.set("name",e)}getColumns(){return this.record.get("columns").map(e=>new Proxy(e,{get:(t,s)=>t[s],set:(t,s,r)=>(this.record.set("columns",this.record.get("columns").map(o=>o.name===t.name?{...o,[s]:r}:o)),!0)}))}async addColumn(e,t){const s={name:e,default:null,not_null:!1,primary_key:!1,type:t};this.record.set("columns",[...this.record.get("columns").map(r=>r),s])}static async dbTypes(){return n.dbTypes()}async deleteColumn(e){this.record.set("columns",this.record.get("columns").filter(t=>t.name!==e))}async select(e={}){const t=Object.keys(e).map(s=>`${s} = :${s}`).join(" AND ");return n.selectRow(this.name,t,e)}async insertRow(e){return n.insertRow(this.name,e)}async updateRow(e,t){const s=Object.keys(e).map(r=>`${r} = :${r}`).join(" AND ");return n.updateRow(this.name,s,t,e)}async deleteRow(e){const t=Object.keys(e).map(s=>`${s} = :${s}`).join(" AND ");return n.deleteRow(this.name,t,e)}}export{i as T}; +//# sourceMappingURL=tables.b83ad23f.js.map diff --git a/abstra_statics/dist/assets/tsMode.f7255e05.js b/abstra_statics/dist/assets/tsMode.2890ed03.js similarity index 98% rename from abstra_statics/dist/assets/tsMode.f7255e05.js rename to abstra_statics/dist/assets/tsMode.2890ed03.js index de95d8a0ba..0e2697f961 100644 --- a/abstra_statics/dist/assets/tsMode.f7255e05.js +++ b/abstra_statics/dist/assets/tsMode.2890ed03.js @@ -1,4 +1,4 @@ -var M=Object.defineProperty;var K=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(K(e,typeof t!="symbol"?t+"":t,r),r);import{t as R,m as E}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5dd2cc3f-ba0a-44bd-a787-ffbe27417192",e._sentryDebugIdIdentifier="sentry-dbid-5dd2cc3f-ba0a-44bd-a787-ffbe27417192")}catch{}})();/*!----------------------------------------------------------------------------- +var M=Object.defineProperty;var K=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(K(e,typeof t!="symbol"?t+"":t,r),r);import{t as R,m as E}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dd992a76-63e4-440e-a16c-6653f7ca600d",e._sentryDebugIdIdentifier="sentry-dbid-dd992a76-63e4-440e-a16c-6653f7ca600d")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license @@ -14,4 +14,4 @@ ${O(r)}`;return t}};function O(e){let t=`*@${e.name}*`;if(e.name==="param"&&e.te `+n:"")}]}}},J=class extends w{async provideDocumentHighlights(e,t,r){const s=e.uri,a=e.getOffsetAt(t),u=await this._worker(s);if(e.isDisposed())return;const c=await u.getOccurrencesAtPosition(s.toString(),a);if(!(!c||e.isDisposed()))return c.map(g=>({range:this._textSpanToRange(e,g.textSpan),kind:g.isWriteAccess?i.languages.DocumentHighlightKind.Write:i.languages.DocumentHighlightKind.Text}))}},Q=class extends w{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,r){const s=e.uri,a=e.getOffsetAt(t),u=await this._worker(s);if(e.isDisposed())return;const c=await u.getDefinitionAtPosition(s.toString(),a);if(!c||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(c.map(n=>i.Uri.parse(n.fileName))),e.isDisposed()))return;const g=[];for(let n of c){const p=this._libFiles.getOrCreateModel(n.fileName);p&&g.push({uri:p.uri,range:this._textSpanToRange(p,n.textSpan)})}return g}},q=class extends w{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,r,s){const a=e.uri,u=e.getOffsetAt(t),c=await this._worker(a);if(e.isDisposed())return;const g=await c.getReferencesAtPosition(a.toString(),u);if(!g||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(g.map(p=>i.Uri.parse(p.fileName))),e.isDisposed()))return;const n=[];for(let p of g){const d=this._libFiles.getOrCreateModel(p.fileName);d&&n.push({uri:d.uri,range:this._textSpanToRange(d,p.textSpan)})}return n}},X=class extends w{async provideDocumentSymbols(e,t){const r=e.uri,s=await this._worker(r);if(e.isDisposed())return;const a=await s.getNavigationBarItems(r.toString());if(!a||e.isDisposed())return;const u=(g,n,p)=>{let d={name:n.text,detail:"",kind:m[n.kind]||i.languages.SymbolKind.Variable,range:this._textSpanToRange(e,n.spans[0]),selectionRange:this._textSpanToRange(e,n.spans[0]),tags:[]};if(p&&(d.containerName=p),n.childItems&&n.childItems.length>0)for(let f of n.childItems)u(g,f,d.name);g.push(d)};let c=[];return a.forEach(g=>u(c,g)),c}},l=class{};b(l,"unknown","");b(l,"keyword","keyword");b(l,"script","script");b(l,"module","module");b(l,"class","class");b(l,"interface","interface");b(l,"type","type");b(l,"enum","enum");b(l,"variable","var");b(l,"localVariable","local var");b(l,"function","function");b(l,"localFunction","local function");b(l,"memberFunction","method");b(l,"memberGetAccessor","getter");b(l,"memberSetAccessor","setter");b(l,"memberVariable","property");b(l,"constructorImplementation","constructor");b(l,"callSignature","call");b(l,"indexSignature","index");b(l,"constructSignature","construct");b(l,"parameter","parameter");b(l,"typeParameter","type parameter");b(l,"primitiveType","primitive type");b(l,"label","label");b(l,"alias","alias");b(l,"const","const");b(l,"let","let");b(l,"warning","warning");var m=Object.create(null);m[l.module]=i.languages.SymbolKind.Module;m[l.class]=i.languages.SymbolKind.Class;m[l.enum]=i.languages.SymbolKind.Enum;m[l.interface]=i.languages.SymbolKind.Interface;m[l.memberFunction]=i.languages.SymbolKind.Method;m[l.memberVariable]=i.languages.SymbolKind.Property;m[l.memberGetAccessor]=i.languages.SymbolKind.Property;m[l.memberSetAccessor]=i.languages.SymbolKind.Property;m[l.variable]=i.languages.SymbolKind.Variable;m[l.const]=i.languages.SymbolKind.Variable;m[l.localVariable]=i.languages.SymbolKind.Variable;m[l.variable]=i.languages.SymbolKind.Variable;m[l.function]=i.languages.SymbolKind.Function;m[l.localFunction]=i.languages.SymbolKind.Function;var S=class extends w{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:` `,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},Y=class extends S{async provideDocumentRangeFormattingEdits(e,t,r,s){const a=e.uri,u=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),c=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),g=await this._worker(a);if(e.isDisposed())return;const n=await g.getFormattingEditsForRange(a.toString(),u,c,S._convertOptions(r));if(!(!n||e.isDisposed()))return n.map(p=>this._convertTextChanges(e,p))}},Z=class extends S{get autoFormatTriggerCharacters(){return[";","}",` `]}async provideOnTypeFormattingEdits(e,t,r,s,a){const u=e.uri,c=e.getOffsetAt(t),g=await this._worker(u);if(e.isDisposed())return;const n=await g.getFormattingEditsAfterKeystroke(u.toString(),c,r,S._convertOptions(s));if(!(!n||e.isDisposed()))return n.map(p=>this._convertTextChanges(e,p))}},ee=class extends S{async provideCodeActions(e,t,r,s){const a=e.uri,u=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),c=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),g=S._convertOptions(e.getOptions()),n=r.markers.filter(h=>h.code).map(h=>h.code).map(Number),p=await this._worker(a);if(e.isDisposed())return;const d=await p.getCodeFixesAtPosition(a.toString(),u,c,n,g);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(h=>h.changes.filter(y=>y.isNewFile).length===0).map(h=>this._tsCodeFixActionToMonacoCodeAction(e,r,h)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,r){const s=[];for(const u of r.changes)for(const c of u.textChanges)s.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,c.span),text:c.newText}});return{title:r.description,edit:{edits:s},diagnostics:t.markers,kind:"quickfix"}}},te=class extends w{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,r,s){const a=e.uri,u=a.toString(),c=e.getOffsetAt(t),g=await this._worker(a);if(e.isDisposed())return;const n=await g.getRenameInfo(u,c,{allowRenameOfImportPath:!1});if(n.canRename===!1)return{edits:[],rejectReason:n.localizedErrorMessage};if(n.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const p=await g.findRenameLocations(u,c,!1,!1,!1);if(!p||e.isDisposed())return;const d=[];for(const f of p){const h=this._libFiles.getOrCreateModel(f.fileName);if(h)d.push({resource:h.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(h,f.textSpan),text:r}});else throw new Error(`Unknown file ${f.fileName}.`)}return{edits:d}}},re=class extends w{async provideInlayHints(e,t,r){const s=e.uri,a=s.toString(),u=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),c=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),g=await this._worker(s);return e.isDisposed()?null:{hints:(await g.provideInlayHints(a,u,c)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return i.languages.InlayHintKind.Parameter;case"Type":return i.languages.InlayHintKind.Type;default:return i.languages.InlayHintKind.Type}}},A,L;function ae(e){L=N(e,"typescript")}function oe(e){A=N(e,"javascript")}function le(){return new Promise((e,t)=>{if(!A)return t("JavaScript not registered!");e(A)})}function ce(){return new Promise((e,t)=>{if(!L)return t("TypeScript not registered!");e(L)})}function N(e,t){const r=new U(t,e),s=(...u)=>r.getLanguageServiceWorker(...u),a=new $(s);return i.languages.registerCompletionItemProvider(t,new D(s)),i.languages.registerSignatureHelpProvider(t,new I(s)),i.languages.registerHoverProvider(t,new G(s)),i.languages.registerDocumentHighlightProvider(t,new J(s)),i.languages.registerDefinitionProvider(t,new Q(a,s)),i.languages.registerReferenceProvider(t,new q(a,s)),i.languages.registerDocumentSymbolProvider(t,new X(s)),i.languages.registerDocumentRangeFormattingEditProvider(t,new Y(s)),i.languages.registerOnTypeFormattingEditProvider(t,new Z(s)),i.languages.registerCodeActionProvider(t,new ee(s)),i.languages.registerRenameProvider(t,new te(a,s)),i.languages.registerInlayHintsProvider(t,new re(s)),new z(a,e,t,s),s}export{w as Adapter,ee as CodeActionAdaptor,Q as DefinitionAdapter,z as DiagnosticsAdapter,Y as FormatAdapter,S as FormatHelper,Z as FormatOnTypeAdapter,re as InlayHintsAdapter,l as Kind,$ as LibFiles,J as OccurrencesAdapter,X as OutlineAdapter,G as QuickInfoAdapter,q as ReferenceAdapter,te as RenameAdapter,I as SignatureHelpAdapter,D as SuggestAdapter,U as WorkerManager,F as flattenDiagnosticMessageText,le as getJavaScriptWorker,ce as getTypeScriptWorker,oe as setupJavaScript,ae as setupTypeScript}; -//# sourceMappingURL=tsMode.f7255e05.js.map +//# sourceMappingURL=tsMode.2890ed03.js.map diff --git a/abstra_statics/dist/assets/typescript.8aa88c16.js b/abstra_statics/dist/assets/typescript.ac0b7aa1.js similarity index 92% rename from abstra_statics/dist/assets/typescript.8aa88c16.js rename to abstra_statics/dist/assets/typescript.ac0b7aa1.js index bd5ca792d1..a673223c64 100644 --- a/abstra_statics/dist/assets/typescript.8aa88c16.js +++ b/abstra_statics/dist/assets/typescript.ac0b7aa1.js @@ -1,7 +1,7 @@ -import{m as a}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4f9ad234-c90e-45be-8ba2-26569577b725",t._sentryDebugIdIdentifier="sentry-dbid-4f9ad234-c90e-45be-8ba2-26569577b725")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as a}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4481dc15-b9ee-4529-aa18-bd7e78bf5dbb",t._sentryDebugIdIdentifier="sentry-dbid-4481dc15-b9ee-4529-aa18-bd7e78bf5dbb")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,s=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!d.call(t,r)&&r!==n&&c(t,r,{get:()=>e[r],enumerable:!(i=p(e,r))||i.enumerable});return t},l=(t,e,n)=>(s(t,e,"default"),n&&s(n,e,"default")),o={};l(o,a);var u={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},f={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{u as conf,f as language}; -//# sourceMappingURL=typescript.8aa88c16.js.map + *-----------------------------------------------------------------------------*/var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,s=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!g.call(t,r)&&r!==n&&c(t,r,{get:()=>e[r],enumerable:!(i=p(e,r))||i.enumerable});return t},l=(t,e,n)=>(s(t,e,"default"),n&&s(n,e,"default")),o={};l(o,a);var u={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},f={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{u as conf,f as language}; +//# sourceMappingURL=typescript.ac0b7aa1.js.map diff --git a/abstra_statics/dist/assets/uuid.d6201508.js b/abstra_statics/dist/assets/uuid.d6201508.js new file mode 100644 index 0000000000..21a88c2b3f --- /dev/null +++ b/abstra_statics/dist/assets/uuid.d6201508.js @@ -0,0 +1,2 @@ +import"./registerWidgets.89616af0.js";(function(){try{var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(x._sentryDebugIds=x._sentryDebugIds||{},x._sentryDebugIds[e]="0c7cd9f4-96d1-47a4-9ead-11b85b2cc65b",x._sentryDebugIdIdentifier="sentry-dbid-0c7cd9f4-96d1-47a4-9ead-11b85b2cc65b")}catch{}})();const t=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(x){const e=Math.random()*16|0;return(x=="x"?e:e&3|8).toString(16)});export{t as u}; +//# sourceMappingURL=uuid.d6201508.js.map diff --git a/abstra_statics/dist/assets/uuid.f763745d.js b/abstra_statics/dist/assets/uuid.f763745d.js deleted file mode 100644 index c199b80d30..0000000000 --- a/abstra_statics/dist/assets/uuid.f763745d.js +++ /dev/null @@ -1,2 +0,0 @@ -import"./registerWidgets.ca6243ef.js";(function(){try{var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(x._sentryDebugIds=x._sentryDebugIds||{},x._sentryDebugIds[e]="200fe7fc-4c2a-4be9-8406-ba3ac281431a",x._sentryDebugIdIdentifier="sentry-dbid-200fe7fc-4c2a-4be9-8406-ba3ac281431a")}catch{}})();const r=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(x){const e=Math.random()*16|0;return(x=="x"?e:e&3|8).toString(16)});export{r as u}; -//# sourceMappingURL=uuid.f763745d.js.map diff --git a/abstra_statics/dist/assets/vue-quill.esm-bundler.f4c20868.js b/abstra_statics/dist/assets/vue-quill.esm-bundler.9116f2eb.js similarity index 99% rename from abstra_statics/dist/assets/vue-quill.esm-bundler.f4c20868.js rename to abstra_statics/dist/assets/vue-quill.esm-bundler.9116f2eb.js index d30d427ec3..706f987313 100644 --- a/abstra_statics/dist/assets/vue-quill.esm-bundler.f4c20868.js +++ b/abstra_statics/dist/assets/vue-quill.esm-bundler.9116f2eb.js @@ -1,4 +1,4 @@ -import{a1 as tr,p as Tt,d as er,o as nr,al as rr,r as Fn,a2 as Ln,k as ir,ae as Un}from"./registerWidgets.ca6243ef.js";(function(){try{var R=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U=new Error().stack;U&&(R._sentryDebugIds=R._sentryDebugIds||{},R._sentryDebugIds[U]="0649ea97-fd43-48a6-abe0-b4ddd11b677a",R._sentryDebugIdIdentifier="sentry-dbid-0649ea97-fd43-48a6-abe0-b4ddd11b677a")}catch{}})();var Gn={exports:{}};/*! +import{a1 as tr,p as Tt,d as er,o as nr,al as rr,r as Fn,a2 as Ln,k as ir,ae as Un}from"./registerWidgets.89616af0.js";(function(){try{var R=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U=new Error().stack;U&&(R._sentryDebugIds=R._sentryDebugIds||{},R._sentryDebugIds[U]="f4684216-9ff7-455a-800c-e69511737936",R._sentryDebugIdIdentifier="sentry-dbid-f4684216-9ff7-455a-800c-e69511737936")}catch{}})();var Gn={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen @@ -52,4 +52,4 @@ import{a1 as tr,p as Tt,d as er,o as nr,al as rr,r as Fn,a2 as Ln,k as ir,ae as */const $n={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},_r=er({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:R=>["delta","html","text"].includes(R)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:R=>["snow","bubble",""].includes(R)},toolbar:{type:[String,Array,Object],required:!1,validator:R=>typeof R=="string"&&R!==""?R.charAt(0)==="#"?!0:Object.keys($n).indexOf(R)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(R,U)=>{nr(()=>{E()}),rr(()=>{m=null});let m,p;const c=Fn(),E=()=>{var v;if(!!c.value){if(p=b(),R.modules)if(Array.isArray(R.modules))for(const O of R.modules)qn.register(`modules/${O.name}`,O.module);else qn.register(`modules/${R.modules.name}`,R.modules.module);m=new qn(c.value,p),f(R.content),m.on("text-change",o),m.on("selection-change",e),m.on("editor-change",s),R.theme!=="bubble"&&c.value.classList.remove("ql-bubble"),R.theme!=="snow"&&c.value.classList.remove("ql-snow"),(v=m.getModule("toolbar"))===null||v===void 0||v.container.addEventListener("mousedown",O=>{O.preventDefault()}),U.emit("ready",m)}},b=()=>{const v={};if(R.theme!==""&&(v.theme=R.theme),R.readOnly&&(v.readOnly=R.readOnly),R.placeholder&&(v.placeholder=R.placeholder),R.toolbar&&R.toolbar!==""&&(v.modules={toolbar:(()=>{if(typeof R.toolbar=="object")return R.toolbar;if(typeof R.toolbar=="string")return R.toolbar.charAt(0)==="#"?R.toolbar:$n[R.toolbar]})()}),R.modules){const O=(()=>{var k,L;const D={};if(Array.isArray(R.modules))for(const z of R.modules)D[z.name]=(k=z.options)!==null&&k!==void 0?k:{};else D[R.modules.name]=(L=R.modules.options)!==null&&L!==void 0?L:{};return D})();v.modules=Object.assign({},v.modules,O)}return Object.assign({},R.globalOptions,R.options,v)},_=v=>typeof v=="object"&&v?v.slice():v,y=v=>Object.values(v.ops).some(O=>!O.retain||Object.keys(O).length!==1);let g;const h=v=>{if(typeof g==typeof v){if(v===g)return!0;if(typeof v=="object"&&v&&typeof g=="object"&&g)return!y(g.diff(v))}return!1},o=(v,O,k)=>{g=_(i()),h(R.content)||U.emit("update:content",g),U.emit("textChange",{delta:v,oldContents:O,source:k})},t=Fn(),e=(v,O,k)=>{t.value=!!(m!=null&&m.hasFocus()),U.emit("selectionChange",{range:v,oldRange:O,source:k})};Ln(t,v=>{v?U.emit("focus",c):U.emit("blur",c)});const s=(...v)=>{v[0]==="text-change"&&U.emit("editorChange",{name:v[0],delta:v[1],oldContents:v[2],source:v[3]}),v[0]==="selection-change"&&U.emit("editorChange",{name:v[0],range:v[1],oldRange:v[2],source:v[3]})},l=()=>c.value,u=()=>{var v;return(v=m==null?void 0:m.getModule("toolbar"))===null||v===void 0?void 0:v.container},r=()=>{if(m)return m;throw`The quill editor hasn't been instantiated yet, make sure to call this method when the editor ready or use v-on:ready="onReady(quill)" event instead.`},i=(v,O)=>R.contentType==="html"?N():R.contentType==="text"?n(v,O):m==null?void 0:m.getContents(v,O),f=(v,O="api")=>{const k=v||(R.contentType==="delta"?new mr:"");R.contentType==="html"?w(k):R.contentType==="text"?d(k,O):m==null||m.setContents(k,O),g=_(k)},n=(v,O)=>{var k;return(k=m==null?void 0:m.getText(v,O))!==null&&k!==void 0?k:""},d=(v,O="api")=>{m==null||m.setText(v,O)},N=()=>{var v;return(v=m==null?void 0:m.root.innerHTML)!==null&&v!==void 0?v:""},w=v=>{m&&(m.root.innerHTML=v)},T=(v,O="api")=>{const k=m==null?void 0:m.clipboard.convert(v);k&&(m==null||m.setContents(k,O))},P=()=>{m==null||m.focus()},A=()=>{Un(()=>{var v;!U.slots.toolbar&&m&&((v=m.getModule("toolbar"))===null||v===void 0||v.container.remove()),E()})};return Ln(()=>R.content,v=>{if(!m||!v||h(v))return;const O=m.getSelection();O&&Un(()=>m==null?void 0:m.setSelection(O)),f(v)},{deep:!0}),Ln(()=>R.enable,v=>{m&&m.enable(v)}),{editor:c,getEditor:l,getToolbar:u,getQuill:r,getContents:i,setContents:f,getHTML:N,setHTML:w,pasteHTML:T,focus:P,getText:n,setText:d,reinit:A}},render(){var R,U;return[(U=(R=this.$slots).toolbar)===null||U===void 0?void 0:U.call(R),ir("div",{ref:"editor",...this.$attrs})]}});export{mr as Delta,qn as Quill,_r as QuillEditor}; -//# sourceMappingURL=vue-quill.esm-bundler.f4c20868.js.map +//# sourceMappingURL=vue-quill.esm-bundler.9116f2eb.js.map diff --git a/abstra_statics/dist/assets/workspaces.25055240.js b/abstra_statics/dist/assets/workspaces.621b79ad.js similarity index 88% rename from abstra_statics/dist/assets/workspaces.25055240.js rename to abstra_statics/dist/assets/workspaces.621b79ad.js index 718a4bb5c5..e39cbe33cc 100644 --- a/abstra_statics/dist/assets/workspaces.25055240.js +++ b/abstra_statics/dist/assets/workspaces.621b79ad.js @@ -1,2 +1,2 @@ -var n=Object.defineProperty;var i=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var a=(t,e,r)=>(i(t,typeof e!="symbol"?e+"":e,r),r);import{A as d}from"./activeRecord.11b7d185.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f55af987-38f3-4bba-8b1e-d4c7854c8fa3",t._sentryDebugIdIdentifier="sentry-dbid-f55af987-38f3-4bba-8b1e-d4c7854c8fa3")}catch{}})();class c{async get(){return await(await fetch("/_editor/api/workspace",{method:"GET",headers:{"Content-Type":"application/json"}})).json()}async update(e,r){return await(await fetch("/_editor/api/workspace",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).json()}async create(e){throw new Error("Not implemented")}async openFile(e){await fetch("/_editor/api/workspace/open-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})}async deploy(){await fetch("/_editor/api/workspace/deploy",{method:"POST",headers:{"Content-Type":"application/json"}})}}const o=new c;class s{constructor(e){a(this,"record");this.record=d.create(o,e,null)}static async get(){const e=await o.get();return new s(e)}static from(e){return new s(e)}get brandName(){var e;return(e=this.record.get("brand_name"))!=null?e:""}set brandName(e){this.record.set("brand_name",e)}get fontColor(){var e;return(e=this.record.get("font_color"))!=null?e:"#000000"}set fontColor(e){this.record.set("font_color",e)}get logoUrl(){return this.record.get("logo_url")}set logoUrl(e){this.record.set("logo_url",e)}get mainColor(){var e;return(e=this.record.get("main_color"))!=null?e:"#000000"}set mainColor(e){this.record.set("main_color",e)}get fontFamily(){var e;return(e=this.record.get("font_family"))!=null?e:"Inter"}set fontFamily(e){this.record.set("font_family",e)}get theme(){var e;return(e=this.record.get("theme"))!=null?e:"#ffffff"}set theme(e){this.record.set("theme",e)}async save(){return this.record.save()}hasChanges(){return this.record.hasChanges()}async openFile(e){await o.openFile(e)}static async deploy(){await o.deploy()}get sidebar(){var e;return(e=this.record.get("sidebar"))!=null?e:[]}set sidebar(e){this.record.set("sidebar",e)}makeRunnerData(){const e=this.logoUrl?this.logoUrl.startsWith("http://")?this.logoUrl:this.logoUrl.startsWith("https://")?this.logoUrl:"/_assets/logo":this.logoUrl;return{sidebar:this.sidebar,brandName:this.brandName,fontFamily:this.fontFamily,logoUrl:e,mainColor:this.mainColor,theme:this.theme}}}export{s as W}; -//# sourceMappingURL=workspaces.25055240.js.map +var n=Object.defineProperty;var i=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var a=(t,e,r)=>(i(t,typeof e!="symbol"?e+"":e,r),r);import{A as d}from"./activeRecord.3d3c7835.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a57da9ce-781c-4b41-824b-d43afbc8d38f",t._sentryDebugIdIdentifier="sentry-dbid-a57da9ce-781c-4b41-824b-d43afbc8d38f")}catch{}})();class c{async get(){return await(await fetch("/_editor/api/workspace",{method:"GET",headers:{"Content-Type":"application/json"}})).json()}async update(e,r){return await(await fetch("/_editor/api/workspace",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).json()}async create(e){throw new Error("Not implemented")}async openFile(e){await fetch("/_editor/api/workspace/open-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})}async deploy(){await fetch("/_editor/api/workspace/deploy",{method:"POST",headers:{"Content-Type":"application/json"}})}}const o=new c;class s{constructor(e){a(this,"record");this.record=d.create(o,e,null)}static async get(){const e=await o.get();return new s(e)}static from(e){return new s(e)}get brandName(){var e;return(e=this.record.get("brand_name"))!=null?e:""}set brandName(e){this.record.set("brand_name",e)}get fontColor(){var e;return(e=this.record.get("font_color"))!=null?e:"#000000"}set fontColor(e){this.record.set("font_color",e)}get logoUrl(){return this.record.get("logo_url")}set logoUrl(e){this.record.set("logo_url",e)}get mainColor(){var e;return(e=this.record.get("main_color"))!=null?e:"#000000"}set mainColor(e){this.record.set("main_color",e)}get fontFamily(){var e;return(e=this.record.get("font_family"))!=null?e:"Inter"}set fontFamily(e){this.record.set("font_family",e)}get theme(){var e;return(e=this.record.get("theme"))!=null?e:"#ffffff"}set theme(e){this.record.set("theme",e)}async save(){return this.record.save()}hasChanges(){return this.record.hasChanges()}async openFile(e){await o.openFile(e)}static async deploy(){await o.deploy()}get sidebar(){var e;return(e=this.record.get("sidebar"))!=null?e:[]}set sidebar(e){this.record.set("sidebar",e)}makeRunnerData(){const e=this.logoUrl?this.logoUrl.startsWith("http://")?this.logoUrl:this.logoUrl.startsWith("https://")?this.logoUrl:"/_assets/logo":this.logoUrl;return{sidebar:this.sidebar,brandName:this.brandName,fontFamily:this.fontFamily,logoUrl:e,mainColor:this.mainColor,theme:this.theme}}}export{s as W}; +//# sourceMappingURL=workspaces.621b79ad.js.map diff --git a/abstra_statics/dist/assets/xml.9eb7a6fc.js b/abstra_statics/dist/assets/xml.d83bcfca.js similarity index 82% rename from abstra_statics/dist/assets/xml.9eb7a6fc.js rename to abstra_statics/dist/assets/xml.d83bcfca.js index f4fda6c072..708e5be193 100644 --- a/abstra_statics/dist/assets/xml.9eb7a6fc.js +++ b/abstra_statics/dist/assets/xml.d83bcfca.js @@ -1,7 +1,7 @@ -import{m as d}from"./editor.main.71e27b19.js";import"./registerWidgets.ca6243ef.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="7580adfc-dcd1-4cad-9fff-67f0f3782d93",t._sentryDebugIdIdentifier="sentry-dbid-7580adfc-dcd1-4cad-9fff-67f0f3782d93")}catch{}})();/*!----------------------------------------------------------------------------- +import{m as d}from"./editor.main.1c8cebfc.js";import"./registerWidgets.89616af0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a5a48202-dad3-42aa-968b-d46d6c064318",t._sentryDebugIdIdentifier="sentry-dbid-a5a48202-dad3-42aa-968b-d46d6c064318")}catch{}})();/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of m(e))!s.call(t,a)&&a!==n&&c(t,a,{get:()=>e[a],enumerable:!(i=l(e,a))||i.enumerable});return t},f=(t,e,n)=>(r(t,e,"default"),n&&r(n,e,"default")),o={};f(o,d);var g={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:o.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:o.languages.IndentAction.Indent}}]},_={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:o.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:o.languages.IndentAction.Indent}}]},b={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/