{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/account_gallery/index.js"],"names":["MediaItem","visible","displayMedia","_this","props","media","getIn","state","setState","render","label","icon","title","this","status","get","x","y","style","Object","jsx","className","backgroundImage","backgroundPosition","permalink","to","href","onInterceptClick","handleClick","ImmutablePureComponent","ImmutablePropTypes","map","isRequired","LoadMoreMedia","onLoadMore","maxId","load_more","disabled","onClick","handleLoadMore","PropTypes","string","func","AccountGallery","connect","medias","getAccountGallery","params","accountId","isLoading","hasMore","_this2","size","last","undefined","e","_e$target","target","scrollTop","scrollHeight","clientHeight","handleScrollToBottom","dispatch","expandAccountMediaTimeline","preventDefault","prevRouterProps","_ref","location","mastodonModalOpen","componentDidMount","fetchAccount","componentWillReceiveProps","nextProps","_this3","_this$props","loadOlder","column","loading_indicator","handleLoadOlder","column_back_button","react_router_scroll_4_es","scrollKey","shouldUpdateScroll","onScroll","handleScroll","header_container","role","index","account_gallery_LoadMoreMedia","media_item_MediaItem","object","list","bool"],"mappings":"+PAMqBA,qMAMX,CACNC,QAA0B,aAAjBC,MAAgCC,EAAKC,MAAMC,MAAMC,MAAM,CAAC,SAAU,eAAkC,aAAjBJ,4DAGhF,WACZ,OAAKC,EAAKI,MAAMN,UACdE,EAAKK,SAAS,CAAEP,SAAS,KAClB,2CAMXQ,OAAA,WAAU,IAUJC,EAAOC,EAAMC,EATTP,EAAUQ,KAAKT,MAAfC,MACAJ,EAAYY,KAAKN,MAAjBN,QACFa,EAAST,EAAMU,IAAI,UAGnBC,EAA2B,KAFlBX,EAAMC,MAAM,CAAC,OAAQ,QAAS,MAEvB,EAAK,IACrBW,EAA2B,KAFlBZ,EAAMC,MAAM,CAAC,OAAQ,QAAS,OAEvB,EAAK,IACrBY,EAAQ,GAqBd,MAjB0B,SAAtBb,EAAMU,IAAI,UACZL,EAAQS,OAAAC,EAAA,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EAAWX,QAASzB,KAAKiE,mBAIzD3D,OAAAC,EAAA,EAAAD,CAACyD,EAAA,EAAD,UACEzD,OAAAC,EAAA,EAAAD,CAAC4D,EAAA,EAAD,IAEA5D,OAAAC,EAAA,EAAAD,CAAC6D,EAAA,EAAD,CAAiBC,UAAU,kBAAkBC,mBAAoBrE,KAAKqE,yBAAtE,EACE/D,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,8BAA8B8D,SAAUtE,KAAKuE,mBAA5D,EACEjE,OAAAC,EAAA,EAAAD,CAACkE,EAAA,EAAD,CAAiBrC,UAAWnC,KAAKT,MAAM2C,OAAOC,YAE9C7B,OAAAC,EAAA,EAAAD,CAAA,OAAKmE,KAAK,OAAOjE,UAAU,mCAA3B,EACGwB,EAAOd,IAAI,SAAC1B,EAAOkF,GAAR,OAA4B,OAAVlF,EAC5Bc,OAAAC,EAAA,EAAAD,CAACqE,EAAD,CAEErD,MAAe,EAARoD,EAAY1C,EAAOvC,MAAMiF,EAAQ,EAAG,MAAQ,KACnDrD,WAAYuC,EAAKlC,gBAFZ,QAAUM,EAAOvC,MAAMiF,EAAQ,EAAG,OAKzCpE,OAAAC,EAAA,EAAAD,CAACsE,EAAD,CAEEpF,MAAOA,GADFA,EAAMU,IAAI,SAIlB4D,GAGF1B,GAA6B,IAAhBJ,EAAOO,MACnBjC,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,2BAAf,EACEF,OAAAC,EAAA,EAAAD,CAAC0D,EAAA,EAAD,aA9F4BhD,+BAEvB,CACjBkB,OAAQP,IAAUkD,OAAO1D,WACzB8B,SAAUtB,IAAUE,KAAKV,WACzBa,OAAQf,IAAmB6D,KAAK3D,WAChCiB,UAAWT,IAAUoD,KACrB1C,QAASV,IAAUoD","file":"flavours/glitch/async/account_gallery.js","sourcesContent":["import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport { displayMedia } from 'flavours/glitch/util/initial_state';\n\nexport default class MediaItem extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.map.isRequired,\n };\n\n state = {\n visible: displayMedia !== 'hide_all' && !this.props.media.getIn(['status', 'sensitive']) || displayMedia === 'show_all',\n };\n\n handleClick = () => {\n if (!this.state.visible) {\n this.setState({ visible: true });\n return true;\n }\n\n return false;\n }\n\n render () {\n const { media } = this.props;\n const { visible } = this.state;\n const status = media.get('status');\n const focusX = media.getIn(['meta', 'focus', 'x']);\n const focusY = media.getIn(['meta', 'focus', 'y']);\n const x = ((focusX / 2) + .5) * 100;\n const y = ((focusY / -2) + .5) * 100;\n const style = {};\n\n let label, icon, title;\n\n if (media.get('type') === 'gifv') {\n label = GIF;\n }\n\n if (visible) {\n style.backgroundImage = `url(${media.get('preview_url')})`;\n style.backgroundPosition = `${x}% ${y}%`;\n title = media.get('description');\n } else {\n icon = (\n \n \n \n );\n title = status.get('spoiler_text') || media.get('description');\n }\n\n return (\n