intlayer-editor 8.3.4 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/client/dist/assets/{CodeBlockShiki-B-TdpLk0.js → CodeBlockShiki-k-_aip9S.js} +18 -17
  2. package/client/dist/assets/MarkdownMetadataRendererInternal-DRejf1v9.js +42 -0
  3. package/client/dist/assets/{angular-html-B40pL6wl.js → angular-html-C9KJai8F.js} +1 -1
  4. package/client/dist/assets/{angular-ts-DEfIxZMp.js → angular-ts-BVoYf76x.js} +2 -2
  5. package/client/dist/assets/{astro-DDXXh1_1.js → astro-CthjkCYm.js} +6 -6
  6. package/client/dist/assets/bash-CgEmcnYZ.js +2 -0
  7. package/client/dist/assets/{blade-BqWGpLk3.js → blade-BtLAoZmt.js} +7 -7
  8. package/client/dist/assets/{bundle-web-BGnQD1YQ.js → bundle-web-m4UDFBJk.js} +124 -124
  9. package/client/dist/assets/{coffee-B7kx3Cid.js → coffee-B4Wyhs45.js} +1 -1
  10. package/client/dist/assets/{cpp-3L9-cBo7.js → cpp-7dTvF10R.js} +3 -3
  11. package/client/dist/assets/esm-B-khX_jr.js +1739 -0
  12. package/client/dist/assets/getContentNodeByKeyPath-C6o6zIBZ.js +155 -0
  13. package/client/dist/assets/github-dark-CeyRTViw.js +2 -0
  14. package/client/dist/assets/github-light-DkC943a0.js +2 -0
  15. package/client/dist/assets/{glsl-D7GhljHe.js → glsl-CrUwbCO_.js} +1 -1
  16. package/client/dist/assets/{graphql-CFwfqi3h.js → graphql-BeV7Adoa.js} +4 -4
  17. package/client/dist/assets/{haml-AGy9GVVj.js → haml-DH35i0Df.js} +2 -2
  18. package/client/dist/assets/{handlebars-vOgalqpV.js → handlebars-CYzbg5Zd.js} +4 -4
  19. package/client/dist/assets/html-D-5QhVQ7.js +2 -0
  20. package/client/dist/assets/{html-B0M7Ubrz.js → html-DIIpd-Y_.js} +2 -2
  21. package/client/dist/assets/{html-derivative-B7ZIKlQ2.js → html-derivative-C5VsVRfx.js} +1 -1
  22. package/client/dist/assets/{http-Bw1SWifZ.js → http-D8W38g2W.js} +4 -4
  23. package/client/dist/assets/{hurl-zcy5Fl2y.js → hurl-CjtGt5KL.js} +3 -3
  24. package/client/dist/assets/{index-Dwm0kT3V.js → index-CZPUiNfr.js} +3786 -5492
  25. package/client/dist/assets/{index-CZKvTyfO.css → index-D6NEtBOG.css} +22 -21
  26. package/client/dist/assets/javascript-CmhSbI20.js +2 -0
  27. package/client/dist/assets/{jinja-CpV-HaFu.js → jinja-BNrxSmwS.js} +1 -1
  28. package/client/dist/assets/{jison-DaIhV8hg.js → jison-BTSoi8vr.js} +1 -1
  29. package/client/dist/assets/json-COHoP3SY.js +2 -0
  30. package/client/dist/assets/json5-B9APma8F.js +2 -0
  31. package/client/dist/assets/{julia-BwktqeJq.js → julia-BoLZ5opG.js} +5 -5
  32. package/client/dist/assets/{marko-DZhB4BDZ.js → marko-DYFloQgs.js} +4 -4
  33. package/client/dist/assets/{mdc-ByFPmJVb.js → mdc-Ce5YP0gO.js} +3 -3
  34. package/client/dist/assets/{php-Cq-zzIgW.js → php-Cvoz1XWD.js} +6 -6
  35. package/client/dist/assets/preload-helper-CoI0IUIE.js +61 -0
  36. package/client/dist/assets/{pug-BqsC6HRi.js → pug-B254dajO.js} +3 -3
  37. package/client/dist/assets/{scss-BDzsPcer.js → scss-DBQoQ692.js} +1 -1
  38. package/client/dist/assets/{svelte-7kInhlba.js → svelte-sPCLa-5U.js} +4 -4
  39. package/client/dist/assets/{ts-tags-CmxNgKEj.js → ts-tags-BBvI9Ei0.js} +7 -7
  40. package/client/dist/assets/tsx-Dd1aPV59.js +2 -0
  41. package/client/dist/assets/typescript-BL5DoVSN.js +2 -0
  42. package/client/dist/assets/vue--x-KJx_U.js +2 -0
  43. package/client/dist/assets/{vue-CG7sAwHH.js → vue-C1PsK9gt.js} +6 -6
  44. package/client/dist/assets/{vue-html-DHRq-ZD1.js → vue-html-D5qVhuGI.js} +1 -1
  45. package/client/dist/assets/{vue-vine-BAAyauNs.js → vue-vine-DRRB0gmq.js} +6 -6
  46. package/client/dist/assets/xml-BZimFlwz.js +2 -0
  47. package/client/dist/assets/{xml-CPgLmR05.js → xml-Bnc0qLkR.js} +1 -1
  48. package/client/dist/assets/yaml-BW9EBdAv.js +2 -0
  49. package/client/dist/index.html +5 -2
  50. package/package.json +12 -12
  51. package/client/dist/assets/bash-Ctbhv6bB.js +0 -2
  52. package/client/dist/assets/github-dark-C5-x0-6C.js +0 -2
  53. package/client/dist/assets/github-light-ByNhJa3j.js +0 -2
  54. package/client/dist/assets/html-Cla_1apk.js +0 -2
  55. package/client/dist/assets/javascript-BeimltzM.js +0 -2
  56. package/client/dist/assets/json-DPD_iq4F.js +0 -2
  57. package/client/dist/assets/json5-DcYx4UAX.js +0 -2
  58. package/client/dist/assets/tsx-CHlTOe14.js +0 -2
  59. package/client/dist/assets/typescript-B4HgavCc.js +0 -2
  60. package/client/dist/assets/vue-DlaU9qIx.js +0 -2
  61. package/client/dist/assets/xml-Bp8m4wBs.js +0 -2
  62. package/client/dist/assets/yaml-CX3TwziJ.js +0 -2
  63. /package/client/dist/assets/{andromeeda-BY8O__rD.js → andromeeda-D9tXBqC-.js} +0 -0
  64. /package/client/dist/assets/{aurora-x-CwL-GNR7.js → aurora-x-C104ZGur.js} +0 -0
  65. /package/client/dist/assets/{ayu-dark-BBLnrtAD.js → ayu-dark-DWpCtGc6.js} +0 -0
  66. /package/client/dist/assets/{ayu-light-DXc4qGzs.js → ayu-light-CECQ0nGX.js} +0 -0
  67. /package/client/dist/assets/{ayu-mirage-CUqxsSY9.js → ayu-mirage-COuDN4ns.js} +0 -0
  68. /package/client/dist/assets/{c-rYJZrW1k.js → c-YE5E93Zf.js} +0 -0
  69. /package/client/dist/assets/{catppuccin-frappe-BU7j5Tpb.js → catppuccin-frappe-h7rVaSlW.js} +0 -0
  70. /package/client/dist/assets/{catppuccin-latte-2Mz3CxtD.js → catppuccin-latte-DuYSKRbe.js} +0 -0
  71. /package/client/dist/assets/{catppuccin-macchiato-C8_0LbtV.js → catppuccin-macchiato-oQGqG0MQ.js} +0 -0
  72. /package/client/dist/assets/{catppuccin-mocha-DZJpk67z.js → catppuccin-mocha-D7aZCK2q.js} +0 -0
  73. /package/client/dist/assets/{css-BznhwoPH.js → css-CbVdw2Vx.js} +0 -0
  74. /package/client/dist/assets/{csv-BglKJHzp.js → csv-B9m8dC01.js} +0 -0
  75. /package/client/dist/assets/{dark-plus-BrB11_Kq.js → dark-plus-py6_0-oZ.js} +0 -0
  76. /package/client/dist/assets/{dist-JL9Mfqir.js → dist-BP4OKmDF.js} +0 -0
  77. /package/client/dist/assets/{dracula-DyxKP7j4.js → dracula-KE0gm51O.js} +0 -0
  78. /package/client/dist/assets/{dracula-soft-BZFuOs8M.js → dracula-soft-B8U_ir5T.js} +0 -0
  79. /package/client/dist/assets/{everforest-dark-Wuu7DlvF.js → everforest-dark-B2JgZR5v.js} +0 -0
  80. /package/client/dist/assets/{everforest-light-CBnZ6Gdn.js → everforest-light-yiC4xIKi.js} +0 -0
  81. /package/client/dist/assets/{github-dark-mYD1tu1x.js → github-dark-Dls1MHlQ.js} +0 -0
  82. /package/client/dist/assets/{github-dark-default-DLYIApiv.js → github-dark-default-cvKXPsGo.js} +0 -0
  83. /package/client/dist/assets/{github-dark-dimmed-D-v6GD-D.js → github-dark-dimmed-K3wk9czK.js} +0 -0
  84. /package/client/dist/assets/{github-dark-high-contrast-6fANxq9H.js → github-dark-high-contrast-BljHNUFs.js} +0 -0
  85. /package/client/dist/assets/{github-light-DqxaZC5J.js → github-light-DssNX3QF.js} +0 -0
  86. /package/client/dist/assets/{github-light-default-BPXrwD2R.js → github-light-default-CqDRRARt.js} +0 -0
  87. /package/client/dist/assets/{github-light-high-contrast-CSfjfk1G.js → github-light-high-contrast-MgohVKyD.js} +0 -0
  88. /package/client/dist/assets/{gruvbox-dark-hard-D0YE4G_7.js → gruvbox-dark-hard-D-zn943j.js} +0 -0
  89. /package/client/dist/assets/{gruvbox-dark-medium-lrOhwMWw.js → gruvbox-dark-medium-DJ8_rVKi.js} +0 -0
  90. /package/client/dist/assets/{gruvbox-dark-soft-D3zz0Ino.js → gruvbox-dark-soft-DYdEaxoi.js} +0 -0
  91. /package/client/dist/assets/{gruvbox-light-hard-Bflom6T7.js → gruvbox-light-hard-BRbDZM7a.js} +0 -0
  92. /package/client/dist/assets/{gruvbox-light-medium-Cuc0uMCb.js → gruvbox-light-medium-B44e04Yo.js} +0 -0
  93. /package/client/dist/assets/{gruvbox-light-soft-Bv7Ot-z0.js → gruvbox-light-soft-DwzQ4IYg.js} +0 -0
  94. /package/client/dist/assets/{horizon-DhXoK0Ed.js → horizon-ZzEu6UnM.js} +0 -0
  95. /package/client/dist/assets/{horizon-bright-DXfweL4O.js → horizon-bright-MN7Rxqk4.js} +0 -0
  96. /package/client/dist/assets/{houston-C4ja_8uc.js → houston-DbO_nj2G.js} +0 -0
  97. /package/client/dist/assets/{imba-DU1sijU9.js → imba-Dtz0Qjpr.js} +0 -0
  98. /package/client/dist/assets/{java-BsMRZzwb.js → java-CsNM0d7y.js} +0 -0
  99. /package/client/dist/assets/{javascript-CU3PIJIe.js → javascript-BdACqf10.js} +0 -0
  100. /package/client/dist/assets/{json-NRUJ3A8Z.js → json-DBTd2yrx.js} +0 -0
  101. /package/client/dist/assets/{json5-B2F_IK8O.js → json5-Db2KhhlZ.js} +0 -0
  102. /package/client/dist/assets/{jsonc-DZe5qY2D.js → jsonc-CHN8QUfU.js} +0 -0
  103. /package/client/dist/assets/{jsonl-X5ySelg7.js → jsonl-CGjv98wH.js} +0 -0
  104. /package/client/dist/assets/{jsx-D27Zcp8f.js → jsx-CWWDUN98.js} +0 -0
  105. /package/client/dist/assets/{kanagawa-dragon-BNuJwYwU.js → kanagawa-dragon-B7DwHOPg.js} +0 -0
  106. /package/client/dist/assets/{kanagawa-lotus-orsoMpUb.js → kanagawa-lotus-wvBYqRx0.js} +0 -0
  107. /package/client/dist/assets/{kanagawa-wave-lD9IY0rm.js → kanagawa-wave-Dm7q3hJz.js} +0 -0
  108. /package/client/dist/assets/{laserwave-CvDHcYwO.js → laserwave-CPDGEaT_.js} +0 -0
  109. /package/client/dist/assets/{less-PRJULh4Y.js → less-DXhlwFaK.js} +0 -0
  110. /package/client/dist/assets/{light-plus-MOK32u24.js → light-plus-ByxFuNBG.js} +0 -0
  111. /package/client/dist/assets/{markdown-DkH4joIR.js → markdown-DLj4nrva.js} +0 -0
  112. /package/client/dist/assets/{material-theme-TzV_qhce.js → material-theme-53qDBBiZ.js} +0 -0
  113. /package/client/dist/assets/{material-theme-darker-Dth3Bzr_.js → material-theme-darker-BMgigqK-.js} +0 -0
  114. /package/client/dist/assets/{material-theme-lighter-ZXCQGpY6.js → material-theme-lighter-Du7QlnOy.js} +0 -0
  115. /package/client/dist/assets/{material-theme-ocean-WKfsvas6.js → material-theme-ocean-D7OelWl-.js} +0 -0
  116. /package/client/dist/assets/{material-theme-palenight-Ck3Djj-_.js → material-theme-palenight-DuU45xLi.js} +0 -0
  117. /package/client/dist/assets/{mdx-CSWbZhEy.js → mdx-CA-fbmGc.js} +0 -0
  118. /package/client/dist/assets/{min-dark-S0TYVSZ3.js → min-dark-DaQKcOrv.js} +0 -0
  119. /package/client/dist/assets/{min-light-gRt6aDOF.js → min-light-B8hhGQs9.js} +0 -0
  120. /package/client/dist/assets/{monokai-CAeGk1-c.js → monokai-BxMUzvLk.js} +0 -0
  121. /package/client/dist/assets/{night-owl-DSfRe8yr.js → night-owl-BkjnEots.js} +0 -0
  122. /package/client/dist/assets/{night-owl-light-DyKOenVJ.js → night-owl-light-oxBO-tCU.js} +0 -0
  123. /package/client/dist/assets/{nord-kFvBSECm.js → nord-CGl-72px.js} +0 -0
  124. /package/client/dist/assets/{one-dark-pro-DgHxW_dT.js → one-dark-pro-iaIbXpZM.js} +0 -0
  125. /package/client/dist/assets/{one-light-BWIlrqaS.js → one-light-DVukLUfQ.js} +0 -0
  126. /package/client/dist/assets/{plastic-CPlugWGY.js → plastic-BZlO8SrG.js} +0 -0
  127. /package/client/dist/assets/{poimandres-JTNwIe-T.js → poimandres-mI0gepuf.js} +0 -0
  128. /package/client/dist/assets/{postcss-cbpEYqBI.js → postcss-DQkOD--_.js} +0 -0
  129. /package/client/dist/assets/{python-Bfe-Zzhs.js → python-Ce1zJ0DU.js} +0 -0
  130. /package/client/dist/assets/{r-BuiJQRlB.js → r-debCGJJk.js} +0 -0
  131. /package/client/dist/assets/{red-CqzFqTyK.js → red-DqRf4Qb0.js} +0 -0
  132. /package/client/dist/assets/{regexp-Bv54x_SM.js → regexp-aTTFcG_n.js} +0 -0
  133. /package/client/dist/assets/{rose-pine-D8ryEJo3.js → rose-pine-DopQf0Iy.js} +0 -0
  134. /package/client/dist/assets/{rose-pine-dawn-C_3wVJ2a.js → rose-pine-dawn-CHPViTKc.js} +0 -0
  135. /package/client/dist/assets/{rose-pine-moon-DvTNfSgC.js → rose-pine-moon-DfcFJff9.js} +0 -0
  136. /package/client/dist/assets/{sass-DDKRa81x.js → sass-BG-FQdXa.js} +0 -0
  137. /package/client/dist/assets/{shellscript-D6OjgcVH.js → shellscript-C36bN5hG.js} +0 -0
  138. /package/client/dist/assets/{slack-dark-Dj4xwn1T.js → slack-dark-BjFW27lz.js} +0 -0
  139. /package/client/dist/assets/{slack-ochin-BMn5Zs5S.js → slack-ochin-VXH_9cNQ.js} +0 -0
  140. /package/client/dist/assets/{snazzy-light-CDOxNc-C.js → snazzy-light-aa2zLeH6.js} +0 -0
  141. /package/client/dist/assets/{solarized-dark-CqkLujkP.js → solarized-dark-Bk84Eels.js} +0 -0
  142. /package/client/dist/assets/{solarized-light-gCxA62ZX.js → solarized-light-DEKDy82g.js} +0 -0
  143. /package/client/dist/assets/{sql-D1VHE84D.js → sql-C9giXO6o.js} +0 -0
  144. /package/client/dist/assets/{stylus-CXea6hG4.js → stylus-CH9ua47t.js} +0 -0
  145. /package/client/dist/assets/{synthwave-84-CuzI5rUG.js → synthwave-84-CrF6pgTc.js} +0 -0
  146. /package/client/dist/assets/{tokyo-night-DBDiYG21.js → tokyo-night-D2kyPuzj.js} +0 -0
  147. /package/client/dist/assets/{tsx-CzwR-tnf.js → tsx-egH0NXjJ.js} +0 -0
  148. /package/client/dist/assets/{typescript-BRHrOBpy.js → typescript-BAhv7dky.js} +0 -0
  149. /package/client/dist/assets/{unmerged_dictionaries-BOX6ozHh.js → unmerged_dictionaries-C2Zsjv5l.js} +0 -0
  150. /package/client/dist/assets/{vesper-DXqrrAMY.js → vesper-BWwcA-27.js} +0 -0
  151. /package/client/dist/assets/{vitesse-black-BlH0x4Vs.js → vitesse-black-DUSn-VDu.js} +0 -0
  152. /package/client/dist/assets/{vitesse-dark-CIMLnJG1.js → vitesse-dark-wIOKBkKs.js} +0 -0
  153. /package/client/dist/assets/{vitesse-light-ClQGNaN6.js → vitesse-light-BTT8juqx.js} +0 -0
  154. /package/client/dist/assets/{wasm-BGVToWLA.js → wasm-BPjyAYt9.js} +0 -0
  155. /package/client/dist/assets/{wasm-DVnmThbD.js → wasm-dpeUm50f.js} +0 -0
  156. /package/client/dist/assets/{wgsl-Dd291c7U.js → wgsl-BAQZQFAS.js} +0 -0
  157. /package/client/dist/assets/{wit-Bi1XtBiP.js → wit-BbR8NOgQ.js} +0 -0
  158. /package/client/dist/assets/{yaml-D8NLwOzu.js → yaml-BkL6USz4.js} +0 -0
@@ -0,0 +1,1739 @@
1
+ import { r as __exportAll } from "./chunk-CC9Q-vWm.js";
2
+ import { n as configuration_default, r as e$18, t as t$13 } from "./getContentNodeByKeyPath-C6o6zIBZ.js";
3
+ import { t as __vitePreload } from "./preload-helper-CoI0IUIE.js";
4
+ //#region ../@intlayer/core/dist/esm/interpreter/getCondition.mjs
5
+ var e$17 = (e, t) => {
6
+ let n = Object.keys(e), r = n[n.length - 1];
7
+ return e[`${t}`] ?? e.fallback ?? e[r];
8
+ };
9
+ //#endregion
10
+ //#region ../@intlayer/core/dist/esm/interpreter/getContent/deepTransform.mjs
11
+ var t$12 = (n, r) => {
12
+ for (let e of r.plugins ?? []) if (e.canHandle(n)) return e.transform(n, r, (e, n) => t$12(e, n));
13
+ if (typeof n != `object` || !n || n.$$typeof !== void 0 || n.__v_isVNode !== void 0 || n._isVNode !== void 0 || n.isJSX !== void 0 || typeof n == `function`) return n;
14
+ if (Array.isArray(n)) return n.map((n, i) => t$12(n, {
15
+ ...r,
16
+ children: n,
17
+ keyPath: [...r.keyPath, {
18
+ type: e$18.Array,
19
+ key: i
20
+ }]
21
+ }));
22
+ let i = {};
23
+ for (let a in n) {
24
+ let o = {
25
+ ...r,
26
+ children: n[a],
27
+ keyPath: [...r.keyPath, {
28
+ type: e$18.Object,
29
+ key: a
30
+ }]
31
+ };
32
+ i[a] = t$12(n[a], o);
33
+ }
34
+ return i;
35
+ };
36
+ //#endregion
37
+ //#region ../@intlayer/core/dist/esm/interpreter/getEnumeration.mjs
38
+ var e$16 = (e, t) => {
39
+ let n = Object.keys(e);
40
+ for (let e of n) {
41
+ let n = !e.startsWith(`>`) && !e.startsWith(`<`) && !e.startsWith(`=`) && parseFloat(e) === t || e.startsWith(`=`) && parseFloat(e.slice(1)) === t, r = e.startsWith(`>`) && t > parseFloat(e.slice(1)), i = e.startsWith(`>=`) && t >= parseFloat(e.slice(2)), a = e.startsWith(`<`) && t < parseFloat(e.slice(1)), o = e.startsWith(`<=`) && t <= parseFloat(e.slice(2));
42
+ if (n || r || i || a || o) return e;
43
+ }
44
+ }, t$11 = (t, n) => t[e$16(t, n) ?? `fallback`];
45
+ //#endregion
46
+ //#region ../@intlayer/core/dist/esm/interpreter/getGender.mjs
47
+ var e$15 = (e) => e === `m` || e === `male` ? `male` : e === `f` || e === `female` ? `female` : `fallback`, t$10 = (t, n) => {
48
+ let r = Object.keys(t), i = r[r.length - 1];
49
+ return t[e$15(n)] ?? t.fallback ?? t[i];
50
+ };
51
+ //#endregion
52
+ //#region ../@intlayer/core/dist/esm/interpreter/getInsertion.mjs
53
+ var e$14 = (e, t) => e.replace(/\{\{\s*(.*?)\s*\}\}/g, (e, n) => (t[n.trim()] ?? ``).toString());
54
+ //#endregion
55
+ //#region ../@intlayer/config/dist/esm/logger.mjs
56
+ var e$13, n$9 = (t) => e$13 === void 0 ? t : e$13, r$7 = (e, t) => {
57
+ let r = t?.isVerbose ?? !1, i = t?.config?.mode ?? `default`, a = t?.level ?? `info`, o = n$9(t?.config?.prefix), s = t?.config?.log ?? console.log, c = t?.config?.info ?? console.info, l = t?.config?.warn ?? console.warn, u = t?.config?.error ?? console.error, d = t?.config?.debug ?? console.debug;
58
+ if (i === `disabled` || r && i !== `verbose`) return;
59
+ let f = o ? [o, ...[e].flat()] : [e].flat();
60
+ if (a === `debug`) return d(...f);
61
+ if (a === `info`) return c(...f);
62
+ if (a === `warn`) return l(...f);
63
+ if (a === `error`) return u(...f);
64
+ s(...f);
65
+ }, i$5 = function(e) {
66
+ return e.RESET = `\x1B[0m`, e.GREY = `\x1B[90m`, e.GREY_DARK = `\x1B[38;5;239m`, e.GREY_LIGHT = `\x1B[38;5;252m`, e.BLUE = `\x1B[34m`, e.RED = `\x1B[31m`, e.GREEN = `\x1B[32m`, e.YELLOW = `\x1B[38;5;226m`, e.MAGENTA = `\x1B[35m`, e.BEIGE = `\x1B[38;5;3m`, e.ORANGE = `\x1B[38;5;208m`, e.CYAN = `\x1B[36m`, e.WHITE = `\x1B[37m`, e.BOLD = `\x1B[1m`, e;
67
+ }({}), o$7 = (e, t) => (n, i) => r$7(n, {
68
+ ...i ?? {},
69
+ config: {
70
+ ...e?.log,
71
+ ...t?.config,
72
+ ...i?.config ?? {}
73
+ }
74
+ }), s$6 = (e, t, n) => t ? `${t}${e}${n ? typeof n == `boolean` ? i$5.RESET : n : i$5.RESET}` : e, l$5 = (e, t = i$5.BEIGE, n = i$5.RESET) => [e].flat().map((e) => s$6(e, t, n)).join(`, `);
75
+ s$6(`✗`, i$5.RED);
76
+ s$6(`✓`, i$5.GREEN);
77
+ s$6(`⏲`, i$5.BLUE);
78
+ //#endregion
79
+ //#region .intlayer/main/dictionaries.mjs
80
+ var dictionaries = {};
81
+ var getDictionaries = () => dictionaries;
82
+ //#endregion
83
+ //#region ../@intlayer/core/dist/esm/interpreter/getIntlayer.mjs
84
+ var a$4 = (e = ``) => new Proxy(() => e, {
85
+ get: (t, n) => {
86
+ if (n === `toJSON` || n === Symbol.toPrimitive || n === `toString`) return () => e;
87
+ if (n !== `then`) return a$4(e ? `${e}.${String(n)}` : String(n));
88
+ },
89
+ apply: () => e
90
+ }), o$6 = (o, s, c) => {
91
+ let l = getDictionaries()[o];
92
+ return l ? n$7(l, s, c) : (o$7(configuration_default)(`Dictionary ${l$5(o)} was not found. Using fallback proxy.`, {
93
+ level: `warn`,
94
+ isVerbose: !0
95
+ }), a$4(o));
96
+ };
97
+ //#endregion
98
+ //#region ../@intlayer/core/dist/esm/interpreter/getNesting.mjs
99
+ var t$8 = (t, n, r) => {
100
+ let i = o$6(t, r?.locale, r?.plugins);
101
+ if (typeof n == `string`) {
102
+ let e = n.split(`.`), t = i;
103
+ for (let n of e) if (t = t?.[n], t === void 0) return i;
104
+ return t;
105
+ }
106
+ return i;
107
+ };
108
+ //#endregion
109
+ //#region ../@intlayer/core/dist/esm/interpreter/getTranslation.mjs
110
+ var e$12 = (e) => {
111
+ if (typeof e != `object` || !e || e instanceof Promise || typeof e.then == `function` || e.$$typeof !== void 0 || e.__v_isVNode !== void 0 || e._isVNode !== void 0 || e.isJSX !== void 0) return !1;
112
+ let t = Object.getPrototypeOf(e);
113
+ return t === Object.prototype || t === null || Array.isArray(e);
114
+ }, t$7 = (n, r) => {
115
+ if (n === void 0) return r;
116
+ if (r === void 0 || Array.isArray(n)) return n;
117
+ if (e$12(n) && e$12(r)) {
118
+ let e = { ...n };
119
+ for (let i of Object.keys(r)) i === `__proto__` || i === `constructor` || (Object.hasOwn(n, i) ? e[i] = t$7(n[i], r[i]) : e[i] = r[i]);
120
+ return e;
121
+ }
122
+ return n;
123
+ }, n$8 = (t, r = /* @__PURE__ */ new WeakSet()) => {
124
+ if (typeof t != `object` || !t || r.has(t) || (r.add(t), !e$12(t))) return t;
125
+ if (Array.isArray(t)) return t.map((e) => n$8(e, r));
126
+ let i = {};
127
+ for (let [e, a] of Object.entries(t)) a !== void 0 && (i[e] = n$8(a, r));
128
+ return i;
129
+ }, r$6 = (e, r, i) => {
130
+ let a = [], o = (t) => e[t], s = o(r);
131
+ if (typeof s == `string`) return s;
132
+ if (s !== void 0 && a.push(s), r.includes(`-`)) {
133
+ let t = r.split(`-`)[0];
134
+ if (t in e) {
135
+ let e = o(t);
136
+ if (typeof e == `string`) {
137
+ if (a.length === 0) return e;
138
+ } else e !== void 0 && a.push(e);
139
+ }
140
+ }
141
+ if (i !== void 0 && i !== r) {
142
+ if (i in e) {
143
+ let e = o(i);
144
+ if (typeof e == `string`) {
145
+ if (a.length === 0) return e;
146
+ } else e !== void 0 && a.push(e);
147
+ }
148
+ if (i.includes(`-`)) {
149
+ let t = i.split(`-`)[0];
150
+ if (t !== r.split(`-`)[0] && t in e) {
151
+ let e = o(t);
152
+ if (typeof e == `string`) {
153
+ if (a.length === 0) return e;
154
+ } else e !== void 0 && a.push(e);
155
+ }
156
+ }
157
+ }
158
+ if (a.length === 0) return;
159
+ let c = a.filter((e) => e !== void 0).map((e) => n$8(e));
160
+ return c.length === 1 || Array.isArray(c[0]) ? c[0] : c.reduce((e, n) => t$7(e, n));
161
+ };
162
+ //#endregion
163
+ //#region ../@intlayer/core/dist/esm/interpreter/getContent/plugins.mjs
164
+ var s$5 = (e, t) => ({
165
+ id: `translation-plugin`,
166
+ canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Translation,
167
+ transform: (n, r, i) => {
168
+ let s = { ...n[e$18.Translation] ?? {} };
169
+ for (let e in s) {
170
+ let t = {
171
+ ...r,
172
+ children: s[e],
173
+ keyPath: [...r.keyPath, {
174
+ type: e$18.Translation,
175
+ key: e
176
+ }]
177
+ };
178
+ s[e] = i(s[e], t);
179
+ }
180
+ return r$6(s, e, t);
181
+ }
182
+ }), c$5 = {
183
+ id: `enumeration-plugin`,
184
+ canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Enumeration,
185
+ transform: (e, n, r) => {
186
+ let i = { ...e[e$18.Enumeration] };
187
+ for (let e in i) {
188
+ let t = i[e];
189
+ i[e] = r(t, {
190
+ ...n,
191
+ children: t,
192
+ keyPath: [...n.keyPath, {
193
+ type: e$18.Enumeration,
194
+ key: e
195
+ }]
196
+ });
197
+ }
198
+ return (e) => {
199
+ let n = t$11(i, typeof e == `number` ? e : e.count);
200
+ return typeof n == `function` && typeof e == `object` ? n(e) : n;
201
+ };
202
+ }
203
+ }, l$4 = {
204
+ id: `condition-plugin`,
205
+ canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Condition,
206
+ transform: (t, n, r) => {
207
+ let i = { ...t[e$18.Condition] };
208
+ for (let e in i) {
209
+ let t = i[e];
210
+ i[e] = r(t, {
211
+ ...n,
212
+ children: t,
213
+ keyPath: [...n.keyPath, {
214
+ type: e$18.Condition,
215
+ key: e
216
+ }]
217
+ });
218
+ }
219
+ return (t) => {
220
+ let n = e$17(i, typeof t == `boolean` ? t : t.value);
221
+ return typeof n == `function` && typeof t == `object` ? n(t) : n;
222
+ };
223
+ }
224
+ }, u$5 = {
225
+ id: `insertion-plugin`,
226
+ canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Insertion,
227
+ transform: (e, t, n) => {
228
+ let i = [...t.keyPath, { type: e$18.Insertion }], a = e[e$18.Insertion], s = {
229
+ id: `insertion-string-plugin`,
230
+ canHandle: (e) => typeof e == `string`,
231
+ transform: (e, n, i) => {
232
+ let a = i(e, {
233
+ ...n,
234
+ children: e,
235
+ plugins: [...(t.plugins ?? []).filter((e) => e.id !== `intlayer-node-plugin`)]
236
+ });
237
+ return (e) => {
238
+ let o = e$14(a, e);
239
+ return i(o, {
240
+ ...n,
241
+ plugins: t.plugins,
242
+ children: o
243
+ });
244
+ };
245
+ }
246
+ };
247
+ return n(a, {
248
+ ...t,
249
+ children: a,
250
+ keyPath: i,
251
+ plugins: [s, ...t.plugins ?? []]
252
+ });
253
+ }
254
+ }, d$5 = {
255
+ id: `gender-plugin`,
256
+ canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Gender,
257
+ transform: (e, t, r) => {
258
+ let i = { ...e[e$18.Gender] };
259
+ for (let e in i) {
260
+ let n = i[e];
261
+ i[e] = r(n, {
262
+ ...t,
263
+ children: n,
264
+ keyPath: [...t.keyPath, {
265
+ type: e$18.Gender,
266
+ key: e
267
+ }]
268
+ });
269
+ }
270
+ return (e) => t$10(i, e);
271
+ }
272
+ }, f$3 = (e) => ({
273
+ id: `nested-plugin`,
274
+ canHandle: (e) => typeof e == `object` && (e?.nodeType === e$18.Nested || e?.nodeType === `nested`),
275
+ transform: (t, n) => t$8(t.nested.dictionaryKey, t.nested.path, {
276
+ ...n,
277
+ locale: e ?? n.locale
278
+ })
279
+ }), p$2 = {
280
+ id: `file-plugin`,
281
+ canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.File,
282
+ transform: (e, t, n) => n(e.content, {
283
+ ...t,
284
+ children: e.content
285
+ })
286
+ };
287
+ //#endregion
288
+ //#region ../@intlayer/core/dist/esm/interpreter/getContent/getContent.mjs
289
+ var l$3 = (e, l = !0) => [
290
+ s$5(e ?? configuration_default.internationalization.defaultLocale, l ? configuration_default.internationalization.defaultLocale : void 0),
291
+ c$5,
292
+ l$4,
293
+ u$5,
294
+ f$3(e ?? configuration_default.internationalization.defaultLocale),
295
+ p$2,
296
+ d$5
297
+ ], u$4 = (t, n, r = []) => t$12(t, {
298
+ ...n,
299
+ plugins: r
300
+ });
301
+ //#endregion
302
+ //#region ../@intlayer/core/dist/esm/interpreter/getDictionary.mjs
303
+ var n$7 = (n, r, i = l$3(r)) => {
304
+ let a = {
305
+ dictionaryKey: n.key,
306
+ dictionaryPath: n.filePath,
307
+ keyPath: [],
308
+ plugins: i
309
+ };
310
+ return u$4(n.content, a, i);
311
+ };
312
+ //#endregion
313
+ //#region ../@intlayer/core/dist/esm/utils/isSameKeyPath.mjs
314
+ var e$11 = (e, t) => e.every((e, n) => t[n] && t[n].key === e.key && t[n].type === e.type);
315
+ //#endregion
316
+ //#region ../@intlayer/editor/dist/esm/compareUrls.mjs
317
+ var e$10 = (e, t) => {
318
+ try {
319
+ let n = new URL(e), r = new URL(t);
320
+ if (n.protocol !== r.protocol || n.hostname !== r.hostname || n.port !== r.port) return !1;
321
+ let i = n.pathname.replace(/\/$/, ``), a = r.pathname.replace(/\/$/, ``);
322
+ return !(i !== `` && a !== `` && i !== a);
323
+ } catch (n) {
324
+ return console.error(`Invalid URL(s)`, n, {
325
+ url1: e,
326
+ url2: t
327
+ }), !1;
328
+ }
329
+ };
330
+ //#endregion
331
+ //#region ../@intlayer/editor/dist/esm/messageKey.mjs
332
+ var e$9 = function(e) {
333
+ return e.INTLAYER_CLIENT_READY = `INTLAYER_CLIENT_READY`, e.INTLAYER_ARE_YOU_THERE = `INTLAYER_ARE_YOU_THERE`, e.INTLAYER_EDITOR_ACTIVATE = `INTLAYER_EDITOR_ACTIVATE`, e.INTLAYER_EDITOR_ENABLED = `INTLAYER_EDITOR_ENABLED`, e.INTLAYER_CONFIGURATION = `INTLAYER_CONFIGURATION`, e.INTLAYER_CURRENT_LOCALE = `INTLAYER_CURRENT_LOCALE`, e.INTLAYER_URL_CHANGE = `INTLAYER_URL_CHANGE`, e.INTLAYER_LOCALE_DICTIONARIES_CHANGED = `INTLAYER_LOCALE_DICTIONARIES_CHANGED`, e.INTLAYER_DISTANT_DICTIONARIES_CHANGED = `INTLAYER_DISTANT_DICTIONARIES_CHANGED`, e.INTLAYER_HOVERED_CONTENT_CHANGED = `INTLAYER_HOVERED_CONTENT_CHANGED`, e.INTLAYER_FOCUSED_CONTENT_CHANGED = `INTLAYER_FOCUSED_CONTENT_CHANGED`, e.INTLAYER_EDITED_CONTENT_CHANGED = `INTLAYER_EDITED_CONTENT_CHANGED`, e.INTLAYER_IFRAME_CLICKED = `INTLAYER_IFRAME_CLICKED`, e;
334
+ }({});
335
+ //#endregion
336
+ //#region ../@intlayer/editor/dist/esm/mergeIframeClick.mjs
337
+ var e$8 = (e) => {
338
+ let t = new MouseEvent(`mousedown`, {
339
+ bubbles: !0,
340
+ cancelable: !0,
341
+ view: window
342
+ }), n = new MouseEvent(`click`, {
343
+ bubbles: !0,
344
+ cancelable: !0,
345
+ view: window
346
+ });
347
+ Object.assign(n, { iframeData: e }), Object.assign(t, { iframeData: e }), window.dispatchEvent(n), window.dispatchEvent(t);
348
+ };
349
+ //#endregion
350
+ //#region ../@intlayer/editor/dist/esm/core/globalManager.mjs
351
+ var e$7 = `__intlayer_editor_manager__`, t$6 = `__intlayer_editor_manager_events__`, n$6 = () => {
352
+ if (typeof window > `u`) return new EventTarget();
353
+ let e = window;
354
+ return e[t$6] || (e[t$6] = new EventTarget()), e[t$6];
355
+ }, r$5 = () => typeof window > `u` ? null : window[e$7] ?? null, i$4 = (t) => {
356
+ if (typeof window < `u`) {
357
+ let n = window;
358
+ n[e$7] = t;
359
+ }
360
+ n$6().dispatchEvent(new CustomEvent(`change`, { detail: t }));
361
+ }, a$3 = (e) => {
362
+ let t = n$6(), r = (t) => {
363
+ e(t.detail);
364
+ };
365
+ return t.addEventListener(`change`, r), () => {
366
+ t.removeEventListener(`change`, r);
367
+ };
368
+ };
369
+ //#endregion
370
+ //#region ../@intlayer/editor/dist/esm/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorate.mjs
371
+ function e$6(e, t, n, r) {
372
+ var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
373
+ if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
374
+ else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
375
+ return i > 3 && a && Object.defineProperty(t, n, a), a;
376
+ }
377
+ //#endregion
378
+ //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js
379
+ /**
380
+ * @license
381
+ * Copyright 2019 Google LLC
382
+ * SPDX-License-Identifier: BSD-3-Clause
383
+ */
384
+ var t$5 = globalThis, e$5 = t$5.ShadowRoot && (void 0 === t$5.ShadyCSS || t$5.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$4 = Symbol(), o$5 = /* @__PURE__ */ new WeakMap();
385
+ var n$5 = class {
386
+ constructor(t, e, o) {
387
+ if (this._$cssResult$ = !0, o !== s$4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
388
+ this.cssText = t, this.t = e;
389
+ }
390
+ get styleSheet() {
391
+ let t = this.o;
392
+ const s = this.t;
393
+ if (e$5 && void 0 === t) {
394
+ const e = void 0 !== s && 1 === s.length;
395
+ e && (t = o$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$5.set(s, t));
396
+ }
397
+ return t;
398
+ }
399
+ toString() {
400
+ return this.cssText;
401
+ }
402
+ };
403
+ var r$4 = (t) => new n$5("string" == typeof t ? t : t + "", void 0, s$4), i$3 = (t, ...e) => {
404
+ return new n$5(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => {
405
+ if (!0 === t._$cssResult$) return t.cssText;
406
+ if ("number" == typeof t) return t;
407
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
408
+ })(s) + t[o + 1], t[0]), t, s$4);
409
+ }, S$1 = (s, o) => {
410
+ if (e$5) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
411
+ else for (const e of o) {
412
+ const o = document.createElement("style"), n = t$5.litNonce;
413
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
414
+ }
415
+ }, c$4 = e$5 ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
416
+ let e = "";
417
+ for (const s of t.cssRules) e += s.cssText;
418
+ return r$4(e);
419
+ })(t) : t;
420
+ //#endregion
421
+ //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js
422
+ /**
423
+ * @license
424
+ * Copyright 2017 Google LLC
425
+ * SPDX-License-Identifier: BSD-3-Clause
426
+ */ var { is: i$2, defineProperty: e$4, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$4, getPrototypeOf: n$4 } = Object, a$2 = globalThis, c$3 = a$2.trustedTypes, l$2 = c$3 ? c$3.emptyScript : "", p$1 = a$2.reactiveElementPolyfillSupport, d$4 = (t, s) => t, u$3 = {
427
+ toAttribute(t, s) {
428
+ switch (s) {
429
+ case Boolean:
430
+ t = t ? l$2 : null;
431
+ break;
432
+ case Object:
433
+ case Array: t = null == t ? t : JSON.stringify(t);
434
+ }
435
+ return t;
436
+ },
437
+ fromAttribute(t, s) {
438
+ let i = t;
439
+ switch (s) {
440
+ case Boolean:
441
+ i = null !== t;
442
+ break;
443
+ case Number:
444
+ i = null === t ? null : Number(t);
445
+ break;
446
+ case Object:
447
+ case Array: try {
448
+ i = JSON.parse(t);
449
+ } catch (t) {
450
+ i = null;
451
+ }
452
+ }
453
+ return i;
454
+ }
455
+ }, f$2 = (t, s) => !i$2(t, s), b$1 = {
456
+ attribute: !0,
457
+ type: String,
458
+ converter: u$3,
459
+ reflect: !1,
460
+ useDefault: !1,
461
+ hasChanged: f$2
462
+ };
463
+ Symbol.metadata ??= Symbol("metadata"), a$2.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
464
+ var y$1 = class extends HTMLElement {
465
+ static addInitializer(t) {
466
+ this._$Ei(), (this.l ??= []).push(t);
467
+ }
468
+ static get observedAttributes() {
469
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
470
+ }
471
+ static createProperty(t, s = b$1) {
472
+ if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
473
+ const i = Symbol(), h = this.getPropertyDescriptor(t, i, s);
474
+ void 0 !== h && e$4(this.prototype, t, h);
475
+ }
476
+ }
477
+ static getPropertyDescriptor(t, s, i) {
478
+ const { get: e, set: r } = h$1(this.prototype, t) ?? {
479
+ get() {
480
+ return this[s];
481
+ },
482
+ set(t) {
483
+ this[s] = t;
484
+ }
485
+ };
486
+ return {
487
+ get: e,
488
+ set(s) {
489
+ const h = e?.call(this);
490
+ r?.call(this, s), this.requestUpdate(t, h, i);
491
+ },
492
+ configurable: !0,
493
+ enumerable: !0
494
+ };
495
+ }
496
+ static getPropertyOptions(t) {
497
+ return this.elementProperties.get(t) ?? b$1;
498
+ }
499
+ static _$Ei() {
500
+ if (this.hasOwnProperty(d$4("elementProperties"))) return;
501
+ const t = n$4(this);
502
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
503
+ }
504
+ static finalize() {
505
+ if (this.hasOwnProperty(d$4("finalized"))) return;
506
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$4("properties"))) {
507
+ const t = this.properties, s = [...r$3(t), ...o$4(t)];
508
+ for (const i of s) this.createProperty(i, t[i]);
509
+ }
510
+ const t = this[Symbol.metadata];
511
+ if (null !== t) {
512
+ const s = litPropertyMetadata.get(t);
513
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
514
+ }
515
+ this._$Eh = /* @__PURE__ */ new Map();
516
+ for (const [t, s] of this.elementProperties) {
517
+ const i = this._$Eu(t, s);
518
+ void 0 !== i && this._$Eh.set(i, t);
519
+ }
520
+ this.elementStyles = this.finalizeStyles(this.styles);
521
+ }
522
+ static finalizeStyles(s) {
523
+ const i = [];
524
+ if (Array.isArray(s)) {
525
+ const e = new Set(s.flat(Infinity).reverse());
526
+ for (const s of e) i.unshift(c$4(s));
527
+ } else void 0 !== s && i.push(c$4(s));
528
+ return i;
529
+ }
530
+ static _$Eu(t, s) {
531
+ const i = s.attribute;
532
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
533
+ }
534
+ constructor() {
535
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
536
+ }
537
+ _$Ev() {
538
+ this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
539
+ }
540
+ addController(t) {
541
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
542
+ }
543
+ removeController(t) {
544
+ this._$EO?.delete(t);
545
+ }
546
+ _$E_() {
547
+ const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
548
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
549
+ t.size > 0 && (this._$Ep = t);
550
+ }
551
+ createRenderRoot() {
552
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
553
+ return S$1(t, this.constructor.elementStyles), t;
554
+ }
555
+ connectedCallback() {
556
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
557
+ }
558
+ enableUpdating(t) {}
559
+ disconnectedCallback() {
560
+ this._$EO?.forEach((t) => t.hostDisconnected?.());
561
+ }
562
+ attributeChangedCallback(t, s, i) {
563
+ this._$AK(t, i);
564
+ }
565
+ _$ET(t, s) {
566
+ const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
567
+ if (void 0 !== e && !0 === i.reflect) {
568
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$3).toAttribute(s, i.type);
569
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
570
+ }
571
+ }
572
+ _$AK(t, s) {
573
+ const i = this.constructor, e = i._$Eh.get(t);
574
+ if (void 0 !== e && this._$Em !== e) {
575
+ const t = i.getPropertyOptions(e), h = "function" == typeof t.converter ? { fromAttribute: t.converter } : void 0 !== t.converter?.fromAttribute ? t.converter : u$3;
576
+ this._$Em = e;
577
+ const r = h.fromAttribute(s, t.type);
578
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
579
+ }
580
+ }
581
+ requestUpdate(t, s, i, e = !1, h) {
582
+ if (void 0 !== t) {
583
+ const r = this.constructor;
584
+ if (!1 === e && (h = this[t]), i ??= r.getPropertyOptions(t), !((i.hasChanged ?? f$2)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
585
+ this.C(t, s, i);
586
+ }
587
+ !1 === this.isUpdatePending && (this._$ES = this._$EP());
588
+ }
589
+ C(t, s, { useDefault: i, reflect: e, wrapped: h }, r) {
590
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
591
+ }
592
+ async _$EP() {
593
+ this.isUpdatePending = !0;
594
+ try {
595
+ await this._$ES;
596
+ } catch (t) {
597
+ Promise.reject(t);
598
+ }
599
+ const t = this.scheduleUpdate();
600
+ return null != t && await t, !this.isUpdatePending;
601
+ }
602
+ scheduleUpdate() {
603
+ return this.performUpdate();
604
+ }
605
+ performUpdate() {
606
+ if (!this.isUpdatePending) return;
607
+ if (!this.hasUpdated) {
608
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
609
+ for (const [t, s] of this._$Ep) this[t] = s;
610
+ this._$Ep = void 0;
611
+ }
612
+ const t = this.constructor.elementProperties;
613
+ if (t.size > 0) for (const [s, i] of t) {
614
+ const { wrapped: t } = i, e = this[s];
615
+ !0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
616
+ }
617
+ }
618
+ let t = !1;
619
+ const s = this._$AL;
620
+ try {
621
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((t) => t.hostUpdate?.()), this.update(s)) : this._$EM();
622
+ } catch (s) {
623
+ throw t = !1, this._$EM(), s;
624
+ }
625
+ t && this._$AE(s);
626
+ }
627
+ willUpdate(t) {}
628
+ _$AE(t) {
629
+ this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
630
+ }
631
+ _$EM() {
632
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
633
+ }
634
+ get updateComplete() {
635
+ return this.getUpdateComplete();
636
+ }
637
+ getUpdateComplete() {
638
+ return this._$ES;
639
+ }
640
+ shouldUpdate(t) {
641
+ return !0;
642
+ }
643
+ update(t) {
644
+ this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
645
+ }
646
+ updated(t) {}
647
+ firstUpdated(t) {}
648
+ };
649
+ y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$4("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$4("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$1 }), (a$2.reactiveElementVersions ??= []).push("2.1.2");
650
+ //#endregion
651
+ //#region ../../node_modules/.bun/lit-html@3.3.2/node_modules/lit-html/lit-html.js
652
+ /**
653
+ * @license
654
+ * Copyright 2017 Google LLC
655
+ * SPDX-License-Identifier: BSD-3-Clause
656
+ */
657
+ var t$4 = globalThis, i$1 = (t) => t, s$3 = t$4.trustedTypes, e$3 = s$3 ? s$3.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, h = "$lit$", o$3 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$3 = "?" + o$3, r$2 = `<${n$3}>`, l$1 = document, c$2 = () => l$1.createComment(""), a$1 = (t) => null === t || "object" != typeof t && "function" != typeof t, u$2 = Array.isArray, d$3 = (t) => u$2(t) || "function" == typeof t?.[Symbol.iterator], f$1 = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f$1}(?:([^\\s"'>=/]+)(${f$1}*=${f$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = (t) => (i, ...s) => ({
658
+ _$litType$: t,
659
+ strings: i,
660
+ values: s
661
+ }), b = x(1);
662
+ x(2);
663
+ x(3);
664
+ var E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l$1.createTreeWalker(l$1, 129);
665
+ function V(t, i) {
666
+ if (!u$2(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
667
+ return void 0 !== e$3 ? e$3.createHTML(i) : i;
668
+ }
669
+ var N = (t, i) => {
670
+ const s = t.length - 1, e = [];
671
+ let n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v;
672
+ for (let i = 0; i < s; i++) {
673
+ const s = t[i];
674
+ let a, u, d = -1, f = 0;
675
+ for (; f < s.length && (c.lastIndex = f, u = c.exec(s), null !== u);) f = c.lastIndex, c === v ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n ?? v, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : "\"" === u[3] ? $ : g) : c === $ || c === g ? c = p : c === _ || c === m ? c = v : (c = p, n = void 0);
676
+ const x = c === p && t[i + 1].startsWith("/>") ? " " : "";
677
+ l += c === v ? s + r$2 : d >= 0 ? (e.push(a), s.slice(0, d) + h + s.slice(d) + o$3 + x) : s + o$3 + (-2 === d ? i : x);
678
+ }
679
+ return [V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
680
+ };
681
+ var S = class S {
682
+ constructor({ strings: t, _$litType$: i }, e) {
683
+ let r;
684
+ this.parts = [];
685
+ let l = 0, a = 0;
686
+ const u = t.length - 1, d = this.parts, [f, v] = N(t, i);
687
+ if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
688
+ const t = this.el.content.firstChild;
689
+ t.replaceWith(...t.childNodes);
690
+ }
691
+ for (; null !== (r = P.nextNode()) && d.length < u;) {
692
+ if (1 === r.nodeType) {
693
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(h)) {
694
+ const i = v[a++], s = r.getAttribute(t).split(o$3), e = /([.?@])?(.*)/.exec(i);
695
+ d.push({
696
+ type: 1,
697
+ index: l,
698
+ name: e[2],
699
+ strings: s,
700
+ ctor: "." === e[1] ? I : "?" === e[1] ? L : "@" === e[1] ? z : H
701
+ }), r.removeAttribute(t);
702
+ } else t.startsWith(o$3) && (d.push({
703
+ type: 6,
704
+ index: l
705
+ }), r.removeAttribute(t));
706
+ if (y.test(r.tagName)) {
707
+ const t = r.textContent.split(o$3), i = t.length - 1;
708
+ if (i > 0) {
709
+ r.textContent = s$3 ? s$3.emptyScript : "";
710
+ for (let s = 0; s < i; s++) r.append(t[s], c$2()), P.nextNode(), d.push({
711
+ type: 2,
712
+ index: ++l
713
+ });
714
+ r.append(t[i], c$2());
715
+ }
716
+ }
717
+ } else if (8 === r.nodeType) if (r.data === n$3) d.push({
718
+ type: 2,
719
+ index: l
720
+ });
721
+ else {
722
+ let t = -1;
723
+ for (; -1 !== (t = r.data.indexOf(o$3, t + 1));) d.push({
724
+ type: 7,
725
+ index: l
726
+ }), t += o$3.length - 1;
727
+ }
728
+ l++;
729
+ }
730
+ }
731
+ static createElement(t, i) {
732
+ const s = l$1.createElement("template");
733
+ return s.innerHTML = t, s;
734
+ }
735
+ };
736
+ function M(t, i, s = t, e) {
737
+ if (i === E) return i;
738
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
739
+ const o = a$1(i) ? void 0 : i._$litDirective$;
740
+ return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
741
+ }
742
+ var R = class {
743
+ constructor(t, i) {
744
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
745
+ }
746
+ get parentNode() {
747
+ return this._$AM.parentNode;
748
+ }
749
+ get _$AU() {
750
+ return this._$AM._$AU;
751
+ }
752
+ u(t) {
753
+ const { el: { content: i }, parts: s } = this._$AD, e = (t?.creationScope ?? l$1).importNode(i, !0);
754
+ P.currentNode = e;
755
+ let h = P.nextNode(), o = 0, n = 0, r = s[0];
756
+ for (; void 0 !== r;) {
757
+ if (o === r.index) {
758
+ let i;
759
+ 2 === r.type ? i = new k(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new Z(h, this, t)), this._$AV.push(i), r = s[++n];
760
+ }
761
+ o !== r?.index && (h = P.nextNode(), o++);
762
+ }
763
+ return P.currentNode = l$1, e;
764
+ }
765
+ p(t) {
766
+ let i = 0;
767
+ for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
768
+ }
769
+ };
770
+ var k = class k {
771
+ get _$AU() {
772
+ return this._$AM?._$AU ?? this._$Cv;
773
+ }
774
+ constructor(t, i, s, e) {
775
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
776
+ }
777
+ get parentNode() {
778
+ let t = this._$AA.parentNode;
779
+ const i = this._$AM;
780
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
781
+ }
782
+ get startNode() {
783
+ return this._$AA;
784
+ }
785
+ get endNode() {
786
+ return this._$AB;
787
+ }
788
+ _$AI(t, i = this) {
789
+ t = M(this, t, i), a$1(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d$3(t) ? this.k(t) : this._(t);
790
+ }
791
+ O(t) {
792
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
793
+ }
794
+ T(t) {
795
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
796
+ }
797
+ _(t) {
798
+ this._$AH !== A && a$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l$1.createTextNode(t)), this._$AH = t;
799
+ }
800
+ $(t) {
801
+ const { values: i, _$litType$: s } = t, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
802
+ if (this._$AH?._$AD === e) this._$AH.p(i);
803
+ else {
804
+ const t = new R(e, this), s = t.u(this.options);
805
+ t.p(i), this.T(s), this._$AH = t;
806
+ }
807
+ }
808
+ _$AC(t) {
809
+ let i = C.get(t.strings);
810
+ return void 0 === i && C.set(t.strings, i = new S(t)), i;
811
+ }
812
+ k(t) {
813
+ u$2(this._$AH) || (this._$AH = [], this._$AR());
814
+ const i = this._$AH;
815
+ let s, e = 0;
816
+ for (const h of t) e === i.length ? i.push(s = new k(this.O(c$2()), this.O(c$2()), this, this.options)) : s = i[e], s._$AI(h), e++;
817
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
818
+ }
819
+ _$AR(t = this._$AA.nextSibling, s) {
820
+ for (this._$AP?.(!1, !0, s); t !== this._$AB;) {
821
+ const s = i$1(t).nextSibling;
822
+ i$1(t).remove(), t = s;
823
+ }
824
+ }
825
+ setConnected(t) {
826
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
827
+ }
828
+ };
829
+ var H = class {
830
+ get tagName() {
831
+ return this.element.tagName;
832
+ }
833
+ get _$AU() {
834
+ return this._$AM._$AU;
835
+ }
836
+ constructor(t, i, s, e, h) {
837
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = A;
838
+ }
839
+ _$AI(t, i = this, s, e) {
840
+ const h = this.strings;
841
+ let o = !1;
842
+ if (void 0 === h) t = M(this, t, i, 0), o = !a$1(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
843
+ else {
844
+ const e = t;
845
+ let n, r;
846
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = M(this, e[s + n], i, n), r === E && (r = this._$AH[n]), o ||= !a$1(r) || r !== this._$AH[n], r === A ? t = A : t !== A && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
847
+ }
848
+ o && !e && this.j(t);
849
+ }
850
+ j(t) {
851
+ t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
852
+ }
853
+ };
854
+ var I = class extends H {
855
+ constructor() {
856
+ super(...arguments), this.type = 3;
857
+ }
858
+ j(t) {
859
+ this.element[this.name] = t === A ? void 0 : t;
860
+ }
861
+ };
862
+ var L = class extends H {
863
+ constructor() {
864
+ super(...arguments), this.type = 4;
865
+ }
866
+ j(t) {
867
+ this.element.toggleAttribute(this.name, !!t && t !== A);
868
+ }
869
+ };
870
+ var z = class extends H {
871
+ constructor(t, i, s, e, h) {
872
+ super(t, i, s, e, h), this.type = 5;
873
+ }
874
+ _$AI(t, i = this) {
875
+ if ((t = M(this, t, i, 0) ?? A) === E) return;
876
+ const s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
877
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
878
+ }
879
+ handleEvent(t) {
880
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
881
+ }
882
+ };
883
+ var Z = class {
884
+ constructor(t, i, s) {
885
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
886
+ }
887
+ get _$AU() {
888
+ return this._$AM._$AU;
889
+ }
890
+ _$AI(t) {
891
+ M(this, t);
892
+ }
893
+ }, B = t$4.litHtmlPolyfillSupport;
894
+ B?.(S, k), (t$4.litHtmlVersions ??= []).push("3.3.2");
895
+ var D = (t, i, s) => {
896
+ const e = s?.renderBefore ?? i;
897
+ let h = e._$litPart$;
898
+ if (void 0 === h) {
899
+ const t = s?.renderBefore ?? null;
900
+ e._$litPart$ = h = new k(i.insertBefore(c$2(), t), t, void 0, s ?? {});
901
+ }
902
+ return h._$AI(t), h;
903
+ };
904
+ //#endregion
905
+ //#region ../../node_modules/.bun/lit-element@4.2.2/node_modules/lit-element/lit-element.js
906
+ /**
907
+ * @license
908
+ * Copyright 2017 Google LLC
909
+ * SPDX-License-Identifier: BSD-3-Clause
910
+ */ var s$2 = globalThis;
911
+ var i = class extends y$1 {
912
+ constructor() {
913
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
914
+ }
915
+ createRenderRoot() {
916
+ const t = super.createRenderRoot();
917
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
918
+ }
919
+ update(t) {
920
+ const r = this.render();
921
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(r, this.renderRoot, this.renderOptions);
922
+ }
923
+ connectedCallback() {
924
+ super.connectedCallback(), this._$Do?.setConnected(!0);
925
+ }
926
+ disconnectedCallback() {
927
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
928
+ }
929
+ render() {
930
+ return E;
931
+ }
932
+ };
933
+ i._$litElement$ = !0, i["finalized"] = !0, s$2.litElementHydrateSupport?.({ LitElement: i });
934
+ var o$2 = s$2.litElementPolyfillSupport;
935
+ o$2?.({ LitElement: i });
936
+ (s$2.litElementVersions ??= []).push("4.2.2");
937
+ //#endregion
938
+ //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js
939
+ /**
940
+ * @license
941
+ * Copyright 2017 Google LLC
942
+ * SPDX-License-Identifier: BSD-3-Clause
943
+ */ var o$1 = {
944
+ attribute: !0,
945
+ type: String,
946
+ converter: u$3,
947
+ reflect: !1,
948
+ hasChanged: f$2
949
+ }, r$1 = (t = o$1, e, r) => {
950
+ const { kind: n, metadata: i } = r;
951
+ let s = globalThis.litPropertyMetadata.get(i);
952
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) {
953
+ const { name: o } = r;
954
+ return {
955
+ set(r) {
956
+ const n = e.get.call(this);
957
+ e.set.call(this, r), this.requestUpdate(o, n, t, !0, r);
958
+ },
959
+ init(e) {
960
+ return void 0 !== e && this.C(o, void 0, t, e), e;
961
+ }
962
+ };
963
+ }
964
+ if ("setter" === n) {
965
+ const { name: o } = r;
966
+ return function(r) {
967
+ const n = this[o];
968
+ e.call(this, r), this.requestUpdate(o, n, t, !0, r);
969
+ };
970
+ }
971
+ throw Error("Unsupported decorator location: " + n);
972
+ };
973
+ function n$2(t) {
974
+ return (e, o) => "object" == typeof o ? r$1(t, e, o) : ((t, e, o) => {
975
+ const r = e.hasOwnProperty(o);
976
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
977
+ })(t, e, o);
978
+ }
979
+ //#endregion
980
+ //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js
981
+ /**
982
+ * @license
983
+ * Copyright 2017 Google LLC
984
+ * SPDX-License-Identifier: BSD-3-Clause
985
+ */ function r(r) {
986
+ return n$2({
987
+ ...r,
988
+ state: !0,
989
+ attribute: !1
990
+ });
991
+ }
992
+ //#endregion
993
+ //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/base.js
994
+ /**
995
+ * @license
996
+ * Copyright 2017 Google LLC
997
+ * SPDX-License-Identifier: BSD-3-Clause
998
+ */
999
+ var e$2 = (e, t, c) => (c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
1000
+ //#endregion
1001
+ //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/query.js
1002
+ /**
1003
+ * @license
1004
+ * Copyright 2017 Google LLC
1005
+ * SPDX-License-Identifier: BSD-3-Clause
1006
+ */ function e$1(e, r) {
1007
+ return (n, s, i) => {
1008
+ const o = (t) => t.renderRoot?.querySelector(e) ?? null;
1009
+ if (r) {
1010
+ const { get: e, set: r } = "object" == typeof s ? n : i ?? (() => {
1011
+ const t = Symbol();
1012
+ return {
1013
+ get() {
1014
+ return this[t];
1015
+ },
1016
+ set(e) {
1017
+ this[t] = e;
1018
+ }
1019
+ };
1020
+ })();
1021
+ return e$2(n, s, { get() {
1022
+ let t = e.call(this);
1023
+ return void 0 === t && (t = o(this), (null !== t || this.hasUpdated) && r.call(this, t)), t;
1024
+ } });
1025
+ }
1026
+ return e$2(n, s, { get() {
1027
+ return o(this);
1028
+ } });
1029
+ };
1030
+ }
1031
+ //#endregion
1032
+ //#region ../@intlayer/editor/dist/esm/components/ContentSelectorWrapper.mjs
1033
+ var d$2 = class extends i {
1034
+ constructor(...e) {
1035
+ super(...e), this.keyPathJson = `[]`, this.dictionaryKey = ``, this._editorEnabled = !1, this._isInIframe = !1, this._isSelected = !1, this._editedValue = void 0, this._unsubManager = null, this._unsubEnabled = null, this._unsubFocused = null, this._unsubEditedContent = null;
1036
+ }
1037
+ static {
1038
+ this.styles = i$3`
1039
+ :host {
1040
+ display: contents;
1041
+ }
1042
+ `;
1043
+ }
1044
+ connectedCallback() {
1045
+ super.connectedCallback(), typeof window < `u` && (this._isInIframe = window.self !== window.top), this._subscribeToManager();
1046
+ }
1047
+ disconnectedCallback() {
1048
+ super.disconnectedCallback(), this._teardown();
1049
+ }
1050
+ updated(e) {
1051
+ if (e.has(`keyPathJson`) || e.has(`dictionaryKey`)) {
1052
+ let e = r$5();
1053
+ e && this._updateEditedValue(e);
1054
+ }
1055
+ }
1056
+ _teardown() {
1057
+ this._unsubManager?.(), this._unsubEnabled?.(), this._unsubFocused?.(), this._unsubEditedContent?.(), this._unsubManager = null, this._unsubEnabled = null, this._unsubFocused = null, this._unsubEditedContent = null;
1058
+ }
1059
+ _subscribeToManager() {
1060
+ let e = r$5();
1061
+ e && this._setupManagerSubscriptions(e), this._unsubManager = a$3((e) => {
1062
+ this._unsubEnabled?.(), this._unsubFocused?.(), this._unsubEditedContent?.(), this._unsubEnabled = null, this._unsubFocused = null, this._unsubEditedContent = null, e ? this._setupManagerSubscriptions(e) : (this._editorEnabled = !1, this._isSelected = !1, this._editedValue = void 0);
1063
+ });
1064
+ }
1065
+ _setupManagerSubscriptions(e) {
1066
+ this._editorEnabled = e.editorEnabled.value ?? !1, this._updateIsSelected(e.focusedContent.value), this._updateEditedValue(e);
1067
+ let t = (e) => {
1068
+ this._editorEnabled = e.detail;
1069
+ }, n = (e) => {
1070
+ this._updateIsSelected(e.detail);
1071
+ }, r = () => {
1072
+ this._updateEditedValue(e);
1073
+ };
1074
+ e.editorEnabled.addEventListener(`change`, t), e.focusedContent.addEventListener(`change`, n), e.editedContent.addEventListener(`change`, r), this._unsubEnabled = () => e.editorEnabled.removeEventListener(`change`, t), this._unsubFocused = () => e.focusedContent.removeEventListener(`change`, n), this._unsubEditedContent = () => e.editedContent.removeEventListener(`change`, r);
1075
+ }
1076
+ _getRawKeyPath() {
1077
+ try {
1078
+ return JSON.parse(this.keyPathJson);
1079
+ } catch {
1080
+ return [];
1081
+ }
1082
+ }
1083
+ _getFilteredKeyPath() {
1084
+ return this._getRawKeyPath().filter((e) => e.type !== e$18.Translation);
1085
+ }
1086
+ _updateEditedValue(e) {
1087
+ let t = this._getFilteredKeyPath();
1088
+ if (!this.dictionaryKey || t.length === 0) {
1089
+ this._editedValue = void 0;
1090
+ return;
1091
+ }
1092
+ let n = this._getRawKeyPath(), r = n[n.length - 1]?.type;
1093
+ if (r === e$18.Markdown || r === e$18.HTML || r === e$18.Insertion || r === e$18.File) {
1094
+ this._editedValue = void 0;
1095
+ return;
1096
+ }
1097
+ let i = e.getContentValue(this.dictionaryKey, t);
1098
+ if (typeof i == `object` && i && i.nodeType === e$18.Translation) {
1099
+ let t = e.currentLocale.value;
1100
+ i = t ? i[e$18.Translation][t] : void 0;
1101
+ }
1102
+ this._editedValue = i;
1103
+ }
1104
+ _updateIsSelected(e) {
1105
+ if (!e) {
1106
+ this._isSelected = !1;
1107
+ return;
1108
+ }
1109
+ let t = this._getFilteredKeyPath();
1110
+ this._isSelected = e.dictionaryKey === this.dictionaryKey && (e.keyPath?.length ?? 0) > 0 && e$11(e.keyPath ?? [], t);
1111
+ }
1112
+ _handlePress(e) {
1113
+ e.stopPropagation();
1114
+ let n = r$5();
1115
+ n && n.focusedContent.set({
1116
+ dictionaryKey: this.dictionaryKey,
1117
+ keyPath: this._getFilteredKeyPath()
1118
+ });
1119
+ }
1120
+ _handleHover(n) {
1121
+ n.stopPropagation(), r$5()?.messenger.send(`${e$9.INTLAYER_HOVERED_CONTENT_CHANGED}/post`, {
1122
+ dictionaryKey: this.dictionaryKey,
1123
+ keyPath: this._getFilteredKeyPath()
1124
+ });
1125
+ }
1126
+ _handleUnhover(n) {
1127
+ n.stopPropagation(), r$5()?.messenger.send(`${e$9.INTLAYER_HOVERED_CONTENT_CHANGED}/post`, null);
1128
+ }
1129
+ render() {
1130
+ if (!this._isInIframe || !this._editorEnabled) return b`<slot></slot>`;
1131
+ let e = this._editedValue, t = typeof e == `string` || typeof e == `number` || typeof e == `boolean` ? e : b`<slot></slot>`;
1132
+ return b`
1133
+ <intlayer-content-selector
1134
+ ?is-selecting=${this._isSelected}
1135
+ @intlayer:press=${this._handlePress}
1136
+ @intlayer:hover=${this._handleHover}
1137
+ @intlayer:unhover=${this._handleUnhover}
1138
+ >
1139
+ ${t}
1140
+ </intlayer-content-selector>
1141
+ `;
1142
+ }
1143
+ };
1144
+ e$6([n$2({
1145
+ type: String,
1146
+ attribute: `key-path`
1147
+ })], d$2.prototype, `keyPathJson`, void 0), e$6([n$2({
1148
+ type: String,
1149
+ attribute: `dictionary-key`
1150
+ })], d$2.prototype, `dictionaryKey`, void 0), e$6([r()], d$2.prototype, `_editorEnabled`, void 0), e$6([r()], d$2.prototype, `_isInIframe`, void 0), e$6([r()], d$2.prototype, `_isSelected`, void 0), e$6([r()], d$2.prototype, `_editedValue`, void 0);
1151
+ var f = () => {
1152
+ typeof customElements > `u` || customElements.get(`intlayer-content-selector-wrapper`) || customElements.define(`intlayer-content-selector-wrapper`, d$2);
1153
+ };
1154
+ //#endregion
1155
+ //#region ../@intlayer/editor/dist/esm/components/EditedContent.mjs
1156
+ var u$1 = class extends i {
1157
+ constructor(...e) {
1158
+ super(...e), this.dictionaryKey = ``, this.keyPathJson = `[]`, this.locale = ``, this._editedText = null, this._unsubManager = null, this._unsubEditedContent = null;
1159
+ }
1160
+ static {
1161
+ this.styles = i$3`
1162
+ :host {
1163
+ display: contents;
1164
+ }
1165
+ `;
1166
+ }
1167
+ connectedCallback() {
1168
+ super.connectedCallback(), this._subscribeToManager();
1169
+ }
1170
+ disconnectedCallback() {
1171
+ super.disconnectedCallback(), this._teardown();
1172
+ }
1173
+ _teardown() {
1174
+ this._unsubManager?.(), this._unsubEditedContent?.(), this._unsubManager = null, this._unsubEditedContent = null;
1175
+ }
1176
+ _getKeyPath() {
1177
+ try {
1178
+ return JSON.parse(this.keyPathJson);
1179
+ } catch {
1180
+ return [];
1181
+ }
1182
+ }
1183
+ _resolveEditedText(e) {
1184
+ let t = this._getKeyPath(), n = e.getContentValue(this.dictionaryKey, t);
1185
+ if (n == null) {
1186
+ this._editedText = null;
1187
+ return;
1188
+ }
1189
+ if (typeof n == `string` || typeof n == `number`) {
1190
+ this._editedText = String(n);
1191
+ return;
1192
+ }
1193
+ if (typeof n == `object`) {
1194
+ let e = this.locale || void 0, r = u$4(n, {
1195
+ locale: e,
1196
+ dictionaryKey: this.dictionaryKey,
1197
+ keyPath: t
1198
+ }, l$3(e));
1199
+ typeof r == `string` || typeof r == `number` ? this._editedText = String(r) : (console.error(`[intlayer-edited-content] Incorrect edited content format. Expected string. Value: ${JSON.stringify(r)}`), this._editedText = null);
1200
+ return;
1201
+ }
1202
+ this._editedText = null;
1203
+ }
1204
+ _setupManagerSubscriptions(e) {
1205
+ this._resolveEditedText(e);
1206
+ let t = () => this._resolveEditedText(e);
1207
+ e.editedContent.addEventListener(`change`, t), this._unsubEditedContent = () => e.editedContent.removeEventListener(`change`, t);
1208
+ }
1209
+ _subscribeToManager() {
1210
+ let n = r$5();
1211
+ n && this._setupManagerSubscriptions(n), this._unsubManager = a$3((e) => {
1212
+ this._unsubEditedContent?.(), this._unsubEditedContent = null, e ? this._setupManagerSubscriptions(e) : this._editedText = null;
1213
+ });
1214
+ }
1215
+ render() {
1216
+ return b`
1217
+ <intlayer-content-selector-wrapper
1218
+ key-path=${this.keyPathJson}
1219
+ dictionary-key=${this.dictionaryKey}
1220
+ >
1221
+ ${this._editedText === null ? b`<slot></slot>` : this._editedText}
1222
+ </intlayer-content-selector-wrapper>
1223
+ `;
1224
+ }
1225
+ };
1226
+ e$6([n$2({
1227
+ type: String,
1228
+ attribute: `dictionary-key`
1229
+ })], u$1.prototype, `dictionaryKey`, void 0), e$6([n$2({
1230
+ type: String,
1231
+ attribute: `key-path`
1232
+ })], u$1.prototype, `keyPathJson`, void 0), e$6([n$2({
1233
+ type: String,
1234
+ attribute: `locale`
1235
+ })], u$1.prototype, `locale`, void 0), e$6([r()], u$1.prototype, `_editedText`, void 0);
1236
+ var d$1 = () => {
1237
+ typeof customElements > `u` || customElements.get(`intlayer-edited-content`) || customElements.define(`intlayer-edited-content`, u$1);
1238
+ };
1239
+ //#endregion
1240
+ //#region ../@intlayer/editor/dist/esm/core/CrossFrameMessenger.mjs
1241
+ var t$3 = () => Math.random().toString(36).slice(2);
1242
+ var n$1 = class {
1243
+ constructor(e) {
1244
+ this._subscribers = /* @__PURE__ */ new Map(), this._windowHandler = null, this._seenMessageIds = /* @__PURE__ */ new Set(), this._config = e, this.senderId = t$3();
1245
+ }
1246
+ start() {
1247
+ typeof window > `u` || this._windowHandler || (this._windowHandler = (e) => {
1248
+ this._handleMessage(e);
1249
+ }, window.addEventListener(`message`, this._windowHandler));
1250
+ }
1251
+ stop() {
1252
+ this._windowHandler &&= (window.removeEventListener(`message`, this._windowHandler), null);
1253
+ }
1254
+ send(e, n) {
1255
+ let r = {
1256
+ type: e,
1257
+ data: n,
1258
+ senderId: this.senderId,
1259
+ messageId: t$3()
1260
+ };
1261
+ for (let e of this._config.allowedOrigins) e && this._config.postMessageFn(r, e);
1262
+ }
1263
+ subscribe(e, t) {
1264
+ return this._subscribers.has(e) || this._subscribers.set(e, /* @__PURE__ */ new Set()), this._subscribers.get(e).add(t), () => {
1265
+ this._subscribers.get(e)?.delete(t);
1266
+ };
1267
+ }
1268
+ _handleMessage(t) {
1269
+ let n = t.data;
1270
+ if (!n || typeof n != `object`) return;
1271
+ let { type: r, data: i, senderId: a, messageId: o } = n;
1272
+ if (!r || typeof r != `string` || a === this.senderId) return;
1273
+ if (o) {
1274
+ if (this._seenMessageIds.has(o)) return;
1275
+ this._seenMessageIds.add(o), this._seenMessageIds.size > 200 && this._seenMessageIds.clear();
1276
+ }
1277
+ let { allowedOrigins: s } = this._config;
1278
+ if (!(!s || s.length === 0 || s.includes(`*`) || s.filter((e) => !!e && e !== ``).some((n) => e$10(n, t.origin)))) return;
1279
+ let c = this._subscribers.get(r);
1280
+ if (c) for (let e of c) e(i, a);
1281
+ }
1282
+ };
1283
+ //#endregion
1284
+ //#region ../@intlayer/editor/dist/esm/core/CrossFrameStateManager.mjs
1285
+ var e = class extends EventTarget {
1286
+ constructor(e, t, n = {}) {
1287
+ super(), this._unsubscribers = [], this._key = e, this._messenger = t, this._options = {
1288
+ emit: n.emit ?? !0,
1289
+ receive: n.receive ?? !0
1290
+ }, n.initialValue !== void 0 && (this._value = n.initialValue);
1291
+ }
1292
+ get value() {
1293
+ return this._value;
1294
+ }
1295
+ set(e) {
1296
+ this._value = e, this.dispatchEvent(new CustomEvent(`change`, { detail: e })), this._options.emit && this._messenger.send(`${this._key}/post`, e);
1297
+ }
1298
+ start() {
1299
+ if (this._options.receive) {
1300
+ let e = this._messenger.subscribe(`${this._key}/post`, (e) => {
1301
+ this._value = e, this.dispatchEvent(new CustomEvent(`change`, { detail: e }));
1302
+ });
1303
+ this._unsubscribers.push(e);
1304
+ }
1305
+ if (this._options.emit) {
1306
+ let e = this._messenger.subscribe(`${this._key}/get`, (e, t) => {
1307
+ t !== this._messenger.senderId && this._value !== void 0 && this._messenger.send(`${this._key}/post`, this._value);
1308
+ });
1309
+ this._unsubscribers.push(e);
1310
+ }
1311
+ this._options.receive && this._value === void 0 && this._messenger.send(`${this._key}/get`);
1312
+ }
1313
+ stop() {
1314
+ for (let e of this._unsubscribers) e();
1315
+ this._unsubscribers.length = 0;
1316
+ }
1317
+ postCurrentValue() {
1318
+ this._value !== void 0 && this._messenger.send(`${this._key}/post`, this._value);
1319
+ }
1320
+ };
1321
+ //#endregion
1322
+ //#region ../@intlayer/editor/dist/esm/core/IframeClickInterceptor.mjs
1323
+ var n = class {
1324
+ constructor(e) {
1325
+ this._mousedownHandler = null, this._unsubscribeMerge = null, this._messenger = e;
1326
+ }
1327
+ startInterceptor() {
1328
+ typeof window > `u` || (this._mousedownHandler = () => {
1329
+ this._messenger.send(e$9.INTLAYER_IFRAME_CLICKED);
1330
+ }, window.addEventListener(`mousedown`, this._mousedownHandler));
1331
+ }
1332
+ startMerger() {
1333
+ this._unsubscribeMerge = this._messenger.subscribe(e$9.INTLAYER_IFRAME_CLICKED, e$8);
1334
+ }
1335
+ stopInterceptor() {
1336
+ this._mousedownHandler &&= (window.removeEventListener(`mousedown`, this._mousedownHandler), null);
1337
+ }
1338
+ stopMerger() {
1339
+ this._unsubscribeMerge?.(), this._unsubscribeMerge = null;
1340
+ }
1341
+ };
1342
+ //#endregion
1343
+ //#region ../@intlayer/editor/dist/esm/core/UrlStateManager.mjs
1344
+ var t$2 = class {
1345
+ constructor(e) {
1346
+ this._originalPushState = null, this._originalReplaceState = null, this._listeners = [], this._messenger = e;
1347
+ }
1348
+ start() {
1349
+ if (typeof window > `u`) return;
1350
+ let t = () => {
1351
+ this._messenger.send(`${e$9.INTLAYER_URL_CHANGE}/post`, window.location.pathname);
1352
+ };
1353
+ this._originalPushState = history.pushState, this._originalReplaceState = history.replaceState;
1354
+ let n = (e) => function(...t) {
1355
+ e.apply(this, t), window.dispatchEvent(new Event(`locationchange`));
1356
+ };
1357
+ history.pushState = n(this._originalPushState), history.replaceState = n(this._originalReplaceState);
1358
+ for (let e of [
1359
+ `locationchange`,
1360
+ `popstate`,
1361
+ `hashchange`,
1362
+ `load`
1363
+ ]) {
1364
+ let n = t;
1365
+ window.addEventListener(e, n), this._listeners.push([e, n]);
1366
+ }
1367
+ t();
1368
+ }
1369
+ stop() {
1370
+ if (!(typeof window > `u`)) {
1371
+ for (let [e, t] of this._listeners) window.removeEventListener(e, t);
1372
+ this._listeners = [], this._originalPushState &&= (history.pushState = this._originalPushState, null), this._originalReplaceState &&= (history.replaceState = this._originalReplaceState, null);
1373
+ }
1374
+ }
1375
+ };
1376
+ //#endregion
1377
+ //#region ../@intlayer/core/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs
1378
+ var t$1 = (t, n, r) => {
1379
+ let i = t, a = null, o = [];
1380
+ if (n.length === 0) return r;
1381
+ try {
1382
+ for (let t = 0; t < n.length; t++) {
1383
+ let s = n[t];
1384
+ if (a = i, (s.type === e$18.Object || s.type === e$18.Array) && (o = [s.key], (!i[s.key] || typeof i[s.key] != `object`) && (i[s.key] = {}), i = i[s.key]), (s.type === e$18.Translation || s.type === e$18.Enumeration) && (o = [s.type, s.key], (!i[s.type] || typeof i[s.type] != `object`) && (i[s.type] = {}), (!i[s.type][s.key] || typeof i[s.type][s.key] != `object`) && (i[s.type][s.key] = {}), i = i[s.type][s.key]), (s.type === e$18.Enumeration || s.type === e$18.Condition) && s.type !== e$18.Enumeration && (o = [s.type, s.key], i = i[s.type][s.key]), (s.type === e$18.Markdown || s.type === e$18.HTML || s.type === e$18.Insertion) && (o = [s.type], (!i[s.type] || typeof i[s.type] != `object`) && (i[s.type] = ``), i = i[s.type]), s.type === e$18.File && (o = [`content`], i = i.content), t === n.length - 1 && a && o.length > 0) {
1385
+ let e = a;
1386
+ for (let t of o.slice(0, -1)) e = e[t];
1387
+ let t = o[o.length - 1];
1388
+ if (r === void 0) if (Array.isArray(e)) {
1389
+ let n = Number(t);
1390
+ !Number.isNaN(n) && n >= 0 && n < e.length && e.splice(n, 1);
1391
+ } else delete e[t];
1392
+ else e[t] = r;
1393
+ }
1394
+ }
1395
+ return t;
1396
+ } catch (e) {
1397
+ return console.error(`Cannot edit dictionary by key path`, {
1398
+ dictionaryContent: t,
1399
+ keyPath: n,
1400
+ newValue: r
1401
+ }, e), t;
1402
+ }
1403
+ };
1404
+ //#endregion
1405
+ //#region ../@intlayer/core/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs
1406
+ var t = (t, n, r) => {
1407
+ let i = t, a = null, o = null;
1408
+ for (let t of r) a = i, (t.type === e$18.Object || t.type === e$18.Array) && (o = t.key, i = i[t.key]), (t.type === e$18.Translation || t.type === e$18.Enumeration || t.type === e$18.Condition) && (o = t.type, i = i[t.type][t.key]), (t.type === e$18.Markdown || t.type === e$18.ReactNode || t.type === e$18.HTML || t.type === e$18.Insertion || t.type === e$18.File) && (o = t.type, i = i[t.type]);
1409
+ if (a && o !== null) if (Array.isArray(a)) a[o] = i;
1410
+ else {
1411
+ let e = {};
1412
+ for (let t of Object.keys(a)) t === o && n !== void 0 ? e[n] = i : e[t] = a[t];
1413
+ Object.keys(a).forEach((e) => {
1414
+ delete a[e];
1415
+ }), Object.assign(a, e);
1416
+ }
1417
+ return t;
1418
+ };
1419
+ //#endregion
1420
+ //#region ../@intlayer/editor/dist/esm/core/EditorStateManager.mjs
1421
+ var l = class {
1422
+ constructor(a) {
1423
+ this._unsubAreYouThere = null, this._unsubActivate = null, this._unsubClientReady = null, this._mode = a.mode, this._configuration = a.configuration, this.messenger = new n$1(a.messenger), this.editorEnabled = new e(e$9.INTLAYER_EDITOR_ENABLED, this.messenger, {
1424
+ emit: !1,
1425
+ receive: !0,
1426
+ initialValue: !1
1427
+ }), this.focusedContent = new e(e$9.INTLAYER_FOCUSED_CONTENT_CHANGED, this.messenger, {
1428
+ emit: !0,
1429
+ receive: !0,
1430
+ initialValue: null
1431
+ }), this.localeDictionaries = new e(e$9.INTLAYER_LOCALE_DICTIONARIES_CHANGED, this.messenger), this.editedContent = new e(e$9.INTLAYER_EDITED_CONTENT_CHANGED, this.messenger), this.configuration = new e(e$9.INTLAYER_CONFIGURATION, this.messenger, {
1432
+ emit: !0,
1433
+ receive: !1,
1434
+ ...a.configuration ? { initialValue: a.configuration } : {}
1435
+ }), this.currentLocale = new e(e$9.INTLAYER_CURRENT_LOCALE, this.messenger, {
1436
+ emit: a.mode === `client`,
1437
+ receive: a.mode === `editor`
1438
+ }), this._urlManager = new t$2(this.messenger), this._iframeInterceptor = new n(this.messenger);
1439
+ }
1440
+ start() {
1441
+ this.messenger.start(), this.editorEnabled.start(), this.focusedContent.start(), this.localeDictionaries.start(), this.editedContent.start(), this.configuration.start(), this.currentLocale.start(), this._mode === `client` ? (this._urlManager.start(), this._iframeInterceptor.startInterceptor(), this._loadDictionaries(), this.messenger.send(`${e$9.INTLAYER_EDITED_CONTENT_CHANGED}/get`), this._configuration?.editor?.enabled !== !1 && this._setupActivationHandshake()) : (this._iframeInterceptor.startMerger(), this._setupEditorHandshake());
1442
+ }
1443
+ stop() {
1444
+ this._unsubAreYouThere?.(), this._unsubActivate?.(), this._unsubClientReady?.(), this._unsubAreYouThere = null, this._unsubActivate = null, this._unsubClientReady = null, this.messenger.stop(), this.editorEnabled.stop(), this.focusedContent.stop(), this.localeDictionaries.stop(), this.editedContent.stop(), this.configuration.stop(), this.currentLocale.stop(), this._urlManager.stop(), this._iframeInterceptor.stopInterceptor(), this._iframeInterceptor.stopMerger();
1445
+ }
1446
+ pingClient() {
1447
+ this._mode === `editor` && this.messenger.send(e$9.INTLAYER_ARE_YOU_THERE);
1448
+ }
1449
+ setFocusedContentKeyPath(e) {
1450
+ let t = e.filter((e) => e.type !== e$18.Translation), n = this.focusedContent.value;
1451
+ n && this.focusedContent.set({
1452
+ ...n,
1453
+ keyPath: t
1454
+ });
1455
+ }
1456
+ setLocaleDictionary(e) {
1457
+ if (!e.localId) return;
1458
+ let t = this.localeDictionaries.value ?? {};
1459
+ this.localeDictionaries.set({
1460
+ ...t,
1461
+ [e.localId]: e
1462
+ });
1463
+ }
1464
+ setEditedDictionary(e) {
1465
+ if (!e.localId) {
1466
+ console.error(`setEditedDictionary: missing localId`, e);
1467
+ return;
1468
+ }
1469
+ let t = this.editedContent.value ?? {};
1470
+ this.editedContent.set({
1471
+ ...t,
1472
+ [e.localId]: e
1473
+ });
1474
+ }
1475
+ setEditedContent(e, t) {
1476
+ let n = this.editedContent.value ?? {};
1477
+ this.editedContent.set({
1478
+ ...n,
1479
+ [e]: {
1480
+ ...n[e],
1481
+ content: t
1482
+ }
1483
+ });
1484
+ }
1485
+ addContent(e, t, n = [], r = !0) {
1486
+ let i = this.editedContent.value ?? {}, a = (this.localeDictionaries.value ?? {})[e]?.content, c = structuredClone(i[e]?.content ?? a), l = n;
1487
+ if (!r) {
1488
+ let e = 0, t = n.slice(0, -1), r = n[n.length - 1], i = r.key;
1489
+ for (; t$13(c, l) !== void 0;) e++, i = e === 0 ? r.key : `${r.key} (${e})`, l = [...t, {
1490
+ ...r,
1491
+ key: i
1492
+ }];
1493
+ }
1494
+ let u = t$1(c, l, t);
1495
+ this.editedContent.set({
1496
+ ...i,
1497
+ [e]: {
1498
+ ...i[e],
1499
+ content: u
1500
+ }
1501
+ });
1502
+ }
1503
+ renameContent(e, t$14, n = []) {
1504
+ let r = this.editedContent.value ?? {}, i = (this.localeDictionaries.value ?? {})[e]?.content, a = t(structuredClone(r[e]?.content ?? i), t$14, n);
1505
+ this.editedContent.set({
1506
+ ...r,
1507
+ [e]: {
1508
+ ...r[e],
1509
+ content: a
1510
+ }
1511
+ });
1512
+ }
1513
+ removeContent(e, t) {
1514
+ let n = this.editedContent.value ?? {}, r = (this.localeDictionaries.value ?? {})[e]?.content, i = t$1(structuredClone(n[e]?.content ?? r), t, t$13(r, t));
1515
+ this.editedContent.set({
1516
+ ...n,
1517
+ [e]: {
1518
+ ...n[e],
1519
+ content: i
1520
+ }
1521
+ });
1522
+ }
1523
+ restoreContent(e) {
1524
+ let t = { ...this.editedContent.value ?? {} };
1525
+ delete t[e], this.editedContent.set(t);
1526
+ }
1527
+ clearContent(e) {
1528
+ let t = { ...this.editedContent.value ?? {} };
1529
+ delete t[e], this.editedContent.set(t);
1530
+ }
1531
+ clearAllContent() {
1532
+ this.editedContent.set({});
1533
+ }
1534
+ getContentValue(e, t) {
1535
+ let n = this.editedContent.value;
1536
+ if (!n) return;
1537
+ let r = t.filter((e) => e.type !== e$18.Translation), i = this.localeDictionaries.value;
1538
+ if (e.includes(`:local:`) || e.includes(`:remote:`)) return i && !(e in i) ? void 0 : t$13(n[e]?.content ?? {}, r, this.currentLocale.value);
1539
+ let o = Object.keys(n).filter((t) => t.startsWith(`${e}:`) && (!i || t in i));
1540
+ for (let e of o) {
1541
+ let t = t$13(n[e]?.content ?? {}, r, this.currentLocale.value);
1542
+ if (t) return t;
1543
+ }
1544
+ }
1545
+ _setupEditorHandshake() {
1546
+ this._unsubClientReady = this.messenger.subscribe(e$9.INTLAYER_CLIENT_READY, () => {
1547
+ this.editorEnabled.set(!0), this.messenger.send(e$9.INTLAYER_EDITOR_ACTIVATE);
1548
+ }), this.messenger.send(e$9.INTLAYER_ARE_YOU_THERE);
1549
+ }
1550
+ _setupActivationHandshake() {
1551
+ this.messenger.send(e$9.INTLAYER_CLIENT_READY), this._unsubAreYouThere = this.messenger.subscribe(e$9.INTLAYER_ARE_YOU_THERE, () => {
1552
+ this.messenger.send(e$9.INTLAYER_CLIENT_READY);
1553
+ }), this._unsubActivate = this.messenger.subscribe(e$9.INTLAYER_EDITOR_ACTIVATE, () => {
1554
+ this.editorEnabled.set(!0), this._broadcastData();
1555
+ });
1556
+ }
1557
+ _broadcastData() {
1558
+ let t = this.configuration.value;
1559
+ t && this.messenger.send(`${e$9.INTLAYER_CONFIGURATION}/post`, t);
1560
+ let n = this.currentLocale.value;
1561
+ n && this.messenger.send(`${e$9.INTLAYER_CURRENT_LOCALE}/post`, n);
1562
+ let r = this.localeDictionaries.value;
1563
+ r && this.messenger.send(`${e$9.INTLAYER_LOCALE_DICTIONARIES_CHANGED}/post`, r);
1564
+ }
1565
+ async _loadDictionaries() {
1566
+ try {
1567
+ let e = (await __vitePreload(async () => {
1568
+ const { getUnmergedDictionaries } = await import("./unmerged_dictionaries-C2Zsjv5l.js");
1569
+ return { getUnmergedDictionaries };
1570
+ }, [])).getUnmergedDictionaries(), t = Object.fromEntries(Object.values(e).flat().map((e) => [e.localId, e]));
1571
+ this.localeDictionaries.set(t), this.editorEnabled.value && this._broadcastData();
1572
+ } catch (e) {
1573
+ console.warn(`[intlayer] Failed to load unmerged dictionaries:`, e);
1574
+ }
1575
+ }
1576
+ };
1577
+ //#endregion
1578
+ //#region ../@intlayer/editor/dist/esm/components/IntlayerEditor.mjs
1579
+ var s$1 = class extends i {
1580
+ constructor(...e) {
1581
+ super(...e), this._initialized = !1, this._unsubManager = null;
1582
+ }
1583
+ createRenderRoot() {
1584
+ return this;
1585
+ }
1586
+ connectedCallback() {
1587
+ super.connectedCallback(), this._init();
1588
+ }
1589
+ disconnectedCallback() {
1590
+ super.disconnectedCallback(), this._unsubManager?.(), this._unsubManager = null, this._initialized &&= (c(), !1);
1591
+ }
1592
+ updated(e) {
1593
+ e.has(`configuration`) && !this._initialized && this._init(), e.has(`locale`) && this.locale && this._syncLocale(this.locale);
1594
+ }
1595
+ _init() {
1596
+ this._initialized || (s(), this._initialized = !0, this.locale && this._syncLocale(this.locale));
1597
+ }
1598
+ _syncLocale(n) {
1599
+ let r = r$5();
1600
+ r ? r.currentLocale.set(n) : (this._unsubManager?.(), this._unsubManager = a$3((e) => {
1601
+ e && (this._unsubManager?.(), this._unsubManager = null, e.currentLocale.set(n));
1602
+ }));
1603
+ }
1604
+ };
1605
+ e$6([n$2({ attribute: !1 })], s$1.prototype, `configuration`, void 0), e$6([n$2({ type: String })], s$1.prototype, `locale`, void 0);
1606
+ var c$1 = () => {
1607
+ typeof customElements > `u` || customElements.get(`intlayer-editor`) || customElements.define(`intlayer-editor`, s$1);
1608
+ };
1609
+ //#endregion
1610
+ //#region ../@intlayer/editor/dist/esm/components/ContentSelector.mjs
1611
+ var u = class extends i {
1612
+ constructor(...e) {
1613
+ super(...e), this.isSelecting = !1, this.pressDuration = 250, this._isHovered = !1, this._isSelectingState = !1, this._pressTimer = null, this._clickOutsideHandler = null;
1614
+ }
1615
+ static {
1616
+ this.styles = i$3`
1617
+ :host {
1618
+ display: contents;
1619
+ }
1620
+
1621
+ .wrapper {
1622
+ display: inline-block;
1623
+ cursor: pointer;
1624
+ user-select: none;
1625
+ border-radius: 0.375rem;
1626
+ outline-width: 2px;
1627
+ outline-offset: 4px;
1628
+ outline-style: solid;
1629
+ outline-color: transparent;
1630
+ transition: all 100ms 50ms ease-in-out;
1631
+ }
1632
+
1633
+ .wrapper[data-active] {
1634
+ outline-color: inherit;
1635
+ }
1636
+ `;
1637
+ }
1638
+ connectedCallback() {
1639
+ super.connectedCallback(), this._clickOutsideHandler = (e) => {
1640
+ e.composedPath().includes(this) || (this._isSelectingState = !1, this._dispatch(`intlayer:click-outside`));
1641
+ }, document.addEventListener(`mousedown`, this._clickOutsideHandler);
1642
+ }
1643
+ disconnectedCallback() {
1644
+ super.disconnectedCallback(), this._clickOutsideHandler &&= (document.removeEventListener(`mousedown`, this._clickOutsideHandler), null), this._clearPressTimer();
1645
+ }
1646
+ _clearPressTimer() {
1647
+ this._pressTimer !== null && (clearTimeout(this._pressTimer), this._pressTimer = null);
1648
+ }
1649
+ _dispatch(e) {
1650
+ this.dispatchEvent(new CustomEvent(e, {
1651
+ bubbles: !0,
1652
+ composed: !0
1653
+ }));
1654
+ }
1655
+ _handleMouseDown() {
1656
+ this._clearPressTimer(), this._pressTimer = setTimeout(() => {
1657
+ this._isSelectingState = !0, this._dispatch(`intlayer:press`);
1658
+ }, this.pressDuration);
1659
+ }
1660
+ _handleMouseEnter() {
1661
+ this._isHovered = !0, this._dispatch(`intlayer:hover`);
1662
+ }
1663
+ _handleMouseUpOrLeave() {
1664
+ this._isHovered && (this._isHovered = !1, this._dispatch(`intlayer:unhover`)), this._clearPressTimer();
1665
+ }
1666
+ _handleClick(e) {
1667
+ (this.isSelecting || this._isSelectingState) && (e.preventDefault(), e.stopPropagation());
1668
+ }
1669
+ _handleBlur() {
1670
+ this._isSelectingState = !1;
1671
+ }
1672
+ render() {
1673
+ return b`
1674
+ <span
1675
+ class="wrapper"
1676
+ ?data-active=${this.isSelecting || this._isSelectingState || this._isHovered}
1677
+ role="button"
1678
+ tabindex="0"
1679
+ @mousedown=${this._handleMouseDown}
1680
+ @mouseup=${this._handleMouseUpOrLeave}
1681
+ @mouseleave=${this._handleMouseUpOrLeave}
1682
+ @mouseenter=${this._handleMouseEnter}
1683
+ @click=${this._handleClick}
1684
+ @touchstart=${this._handleMouseDown}
1685
+ @touchend=${this._handleMouseUpOrLeave}
1686
+ @touchcancel=${this._handleMouseUpOrLeave}
1687
+ @blur=${this._handleBlur}
1688
+ @keyup=${() => {}}
1689
+ >
1690
+ <slot></slot>
1691
+ </span>
1692
+ `;
1693
+ }
1694
+ };
1695
+ e$6([n$2({
1696
+ type: Boolean,
1697
+ attribute: `is-selecting`
1698
+ })], u.prototype, `isSelecting`, void 0), e$6([n$2({
1699
+ type: Number,
1700
+ attribute: `press-duration`
1701
+ })], u.prototype, `pressDuration`, void 0), e$6([r()], u.prototype, `_isHovered`, void 0), e$6([r()], u.prototype, `_isSelectingState`, void 0), e$6([e$1(`.wrapper`)], u.prototype, `_wrapper`, void 0);
1702
+ var d = () => {
1703
+ typeof customElements > `u` || (customElements.get(`intlayer-content-selector`) || customElements.define(`intlayer-content-selector`, u), f(), d$1(), c$1());
1704
+ };
1705
+ //#endregion
1706
+ //#region ../@intlayer/editor/dist/esm/core/initEditorClient.mjs
1707
+ var a = () => {
1708
+ let { editor: e } = configuration_default ?? {};
1709
+ return {
1710
+ allowedOrigins: [e?.editorURL, e?.cmsURL].filter(Boolean),
1711
+ postMessageFn: (e, t) => {
1712
+ typeof window > `u` || window.self !== window.top && window.parent?.postMessage(e, t);
1713
+ }
1714
+ };
1715
+ };
1716
+ var o = 0;
1717
+ var s = () => {
1718
+ o++;
1719
+ let s = r$5();
1720
+ if (s) return s;
1721
+ let c = new l({
1722
+ mode: `client`,
1723
+ messenger: a(),
1724
+ configuration: configuration_default
1725
+ });
1726
+ return i$4(c), d(), c.start(), c;
1727
+ }, c = () => {
1728
+ o = Math.max(0, o - 1), !(o > 0) && (r$5()?.stop(), i$4(null));
1729
+ };
1730
+ //#endregion
1731
+ //#region ../@intlayer/editor/dist/esm/index.mjs
1732
+ var esm_exports = /* @__PURE__ */ __exportAll({
1733
+ getGlobalEditorManager: () => r$5,
1734
+ initEditorClient: () => s,
1735
+ onGlobalEditorManagerChange: () => a$3,
1736
+ stopEditorClient: () => c
1737
+ });
1738
+ //#endregion
1739
+ export { i$4 as a, e$11 as c, d$5 as d, f$3 as f, i$5 as g, s$5 as h, e as i, n$7 as l, p$2 as m, d as n, e$8 as o, l$4 as p, l as r, e$9 as s, esm_exports as t, c$5 as u };