@r3l/app
Version:
2 lines • 25.7 kB
JavaScript
(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[4],{"./public/img/default_user.jpg":function(e,t,n){e.exports=n.p+"public/img/default_user.jpg"},"./public/img/missing.png":function(e,t,n){e.exports=n.p+"public/img/missing.png"},"./src/modules/comment/commentBody.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n("../../node_modules/@babel/runtime/helpers/defineProperty.js"),o=n.n(r),i=n("../../node_modules/react/index.js"),s=n.n(i),a=n("../../node_modules/react-redux/es/index.js"),l=n("../../node_modules/prop-types/index.js"),c=n.n(l),u=n("./src/utils/text.js"),d=n("./src/modules/comment/renderMarkdown.js"),m=n("./src/modules/navigation/history.js"),p=n("./src/modules/navigation/navigation.actions.js"),b=n("./src/utils/post.js"),f=n("./src/modules/comment/linkify.js"),g=n("../../node_modules/@r3l/common/lib/index.js"),j=n("./src/modules/styled/index.ts");function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e){var t=e.avatarText,n=e.inMainFeed,r=e.comment,o=e.noLink,i=e.preview,l=e.omitTitle,c=e.noPostLink,v=Object(a.c)(),O=Object(a.d)((function(e){return e.auth.community})),x=(r&&r.data?r.data.community:r.community)||O,E=Object(b.d)(x,r);if(!r||!r.body)return null;var _=l?Object(u.getTitle)(r.body):{},w=_.isHeading,k=_.titleText,P=n||i,T=w?r.body.replace("# ".concat(k),"").trim():r.body.replace("".concat(k),"").trim(),L=P?function(e,t){if(!e||!e.length)return e;var n=e.split(/\n/);return(e=n.slice(0,4).join("\n")).length<=t?y(e):y(e.substr(0,e.lastIndexOf(" ",t)))}(T,i?140:240):T;L+=L.length<T.length?" _...Read More_":"";var S=[r.inputUrl,r.url];L=Object(u.decode)(L),L=Object(f.a)(L,x,S);var A=s.a.createElement(d.a,{noLink:o,markdown:L,isPreview:P}),D=r.parentPost||r,I=D._id?D:{_id:D};return c||!P&&!o?s.a.createElement(j.K,{sx:{flexShrink:1,pl:t?5:0}},A):s.a.createElement(j.K,{sx:{flexShrink:1,pl:t?5:0}},s.a.createElement(j.J,{style:{zIndex:1},to:E,onPress:function(e){return o&&(e.preventDefault(),e.stopPropagation()),g.IS_NATIVE?v(Object(p.goToPost)(h(h({},I),{},{comment:r,community:x}))):m.a.push(E)}},A))}function y(e){var t=e.match(/```/g);return t&&t.length&&t.length%2!=0?"```"===e.substr(e.length-3,e.length)?e.substr(0,e.length-3):e+"\n```\n":e}O.propTypes={noLink:c.a.bool,avatarText:c.a.func,comment:c.a.object,inMainFeed:c.a.bool,preview:c.a.bool,omitTitle:c.a.bool,noPostLink:c.a.bool},t.b=O},"./src/modules/comment/renderMarkdown.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return L}));var r=n("../../node_modules/@babel/runtime/helpers/extends.js"),o=n.n(r),i=n("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),s=n.n(i),a=n("../../node_modules/@babel/runtime/helpers/defineProperty.js"),l=n.n(a),c=n("../../node_modules/@babel/runtime/helpers/slicedToArray.js"),u=n.n(c),d=n("../../node_modules/react/index.js"),m=n.n(d),p=n("../../node_modules/react-redux/es/index.js"),b=n("../../node_modules/prop-types/index.js"),f=n.n(b),g=n("../../node_modules/@r3l/common/lib/index.js"),j=n("./src/modules/navigation/navigation.actions.js"),v=n("./src/styles/index.js"),h=n("../../node_modules/react-native-web/dist/exports/Platform/index.js");function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){var n=(null==t?void 0:t.pMargin)||16;return{body:y({fontFamily:"Georgia",fontSize:18,lineHeight:28,color:e.black},(null==t?void 0:t.body)||{}),heading1:{fontSize:32,lineHeight:54,fontFamily:v.c.HELVETICA_NEUE_BOLD,marginVertical:10},heading2:{fontSize:24,fontFamily:v.c.HELVETICA_NEUE_CONDENSED_BOLD,marginVertical:10},heading3:{fontSize:20,fontFamily:v.c.HELVETICA_NEUE_BOLD,marginVertical:10},heading4:{fontSize:18,fontFamily:v.c.HELVETICA_NEUE_CONDENSED_BOLD,marginVertical:10},heading5:{fontSize:18,fontFamily:v.c.HELVETICA_NEUE_CONDENSED_BOLD,marginVertical:10},link:{color:e.blue,textDecorationLine:"none"},blockquote:{borderLeftColor:"#DDDDDD",backgroundColor:"transparent",paddingVertical:0,borderLeftWidth:4,paddingLeft:16,opacity:1,marginLeft:0,marginVertical:n/2},code_block:{backgroundColor:"rgba(27,31,35,.05)",borderWidth:0,borderRadius:3,fontSize:15,fontFamily:"ios"===h.a.OS?"Menlo":"monospace"},code_inline:{backgroundColor:"rgba(27,31,35,.05)",borderRadius:3,borderWidth:0,fontSize:15,paddingVertical:4,fontFamily:"ios"===h.a.OS?"Menlo":"monospace"},image:{minWidth:200},fence:{borderWidth:0,backgroundColor:"rgba(27,31,35,.05)",borderRadius:3,fontSize:15,marginVertical:n/2,fontFamily:"ios"===h.a.OS?"Menlo":"monospace"},paragraph:{marginVertical:n/2},inline:{marginBottom:0},bullet_list:{marginVertical:n/2},ordered_list:{marginVertical:n/2},list_item:{marginVertical:n/2}}},E=n("./src/styles/ColorMode.tsx"),_=n("../../node_modules/react-native-markdown-display/src/index.js"),w=n("./src/modules/styled/index.ts"),k=["href","children","onPress"];function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}S.propTypes={markdown:f.a.string,noLink:f.a.bool,style:f.a.object,isPreview:f.a.bool};var L=Object(d.memo)(S);function S(e){var t=e.markdown,n=e.noLink,r=e.style,i=e.isPreview,a=function(e){var t=Object(p.c)();return Object(d.useCallback)((function(n){if(e)return null;switch(!0){case""===n:return!0;case/__user_profile__/.test(n):return t(Object(j.goToProfile)(n.replace("__user_profile__","")));case/__tag_link__/.test(n):return t(Object(j.goToTopic)(n.replace("__tag_link__","")));default:return t(Object(j.goToUrl)(n))}}),[t,e])}(n),l=function(e){function t(t){var n=t.href,r=t.children,i=t.onPress,a=s()(t,k);if(""===n)return r;var l=/^(https?|file|ftps?|mailto|javascript|data:image\/[^;]{2,9};):/i.test(n);return m.a.createElement(w.w,o()({to:n},a,{sx:{overflowWrap:"break-word",wordBreak:"break-all"},webAction:function(t){return e?t.preventDefault():t.stopPropagation()},nativeAction:function(t){return e?t.preventDefault():i(t)},external:l,target:l?"_blank":null}),r)}return t.propTypes={href:f.a.string,children:f.a.node,onPress:f.a.func},Object(d.memo)(t)}(n),c=Object(E.b)(),b=u()(c,3),v=b[0],h=b[2],O=Object(d.useMemo)((function(){return{black:h("black"),blue:h("blue")}}),[v,h]);if(g.IS_SERVER)return m.a.createElement(w.e,null,t);var y=T(T({},i?{image:function(e){return e.attributes.src?m.a.createElement(w.v,{key:e.attributes.src,sx:{width:100,height:100},source:{uri:e.attributes.src},resizeMode:"contain"}):null}}:{}),{},{link:function(e,t){var n,r;return m.a.createElement(l,{key:null==e||null===(n=e.attributes)||void 0===n?void 0:n.href,href:null==e||null===(r=e.attributes)||void 0===r?void 0:r.href},t)},blocklink:function(e,t){var n,r;return m.a.createElement(l,{key:null==e||null===(n=e.attributes)||void 0===n?void 0:n.href,href:null==e||null===(r=e.attributes)||void 0===r?void 0:r.href},t)}});return m.a.createElement(_.a,{mergeStyle:!0,onLinkPress:a,style:x(O,r),rules:g.IS_NATIVE?T({},y.image?{image:y.image}:{}):y},t)}},"./src/modules/community/community.selectors.ts":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}));var r,o=n("../../node_modules/react-redux/es/index.js");!function(e){e[e.MASTER=4]="MASTER",e[e.OWNER=3]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.USER=1]="USER",e[e.GUEST=0]="GUEST"}(r||(r={}));var i=function(e){return Object(o.d)((function(t){return t.community.communities[e||t.community.active]}))},s=function(){var e,t=Object(o.d)((function(e){var t,n;return"admin"===(null===(t=e.auth)||void 0===t||null===(n=t.user)||void 0===n?void 0:n.role)})),n=(e=Object(o.d)((function(e){return e.community.active})),Object(o.d)((function(e){return e.community.userMemberships})).find((function(t){return t.community===e})));switch(!0){case t:return r.MASTER;case!(null==n||!n.superAdmin):return r.OWNER;case"admin"===(null==n?void 0:n.role):return r.ADMIN;case"user"===(null==n?void 0:n.role):return r.USER;default:return r.GUEST}},a=function(e){return s()>=e}},"./src/modules/post/gradient.component.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n("../../node_modules/react/index.js"),o=n.n(r),i=n("../../node_modules/prop-types/index.js"),s=n.n(i),a=n("../../node_modules/react-native-web-linear-gradient/dist/index.js"),l=n.n(a),c=["hsla(240, 70%, 30%, .03)","hsla(240, 70%, 20%, .08)","hsla(240, 70%, 10%, .4)","hsla(240, 70%, 8%, .7)","hsla(240, 70%, 5%, .6)"],u=["hsla(240, 70%, 10%, .4)","hsla(240, 70%, 8%, .7)","hsla(240, 70%, 5%, .6)"];function d(e){var t,n,r=e.title,i=e.image,s=e.preview,a=i?s?u:c:(n=(n=(t=r)?t.length:0)%220+200||200,n=Math.max(100,n),["hsla(".concat(parseInt(n-30,10),", 100%, 50%, 1)"),"hsla(".concat(parseInt(n,10),", 100%, 50%, 1)"),"hsla(".concat(parseInt(n+30,10),", 100%, 50%, 1)")]),d=i?{x:.5,y:0}:{x:.8,y:0},m=i?{x:.5,y:1}:{x:.2,y:1};return o.a.createElement(l.a,{start:d,end:m,colors:a,style:{flex:1}})}d.propTypes={preview:s.a.bool,image:s.a.bool,title:s.a.string}},"./src/modules/post/hooks.ts":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("../../node_modules/react-redux/es/index.js"),o=n("./src/utils/post.js"),i=function(e){var t=Object(r.d)((function(e){return e.auth.community}));return e&&e.data&&e.data.community||t},s=function(e){var t=i(e),n=e.parentPost||e;return Object(o.d)(t,n)}},"./src/modules/post/postTitle.component.tsx":function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return f}));var r=n("../../node_modules/react/index.js"),o=n.n(r),i=n("../../node_modules/react-redux/es/index.js"),s=n("./src/modules/styled/index.ts"),a=n("./src/modules/navigation/navigation.actions.js"),l=function(e){var t=e.community,n=e.name,r=e.noLink,l=e.c,c=Object(i.d)((function(e){return e.navigation.discover.sort})),u=encodeURI("/".concat(t,"/").concat(c||"new","/").concat(n)),d=Object(i.c)();return o.a.createElement(s.w,{hu:!0,to:u,c:l,webAction:function(e){return e.stopPropagation()},nativeAction:function(){return d(Object(a.goToTopic)(n))},disabled:r},o.a.createElement(s.D,{sx:{color:l}},"#",n," "))},c=n("./src/modules/navigation/history.js"),u=n("./src/modules/post/hooks.ts");t.c=Object(r.memo)(d);function d(e){var t,n=e.children,r=e.post,i=e.link,a=e.title,l=e.noLink,c=e.singlePost,d=e.preview,g=e.mobile,j=Object(u.b)(r);if(!r)return null;var v=g?"textOverlay":void 0,h=d&&g?2:3,O=r.commentCount&&j||(null==r||null===(t=r.tags)||void 0===t?void 0:t.length);return o.a.createElement(s.K,{webContainerSx:{flex:1},sx:{flex:1,justifyContent:["center","flex-start"]}},o.a.createElement(s.K,null,o.a.createElement(m,{c:v,titleLines:h,title:a,post:r,noLink:l,singlePost:c}),o.a.createElement(p,{singlePost:c,noLink:l,link:i,post:r,c:v})),O?o.a.createElement(s.G,{numberOfLines:1},o.a.createElement(b,{post:r,c:v,noLink:l}),o.a.createElement(f,{post:r,c:v,noLink:l})):null,n)}var m=function(e){var t=e.post,n=e.noLink,r=e.title,l=e.singlePost,d=e.c,m=e.titleLines,p=Object(i.c)(),b=Object(u.b)(t);return r?o.a.createElement(s.w,{to:t.url,external:!0,target:"_blank",disabled:n,rel:"ugc nofollow",webAction:function(){return c.a.push(b)},nativeAction:function(){l?p(Object(a.goToUrl)(t.url)):p(Object(a.goToUrl)(t.url))&&p(Object(a.goToPost)(t))}},o.a.createElement(s.I,{numberOfLines:m,sx:{color:d}},r.replace(/&/g,"&"))):null},p=function(e){var t=e.singlePost,n=e.link,r=e.post,l=e.noLink,d=e.c,m=Object(i.c)(),p=Object(u.b)(r),b=n&&n.articleAuthor&&n.articleAuthor.length?o.a.createElement(s.D,{sx:{mr:4.0005,color:d||"grey"}}," ","• ",n.articleAuthor.join(", ")):null;return null!=n&&n.domain||b?o.a.createElement(s.G,{numberOfLines:1,sx:{mt:2.001}},(null==n?void 0:n.domain)&&o.a.createElement(s.w,{to:r.url,target:"_blank",external:!0,disabled:!p||l,hu:!0,c:d||"blue",rel:"ugc nofollow",webAction:function(){return c.a.push(p)},nativeAction:function(){t?m(Object(a.goToUrl)(r.url)):m(Object(a.goToUrl)(r.url))&&m(Object(a.goToPost)(r))}},o.a.createElement(s.D,{sx:{color:d||"blue"}},n.domain&&"".concat(n.domain," ↗︎"))),b):null},b=function(e){var t=e.post,n=e.noLink,r=e.c,l=Object(i.c)(),c=Object(u.b)(t);return t.commentCount?o.a.createElement(s.w,{to:c,hu:!0,disabled:n,c:r||"blue",nativeAction:function(){return l(Object(a.goToPost)(t))}},o.a.createElement(s.D,{sx:{color:r||"blue"}},t.commentCount," Comment",t.commentCount>1?"s":""," ")):null},f=function(e){var t=e.noLink,n=e.c,r=e.post,i=Object(u.a)(r),s=null==r?void 0:r.tags;return null!=s&&s.length?s.map((function(e,s){return o.a.createElement(l,{name:e,key:e+s,community:i||r.data&&r.data.community,noLink:t,c:n||"blue"})})):null}},"./src/modules/post/postinfo.component.js":function(e,t,n){"use strict";var r=n("../../node_modules/@babel/runtime/helpers/slicedToArray.js"),o=n.n(r),i=n("../../node_modules/react/index.js"),s=n.n(i),a=n("../../node_modules/prop-types/index.js"),l=n.n(a),c=n("./src/modules/post/gradient.component.js"),u=n("../../node_modules/react-redux/es/index.js"),d=n("../../node_modules/react-native-web/dist/exports/ActivityIndicator/index.js"),m=n("./src/modules/styled/index.ts"),p=n("./src/utils/post.js"),b=n("./src/modules/post/postinfo.mobile.component.js"),f=n("./src/styles/layout.js"),g=n("./src/modules/user/UAvatar.component.js"),j=n("./src/modules/comment/commentBody.js"),v=n("./src/modules/post/postTitle.component.tsx"),h=n("./src/utils/img.js"),O=n("../../node_modules/react-native-web/dist/exports/Image/index.js"),y=n("../../node_modules/react-native-web/dist/exports/Dimensions/index.js"),x=n("./src/modules/navigation/navigation.actions.js"),E=8*f.POST_IMAGE_W,_=function(e){var t,n=e.url,r=e.disabled,a=e.singlePost,l=e.postUrl,c=e.preview,d=e._id,p=Object(u.c)(),b=Object(u.d)((function(e){return e.navigation.screenSize})),f=Object(i.useState)({width:1,height:1}),g=o()(f,2),j=g[0],v=g[1],_=Object(i.useState)(0),w=o()(_,2),k=w[0],P=w[1];Object(i.useEffect)((function(){O.a.getSize(n,(function(e,t){v({width:e,height:t})}))}),[n]);var T=(null===(t=y.a.get("window"))||void 0===t?void 0:t.height)||0,L=c?E:.6*T,S=!c&&(a||b),A=S?n:Object(h.resizeImage)(n,E/8,E/8);return s.a.createElement(m.K,{onLayout:function(e){var t=e.nativeEvent.layout.width;P(t)},sx:{flex:1}},s.a.createElement(m.A,{external:a,to:a?n:l,nativeAction:function(){p(a?Object(x.goToUrl)(n):Object(x.goToPost)({_id:d}))},target:a?"_blank":void 0,disabled:r},s.a.createElement(m.v,{sx:{maxWidth:"100%",width:S?"100%":E*j.width/j.height,height:S?Math.min(L,k*j.height/j.width):E},resizeMode:"contain",source:{uri:A}})))},w=n("./src/modules/post/hooks.ts"),k=n("./src/modules/navigation/history.js");P.propTypes={noLink:l.a.bool,link:l.a.object,post:l.a.object,singlePost:l.a.bool,preview:l.a.bool};t.a=Object(i.memo)(P);function P(e){var t=e.post,n=e.link,r=e.noLink,a=e.singlePost,l=e.preview,O=Object(i.useState)(!0),y=o()(O,2),x=y[0],E=y[1],P=Object(i.useState)(!0),T=o()(P,2),L=T[0],S=T[1],A=Object(u.d)((function(e){return e.navigation.screenSize})),D=Object(w.b)(t);if(t.loading)return s.a.createElement(d.a,null);if(!t)return null;var I=Object(h.resizeImage)(null==n?void 0:n.image,f.POST_IMAGE_W,f.POST_IMAGE_H),M=(null==n?void 0:n.domain)&&Object(p.b)(n.domain),C=Object(p.e)({post:t,link:n});return"image"==t.type&&n?s.a.createElement(m.K,{sx:{flex:1,flexDirection:a?"column":["column","row"]}},s.a.createElement(_,{singlePost:a,preview:l,url:t.url,disabled:r,postUrl:D,_id:t._id}),a?null:s.a.createElement(m.K,{sx:{mr:2}}),l?null:s.a.createElement(m.K,{webContainerSx:{justifyContent:"flex-end"},sx:{px:[2,0],pt:1,justifyContent:"flex-end"}},s.a.createElement(v.c,{post:t,link:n,noLink:r,singlePost:a,preview:l}))):A?s.a.createElement(b.a,{preview:l,post:t,singlePost:a,noLink:r,link:n}):n?s.a.createElement(m.K,{sx:{flex:1,flexDirection:["column","row"]}},s.a.createElement(m.A,{webAction:function(){return k.a.push(D)},external:!0,to:t.url,target:"_blank",disabled:r},s.a.createElement(m.K,{sx:{flex:1,width:8*f.POST_IMAGE_W,height:8*f.POST_IMAGE_H,mr:2}},x&&I?s.a.createElement(m.v,{sx:{flex:1,width:8*f.POST_IMAGE_W,height:8*f.POST_IMAGE_H},source:{uri:I},onError:function(){return E(!1)}}):L&&M?s.a.createElement(m.v,{resizeMode:"cover",sx:{flex:1,width:8*f.POST_IMAGE_W,height:8*f.POST_IMAGE_H},source:{uri:M},onError:function(){return S(!1)}}):s.a.createElement(c.a,{flex:1,title:C}))),s.a.createElement(v.c,{post:t,link:n,noLink:r,title:C,singlePost:a,preview:l})):s.a.createElement(m.B,{sx:{flex:1,p:2,alignItems:"center"}},s.a.createElement(g.a,{size:6,user:t.embeddedUser,noLink:!0}),s.a.createElement(m.K,{sx:{mr:2}}),s.a.createElement(j.a,{noLink:!0,comment:t,preview:!0}))}},"./src/modules/post/postinfo.mobile.component.js":function(e,t,n){"use strict";var r=n("../../node_modules/react/index.js"),o=n.n(r),i=n("../../node_modules/react-redux/es/index.js"),s=n("../../node_modules/prop-types/index.js"),a=n.n(s),l=n("./src/modules/post/gradient.component.js"),c=n("./src/utils/post.js"),u=n("../../node_modules/@babel/runtime/helpers/classCallCheck.js"),d=n.n(u),m=n("../../node_modules/@babel/runtime/helpers/createClass.js"),p=n.n(m),b=n("../../node_modules/@babel/runtime/helpers/inherits.js"),f=n.n(b),g=n("../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),j=n.n(g),v=n("../../node_modules/@babel/runtime/helpers/getPrototypeOf.js"),h=n.n(v),O=n("../../node_modules/@babel/runtime/helpers/defineProperty.js"),y=n.n(O),x=n("./src/modules/ui/mobile/CustomSpinner.component.js"),E=n("./src/modules/styled/index.ts");function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j()(this,n)}}var w=function(e){f()(r,e);var t=_(r);function r(){return d()(this,r),t.apply(this,arguments)}return p()(r,[{key:"render",value:function(){var e=this.props,t=e.remove,r=e.noLink,i=e.urlPreview,s=e.image,a=e.domain,l=e.size,c=e.title,u=e.urlMenu,d="small"===l,m=d?8:11,p=d?.35:.4,b=d?1.5:2,f=s||i&&i.image,g=c||i&&i.title,j=a||i&&i.domain,v=f&&o.a.createElement(E.v,{resizeMode:"cover",source:f?{uri:f}:n("./public/img/missing.png"),style:{flex:1}}),h=j&&o.a.createElement(E.G,{numberOfLines:1,sx:{fontSize:8*b,color:"grey",pt:1.001}},"from: ",j),O=d&&h?2:3;return i?o.a.createElement(E.K,{sx:{variant:"borders.navBorder",borderWidth:1}},o.a.createElement(E.A,{nativeAction:u,to:"#",disabled:r},o.a.createElement(E.B,{sx:{height:m,alignItems:"stretch"}},o.a.createElement(E.K,{sx:{flex:p}},v||null),o.a.createElement(E.K,{sx:{justifyContent:"center",flex:1,flexBasis:"0%",p:4.0001,overflow:"hidden"},style:{flex:1}},o.a.createElement(E.G,{sx:{overflow:"hidden",fontSize:8*b,lineHeight:8*b*1.3,color:"grey"},numberOfLines:O},g),h),t&&o.a.createElement(E.k,{sx:{width:2,height:2,top:4.01,right:4.01,opacity:.5},resizeMode:"contain",source:n("./public/img/x.png")})))):o.a.createElement(E.A,{sx:{height:m},nativeAction:u,to:"#"},o.a.createElement(E.B,{sx:{height:m,alignItems:"stretch",flex:1,variant:"borders.navBorder",borderWidth:1}},o.a.createElement(x.a,{size:"small",visible:!0})))}}]),r}(r.Component);y()(w,"propTypes",{size:a.a.string,image:a.a.string,title:a.a.string,urlPreview:a.a.object,domain:a.a.string,noLink:a.a.bool,urlMenu:a.a.func,remove:a.a.bool});var k=n("./src/modules/navigation/navigation.actions.js"),P=n("./src/modules/post/postTitle.component.tsx"),T=n("../../node_modules/@dripsy/core/build/css/styled.js"),L=n("../../node_modules/react-native-web/dist/exports/View/index.js"),S=Object(T.a)(L.a)({position:"absolute",top:0,bottom:0,right:0,left:0}),A=Object(T.a)(L.a)({position:"absolute",bottom:0,left:0,right:0});D.propTypes={noLink:a.a.bool,link:a.a.object,post:a.a.object,singlePost:a.a.bool,preview:a.a.bool,goToPost:a.a.func};t.a=Object(r.memo)(D);function D(e){var t=e.post,n=e.link,r=e.goToPost,s=e.preview,a=e.noLink,u=e.singlePost,d=Object(i.c)();if(!t)return null;var m=null==n?void 0:n.image,p=(null==n?void 0:n.domain)&&Object(c.b)(n.domain),b=Object(c.e)({post:t,link:n}),f=m||p,g=f&&o.a.createElement(E.K,{sx:{flex:1}},o.a.createElement(E.v,{resizeMode:"cover",sx:{flexDirection:"row",flex:1,width:"100%"},source:{uri:f}}),o.a.createElement(S,null,o.a.createElement(l.a,{title:b,image:!0,preview:s}))),j=s?16:30;return s?o.a.createElement(w,{size:"small",urlPreview:n||t,title:b,image:f,noLink:a}):o.a.createElement(E.K,null,o.a.createElement(E.A,{onClick:r||function(){return d(Object(k.goToUrl)(t.url))},external:!0,to:t.url,target:"_blank",noLink:a,sx:{flex:1}},o.a.createElement(E.K,{sx:{height:8*j}},g||o.a.createElement(l.a,{flex:1,title:b}))),o.a.createElement(A,{sx:{flexDirection:"row",p:2,pt:0,pl:s?0:2}},o.a.createElement(P.c,{post:t,link:n,noLink:a,title:b,preview:s,singlePost:u,mobile:!0})))}},"./src/modules/ui/mobile/CustomSpinner.component.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n("../../node_modules/react/index.js"),o=n.n(r),i=n("../../node_modules/react-native-web/dist/exports/ActivityIndicator/index.js"),s=n("../../node_modules/prop-types/index.js"),a=n.n(s),l=n("./src/modules/styled/index.ts"),c=Object(l.M)(l.K)({position:"absolute",left:0,right:0,bottom:0,top:0,flex:1,justifyContent:"center",alignItems:"center",flexGrow:1});function u(e){return o.a.createElement(c,{pointerEvents:"none"},o.a.createElement(i.a,{animating:e.visible,size:e.size||"large"}))}u.propTypes={visible:a.a.bool,size:a.a.string}},"./src/modules/user/UAvatar.component.js":function(e,t,n){"use strict";var r=n("../../node_modules/@babel/runtime/helpers/defineProperty.js"),o=n.n(r),i=n("../../node_modules/react/index.js"),s=n.n(i),a=n("../../node_modules/react-redux/es/index.js"),l=n("../../node_modules/prop-types/index.js"),c=n.n(l),u=n("./src/modules/styled/index.ts"),d=n("./src/styles/layout.js"),m=n("./src/modules/navigation/navigation.actions.js"),p=n("./src/utils/img.js");function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=e.size,r=e.user,o=e.goToProfile,i=e.noLink,l=e.sx,c=Object(a.c)();if(!r)return null;var b="/user/profile/"+r.handle,g=t||d.AVATAR_SIZE,j=r.image?{uri:Object(p.resizeImage)(r.image,g,g)}:n("./public/img/default_user.jpg"),v=s.a.createElement(u.v,{source:j,sx:{height:g,width:g,borderRadius:8*g/2}});return i?s.a.createElement(u.K,{sx:f({},l)},v):s.a.createElement(u.K,{sx:f({},l)},s.a.createElement(u.A,{nativeAction:function(){return o?o(r):c(Object(m.goToProfile)(r))},to:b},v))}g.propTypes={user:c.a.object,size:c.a.number,noLink:c.a.bool,goToProfile:c.a.func,sx:c.a.object},t.a=Object(i.memo)(g)},"./src/utils/propValidation.js":function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));var r=n("../../node_modules/prop-types/index.js"),o=n.n(r),i=n("../../node_modules/react-is/index.js"),s=o.a.shape({handle:o.a.string,balance:o.a.number,image:o.a.string,name:o.a.string}),a=(o.a.shape({_id:o.a.string.isRequired,user:o.a.string.isRequired,title:o.a.string,embeddedUser:o.a.object,tags:o.a.array,body:o.a.string,postDate:o.a.instanceOf(Date),data:o.a.object,link:o.a.object,parentPost:o.a.number,type:o.a.string}),o.a.shape({isAuthenticated:o.a.bool,user:s,community:o.a.string}));function l(e,t,n){if(e[t]&&!Object(i.isValidElementType)(e[t]))return new Error("Invalid prop '".concat(t,"' supplied to '").concat(n,"': the prop is not a valid React component"))}}}]);
//# sourceMappingURL=activity-activity-container~admin-web-flagged-component~admin-web-topPosts-component~createPost-crea~ec3d4786.bundle.b0b6de09bd211b85f5a2.js.map