{"version":3,"sources":["webpack:///./app/javascript/material-icons/400-24px/expand_more.svg","webpack:///./app/javascript/mastodon/features/about/index.jsx"],"names":["_path","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","_ref","title","titleId","props","xmlns","height","viewBox","width","id","d","messages","defineMessages","defaultMessage","rules","blocks","silenced","silencedExplanation","suspended","suspendedExplanation","severityMessages","silence","explanation","suspend","Section","PureComponent","constructor","_defineProperty","collapsed","this","open","onOpen","state","setState","render","children","_jsx","className","classNames","active","role","tabIndex","onClick","handleClick","Icon","icon","ChevronRightIcon","ExpandMoreIcon","About","dispatch","fetchDomainBlocks","componentDidMount","fetchServer","fetchExtendedDescription","_server$getIn","_extendedDescription$","multiColumn","intl","server","extendedDescription","domainBlocks","isLoading","get","Column","bindToDocument","label","formatMessage","ServerHeroImage","blurhash","getIn","src","srcSet","map","value","key","replace","join","Skeleton","FormattedMessage","values","mastodon","href","target","Account","size","minimal","_jsxs","_Fragment","dangerouslySetInnerHTML","__html","ImmutableList","isEmpty","rule","handleDomainBlocksOpen","block","LinkFooter","Helmet","name","content","connect","injectIntl"],"mappings":"wGAAIA,E,6FACJ,SAASC,IAAa,OAAOA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAIF,UAAUD,GAAI,IAAK,IAAII,KAAKD,GAAG,CAAG,GAAEE,eAAeC,KAAKH,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,GAAK,CAAE,OAAOL,CAAG,EAAGJ,EAASY,MAAM,KAAMN,UAAY,CAoBpQ,MAlBf,SAAuBO,GACrB,IAAI,MACFC,EAAK,QACLC,KACGC,GACDH,EACJ,OAAoB,gBAAoB,MAAOb,EAAS,CACtDiB,MAAO,6BACPC,OAAQ,GACRC,QAAS,iBACTC,MAAO,GACP,kBAAmBL,GAClBC,GAAQF,EAAqB,gBAAoB,QA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,kBAAQqB,EAAKS,cAAcvD,EAAST,QACpCkC,YAAA,QAAM6D,KAAK,SAASC,QAAQ,SAIpC,EAIaC,6BAxLSnE,IAAK,CAC3B0B,OAAQ1B,EAAMqC,MAAM,CAAC,SAAU,WAC/BV,oBAAqB3B,EAAMqC,MAAM,CAAC,SAAU,wBAC5CT,aAAc5B,EAAMqC,MAAM,CAAC,SAAU,oBAqLxB8B,CAAyBC,YAAWpD,G","file":"js/features/about-eb87b73350dcd3af514e.chunk.js","sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgExpandMore(_ref) {\n  let {\n    title,\n    titleId,\n    ...props\n  } = _ref;\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    xmlns: \"http://www.w3.org/2000/svg\",\n    height: 24,\n    viewBox: \"0 -960 960 960\",\n    width: 24,\n    \"aria-labelledby\": titleId\n  }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n    id: titleId\n  }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z\"\n  })));\n}\nexport default SvgExpandMore;","import PropTypes from 'prop-types';\nimport { PureComponent } from 'react';\n\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\n\nimport classNames from 'classnames';\nimport { Helmet } from 'react-helmet';\n\nimport { List as ImmutableList } from 'immutable';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\n\nimport ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react';\nimport ExpandMoreIcon from '@/material-icons/400-24px/expand_more.svg?react';\nimport { fetchServer, fetchExtendedDescription, fetchDomainBlocks  } from 'mastodon/actions/server';\nimport Column from 'mastodon/components/column';\nimport { Icon  }  from 'mastodon/components/icon';\nimport { ServerHeroImage } from 'mastodon/components/server_hero_image';\nimport { Skeleton } from 'mastodon/components/skeleton';\nimport Account from 'mastodon/containers/account_container';\nimport LinkFooter from 'mastodon/features/ui/components/link_footer';\n\nconst messages = defineMessages({\n  title: { id: 'column.about', defaultMessage: 'About' },\n  rules: { id: 'about.rules', defaultMessage: 'Server rules' },\n  blocks: { id: 'about.blocks', defaultMessage: 'Moderated servers' },\n  silenced: { id: 'about.domain_blocks.silenced.title', defaultMessage: 'Limited' },\n  silencedExplanation: { id: 'about.domain_blocks.silenced.explanation', defaultMessage: 'You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.' },\n  suspended: { id: 'about.domain_blocks.suspended.title', defaultMessage: 'Suspended' },\n  suspendedExplanation: { id: 'about.domain_blocks.suspended.explanation', defaultMessage: 'No data from this server will be processed, stored or exchanged, making any interaction or communication with users from this server impossible.' },\n});\n\nconst severityMessages = {\n  silence: {\n    title: messages.silenced,\n    explanation: messages.silencedExplanation,\n  },\n\n  suspend: {\n    title: messages.suspended,\n    explanation: messages.suspendedExplanation,\n  },\n};\n\nconst mapStateToProps = state => ({\n  server: state.getIn(['server', 'server']),\n  extendedDescription: state.getIn(['server', 'extendedDescription']),\n  domainBlocks: state.getIn(['server', 'domainBlocks']),\n});\n\nclass Section extends PureComponent {\n\n  static propTypes = {\n    title: PropTypes.string,\n    children: PropTypes.node,\n    open: PropTypes.bool,\n    onOpen: PropTypes.func,\n  };\n\n  state = {\n    collapsed: !this.props.open,\n  };\n\n  handleClick = () => {\n    const { onOpen } = this.props;\n    const { collapsed } = this.state;\n\n    this.setState({ collapsed: !collapsed }, () => onOpen && onOpen());\n  };\n\n  render () {\n    const { title, children } = this.props;\n    const { collapsed } = this.state;\n\n    return (\n      <div className={classNames('about__section', { active: !collapsed })}>\n        <div className='about__section__title' role='button' tabIndex={0} onClick={this.handleClick}>\n          <Icon id={collapsed ? 'chevron-right' : 'chevron-down'} icon={collapsed ? ChevronRightIcon : ExpandMoreIcon} /> {title}\n        </div>\n\n        {!collapsed && (\n          <div className='about__section__body'>{children}</div>\n        )}\n      </div>\n    );\n  }\n\n}\n\nclass About extends PureComponent {\n\n  static propTypes = {\n    server: ImmutablePropTypes.map,\n    extendedDescription: ImmutablePropTypes.map,\n    domainBlocks: ImmutablePropTypes.contains({\n      isLoading: PropTypes.bool,\n      isAvailable: PropTypes.bool,\n      items: ImmutablePropTypes.list,\n    }),\n    dispatch: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n    multiColumn: PropTypes.bool,\n  };\n\n  componentDidMount () {\n    const { dispatch } = this.props;\n    dispatch(fetchServer());\n    dispatch(fetchExtendedDescription());\n  }\n\n  handleDomainBlocksOpen = () => {\n    const { dispatch } = this.props;\n    dispatch(fetchDomainBlocks());\n  };\n\n  render () {\n    const { multiColumn, intl, server, extendedDescription, domainBlocks } = this.props;\n    const isLoading = server.get('isLoading');\n\n    return (\n      <Column bindToDocument={!multiColumn} label={intl.formatMessage(messages.title)}>\n        <div className='scrollable about'>\n          <div className='about__header'>\n            <ServerHeroImage blurhash={server.getIn(['thumbnail', 'blurhash'])} src={server.getIn(['thumbnail', 'url'])} srcSet={server.getIn(['thumbnail', 'versions'])?.map((value, key) => `${value} ${key.replace('@', '')}`).join(', ')} className='about__header__hero' />\n            <h1>{isLoading ? <Skeleton width='10ch' /> : server.get('domain')}</h1>\n            <p><FormattedMessage id='about.powered_by' defaultMessage='Decentralized social media powered by {mastodon}' values={{ mastodon: <a href='https://joinmastodon.org' className='about__mail' target='_blank'>Mastodon</a> }} /></p>\n          </div>\n\n          <div className='about__meta'>\n            <div className='about__meta__column'>\n              <h4><FormattedMessage id='server_banner.administered_by' defaultMessage='Administered by:' /></h4>\n\n              <Account id={server.getIn(['contact', 'account', 'id'])} size={36} minimal />\n            </div>\n\n            <hr className='about__meta__divider' />\n\n            <div className='about__meta__column'>\n              <h4><FormattedMessage id='about.contact' defaultMessage='Contact:' /></h4>\n\n              {isLoading ? <Skeleton width='10ch' /> : <a className='about__mail' href={`mailto:${server.getIn(['contact', 'email'])}`}>{server.getIn(['contact', 'email'])}</a>}\n            </div>\n          </div>\n\n          <Section open title={intl.formatMessage(messages.title)}>\n            {extendedDescription.get('isLoading') ? (\n              <>\n                <Skeleton width='100%' />\n                <br />\n                <Skeleton width='100%' />\n                <br />\n                <Skeleton width='100%' />\n                <br />\n                <Skeleton width='70%' />\n              </>\n            ) : (extendedDescription.get('content')?.length > 0 ? (\n              <div\n                className='prose'\n                dangerouslySetInnerHTML={{ __html: extendedDescription.get('content') }}\n              />\n            ) : (\n              <p><FormattedMessage id='about.not_available' defaultMessage='This information has not been made available on this server.' /></p>\n            ))}\n          </Section>\n\n          <Section title={intl.formatMessage(messages.rules)}>\n            {!isLoading && (server.get('rules', ImmutableList()).isEmpty() ? (\n              <p><FormattedMessage id='about.not_available' defaultMessage='This information has not been made available on this server.' /></p>\n            ) : (\n              <ol className='rules-list'>\n                {server.get('rules').map(rule => (\n                  <li key={rule.get('id')}>\n                    <div className='rules-list__text'>{rule.get('text')}</div>\n                    {rule.get('hint').length > 0 && (<div className='rules-list__hint'>{rule.get('hint')}</div>)}\n                  </li>\n                ))}\n              </ol>\n            ))}\n          </Section>\n\n          <Section title={intl.formatMessage(messages.blocks)} onOpen={this.handleDomainBlocksOpen}>\n            {domainBlocks.get('isLoading') ? (\n              <>\n                <Skeleton width='100%' />\n                <br />\n                <Skeleton width='70%' />\n              </>\n            ) : (domainBlocks.get('isAvailable') ? (\n              <>\n                <p><FormattedMessage id='about.domain_blocks.preamble' defaultMessage='Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.' /></p>\n\n                {domainBlocks.get('items').size > 0 && (\n                  <div className='about__domain-blocks'>\n                    {domainBlocks.get('items').map(block => (\n                      <div className='about__domain-blocks__domain' key={block.get('domain')}>\n                        <div className='about__domain-blocks__domain__header'>\n                          <h6><span title={`SHA-256: ${block.get('digest')}`}>{block.get('domain')}</span></h6>\n                          <span className='about__domain-blocks__domain__type' title={intl.formatMessage(severityMessages[block.get('severity')].explanation)}>{intl.formatMessage(severityMessages[block.get('severity')].title)}</span>\n                        </div>\n\n                        <p>{(block.get('comment') || '').length > 0 ? block.get('comment') : <FormattedMessage id='about.domain_blocks.no_reason_available' defaultMessage='Reason not available' />}</p>\n                      </div>\n                    ))}\n                  </div>\n                )}\n              </>\n            ) : (\n              <p><FormattedMessage id='about.not_available' defaultMessage='This information has not been made available on this server.' /></p>\n            ))}\n          </Section>\n\n          <LinkFooter />\n\n          <div className='about__footer'>\n            <p><FormattedMessage id='about.disclaimer' defaultMessage='Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.' /></p>\n          </div>\n        </div>\n\n        <Helmet>\n          <title>{intl.formatMessage(messages.title)}</title>\n          <meta name='robots' content='all' />\n        </Helmet>\n      </Column>\n    );\n  }\n\n}\n\nexport default connect(mapStateToProps)(injectIntl(About));\n"],"sourceRoot":""}