@kookaat/strapi-plugin-tinymce 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/Settings-Cht7TW_m.js +2606 -0
- package/dist/_chunks/Settings-Cht7TW_m.js.map +1 -0
- package/dist/_chunks/Settings-CqdUA2s3.mjs +2606 -0
- package/dist/_chunks/Settings-CqdUA2s3.mjs.map +1 -0
- package/dist/_chunks/Wysiwyg-Bo6uIgVq.mjs +130 -0
- package/dist/_chunks/Wysiwyg-Bo6uIgVq.mjs.map +1 -0
- package/dist/_chunks/Wysiwyg-C1NARvA-.js +130 -0
- package/dist/_chunks/Wysiwyg-C1NARvA-.js.map +1 -0
- package/dist/_chunks/cs-4ldo0hfI.js +15 -0
- package/dist/_chunks/cs-4ldo0hfI.js.map +1 -0
- package/dist/_chunks/cs-D-gwbfRH.mjs +15 -0
- package/dist/_chunks/cs-D-gwbfRH.mjs.map +1 -0
- package/dist/_chunks/en-BILT6xrd.mjs +15 -0
- package/dist/_chunks/en-BILT6xrd.mjs.map +1 -0
- package/dist/_chunks/en-usAdfkfH.js +15 -0
- package/dist/_chunks/en-usAdfkfH.js.map +1 -0
- package/dist/_chunks/index-4S82exqN.js +248 -0
- package/dist/_chunks/index-4S82exqN.js.map +1 -0
- package/dist/_chunks/index-Bc87VSN0.mjs +247 -0
- package/dist/_chunks/index-Bc87VSN0.mjs.map +1 -0
- package/dist/_chunks/sk-BcD0BjAU.js +15 -0
- package/dist/_chunks/sk-BcD0BjAU.js.map +1 -0
- package/dist/_chunks/sk-D3I3bI3P.mjs +15 -0
- package/dist/_chunks/sk-D3I3bI3P.mjs.map +1 -0
- package/dist/admin/index.js +4 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/index.mjs +5 -0
- package/dist/admin/index.mjs.map +1 -0
- package/dist/server/index.js +298 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +299 -0
- package/dist/server/index.mjs.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { Flex } from "@strapi/design-system";
|
|
5
|
+
import { Paragraph } from "@strapi/icons";
|
|
6
|
+
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
7
|
+
const v = glob[path];
|
|
8
|
+
if (v) {
|
|
9
|
+
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
10
|
+
}
|
|
11
|
+
return new Promise((_, reject) => {
|
|
12
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
const name$1 = "@kookaat/strapi-plugin-tinymce";
|
|
16
|
+
const version = "2.0.3";
|
|
17
|
+
const description = "Strapi custom field with a customized build of TinyMCE richtext editor.";
|
|
18
|
+
const keywords = [
|
|
19
|
+
"strapi",
|
|
20
|
+
"tinymce",
|
|
21
|
+
"tinymce 7",
|
|
22
|
+
"wysiwyg",
|
|
23
|
+
"rich text",
|
|
24
|
+
"editor"
|
|
25
|
+
];
|
|
26
|
+
const license = "MIT";
|
|
27
|
+
const author = {
|
|
28
|
+
name: "M.Hossein Zendehpey (forked from SKLINET s.r.o.)",
|
|
29
|
+
url: "https://github.com/mhzendehpey"
|
|
30
|
+
};
|
|
31
|
+
const type = "commonjs";
|
|
32
|
+
const exports = {
|
|
33
|
+
"./package.json": "./package.json",
|
|
34
|
+
"./strapi-admin": {
|
|
35
|
+
types: "./dist/admin/src/index.d.ts",
|
|
36
|
+
source: "./admin/src/index.ts",
|
|
37
|
+
"import": "./dist/admin/index.mjs",
|
|
38
|
+
require: "./dist/admin/index.js",
|
|
39
|
+
"default": "./dist/admin/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./strapi-server": {
|
|
42
|
+
types: "./dist/server/src/index.d.ts",
|
|
43
|
+
source: "./server/src/index.ts",
|
|
44
|
+
"import": "./dist/server/index.mjs",
|
|
45
|
+
require: "./dist/server/index.js",
|
|
46
|
+
"default": "./dist/server/index.js"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const files = [
|
|
50
|
+
"dist"
|
|
51
|
+
];
|
|
52
|
+
const scripts = {
|
|
53
|
+
build: "strapi-plugin build",
|
|
54
|
+
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
55
|
+
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
56
|
+
verify: "strapi-plugin verify",
|
|
57
|
+
watch: "strapi-plugin watch",
|
|
58
|
+
"watch:link": "strapi-plugin watch:link"
|
|
59
|
+
};
|
|
60
|
+
const dependencies = {
|
|
61
|
+
"@strapi/design-system": "^2.0.0-rc.11",
|
|
62
|
+
"@strapi/icons": "^2.0.0-rc.11",
|
|
63
|
+
"@tinymce/tinymce-react": "^5.1.1",
|
|
64
|
+
"react-intl": "^6.8.4",
|
|
65
|
+
"tinymce-i18n": "^24.10.28"
|
|
66
|
+
};
|
|
67
|
+
const devDependencies = {
|
|
68
|
+
"@strapi/sdk-plugin": "^5.2.7",
|
|
69
|
+
"@strapi/strapi": "^5.33.1",
|
|
70
|
+
"@strapi/typescript-utils": "5.1.1",
|
|
71
|
+
"@types/react": "^18.3.10",
|
|
72
|
+
"@types/react-dom": "^18.3.0",
|
|
73
|
+
prettier: "^3.3.3",
|
|
74
|
+
react: "^18.3.1",
|
|
75
|
+
"react-dom": "^18.3.1",
|
|
76
|
+
"react-router-dom": "^6.26.2",
|
|
77
|
+
"styled-components": "^6.1.13",
|
|
78
|
+
typescript: "^5.6.2"
|
|
79
|
+
};
|
|
80
|
+
const peerDependencies = {
|
|
81
|
+
"@strapi/sdk-plugin": "^5.2.7",
|
|
82
|
+
"@strapi/strapi": "^5.1.1",
|
|
83
|
+
react: "^18.3.1",
|
|
84
|
+
"react-dom": "^18.3.1",
|
|
85
|
+
"react-router-dom": "^6.27.0",
|
|
86
|
+
"styled-components": "^6.1.13"
|
|
87
|
+
};
|
|
88
|
+
const strapi = {
|
|
89
|
+
displayName: "TinyMCE",
|
|
90
|
+
name: "tinymce",
|
|
91
|
+
description: "Strapi custom field with a customized build of TinyMCE richtext editor.",
|
|
92
|
+
kind: "plugin"
|
|
93
|
+
};
|
|
94
|
+
const repository = {
|
|
95
|
+
type: "git",
|
|
96
|
+
url: "https://github.com/mhzendehpey/strapi-plugin-tinymce"
|
|
97
|
+
};
|
|
98
|
+
const pluginPkg = {
|
|
99
|
+
name: name$1,
|
|
100
|
+
version,
|
|
101
|
+
description,
|
|
102
|
+
keywords,
|
|
103
|
+
license,
|
|
104
|
+
author,
|
|
105
|
+
type,
|
|
106
|
+
exports,
|
|
107
|
+
files,
|
|
108
|
+
scripts,
|
|
109
|
+
dependencies,
|
|
110
|
+
devDependencies,
|
|
111
|
+
peerDependencies,
|
|
112
|
+
strapi,
|
|
113
|
+
repository
|
|
114
|
+
};
|
|
115
|
+
const PLUGIN_ID = pluginPkg.name.replace(/^(@kookaat\/strapi-)plugin-/i, "");
|
|
116
|
+
const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
|
|
117
|
+
const Initializer = ({ setPlugin }) => {
|
|
118
|
+
const ref = useRef(setPlugin);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
ref.current(PLUGIN_ID);
|
|
121
|
+
}, []);
|
|
122
|
+
return null;
|
|
123
|
+
};
|
|
124
|
+
const prefixPluginTranslations = (trad, pluginId) => {
|
|
125
|
+
if (!pluginId) {
|
|
126
|
+
throw new TypeError("pluginId can't be empty");
|
|
127
|
+
}
|
|
128
|
+
return Object.keys(trad).reduce((acc, current) => {
|
|
129
|
+
acc[`${pluginId}.${current}`] = trad[current];
|
|
130
|
+
return acc;
|
|
131
|
+
}, {});
|
|
132
|
+
};
|
|
133
|
+
const pluginPermissions = {
|
|
134
|
+
// This permission regards the main component (App) and is used to tell
|
|
135
|
+
// If the plugin link should be displayed in the menu
|
|
136
|
+
// And also if the plugin is accessible. This use case is found when a user types the url of the
|
|
137
|
+
// plugin directly in the browser
|
|
138
|
+
"menu-link": [{ action: "plugin::tinymce.menu-link", subject: null }],
|
|
139
|
+
settings: [{ action: "plugin::tinymce.settings.read", subject: null }]
|
|
140
|
+
};
|
|
141
|
+
const IconBox = styled(Flex)`
|
|
142
|
+
background-color: #f0f0ff; /* primary100 */
|
|
143
|
+
border: 1px solid #d9d8ff; /* primary200 */
|
|
144
|
+
|
|
145
|
+
svg > path {
|
|
146
|
+
fill: #4945ff; /* primary600 */
|
|
147
|
+
}
|
|
148
|
+
`;
|
|
149
|
+
const PluginIcon = () => {
|
|
150
|
+
return /* @__PURE__ */ jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsx(Paragraph, {}) });
|
|
151
|
+
};
|
|
152
|
+
const name = pluginPkg.strapi.name;
|
|
153
|
+
const index = {
|
|
154
|
+
register(app) {
|
|
155
|
+
app.customFields.register({
|
|
156
|
+
name: "tinymce",
|
|
157
|
+
pluginId: PLUGIN_ID,
|
|
158
|
+
type: "richtext",
|
|
159
|
+
icon: PluginIcon,
|
|
160
|
+
intlLabel: {
|
|
161
|
+
id: getTranslation("settings.title"),
|
|
162
|
+
defaultMessage: "TinyMCE"
|
|
163
|
+
},
|
|
164
|
+
intlDescription: {
|
|
165
|
+
id: getTranslation("settings.description"),
|
|
166
|
+
defaultMessage: "TinyMCE rich text editor"
|
|
167
|
+
},
|
|
168
|
+
isResizable: false,
|
|
169
|
+
default: 12,
|
|
170
|
+
options: {
|
|
171
|
+
advanced: [
|
|
172
|
+
{
|
|
173
|
+
type: "checkbox",
|
|
174
|
+
name: "required",
|
|
175
|
+
intlLabel: {
|
|
176
|
+
id: getTranslation("settings.required-field"),
|
|
177
|
+
defaultMessage: "Required field"
|
|
178
|
+
},
|
|
179
|
+
description: "You won't be able to create an entry if this field is empty"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
components: {
|
|
184
|
+
Input: async () => import(
|
|
185
|
+
/* webpackChunkName: "video-field-input-component" */
|
|
186
|
+
"./Wysiwyg-Bo6uIgVq.mjs"
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
app.createSettingSection(
|
|
191
|
+
{
|
|
192
|
+
id: PLUGIN_ID,
|
|
193
|
+
intlLabel: {
|
|
194
|
+
id: `${PLUGIN_ID}.plugin.name`,
|
|
195
|
+
defaultMessage: "TinyMCE"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
[
|
|
199
|
+
{
|
|
200
|
+
intlLabel: {
|
|
201
|
+
id: getTranslation("settings.page-title"),
|
|
202
|
+
defaultMessage: "Configuration"
|
|
203
|
+
},
|
|
204
|
+
id: "settings",
|
|
205
|
+
to: `/settings/${PLUGIN_ID}`,
|
|
206
|
+
Component: async () => {
|
|
207
|
+
return import("./Settings-CqdUA2s3.mjs");
|
|
208
|
+
},
|
|
209
|
+
permissions: pluginPermissions["settings"]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
);
|
|
213
|
+
app.registerPlugin({
|
|
214
|
+
id: PLUGIN_ID,
|
|
215
|
+
initializer: Initializer,
|
|
216
|
+
isReady: false,
|
|
217
|
+
name
|
|
218
|
+
});
|
|
219
|
+
},
|
|
220
|
+
bootstrap(app) {
|
|
221
|
+
},
|
|
222
|
+
async registerTrads(app) {
|
|
223
|
+
const { locales } = app;
|
|
224
|
+
const importedTranslations = await Promise.all(
|
|
225
|
+
locales.map((locale) => {
|
|
226
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => import("./cs-D-gwbfRH.mjs"), "./translations/en.json": () => import("./en-BILT6xrd.mjs"), "./translations/sk.json": () => import("./sk-D3I3bI3P.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
|
|
227
|
+
return {
|
|
228
|
+
data: prefixPluginTranslations(data, PLUGIN_ID),
|
|
229
|
+
locale
|
|
230
|
+
};
|
|
231
|
+
}).catch(() => {
|
|
232
|
+
return {
|
|
233
|
+
data: {},
|
|
234
|
+
locale
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
})
|
|
238
|
+
);
|
|
239
|
+
return importedTranslations;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
export {
|
|
243
|
+
PLUGIN_ID as P,
|
|
244
|
+
getTranslation as g,
|
|
245
|
+
index as i
|
|
246
|
+
};
|
|
247
|
+
//# sourceMappingURL=index-Bc87VSN0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Bc87VSN0.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/utils/getTranslation.ts","../../admin/src/components/Initializer.tsx","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/permissions.ts","../../admin/src/components/PluginIcon.tsx","../../admin/src/index.ts"],"sourcesContent":["import pluginPkg from '../../package.json';\r\n\r\nexport const PLUGIN_ID = pluginPkg.name.replace(/^(@kookaat\\/strapi-)plugin-/i, '');\r\n","import { PLUGIN_ID } from '../pluginId';\r\n\r\nconst getTranslation = (id: string) => `${PLUGIN_ID}.${id}`;\r\n\r\nexport { getTranslation };\r\n","import { useEffect, useRef } from 'react';\r\n\r\nimport { PLUGIN_ID } from '../pluginId';\r\n\r\ntype InitializerProps = {\r\n setPlugin: (id: string) => void;\r\n};\r\n\r\nconst Initializer = ({ setPlugin }: InitializerProps) => {\r\n const ref = useRef(setPlugin);\r\n\r\n useEffect(() => {\r\n ref.current(PLUGIN_ID);\r\n }, []);\r\n\r\n return null;\r\n};\r\n\r\nexport { Initializer };\r\n","type TradOptions = Record<string, string>;\r\n\r\nexport const prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\r\n if (!pluginId) {\r\n throw new TypeError(\"pluginId can't be empty\");\r\n }\r\n return Object.keys(trad).reduce((acc, current) => {\r\n acc[`${pluginId}.${current}`] = trad[current];\r\n return acc;\r\n }, {} as TradOptions);\r\n};\r\n","const pluginPermissions = {\r\n // This permission regards the main component (App) and is used to tell\r\n // If the plugin link should be displayed in the menu\r\n // And also if the plugin is accessible. This use case is found when a user types the url of the\r\n // plugin directly in the browser\r\n 'menu-link': [{ action: 'plugin::tinymce.menu-link', subject: null }],\r\n settings: [{ action: 'plugin::tinymce.settings.read', subject: null }],\r\n};\r\n\r\nexport default pluginPermissions;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Flex } from '@strapi/design-system';\r\nimport { Paragraph } from '@strapi/icons';\r\n\r\nconst IconBox = styled(Flex)`\r\n background-color: #f0f0ff; /* primary100 */\r\n border: 1px solid #d9d8ff; /* primary200 */\r\n\r\n svg > path {\r\n fill: #4945ff; /* primary600 */\r\n }\r\n`;\r\n\r\nconst PluginIcon = () => {\r\n return (\r\n <IconBox justifyContent=\"center\" alignItems=\"center\" width={7} height={6} hasRadius aria-hidden>\r\n <Paragraph />\r\n </IconBox>\r\n );\r\n};\r\n\r\nexport { PluginIcon };\r\n","import pluginPkg from '../../package.json';\r\nimport { getTranslation } from './utils/getTranslation';\r\nimport { PLUGIN_ID } from './pluginId';\r\nimport { Initializer } from './components/Initializer';\r\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\r\nimport pluginPermissions from './permissions';\r\nimport { PluginIcon } from './components/PluginIcon';\r\n\r\nconst name = pluginPkg.strapi.name;\r\n\r\nexport default {\r\n register(app: any) {\r\n app.customFields.register({\r\n name: 'tinymce',\r\n pluginId: PLUGIN_ID,\r\n type: 'richtext',\r\n icon: PluginIcon,\r\n intlLabel: {\r\n id: getTranslation('settings.title'),\r\n defaultMessage: 'TinyMCE',\r\n },\r\n intlDescription: {\r\n id: getTranslation('settings.description'),\r\n defaultMessage: 'TinyMCE rich text editor',\r\n },\r\n isResizable: false,\r\n default: 12,\r\n options: {\r\n advanced: [\r\n {\r\n type: 'checkbox',\r\n name: 'required',\r\n intlLabel: {\r\n id: getTranslation('settings.required-field'),\r\n defaultMessage: 'Required field',\r\n },\r\n description: \"You won't be able to create an entry if this field is empty\",\r\n },\r\n ],\r\n },\r\n components: {\r\n Input: async () => import(/* webpackChunkName: \"video-field-input-component\" */ './components/Wysiwyg'),\r\n },\r\n });\r\n\r\n app.createSettingSection(\r\n {\r\n id: PLUGIN_ID,\r\n intlLabel: {\r\n id: `${PLUGIN_ID}.plugin.name`,\r\n defaultMessage: 'TinyMCE',\r\n },\r\n },\r\n [\r\n {\r\n intlLabel: {\r\n id: getTranslation('settings.page-title'),\r\n defaultMessage: 'Configuration',\r\n },\r\n id: 'settings',\r\n to: `/settings/${PLUGIN_ID}`,\r\n Component: async () => {\r\n return import('./pages/Settings');\r\n },\r\n permissions: pluginPermissions['settings'],\r\n },\r\n ],\r\n );\r\n\r\n app.registerPlugin({\r\n id: PLUGIN_ID,\r\n initializer: Initializer,\r\n isReady: false,\r\n name: name,\r\n });\r\n },\r\n\r\n bootstrap(app: any) {},\r\n async registerTrads(app: any) {\r\n const { locales } = app;\r\n\r\n const importedTranslations = await Promise.all(\r\n (locales as string[]).map((locale) => {\r\n return import(/* webpackChunkName: \"translation-[request]\" */ `./translations/${locale}.json`)\r\n .then(({ default: data }) => {\r\n return {\r\n data: prefixPluginTranslations(data, PLUGIN_ID),\r\n locale,\r\n };\r\n })\r\n .catch(() => {\r\n return {\r\n data: {},\r\n locale,\r\n };\r\n });\r\n }),\r\n );\r\n\r\n return importedTranslations;\r\n },\r\n};\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,YAAY,UAAU,KAAK,QAAQ,gCAAgC,EAAE;ACAlF,MAAM,iBAAiB,CAAC,OAAe,GAAG,SAAS,IAAI,EAAE;ACMzD,MAAM,c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AAA,UAAA;AAAA,QACJ,CACH,EACA,MAAM,MAAM;AACF,iBAAA;AAAA,YACH,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACJ,CACH;AAAA,MAAA,CACR;AAAA,IAAA;AAGE,WAAA;AAAA,EACX;AACJ;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const sk = {
|
|
4
|
+
"settings.title": "TinyMCE",
|
|
5
|
+
"settings.description": "TinyMCE rich text editor",
|
|
6
|
+
"settings.subtitle": "Upravte nastavenia vášho TinyMCE pluginu",
|
|
7
|
+
"settings.content-title": "Nastavte API kľúč pre TinyMCE editor.",
|
|
8
|
+
"settings.save-button": "Uložiť",
|
|
9
|
+
"settings.input-title": "API kľúč",
|
|
10
|
+
"settings.input-placeholder": "napr. eegrtg8464asnbvvvfasd46486asldaeerer45888areettzh",
|
|
11
|
+
"settings.success-message": "Nastavenia boli úspešne uložené.",
|
|
12
|
+
"settings.page-title": "Konfigurácia"
|
|
13
|
+
};
|
|
14
|
+
exports.default = sk;
|
|
15
|
+
//# sourceMappingURL=sk-BcD0BjAU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sk-BcD0BjAU.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const sk = {
|
|
2
|
+
"settings.title": "TinyMCE",
|
|
3
|
+
"settings.description": "TinyMCE rich text editor",
|
|
4
|
+
"settings.subtitle": "Upravte nastavenia vášho TinyMCE pluginu",
|
|
5
|
+
"settings.content-title": "Nastavte API kľúč pre TinyMCE editor.",
|
|
6
|
+
"settings.save-button": "Uložiť",
|
|
7
|
+
"settings.input-title": "API kľúč",
|
|
8
|
+
"settings.input-placeholder": "napr. eegrtg8464asnbvvvfasd46486asldaeerer45888areettzh",
|
|
9
|
+
"settings.success-message": "Nastavenia boli úspešne uložené.",
|
|
10
|
+
"settings.page-title": "Konfigurácia"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
sk as default
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=sk-D3I3bI3P.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sk-D3I3bI3P.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const bootstrap = async ({ strapi: strapi2 }) => {
|
|
3
|
+
const actions = [
|
|
4
|
+
{
|
|
5
|
+
section: "plugins",
|
|
6
|
+
displayName: "Access the plugin settings",
|
|
7
|
+
uid: "settings.read",
|
|
8
|
+
pluginName: "tinymce"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
section: "plugins",
|
|
12
|
+
displayName: "Menu link to plugin settings",
|
|
13
|
+
uid: "menu-link",
|
|
14
|
+
pluginName: "tinymce"
|
|
15
|
+
}
|
|
16
|
+
];
|
|
17
|
+
await strapi2.admin.services.permission.actionProvider.registerMany(actions);
|
|
18
|
+
};
|
|
19
|
+
const destroy = ({ strapi: strapi2 }) => {
|
|
20
|
+
};
|
|
21
|
+
const name = "@kookaat/strapi-plugin-tinymce";
|
|
22
|
+
const version = "2.0.3";
|
|
23
|
+
const description = "Strapi custom field with a customized build of TinyMCE richtext editor.";
|
|
24
|
+
const keywords = [
|
|
25
|
+
"strapi",
|
|
26
|
+
"tinymce",
|
|
27
|
+
"tinymce 7",
|
|
28
|
+
"wysiwyg",
|
|
29
|
+
"rich text",
|
|
30
|
+
"editor"
|
|
31
|
+
];
|
|
32
|
+
const license = "MIT";
|
|
33
|
+
const author = {
|
|
34
|
+
name: "M.Hossein Zendehpey (forked from SKLINET s.r.o.)",
|
|
35
|
+
url: "https://github.com/mhzendehpey"
|
|
36
|
+
};
|
|
37
|
+
const type = "commonjs";
|
|
38
|
+
const exports$1 = {
|
|
39
|
+
"./package.json": "./package.json",
|
|
40
|
+
"./strapi-admin": {
|
|
41
|
+
types: "./dist/admin/src/index.d.ts",
|
|
42
|
+
source: "./admin/src/index.ts",
|
|
43
|
+
"import": "./dist/admin/index.mjs",
|
|
44
|
+
require: "./dist/admin/index.js",
|
|
45
|
+
"default": "./dist/admin/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./strapi-server": {
|
|
48
|
+
types: "./dist/server/src/index.d.ts",
|
|
49
|
+
source: "./server/src/index.ts",
|
|
50
|
+
"import": "./dist/server/index.mjs",
|
|
51
|
+
require: "./dist/server/index.js",
|
|
52
|
+
"default": "./dist/server/index.js"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const files = [
|
|
56
|
+
"dist"
|
|
57
|
+
];
|
|
58
|
+
const scripts = {
|
|
59
|
+
build: "strapi-plugin build",
|
|
60
|
+
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
61
|
+
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
62
|
+
verify: "strapi-plugin verify",
|
|
63
|
+
watch: "strapi-plugin watch",
|
|
64
|
+
"watch:link": "strapi-plugin watch:link"
|
|
65
|
+
};
|
|
66
|
+
const dependencies = {
|
|
67
|
+
"@strapi/design-system": "^2.0.0-rc.11",
|
|
68
|
+
"@strapi/icons": "^2.0.0-rc.11",
|
|
69
|
+
"@tinymce/tinymce-react": "^5.1.1",
|
|
70
|
+
"react-intl": "^6.8.4",
|
|
71
|
+
"tinymce-i18n": "^24.10.28"
|
|
72
|
+
};
|
|
73
|
+
const devDependencies = {
|
|
74
|
+
"@strapi/sdk-plugin": "^5.2.7",
|
|
75
|
+
"@strapi/strapi": "^5.33.1",
|
|
76
|
+
"@strapi/typescript-utils": "5.1.1",
|
|
77
|
+
"@types/react": "^18.3.10",
|
|
78
|
+
"@types/react-dom": "^18.3.0",
|
|
79
|
+
prettier: "^3.3.3",
|
|
80
|
+
react: "^18.3.1",
|
|
81
|
+
"react-dom": "^18.3.1",
|
|
82
|
+
"react-router-dom": "^6.26.2",
|
|
83
|
+
"styled-components": "^6.1.13",
|
|
84
|
+
typescript: "^5.6.2"
|
|
85
|
+
};
|
|
86
|
+
const peerDependencies = {
|
|
87
|
+
"@strapi/sdk-plugin": "^5.2.7",
|
|
88
|
+
"@strapi/strapi": "^5.1.1",
|
|
89
|
+
react: "^18.3.1",
|
|
90
|
+
"react-dom": "^18.3.1",
|
|
91
|
+
"react-router-dom": "^6.27.0",
|
|
92
|
+
"styled-components": "^6.1.13"
|
|
93
|
+
};
|
|
94
|
+
const strapi$1 = {
|
|
95
|
+
displayName: "TinyMCE",
|
|
96
|
+
name: "tinymce",
|
|
97
|
+
description: "Strapi custom field with a customized build of TinyMCE richtext editor.",
|
|
98
|
+
kind: "plugin"
|
|
99
|
+
};
|
|
100
|
+
const repository = {
|
|
101
|
+
type: "git",
|
|
102
|
+
url: "https://github.com/mhzendehpey/strapi-plugin-tinymce"
|
|
103
|
+
};
|
|
104
|
+
const pluginPkg = {
|
|
105
|
+
name,
|
|
106
|
+
version,
|
|
107
|
+
description,
|
|
108
|
+
keywords,
|
|
109
|
+
license,
|
|
110
|
+
author,
|
|
111
|
+
type,
|
|
112
|
+
exports: exports$1,
|
|
113
|
+
files,
|
|
114
|
+
scripts,
|
|
115
|
+
dependencies,
|
|
116
|
+
devDependencies,
|
|
117
|
+
peerDependencies,
|
|
118
|
+
strapi: strapi$1,
|
|
119
|
+
repository
|
|
120
|
+
};
|
|
121
|
+
const PLUGIN_ID = pluginPkg.name.replace(/^(@kookaat\/strapi-)plugin-/i, "");
|
|
122
|
+
const register = ({ strapi: strapi2 }) => {
|
|
123
|
+
strapi2.customFields.register({
|
|
124
|
+
name: "tinymce",
|
|
125
|
+
plugin: PLUGIN_ID,
|
|
126
|
+
type: "richtext"
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
const config$3 = {
|
|
130
|
+
default: {},
|
|
131
|
+
validator() {
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const contentTypes = {};
|
|
135
|
+
const admin$1 = {
|
|
136
|
+
async uploadImage(ctx) {
|
|
137
|
+
const file = Array.isArray(ctx.request.files.files) ? ctx.request.files.files[0] : ctx.request.files.files;
|
|
138
|
+
if (!file) {
|
|
139
|
+
return ctx.badRequest("No file uploaded");
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
const [createdFile] = await strapi.plugins.upload.services.upload.upload({
|
|
143
|
+
data: {
|
|
144
|
+
fileInfo: {
|
|
145
|
+
name: file.originalFilename,
|
|
146
|
+
caption: "",
|
|
147
|
+
alternativeText: ""
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
files: file
|
|
151
|
+
});
|
|
152
|
+
ctx.body = { location: createdFile.url };
|
|
153
|
+
} catch (error) {
|
|
154
|
+
ctx.internalServerError(`Image upload failed ${error?.message || error?.toString()}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const config$2 = {
|
|
159
|
+
getConfig: async (ctx) => {
|
|
160
|
+
const { configKey } = ctx.params;
|
|
161
|
+
const config2 = await strapi.plugin("tinymce").service("config").getConfig(configKey);
|
|
162
|
+
ctx.send(config2);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const settings$2 = {
|
|
166
|
+
getSettings: async (ctx) => {
|
|
167
|
+
try {
|
|
168
|
+
ctx.body = await strapi.plugin("tinymce").service("settings").getSettings();
|
|
169
|
+
} catch (err) {
|
|
170
|
+
ctx.body = err;
|
|
171
|
+
ctx.throw(500, err);
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
setSettings: async (ctx) => {
|
|
175
|
+
const { body } = ctx.request;
|
|
176
|
+
try {
|
|
177
|
+
await strapi.plugin("tinymce").service("settings").setSettings(body);
|
|
178
|
+
ctx.body = await strapi.plugin("tinymce").service("settings").getSettings();
|
|
179
|
+
} catch (err) {
|
|
180
|
+
ctx.throw(500, err);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
const controllers = {
|
|
185
|
+
admin: admin$1,
|
|
186
|
+
config: config$2,
|
|
187
|
+
settings: settings$2
|
|
188
|
+
};
|
|
189
|
+
const middlewares = {};
|
|
190
|
+
const policies = {};
|
|
191
|
+
const admin = {
|
|
192
|
+
routes: [
|
|
193
|
+
{
|
|
194
|
+
method: "POST",
|
|
195
|
+
path: "/uploadImage",
|
|
196
|
+
handler: "admin.uploadImage",
|
|
197
|
+
// Enforce admin authentication
|
|
198
|
+
config: { auth: { scope: ["admin::isAuthenticatedAdmin"] } }
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
};
|
|
202
|
+
const config$1 = {
|
|
203
|
+
type: "admin",
|
|
204
|
+
routes: [
|
|
205
|
+
{
|
|
206
|
+
method: "GET",
|
|
207
|
+
path: "/config/:configKey",
|
|
208
|
+
handler: "config.getConfig",
|
|
209
|
+
config: { policies: [] }
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
};
|
|
213
|
+
const settings$1 = {
|
|
214
|
+
type: "admin",
|
|
215
|
+
routes: [
|
|
216
|
+
{
|
|
217
|
+
method: "GET",
|
|
218
|
+
path: "/settings",
|
|
219
|
+
handler: "settings.getSettings",
|
|
220
|
+
config: {
|
|
221
|
+
policies: [],
|
|
222
|
+
auth: false
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
method: "POST",
|
|
227
|
+
path: "/settings",
|
|
228
|
+
handler: "settings.setSettings",
|
|
229
|
+
config: {
|
|
230
|
+
policies: [],
|
|
231
|
+
auth: false
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
};
|
|
236
|
+
const routes = {
|
|
237
|
+
admin,
|
|
238
|
+
config: config$1,
|
|
239
|
+
settings: settings$1
|
|
240
|
+
};
|
|
241
|
+
const config = ({ strapi: strapi2 }) => {
|
|
242
|
+
return {
|
|
243
|
+
getConfig(key = "editor") {
|
|
244
|
+
return strapi2.plugin("tinymce").config(key) ?? {};
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
function getPluginStore() {
|
|
249
|
+
return strapi.store({
|
|
250
|
+
environment: "",
|
|
251
|
+
type: "plugin",
|
|
252
|
+
name: "tinymce"
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
async function createDefaultConfig() {
|
|
256
|
+
const pluginStore = getPluginStore();
|
|
257
|
+
const value = {
|
|
258
|
+
apiKey: ""
|
|
259
|
+
};
|
|
260
|
+
await pluginStore.set({ key: "settings", value });
|
|
261
|
+
return pluginStore.get({ key: "settings" });
|
|
262
|
+
}
|
|
263
|
+
const settings = () => {
|
|
264
|
+
return {
|
|
265
|
+
async getSettings() {
|
|
266
|
+
const pluginStore = getPluginStore();
|
|
267
|
+
let config2 = await pluginStore.get({ key: "settings" });
|
|
268
|
+
if (!config2) {
|
|
269
|
+
config2 = await createDefaultConfig();
|
|
270
|
+
}
|
|
271
|
+
return config2;
|
|
272
|
+
},
|
|
273
|
+
async setSettings(settings2) {
|
|
274
|
+
const value = settings2;
|
|
275
|
+
const pluginStore = getPluginStore();
|
|
276
|
+
await pluginStore.set({ key: "settings", value });
|
|
277
|
+
return pluginStore.get({ key: "settings" });
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
const services = {
|
|
282
|
+
config,
|
|
283
|
+
settings
|
|
284
|
+
};
|
|
285
|
+
const index = {
|
|
286
|
+
register,
|
|
287
|
+
bootstrap,
|
|
288
|
+
destroy,
|
|
289
|
+
config: config$3,
|
|
290
|
+
controllers,
|
|
291
|
+
routes,
|
|
292
|
+
services,
|
|
293
|
+
contentTypes,
|
|
294
|
+
policies,
|
|
295
|
+
middlewares
|
|
296
|
+
};
|
|
297
|
+
module.exports = index;
|
|
298
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../server/src/bootstrap.ts","../../server/src/destroy.ts","../../admin/src/pluginId.ts","../../server/src/register.ts","../../server/src/config/index.ts","../../server/src/content-types/index.ts","../../server/src/controllers/admin.ts","../../server/src/controllers/config.ts","../../server/src/controllers/settings.ts","../../server/src/controllers/index.ts","../../server/src/middlewares/index.ts","../../server/src/policies/index.ts","../../server/src/routes/admin.ts","../../server/src/routes/config.ts","../../server/src/routes/settings.ts","../../server/src/routes/index.ts","../../server/src/services/config.ts","../../server/src/services/settings.ts","../../server/src/services/index.ts","../../server/src/index.ts"],"sourcesContent":["\"use strict\";\r\n\r\nimport type { Core } from '@strapi/strapi';\r\n\r\nconst bootstrap = async ({ strapi }: { strapi: Core.Strapi }) => {\r\n const actions = [\r\n {\r\n section: 'plugins',\r\n displayName: 'Access the plugin settings',\r\n uid: 'settings.read',\r\n pluginName: 'tinymce',\r\n },\r\n {\r\n section: 'plugins',\r\n displayName: 'Menu link to plugin settings',\r\n uid: 'menu-link',\r\n pluginName: 'tinymce',\r\n },\r\n ];\r\n await strapi.admin.services.permission.actionProvider.registerMany(actions);\r\n};\r\n\r\nexport default bootstrap;\r\n","\"use strict\";\r\n\r\nimport type { Core } from '@strapi/strapi';\r\n\r\nconst destroy = ({ strapi }: { strapi: Core.Strapi }) => {\r\n // destroy phase\r\n};\r\n\r\nexport default destroy;\r\n","import pluginPkg from '../../package.json';\r\n\r\nexport const PLUGIN_ID = pluginPkg.name.replace(/^(@kookaat\\/strapi-)plugin-/i, '');\r\n","\"use strict\";\r\n\r\nimport type { Core } from '@strapi/strapi';\r\nimport { PLUGIN_ID } from '../../admin/src/pluginId';\r\n\r\nconst register = ({ strapi }: { strapi: Core.Strapi }) => {\r\n strapi.customFields.register({\r\n name: 'tinymce',\r\n plugin: PLUGIN_ID,\r\n type: 'richtext',\r\n });\r\n};\r\n\r\nexport default register;\r\n","\"use strict\";\r\n\r\nexport default {\r\n default: {},\r\n validator() {},\r\n};\r\n","\"use strict\";\r\n\r\nexport default {};\r\n","import { Context } from 'koa';\r\n\r\nexport default {\r\n async uploadImage(ctx: Context) {\r\n const file = Array.isArray(ctx.request.files.files) ? ctx.request.files.files[0] : ctx.request.files.files;\r\n\r\n if (!file) {\r\n return ctx.badRequest('No file uploaded');\r\n }\r\n\r\n try {\r\n const [createdFile] = await strapi.plugins.upload.services.upload.upload({\r\n data: {\r\n fileInfo: {\r\n name: file.originalFilename,\r\n caption: '',\r\n alternativeText: '',\r\n },\r\n },\r\n files: file,\r\n });\r\n\r\n ctx.body = { location: createdFile.url };\r\n } catch (error) {\r\n ctx.internalServerError(`Image upload failed ${error?.message || error?.toString()}`);\r\n }\r\n },\r\n};\r\n","\"use strict\";\r\n\r\nexport default {\r\n getConfig: async (ctx) => {\r\n const { configKey } = ctx.params;\r\n const config = await strapi.plugin('tinymce').service('config').getConfig(configKey);\r\n ctx.send(config);\r\n },\r\n};\r\n","\"use strict\";\r\n\r\nexport default {\r\n getSettings: async (ctx) => {\r\n try {\r\n ctx.body = await strapi.plugin('tinymce').service('settings').getSettings();\r\n } catch (err) {\r\n ctx.body = err;\r\n ctx.throw(500, err);\r\n }\r\n },\r\n setSettings: async (ctx) => {\r\n const { body } = ctx.request;\r\n try {\r\n await strapi.plugin('tinymce').service('settings').setSettings(body);\r\n ctx.body = await strapi.plugin('tinymce').service('settings').getSettings();\r\n } catch (err) {\r\n ctx.throw(500, err);\r\n }\r\n },\r\n};\r\n","'use strict';\r\n\r\nimport admin from './admin';\r\nimport config from './config';\r\nimport settings from './settings';\r\n\r\nexport default {\r\n admin,\r\n config,\r\n settings,\r\n};\r\n","\"use strict\";\r\n\r\nexport default {};\r\n","\"use strict\";\r\n\r\nexport default {};\r\n","import { Route } from '@strapi/types/dist/core';\r\n\r\nexport default {\r\n routes: [\r\n {\r\n method: 'POST',\r\n path: '/uploadImage',\r\n handler: 'admin.uploadImage',\r\n // Enforce admin authentication\r\n config: { auth: { scope: ['admin::isAuthenticatedAdmin'] } },\r\n },\r\n ] as Route[],\r\n};\r\n","\"use strict\";\r\n\r\nexport default {\r\n type: 'admin',\r\n routes: [\r\n {\r\n method: 'GET',\r\n path: '/config/:configKey',\r\n handler: 'config.getConfig',\r\n config: { policies: [] },\r\n },\r\n ],\r\n};\r\n","export default {\r\n type: 'admin',\r\n routes: [\r\n {\r\n method: 'GET',\r\n path: '/settings',\r\n handler: 'settings.getSettings',\r\n config: {\r\n policies: [],\r\n auth: false,\r\n },\r\n },\r\n {\r\n method: 'POST',\r\n path: '/settings',\r\n handler: 'settings.setSettings',\r\n config: {\r\n policies: [],\r\n auth: false,\r\n },\r\n },\r\n ],\r\n};\r\n","import admin from './admin';\r\nimport config from './config';\r\nimport settings from './settings';\r\n\r\nexport default {\r\n admin,\r\n config,\r\n settings,\r\n};\r\n","\"use strict\";\r\n\r\nexport default ({ strapi }) => {\r\n return {\r\n getConfig(key = 'editor') {\r\n return strapi.plugin('tinymce').config(key) ?? {};\r\n },\r\n };\r\n};\r\n","\"use strict\";\r\n\r\nfunction getPluginStore() {\r\n return strapi.store({\r\n environment: '',\r\n type: 'plugin',\r\n name: 'tinymce',\r\n });\r\n}\r\nasync function createDefaultConfig() {\r\n const pluginStore = getPluginStore();\r\n const value = {\r\n apiKey: '',\r\n };\r\n await pluginStore.set({ key: 'settings', value });\r\n return pluginStore.get({ key: 'settings' });\r\n}\r\n\r\nexport default () => {\r\n return {\r\n async getSettings() {\r\n const pluginStore = getPluginStore();\r\n let config = await pluginStore.get({ key: 'settings' });\r\n if (!config) {\r\n config = await createDefaultConfig();\r\n }\r\n return config;\r\n },\r\n async setSettings(settings) {\r\n const value = settings;\r\n const pluginStore = getPluginStore();\r\n await pluginStore.set({ key: 'settings', value });\r\n return pluginStore.get({ key: 'settings' });\r\n },\r\n };\r\n};\r\n","\"use strict\";\r\n\r\nimport config from './config';\r\nimport settings from './settings';\r\n\r\nexport default {\r\n config,\r\n settings,\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Application methods\r\n */\r\nimport bootstrap from './bootstrap';\r\nimport destroy from './destroy';\r\nimport register from './register';\r\n\r\n/**\r\n * Plugin server methods\r\n */\r\nimport config from './config';\r\nimport contentTypes from './content-types';\r\nimport controllers from './controllers';\r\nimport middlewares from './middlewares';\r\nimport policies from './policies';\r\nimport routes from './routes';\r\nimport services from './services';\r\n\r\nexport default {\r\n register,\r\n bootstrap,\r\n destroy,\r\n config,\r\n controllers,\r\n routes,\r\n services,\r\n contentTypes,\r\n policies,\r\n middlewares,\r\n};\r\n"],"names":["strapi","config","admin","settings"],"mappings":";AAIA,MAAM,YAAY,OAAO,EAAE,QAAAA,cAAsC;AAC/D,QAAM,UAAU;AAAA,IACd;AAAA,MACE,SAAS;AAAA,MACT,aAAa;AAAA,MACb,KAAK;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA;AAAA,MACE,SAAS;AAAA,MACT,aAAa;AAAA,MACb,KAAK;AAAA,MACL,YAAY;AAAA,IACd;AAAA,EAAA;AAEF,QAAMA,QAAO,MAAM,SAAS,WAAW,eAAe,aAAa,OAAO;AAC5E;AChBA,MAAM,UAAU,CAAC,EAAE,QAAAA,cAAsC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJO,MAAM,YAAY,UAAU,KAAK,QAAQ,gCAAgC,EAAE;ACGlF,MAAM,WAAW,CAAC,EAAE,QAAAA,cAAsC;AACxD,EAAAA,QAAO,aAAa,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;ACTA,MAAe,WAAA;AAAA,EACb,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