{"version":3,"file":"index.B3sMNaUn.js","sources":["../../../../../../../node_modules/@babylon/ui-kit-base/esm/components/text/inner-HTML/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-common/esm/components/others/text-html/utils/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-common/esm/components/others/text-html/views/desktop/styled.mjs","../../../../../../../node_modules/@babylon/ui-kit-common/esm/components/others/text-html/views/desktop/index.mjs"],"sourcesContent":["import { createElement } from 'react';\n\nconst InnerHTML = ({ content, tag = 'span', className })=>{\n if (!content) return null;\n const props = {\n 'data-testid': 'InnerHTML',\n className: className,\n dangerouslySetInnerHTML: {\n __html: content\n }\n };\n return /*#__PURE__*/ createElement(tag, props);\n};\n\nexport { InnerHTML as default };\n","const initLazy = (inputRef)=>{\n if (inputRef.current) {\n const image = [\n ...inputRef.current.querySelectorAll('img[data-original]')\n ];\n image.map((item)=>{\n item.src = item.dataset.original;\n return item;\n });\n }\n};\n\nexport { initLazy as default, initLazy };\n","import { Button } from '@babylon/ui-kit-base/components/buttons/button';\nimport Title from '@babylon/ui-kit-base/components/text/title';\nimport { TitleStyled } from '@babylon/ui-kit-base/components/text/title/views/desktop/styled';\nimport { BoxShadow } from '@babylon/ui-kit-styles/common/mixins/box-shadow.styled';\nimport { FontMixin, FlexMixin, AttentionMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport { BorderRadius, Padding } from '@babylon/ui-kit-styles/common/mixins/logical.styled';\nimport { linearGradient, rgba } from 'polished';\nimport styled, { css } from 'styled-components';\n\nconst TextHTML = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"TextHTML\",\n componentId: \"sc-21763c04-0\"\n})([\n `p{color:`,\n `;`,\n ` margin-bottom:8px;}b,strong{font-weight:`,\n `;}h4{color:`,\n `;`,\n ` align-self:flex-start;margin-bottom:8px;}img{height:35px;width:100px;}`\n], ({ theme })=>theme.colors.text.dark, FontMixin({\n height: 'base',\n weight: 'light'\n}), ({ theme })=>theme.font.weight.bold, ({ theme })=>theme.colors.white.base, FontMixin({\n size: 'large',\n height: 'large',\n weight: 'medium'\n}));\nconst ItemContent = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"ItemContent\",\n componentId: \"sc-21763c04-1\"\n})([\n ``,\n ``\n], ({ $hasStyles, theme })=>$hasStyles && /*#__PURE__*/ css([\n `&{color:`,\n `;`,\n `}h3{`,\n `}h6{`,\n ` margin-bottom:8px;}p{margin-bottom:4px;strong,b{`,\n `}}ul{`,\n ` list-style:inherit;margin-bottom:20px;padding-left:32px;li{margin-bottom:4px;}}ol{`,\n ` `,\n ` list-style:none;margin:40px 0;li{margin-bottom:32px;margin-right:32px;}}table{margin-top:20px;width:100%;thead{background-color:`,\n `;border-bottom:2px solid `,\n `;th{padding:12px 0;width:25%;&:first-child{padding-left:16px;text-align:left;}}}tbody{td{border-bottom:1px solid `,\n `;`,\n ` padding:8px 0;text-align:center;width:25%;&:first-child{padding-left:16px;text-align:left;}}}}`\n ], theme.colors.grays.darker, FontMixin({\n size: 'base',\n height: 'large',\n weight: 'light'\n }), FontMixin({\n size: 'base',\n height: 'larger',\n weight: 'semiBold'\n }), FontMixin({\n size: 'base',\n weight: 'light',\n height: 'base'\n }), FontMixin({\n weight: 'semiBold'\n }), FontMixin({\n size: 'medium',\n weight: 'light',\n height: 'medium'\n }), FontMixin({\n size: 'base',\n weight: 'light',\n height: 'medium'\n }), FlexMixin({\n wrap: true\n }), theme.colors.grays.light, theme.colors.grays.base, theme.colors.grays.light, FontMixin({\n size: 'base',\n weight: 'light'\n })));\nconst Wrapper = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"Wrapper\",\n componentId: \"sc-21763c04-2\"\n})([\n ``,\n ` background-color:`,\n `;`,\n ` padding:20px;`,\n ` `,\n `{`,\n ` background-color:transparent;border:0;color:`,\n `;`,\n ` margin:auto;outline:none;`,\n ` `,\n ` i{order:1;margin-left:4px;}}`\n], ({ $shadow })=>$shadow && BoxShadow, ({ theme })=>theme.colors.white.base, BorderRadius({\n all: '4px'\n}), FlexMixin({\n direction: 'column'\n}), Button, FlexMixin({\n align: 'center'\n}), ({ theme })=>theme.colors.primary.light, FontMixin({\n size: 'base',\n weight: 'medium'\n}), Padding({\n all: '8px'\n}), AttentionMixin(/*#__PURE__*/ css([\n `cursor:pointer;`\n])));\nconst Content = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"Content\",\n componentId: \"sc-21763c04-3\"\n})([\n `padding-bottom:12px;margin-bottom:12px;height:auto;overflow:visible;transition:max-height 0.3s ease-out;max-height:1400px;position:relative;border-bottom:1px solid `,\n `;`,\n ` &::before{content:none;}`,\n ``\n], ({ theme })=>theme.border.color.base, ({ $hasCollapse })=>!$hasCollapse && /*#__PURE__*/ css([\n `border-bottom:0;margin-bottom:0;`\n ]), ({ $hasCollapse, $collapsed, theme })=>$hasCollapse && !$collapsed && /*#__PURE__*/ css([\n `max-height:180px;overflow:hidden;&::before{`,\n ` background-repeat:repeat-x;display:block;content:'';position:absolute;bottom:0;left:0;height:100px;width:100%;}`\n ], linearGradient({\n colorStops: [\n `${rgba(theme.colors.white.base, 0)} 0`,\n `${rgba(theme.colors.white.base, 0.98)} 65%`\n ],\n toDirection: '180deg'\n })));\nconst ContentTitle = /*#__PURE__*/ styled(Title).withConfig({\n displayName: \"ContentTitle\",\n componentId: \"sc-21763c04-4\"\n})([\n `margin-bottom:8px;`,\n `{color:`,\n `;`,\n ` `,\n `}`\n], TitleStyled, ({ theme })=>theme.colors.grays.darker, FontMixin({\n size: 'larger',\n height: 'larger',\n weight: 'medium'\n}), Padding({\n all: '0'\n}));\n\nexport { Content, ContentTitle, ItemContent, TextHTML, Wrapper };\n","import { jsxs, jsx, Fragment } from 'react/jsx-runtime';\nimport { Button } from '@babylon/ui-kit-base/components/buttons/button';\nimport Icon from '@babylon/ui-kit-base/components/icons/icon';\nimport InnerHTML from '@babylon/ui-kit-base/components/text/inner-HTML';\nimport InnerMarkdownHTML from '@babylon/ui-kit-base/components/text/inner-markdown-HTML';\nimport Title from '@babylon/ui-kit-base/components/text/title';\nimport { genKey } from '@babylon/ui-kit-helpers/keys';\nimport { useRef, useEffect, Children } from 'react';\nimport { useToggle } from 'usehooks-ts';\nimport { initLazy } from '../../utils/index.mjs';\nimport { TextHTML, Wrapper, Content, ItemContent, ContentTitle } from './styled.mjs';\n\nconst ItemElement = ({ title, content, hasNoMarkdown })=>/*#__PURE__*/ jsxs(Fragment, {\n children: [\n title && /*#__PURE__*/ jsx(ContentTitle, {\n title: title,\n tag: \"p\",\n textAlign: \"left\"\n }),\n hasNoMarkdown ? /*#__PURE__*/ jsx(InnerHTML, {\n content: content\n }) : /*#__PURE__*/ jsx(InnerMarkdownHTML, {\n content: content\n })\n ]\n });\nconst TextHTMLDesktop = ({ config, title = false, items = [], hasCollapse = false, hasStyles = false, shadow = true, hasNoMarkdown = false })=>{\n const [collapse, togglecollapse] = useToggle(false);\n const inputRef = useRef(null);\n useEffect(()=>{\n if (inputRef) initLazy(inputRef);\n }, [\n items,\n inputRef\n ]);\n return /*#__PURE__*/ jsxs(TextHTML, {\n \"data-testid\": \"TextHTML\",\n ref: inputRef,\n children: [\n title && /*#__PURE__*/ jsx(Title, {\n \"data-testid\": \"TextHTMLTitle\",\n title: title\n }),\n items.length > 1 ? /*#__PURE__*/ jsxs(Wrapper, {\n \"data-testid\": \"ShadowWrapper\",\n $shadow: shadow,\n children: [\n /*#__PURE__*/ jsx(Content, {\n \"data-testid\": \"Content\",\n $hasCollapse: hasCollapse,\n $collapsed: collapse,\n children: Children.toArray(items.map((item)=>/*#__PURE__*/ jsx(ItemContent, {\n $hasStyles: hasStyles,\n children: /*#__PURE__*/ jsx(ItemElement, {\n content: item.content,\n title: item.title,\n hasNoMarkdown: hasNoMarkdown\n })\n }, genKey({\n item\n }))))\n }),\n hasCollapse && /*#__PURE__*/ jsxs(Button, {\n \"data-testid\": \"ShowMore\",\n onClick: togglecollapse,\n variant: \"negative\",\n height: \"auto\",\n children: [\n (collapse && config?.literals?.viewLess) ?? config?.literals?.viewMore,\n /*#__PURE__*/ jsx(Icon, {\n \"data-testid\": \"ShowMoreIcon\",\n className: `nico-angle-${collapse && 'up' || 'down'}`\n })\n ]\n })\n ]\n }) : /*#__PURE__*/ jsx(ItemContent, {\n $hasStyles: hasStyles,\n children: /*#__PURE__*/ jsx(ItemElement, {\n ...items[0],\n hasNoMarkdown: hasNoMarkdown\n })\n })\n ]\n });\n};\n\nexport { TextHTMLDesktop as default };\n"],"names":["InnerHTML","content","tag","className","props","createElement","initLazy","inputRef","item","TextHTML","styled","theme","FontMixin","ItemContent","$hasStyles","css","FlexMixin","Wrapper","$shadow","BoxShadow","BorderRadius","Button","Padding","AttentionMixin","Content","$hasCollapse","$collapsed","linearGradient","rgba","ContentTitle","Title","TitleStyled","ItemElement","title","hasNoMarkdown","jsxs","Fragment","jsx","InnerMarkdownHTML","TextHTMLDesktop","config","items","hasCollapse","hasStyles","shadow","collapse","togglecollapse","useToggle","useRef","useEffect","Children","genKey","_a","_b","Icon"],"mappings":"0KAEK,MAACA,EAAY,CAAC,CAAE,QAAAC,EAAS,IAAAC,EAAM,OAAQ,UAAAC,CAAS,IAAK,CACtD,GAAI,CAACF,EAAS,OAAO,KACrB,MAAMG,EAAQ,CACV,cAAe,YACf,UAAWD,EACX,wBAAyB,CACrB,OAAQF,CACX,CACT,EACI,OAAqBI,EAAa,cAACH,EAAKE,CAAK,CACjD,ECZME,EAAYC,GAAW,CACrBA,EAAS,SACK,CACV,GAAGA,EAAS,QAAQ,iBAAiB,oBAAoB,CACrE,EACc,IAAKC,IACPA,EAAK,IAAMA,EAAK,QAAQ,SACjBA,EACV,CAET,ECDMC,EAAyBC,EAAO,IAAI,WAAW,CACjD,YAAa,WACb,YAAa,eACjB,CAAC,EAAE,CACC,WACA,IACA,4CACA,cACA,IACA,yEACJ,EAAG,CAAC,CAAE,MAAAC,KAAUA,EAAM,OAAO,KAAK,KAAMC,EAAU,CAC9C,OAAQ,OACR,OAAQ,OACZ,CAAC,EAAG,CAA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