@manuscripts/article-editor 1.9.4 → 1.9.5-LEAN-3083-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/cjs/src/components/Sidebar/Sidebar.js +1 -2
  2. package/dist/cjs/src/components/Sidebar/Sidebar.js.map +1 -1
  3. package/dist/cjs/src/components/metadata/AuthorModalViews.js +7 -3
  4. package/dist/cjs/src/components/metadata/AuthorModalViews.js.map +1 -1
  5. package/dist/cjs/src/components/metadata/AuthorsPage.js +1 -11
  6. package/dist/cjs/src/components/metadata/AuthorsPage.js.map +1 -1
  7. package/dist/cjs/src/components/projects/ManuscriptPageContainer.js +0 -14
  8. package/dist/cjs/src/components/projects/ManuscriptPageContainer.js.map +1 -1
  9. package/dist/cjs/src/hooks/use-create-editor.js +2 -22
  10. package/dist/cjs/src/hooks/use-create-editor.js.map +1 -1
  11. package/dist/cjs/src/hooks/use-tracked-model-management.js +10 -0
  12. package/dist/cjs/src/hooks/use-tracked-model-management.js.map +1 -1
  13. package/dist/cjs/src/lib/authors.js +3 -1
  14. package/dist/cjs/src/lib/authors.js.map +1 -1
  15. package/dist/es/src/components/Sidebar/Sidebar.js +1 -2
  16. package/dist/es/src/components/Sidebar/Sidebar.js.map +1 -1
  17. package/dist/es/src/components/metadata/AuthorModalViews.js +7 -3
  18. package/dist/es/src/components/metadata/AuthorModalViews.js.map +1 -1
  19. package/dist/es/src/components/metadata/AuthorsPage.js +0 -9
  20. package/dist/es/src/components/metadata/AuthorsPage.js.map +1 -1
  21. package/dist/es/src/components/projects/ManuscriptPageContainer.js +0 -14
  22. package/dist/es/src/components/projects/ManuscriptPageContainer.js.map +1 -1
  23. package/dist/es/src/hooks/use-create-editor.js +2 -22
  24. package/dist/es/src/hooks/use-create-editor.js.map +1 -1
  25. package/dist/es/src/hooks/use-tracked-model-management.js +10 -0
  26. package/dist/es/src/hooks/use-tracked-model-management.js.map +1 -1
  27. package/dist/es/src/lib/authors.js +3 -1
  28. package/dist/es/src/lib/authors.js.map +1 -1
  29. package/dist/types/src/components/metadata/AuthorsPage.d.ts +0 -1
  30. package/dist/types/src/store/useStore.d.ts +1 -1
  31. package/package.json +5 -6
  32. package/dist/cjs/src/components/SelectField.js +0 -24
  33. package/dist/cjs/src/components/SelectField.js.map +0 -1
  34. package/dist/cjs/src/components/library/BibliographyImportButton.js +0 -149
  35. package/dist/cjs/src/components/library/BibliographyImportButton.js.map +0 -1
  36. package/dist/cjs/src/components/library/CitationEditor.js +0 -227
  37. package/dist/cjs/src/components/library/CitationEditor.js.map +0 -1
  38. package/dist/cjs/src/components/library/CitationModal.js +0 -262
  39. package/dist/cjs/src/components/library/CitationModal.js.map +0 -1
  40. package/dist/cjs/src/components/library/CitationSearch.js +0 -214
  41. package/dist/cjs/src/components/library/CitationSearch.js.map +0 -1
  42. package/dist/cjs/src/components/library/CitationSearchSection.js +0 -133
  43. package/dist/cjs/src/components/library/CitationSearchSection.js.map +0 -1
  44. package/dist/cjs/src/components/library/CitationViewer.js +0 -53
  45. package/dist/cjs/src/components/library/CitationViewer.js.map +0 -1
  46. package/dist/cjs/src/components/library/ReferenceForm.js +0 -419
  47. package/dist/cjs/src/components/library/ReferenceForm.js.map +0 -1
  48. package/dist/cjs/src/components/library/ReferencesEditor.js +0 -70
  49. package/dist/cjs/src/components/library/ReferencesEditor.js.map +0 -1
  50. package/dist/cjs/src/components/library/ReferencesViewer.js +0 -33
  51. package/dist/cjs/src/components/library/ReferencesViewer.js.map +0 -1
  52. package/dist/cjs/src/components/library/SearchResults.js +0 -126
  53. package/dist/cjs/src/components/library/SearchResults.js.map +0 -1
  54. package/dist/cjs/src/components/metadata/AuthorsInlineViewContainer.js +0 -94
  55. package/dist/cjs/src/components/metadata/AuthorsInlineViewContainer.js.map +0 -1
  56. package/dist/cjs/src/components/projects/icons/DeleteIcon.js +0 -27
  57. package/dist/cjs/src/components/projects/icons/DeleteIcon.js.map +0 -1
  58. package/dist/cjs/src/components/projects/icons/GroupIcon.js +0 -29
  59. package/dist/cjs/src/components/projects/icons/GroupIcon.js.map +0 -1
  60. package/dist/cjs/src/components/projects/icons/LinkIcon.js +0 -23
  61. package/dist/cjs/src/components/projects/icons/LinkIcon.js.map +0 -1
  62. package/dist/cjs/src/components/projects/icons/TemplateIcon.js +0 -23
  63. package/dist/cjs/src/components/projects/icons/TemplateIcon.js.map +0 -1
  64. package/dist/cjs/src/lib/select-styles.js +0 -40
  65. package/dist/cjs/src/lib/select-styles.js.map +0 -1
  66. package/dist/cjs/src/lib/sources.js +0 -36
  67. package/dist/cjs/src/lib/sources.js.map +0 -1
  68. package/dist/es/src/components/SelectField.js +0 -17
  69. package/dist/es/src/components/SelectField.js.map +0 -1
  70. package/dist/es/src/components/library/BibliographyImportButton.js +0 -120
  71. package/dist/es/src/components/library/BibliographyImportButton.js.map +0 -1
  72. package/dist/es/src/components/library/CitationEditor.js +0 -198
  73. package/dist/es/src/components/library/CitationEditor.js.map +0 -1
  74. package/dist/es/src/components/library/CitationModal.js +0 -232
  75. package/dist/es/src/components/library/CitationModal.js.map +0 -1
  76. package/dist/es/src/components/library/CitationSearch.js +0 -184
  77. package/dist/es/src/components/library/CitationSearch.js.map +0 -1
  78. package/dist/es/src/components/library/CitationSearchSection.js +0 -103
  79. package/dist/es/src/components/library/CitationSearchSection.js.map +0 -1
  80. package/dist/es/src/components/library/CitationViewer.js +0 -46
  81. package/dist/es/src/components/library/CitationViewer.js.map +0 -1
  82. package/dist/es/src/components/library/ReferenceForm.js +0 -389
  83. package/dist/es/src/components/library/ReferenceForm.js.map +0 -1
  84. package/dist/es/src/components/library/ReferencesEditor.js +0 -43
  85. package/dist/es/src/components/library/ReferencesEditor.js.map +0 -1
  86. package/dist/es/src/components/library/ReferencesViewer.js +0 -26
  87. package/dist/es/src/components/library/ReferencesViewer.js.map +0 -1
  88. package/dist/es/src/components/library/SearchResults.js +0 -119
  89. package/dist/es/src/components/library/SearchResults.js.map +0 -1
  90. package/dist/es/src/components/metadata/AuthorsInlineViewContainer.js +0 -65
  91. package/dist/es/src/components/metadata/AuthorsInlineViewContainer.js.map +0 -1
  92. package/dist/es/src/components/projects/icons/DeleteIcon.js +0 -20
  93. package/dist/es/src/components/projects/icons/DeleteIcon.js.map +0 -1
  94. package/dist/es/src/components/projects/icons/GroupIcon.js +0 -22
  95. package/dist/es/src/components/projects/icons/GroupIcon.js.map +0 -1
  96. package/dist/es/src/components/projects/icons/LinkIcon.js +0 -16
  97. package/dist/es/src/components/projects/icons/LinkIcon.js.map +0 -1
  98. package/dist/es/src/components/projects/icons/TemplateIcon.js +0 -16
  99. package/dist/es/src/components/projects/icons/TemplateIcon.js.map +0 -1
  100. package/dist/es/src/lib/select-styles.js +0 -37
  101. package/dist/es/src/lib/select-styles.js.map +0 -1
  102. package/dist/es/src/lib/sources.js +0 -33
  103. package/dist/es/src/lib/sources.js.map +0 -1
  104. package/dist/types/src/components/SelectField.d.ts +0 -23
  105. package/dist/types/src/components/library/BibliographyImportButton.d.ts +0 -23
  106. package/dist/types/src/components/library/CitationEditor.d.ts +0 -30
  107. package/dist/types/src/components/library/CitationModal.d.ts +0 -17
  108. package/dist/types/src/components/library/CitationSearch.d.ts +0 -22
  109. package/dist/types/src/components/library/CitationSearchSection.d.ts +0 -34
  110. package/dist/types/src/components/library/CitationViewer.d.ts +0 -18
  111. package/dist/types/src/components/library/ReferenceForm.d.ts +0 -51
  112. package/dist/types/src/components/library/ReferencesEditor.d.ts +0 -22
  113. package/dist/types/src/components/library/ReferencesViewer.d.ts +0 -9
  114. package/dist/types/src/components/library/SearchResults.d.ts +0 -26
  115. package/dist/types/src/components/metadata/AuthorsInlineViewContainer.d.ts +0 -23
  116. package/dist/types/src/components/projects/icons/DeleteIcon.d.ts +0 -13
  117. package/dist/types/src/components/projects/icons/GroupIcon.d.ts +0 -15
  118. package/dist/types/src/components/projects/icons/LinkIcon.d.ts +0 -13
  119. package/dist/types/src/components/projects/icons/TemplateIcon.d.ts +0 -13
  120. package/dist/types/src/lib/select-styles.d.ts +0 -13
  121. package/dist/types/src/lib/sources.d.ts +0 -25
@@ -1,53 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.CitationViewer = void 0;
18
- const library_1 = require("@manuscripts/library");
19
- const title_editor_1 = require("@manuscripts/title-editor");
20
- const react_1 = __importDefault(require("react"));
21
- const styled_components_1 = __importDefault(require("styled-components"));
22
- const CitedItem = styled_components_1.default.div `
23
- padding: ${(props) => props.theme.grid.unit * 4}px 0;
24
- cursor: pointer;
25
-
26
- &:not(:last-of-type) {
27
- border-bottom: 1px solid ${(props) => props.theme.colors.border.tertiary};
28
- }
29
- `;
30
- const CitedItemTitle = (0, styled_components_1.default)(title_editor_1.Title) ``;
31
- const CitedItemAuthors = styled_components_1.default.div `
32
- margin-top: ${(props) => props.theme.grid.unit}px;
33
- color: ${(props) => props.theme.colors.text.secondary};
34
- flex: 1;
35
- white-space: nowrap;
36
- text-overflow: ellipsis;
37
- overflow: hidden;
38
- `;
39
- const CitedItems = styled_components_1.default.div `
40
- padding: 0 ${(props) => props.theme.grid.unit * 4}px;
41
- font-family: ${(props) => props.theme.font.family.sans};
42
- max-height: 70vh;
43
- overflow-y: auto;
44
- `;
45
- const CitationViewer = ({ items }) => (react_1.default.createElement(CitedItems, null, items.map((item) => (react_1.default.createElement(CitedItem, { key: item._id, onClick: () => {
46
- if (item.DOI) {
47
- window.open(`https://doi.org/${item.DOI}`);
48
- }
49
- } },
50
- react_1.default.createElement(CitedItemTitle, { value: item.title || 'Untitled' }),
51
- react_1.default.createElement(CitedItemAuthors, null, (0, library_1.shortLibraryItemMetadata)(item)))))));
52
- exports.CitationViewer = CitationViewer;
53
- //# sourceMappingURL=CitationViewer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CitationViewer.js","sourceRoot":"","sources":["../../../../../src/components/library/CitationViewer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAGH,kDAA+D;AAC/D,4DAAiD;AACjD,kDAAyB;AACzB,0EAAsC;AAEtC,MAAM,SAAS,GAAG,2BAAM,CAAC,GAAG,CAAA;aACf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;;+BAIlB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ;;CAE3E,CAAA;AAED,MAAM,cAAc,GAAG,IAAA,2BAAM,EAAC,oBAAK,CAAC,CAAA,EAAE,CAAA;AAEtC,MAAM,gBAAgB,GAAG,2BAAM,CAAC,GAAG,CAAA;gBACnB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;WACrC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;;;;;CAKtD,CAAA;AAED,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;eACd,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;iBAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI;;;CAGvD,CAAA;AAMM,MAAM,cAAc,GAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC5D,8BAAC,UAAU,QACR,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,8BAAC,SAAS,IACR,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,OAAO,EAAE,GAAG,EAAE;QACZ,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,MAAM,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;SAC3C;IACH,CAAC;IAED,8BAAC,cAAc,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,UAAU,GAAI;IAEnD,8BAAC,gBAAgB,QAAE,IAAA,kCAAwB,EAAC,IAAI,CAAC,CAAoB,CAC3D,CACb,CAAC,CACS,CACd,CAAA;AAjBY,QAAA,cAAc,kBAiB1B"}
@@ -1,419 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.AddAffiliationContainer = exports.bibliographyItemTypeOptions = exports.buildInitialValues = exports.FormFields = exports.FlexForm = exports.FormField = exports.LabelContainer = void 0;
41
- const AddAuthor_1 = __importDefault(require("@manuscripts/assets/react/AddAuthor"));
42
- const AnnotationRemove_1 = __importDefault(require("@manuscripts/assets/react/AnnotationRemove"));
43
- const ArrowDownBlue_1 = __importDefault(require("@manuscripts/assets/react/ArrowDownBlue"));
44
- const library_1 = require("@manuscripts/library");
45
- const style_guide_1 = require("@manuscripts/style-guide");
46
- const title_editor_1 = require("@manuscripts/title-editor");
47
- const transform_1 = require("@manuscripts/transform");
48
- const formik_1 = require("formik");
49
- const react_1 = __importStar(require("react"));
50
- const react_tooltip_1 = __importDefault(require("react-tooltip"));
51
- const styled_components_1 = __importDefault(require("styled-components"));
52
- const DeleteIcon_1 = require("../projects/icons/DeleteIcon");
53
- const LinkIcon_1 = require("../projects/icons/LinkIcon");
54
- const SelectField_1 = require("../SelectField");
55
- exports.LabelContainer = styled_components_1.default.div `
56
- display: flex;
57
- justify-content: space-between;
58
- align-items: center;
59
- margin-bottom: ${(props) => props.theme.grid.unit}px;
60
- `;
61
- const Label = styled_components_1.default.label `
62
- font-family: ${(props) => props.theme.font.family.sans};
63
- font-size: ${(props) => props.theme.font.size.medium};
64
- display: flex;
65
- color: ${(props) => props.theme.colors.text.secondary};
66
- `;
67
- const FieldLabel = styled_components_1.default.label `
68
- font-family: ${(props) => props.theme.font.family.sans};
69
- font-size: ${(props) => props.theme.font.size.medium};
70
- color: ${(props) => props.theme.colors.text.muted};
71
- padding-right: ${(props) => props.theme.grid.unit * 3}px;
72
- `;
73
- const NameFieldContainer = styled_components_1.default.div `
74
- display: flex;
75
- align-items: center;
76
- justify-content: space-between;
77
- background-color: ${(props) => props.theme.colors.background.primary};
78
- :not(:last-child) {
79
- border-bottom: 1px solid ${(props) => props.theme.colors.text.muted};
80
- }
81
- `;
82
- const NameField = styled_components_1.default.input `
83
- font-size: ${(props) => props.theme.font.size.normal};
84
- padding: ${(props) => props.theme.grid.unit * 2}px
85
- ${(props) => props.theme.grid.unit * 4}px;
86
- box-sizing: border-box;
87
- border: none;
88
- background-color: transparent;
89
- width: 50%;
90
-
91
- &:focus {
92
- outline: none;
93
- }
94
-
95
- &::placeholder {
96
- color: ${(props) => props.theme.colors.text.muted};
97
- }
98
-
99
- &:hover::placeholder {
100
- color: ${(props) => props.theme.colors.text.secondary};
101
- }
102
- `;
103
- const StyledTitleField = (0, styled_components_1.default)(title_editor_1.TitleField) `
104
- & .ProseMirror {
105
- font-family: ${(props) => props.theme.font.family.sans};
106
- font-size: ${(props) => props.theme.font.size.medium};
107
- line-height: 1.25;
108
- color: ${(props) => props.theme.colors.text.primary};
109
- border-radius: ${(props) => props.theme.grid.radius.small};
110
- border: 1px solid ${(props) => props.theme.colors.text.muted};
111
- padding: ${(props) => props.theme.grid.unit * 2}px
112
- ${(props) => props.theme.grid.unit * 3}px;
113
- min-height: ${(props) => props.theme.grid.unit * 21}px;
114
- &:focus {
115
- outline: none;
116
- border-color: ${(props) => props.theme.colors.border.field.hover};
117
- background-color: ${(props) => props.theme.colors.background.fifth};
118
- }
119
- }
120
-
121
- &:hover {
122
- & .ProseMirror {
123
- background-color: ${(props) => props.theme.colors.background.fifth};
124
- }
125
- }
126
- `;
127
- const FormTextField = (0, styled_components_1.default)(style_guide_1.TextField) `
128
- padding: ${(props) => props.theme.grid.unit * 2}px
129
- ${(props) => props.theme.grid.unit * 3}px;
130
- `;
131
- const ContainerTextField = (0, styled_components_1.default)(FormTextField) `
132
- min-height: ${(props) => props.theme.grid.unit * 15}px;
133
- `;
134
- const YearField = (0, styled_components_1.default)(formik_1.Field) `
135
- font-family: ${(props) => props.theme.font.family.sans};
136
- padding: ${(props) => props.theme.grid.unit * 2}px
137
- ${(props) => props.theme.grid.unit * 3}px;
138
- font-size: ${(props) => props.theme.font.size.medium};
139
- color: ${(props) => props.theme.colors.text.primary};
140
- border-radius: ${(props) => props.theme.grid.radius.small};
141
- border: solid 1px ${(props) => props.theme.colors.text.muted};
142
- `;
143
- const Button = (0, styled_components_1.default)(style_guide_1.IconButton).attrs({
144
- defaultColor: true,
145
- size: 24,
146
- }) `
147
- circle,
148
- use {
149
- fill: ${(props) => props.theme.colors.brand.default};
150
- }
151
-
152
- path {
153
- mask: none;
154
- }
155
- `;
156
- const Actions = styled_components_1.default.div `
157
- flex-shrink: 1;
158
- display: flex;
159
- justify-content: space-between;
160
- align-items: center;
161
- padding: ${(props) => props.theme.grid.unit * 8}px;
162
-
163
- .tooltip {
164
- max-width: ${(props) => props.theme.grid.unit * 39}px;
165
- padding: ${(props) => props.theme.grid.unit * 2}px;
166
- border-radius: 6px;
167
- }
168
- `;
169
- exports.FormField = styled_components_1.default.div `
170
- padding: ${(props) => props.theme.grid.unit * 3}px;
171
- padding-left: ${(props) => props.theme.grid.unit * 8}px;
172
- `;
173
- exports.FlexForm = (0, styled_components_1.default)(formik_1.Form) `
174
- height: 100%;
175
- display: flex;
176
- flex-direction: column;
177
- overflow: hidden;
178
- `;
179
- exports.FormFields = styled_components_1.default.div `
180
- flex: 1;
181
- overflow-y: auto;
182
- `;
183
- const AuthorDropDown = ({ author, index, remove, handleChange }) => {
184
- const [isOpen, setIsOpen] = (0, react_1.useState)(!!author['isNew']);
185
- const fullName = [author.given, author.family].join(' ').trim();
186
- const title = fullName.length > 0 ? fullName : 'Edit author name';
187
- return (react_1.default.createElement(Section, { key: author._id },
188
- react_1.default.createElement(Title, null,
189
- react_1.default.createElement(ToggleButton, { type: "button", onClick: () => setIsOpen(!isOpen), isOpen: isOpen },
190
- react_1.default.createElement(DropdownIndicator, null,
191
- react_1.default.createElement(ArrowDownBlue_1.default, null)),
192
- title),
193
- react_1.default.createElement(RemoveButton, { type: "button", "aria-label": "Delete this affiliation", onClick: () => remove(index) },
194
- react_1.default.createElement(AnnotationRemove_1.default, null))),
195
- isOpen && (react_1.default.createElement(AuthorForm, null,
196
- react_1.default.createElement(formik_1.Field, { name: `author.${index}.given`, value: author.given, onChange: handleChange }, ({ field }) => (react_1.default.createElement(NameFieldContainer, null,
197
- react_1.default.createElement(NameField, { ...field, id: field.name, placeholder: 'Given', autoFocus: true }),
198
- react_1.default.createElement(FieldLabel, { htmlFor: field.name }, "Given")))),
199
- react_1.default.createElement(formik_1.Field, { name: `author.${index}.family`, value: author.family, onChange: handleChange }, ({ field }) => (react_1.default.createElement(NameFieldContainer, null,
200
- react_1.default.createElement(NameField, { ...field, id: field.name, placeholder: 'Family', autoFocus: true }),
201
- react_1.default.createElement(FieldLabel, { htmlFor: field.name }, "Family"))))))));
202
- };
203
- const buildInitialValues = (item) => ({
204
- _id: item._id,
205
- title: item.title || '',
206
- author: item.author || [],
207
- DOI: item.DOI || '',
208
- issued: item.issued || '',
209
- type: item.type || '',
210
- 'container-title': item['container-title'] || '',
211
- URL: item.URL || '',
212
- issue: item.issue ? String(item.issue) : '',
213
- volume: item.volume ? String(item.volume) : '',
214
- supplement: item.supplement ? String(item.supplement) : '',
215
- page: item.page ? String(item.page) : '',
216
- });
217
- exports.buildInitialValues = buildInitialValues;
218
- // NOTE: not undefined due to https://github.com/jaredpalmer/formik/issues/2180
219
- exports.bibliographyItemTypeOptions = Array.from(library_1.bibliographyItemTypes.entries())
220
- .map(([value, label]) => ({ value, label }))
221
- .sort((a, b) => a.label.localeCompare(b.label));
222
- const ReferenceForm = ({ item, formMikRef, disableDelete, deleteCallback, handleCancel, saveCallback, }) => {
223
- const formRef = (0, react_1.useRef)(null);
224
- (0, react_1.useEffect)(() => {
225
- if (formRef.current) {
226
- formRef.current.scrollTop = 0;
227
- }
228
- }, [item]);
229
- const [showDeleteDialog, setShowDeleteDialog] = (0, react_1.useState)(false);
230
- const deleteClickCallback = (0, react_1.useCallback)(() => setShowDeleteDialog(true), []);
231
- return (react_1.default.createElement(formik_1.Formik, { initialValues: (0, exports.buildInitialValues)(item), onSubmit: saveCallback, innerRef: formMikRef, enableReinitialize: true }, ({ values, setFieldValue, handleChange }) => {
232
- return (react_1.default.createElement(exports.FlexForm, null,
233
- react_1.default.createElement(style_guide_1.Dialog, { isOpen: showDeleteDialog, category: style_guide_1.Category.confirmation, header: "Delete Reference", message: "Are you sure you want to delete this reference from the list?", actions: {
234
- secondary: {
235
- action: () => {
236
- deleteCallback();
237
- setShowDeleteDialog(false);
238
- },
239
- title: 'Delete',
240
- },
241
- primary: {
242
- action: () => setShowDeleteDialog(false),
243
- title: 'Cancel',
244
- },
245
- } }),
246
- react_1.default.createElement(Actions, null,
247
- react_1.default.createElement(style_guide_1.ButtonGroup, null,
248
- react_1.default.createElement(style_guide_1.IconButton, { defaultColor: true, as: "a", href: `https://doi.org/${values.DOI}`, target: '_blank' },
249
- react_1.default.createElement(LinkIcon_1.LinkIcon, null)),
250
- react_1.default.createElement("div", { "data-tip": true, "data-for": 'delete-button' },
251
- react_1.default.createElement(DeleteButton, { defaultColor: true, disabled: disableDelete, onClick: deleteClickCallback },
252
- react_1.default.createElement(DeleteIcon_1.DeleteIcon, null)),
253
- react_1.default.createElement(react_tooltip_1.default, { disable: !disableDelete, id: 'delete-button', place: "bottom", effect: "solid", offset: { top: 15 }, className: "tooltip" }, "Unable to delete because the item is used in the document"))),
254
- react_1.default.createElement(style_guide_1.ButtonGroup, null,
255
- react_1.default.createElement(style_guide_1.SecondaryButton, { onClick: handleCancel }, "Cancel"),
256
- react_1.default.createElement(style_guide_1.PrimaryButton, { type: "submit" }, "Save"))),
257
- react_1.default.createElement(exports.FormFields, { ref: formRef },
258
- react_1.default.createElement(exports.FormField, null,
259
- react_1.default.createElement(exports.LabelContainer, null,
260
- react_1.default.createElement(Label, { htmlFor: 'citation-item-type' }, "Type")),
261
- react_1.default.createElement(formik_1.Field, { id: 'citation-item-type', name: 'type', component: SelectField_1.SelectField, options: exports.bibliographyItemTypeOptions })),
262
- react_1.default.createElement(exports.FormField, null,
263
- react_1.default.createElement(exports.LabelContainer, null,
264
- react_1.default.createElement(Label, null, "Title")),
265
- react_1.default.createElement(StyledTitleField, { value: values.title || '', handleChange: (data) => setFieldValue('title', data), autoFocus: !values.title })),
266
- react_1.default.createElement(formik_1.FieldArray, { name: 'author', render: ({ push, remove }) => (react_1.default.createElement(exports.FormField, null,
267
- react_1.default.createElement(exports.LabelContainer, null,
268
- react_1.default.createElement(Label, null, "Authors"),
269
- react_1.default.createElement(Button, { onClick: () => push((0, transform_1.buildBibliographicName)({
270
- given: '',
271
- family: '',
272
- isNew: true,
273
- })) },
274
- react_1.default.createElement(AddAuthor_1.default, { height: 17, width: 17 }))),
275
- react_1.default.createElement("div", null, values.author &&
276
- values.author.map((author, index) => (react_1.default.createElement(AuthorDropDown, { key: index, index: index, author: author, remove: remove, handleChange: handleChange })))))) }),
277
- react_1.default.createElement(exports.FormField, null,
278
- react_1.default.createElement(exports.LabelContainer, null,
279
- react_1.default.createElement(Label, { htmlFor: "issued['date-parts'][0][0]" }, "Year")),
280
- react_1.default.createElement(YearField, { name: "issued['date-parts'][0][0]", type: 'number', step: 1, onChange: (event) => {
281
- const { value } = event.target;
282
- if (value) {
283
- if (values.issued) {
284
- // NOTE: this assumes that "issued" is already a complete object
285
- setFieldValue("issued['date-parts'][0][0]", Number(value));
286
- }
287
- else {
288
- setFieldValue('issued', (0, transform_1.buildBibliographicDate)({
289
- 'date-parts': [[Number(value)]],
290
- }));
291
- }
292
- }
293
- else {
294
- // NOTE: not undefined due to https://github.com/jaredpalmer/formik/issues/2180
295
- setFieldValue('issued', '');
296
- }
297
- } })),
298
- react_1.default.createElement(exports.FormField, null,
299
- react_1.default.createElement(exports.LabelContainer, null,
300
- react_1.default.createElement(Label, { htmlFor: 'container-title' }, "Container Title")),
301
- react_1.default.createElement(formik_1.Field, { name: 'container-title' }, (props) => (react_1.default.createElement(ContainerTextField, { id: 'container-title', ...props.field })))),
302
- react_1.default.createElement(exports.FormField, null,
303
- react_1.default.createElement(exports.LabelContainer, null,
304
- react_1.default.createElement(Label, { htmlFor: 'volume' }, "Volume")),
305
- react_1.default.createElement(formik_1.Field, { name: 'volume' }, (props) => (react_1.default.createElement(FormTextField, { id: 'volume', ...props.field })))),
306
- react_1.default.createElement(exports.FormField, null,
307
- react_1.default.createElement(exports.LabelContainer, null,
308
- react_1.default.createElement(Label, { htmlFor: 'issue' }, "Issue")),
309
- react_1.default.createElement(formik_1.Field, { name: 'issue' }, (props) => (react_1.default.createElement(FormTextField, { id: 'issue', ...props.field })))),
310
- react_1.default.createElement(exports.FormField, null,
311
- react_1.default.createElement(exports.LabelContainer, null,
312
- react_1.default.createElement(Label, { htmlFor: 'page' }, "Page")),
313
- react_1.default.createElement(formik_1.Field, { name: 'page' }, (props) => (react_1.default.createElement(FormTextField, { id: 'page', ...props.field })))),
314
- react_1.default.createElement(exports.FormField, null,
315
- react_1.default.createElement(exports.LabelContainer, null,
316
- react_1.default.createElement(Label, { htmlFor: 'url' }, "URL")),
317
- react_1.default.createElement(formik_1.Field, { name: 'URL' }, (props) => (react_1.default.createElement(FormTextField, { type: 'url', id: 'url', ...props.field })))),
318
- react_1.default.createElement(exports.FormField, null,
319
- react_1.default.createElement(exports.LabelContainer, null,
320
- react_1.default.createElement(Label, { htmlFor: 'doi' }, "DOI")),
321
- react_1.default.createElement(formik_1.Field, { name: 'DOI' }, (props) => (react_1.default.createElement(FormTextField, { id: 'doi', pattern: '(https://doi.org/)?10..+', ...props.field })))),
322
- react_1.default.createElement(exports.FormField, null,
323
- react_1.default.createElement(exports.LabelContainer, null,
324
- react_1.default.createElement(Label, { htmlFor: 'supplement' }, "Supplement")),
325
- react_1.default.createElement(formik_1.Field, { name: 'supplement' }, (props) => (react_1.default.createElement(FormTextField, { type: 'supplement', id: 'supplement', ...props.field })))))));
326
- }));
327
- };
328
- exports.default = ReferenceForm;
329
- const DeleteButton = (0, styled_components_1.default)(style_guide_1.IconButton) `
330
- background-color: ${(props) => props.theme.colors.background.primary} !important;
331
- border-color: ${(props) => props.theme.colors.background.primary} !important;
332
- .icon_element {
333
- fill: ${(props) => (props.disabled && '#c9c9c9') || '#F35143'} !important;
334
- }
335
- `;
336
- const Section = styled_components_1.default.section `
337
- border: 1px solid ${(props) => props.theme.colors.border.field.default};
338
- border-radius: ${(props) => props.theme.grid.radius.default};
339
- background: ${(props) => props.theme.colors.background.primary};
340
- margin-bottom: ${(props) => props.theme.grid.unit * 3}px;
341
- overflow: hidden;
342
- `;
343
- const AuthorForm = (0, styled_components_1.default)(Section) `
344
- margin: ${(props) => props.theme.grid.unit * 3}px;
345
- `;
346
- const Title = styled_components_1.default.h4 `
347
- margin: 0;
348
- display: flex;
349
- align-items: center;
350
- font-size: 0.875rem;
351
- padding-right: 0.5rem;
352
- background: ${(props) => props.isInvalid ? props.theme.colors.background.warning : 'transparent'};
353
- color: ${(props) => props.isInvalid ? props.theme.colors.text.warning : 'inherit'};
354
- `;
355
- const DropdownIndicator = (0, styled_components_1.default)(ArrowDownBlue_1.default) `
356
- border: 0;
357
- border-radius: 50%;
358
- margin-right: 0.6em;
359
- min-width: 20px;
360
- `;
361
- const ToggleButton = styled_components_1.default.button `
362
- flex-grow: 1;
363
- display: flex;
364
- align-items: center;
365
- width: 100%;
366
- background: transparent;
367
- border: none;
368
- text-align: left;
369
- font-family: ${(props) => props.theme.font.family.sans};
370
- font-size: 1rem;
371
- padding: 0.6em 0.5em;
372
-
373
- outline: none;
374
-
375
- &:focus {
376
- color: ${(props) => props.theme.colors.button.primary.border.hover};
377
- }
378
-
379
- svg {
380
- transform: ${(props) => (props.isOpen ? 'rotateX(180deg)' : 'initial')};
381
- }
382
- `;
383
- const RemoveButton = styled_components_1.default.button `
384
- border: none;
385
- background: transparent;
386
- padding: 0;
387
-
388
- outline: none;
389
-
390
- &:focus path {
391
- fill: ${(props) => props.theme.colors.button.primary.color.hover};
392
- }
393
-
394
- svg {
395
- width: 2rem;
396
- height: 2rem;
397
- }
398
- `;
399
- exports.AddAffiliationContainer = styled_components_1.default.div `
400
- padding-right: 0.71rem;
401
- display: flex;
402
- flex-direction: column;
403
- justify-content: space-around;
404
-
405
- svg {
406
- width: 1.5rem;
407
- height: 1.5rem;
408
- }
409
-
410
- circle,
411
- use {
412
- fill: ${(props) => props.theme.colors.brand.default};
413
- }
414
-
415
- path {
416
- mask: none;
417
- }
418
- `;
419
- //# sourceMappingURL=ReferenceForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReferenceForm.js","sourceRoot":"","sources":["../../../../../src/components/library/ReferenceForm.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oFAA2D;AAC3D,kGAAiE;AACjE,4FAAmE;AAEnE,kDAA4D;AAC5D,0DAQiC;AACjC,4DAAsD;AACtD,sDAG+B;AAC/B,mCAOe;AACf,+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AAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;;;;;;;CAOnE,CAAA;AAEY,QAAA,uBAAuB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;YAarC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;;;;;;CAMtD,CAAA"}
@@ -1,70 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2023 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.ReferencesEditor = void 0;
38
- const json_schema_1 = require("@manuscripts/json-schema");
39
- const react_1 = __importStar(require("react"));
40
- const CitationModal_1 = require("./CitationModal");
41
- const ReferencesEditor = (props) => {
42
- const { saveModel, deleteModel, referenceID } = props;
43
- const [modelMap, setModelMap] = (0, react_1.useState)(props.modelMap);
44
- const [showEditModel, setShowEditModel] = (0, react_1.useState)(false);
45
- const [selectedItem, setSelectedItem] = (0, react_1.useState)();
46
- (0, react_1.useEffect)(() => {
47
- if (referenceID) {
48
- const reference = modelMap.get(referenceID);
49
- setSelectedItem(reference);
50
- setShowEditModel(true);
51
- }
52
- }, [referenceID, modelMap]);
53
- const saveCallback = (0, react_1.useCallback)(async (item) => {
54
- await saveModel({ ...item, objectType: json_schema_1.ObjectTypes.BibliographyItem });
55
- setModelMap(new Map([
56
- ...modelMap,
57
- [item._id, { ...item, objectType: json_schema_1.ObjectTypes.BibliographyItem }],
58
- ]));
59
- }, [saveModel, modelMap]);
60
- const deleteReferenceCallback = (0, react_1.useCallback)(async () => {
61
- if (selectedItem) {
62
- await deleteModel(selectedItem._id);
63
- modelMap.delete(selectedItem._id);
64
- setModelMap(new Map([...modelMap]));
65
- }
66
- }, [selectedItem, deleteModel, modelMap]);
67
- return (react_1.default.createElement(CitationModal_1.CitationModal, { editCitation: showEditModel, modelMap: modelMap, saveCallback: saveCallback, selectedItem: selectedItem, deleteCallback: deleteReferenceCallback, setSelectedItem: setSelectedItem, setShowEditModel: setShowEditModel }));
68
- };
69
- exports.ReferencesEditor = ReferencesEditor;
70
- //# sourceMappingURL=ReferencesEditor.js.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,EACD,CAAC,SAAS,EAAE,QAAQ,CAAC,CACtB,CAAA;IAED,MAAM,uBAAuB,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QACrD,IAAI,YAAY,EAAE;YAChB,MAAM,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;YACnC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;YACjC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;SACpC;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAA;IAEzC,OAAO,CACL,8BAAC,6BAAa,IACZ,YAAY,EAAE,aAAa,EAC3B,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,uBAAuB,EACvC,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAA;AACH,CAAC,CAAA;AA/CY,QAAA,gBAAgB,oBA+C5B"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ReferencesViewer = void 0;
7
- /*!
8
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
9
- *
10
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
11
- *
12
- * The Original Code is manuscripts-frontend.
13
- *
14
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
15
- *
16
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2021 Atypon Systems LLC. All Rights Reserved.
17
- */
18
- const style_guide_1 = require("@manuscripts/style-guide");
19
- const react_1 = __importDefault(require("react"));
20
- const styled_components_1 = __importDefault(require("styled-components"));
21
- const References = styled_components_1.default.div `
22
- display: flex;
23
- flex-direction: column;
24
- flex-wrap: wrap;
25
- `;
26
- const Reference = (0, styled_components_1.default)(style_guide_1.TertiaryButton) `
27
- text-decoration: none;
28
- `;
29
- const ReferencesViewer = ({ items }) => {
30
- return (react_1.default.createElement(References, null, items.map((item) => (react_1.default.createElement(Reference, { as: 'a', key: item.referencedObject, href: `#${item.referencedObject}` }, item.label)))));
31
- };
32
- exports.ReferencesViewer = ReferencesViewer;
33
- //# sourceMappingURL=ReferencesViewer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReferencesViewer.js","sourceRoot":"","sources":["../../../../../src/components/library/ReferencesViewer.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAAyD;AACzD,kDAAyB;AACzB,0EAAsC;AAMtC,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;CAI5B,CAAA;AAED,MAAM,SAAS,GAAG,IAAA,2BAAM,EAAC,4BAAc,CAAC,CAAA;;CAEvC,CAAA;AAEM,MAAM,gBAAgB,GAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7D,OAAO,CACL,8BAAC,UAAU,QACR,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,8BAAC,SAAS,IACR,EAAE,EAAE,GAAG,EACP,GAAG,EAAE,IAAI,CAAC,gBAAgB,EAC1B,IAAI,EAAE,IAAI,IAAI,CAAC,gBAAgB,EAAE,IAEhC,IAAI,CAAC,KAAK,CACD,CACb,CAAC,CACS,CACd,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,gBAAgB,oBAc5B"}