@teambit/code 0.0.927 → 0.0.929

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,15 @@
1
+ import React from 'react';
1
2
  import { ComponentAspect, ComponentUI } from '@teambit/component';
2
3
  import { UIRuntime } from '@teambit/ui';
3
- import React from 'react';
4
+ import { CodeCompare } from '@teambit/code.ui.code-compare';
4
5
  import { Harmony, SlotRegistry, Slot } from '@teambit/harmony';
5
6
  import type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';
6
7
  import { staticStorageUrl } from '@teambit/base-ui.constants.storage';
7
8
  import { CodePage } from '@teambit/code.ui.code-tab-page';
8
9
  import { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';
10
+ import { CodeCompareSection } from '@teambit/code.ui.code-compare-section';
9
11
  import { CodeAspect } from './code.aspect';
10
12
  import { CodeSection } from './code.section';
11
- import { CodeCompareSection } from './code.compare.section';
12
13
 
13
14
  const isTsx = /\.tsx$/;
14
15
 
@@ -31,10 +32,15 @@ export class CodeUI {
31
32
  return <CodePage fileIconSlot={this.fileIconSlot} host={this.host} />;
32
33
  };
33
34
 
35
+ getCodeCompare = () => {
36
+ return <CodeCompare fileIconSlot={this.fileIconSlot} />;
37
+ };
38
+
34
39
  registerEnvFileIcon(icons: FileIconMatch[]) {
35
40
  this.fileIconSlot?.register(icons);
36
41
  return this;
37
42
  }
43
+
38
44
  static dependencies = [ComponentAspect, ComponentCompareAspect];
39
45
 
40
46
  static runtime = UIRuntime;
@@ -51,13 +57,14 @@ export class CodeUI {
51
57
  const host = String(config.get('teambit.harmony/bit'));
52
58
  const ui = new CodeUI(host, fileIconSlot);
53
59
  const section = new CodeSection(ui);
60
+
54
61
  // overrides the default tsx react icon with the typescript icon
55
62
  ui.registerEnvFileIcon([
56
63
  (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),
57
64
  ]);
58
65
  component.registerRoute([section.route]);
59
66
  component.registerWidget(section.navigationLink, section.order);
60
- const codeCompare = new CodeCompareSection(fileIconSlot);
67
+ const codeCompare = new CodeCompareSection(ui);
61
68
  componentCompare.registerNavigation({
62
69
  props: codeCompare.navigationLink,
63
70
  order: codeCompare.navigationLink.order,
@@ -20,6 +20,7 @@ export declare class CodeUI {
20
20
  */
21
21
  host: string, fileIconSlot?: FileIconSlot | undefined);
22
22
  getCodePage: () => JSX.Element;
23
+ getCodeCompare: () => JSX.Element;
23
24
  registerEnvFileIcon(icons: FileIconMatch[]): this;
24
25
  static dependencies: import("@teambit/harmony").Aspect[];
25
26
  static runtime: import("@teambit/harmony").RuntimeDefinition;
@@ -14,6 +14,13 @@ function _defineProperty2() {
14
14
  };
15
15
  return data;
16
16
  }
17
+ function _react() {
18
+ const data = _interopRequireDefault(require("react"));
19
+ _react = function () {
20
+ return data;
21
+ };
22
+ return data;
23
+ }
17
24
  function _component() {
18
25
  const data = require("@teambit/component");
19
26
  _component = function () {
@@ -28,9 +35,9 @@ function _ui() {
28
35
  };
29
36
  return data;
30
37
  }
31
- function _react() {
32
- const data = _interopRequireDefault(require("react"));
33
- _react = function () {
38
+ function _codeUi() {
39
+ const data = require("@teambit/code.ui.code-compare");
40
+ _codeUi = function () {
34
41
  return data;
35
42
  };
36
43
  return data;
@@ -49,9 +56,9 @@ function _baseUiConstants() {
49
56
  };
50
57
  return data;
51
58
  }
52
- function _codeUi() {
59
+ function _codeUi2() {
53
60
  const data = require("@teambit/code.ui.code-tab-page");
54
- _codeUi = function () {
61
+ _codeUi2 = function () {
55
62
  return data;
56
63
  };
57
64
  return data;
@@ -63,6 +70,13 @@ function _componentCompare() {
63
70
  };
64
71
  return data;
65
72
  }
73
+ function _codeUi3() {
74
+ const data = require("@teambit/code.ui.code-compare-section");
75
+ _codeUi3 = function () {
76
+ return data;
77
+ };
78
+ return data;
79
+ }
66
80
  function _code() {
67
81
  const data = require("./code.aspect");
68
82
  _code = function () {
@@ -77,13 +91,6 @@ function _code2() {
77
91
  };
78
92
  return data;
79
93
  }
80
- function _codeCompare() {
81
- const data = require("./code.compare.section");
82
- _codeCompare = function () {
83
- return data;
84
- };
85
- return data;
86
- }
87
94
  const isTsx = /\.tsx$/;
88
95
  /**
89
96
  * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.
@@ -98,11 +105,16 @@ class CodeUI {
98
105
  this.host = host;
99
106
  this.fileIconSlot = fileIconSlot;
100
107
  (0, _defineProperty2().default)(this, "getCodePage", () => {
101
- return /*#__PURE__*/_react().default.createElement(_codeUi().CodePage, {
108
+ return /*#__PURE__*/_react().default.createElement(_codeUi2().CodePage, {
102
109
  fileIconSlot: this.fileIconSlot,
103
110
  host: this.host
104
111
  });
105
112
  });
113
+ (0, _defineProperty2().default)(this, "getCodeCompare", () => {
114
+ return /*#__PURE__*/_react().default.createElement(_codeUi().CodeCompare, {
115
+ fileIconSlot: this.fileIconSlot
116
+ });
117
+ });
106
118
  }
107
119
  registerEnvFileIcon(icons) {
108
120
  var _this$fileIconSlot;
@@ -116,11 +128,12 @@ class CodeUI {
116
128
  const host = String(config.get('teambit.harmony/bit'));
117
129
  const ui = new CodeUI(host, fileIconSlot);
118
130
  const section = new (_code2().CodeSection)(ui);
131
+
119
132
  // overrides the default tsx react icon with the typescript icon
120
133
  ui.registerEnvFileIcon([fileName => isTsx.test(fileName) ? `${_baseUiConstants().staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined]);
121
134
  component.registerRoute([section.route]);
122
135
  component.registerWidget(section.navigationLink, section.order);
123
- const codeCompare = new (_codeCompare().CodeCompareSection)(fileIconSlot);
136
+ const codeCompare = new (_codeUi3().CodeCompareSection)(ui);
124
137
  componentCompare.registerNavigation({
125
138
  props: codeCompare.navigationLink,
126
139
  order: codeCompare.navigationLink.order
@@ -1 +1 @@
1
- {"version":3,"names":["isTsx","CodeUI","constructor","host","fileIconSlot","registerEnvFileIcon","icons","register","provider","component","componentCompare","_","harmony","config","String","get","ui","section","CodeSection","fileName","test","staticStorageUrl","undefined","registerRoute","route","registerWidget","navigationLink","order","codeCompare","CodeCompareSection","registerNavigation","props","registerRoutes","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CodeAspect","addRuntime"],"sources":["code.ui.runtime.tsx"],"sourcesContent":["import { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport React from 'react';\nimport { Harmony, SlotRegistry, Slot } from '@teambit/harmony';\nimport type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';\nimport { staticStorageUrl } from '@teambit/base-ui.constants.storage';\nimport { CodePage } from '@teambit/code.ui.code-tab-page';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CodeAspect } from './code.aspect';\nimport { CodeSection } from './code.section';\nimport { CodeCompareSection } from './code.compare.section';\n\nconst isTsx = /\\.tsx$/;\n\nexport type FileIconSlot = SlotRegistry<FileIconMatch[]>;\n\n/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */\nexport class CodeUI {\n constructor(\n /**\n * register an icon for a specific file type. pass icon and a match method/regexp\n */\n private host: string,\n private fileIconSlot?: FileIconSlot\n ) {}\n\n getCodePage = () => {\n return <CodePage fileIconSlot={this.fileIconSlot} host={this.host} />;\n };\n\n registerEnvFileIcon(icons: FileIconMatch[]) {\n this.fileIconSlot?.register(icons);\n return this;\n }\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<string>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n _,\n [fileIconSlot]: [FileIconSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const ui = new CodeUI(host, fileIconSlot);\n const section = new CodeSection(ui);\n // overrides the default tsx react icon with the typescript icon\n ui.registerEnvFileIcon([\n (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),\n ]);\n component.registerRoute([section.route]);\n component.registerWidget(section.navigationLink, section.order);\n const codeCompare = new CodeCompareSection(fileIconSlot);\n componentCompare.registerNavigation({\n props: codeCompare.navigationLink,\n order: codeCompare.navigationLink.order,\n });\n componentCompare.registerRoutes([codeCompare.route]);\n return ui;\n }\n}\n\nCodeAspect.addRuntime(CodeUI);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,KAAK,GAAG,QAAQ;AAItB;AACA;AACA;AACA;AACO,MAAMC,MAAM,CAAC;EAClBC,WAAW;EACT;AACJ;AACA;EACYC,IAAY,EACZC,YAA2B,EACnC;IAAA,KAFQD,IAAY,GAAZA,IAAY;IAAA,KACZC,YAA2B,GAA3BA,YAA2B;IAAA,qDAGvB,MAAM;MAClB,oBAAO,+BAAC,kBAAQ;QAAC,YAAY,EAAE,IAAI,CAACA,YAAa;QAAC,IAAI,EAAE,IAAI,CAACD;MAAK,EAAG;IACvE,CAAC;EAJE;EAMHE,mBAAmB,CAACC,KAAsB,EAAE;IAAA;IAC1C,0BAAI,CAACF,YAAY,uDAAjB,mBAAmBG,QAAQ,CAACD,KAAK,CAAC;IAClC,OAAO,IAAI;EACb;E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","CodeUI","constructor","host","fileIconSlot","registerEnvFileIcon","icons","register","provider","component","componentCompare","_","harmony","config","String","get","ui","section","CodeSection","fileName","test","staticStorageUrl","undefined","registerRoute","route","registerWidget","navigationLink","order","codeCompare","CodeCompareSection","registerNavigation","props","registerRoutes","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CodeAspect","addRuntime"],"sources":["code.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CodeCompare } from '@teambit/code.ui.code-compare';\nimport { Harmony, SlotRegistry, Slot } from '@teambit/harmony';\nimport type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';\nimport { staticStorageUrl } from '@teambit/base-ui.constants.storage';\nimport { CodePage } from '@teambit/code.ui.code-tab-page';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CodeCompareSection } from '@teambit/code.ui.code-compare-section';\nimport { CodeAspect } from './code.aspect';\nimport { CodeSection } from './code.section';\n\nconst isTsx = /\\.tsx$/;\n\nexport type FileIconSlot = SlotRegistry<FileIconMatch[]>;\n\n/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */\nexport class CodeUI {\n constructor(\n /**\n * register an icon for a specific file type. pass icon and a match method/regexp\n */\n private host: string,\n private fileIconSlot?: FileIconSlot\n ) {}\n\n getCodePage = () => {\n return <CodePage fileIconSlot={this.fileIconSlot} host={this.host} />;\n };\n\n getCodeCompare = () => {\n return <CodeCompare fileIconSlot={this.fileIconSlot} />;\n };\n\n registerEnvFileIcon(icons: FileIconMatch[]) {\n this.fileIconSlot?.register(icons);\n return this;\n }\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<string>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n _,\n [fileIconSlot]: [FileIconSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const ui = new CodeUI(host, fileIconSlot);\n const section = new CodeSection(ui);\n\n // overrides the default tsx react icon with the typescript icon\n ui.registerEnvFileIcon([\n (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),\n ]);\n component.registerRoute([section.route]);\n component.registerWidget(section.navigationLink, section.order);\n const codeCompare = new CodeCompareSection(ui);\n componentCompare.registerNavigation({\n props: codeCompare.navigationLink,\n order: codeCompare.navigationLink.order,\n });\n componentCompare.registerRoutes([codeCompare.route]);\n return ui;\n }\n}\n\nCodeAspect.addRuntime(CodeUI);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,KAAK,GAAG,QAAQ;AAItB;AACA;AACA;AACA;AACO,MAAMC,MAAM,CAAC;EAClBC,WAAW;EACT;AACJ;AACA;EACYC,IAAY,EACZC,YAA2B,EACnC;IAAA,KAFQD,IAAY,GAAZA,IAAY;IAAA,KACZC,YAA2B,GAA3BA,YAA2B;IAAA,qDAGvB,MAAM;MAClB,oBAAO,+BAAC,mBAAQ;QAAC,YAA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CAAC,CAACJ,WAAW,CAACJ,KAAK,CAAC,CAAC;IACpD,OAAOR,EAAE;EACX;AACF;AAAC;AAAA,gCArDYf,MAAM,kBAsBK,CAACgC,4BAAe,EAAEC,0CAAsB,CAAC;AAAA,gCAtBpDjC,MAAM,aAwBAkC,eAAS;AAAA,gCAxBflC,MAAM,WA0BF,CAACmC,eAAI,CAACC,QAAQ,EAAU,CAAC;AA6B1CC,kBAAU,CAACC,UAAU,CAACtC,MAAM,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@0.0.927/dist/code.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@0.0.927/dist/code.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@0.0.929/dist/code.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@0.0.929/dist/code.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "@teambit/code",
3
- "version": "0.0.927",
3
+ "version": "0.0.929",
4
4
  "homepage": "https://bit.dev/teambit/component/code",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "code",
9
- "version": "0.0.927"
9
+ "version": "0.0.929"
10
10
  },
11
11
  "dependencies": {
12
12
  "@babel/runtime": "7.20.0",
13
13
  "core-js": "^3.0.0",
14
14
  "@teambit/harmony": "0.3.3",
15
15
  "@teambit/base-ui.constants.storage": "1.0.0",
16
- "@teambit/code.ui.code-compare": "0.0.138",
17
- "@teambit/component": "0.0.927",
16
+ "@teambit/component": "0.0.929",
18
17
  "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.497",
19
- "@teambit/code.ui.code-tab-page": "0.0.604",
18
+ "@teambit/code.ui.code-compare-section": "0.0.1",
19
+ "@teambit/code.ui.code-compare": "0.0.140",
20
+ "@teambit/code.ui.code-tab-page": "0.0.605",
20
21
  "@teambit/code.ui.utils.get-file-icon": "0.0.495",
21
- "@teambit/component-compare": "0.0.175",
22
- "@teambit/ui": "0.0.927"
22
+ "@teambit/component-compare": "0.0.177",
23
+ "@teambit/ui": "0.0.929"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@types/react": "^17.0.8",
@@ -30,7 +31,7 @@
30
31
  "@types/node": "12.20.4"
31
32
  },
32
33
  "peerDependencies": {
33
- "@teambit/legacy": "1.0.401",
34
+ "@teambit/legacy": "1.0.403",
34
35
  "react-dom": "^16.8.0 || ^17.0.0",
35
36
  "react": "^16.8.0 || ^17.0.0"
36
37
  },
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { FileIconSlot } from '@teambit/code';
3
- import { Section } from '@teambit/component';
4
- import { CodeCompare } from '@teambit/code.ui.code-compare';
5
-
6
- export class CodeCompareSection implements Section {
7
- constructor(private fileIconSlot: FileIconSlot) {}
8
-
9
- navigationLink = {
10
- href: 'code',
11
- children: 'Code',
12
- order: 4,
13
- };
14
-
15
- route = {
16
- path: 'code/*',
17
- element: <CodeCompare fileIconSlot={this.fileIconSlot} />,
18
- };
19
- }
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { FileIconSlot } from '@teambit/code';
3
- import { Section } from '@teambit/component';
4
- export declare class CodeCompareSection implements Section {
5
- private fileIconSlot;
6
- constructor(fileIconSlot: FileIconSlot);
7
- navigationLink: {
8
- href: string;
9
- children: string;
10
- order: number;
11
- };
12
- route: {
13
- path: string;
14
- element: JSX.Element;
15
- };
16
- }
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.CodeCompareSection = void 0;
8
- function _defineProperty2() {
9
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- _defineProperty2 = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- function _react() {
16
- const data = _interopRequireDefault(require("react"));
17
- _react = function () {
18
- return data;
19
- };
20
- return data;
21
- }
22
- function _codeUi() {
23
- const data = require("@teambit/code.ui.code-compare");
24
- _codeUi = function () {
25
- return data;
26
- };
27
- return data;
28
- }
29
- class CodeCompareSection {
30
- constructor(fileIconSlot) {
31
- this.fileIconSlot = fileIconSlot;
32
- (0, _defineProperty2().default)(this, "navigationLink", {
33
- href: 'code',
34
- children: 'Code',
35
- order: 4
36
- });
37
- (0, _defineProperty2().default)(this, "route", {
38
- path: 'code/*',
39
- element: /*#__PURE__*/_react().default.createElement(_codeUi().CodeCompare, {
40
- fileIconSlot: this.fileIconSlot
41
- })
42
- });
43
- }
44
- }
45
- exports.CodeCompareSection = CodeCompareSection;
46
-
47
- //# sourceMappingURL=code.compare.section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CodeCompareSection","constructor","fileIconSlot","href","children","order","path","element"],"sources":["code.compare.section.tsx"],"sourcesContent":["import React from 'react';\nimport { FileIconSlot } from '@teambit/code';\nimport { Section } from '@teambit/component';\nimport { CodeCompare } from '@teambit/code.ui.code-compare';\n\nexport class CodeCompareSection implements Section {\n constructor(private fileIconSlot: FileIconSlot) {}\n\n navigationLink = {\n href: 'code',\n children: 'Code',\n order: 4,\n };\n\n route = {\n path: 'code/*',\n element: <CodeCompare fileIconSlot={this.fileIconSlot} />,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,kBAAkB,CAAoB;EACjDC,WAAW,CAASC,YAA0B,EAAE;IAAA,KAA5BA,YAA0B,GAA1BA,YAA0B;IAAA,wDAE7B;MACfC,IAAI,EAAE,MAAM;MACZC,QAAQ,EAAE,MAAM;MAChBC,KAAK,EAAE;IACT,CAAC;IAAA,+CAEO;MACNC,IAAI,EAAE,QAAQ;MACdC,OAAO,eAAE,+BAAC,qBAAW;QAAC,YAAY,EAAE,IAAI,CAACL;MAAa;IACxD,CAAC;EAXgD;AAYnD;AAAC"}