@redneckz/wildless-cms-uni-blocks 0.2.85 → 0.2.86

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 (264) hide show
  1. package/bundle/blocks.schema.json +1 -945
  2. package/bundle/bundle.umd.js +194 -195
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/Accordion.js +1 -1
  5. package/dist/components/Accordion/Accordion.js.map +1 -1
  6. package/dist/components/Accordion/AccordionContent.d.ts +29 -10
  7. package/dist/components/Accordion/AccordionItem.d.ts +2 -2
  8. package/dist/components/Accordion/AccordionItem.js +5 -6
  9. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  10. package/dist/components/BaseTile/BaseTile.d.ts +2 -2
  11. package/dist/components/BaseTile/BaseTile.js +1 -1
  12. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  13. package/dist/components/BaseTile/BaseTileProps.d.ts +31 -0
  14. package/dist/{model/SitemapContent.js → components/BaseTile/BaseTileProps.js} +1 -1
  15. package/dist/components/BaseTile/BaseTileProps.js.map +1 -0
  16. package/dist/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  17. package/dist/components/BenefitsBlock/BenefitsBlock.js +2 -1
  18. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  19. package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +14 -1
  20. package/dist/components/BlockContent.d.ts +4 -1
  21. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +45 -2
  22. package/dist/components/ComparisonTable/HeaderCell.d.ts +2 -2
  23. package/dist/components/ContentPage/ContentPage.d.ts +3 -2
  24. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  25. package/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +4 -0
  26. package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  27. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  28. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  29. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +4 -0
  30. package/dist/components/Footer/Contacts.js +2 -2
  31. package/dist/components/Footer/Contacts.js.map +1 -1
  32. package/dist/components/Footer/FooterContent.d.ts +35 -9
  33. package/dist/components/Footer/FooterLink.d.ts +2 -2
  34. package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  35. package/dist/components/Footer/Sitemap.d.ts +1 -1
  36. package/dist/components/Footer/Sitemap.js +1 -1
  37. package/dist/components/Footer/Sitemap.js.map +1 -1
  38. package/dist/components/Footer/SocialMedia.d.ts +2 -2
  39. package/dist/components/Footer/TextInformation.js.map +1 -1
  40. package/dist/components/Gallery/GalleryContent.d.ts +13 -0
  41. package/dist/components/Header/HeaderContent.d.ts +10 -2
  42. package/dist/components/Header/isSubItemActive.d.ts +2 -2
  43. package/dist/components/Header/isSubItemActive.js.map +1 -1
  44. package/dist/components/Header/isTopItemActive.d.ts +2 -2
  45. package/dist/components/Header/isTopItemActive.js.map +1 -1
  46. package/dist/components/MiniGallery/MiniGallery.d.ts +3 -3
  47. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +6 -0
  48. package/dist/components/MiniGallery/MiniGalleryContent.js +2 -0
  49. package/dist/components/MiniGallery/MiniGalleryContent.js.map +1 -0
  50. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +11 -2
  51. package/dist/components/Placeholder/PlaceholderContent.d.ts +3 -0
  52. package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  53. package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  54. package/dist/components/ProductBlock/ProductBlockContent.d.ts +10 -5
  55. package/dist/components/ProductBlock/ProductBlockInner.d.ts +2 -2
  56. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  57. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  58. package/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
  59. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  60. package/dist/components/ProductGallery/ProductGalleryContent.d.ts +17 -2
  61. package/dist/components/ProductTile/ProductTileContent.d.ts +6 -2
  62. package/dist/components/PromoTile/PromoTileContent.d.ts +6 -2
  63. package/dist/components/StepsBlock/StepsBlockContent.d.ts +13 -0
  64. package/dist/components/TextBlock/TextBlockContent.d.ts +13 -0
  65. package/dist/components/Tile/TileContent.d.ts +5 -2
  66. package/dist/hooks/useLink.d.ts +3 -3
  67. package/dist/hooks/useLink.js.map +1 -1
  68. package/dist/index.d.ts +12 -12
  69. package/dist/index.js +10 -10
  70. package/dist/index.js.map +1 -1
  71. package/dist/mergeTopItems.d.ts +2 -2
  72. package/dist/mergeTopItems.js.map +1 -1
  73. package/dist/model/BlockVersion.d.ts +4 -0
  74. package/dist/model/ButtonVersion.d.ts +4 -0
  75. package/dist/model/LinkProps.d.ts +21 -0
  76. package/dist/model/{LinkContent.js → LinkProps.js} +1 -1
  77. package/dist/model/LinkProps.js.map +1 -0
  78. package/dist/model/Picture.d.ts +11 -0
  79. package/dist/model/SitemapProps.d.ts +13 -0
  80. package/dist/{components/BaseTile/BaseTileContent.js → model/SitemapProps.js} +1 -1
  81. package/dist/model/SitemapProps.js.map +1 -0
  82. package/dist/types.d.ts +2 -2
  83. package/dist/ui-kit/Breadcrumb.d.ts +2 -2
  84. package/dist/ui-kit/Button/Button.d.ts +6 -3
  85. package/dist/ui-kit/Button/Button.js.map +1 -1
  86. package/dist/ui-kit/Button/ButtonProps.d.ts +15 -12
  87. package/dist/ui-kit/Icon/IconProps.d.ts +49 -18
  88. package/dist/ui-kit/Icon/IconProps.js +21 -18
  89. package/dist/ui-kit/Icon/IconProps.js.map +1 -1
  90. package/dist/ui-kit/TopItem/TopItem.d.ts +2 -2
  91. package/lib/common.css +1 -1
  92. package/lib/components/Accordion/Accordion.js +1 -1
  93. package/lib/components/Accordion/Accordion.js.map +1 -1
  94. package/lib/components/Accordion/AccordionContent.d.ts +29 -10
  95. package/lib/components/Accordion/AccordionItem.d.ts +2 -2
  96. package/lib/components/Accordion/AccordionItem.js +5 -6
  97. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  98. package/lib/components/BaseTile/BaseTile.d.ts +2 -2
  99. package/lib/components/BaseTile/BaseTile.js +1 -1
  100. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  101. package/lib/components/BaseTile/BaseTileProps.d.ts +31 -0
  102. package/lib/components/BaseTile/BaseTileProps.js +2 -0
  103. package/lib/components/BaseTile/BaseTileProps.js.map +1 -0
  104. package/lib/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  105. package/lib/components/BenefitsBlock/BenefitsBlock.js +2 -1
  106. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  107. package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +14 -1
  108. package/lib/components/BlockContent.d.ts +4 -1
  109. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +45 -2
  110. package/lib/components/ComparisonTable/HeaderCell.d.ts +2 -2
  111. package/lib/components/ContentPage/ContentPage.d.ts +3 -2
  112. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  113. package/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +4 -0
  114. package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  115. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  116. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  117. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +4 -0
  118. package/lib/components/Footer/Contacts.js +2 -2
  119. package/lib/components/Footer/Contacts.js.map +1 -1
  120. package/lib/components/Footer/FooterContent.d.ts +35 -9
  121. package/lib/components/Footer/FooterLink.d.ts +2 -2
  122. package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  123. package/lib/components/Footer/Sitemap.d.ts +1 -1
  124. package/lib/components/Footer/Sitemap.js +1 -1
  125. package/lib/components/Footer/Sitemap.js.map +1 -1
  126. package/lib/components/Footer/SocialMedia.d.ts +2 -2
  127. package/lib/components/Footer/TextInformation.js.map +1 -1
  128. package/lib/components/Gallery/GalleryContent.d.ts +13 -0
  129. package/lib/components/Header/HeaderContent.d.ts +10 -2
  130. package/lib/components/Header/isSubItemActive.d.ts +2 -2
  131. package/lib/components/Header/isSubItemActive.js.map +1 -1
  132. package/lib/components/Header/isTopItemActive.d.ts +2 -2
  133. package/lib/components/Header/isTopItemActive.js.map +1 -1
  134. package/lib/components/MiniGallery/MiniGallery.d.ts +3 -3
  135. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +6 -0
  136. package/lib/components/MiniGallery/MiniGalleryContent.js +2 -0
  137. package/lib/components/MiniGallery/MiniGalleryContent.js.map +1 -0
  138. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +11 -2
  139. package/lib/components/Placeholder/PlaceholderContent.d.ts +3 -0
  140. package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  141. package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  142. package/lib/components/ProductBlock/ProductBlockContent.d.ts +10 -5
  143. package/lib/components/ProductBlock/ProductBlockInner.d.ts +2 -2
  144. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  145. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  146. package/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
  147. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  148. package/lib/components/ProductGallery/ProductGalleryContent.d.ts +17 -2
  149. package/lib/components/ProductTile/ProductTileContent.d.ts +6 -2
  150. package/lib/components/PromoTile/PromoTileContent.d.ts +6 -2
  151. package/lib/components/StepsBlock/StepsBlockContent.d.ts +13 -0
  152. package/lib/components/TextBlock/TextBlockContent.d.ts +13 -0
  153. package/lib/components/Tile/TileContent.d.ts +5 -2
  154. package/lib/hooks/useLink.d.ts +3 -3
  155. package/lib/hooks/useLink.js.map +1 -1
  156. package/lib/index.d.ts +12 -12
  157. package/lib/index.js +5 -5
  158. package/lib/index.js.map +1 -1
  159. package/lib/mergeTopItems.d.ts +2 -2
  160. package/lib/mergeTopItems.js.map +1 -1
  161. package/lib/model/BlockVersion.d.ts +4 -0
  162. package/lib/model/ButtonVersion.d.ts +4 -0
  163. package/lib/model/LinkProps.d.ts +21 -0
  164. package/lib/model/LinkProps.js +2 -0
  165. package/lib/model/LinkProps.js.map +1 -0
  166. package/lib/model/Picture.d.ts +11 -0
  167. package/lib/model/SitemapProps.d.ts +13 -0
  168. package/lib/model/SitemapProps.js +2 -0
  169. package/lib/model/SitemapProps.js.map +1 -0
  170. package/lib/types.d.ts +2 -2
  171. package/lib/ui-kit/Breadcrumb.d.ts +2 -2
  172. package/lib/ui-kit/Button/Button.d.ts +6 -3
  173. package/lib/ui-kit/Button/Button.js.map +1 -1
  174. package/lib/ui-kit/Button/ButtonProps.d.ts +15 -12
  175. package/lib/ui-kit/Icon/IconProps.d.ts +49 -18
  176. package/lib/ui-kit/Icon/IconProps.js +21 -18
  177. package/lib/ui-kit/Icon/IconProps.js.map +1 -1
  178. package/lib/ui-kit/TopItem/TopItem.d.ts +2 -2
  179. package/package.json +2 -22
  180. package/src/components/Accordion/Accordion.example.json +74 -0
  181. package/src/components/Accordion/Accordion.fixture.tsx +1 -16
  182. package/src/components/Accordion/Accordion.tsx +1 -1
  183. package/src/components/Accordion/AccordionContent.ts +31 -11
  184. package/src/components/Accordion/AccordionItem.tsx +10 -10
  185. package/src/components/BaseTile/BaseTile.tsx +4 -5
  186. package/src/components/BaseTile/BaseTileProps.ts +33 -0
  187. package/src/components/BenefitsBlock/BenefitsBlock.example.json +13 -0
  188. package/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -2
  189. package/src/components/BenefitsBlock/BenefitsBlockContent.ts +14 -1
  190. package/src/components/BlockContent.ts +4 -1
  191. package/src/components/ComparisonTable/ComparisonTable.example.json +84 -0
  192. package/src/components/ComparisonTable/ComparisonTableContent.ts +46 -3
  193. package/src/components/ComparisonTable/HeaderCell.tsx +2 -2
  194. package/src/components/ContentPage/ContentPage.tsx +7 -5
  195. package/src/components/CreditCalculator/CreditCalculatorContent.ts +4 -0
  196. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  197. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +4 -0
  198. package/src/components/Footer/Contacts.tsx +2 -2
  199. package/src/components/Footer/FooterContent.ts +36 -9
  200. package/src/components/Footer/FooterLink.ts +2 -2
  201. package/src/components/Footer/HorizontalNavigation.tsx +2 -2
  202. package/src/components/Footer/Sitemap.tsx +5 -5
  203. package/src/components/Footer/SocialMedia.tsx +2 -2
  204. package/src/components/Footer/TextInformation.tsx +2 -2
  205. package/src/components/Gallery/Gallery.example.json +71 -0
  206. package/src/components/Gallery/GalleryContent.ts +13 -0
  207. package/src/components/Header/HeaderContent.ts +10 -2
  208. package/src/components/Header/isSubItemActive.ts +3 -3
  209. package/src/components/Header/isTopItemActive.ts +3 -3
  210. package/src/components/MiniGallery/MiniGallery.example.json +61 -0
  211. package/src/components/MiniGallery/MiniGallery.tsx +3 -3
  212. package/src/components/MiniGallery/MiniGalleryContent.ts +6 -0
  213. package/src/components/MobileAppTile/MobileAppTile.example.json +20 -0
  214. package/src/components/MobileAppTile/MobileAppTileContent.ts +11 -2
  215. package/src/components/Placeholder/PlaceholderContent.ts +3 -0
  216. package/src/components/ProductBlock/ProductBlock.example.json +17 -0
  217. package/src/components/ProductBlock/ProductBlock.mobile.tsx +3 -3
  218. package/src/components/ProductBlock/ProductBlockContent.ts +10 -5
  219. package/src/components/ProductBlock/ProductBlockInner.tsx +4 -4
  220. package/src/components/ProductGallery/ProductGallery.example.json +21 -0
  221. package/src/components/ProductGallery/ProductGallery.tsx +3 -3
  222. package/src/components/ProductGallery/ProductGalleryContent.ts +17 -2
  223. package/src/components/ProductTile/ProductTile.example.json +30 -0
  224. package/src/components/ProductTile/ProductTileContent.ts +6 -2
  225. package/src/components/PromoTile/PromoTile.example.json +13 -0
  226. package/src/components/PromoTile/PromoTileContent.ts +6 -2
  227. package/src/components/StepsBlock/StepsBlock.example.json +17 -0
  228. package/src/components/StepsBlock/StepsBlockContent.ts +13 -0
  229. package/src/components/TextBlock/TextBlock.example.json +6 -0
  230. package/src/components/TextBlock/TextBlockContent.ts +14 -0
  231. package/src/components/Tile/Tile.example.json +18 -0
  232. package/src/components/Tile/TileContent.ts +5 -2
  233. package/src/hooks/useLink.ts +2 -2
  234. package/src/index.ts +14 -21
  235. package/src/mergeTopItems.ts +5 -5
  236. package/src/model/BlockVersion.ts +4 -0
  237. package/src/model/ButtonVersion.ts +4 -0
  238. package/src/model/LinkProps.ts +22 -0
  239. package/src/model/Picture.ts +11 -0
  240. package/src/model/SitemapProps.ts +15 -0
  241. package/src/types.ts +2 -2
  242. package/src/ui-kit/Breadcrumb.tsx +2 -2
  243. package/src/ui-kit/Button/Button.tsx +7 -3
  244. package/src/ui-kit/Button/ButtonProps.ts +16 -13
  245. package/src/ui-kit/Icon/IconProps.ts +35 -4
  246. package/src/ui-kit/TopItem/TopItem.tsx +2 -2
  247. package/dist/components/BaseTile/BaseTileContent.d.ts +0 -13
  248. package/dist/components/BaseTile/BaseTileContent.js.map +0 -1
  249. package/dist/model/LinkContent.d.ts +0 -5
  250. package/dist/model/LinkContent.js.map +0 -1
  251. package/dist/model/SitemapContent.d.ts +0 -7
  252. package/dist/model/SitemapContent.js.map +0 -1
  253. package/lib/components/BaseTile/BaseTileContent.d.ts +0 -13
  254. package/lib/components/BaseTile/BaseTileContent.js +0 -2
  255. package/lib/components/BaseTile/BaseTileContent.js.map +0 -1
  256. package/lib/model/LinkContent.d.ts +0 -5
  257. package/lib/model/LinkContent.js +0 -2
  258. package/lib/model/LinkContent.js.map +0 -1
  259. package/lib/model/SitemapContent.d.ts +0 -7
  260. package/lib/model/SitemapContent.js +0 -2
  261. package/lib/model/SitemapContent.js.map +0 -1
  262. package/src/components/BaseTile/BaseTileContent.ts +0 -14
  263. package/src/model/LinkContent.ts +0 -5
  264. package/src/model/SitemapContent.ts +0 -9
@@ -38,36 +38,36 @@
38
38
  return Component._tmpl;
39
39
  };
40
40
 
41
- const projectSettings = new (class {
42
- _ = {
43
- PROD_BRANCH: 'master',
44
- FORCED_DRAFT_FLOW: false,
45
- };
46
- setup(_) {
47
- this._ = _;
48
- }
49
- get TEST_BRANCH() {
50
- return this._.TEST_BRANCH;
51
- }
52
- get RC_BRANCH() {
53
- return this._.RC_BRANCH;
54
- }
55
- get PROD_BRANCH() {
56
- return this._.PROD_BRANCH;
57
- }
58
- get FORCED_DRAFT_FLOW() {
59
- return this._.FORCED_DRAFT_FLOW;
60
- }
61
- get ENABLE_ASSIST() {
62
- return this._.ENABLE_ASSIST;
63
- }
64
- get SITEMAP() {
65
- return this._.SITEMAP;
66
- }
67
- get CDN() {
68
- return this._.CDN;
41
+ const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
42
+
43
+ function DaDataAPI(baseURL = '') {
44
+ async function getFetcherAddress() {
45
+ if (!('geolocation' in navigator)) {
46
+ return null;
47
+ }
48
+ try {
49
+ const coords = await getGeolocation();
50
+ const response = await fetch(`${baseURL}/geolocate`, {
51
+ method: 'POST',
52
+ mode: 'cors',
53
+ body: JSON.stringify({
54
+ lat: coords.latitude,
55
+ lon: coords.longitude,
56
+ count: 1,
57
+ }),
58
+ });
59
+ const data = (await response.json());
60
+ return data?.suggestions?.[0]?.data?.city;
61
+ }
62
+ catch (e) {
63
+ console.error(e);
64
+ return null;
65
+ }
69
66
  }
70
- })();
67
+ return {
68
+ getFetcherAddress,
69
+ };
70
+ }
71
71
 
72
72
  const AUTH_PREFIX = 'guest';
73
73
  const STORAGE_KEY = 'likesToken';
@@ -185,93 +185,36 @@
185
185
  };
186
186
  }
187
187
 
188
- const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
189
-
190
- function DaDataAPI(baseURL = '') {
191
- async function getFetcherAddress() {
192
- if (!('geolocation' in navigator)) {
193
- return null;
194
- }
195
- try {
196
- const coords = await getGeolocation();
197
- const response = await fetch(`${baseURL}/geolocate`, {
198
- method: 'POST',
199
- mode: 'cors',
200
- body: JSON.stringify({
201
- lat: coords.latitude,
202
- lon: coords.longitude,
203
- count: 1,
204
- }),
205
- });
206
- const data = (await response.json());
207
- return data?.suggestions?.[0]?.data?.city;
208
- }
209
- catch (e) {
210
- console.error(e);
211
- return null;
212
- }
213
- }
214
- return {
215
- getFetcherAddress,
216
- };
217
- }
218
-
219
- const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
220
- const { title, description, keywords, robots, og } = data;
221
- return (jsxs(HeadComponent, { children: [jsx("title", { children: title }), jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description && jsx("meta", { name: "description", content: description }), keywords && jsx("meta", { name: "keywords", content: keywords.join(',') }), robots && jsx("meta", { name: "robots", content: robots.join(',') }), og
222
- ? Object.entries(og).map(([key, value]) => (jsx("meta", { name: `og:${key}`, content: value }, key)))
223
- : null, children] }));
224
- });
225
-
226
- const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
227
- const renderLikeIcon = () => {
228
- const params = {
229
- stroke: '#292D32',
230
- strokeLinecap: 'round',
231
- strokeLinejoin: 'round',
232
- strokeWidth: '1.5',
188
+ const projectSettings = new (class {
189
+ _ = {
190
+ PROD_BRANCH: 'master',
191
+ FORCED_DRAFT_FLOW: false,
233
192
  };
234
- return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
235
- };
236
-
237
- const LikeControl = JSX(({ className, context }) => {
238
- const likeService = context.useLikeService();
239
- return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
240
- });
241
-
242
- const listStyleMap = {
243
- primary: 'bg-primary-main',
244
- secondary: 'bg-white',
245
- };
246
- const textStyleMap = {
247
- primary: 'text-primary-text',
248
- secondary: 'text-white',
249
- };
250
- const BlockItem = JSX(({ className, text, children, version = 'primary' }) => {
251
- return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [jsx("div", { className: `inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mx-3 ${textStyleMap[version]}`, children: text || children })] }));
252
- });
253
-
254
- const buttonStyleMap = {
255
- primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
256
- secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
257
- };
258
- const buttonDisabledStyleMap = {
259
- primary: 'bg-secondary-dark text-secondary-text',
260
- secondary: 'bg-secondary-light text-secondary-text',
261
- };
262
- const styleButton = 'inline-block text-center font-sans select-none';
263
- const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
264
- const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
265
- if (disabled) {
266
- return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
193
+ setup(_) {
194
+ this._ = _;
267
195
  }
268
- return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
269
- });
270
- const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
271
- const withoutText = !text && !aboveText && Boolean(appendLeft);
272
- const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
273
- return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
274
- });
196
+ get TEST_BRANCH() {
197
+ return this._.TEST_BRANCH;
198
+ }
199
+ get RC_BRANCH() {
200
+ return this._.RC_BRANCH;
201
+ }
202
+ get PROD_BRANCH() {
203
+ return this._.PROD_BRANCH;
204
+ }
205
+ get FORCED_DRAFT_FLOW() {
206
+ return this._.FORCED_DRAFT_FLOW;
207
+ }
208
+ get ENABLE_ASSIST() {
209
+ return this._.ENABLE_ASSIST;
210
+ }
211
+ get SITEMAP() {
212
+ return this._.SITEMAP;
213
+ }
214
+ get CDN() {
215
+ return this._.CDN;
216
+ }
217
+ })();
275
218
 
276
219
  const Icon = JSX(({ className, name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
277
220
  const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
@@ -281,13 +224,6 @@
281
224
  return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
282
225
  });
283
226
 
284
- const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
285
- ? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
286
- : null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
287
- function formatToMimeType(format) {
288
- return format ? `image/${String(format)}` : undefined;
289
- }
290
-
291
227
  var SizeTableClass;
292
228
  (function (SizeTableClass) {
293
229
  SizeTableClass["XL"] = "text-title-lg";
@@ -302,6 +238,13 @@
302
238
  });
303
239
  const getClasses = (...classes) => classes.filter(Boolean).join(' ');
304
240
 
241
+ const BenefitsBlock = JSX(({ className, title, benefits }) => {
242
+ return (jsxs("section", { className: `font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${className || ''}`, children: [title ? jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center", children: title }) : null, benefits?.length ? (jsx("div", { className: "grid grid-cols-2 gap-5 mt-9", children: benefits.map(renderStep) })) : null] }));
243
+ });
244
+ const renderStep = (benefit, i) => {
245
+ return (jsxs("div", { className: "flex items-center p-10 gap-5 max-w-[580px]", children: [benefit.icon && (jsx(Icon, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px]", name: benefit.icon, width: "70", height: "70" })), jsxs("div", { children: [jsx("h3", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm mt-2", children: benefit.description }))] })] }, String(i)));
246
+ };
247
+
305
248
  const MOBILE_URL_PATH = '/mobile';
306
249
  const isURL = (href) => href?.includes('//');
307
250
  const isHrefActive = (href, router, cmp = (href, baseHref) => href === baseHref) => {
@@ -365,6 +308,47 @@
365
308
  };
366
309
  }
367
310
 
311
+ const listStyleMap = {
312
+ primary: 'bg-primary-main',
313
+ secondary: 'bg-white',
314
+ };
315
+ const textStyleMap = {
316
+ primary: 'text-primary-text',
317
+ secondary: 'text-white',
318
+ };
319
+ const BlockItem = JSX(({ className, text, children, version = 'primary' }) => {
320
+ return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [jsx("div", { className: `inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mx-3 ${textStyleMap[version]}`, children: text || children })] }));
321
+ });
322
+
323
+ const buttonStyleMap = {
324
+ primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
325
+ secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
326
+ };
327
+ const buttonDisabledStyleMap = {
328
+ primary: 'bg-secondary-dark text-secondary-text',
329
+ secondary: 'bg-secondary-light text-secondary-text',
330
+ };
331
+ const styleButton = 'inline-block text-center font-sans select-none';
332
+ const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
333
+ const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
334
+ if (disabled) {
335
+ return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
336
+ }
337
+ return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
338
+ });
339
+ const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
340
+ const withoutText = !text && !aboveText && Boolean(appendLeft);
341
+ const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
342
+ return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
343
+ });
344
+
345
+ const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
346
+ ? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
347
+ : null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
348
+ function formatToMimeType(format) {
349
+ return format ? `image/${String(format)}` : undefined;
350
+ }
351
+
368
352
  const getColSpan = (className) => {
369
353
  const colSpanPrefix = 'col-span-';
370
354
  const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
@@ -421,66 +405,6 @@
421
405
  }
422
406
  }
423
407
 
424
- const GOLDEN_RATIO = 1.618;
425
- const Placeholder = JSX(({ className, context, title }) => {
426
- return (jsx(Tile, { className: className, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() }) }));
427
- });
428
- const renderShimmer = (size = 3) => goldenSequence(100, size)
429
- .map((_) => Math.floor(_))
430
- .map(renderShimmerItem);
431
- const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
432
- const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
433
-
434
- const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
435
- const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
436
- return (jsxs("section", { className: "relative", "data-theme": colorPalette, children: [jsx("div", { className: `grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className || ''}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
437
- function renderBlock(block, i) {
438
- const { type } = block;
439
- if (!(type in blocksRegistry)) {
440
- console.warn(`No block with "${type}" is registered`);
441
- }
442
- const BlockComponent = blocksRegistry[type] || Placeholder;
443
- return blockDecorator({
444
- blockClassName: style2className(block.style),
445
- block,
446
- render: (props) => {
447
- const { version, content, blocks } = props.block;
448
- return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content, children: blocks?.length ? blocks.map(renderBlock) : null }, `${type}-${i}`));
449
- },
450
- }, `block-${i}`);
451
- }
452
- });
453
- function style2className(style) {
454
- return style ? style.join(' ') : '';
455
- }
456
-
457
- function toMobilePage(contentPage) {
458
- const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
459
- return {
460
- ...contentPage,
461
- blocks,
462
- };
463
- }
464
- function toMobileBlock(block) {
465
- const { mobile } = block;
466
- if (mobile) {
467
- return {
468
- ...block,
469
- style: mobile.style?.length ? mobile.style : block.style,
470
- };
471
- }
472
- else {
473
- return block;
474
- }
475
- }
476
-
477
- const BenefitsBlock = JSX(({ className, title, benefits }) => {
478
- return (jsxs("section", { className: `font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${className || ''}`, children: [jsx("h2", { className: "font-medium text-title m-0 max-w-[47rem] text-center", children: title }), benefits?.length ? (jsx("div", { className: "grid grid-cols-2 gap-5 mt-9", children: benefits.map(renderStep) })) : null] }));
479
- });
480
- const renderStep = (benefit, i) => {
481
- return (jsxs("div", { className: "flex items-center p-10 gap-5 max-w-[580px]", children: [benefit.icon && (jsx(Icon, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px]", name: benefit.icon, width: "70", height: "70" })), jsxs("div", { children: [jsx("h3", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm mt-2", children: benefit.description }))] })] }, String(i)));
482
- };
483
-
484
408
  const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
485
409
  const CURRENCY_CODES = ['USD', 'EUR'];
486
410
  const CURRENCY_ICONS_MAP = {
@@ -546,7 +470,7 @@
546
470
  const { type, text, description } = item;
547
471
  return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "font-sans text-sm text-secondary-text", children: description })] }, String(index)));
548
472
  };
549
- const renderText = (type, text) => {
473
+ const renderText = (type, text = '') => {
550
474
  switch (type) {
551
475
  case 'tel':
552
476
  return (jsx("a", { className: "font-sans font-medium text-xl text-primary-text no-underline", href: `tel:${formatTel(text)}`, children: text }));
@@ -565,13 +489,6 @@
565
489
  });
566
490
  const HorizontalNavigationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-sm text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
567
491
 
568
- const cmp = (a) => (b) => a?.href === b?.href;
569
- const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
570
- const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
571
- function mergeTopItems(left, right) {
572
- return substitute(left, right).concat(subtract(right, left));
573
- }
574
-
575
492
  function useSitemap(useAsyncData) {
576
493
  const { data } = useAsyncData(sitemapURL(), fetchSitemap);
577
494
  return data || {};
@@ -584,6 +501,13 @@
584
501
  return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
585
502
  }
586
503
 
504
+ const cmp = (a) => (b) => a?.href === b?.href;
505
+ const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
506
+ const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
507
+ function mergeTopItems(left, right) {
508
+ return substitute(left, right).concat(subtract(right, left));
509
+ }
510
+
587
511
  const Sitemap = JSX(({ className, items, context }) => {
588
512
  const sitemap = useSitemap(context.useAsyncData);
589
513
  const mergedItems = mergeTopItems(sitemap.topItems, items);
@@ -737,6 +661,16 @@
737
661
  return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, children: jsxs("div", { className: "flex items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", children: jsx("img", { src: qr.src, alt: title, title: title, width: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-normal text-sm text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }));
738
662
  });
739
663
 
664
+ const GOLDEN_RATIO = 1.618;
665
+ const Placeholder = JSX(({ className, context, title }) => {
666
+ return (jsx(Tile, { className: className, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() }) }));
667
+ });
668
+ const renderShimmer = (size = 3) => goldenSequence(100, size)
669
+ .map((_) => Math.floor(_))
670
+ .map(renderShimmerItem);
671
+ const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
672
+ const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
673
+
740
674
  const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items }) => {
741
675
  return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [jsxs("div", { className: 'flex flex-col', children: [title && (
742
676
  /* TODO Why <Title> is duplicated here? */
@@ -919,15 +853,14 @@
919
853
  : `${contentBlock.scrollHeight}px`;
920
854
  };
921
855
  return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text
922
- ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsx("span", { className: `m-0 text-xl pr-2.5 font-medium ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24" }) : null] }), hasContent ? (jsx("div", { className: `${isActive ? 'pb-5' : ''} text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 `, children: blocks?.length ? blocks.map(renderComponent) : null })) : null] }));
856
+ ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsx("span", { className: `m-0 text-xl pr-2.5 font-medium ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24" }) : null] }), hasContent ? (jsx("div", { className: `${isActive ? 'pb-5' : ''} text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 `, children: blocks?.length ? blocks.map((block, i) => renderBlock(block, i, context)) : null })) : null] }));
923
857
  });
924
- // TODO: draft, for dynamic rendering of components
925
- const renderComponent = (block, i) => {
926
- if (block.type && block.data && !AccordionBlocks.hasOwnProperty(block.type)) {
858
+ const renderBlock = (block, i, context) => {
859
+ if (!block.type || !block.data || !AccordionBlocks.hasOwnProperty(block.type)) {
927
860
  return null;
928
861
  }
929
- const AccordionBlock = block.type && AccordionBlocks[block.type];
930
- return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { ...block.data }) }, `component${i}`));
862
+ const AccordionBlock = AccordionBlocks[block.type];
863
+ return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { context: context, ...block.data }) }, `block_${i}`));
931
864
  };
932
865
  const getContentBlock = (e) => e.target.tagName === 'BUTTON' ? e.target.nextSibling : e.target.parentNode.nextSibling;
933
866
 
@@ -1098,6 +1031,72 @@
1098
1031
  CreditCalculator,
1099
1032
  };
1100
1033
 
1034
+ const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
1035
+ const renderLikeIcon = () => {
1036
+ const params = {
1037
+ stroke: '#292D32',
1038
+ strokeLinecap: 'round',
1039
+ strokeLinejoin: 'round',
1040
+ strokeWidth: '1.5',
1041
+ };
1042
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
1043
+ };
1044
+
1045
+ const LikeControl = JSX(({ className, context }) => {
1046
+ const likeService = context.useLikeService();
1047
+ return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
1048
+ });
1049
+
1050
+ const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1051
+ const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
1052
+ return (jsxs("section", { className: "relative", "data-theme": colorPalette, children: [jsx("div", { className: `grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className || ''}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
1053
+ function renderBlock(block, i) {
1054
+ const { type } = block;
1055
+ if (!(type in blocksRegistry)) {
1056
+ console.warn(`No block with "${type}" is registered`);
1057
+ }
1058
+ const BlockComponent = blocksRegistry[type] || Placeholder;
1059
+ return blockDecorator({
1060
+ blockClassName: style2className(block.style),
1061
+ block,
1062
+ render: (props) => {
1063
+ const { version, content, blocks } = props.block;
1064
+ return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content, children: blocks?.length ? blocks.map(renderBlock) : null }, `${type}-${i}`));
1065
+ },
1066
+ }, `block-${i}`);
1067
+ }
1068
+ });
1069
+ function style2className(style) {
1070
+ return style ? style.join(' ') : '';
1071
+ }
1072
+
1073
+ const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
1074
+ const { title, description, keywords, robots, og } = data;
1075
+ return (jsxs(HeadComponent, { children: [jsx("title", { children: title }), jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description && jsx("meta", { name: "description", content: description }), keywords && jsx("meta", { name: "keywords", content: keywords.join(',') }), robots && jsx("meta", { name: "robots", content: robots.join(',') }), og
1076
+ ? Object.entries(og).map(([key, value]) => (jsx("meta", { name: `og:${key}`, content: value }, key)))
1077
+ : null, children] }));
1078
+ });
1079
+
1080
+ function toMobilePage(contentPage) {
1081
+ const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
1082
+ return {
1083
+ ...contentPage,
1084
+ blocks,
1085
+ };
1086
+ }
1087
+ function toMobileBlock(block) {
1088
+ const { mobile } = block;
1089
+ if (mobile) {
1090
+ return {
1091
+ ...block,
1092
+ style: mobile.style?.length ? mobile.style : block.style,
1093
+ };
1094
+ }
1095
+ else {
1096
+ return block;
1097
+ }
1098
+ }
1099
+
1101
1100
  const Footer = JSX(({ className, context }) => (jsx("footer", { className: `${className} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`, children: jsx(TextInformation, { context: context }) })));
1102
1101
 
1103
1102
  const Gallery = JSX(({ title, description, cards = [], className }) => {