intlayer-editor 8.11.1 → 8.11.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/client/dist/assets/{CodeBlockClient-DS1fk0Rx.js → CodeBlockClient-D0pEstG_.js} +3 -3
- package/client/dist/assets/{CodeBlockShiki-CGKoSyBj.js → CodeBlockShiki-wCnl92ep.js} +2 -2
- package/client/dist/assets/MarkDownRender-CmDu17Um.js +21 -0
- package/client/dist/assets/{angular-html-aheqMdMk.js → angular-html-BhNYtXig.js} +1 -1
- package/client/dist/assets/angular-html-CK1WWHDt.js +1 -0
- package/client/dist/assets/{angular-ts-DlJsg-G2.js → angular-ts-Bgx_YLtV.js} +1 -1
- package/client/dist/assets/angular-ts-C8ug4v3a.js +1 -0
- package/client/dist/assets/{astro-DXG5exNM.js → astro-DYrLNOPG.js} +1 -1
- package/client/dist/assets/astro-y-1FLQk4.js +1 -0
- package/client/dist/assets/bash-DpJpayxR.js +1 -0
- package/client/dist/assets/{blade-CmBPHJEL.js → blade-Dfkorpud.js} +1 -1
- package/client/dist/assets/{bundle-web-C2KIZLXm.js → bundle-web-D2G9azxz.js} +3 -3
- package/client/dist/assets/{c-Dm89f9Ef.js → c-CpNzQgpk.js} +1 -1
- package/client/dist/assets/{coffee-ChUMs2Ha.js → coffee-KdhmR0Jc.js} +1 -1
- package/client/dist/assets/{cpp-BwINwPPv.js → cpp-D7z-Apo4.js} +1 -1
- package/client/dist/assets/{css-BvA2HNhA.js → css-C6ZclOeb.js} +1 -1
- package/client/dist/assets/css-Cmh8zljs.js +1 -0
- package/client/dist/assets/{dist-SYbTHazR.js → dist-n6pPp0RM.js} +1 -1
- package/client/dist/assets/{glsl-CyUgkU2S.js → glsl-Bxr2wRsn.js} +1 -1
- package/client/dist/assets/{graphql-BVTK6P63.js → graphql-DJHGJiAR.js} +1 -1
- package/client/dist/assets/{haml-Bvc7zSLl.js → haml-DumorzfJ.js} +1 -1
- package/client/dist/assets/{handlebars-yYNTZyCi.js → handlebars-BO0dHGLY.js} +1 -1
- package/client/dist/assets/{html-Uv1uAV67.js → html-DForud47.js} +1 -1
- package/client/dist/assets/{html-derivative-C24lBMPW.js → html-derivative-Z7WXmgc6.js} +1 -1
- package/client/dist/assets/html-pB_zI3xu.js +1 -0
- package/client/dist/assets/{http-DFp2RFz4.js → http-Bfmo0JDx.js} +1 -1
- package/client/dist/assets/{hurl-8_1ds_zh.js → hurl-3nK2SwN4.js} +1 -1
- package/client/dist/assets/index-5Kjw-DcH.css +2 -0
- package/client/dist/assets/index-Czc2Opy7.js +185 -0
- package/client/dist/assets/{java-CK3ltn1g.js → java-CGrTGkCx.js} +1 -1
- package/client/dist/assets/javascript-D3ASMNZJ.js +1 -0
- package/client/dist/assets/{javascript-6vPVUSEC.js → javascript-DEVfd_Vl.js} +1 -1
- package/client/dist/assets/{jinja-Dt0feKUa.js → jinja-C0Kx117H.js} +1 -1
- package/client/dist/assets/{jison-CRopToZh.js → jison-DLA9JcAW.js} +1 -1
- package/client/dist/assets/json-BrXAD4tz.js +1 -0
- package/client/dist/assets/{json-Px-C8_wr.js → json-DDBMmHKe.js} +1 -1
- package/client/dist/assets/{jsx-Bc0EUP1q.js → jsx-AJ0nOAoK.js} +1 -1
- package/client/dist/assets/{julia-DKkF4PTS.js → julia-U2FSUeo8.js} +1 -1
- package/client/dist/assets/{marko-BMYSmb9g.js → marko-DYLVNorT.js} +1 -1
- package/client/dist/assets/{mdc-DjDBHxlS.js → mdc-DDEvUTfg.js} +1 -1
- package/client/dist/assets/{php-D67bub97.js → php-CLfMssyd.js} +1 -1
- package/client/dist/assets/{postcss-TtftD5KO.js → postcss-Djew7QkE.js} +1 -1
- package/client/dist/assets/{pug-Ch58hzvw.js → pug-BR3OiCd5.js} +1 -1
- package/client/dist/assets/purify.es-Dt2VzQ8a.js +3 -0
- package/client/dist/assets/{regexp-BHmDWhjP.js → regexp-By1KtQN-.js} +1 -1
- package/client/dist/assets/{scss-C4tYniM_.js → scss-CdrKidMU.js} +1 -1
- package/client/dist/assets/{shellscript-UHiJlB8C.js → shellscript-Bkjvv9So.js} +1 -1
- package/client/dist/assets/{sql-CHwZ3eO1.js → sql-BDSBVu7o.js} +1 -1
- package/client/dist/assets/{svelte-NB70J9HN.js → svelte-3PCQZaw_.js} +1 -1
- package/client/dist/assets/svelte-DSIdNSNr.js +1 -0
- package/client/dist/assets/{ts-tags-Cm-uoG3x.js → ts-tags-sxgQacaj.js} +1 -1
- package/client/dist/assets/tsx-Cqny-j0-.js +1 -0
- package/client/dist/assets/{tsx-CuUb9-eS.js → tsx-Det6Z5Px.js} +1 -1
- package/client/dist/assets/typescript-CGNFHgvh.js +1 -0
- package/client/dist/assets/{typescript-hSCEY_dK.js → typescript-DNfbWSrD.js} +1 -1
- package/client/dist/assets/vue-C79Phfa_.js +1 -0
- package/client/dist/assets/{vue-CxjdYHVn.js → vue-Dg-shDnh.js} +1 -1
- package/client/dist/assets/{vue-html-CBMbRWV8.js → vue-html-DsaM6WQP.js} +1 -1
- package/client/dist/assets/{vue-vine-nx8YDD_Z.js → vue-vine-Da9PT0kO.js} +1 -1
- package/client/dist/assets/{xml-0CUL-S9z.js → xml-B5IZiqvv.js} +1 -1
- package/client/dist/assets/xml-DErQV8xe.js +1 -0
- package/client/dist/index.html +2 -2
- package/package.json +14 -14
- package/server/dist/controllers/configuration.controller.cjs +0 -1
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +0 -1
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/routes/config.routes.cjs +0 -1
- package/server/dist/routes/config.routes.cjs.map +1 -1
- package/server/dist/routes/dictionary.routes.cjs +0 -1
- package/server/dist/routes/dictionary.routes.cjs.map +1 -1
- package/client/dist/assets/MarkDownRender--n2ByUQW.js +0 -21
- package/client/dist/assets/angular-html-vM6CvzKH.js +0 -1
- package/client/dist/assets/angular-ts-BZsrSiWx.js +0 -1
- package/client/dist/assets/astro-BdHyJYO2.js +0 -1
- package/client/dist/assets/bash-BAHcV25Z.js +0 -1
- package/client/dist/assets/css-7vD0jrNw.js +0 -1
- package/client/dist/assets/html-DRi518Zo.js +0 -1
- package/client/dist/assets/index-Djuh2DCk.js +0 -185
- package/client/dist/assets/index-Q9g9RwMw.css +0 -2
- package/client/dist/assets/javascript-DFn-6qHG.js +0 -1
- package/client/dist/assets/json-CuWI6k8S.js +0 -1
- package/client/dist/assets/purify.es-CnwPfwiY.js +0 -3
- package/client/dist/assets/svelte-Btsb6TLW.js +0 -1
- package/client/dist/assets/tsx-BWyWdAvN.js +0 -1
- package/client/dist/assets/typescript-BBHDxWDf.js +0 -1
- package/client/dist/assets/vue-CknQOCb6.js +0 -1
- package/client/dist/assets/xml-BVPGUw4L.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e}from"./index-
|
|
1
|
+
import{T as e}from"./index-Czc2Opy7.js";import{t}from"./java-CGrTGkCx.js";var n=e({default:()=>i}),r=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),i=[...t,r];export{n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./xml-B5IZiqvv.js";export{e as default};
|
package/client/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Czc2Opy7.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-5Kjw-DcH.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -93,17 +93,17 @@
|
|
|
93
93
|
"@fastify/formbody": "8.0.2",
|
|
94
94
|
"@fastify/helmet": "13.0.2",
|
|
95
95
|
"@fastify/static": "9.1.3",
|
|
96
|
-
"@intlayer/chokidar": "8.11.
|
|
97
|
-
"@intlayer/config": "8.11.
|
|
98
|
-
"@intlayer/unmerged-dictionaries-entry": "8.11.
|
|
96
|
+
"@intlayer/chokidar": "8.11.3",
|
|
97
|
+
"@intlayer/config": "8.11.3",
|
|
98
|
+
"@intlayer/unmerged-dictionaries-entry": "8.11.3",
|
|
99
99
|
"fastify": "5.8.5",
|
|
100
|
-
"fastify-intlayer": "8.11.
|
|
100
|
+
"fastify-intlayer": "8.11.3",
|
|
101
101
|
"mime": "4.1.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@intlayer/design-system": "8.11.
|
|
105
|
-
"@intlayer/editor-react": "8.11.
|
|
106
|
-
"@intlayer/types": "8.11.
|
|
104
|
+
"@intlayer/design-system": "8.11.3",
|
|
105
|
+
"@intlayer/editor-react": "8.11.3",
|
|
106
|
+
"@intlayer/types": "8.11.3",
|
|
107
107
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
108
108
|
"@tailwindcss/vite": "4.3.0",
|
|
109
109
|
"@tanstack/react-query": "5.100.14",
|
|
@@ -115,19 +115,19 @@
|
|
|
115
115
|
"autoprefixer": "10.5.0",
|
|
116
116
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
117
117
|
"framer-motion": "12.40.0",
|
|
118
|
-
"fuse.js": "7.
|
|
118
|
+
"fuse.js": "7.4.0",
|
|
119
119
|
"globals": "17.6.0",
|
|
120
|
-
"intlayer": "8.11.
|
|
121
|
-
"lucide-react": "1.
|
|
120
|
+
"intlayer": "8.11.3",
|
|
121
|
+
"lucide-react": "1.17.0",
|
|
122
122
|
"react": "19.2.6",
|
|
123
123
|
"react-dom": "19.2.6",
|
|
124
|
-
"react-intlayer": "8.11.
|
|
124
|
+
"react-intlayer": "8.11.3",
|
|
125
125
|
"react-router-dom": "7.15.0",
|
|
126
126
|
"tailwindcss": "4.3.0",
|
|
127
|
-
"tsdown": "0.22.
|
|
127
|
+
"tsdown": "0.22.1",
|
|
128
128
|
"typescript": "6.0.3",
|
|
129
129
|
"vite": "8.0.14",
|
|
130
|
-
"vite-intlayer": "8.11.
|
|
130
|
+
"vite-intlayer": "8.11.3",
|
|
131
131
|
"vitest": "4.1.7"
|
|
132
132
|
},
|
|
133
133
|
"engines": {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_utils_responseData = require('../utils/responseData.cjs');
|
|
4
3
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
5
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"configuration.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;CAClB,IAAI;EAGF,MAAM,oBAAoBA,0CAA+B,EACvD,kDAAW,EACb,CAAC;EAED,OAAO,IAAI,KAAK,iBAAiB;CACnC,SAAS,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;EACV;EAEA,MAAM,yBAAyBA,0CAA+B;GAC5D,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;GACT;GACA,QAAQ,aAAa,UAAU;EACjC,CAAC;EAED,OAAO,IAAI,KAAK,sBAAsB;CACxC;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_utils_responseData = require('../utils/responseData.cjs');
|
|
4
3
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
5
4
|
let node_path = require("node:path");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import { join } from 'node:path';\nimport {\n type DictionaryStatus,\n writeContentDeclaration as writeContentDeclarationEditor,\n} from '@intlayer/chokidar/build';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { clearModuleCache } from '@intlayer/config/utils';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport {\n getUnmergedDictionaries,\n type UnmergedDictionaries,\n} from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\nimport { t } from 'fastify-intlayer';\n\nexport type GetEditorDictionariesResult = ResponseData<UnmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<UnmergedDictionaries>({\n data: getUnmergedDictionaries(),\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<UnmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: FastifyRequest<{ Body: WriteContentDeclarationBody }>,\n res: FastifyReply\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n // Clear cache to hot reload the dictionaries\n const dictionariesPath = join(\n config.system.mainDir,\n `unmerged_dictionaries.cjs`\n );\n clearModuleCache(dictionariesPath);\n\n let description = '';\n\n switch (result.status) {\n case 'created': {\n description = t({\n en: 'Content declaration created successfully',\n fr: 'Déclaration de contenu créée avec succès',\n es: 'Declaración de contenido creada con éxito',\n });\n break;\n }\n\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description,\n }\n );\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dictionary.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import { join } from 'node:path';\nimport {\n type DictionaryStatus,\n writeContentDeclaration as writeContentDeclarationEditor,\n} from '@intlayer/chokidar/build';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { clearModuleCache } from '@intlayer/config/utils';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport {\n getUnmergedDictionaries,\n type UnmergedDictionaries,\n} from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\nimport { t } from 'fastify-intlayer';\n\nexport type GetEditorDictionariesResult = ResponseData<UnmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<UnmergedDictionaries>({\n data: getUnmergedDictionaries(),\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<UnmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: FastifyRequest<{ Body: WriteContentDeclarationBody }>,\n res: FastifyReply\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n // Clear cache to hot reload the dictionaries\n const dictionariesPath = join(\n config.system.mainDir,\n `unmerged_dictionaries.cjs`\n );\n clearModuleCache(dictionariesPath);\n\n let description = '';\n\n switch (result.status) {\n case 'created': {\n description = t({\n en: 'Content declaration created successfully',\n fr: 'Déclaration de contenu créée avec succès',\n es: 'Declaración de contenido creada con éxito',\n });\n break;\n }\n\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description,\n }\n );\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;;;;;;;AAqBA,MAAa,kBAAkB,OAC7B,MACA,QACkB;CAClB,IAAI;EACF,MAAM,oBAAoBA,0CAAqC,EAC7D,yEAA8B,EAChC,CAAC;EAED,OAAO,IAAI,KAAK,iBAAiB;CACnC,SAAS,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;EACV;EAEA,MAAM,yBAAyBA,0CAAqC;GAClE,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;GACT;GACA,QAAQ,aAAa,UAAU;EACjC,CAAC;EAED,OAAO,IAAI,KAAK,sBAAsB;CACxC;AACF;;;;AAaA,MAAa,0BAA0B,OACrC,KACA,QACkB;CAClB,IAAI;EACF,MAAM,iBAAiB,IAAI,KAAK;EAEhC,MAAM,qDAA0B;EAEhC,MAAM,SAAS,4DAAoC,gBAAgB,MAAM;EAOzE,iEAHE,OAAO,OAAO,SACd,2BAE8B,CAAC;EAEjC,IAAI,cAAc;EAElB,QAAQ,OAAO,QAAf;GACE,KAAK;IACH,sCAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;IACN,CAAC;IACD;GAGF,KAAK;IACH,sCAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;IACN,CAAC;IACD;GAEF,KAAK;IACH,sCAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;IACN,CAAC;IACD;GAEF,KAAK;IACH,sCAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;IACN,CAAC;IACD;GAEF;IACE,sCAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;IACN,CAAC;IACD;EAEJ;EAEA,MAAM,oBAAoBA,0CACxB;GACE,MAAM;GACN,iCAAW;IACT,IAAI;IACJ,IAAI;IACJ,IAAI;GACN,CAAC;GACD;EACF,CACF;EAEA,OAAO,IAAI,KAAK,iBAAiB;CACnC,SAAS,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;EACV;EAEA,QAAQ,MAAM,YAAY;EAE1B,MAAM,yBACJA,0CAAkD;GAChD,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;GACT;GACA,QAAQ,aAAa,UAAU;EACjC,CAAC;EAEH,OAAO,IAAI,KAAK,sBAAsB;CACxC;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_controllers_configuration_controller = require('../controllers/configuration.controller.cjs');
|
|
4
3
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
5
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.routes.cjs","names":[],"sources":["../../src/routes/config.routes.ts"],"sourcesContent":["import * as configurationController from '@controllers/configuration.controller';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { FastifyInstance } from 'fastify';\nimport type { Routes } from '@/types/Routes';\n\nconst { editor } = getConfiguration();\n\nconst getBaseURL = () => `${editor.editorURL}/api/dictionary`;\n\nexport const getConfigurationRoutes = () =>\n ({\n getConfiguration: {\n urlModel: '/',\n url: getBaseURL(),\n method: 'GET',\n },\n }) satisfies Routes;\n\nexport const configurationRouter = async (fastify: FastifyInstance) => {\n fastify.get(\n getConfigurationRoutes().getConfiguration.urlModel,\n configurationController.getConfiguration\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.routes.cjs","names":[],"sources":["../../src/routes/config.routes.ts"],"sourcesContent":["import * as configurationController from '@controllers/configuration.controller';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { FastifyInstance } from 'fastify';\nimport type { Routes } from '@/types/Routes';\n\nconst { editor } = getConfiguration();\n\nconst getBaseURL = () => `${editor.editorURL}/api/dictionary`;\n\nexport const getConfigurationRoutes = () =>\n ({\n getConfiguration: {\n urlModel: '/',\n url: getBaseURL(),\n method: 'GET',\n },\n }) satisfies Routes;\n\nexport const configurationRouter = async (fastify: FastifyInstance) => {\n fastify.get(\n getConfigurationRoutes().getConfiguration.urlModel,\n configurationController.getConfiguration\n );\n};\n"],"mappings":";;;;;AAKA,MAAM,EAAE,uDAA4B;AAEpC,MAAM,mBAAmB,GAAG,OAAO,UAAU;AAE7C,MAAa,gCACV,EACC,kBAAkB;CAChB,UAAU;CACV,KAAK,WAAW;CAChB,QAAQ;AACV,EACF;AAEF,MAAa,sBAAsB,OAAO,YAA6B;CACrE,QAAQ,IACN,uBAAuB,EAAE,iBAAiB,uEAE5C;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_controllers_dictionary_controller = require('../controllers/dictionary.controller.cjs');
|
|
4
3
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
5
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.routes.cjs","names":["getDictionaries","writeContentDeclaration"],"sources":["../../src/routes/dictionary.routes.ts"],"sourcesContent":["import {\n getDictionaries,\n writeContentDeclaration,\n} from '@controllers/dictionary.controller';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { FastifyInstance } from 'fastify';\nimport type { Routes } from '@/types/Routes';\n\nconst { editor } = getConfiguration();\n\nconst getBaseURL = () => `${editor.editorURL}/api/dictionary`;\n\nexport const getDictionaryRoutes = () =>\n ({\n getDictionaries: {\n urlModel: '/',\n url: getBaseURL(),\n method: 'GET',\n },\n writeContentDeclaration: {\n urlModel: '/',\n url: getBaseURL(),\n method: 'POST',\n },\n }) satisfies Routes;\n\nexport const dictionaryRouter = async (fastify: FastifyInstance) => {\n fastify.get(getDictionaryRoutes().getDictionaries.urlModel, getDictionaries);\n fastify.post(\n getDictionaryRoutes().writeContentDeclaration.urlModel,\n writeContentDeclaration\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dictionary.routes.cjs","names":["getDictionaries","writeContentDeclaration"],"sources":["../../src/routes/dictionary.routes.ts"],"sourcesContent":["import {\n getDictionaries,\n writeContentDeclaration,\n} from '@controllers/dictionary.controller';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { FastifyInstance } from 'fastify';\nimport type { Routes } from '@/types/Routes';\n\nconst { editor } = getConfiguration();\n\nconst getBaseURL = () => `${editor.editorURL}/api/dictionary`;\n\nexport const getDictionaryRoutes = () =>\n ({\n getDictionaries: {\n urlModel: '/',\n url: getBaseURL(),\n method: 'GET',\n },\n writeContentDeclaration: {\n urlModel: '/',\n url: getBaseURL(),\n method: 'POST',\n },\n }) satisfies Routes;\n\nexport const dictionaryRouter = async (fastify: FastifyInstance) => {\n fastify.get(getDictionaryRoutes().getDictionaries.urlModel, getDictionaries);\n fastify.post(\n getDictionaryRoutes().writeContentDeclaration.urlModel,\n writeContentDeclaration\n );\n};\n"],"mappings":";;;;;AAQA,MAAM,EAAE,uDAA4B;AAEpC,MAAM,mBAAmB,GAAG,OAAO,UAAU;AAE7C,MAAa,6BACV;CACC,iBAAiB;EACf,UAAU;EACV,KAAK,WAAW;EAChB,QAAQ;CACV;CACA,yBAAyB;EACvB,UAAU;EACV,KAAK,WAAW;EAChB,QAAQ;CACV;AACF;AAEF,MAAa,mBAAmB,OAAO,YAA6B;CAClE,QAAQ,IAAI,oBAAoB,EAAE,gBAAgB,UAAUA,yDAAe;CAC3E,QAAQ,KACN,oBAAoB,EAAE,wBAAwB,UAC9CC,iEACF;AACF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/bundle-web-C2KIZLXm.js","assets/index-Djuh2DCk.js","assets/index-Q9g9RwMw.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{C as e,E as t,S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b,v as x,w as S,x as C,y as w}from"./index-Djuh2DCk.js";import{t as T}from"./CodeBlockClient-DS1fk0Rx.js";var E={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},D={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},O=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),k={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},A=[`style`,`script`,`pre`],j=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],M=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,N=/\n{2,}$/,P=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ee=/^ *> ?/gm,F=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,I=/^ {2,}\n/,L=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,R=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,z=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,te=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,ne=/^(?:\n *)*\n/,re=/\r\n?/g,ie=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ae=/^\[\^([^\]]+)]/,oe=/\f/g,se=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,ce=/^\s*?\[(x|\s)\]/,le=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ue=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,de=/^([^\n]+)\n *(=|-)\2{2,} *\n/,fe=/^ *(?!<[a-zA-Z][^ >/]* ?\/>)<([a-zA-Z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,pe=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,me=/^<!--[\s\S]*?(?:-->)/,he=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,ge=/^ *<([a-zA-Z][a-zA-Z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,_e=/^ *<([A-Z][a-zA-Z0-9]*)(?:\s+((?:<.*?>|[^>])*))?>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/,ve=/^\{.*\}$/,ye=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,be=/^<([^ >]+[:@/][^ >]+)>/,xe=/-([a-z])?/gi,Se=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Ce=/(^ *\||\| *$)/g,we=/^ *:-+: *$/,Te=/^ *:-+ *$/,Ee=/^ *-+: *$/,De=/^[^\n]+(?: {2}\n|\n{2,})/,Oe=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,ke=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Ae=/^\[([^\]]*)\] ?\[([^\]]*)\]/,je=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Me=/\t/g,Ne=/^\n+/,Pe=/^\n*([ \t]*)/,Fe=/(?:^|\n)( *)$/,Ie=`(?:\\d+\\.)`,Le=`(?:[*+-])`,Re=/^\\([^0-9A-Za-z\s])/,ze=/\\([^0-9A-Za-z\s])/g,Be=/^[\s\S](?:(?! {2}\n|[0-9]\.|http)[^=*_~\-\n:<`\\[!])*/,Ve=/^(:[a-zA-Z0-9-_]+:)/,B=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,V="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",He=RegExp(`^([*_])\\1${B(1)}${V}\\1\\1(?!\\1)`),Ue=RegExp(`^([*_])${B(0)}${V}\\1(?!\\1)`),We=RegExp(`^(==)${B(0)}${V}\\1`),Ge=RegExp(`^(~~)${B(0)}${V}\\1`),Ke=e=>`( *)(`+(e===1?Ie:Le)+`) +`,qe=Ke(1),Je=Ke(2),Ye=e=>RegExp(`^`+(e===1?qe:Je)),Xe=Ye(1),Ze=Ye(2),Qe=e=>RegExp(`^`+(e===1?qe:Je)+`[^\\n]*(?:\\n(?!\\1`+(e===1?Ie:Le)+` )[^\\n]*)*(\\n|$)`,`gm`),$e=Qe(1),et=Qe(2),tt=e=>{let t=e===1?Ie:Le;return RegExp(`^( *)(`+t+`) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*\\n*$)`)},nt=tt(1),rt=tt(2),H=e=>{let t=e.length;for(;t>0&&e[t-1]<=` `;)t--;return e.slice(0,t)},it=(e,t)=>e.startsWith(t),at=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},U=e=>e&&e.replace(ze,`$1`),ot=(...e)=>e.filter(Boolean).join(` `),st=(e,t,n)=>{let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},ct=e=>e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,`a`).replace(/[çÇ]/g,`c`).replace(/[ðÐ]/g,`d`).replace(/[ÈÉÊËéèêë]/g,`e`).replace(/[ÏïÎîÍíÌì]/g,`i`).replace(/[Ññ]/g,`n`).replace(/[øØœŒÕõÔôÓóÒò]/g,`o`).replace(/[ÜüÛûÚúÙù]/g,`u`).replace(/[ŸÿÝý]/g,`y`).replace(/[^a-z0-9- ]/gi,``).replace(/ /gi,`-`).toLowerCase(),lt=/(javascript|vbscript|data(?!:image)):/i,ut=e=>{try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(lt.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},dt=e=>{let t=performance.now(),n=e.replace(re,`
|
|
3
|
-
`).replace(oe,``).replace(Me,` `),r=performance.now()-t;return r>20&&console.log(`normalizeWhitespace: ${r.toFixed(3)}ms, source length: ${e.length}`),n},ft=(e,t)=>{let n=performance.now();if(!t)return e;let r=e.split(`
|
|
4
|
-
`),i=r.map(e=>e.startsWith(t)?e.slice(t.length):e).join(`
|
|
5
|
-
`),a=performance.now()-n;return a>20&&console.log(`trimLeadingWhitespaceOutsideFences: ${a.toFixed(3)}ms, text length: ${e.length}, lines count: ${r.length}`),i},pt=e=>(e.indexOf(`-`)!==-1&&e.match(he)===null&&(e=e.replace(xe,(e,t)=>t.toUpperCase())),e),mt=e=>{let t=performance.now(),n=[],r=``,i=!1,a=!1,o=``;if(!e)return n;for(let t=0;t<e.length;t++){let s=e[t];if((s===`"`||s===`'`)&&!i&&(a?s===o&&(a=!1,o=``):(a=!0,o=s)),s===`(`&&r.endsWith(`url`)?i=!0:s===`)`&&i&&(i=!1),s===`;`&&!a&&!i){let e=r.trim();if(e){let t=e.indexOf(`:`);if(t>0){let r=e.slice(0,t).trim(),i=e.slice(t+1).trim();n.push([r,i])}}r=``}else r+=s}let s=r.trim();if(s){let e=s.indexOf(`:`);if(e>0){let t=s.slice(0,e).trim(),r=s.slice(e+1).trim();n.push([t,r])}}let c=performance.now()-t;return c>20&&console.log(`parseStyleAttribute: ${c.toFixed(3)}ms, styleString length: ${e.length}, styles count: ${n.length}`),n},ht=(e,t,n,r)=>t===`style`?mt(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):j.indexOf(t)===-1?(n.match(ve)&&(n=U(n.slice(1,n.length-1))),n===`true`?!0:n===`false`?!1:n):r(U(n),e,t),gt=e=>Ee.test(e)?`right`:we.test(e)?`center`:(Te.test(e),`left`),_t=e=>e.replace(Ce,``).split(`|`).map(gt),vt=(e,t,n,r)=>{let i=performance.now(),a=n.inTable;n.inTable=!0;let o=[[]],s=``,c=()=>{if(!s)return;let e=o[o.length-1];e.push.apply(e,t(s,n)),s=``};e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,t,n)=>{if(e.trim()===`|`&&(c(),r)){t!==0&&t!==n.length-1&&o.push([]);return}s+=e}),c(),n.inTable=a;let l=performance.now()-i;return l>20&&console.log(`parseTableRow: ${l.toFixed(3)}ms, source length: ${e.length}, cells count: ${o.length}`),o},yt=(e,t,n)=>{let r=performance.now(),i=e.trim().split(`
|
|
6
|
-
`),a=i.map(e=>vt(e,t,n,!0)),o=performance.now()-r;return o>20&&console.log(`parseTableCells: ${o.toFixed(3)}ms, source length: ${e.length}, rows count: ${i.length}`),a},bt=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(it(e,n[t]))return!0;return!1}return n(e,t)},W=e=>(e.inline=1,e),G=e=>W((t,n)=>n.inline?e.exec(t):null),K=e=>W((t,n)=>n.inline||n.simple?e.exec(t):null),q=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),J=e=>W((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),Y=(e,t,n)=>{let r=performance.now(),i=n.inline??!1,a=n.simple??!1;n.inline=!0,n.simple=!0;let o=e(t,n);n.inline=i,n.simple=a;let s=performance.now()-r;return s>20&&console.log(`parseInline: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},xt=(e,t,n)=>{let r=performance.now(),i=n.inline??!1,a=n.simple??!1;n.inline=!1,n.simple=!0;let o=e(t,n);n.inline=i,n.simple=a;let s=performance.now()-r;return s>20&&console.log(`parseSimpleInline: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},St=(e,t,n={})=>{let r=performance.now(),i=n.inline||!1;n.inline=!1;let a=H(t),o=e(/\n\n$/.test(a)===!1?a.endsWith(`
|
|
7
|
-
`)?`${a}\n`:`${a}\n\n`:a,n);n.inline=i;let s=performance.now()-r;return s>20&&console.log(`parseBlock: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},Ct=(e,t,n)=>({children:Y(t,e[2],n)}),wt=()=>({}),Tt=()=>null,Et=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1},Dt=e=>{let t=performance.now(),n=Object.keys(e);n.forEach(t=>{let n=e[t]._order;(typeof n!=`number`||!Number.isFinite(n))&&console.warn(`intlayer: Invalid order for rule \`${t}\`: ${n}`)}),n.sort((t,n)=>e[t]._order-e[n]._order||t-+n);let r=(t,i={})=>{let a=performance.now(),o=[];if(i.prevCapture=i.prevCapture||``,t.trim())for(;t;){let a=0;for(;a<n.length;){let s=n[a],c=e[s];if(c._qualify&&!bt(t,i,c._qualify)){a++;continue}let l=performance.now(),u=c._match(t,i),d=performance.now()-l;if(d>1&&console.log(`${s}._match: ${d.toFixed(3)}ms, source length: ${t.length}`),u?.[0]){t=t.substring(u[0].length);let e=performance.now(),n=c._parse(u,r,i),a=performance.now()-e;a>1&&console.log(`${s}._parse: ${a.toFixed(3)}ms, capture length: ${u[0].length}`),i.prevCapture=(i.prevCapture||``)+u[0],n.type||=s,o.push(n);break}a++}}let s=performance.now()-a;return s>1&&console.log(`nestedParse: ${s.toFixed(3)}ms, source length: ${t.length}, result count: ${o.length}`),o},i=performance.now()-t;return i>20&&console.log(`parserFor: ${i.toFixed(3)}ms, rules count: ${n.length}`),(e,t)=>r(dt(e),t)},Ot=e=>(t,n={})=>{let r=performance.now(),i=(t,n={})=>Ot(e)(t,n);if(Array.isArray(t)){let e=n.key,a=[],o=!1,s=0;for(let e=0;e<t.length;e++){let r=i(t[e],{...n,key:s}),c=typeof r==`string`;c&&o?a[a.length-1]=a[a.length-1]+r:r!==null&&(a.push(r),s++),o=c}n.key=e;let c=performance.now()-r;return c>20&&console.log(`renderFor (array): ${c.toFixed(3)}ms, ast length: ${t.length}`),a}let a=e(t,i,n),o=performance.now()-r;return o>20&&console.log(`renderFor (single): ${o.toFixed(3)}ms, ast type: ${t.type}`),a},kt=(e,t)=>(n,r,i)=>{let a=performance.now(),o=e[n.type]?._render,s=t?t(()=>o?.(n,r,i),n,r,i):o?.(n,r,i),c=performance.now()-a;return c>20&&console.log(`createRenderer: ${c.toFixed(3)}ms, ast type: ${n.type}, hasUserRender: ${!!t}`),s},At=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,jt=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Mt=(e,t)=>{if(typeof e!=`string`)return e;let n=st(t,e);if(!n&&typeof e==`string`){let r=e.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===r);i&&(n=st(t,i))}return n||e},Nt=(e,t)=>{let{runtime:n,components:r={}}=e,i=t.tagfilter?[`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]:[];return(e,t,...a)=>{if(typeof e==`string`&&i.includes(e.toLowerCase()))return null;let o=typeof e==`string`,s=ot(t?.className,t?.class),c={},l=!1;if(t)for(let e in t){let n=t[e];n!=null&&(e===`className`||e===`class`?l||=(s&&(c.className=s),!0):c[e]=n)}!l&&s&&(c.className=s);let u=c;n.normalizeProps&&o&&(u=n.normalizeProps(e,c));let d=Mt(e,r);return n.createElement(d,u,...a.length===1?[a[0]]:a)}},Pt=(e,t,n,r,i,a,o,s)=>{let c=e=>t.slugify?t.slugify(e,ct):ct(e),l=t.sanitizer??ut,u=t.namedCodesToUnicode?{...k,...t.namedCodesToUnicode}:k,d=t=>{let n=t===1,r=n?nt:rt,i=n?$e:et,a=n?Xe:Ze;return{_qualify:e=>a.test(e),_match:W((e,t)=>{let n=Fe.exec(t.prevCapture??``),i=t.list??(!t.inline&&!t.simple);if(n&&i){let t=(n[1]||``)+e;return r.exec(t)}return null}),_order:D.HIGH,_parse(e,t,r){let o=e[2],s=n?+o.slice(0,-1):void 0,c=e[0].replace(N,`
|
|
8
|
-
`).match(i);if(!c)return{items:[],ordered:n,start:s};let l=!1;return{items:c.map((e,n)=>{let i=a.exec(e),o=i?i[0].length:0,s=RegExp(`^ {1,${o}}`,`gm`),u=e.replace(s,``).replace(a,``),d=n===c.length-1,f=u.indexOf(`
|
|
9
|
-
|
|
10
|
-
`)!==-1||d&&l;l=f;let p=r.inline,m=r.list;r.list=!0;let h;f?(r.inline=!1,h=`${H(u)}\n\n`):(r.inline=!0,h=H(u));let g=t(h,r);return r.inline=p,r.list=m,g}),ordered:n,start:s}},_render(t,n,r={}){let i=t.ordered?`ol`:`ul`,a={key:r.key};return t.ordered&&t.start!=null&&(a.start=t.start),e(i,a,...t.items.map((t,i)=>e(`li`,{key:i},n(t,r))))}}},f=(e,t)=>{if(t.inline||t.simple||t.inHTML&&e.indexOf(`
|
|
11
|
-
|
|
12
|
-
`)===-1&&t.prevCapture?.indexOf(`
|
|
13
|
-
|
|
14
|
-
`)===-1)return null;let n=0;for(;;){let t=e.indexOf(`
|
|
15
|
-
`,n),r=e.slice(n,t===-1?void 0:t+1);if(Et(s,r)||t===-1||!r.trim())break;n=t+1}let r=e.slice(0,n);if(r===``)return null;let i=H(r);return i===``?null:[r,void 0,i]};return{[E.blockQuote]:{_qualify:[`>`],_match:q(P),_order:D.HIGH,_parse(e,t,n){let r=e[0].replace(ee,``).match(F),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
16
|
-
`)===-1?Y(t,a,n):St(t,a,n)}},_render(t,n,r={}){let i={key:r.key};return t.alert&&(i.className=`markdown-alert-${c(t.alert.toLowerCase())}`,t.children.unshift({attrs:{},children:[{type:E.text,text:t.alert}],noInnerParse:!0,type:E.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[E.breakLine]:{_qualify:[` `],_match:J(I),_order:D.HIGH,_parse:wt,_render(t,n,r={}){return e(`br`,{key:r.key})}},[E.breakThematic]:{_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:q(L),_order:D.HIGH,_parse:wt,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[E.codeBlock]:{_qualify:[` `],_match:q(z),_order:D.MAX,_parse(e){return{type:E.codeBlock,lang:void 0,text:U(H(e[0].replace(/^ {4}/gm,``)))}},_render(t,n,r={}){let i={...t.attrs??{}},a=t.lang?`lang-${t.lang}`:`lang-plaintext`;return i.className=i.className?`${i.className} ${a}`:a,t.lang&&!i.lang&&(i.lang=t.lang),e(`pre`,{key:r.key},e(`code`,i,t.text))}},[E.codeFenced]:{_qualify:["```",`~~~`],_match:q(R),_order:D.MAX,_parse(e){return{attrs:a(`code`,e[3]??``),lang:e[2]||void 0,text:e[4],type:E.codeBlock}}},[E.codeInline]:{_qualify:["`"],_match:K(te),_order:D.LOW,_parse(e){return{text:U(e[2])}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[E.footnote]:{_qualify:[`[^`],_match:q(ie),_order:D.MAX,_parse(e){return r.push({footnote:e[2],identifier:e[1]}),{}},_render:Tt},[E.footnoteReference]:{_qualify:[`[^`],_match:G(ae),_order:D.HIGH,_parse(e){return{target:`#${c(e[1])}`,text:e[1]}},_render(t,n,r={}){return e(`a`,{key:r.key,href:l(t.target,`a`,`href`)??void 0},e(`sup`,{key:r.key},t.text))}},[E.gfmTask]:{_qualify:[`[ ]`,`[x]`],_match:G(ce),_order:D.HIGH,_parse(e){return{completed:e[1].toLowerCase()===`x`}},_render(t,n,r={}){return e(`input`,{checked:t.completed,key:r.key,readOnly:!0,type:`checkbox`})}},[E.heading]:{_qualify:[`#`],_match:q(n.enforceAtxHeadings?ue:le),_order:D.HIGH,_parse(e,t,n){return{children:Y(t,e[2],n),id:c(e[2]),level:e[1].length}},_render(t,n,r={}){return e(`h${t.level}`,{id:t.id,key:r.key},n(t.children,r))}},[E.headingSetext]:{_qualify:e=>{let t=e.indexOf(`
|
|
17
|
-
`);return t>0&&t<e.length-1&&(e[t+1]===`=`||e[t+1]===`-`)},_match:q(de),_order:D.MAX,_parse(e,t,n){return{children:Y(t,e[1],n),level:e[2]===`=`?1:2,type:E.heading}}},[E.htmlBlock]:{_qualify:e=>{if(n.disableParsingRawHTML)return!1;let t=e.match(/^ *<([a-z][a-z0-9:-]*)\b/i);if(!t)return!1;let r=t[1];return e.toLowerCase().indexOf(`</${r.toLowerCase()}>`)!==-1},_match:J(fe),_order:D.HIGH,_parse(e,t,n){let r=e[3].match(Pe)?.[1]??``,i=ft(e[3],r),s=o(i)?St:Y,c=e[1].trim(),l=A.indexOf(c.toLowerCase())!==-1,u=l?c.toLowerCase():c,d={attrs:a(u,e[2]??``),noInnerParse:l,tag:u};if(n.inAnchor=n.inAnchor||c.toLowerCase()===`a`,l)d.text=e[3];else{let e=n.inHTML;n.inHTML=!0,d.children=s(t,i,n),n.inHTML=e}return n.inAnchor=!1,d},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[E.htmlComment]:{_qualify:[`<!`],_match:J(me),_order:D.HIGH,_parse:wt,_render:Tt},[E.htmlSelfClosing]:{_qualify:e=>n.disableParsingRawHTML?!1:/^ *<([a-zA-Z][a-zA-Z0-9:]*)[\s>/]/.test(e),_match:J(ge),_order:D.HIGH,_parse(e){let t=e[1].trim();return{attrs:a(t,e[2]||``),tag:t}},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}})}},[E.customComponent]:{_qualify:e=>/^ *<([A-Z][a-zA-Z0-9]*)/.test(e),_match:J(_e),_order:D.MAX,_parse(e,t,n){let r=e[3].match(Pe)?.[1]??``,i=ft(e[3],r),s=o(i)?St:Y,c=e[1].trim(),l={attrs:a(c,e[2]??``),noInnerParse:!1,tag:c},u=n.inHTML;return n.inHTML=!0,l.children=s(t,i,n),n.inHTML=u,l},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[E.paragraph]:{_match:f,_order:D.LOW,_parse:Ct,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[E.image]:{_qualify:[`![`],_match:K(At),_order:D.HIGH,_parse(e){return{alt:U(e[1]),target:U(e[2]),title:U(e[3])}},_render(t,n,r={}){return e(`img`,{key:r.key,alt:t.alt??void 0,title:t.title??void 0,src:l(t.target,`img`,`src`)??void 0})}},[E.link]:{_qualify:[`[`],_match:G(jt),_order:D.LOW,_parse(e,t,n){return{children:xt(t,e[1],n),target:U(e[2]),title:U(e[3])}},_render(t,n,r={}){let i=l(t.target,`a`,`href`);return e(`a`,{key:r.key,href:i??void 0,title:t.title??void 0},n(t.children,r))}},[E.linkAngleBraceStyleDetector]:{_qualify:[`<`],_match:G(be),_order:D.MAX,_parse(e){let t=e[1],n=!1;return t.indexOf(`@`)!==-1&&t.indexOf(`//`)===-1&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:E.text}],target:n?`mailto:${t}`:t,type:E.link}}},[E.linkBareUrlDetector]:{_qualify:(e,t)=>!!(t.inline&&!t.inAnchor&&!n.disableAutoLink&&(it(e,`http://`)||it(e,`https://`))),_match:G(ye),_order:D.MAX,_parse(e){return{children:[{text:e[1],type:E.text}],target:e[1],type:E.link}}},[E.newlineCoalescer]:{_match:q(ne),_order:D.LOW,_parse:wt,_render(){return`
|
|
18
|
-
`}},[E.orderedList]:d(1),[E.unorderedList]:d(2),[E.ref]:{_qualify:[`[`],_match:J(Oe),_order:D.MAX,_parse(e){return i[e[1]]={target:e[2],title:e[4]},{}},_render:Tt},[E.refImage]:{_qualify:[`![`],_match:K(ke),_order:D.MAX,_parse(e){return{alt:e[1]?U(e[1]):void 0,ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`img`,{key:r.key,alt:t.alt,src:l(a.target,`img`,`src`)??void 0,title:a.title}):null}},[E.refLink]:{_qualify:e=>e[0]===`[`&&e.indexOf(`](`)===-1,_match:G(Ae),_order:D.MAX,_parse(e,t,n){return{children:xt(t,e[1],n),fallbackChildren:e[0],ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`a`,{key:r.key,href:l(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,r)):e(`span`,{key:r.key},t.fallbackChildren)}},[E.table]:{_qualify:[`|`],_match:q(Se),_order:D.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?_t(e[2]):[],i=e[3]?yt(e[3],t,n):[],a=vt(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:E.table}:{children:a.flat(),type:E.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,null,e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,null,...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[E.tableSeparator]:{_match:(e,t)=>t.inTable&&e[0]===`|`?/^\|/.exec(e):null,_order:D.HIGH,_parse(){return{type:E.tableSeparator}},_render(){return` | `}},[E.text]:{_match:W((e,t)=>Ve.exec(e)||Be.exec(e)||/^[\s\S]/.exec(e)),_order:D.MIN,_parse(e){let t=e[0];return{text:t.indexOf(`&`)===-1?t:t.replace(pe,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):u[t]||e)}},_render(e){return e.text}},[E.textBolded]:{_qualify:[`**`,`__`],_match:K(He),_order:D.MED,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[E.textEmphasized]:{_qualify:[`*`,`_`],_match:K(Ue),_order:D.LOW,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[E.textEscaped]:{_qualify:[`\\`],_match:K(Re),_order:D.HIGH,_parse(e){return{text:e[1],type:E.text}}},[E.textMarked]:{_qualify:[`==`],_match:K(We),_order:D.LOW,_parse:Ct,_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[E.textStrikethroughed]:{_qualify:[`~~`],_match:K(Ge),_order:D.LOW,_parse:Ct,_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},Ft=(e=``,t,n={})=>{let r=t.components??{},i=e=>t.slugify?t.slugify(e,ct):ct(e),a=Nt(t,n),o=[],s={},c=(e,n)=>{if(!n?.trim())return null;let r=n.match(M);return r?r.reduce((n,r)=>{let i=r.indexOf(`=`);if(i!==-1){let a=pt(r.slice(0,i)).trim(),o=at(r.slice(i+1).trim()),s=O[a]??a;if(s===`ref`)return n;n[s]=ht(e,a,o,t.sanitizer??ut),typeof n[s]==`string`&&(fe.test(n[s])||ge.test(n[s]))&&(n[s]=m(n[s].trim()))}else r!==`style`&&(n[O[r]??r]=!0);return n},{}):null},l=[P,R,z,n.enforceAtxHeadings?ue:le,de,Se,nt,rt,_e],u=Pt(a,t,n,o,s,c,e=>{let t=e.replace(Ne,``),r=t.length>2048?t.slice(0,2048):t;return r.indexOf(`
|
|
19
|
-
|
|
20
|
-
`)===-1?Et(n.disableParsingRawHTML?l:[...l,De,fe,me,ge,_e],r):!0},l),d=n.disableParsingRawHTML?Object.keys(u).reduce((e,t)=>(t!==E.htmlBlock&&t!==E.htmlSelfClosing&&(e[t]=u[t]),e),{}):u,f=Dt(d),p=Ot(kt(d,n.renderRule)),m=e=>{let t=n.preserveFrontmatter?e:e.replace(se,``),i=n.forceInline||!n.forceBlock&&je.test(t.replace(Ne,``))===!1,o=p(f(i?t:`${H(t).replace(Ne,``)}\n\n`,{inline:i}),{inline:i});for(;typeof o[o.length-1]==`string`&&!o[o.length-1].trim();)o.pop();if(n.wrapper===null)return o;let s=n.wrapper??(i?`span`:`div`);if(o.length>1||n.forceWrapper)return a(s,{key:`outer`},o);if(o.length===1){let e=o[0];if(typeof e==`string`){let t={key:`outer`};if(!i&&r){let n=st(r,`p.props`,{})??{},i=ot(t.className,n.className),o={...t,...n};return i&&(o.className=i),a(`span`,o,e)}return a(`span`,t,e)}return e}return a(s,{key:`outer`},null)};if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let h=m(e);return o.length?a(`div`,null,h,a(`footer`,{key:`footer`},...o.map(e=>a(`div`,{id:i(e.identifier),key:e.identifier},e.identifier,p(f(e.footnote,{inline:!0}),{inline:!0}))))):h},X=t(S(),1),It={createElement:X.createElement,cloneElement:X.cloneElement,Fragment:X.Fragment,normalizeProps:(e,t)=>t},Lt=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t;return Ft(e,{runtime:n?{...It,createElement:n}:It,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},{disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g})},Z=e(),Q=n(),Rt=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>Lt(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),zt=r(`move-diagonal`,[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]),Bt=e=>{let t=(0,Z.c)(38),{enable:n,onSwipeLeft:r,onSwipeRight:i,itemIndex:a,itemCount:o,thresholdPct:s,touchAction:c,disableWhenSelectingText:l}=e,u=n===void 0?!0:n,d=s===void 0?20:s,f=c===void 0?`pan-y`:c,p=l===void 0?!0:l,m=(0,X.useRef)(null),[h,g]=(0,X.useState)(!1),[_,v]=(0,X.useState)(0),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1},t[0]=y):y=t[0];let b=(0,X.useRef)(y),x=(0,X.useRef)(!1),S;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{let e=m.current;return e?e.clientWidth:0},t[1]=S):S=t[1];let C=S,w;t[2]!==o||t[3]!==a?(w=e=>{let t=a<=0,n=a>=o-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},t[2]=o,t[3]=a,t[4]=w):w=t[4];let T=w,E;t[5]===u?E=t[6]:(E=e=>{u&&b.current.pointerId===null&&(b.current.pointerId=e.pointerId,b.current.startX=e.clientX,b.current.startY=e.clientY,b.current.lastX=e.clientX,b.current.axisLocked=!1,b.current.isHorizontal=!1,x.current=!1,g(!1),v(0))},t[5]=u,t[6]=E);let D=E,O;t[7]!==T||t[8]!==p||t[9]!==u||t[10]!==h?(O=e=>{if(!u||b.current.pointerId!==e.pointerId)return;let t=C();if(!t)return;let n=e.clientX-b.current.startX,r=e.clientY-b.current.startY;if(p){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){x.current=!0;return}}if(!b.current.axisLocked){let e=Math.abs(n),t=Math.abs(r);(e>6||t>6)&&(b.current.axisLocked=!0,b.current.isHorizontal=e>t)}if(b.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),h||g(!0),v(T(n/t*100)),b.current.lastX=e.clientX}},t[7]=T,t[8]=p,t[9]=u,t[10]=h,t[11]=O):O=t[11];let k=O,A;t[12]!==_||t[13]!==r||t[14]!==i||t[15]!==d?(A=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=b.current.isHorizontal,n=_;if(g(!1),v(0),b.current.pointerId=null,b.current.axisLocked=!1,b.current.isHorizontal=!1,x.current){x.current=!1;return}t&&(n>d?i?.():n<-d&&r?.())},t[12]=_,t[13]=r,t[14]=i,t[15]=d,t[16]=A):A=t[16];let j=A,M;t[17]!==u||t[18]!==j?(M=e=>{u&&b.current.pointerId===e.pointerId&&j(e)},t[17]=u,t[18]=j,t[19]=M):M=t[19];let N=M,P;t[20]!==u||t[21]!==j?(P=e=>{u&&b.current.pointerId===e.pointerId&&j(e)},t[20]=u,t[21]=j,t[22]=P):P=t[22];let ee=P,F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>{v(0),g(!1)},t[23]=F):F=t[23];let I;t[24]===a?I=t[25]:(I=[a],t[24]=a,t[25]=I),(0,X.useEffect)(F,I);let L;t[26]===f?L=t[27]:(L={touchAction:f},t[26]=f,t[27]=L);let R;t[28]!==ee||t[29]!==D||t[30]!==k||t[31]!==N||t[32]!==L?(R={ref:m,onPointerDown:D,onPointerMove:k,onPointerUp:N,onPointerCancel:ee,style:L},t[28]=ee,t[29]=D,t[30]=k,t[31]=N,t[32]=L,t[33]=R):R=t[33];let z;return t[34]!==_||t[35]!==h||t[36]!==R?(z={containerRef:m,isDragging:h,dragDeltaPct:_,containerProps:R},t[34]=_,t[35]=h,t[36]=R,t[37]=z):z=t[37],z};function Vt(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var Ht=e=>{let t=(0,Z.c)(2),{src:n,className:r,title:i,...a}=e,[o,c]=(0,X.useState)(!1),{href:f,label:p}=Vt(n),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>c(!0),t[0]=m):m=t[0];let h;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>c(!1),t[1]=h):h=t[1],(0,Q.jsxs)(l,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,Q.jsx)(`iframe`,{...a,src:n,title:i,className:w(`block max-h-[80vh] min-h-[12rem] w-full border-0`,r)}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-neutral/30 border-t bg-card/40 px-3 py-1`,children:[f?(0,Q.jsx)(s,{href:f,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-neutral text-xs underline-offset-2 hover:text-text hover:underline`,children:p}):(0,Q.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,Q.jsx)(u,{variant:`hoverable`,size:`icon-md`,onClick:m,label:`Open embedded page in fullscreen`,Icon:zt})]}),(0,Q.jsx)(d,{isOpen:o,onClose:h,size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&n?(0,Q.jsx)(l,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,Q.jsx)(`iframe`,{...a,src:n,title:i??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},Ut=(0,X.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),$=()=>(0,X.useContext)(Ut),Wt=e=>{let t=(0,Z.c)(8),{children:n}=e,[r,i]=g(`packageManager`,`npm`),[a,o]=g(`codeFormat`,`typescript`),[s,c]=g(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,Q.jsx)(Ut,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},Gt={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},Kt=700,qt=({isRollable:e=!0,minHeight:t=Kt,children:n,className:r})=>{let[i,o]=(0,X.useState)(0),[s,c]=(0,X.useState)(!0),l=(0,X.useRef)(null),{expandCollapseContent:u}=a(Gt),d=i>t;return(0,X.useLayoutEffect)(()=>{let e=()=>{l.current&&o(l.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?d?(0,Q.jsxs)(p,{isHidden:s,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,Q.jsx)(`div`,{className:w(`grid w-full`,r),ref:l,children:n}),(0,Q.jsx)(`button`,{className:w(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,s?`w-full`:`w-32`),type:`button`,onClick:()=>c(e=>!e),children:u(s)})]}):(0,Q.jsx)(`div`,{className:w(`grid w-full`,r),ref:l,children:n}):n},Jt=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},Yt=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,X.useState)(null),o=(0,X.useRef)(null);(0,X.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=Jt(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await C(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(String(e),n),c=Jt(a(t,n))}let{codeToHtml:l}=await C(async()=>{let{codeToHtml:e}=await import(`./bundle-web-C2KIZLXm.js`);return{codeToHtml:e}},__vite__mapDeps([0,1,2]));if(i)return;let u=await l(String(s),{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,Q.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,Q.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,Q.jsx)(`code`,{children:e})})},Xt=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},Zt=e=>{let t=(0,Z.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=$(),s=r.packageManager===void 0,c=i===r.packageManager,l=Xt(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=Xt(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(Q.Fragment,{}),t[0]=h):h=t[0],h},Qt={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]},$t=e=>{let t=(0,Z.c)(11),{availableFormats:n}=e,{codeFormat:r,setCodeFormat:i,setContentDeclarationFormat:o}=$(),s=a(Qt),l;t[0]===n?l=t[1]:(l=e=>!n||n.includes(e),t[0]=n,t[1]=l);let u=l,d;t[2]!==i||t[3]!==o?(d=e=>{i(e),o(e)},t[2]=i,t[3]=o,t[4]=d):d=t[4];let f;return t[5]!==r||t[6]!==s.codeFormat.label.value||t[7]!==s.codeFormat.placeholder.value||t[8]!==u||t[9]!==d?(f=(0,Q.jsxs)(c,{value:r,onValueChange:d,children:[(0,Q.jsx)(c.Trigger,{className:`py-1!`,"aria-label":s.codeFormat.label.value,children:(0,Q.jsx)(c.Value,{placeholder:s.codeFormat.placeholder.value})}),(0,Q.jsxs)(c.Content,{children:[u(`typescript`)&&(0,Q.jsx)(c.Item,{value:`typescript`,children:`TypeScript`}),u(`esm`)&&(0,Q.jsx)(c.Item,{value:`esm`,children:`ESM`}),u(`commonjs`)&&(0,Q.jsx)(c.Item,{value:`commonjs`,children:`CommonJS`})]})]}),t[5]=r,t[6]=s.codeFormat.label.value,t[7]=s.codeFormat.placeholder.value,t[8]=u,t[9]=d,t[10]=f):f=t[10],f},en=()=>{let e=(0,Z.c)(5),{contentDeclarationFormat:t,setContentDeclarationFormat:n}=$(),r=a(Qt),i;return e[0]!==r.contentDeclarationFormat.label.value||e[1]!==r.contentDeclarationFormat.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,Q.jsxs)(c,{value:t,onValueChange:n,children:[(0,Q.jsx)(c.Trigger,{className:`py-1!`,"aria-label":r.contentDeclarationFormat.label.value,children:(0,Q.jsx)(c.Value,{placeholder:r.contentDeclarationFormat.placeholder.value})}),(0,Q.jsxs)(c.Content,{children:[(0,Q.jsx)(c.Item,{value:`typescript`,children:`TypeScript`}),(0,Q.jsx)(c.Item,{value:`commonjs`,children:`CommonJS`}),(0,Q.jsx)(c.Item,{value:`esm`,children:`ESM`}),(0,Q.jsx)(c.Item,{value:`json`,children:`JSON`})]})]}),e[0]=r.contentDeclarationFormat.label.value,e[1]=r.contentDeclarationFormat.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},tn={key:`code`,content:{nodeType:`translation`,translation:{en:{title:`Copy code`,description:`Copy the code to the clipboard`},"en-GB":{title:`Copy code`,description:`Copy the code to the clipboard`},fr:{title:`Copier le code`,description:`Copier le code dans le presse-papiers`},es:{title:`Copiar código`,description:`Copiar el código al portapapeles`},de:{title:`Code kopieren`,description:`Kopieren Sie den Code in die Zwischenablage`},ja:{title:`コードをコピー`,description:`コードをクリップボードにコピー`},ko:{title:`코드 복사`,description:`코드를 클립보드에 복사`},zh:{title:`复制代码`,description:`复制代码到剪贴板`},it:{title:`Copiare il codice`,description:`Copiare il codice nella clipboard`},pt:{title:`Copiar código`,description:`Copiar o código para a área de transferência`},hi:{title:`कोड कॉपी करें`,description:`कोड को क्लिपबोर्ड पर कॉपी करें`},ar:{title:`نسخ الكود`,description:`نسخ الكود إلى الحافظة`},ru:{title:`Копировать код`,description:`Копировать код в буфер обмена`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`]},nn=e=>{let{code:t,...n}=e,{title:r,description:i}=a(tn);return(0,Q.jsxs)(y,{identifier:`copy`,children:[(0,Q.jsx)(m,{content:t,...n}),(0,Q.jsxs)(y.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Q.jsx)(`strong`,{children:r}),(0,Q.jsx)(`p`,{className:`text-neutral`,children:i})]})]})},rn=()=>{let e=(0,Z.c)(5),{packageManager:t,setPackageManager:n}=$(),r=a(Qt);a(Qt);let i;return e[0]!==r.packageManager.label.value||e[1]!==r.packageManager.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,Q.jsxs)(c,{value:t,onValueChange:n,children:[(0,Q.jsx)(c.Trigger,{className:`py-1!`,"aria-label":r.packageManager.label.value,children:(0,Q.jsx)(c.Value,{placeholder:r.packageManager.placeholder.value})}),(0,Q.jsxs)(c.Content,{children:[(0,Q.jsx)(c.Item,{value:`npm`,children:`npm`}),(0,Q.jsx)(c.Item,{value:`pnpm`,children:`pnpm`}),(0,Q.jsx)(c.Item,{value:`yarn`,children:`yarn`}),(0,Q.jsx)(c.Item,{value:`bun`,children:`bun`})]})]}),e[0]=r.packageManager.label.value,e[1]=r.packageManager.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},an=700,on=new Set([`tsx`,`jsx`]),sn=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},cn=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:u,isRollable:d=!0,...f})=>{let{codeFormat:p,contentDeclarationFormat:m}=$(),h=(0,X.useMemo)(()=>sn(c),[c]),g=(0,X.useMemo)(()=>sn(u),[u]),_=h!==void 0&&h.length>1&&h.includes(`typescript`),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_||v,b=v?m:p,x=(0,X.useMemo)(()=>{let e=v?g:h;if(!e)return e;let n=e.filter(e=>e!==`json`);return on.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[v,g,h,t]),S=(0,X.useMemo)(()=>!x||x.includes(b)?b:x[x.length-1]??`typescript`,[x,b]),[E,D]=(0,X.useState)(o);(0,X.useEffect)(()=>{if(!y||S===`typescript`){D(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await C(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{deriveFileName:e}},[]);e||D(t(o,S))})(),()=>{e=!0}},[o,y,S]);let O=(0,X.useMemo)(()=>{let t=Array.isArray(e)?e.join(``):String(e);return t.endsWith(`
|
|
21
|
-
`)?t.slice(0,-1):t},[e]),[k,A]=(0,X.useState)(O);(0,X.useEffect)(()=>{if(!y||S===`typescript`){A(O);return}let e=!1;return(async()=>{let{transformCode:t}=await C(async()=>{let{transformCode:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e}},[]);e||A(t(O,S))})(),()=>{e=!0}},[O,y,S]);let j=s||c||u;return(0,Q.jsx)(Zt,{packageManager:s,codeFormat:c,contentDeclarationFormat:u,children:(0,Q.jsxs)(l,{className:w(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...f,children:[r&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:E??t}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,Q.jsx)(rn,{}),c&&(0,Q.jsx)($t,{availableFormats:x}),u&&(0,Q.jsx)(en,{})]})]}),(0,Q.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,Q.jsx)(`div`,{className:w(`absolute right-2 bottom-0 flex h-7 items-center`,j&&`h-11`),children:(0,Q.jsx)(nn,{code:k})})})]}),(0,Q.jsx)(qt,{minHeight:an,isRollable:d,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:y?(0,Q.jsx)(Yt,{originalLang:t,targetFormat:S,isDarkMode:n,children:O}):(0,Q.jsx)(T,{lang:t,isDarkMode:n,children:O})})]})})},ln=(0,X.createContext)({tabsValues:{},setTabsValues:()=>{}}),un=()=>(0,X.useContext)(ln),dn=e=>{let t=(0,Z.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,X.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,Q.jsx)(ln,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},fn=(0,X.createContext)(void 0),pn=x(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),mn=({children:e,...t})=>(0,Q.jsx)(`div`,{...t,children:e});mn.displayName=`TabItem`;var hn=Object.assign(e=>{let t=(0,Z.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...l}=e,u=X.Children.toArray(a).filter(gn),d=u[0]?.props?.value,{tabsValues:f,setTabsValues:p}=un(),[m,h]=(0,X.useState)(n??d??``),g=(r&&typeof f==`object`?f?.[r]:m)??n??d,v;t[0]===g?v=t[1]:(v=e=>e.props.value===g,t[0]=g,t[1]=v);let y=u.findIndex(v),b=u.length,{containerProps:x,dragDeltaPct:S,isDragging:C}=Bt({itemIndex:y,itemCount:b,onSwipeLeft:()=>{let e=u[Math.min(b-1,y+1)]?.props?.value;e&&T(e)},onSwipeRight:()=>{let e=u[Math.max(0,y-1)]?.props?.value;e&&T(e)}}),T=e=>{h(e),typeof p==`function`&&p(t=>({...t,[r]:e}))},E={activeTab:m??d??``,setActiveTab:T},D;return t[2]!==y||t[3]!==c?(D=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===y;return(0,Q.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:w(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!o&&`pointer-events-none opacity-0`,a),children:(0,Q.jsx)(`div`,{className:w(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=y,t[3]=c,t[4]=D):D=t[4],(0,Q.jsx)(fn.Provider,{value:E,children:(0,Q.jsxs)(`div`,{className:w(pn({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...l,children:[(0,Q.jsx)(`div`,{className:w(`flex shrink-0 gap-3 p-3`,s),children:(0,Q.jsx)(_,{selectedChoice:g,tabs:u.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=g===n;return(0,Q.jsx)(`button`,{className:w(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&T(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,Q.jsx)(`div`,{className:w(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...x,children:(0,Q.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:w(`grid w-full min-w-0`,c&&`h-full`,C?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${u.length}, 100%)`,transform:`translateX(-${y*100-(C?S:0)}%)`},children:u.map(D)})})]})})},{Item:mn});function gn(e){return(0,X.isValidElement)(e)&&e.type===mn}var _n={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},vn=e=>{let t=(0,Z.c)(6),{setIsModalOpen:n}=e,{modal:r}=a(_n),i;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),i=(0,Q.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,Q.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,Q.jsxs)(y,{identifier:`expand`,children:[(0,Q.jsx)(u,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:zt}),(0,Q.jsxs)(y.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Q.jsx)(`strong`,{children:r.title}),(0,Q.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=i}else i=t[3];return i},yn=(0,X.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,Q.jsx)(`table`,{ref:r,className:w(`w-full table-auto overflow-hidden text-left`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),bn=.55,xn=5,Sn=30,Cn=(e,t,n)=>{let r=(0,Z.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(Sn,Math.max(xn,(n[t]??0)*bn));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${Sn}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,X.useEffect)(i,n)},wn=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,X.useState)(!1),[c,l]=(0,X.useState)(null),u=(0,X.useRef)(null),f=(0,X.useRef)(null);Cn(u,f,[a.children,o]),(0,X.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,X.useEffect)(()=>{o||l(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(l(t.rowIndex),s(!0))}i?.(e)};return(0,Q.jsxs)(`div`,{className:`group relative`,children:[n&&(0,Q.jsx)(vn,{setIsModalOpen:s}),(0,Q.jsx)(qt,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,Q.jsx)(yn,{ref:u,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,Q.jsx)(d,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,Q.jsx)(`div`,{className:`grid`,children:(0,Q.jsx)(yn,{ref:f,className:w(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,Q.jsx)(Q.Fragment,{})})]})},Tn=({className:e,...t})=>(0,Q.jsx)(`th`,{className:w(`border border-neutral/20 border-b border-solid bg-neutral/10 p-4`,e),...t}),En=({className:e,...t})=>(0,Q.jsx)(`tr`,{className:w(`hover:bg-neutral/10`,e),...t}),Dn=({className:e,...t})=>(0,Q.jsx)(`td`,{className:w(`border border-neutral/20 border-b border-solid p-4`,e),...t}),On=({className:e,...t})=>(0,Q.jsx)(`hr`,{className:w(`mx-6 mt-16 text-neutral`,e),...t}),kn=e=>(0,Q.jsx)(i,{isClickable:!0,className:`text-text`,...e}),An=e=>(0,Q.jsx)(h,{isClickable:!0,className:`mt-16 text-text`,...e}),jn=e=>(0,Q.jsx)(v,{isClickable:!0,className:`mt-5 text-text`,...e}),Mn=e=>(0,Q.jsx)(o,{isClickable:!0,className:`mt-3 text-text`,...e}),Nn=e=>(0,Q.jsx)(f,{isClickable:!0,className:`mt-3 text-text`,...e}),Pn=e=>(0,Q.jsx)(b,{isClickable:!0,className:`mt-3 text-text`,...e}),Fn=e=>(0,Q.jsx)(`strong`,{className:`text-text`,...e}),In=(0,X.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,Q.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,Q.jsx)(cn,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),Ln=e=>function(t){return(0,Q.jsx)(In,{...t,isDarkMode:e})},Rn=({className:e,...t})=>(0,Q.jsx)(`blockquote`,{className:w(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),zn=({className:e,...t})=>(0,Q.jsx)(`ul`,{className:w(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Bn=({className:e,...t})=>(0,Q.jsx)(`ol`,{className:w(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Vn=({className:e,alt:t,src:n,...r})=>(0,Q.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:w(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),Hn=e=>t=>(0,Q.jsx)(s,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),Un={h1:kn,h2:An,h3:jn,h4:Mn,h5:Nn,h6:Pn,strong:Fn,blockquote:Rn,ul:zn,ol:Bn,img:Vn,pre:e=>(0,Q.jsx)(Q.Fragment,{children:e.children}),table:e=>(0,Q.jsx)(wn,{isRollable:!0,displayModal:!0,...e}),th:Tn,tr:En,td:Dn,hr:On,Tabs:e=>(0,Q.jsx)(hn,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:hn.Item,Columns:({className:e,...t})=>(0,Q.jsx)(`div`,{className:w(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,Q.jsx)(`div`,{className:w(`flex-1`,e),...t}),iframe:e=>(0,Q.jsx)(Ht,{...e})},Wn=(e,t)=>({...Un,code:Ln(e),a:Hn(t)}),Gn=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,Q.jsx)(Wt,{children:(0,Q.jsx)(dn,{children:Rt(e,{components:{...Wn(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})});export{Gn as MarkdownRenderer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./angular-html-aheqMdMk.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"./angular-ts-DlJsg-G2.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"./astro-DXG5exNM.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./shellscript-UHiJlB8C.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./css-BvA2HNhA.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./html-Uv1uAV67.js";export{e as default};
|