2 lines
43 KiB
JavaScript
2 lines
43 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["Governance~Profile~ProfileHomepage~ProfilePostComments~R2CommentsPage~R2Listing~Reddit"],{"./src/chat/constants/container.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return i});const s={EMBED:"embed",FULL:"full",HIDDEN:"hidden",MINIMIZED:"minimized"},i={embed:{width:560,height:380},full:{width:void 0,height:void 0},hidden:{width:0,height:0},minimized:{width:126,height:40}}},"./src/chat/reducers/subscribe.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return i});const s=(e,t)=>t,i=(e,t)=>()=>t(e.getState().actionListener)},"./src/graphql/operations/ExperimentVariants.json":function(e){e.exports={id:"295308431436"}},"./src/lib/makeGqlRequest/index.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return f});var s=n("./src/lib/constants/index.ts"),i=n("./src/lib/constants/headers.ts"),o=n("./src/lib/env/index.ts"),r=n("./src/lib/logs/errors.ts"),a=n("./src/lib/makeApiRequest/index.ts"),c=n("./src/lib/makeRequest/index.ts"),d=n("./node_modules/lodash/omit.js"),u=n.n(d),l=n("./src/reddit/constants/headers.ts"),b=n("./src/reddit/customMiddleware/gqlContext.ts");const p=(e,t)=>{const n=Object.assign({},t,{headers:Object.assign({},t.headers||{},e.headers)}),s=Object(o.b)()?[l.a]:[l.a,i.c];return n.headers=u()(n.headers,s),n},m=(e,t,n)=>{const i=n.body.errors;i&&i.length&&Object(r.a)({context:e,endpoint:t.endpoint,error:i.map(e=>e.message).join("\n"),type:s.s.GQL})};function f(e,t){const n=Object(b.b)(e),i={data:t,method:s.jb.POST,endpoint:n.apiUrl,type:"json"},o=p(n,i);return n.onBeforeRequest(o),Object(c.b)(o).then(e=>(n.onResponse(e,{allowSetEmptyLoid:t.allowSetEmptyLoid}),!e.ok&&(Object(a.e)(n,i,e),e.status>=400)?Object.assign({},e,{error:{type:Object(a.f)(e.status)}}):e.body.errors?(m(n,Object.assign({},i,{operation:t.id||t.query}),e),Object.assign({},e,{ok:!1,error:{type:s.I.BAD_REQUEST,fields:e.body.errors.map(e=>({msg:e.message||""}))}})):Object.assign({},e,{error:null})))}},"./src/reddit/actions/chat/init.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return c}),n.d(t,"c",function(){return u});var s=n("./src/chat/reducers/subscribe.ts"),i=n("./src/lib/loadWithRetries/index.ts"),o=n("./src/lib/makeActionCreator/index.ts");let r;let a;const c="CHAT__INITED",d=Object(o.a)(c),u=async(e,t,o)=>a?{chatStore:a,firstInit:!1}:(a=await(async(e,t,s)=>{const o=Date.now(),r=await Object(i.a)(()=>Promise.all([n.e("RedesignContentFonts"),n.e("RedesignSystemFonts"),n.e("vendors~Chat~CollectionCommentsPage~CommentsPage~PostCreation~RedesignChat~RichTextEditor~Subreddit~~db96a512"),n.e("vendors~Chat~Client~Gifts~Poll~Reddit~RedesignChat"),n.e("vendors~Chat~RedesignChat"),n.e("Chat~Governance~Reddit~RedesignChat"),n.e("Chat~RedesignChat"),n.e("RedesignChat")]).then(n.bind(null,"./src/chat/initializer.ts"))).then(e=>e.default);return(await r(t(),o,s)).store})(0,t,o),await(async(e,t,o)=>{if(!r){const a=(await Object(i.a)(()=>Promise.all([n.e("RedesignContentFonts"),n.e("RedesignSystemFonts"),n.e("vendors~Chat~CollectionCommentsPage~CommentsPage~PostCreation~RedesignChat~RichTextEditor~Subreddit~~db96a512"),n.e("vendors~Chat~Client~Gifts~Poll~Reddit~RedesignChat"),n.e("vendors~Chat~RedesignChat"),n.e("Chat~Governance~Reddit~RedesignChat"),n.e("Chat~RedesignChat"),n.e("RedesignChat")]).then(n.bind(null,"./src/reddit/actions/chat/proxy.ts"))).then(e=>e.default))(t,o),c=Object(s.b)(e,a);r=e.subscribe(c)}})(a,e,t),e(d()),{chatStore:a,firstInit:!0})},"./src/reddit/actions/chat/toggle.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return d}),n.d(t,"a",function(){return u}),n.d(t,"c",function(){return l});var s=n("./node_modules/react-router-redux/es/index.js"),i=n("./src/lib/loadWithRetries/index.ts"),o=n("./src/chat/constants/container.ts"),r=n("./src/reddit/actions/chat/init.ts"),a=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],s=!0,i=!1,o=void 0;try{for(var r,a=e[Symbol.iterator]();!(s=(r=a.next()).done)&&(n.push(r.value),!t||n.length!==t);s=!0);}catch(c){i=!0,o=c}finally{try{!s&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const c=()=>Object(i.a)(()=>Promise.all([n.e("RedesignContentFonts"),n.e("RedesignSystemFonts"),n.e("vendors~Chat~CollectionCommentsPage~CommentsPage~PostCreation~RedesignChat~RichTextEditor~Subreddit~~db96a512"),n.e("vendors~Chat~Client~Gifts~Poll~Reddit~RedesignChat"),n.e("vendors~Chat~RedesignChat"),n.e("Chat~Governance~Reddit~RedesignChat"),n.e("Chat~RedesignChat"),n.e("RedesignChat")]).then(n.bind(null,"./src/chat/actions/container.ts"))).then(e=>e.sizeChanged),d=()=>async(e,t)=>Promise.all([Object(r.c)(e,t),c()]).then(([{chatStore:e,firstInit:t},n])=>{e.getState().container.size!==o.a.EMBED||t?e.dispatch(n(o.a.EMBED)):e.dispatch(n(o.a.HIDDEN))}),u=(e,t)=>async(d,u)=>{const l=(await(()=>Object(i.a)(()=>Promise.all([n.e("RedesignContentFonts"),n.e("RedesignSystemFonts"),n.e("vendors~Chat~CollectionCommentsPage~CommentsPage~PostCreation~RedesignChat~RichTextEditor~Subreddit~~db96a512"),n.e("vendors~Chat~Client~Gifts~Poll~Reddit~RedesignChat"),n.e("vendors~Chat~RedesignChat"),n.e("Chat~Governance~Reddit~RedesignChat"),n.e("Chat~RedesignChat"),n.e("RedesignChat")]).then(n.bind(null,"./src/chat/helpers/urls/index.ts"))).then(e=>e.channelUrl))())(e,t);var b=await Promise.all([Object(r.c)(d,u,l),c()]),p=a(b,2),m=p[0];const f=m.chatStore,h=m.firstInit,g=p[1];f.getState().container.size!==o.a.EMBED&&f.dispatch(g(o.a.EMBED)),!h&&f.dispatch(Object(s.c)(l))},l=e=>async(t,s)=>{if(!r.b)return;const o=await(()=>Object(i.a)(()=>Promise.all([n.e("RedesignContentFonts"),n.e("RedesignSystemFonts"),n.e("vendors~Chat~CollectionCommentsPage~CommentsPage~PostCreation~RedesignChat~RichTextEditor~Subreddit~~db96a512"),n.e("vendors~Chat~Client~Gifts~Poll~Reddit~RedesignChat"),n.e("vendors~Chat~RedesignChat"),n.e("Chat~Governance~Reddit~RedesignChat"),n.e("Chat~RedesignChat"),n.e("RedesignChat")]).then(n.bind(null,"./src/chat/actions/theme.ts"))).then(e=>e.switchTheme))();r.b.dispatch(o(e))}},"./src/reddit/actions/preferences.ts":function(e,t,n){"use strict";var s=n("./node_modules/Base64/base64.js"),i=n("./src/config.ts"),o=n("./node_modules/js-cookie/src/js.cookie.js"),r=n.n(o),a=n("./node_modules/lodash/isEmpty.js"),c=n.n(a),d=n("./node_modules/lodash/omit.js"),u=n.n(d),l=n("./node_modules/lodash/pick.js"),b=n.n(l),p=n("./src/app/strings/index.ts"),m=n("./src/lib/constants/index.ts"),f=n("./src/lib/makeActionCreator/index.ts"),h=n("./src/reddit/actions/chat/toggle.ts"),g=n("./src/reddit/actions/users.ts"),_=n("./src/reddit/constants/cookie.ts"),j=n("./src/reddit/endpoints/user/preferences.ts"),O=n("./src/reddit/endpoints/moderator/structuredStyles.ts"),C=n("./src/lib/makeApiRequest/index.ts"),v=n("./src/reddit/helpers/addRedesignIdentifier/index.ts"),y=n("./src/reddit/actions/toaster.ts"),E=n("./src/reddit/constants/preferences.ts"),x=n("./src/reddit/endpoints/subreddit/settings.ts"),S=n("./src/reddit/helpers/trackers/profileSettings.ts"),w=n("./src/reddit/models/Toast/index.ts"),k=n("./src/reddit/models/User/index.ts"),T=n("./src/reddit/selectors/structuredStyles.ts"),F=n("./src/reddit/selectors/subreddit.ts"),R=n("./src/reddit/selectors/user.ts");n.d(t,"b",function(){return A}),n.d(t,"h",function(){return D}),n.d(t,"g",function(){return I}),n.d(t,"n",function(){return P}),n.d(t,"e",function(){return L}),n.d(t,"d",function(){return U}),n.d(t,"l",function(){return N}),n.d(t,"f",function(){return M}),n.d(t,"q",function(){return H}),n.d(t,"v",function(){return z}),n.d(t,"c",function(){return Y}),n.d(t,"s",function(){return J}),n.d(t,"t",function(){return V}),n.d(t,"r",function(){return W}),n.d(t,"u",function(){return K}),n.d(t,"a",function(){return Q}),n.d(t,"o",function(){return Z}),n.d(t,"B",function(){return se}),n.d(t,"i",function(){return ie}),n.d(t,"k",function(){return ce}),n.d(t,"j",function(){return ue}),n.d(t,"w",function(){return be}),n.d(t,"z",function(){return pe}),n.d(t,"p",function(){return me}),n.d(t,"y",function(){return fe}),n.d(t,"x",function(){return he}),n.d(t,"m",function(){return ge}),n.d(t,"A",function(){return Oe}),n.d(t,"D",function(){return Ce}),n.d(t,"C",function(){return ve});const A="PREFERENCES__AUTOPLAY_TOGGLED",D="PREFERENCES__NIGHTMODE_TOGGLED",I="PREFERENCES__LAYOUT_CHANGED",P="PREFERENCES__SUBREDDIT_LAYOUT_CHANGED",L="PREFERENCES__CUSTOMIZE_FLYOUT_SHOWN",U="PREFERENCES__CUSTOMIZE_FLYOUT_DISMISSED",N="PREFERENCES__PROFILE_LAYOUT_CHANGED",M="PREFERENCES__HAMBURGER_TRAY_TOGGLED",B=Object(f.a)(I),$=Object(f.a)(P),G=Object(f.a)(L),H=Object(f.a)(U),q=(Object(f.a)(N),Object(f.a)(A)),z=Object(f.a)(D),Y=(Object(f.a)(M),"PREFERENCES__COLLAPSED_TRAY_TOGGLED"),J=(Object(f.a)(Y),e=>async(t,n,{apiContext:s})=>{t(B({layout:e})),t(Object(g.l)())}),V=(e,t)=>async(n,s,{apiContext:i})=>{const o=s(),r=Object(R.U)(o),a=o.user.prefs.hasSeenCustomizeFlyout;a||n(G()),t&&r?(n($({subredditId:t,layout:e})),n(Ce(t,{layout:e},!1)),a||n(se({hasSeenCustomizeFlyout:!0},!1))):(n(J(e)),n(se(a?{layout:e}:{layout:e,hasSeenCustomizeFlyout:!0},!1)))},W=e=>async(t,n,{apiContext:s})=>{n().user.account&&await Object(j.d)(e,s())},K=e=>async(t,n,{apiContext:o})=>{const a=n();if(Object(T.i)(a)){const e=Object(R.M)(a);t(Object(y.e)({kind:w.b.Error,text:Object(p.a)(e,"structuredStyles.modal.nightmode.description")}))}else{if(a.user.account)await Object(j.e)(e,o());else{const t=r.a.get(_.k);if(t){const n=JSON.parse(Object(s.atob)(t));n.prefs.nightmode=e,r.a.set(_.k,btoa(JSON.stringify(n)),{domain:i.a.cookieDomain})}}t(z({nightmode:e})),t(Object(h.c)(e)),r.a.remove(_.e,{domain:i.a.cookieDomain})}},Q="SETTINGS__ACCOUNT_PREFS_UPDATE_SUCCESS",Z="SETTINGS__SUBREDDIT_PREFS_UPDATED",X=Object(f.a)("SETTINGS__UPDATE_PENDING"),ee=Object(f.a)("SETTINGS__UPDATE_FAILURE"),te=Object(f.a)(Q),ne=Object(f.a)(Z),se=(e,t=!0)=>async(n,s,{apiContext:i})=>{n(X());const o=u()(e,E.a),r=b()(e,E.a),a=[];c()(o)||a.push(Object(j.g)(o,i())),c()(r)||a.push(Object(j.b)(r,i()));const d=await Promise.all(a),l=Object(R.M)(s());d.every(e=>e.ok)?(n(te({preferences:e})),t&&n(Object(y.e)({kind:w.b.SuccessCommunity,text:Object(p.a)(l,"settings.page.saveRequestSuccess")}))):(n(ee()),t&&n(Object(y.e)({kind:w.b.Error,text:Object(p.a)(l,"settings.page.saveRequestFailure")})))},ie="SETTINGS__SUCCESS",oe=Object(f.a)("SETTINGS__PENDING"),re=Object(f.a)("SETTINGS__FAILURE"),ae=Object(f.a)(ie),ce="SETTINGS__PROFILE_IMAGE_UPDATE_SUCCESS",de=Object(f.a)(ce),ue="SETTINGS__PROFILE_IMAGE_DELETE_SUCCESS",le=Object(f.a)(ue),be=()=>async(e,t,{apiContext:n})=>{e(oe());const s=await(e=>Object(C.c)(e,{endpoint:Object(v.a)(`${i.a.gatewayUrl}/desktopapi/v1/prefs`),method:m.jb.GET}))(n());s.ok?e(ae(s.body)):e(re())},pe=e=>async(t,n,{apiContext:s})=>{if(n().user.account)await Object(j.a)(e,s());else{const e=r.a.get(_.f);if(e){const t=JSON.parse(decodeURIComponent(e));t.pref_quarantine_optin=!0,r.a.set(_.f,JSON.stringify(encodeURIComponent(t)),m.z)}else{const e=JSON.stringify({pref_quarantine_optin:!0});r.a.set(_.f,e,m.z)}}},me=e=>async(t,n,{apiContext:s})=>{n().user.account&&await Object(j.c)(e,s()),t(q({autoplayVideo:e}))},fe=(e,t)=>async(n,s,{apiContext:i})=>{const o=Object(R.j)(s());if(!o||!o.profileId)return;const r=Object(R.M)(s()),a=m.vc+Object(k.f)(o),c=await Object(O.e)(i(),a,t,e.file);if(c.ok){const e=decodeURIComponent(c.body.PostResponse.Location);n(de({key:t,imageUrl:e,subredditId:o.profileId})),(await Object(O.c)(i(),a,{[t]:e})).ok?(n(Object(y.e)({kind:w.b.SuccessCommunity,text:Object(p.a)(r,"settings.page.saveRequestSuccess")})),Object(S.g)(s(),t)):n(Object(y.e)({kind:w.b.Error,text:Object(p.a)(r,"settings.page.saveRequestFailure")}))}else n(Object(y.e)({kind:w.b.Error,text:Object(p.a)(r,"settings.profileForm.images.errors."+t)}))},he=e=>async(t,n,{apiContext:s})=>{const i=Object(R.j)(n());if(!i||!i.profileId)return;const o=m.vc+Object(k.f)(i),r={profileIcon:"icon",profileBanner:"banner"}[e],a=Object(R.M)(n()),c=await Object(x.b)(s(),o,r);if(c.ok){const s=c.body[r+"_img"];t(le({subredditId:i.profileId,key:e,imageUrl:s})),t(Object(y.e)({kind:w.b.SuccessCommunity,text:Object(p.a)(a,"settings.page.saveRequestSuccess")})),Object(S.f)(n(),e)}else t(Object(y.e)({kind:w.b.Error,text:Object(p.a)(a,"settings.page.saveRequestFailure")}))},ge="SETTINGS__PROFILE_SETTINGS_UPDATE_SUCCESS",_e=Object(f.a)(ge),je=Object(f.a)("SETTINGS__PROFILE_SETTINGS_UPDATE_FAILED"),Oe=(e,t)=>async(n,s,{apiContext:i})=>{const o=Object(R.j)(s());if(!o||!o.profileId)return!1;const r=[],a=s().subreddits.settings[o.profileId],c=Object.assign({},a,e);r.push(Object(x.f)(i(),o.profileId,c));const d=t.showActiveCommunities;d!==t.prevShowActiveCommunities&&r.push(Object(j.g)({showActiveCommunities:d},i()));const u=Object(R.M)(s());return(await Promise.all(r)).every(e=>e.ok)?(n(_e({settings:e,additional:t,subredditId:o.profileId})),Object(S.i)(s()),n(Object(y.e)({kind:w.b.SuccessCommunity,text:Object(p.a)(u,"settings.page.saveRequestSuccess")})),!0):(n(je()),n(Object(y.e)({kind:w.b.Error,text:Object(p.a)(u,"settings.page.saveRequestFailure")})),!1)},Ce=(e,t,n=!0)=>async(s,i,{apiContext:o})=>{const r=i(),a=Object(R.M)(r),c=r.user.prefs.subreddit[e];s(ne({subredditId:e,prefs:t})),(await Object(j.h)(e,t,o())).ok?n&&s(Object(y.e)({kind:w.b.SuccessCommunity,text:Object(p.a)(a,"settings.page.saveRequestSuccess")})):(c&&s(ne({subredditId:e,prefs:c})),n&&s(Object(y.e)({kind:w.b.Error,text:Object(p.a)(a,"settings.page.saveRequestFailure")})))},ve=(e,t)=>async(n,s,{apiContext:i})=>{const o=s();Object(F.G)(o,{subredditId:e})&&o.user.prefs.rememberCommunitySort&&n(Ce(e,{sort:t},!1))}},"./src/reddit/actions/toaster.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"e",function(){return l}),n.d(t,"d",function(){return m});var s=n("./src/lib/makeActionCreator/index.ts"),i=n("./src/reddit/models/Toast/index.ts");const o=5e3,r=i.b.SuccessCommunity,a="TOAST__DISPLAYED",c="TOAST__DISMISSED",d=Object(s.a)(a),u=Object(s.a)(c),l=e=>async(t,n)=>{const s=b(e);t(d(s)),s.duration>0&&window.setTimeout(()=>t(u(s.id)),s.duration)},b=e=>Object.assign({},e,{duration:e.duration||p(e.kind),id:e.id||Date.now().toString(),kind:e.kind||r}),p=e=>{switch(e){case i.b.Error:return-1;case i.b.Undo:return 1e4;case i.b.SuccessCommunity:case i.b.SuccessMod:default:return o}},m=(e,t,n,s,i,o)=>({text:e,kind:t,buttonText:n,buttonAction:s,secondButtonText:i,secondButtonAction:o})},"./src/reddit/actions/users.ts":function(e,t,n){"use strict";var s=n("./src/lib/constants/index.ts"),i=n("./src/lib/makeActionCreator/index.ts"),o=n("./src/reddit/actions/toaster.ts"),r=n("./src/reddit/endpoints/user/index.ts"),a=n("./src/lib/makeApiRequest/index.ts"),c=n("./src/lib/omitHeaders/index.ts"),d=n("./src/reddit/constants/headers.ts"),u=n("./src/reddit/endpoints/user/me.ts"),l=n("./src/lib/makeRequest/index.ts");var b=n("./src/reddit/constants/history.ts"),p=n("./src/config.ts"),m=n("./node_modules/js-cookie/src/js.cookie.js"),f=n.n(m),h=n("./src/lib/constants/cookie.ts");const g=e=>{f.a.remove(e,{domain:p.a.cookieDomain})};var _=n("./src/reddit/helpers/history/index.ts"),j=n("./src/reddit/helpers/localStorage/index.ts"),O=async e=>{let t;try{t=await Object(a.c)(e,{endpoint:"/logoutproxy",method:s.jb.POST})}finally{[h.c,h.g,h.h,h.i].forEach(g),Object(j.r)(null),await async function(e,t){return await Object(l.b)({method:s.jb.POST,endpoint:"/timings/logoutrequest",data:{appName:e.statsAppName,successful:t},type:"json"})}(e,t&&t.ok),Object(_.a)(b.a.JustLoggedOut,!0),window.location.reload()}},C=n("./src/reddit/helpers/redesignOptoutCookie/index.ts"),v=n("./src/reddit/models/Toast/index.ts");n.d(t,"d",function(){return y}),n.d(t,"n",function(){return E}),n.d(t,"i",function(){return x}),n.d(t,"h",function(){return S}),n.d(t,"g",function(){return w}),n.d(t,"j",function(){return k}),n.d(t,"f",function(){return T}),n.d(t,"s",function(){return D}),n.d(t,"e",function(){return I}),n.d(t,"o",function(){return L}),n.d(t,"m",function(){return U}),n.d(t,"r",function(){return N}),n.d(t,"p",function(){return M}),n.d(t,"b",function(){return B}),n.d(t,"a",function(){return $}),n.d(t,"k",function(){return G}),n.d(t,"c",function(){return H}),n.d(t,"l",function(){return z}),n.d(t,"q",function(){return Y});const y="USER__LOID_RECEIVED",E=Object(i.a)(y),x="USER__REQUEST_PENDING",S="USER__REQUEST_LOADED",w="USER__REQUEST_FAILED",k="USER__SESSION_TRACKER_RECEIVED",T="USER__REDDAID_RECEIVED",F=Object(i.a)(x),R=Object(i.a)(S),A=Object(i.a)(w),D=e=>async(t,n,{apiContext:i})=>{if(n().users.models[e.toLowerCase()]||e===s.D)return;t(F({username:e}));const o=await Object(r.b)(i(),e);if(o.ok){const n={data:o.body};n.username=e,t(R(n))}else{const n=o.error;n.username=e,t(A(n))}},I="USER__MYSELF_LOADED",P=Object(i.a)(I),L=()=>async(e,t,{apiContext:n})=>{const s=t();if(s.user.account||!s.user.session||s.user.session.unsafeLoggedOut)return;const i=await Object(u.a)(n());i.ok&&e(P(i.body))},U=()=>async(e,t,{apiContext:n})=>{Object(C.a)(),O(n())},N=Object(i.a)(k),M=Object(i.a)(T),B="USER__FTU_UX_VIEWED",$="USER__FEATURES_VIEWED_HISTORY_LOADED",G=Object(i.a)(B),H=(Object(i.a)($),"USER__LAYOUT_SWITCH_VIEWED"),q=Object(i.a)(H),z=()=>async(e,t,{apiContext:n})=>{const s=t();s.user.account&&!s.user.account.seenLayoutSwitch&&(e(q()),Object(r.c)(n()))},Y=e=>async(t,n,{apiContext:i})=>{const r=await((e,t)=>Object(a.c)(Object(c.a)(e,[d.a]),{method:s.jb.POST,endpoint:`${e.apiUrl}/api/deactivate_user`,data:{user:t.username,passwd:t.password,confirm:t.checkbox,deactivate_message:t.feedback}}))(i(),e);r.ok&&r.body&&r.body.success?O(i()):t(Object(o.e)({kind:v.b.Error,text:"Something went wrong deactivating your account. Try again later."}))}},"./src/reddit/components/TrackingHelper/index.tsx":function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"b",function(){return l});var s=n("./node_modules/prop-types/index.js"),i=n.n(s),o=n("./node_modules/react/index.js"),r=n.n(o),a=n("./src/reddit/selectors/telemetry.ts"),c=n("./src/telemetry/index.ts"),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e};class u extends r.a.Component{getChildContext(){return{sendEvent:e=>{{const t=this.context.store.getState(),n=e(t);Object(c.a)(Object.assign({},a.defaults(t),n))}}}}render(){return this.props.children?r.a.Children.only(this.props.children):null}}function l(e){var t;return(t=class extends r.a.Component{render(){return r.a.createElement(e,d({},this.props,{sendEvent:this.context.sendEvent}))}}).contextTypes={sendEvent:i.a.func},t}u.contextTypes={store:i.a.object.isRequired},u.childContextTypes={sendEvent:i.a.func.isRequired}},"./src/reddit/constants/cookie.ts":function(e,t,n){"use strict";n.d(t,"k",function(){return s}),n.d(t,"a",function(){return i}),n.d(t,"g",function(){return o}),n.d(t,"c",function(){return r}),n.d(t,"d",function(){return a}),n.d(t,"i",function(){return c}),n.d(t,"h",function(){return d}),n.d(t,"b",function(){return u}),n.d(t,"j",function(){return l}),n.d(t,"e",function(){return b}),n.d(t,"f",function(){return p});const s="USER",i="alphaModal",o="over18",r="mod_mode_enabled",a="m2m_v3",c="recent_srs",d="_recentclicks2",u="eu_cookie_v2",l="uapp_cookie",b="nightmode",p="_options"},"./src/reddit/constants/headers.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return s});const s="reddit-user_id"},"./src/reddit/constants/history.ts":function(e,t,n){"use strict";var s;n.d(t,"a",function(){return s}),function(e){e.IsOverlay="isOverlay",e.ScrollOnLoad="scrollOnLoad",e.CloseLocation="closeLocation",e.JustLoggedIn="JustLoggedIn",e.JustLoggedOut="JustLoggedOut"}(s||(s={}))},"./src/reddit/constants/preferences.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return s});const s=["openPostInNewTab","rememberCommunitySort","sort","stylesEnabled","useMarkdown","layout","rememberCommunityLayout","hasSeenCustomizeFlyout"]},"./src/reddit/customMiddleware/gqlContext.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return i});var s=n("./src/config.ts");const i=({apiUrl:e,onBeforeRequest:t,onResponse:n,statsAppName:s,headers:i})=>({apiUrl:e,onBeforeRequest:t,onResponse:n,statsAppName:s,headers:i()}),o={unsafeLoggedOut:!1,accessToken:""};t.a=(e=>{let t=()=>o;return{gqlContext:()=>{var n=e();const i=n.headers,o=n.onBeforeRequest,r=n.onResponse,a=n.statsAppName;return{apiUrl:s.a.gqlUrl,onBeforeRequest:o,onResponse:r,statsAppName:a,headers:()=>(e=>{var n=t();const s=n.unsafeLoggedOut,i=n.accessToken;return s?Object.assign({},e,{Authorization:`Bearer ${i}`}):Object.assign({},e)})(i)}},middleware:e=>(t=(()=>(e=>{if(!e.user.session)return console.error("redux: session is null"),o;var t=e.user.session;return{unsafeLoggedOut:!!t.unsafeLoggedOut,accessToken:t.accessToken}})(e.getState())),e=>t=>e(t))}})},"./src/reddit/endpoints/moderator/structuredStyles.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return d}),n.d(t,"c",function(){return u}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return b}),n.d(t,"e",function(){return p});var s=n("./src/lib/constants/index.ts"),i=n("./src/lib/makeApiRequest/index.ts"),o=n("./src/lib/omitHeaders/index.ts"),r=n("./src/lib/uploadToS3/index.ts"),a=n("./src/reddit/constants/headers.ts"),c=n("./src/reddit/helpers/media/index.ts");const d=async(e,t,n)=>Object(i.c)(Object(o.a)(e,[a.a]),{endpoint:`${e.apiUrl}/api/v1/structured_styles/${t}`,method:s.jb.GET,data:{progressive_images:n}}),u=async(e,t,n)=>Object(i.c)(Object(o.a)(e,[a.a]),{endpoint:`${e.apiUrl}/api/v1/structured_styles/${t}`,method:s.jb.PATCH,data:n}),l=async(e,t)=>Object(i.c)(Object(o.a)(e,[a.a]),{endpoint:`${e.apiUrl}/api/v1/structured_styles/${t}`,method:s.jb.DELETE}),b=async(e,t,n,r,c)=>Object(i.c)(Object(o.a)(e,[a.a]),{endpoint:`${e.apiUrl}/api/v1/style_asset_upload_s3/${t}`,method:s.jb.POST,data:{filepath:n,imagetype:r,mimetype:c}}),p=async(e,t,n,s)=>{const i=await Object(c.f)(s),o=await b(e,t,s.name,n,i);if(!o.ok)return o;let a=o.body;return"s3UploadLease"in a&&(a=a.s3UploadLease),Object(r.a)(s,a)}},"./src/reddit/endpoints/subreddit/settings.ts":function(e,t,n){"use strict";n.d(t,"d",function(){return a}),n.d(t,"h",function(){return c}),n.d(t,"b",function(){return d}),n.d(t,"c",function(){return u}),n.d(t,"g",function(){return l}),n.d(t,"f",function(){return b}),n.d(t,"e",function(){return m}),n.d(t,"a",function(){return h});var s=n("./src/lib/constants/index.ts"),i=n("./src/lib/makeApiRequest/index.ts"),o=n("./src/lib/omitHeaders/index.ts"),r=n("./src/reddit/constants/headers.ts");const a=(e,t)=>Object(i.c)(Object(o.a)(e,[r.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/submit_validations`,method:s.jb.GET}),c=async(e,t,n)=>Object(i.c)(Object(o.a)(e,[r.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/submit_validations`,method:s.jb.PATCH,type:"json",data:n}),d=(e,t,n)=>Object(i.c)(Object(o.a)(e,[r.a]),{method:s.jb.POST,endpoint:`${e.apiUrl}/r/${t}/api/delete_sr_${n}`,data:{raw_json:1}}),u=(e,t)=>Object(i.c)(Object(o.a)(e,[r.a]),{method:s.jb.GET,endpoint:`${e.apiUrl}/r/${t}/about/edit.json`,data:{raw_json:1}}).then(e=>e.ok?Object.assign({},e,{body:Object.assign({},p(e.body.data))}):e),l=(e,t,n)=>Object(i.c)(Object(o.a)(e,[r.a]),{method:s.jb.PATCH,endpoint:`${e.apiUrl}/api/v1/subreddit/update_settings`,type:"json",data:Object.assign({},m(n,h),{sr:t})}),b=(e,t,n)=>{const a=Object.assign({},f(n),{sr:t});return Object(i.c)(Object(o.a)(e,[r.a]),{method:s.jb.POST,endpoint:`${e.apiUrl}/api/site_admin`,data:a})},p=e=>({allowDiscovery:e.allow_discovery,allowImages:e.allow_images,allowPostCrossposts:e.allow_post_crossposts,collapseDeletedComments:e.collapse_deleted_comments,commentScoreHideMins:e.comment_score_hide_mins,contentOptions:e.content_options,contentVisible:e.default_set,crowdControlMode:e.crowd_control_mode,description:e.description,domain:e.domain,excludeBannedModqueue:e.exclude_banned_modqueue,headerHoverText:e.header_hover_text,hideAds:e.hide_ads,keyColor:e.key_color,language:e.language,over18:e.over_18,publicDescription:e.public_description,publicTraffic:e.public_traffic,showMedia:e.show_media,showMediaPreview:e.show_media_preview,spamComments:e.spam_comments,spamLinks:e.spam_links,spamSelfposts:e.spam_selfposts,spoilersEnabled:e.spoilers_enabled,submitLinkLabel:e.submit_link_label,submitText:e.submit_text,submitTextLabel:e.submit_text_label,subredditId:e.subreddit_id,subredditType:e.subreddit_type,suggestedCommentSort:e.suggested_comment_sort,title:e.title,wikiEditAge:e.wiki_edit_age,wikiEditKarma:e.wiki_edit_karma,wikimode:e.wikimode}),m=(e,t)=>{const n={};for(const s in e)n[t[s]]=e[s];return n},f=e=>({allow_post_crossposts:e.allowPostCrossposts,allow_images:e.allowImages,allow_discovery:e.allowDiscovery,allow_top:e.contentVisible,api_type:"json",collapse_deleted_comments:e.collapseDeletedComments,comment_score_hide_mins:e.commentScoreHideMins,crowd_control_mode:e.crowdControlMode,description:e.description,domain:e.domain,exclude_banned_modqueue:e.excludeBannedModqueue,"header-title":e.headerHoverText,hide_ads:e.hideAds,key_color:e.keyColor,lang:e.language,link_type:e.contentOptions,over_18:e.over18,public_description:e.publicDescription,public_traffic:e.publicTraffic,show_media:e.showMedia,show_media_preview:e.showMediaPreview,spam_comments:e.spamComments,spam_links:e.spamLinks,spam_selfposts:e.spamSelfposts,spoilers_enabled:e.spoilersEnabled,sr:e.subredditId,submit_link_label:e.submitLinkLabel,submit_text:e.submitText,submit_text_label:e.submitTextLabel,suggested_comment_sort:e.suggestedCommentSort,title:e.title,type:e.subredditType,wiki_edit_age:e.wikiEditAge,wiki_edit_karma:e.wikiEditKarma,wikimode:e.wikimode}),h={allowPostCrossposts:"allow_post_crossposts",allowImages:"allow_images",allowDiscovery:"allow_discovery",contentVisible:"allow_top",collapseDeletedComments:"collapse_deleted_comments",commentScoreHideMins:"comment_score_hide_mins",crowdControlMode:"crowd_control_mode",description:"description",domain:"domain",excludeBannedModqueue:"exclude_banned_modqueue",headerHoverText:"header-title",hideAds:"hide_ads",keyColor:"key_color",language:"lang",contentOptions:"link_type",over18:"over_18",publicDescription:"public_description",publicTraffic:"public_traffic",showMedia:"show_media",showMediaPreview:"show_media_preview",spamComments:"spam_comments",spamLinks:"spam_links",spamSelfposts:"spam_selfposts",spoilersEnabled:"spoilers_enabled",submitLinkLabel:"submit_link_label",submitText:"submit_text",submitTextLabel:"submit_text_label",suggestedCommentSort:"suggested_comment_sort",title:"title",subredditType:"type",wikiEditAge:"wiki_edit_age",wikiEditKarma:"wiki_edit_karma",wikimode:"wikimode"}},"./src/reddit/endpoints/user/index.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return b}),n.d(t,"d",function(){return p}),n.d(t,"a",function(){return m});var s=n("./src/config.ts"),i=n("./src/graphql/operations/ExperimentVariants.json"),o=n("./src/lib/constants/index.ts"),r=n("./src/lib/makeApiRequest/index.ts"),a=n("./src/lib/makeGqlRequest/index.ts"),c=n("./src/lib/omitHeaders/index.ts"),d=n("./src/reddit/constants/headers.ts"),u=n("./src/reddit/models/RichTextJson/addRTJParam.ts");const l=(e,t)=>Object(r.c)(e,{endpoint:Object(u.a)(`${s.a.gatewayUrl}/desktopapi/v1/user/${t}/about`),method:o.jb.GET,data:{api_type:"json",gilding_detail:1}}),b=e=>Object(r.c)(Object(c.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/seen_layout_switch`,method:o.jb.POST}),p=e=>Object(r.c)(Object(c.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/seen_modal`,method:o.jb.POST}),m=e=>Object(a.a)(e,i)},"./src/reddit/endpoints/user/me.ts":function(e,t,n){"use strict";var s=n("./src/config.ts"),i=n("./src/lib/constants/index.ts"),o=n("./src/lib/makeApiRequest/index.ts");t.a=(e=>Object(o.c)(e,{endpoint:`${s.a.gatewayUrl}/desktopapi/v1/me`,method:i.jb.GET,data:{api_type:"json",gilding_detail:1}}))},"./src/reddit/endpoints/user/preferences.ts":function(e,t,n){"use strict";var s=n("./src/config.ts"),i=n("./src/lib/constants/index.ts"),o=n("./src/lib/makeApiRequest/index.ts"),r=n("./src/lib/omitHeaders/index.ts");const a={acceptPrivateMessages:"accept_pms",allowClickTracking:"allow_clicktracking",collapseReadMessages:"collapse_read_messages",defaultCommentSort:"default_comment_sort",emailDigests:"email_digests",emailUnreadMessages:"email_messages",emailUnsubscribe:"email_unsubscribe_all",geopopular:"geopopular",hasSeenCustomizeFlyout:"has_seen_customize_flyout",hideAds:"hide_ads",hideFromRobots:"hide_from_robots",hideNSFW:"no_profanity",highlightComments:"highlight_new_comments",inBeta:"beta",labelNSFW:"label_nsfw",markMessagesRead:"mark_messages_read",nightmode:"nightmode",over18:"over_18",profileOptOut:"profile_opt_out",showMessagesInInbox:"threaded_messages",showNotifications:"live_orangereds",showUsernameMentionNotifications:"monitor_mentions",privateFeeds:"private_feeds",autoplayVideo:"video_autoplay",showActiveCommunities:"top_karma_subreddits",showTwitter:"show_twitter",stylesEnabled:"styles_enabled",openPostInNewTab:"open_post_in_new_tab",rememberCommunitySort:"remember_community_sort",useMarkdown:"use_markdown",sort:"sort",layout:"layout",rememberCommunityLayout:"remember_community_layout"};var c=e=>{const t={};return Object.keys(e).map(n=>{t[a[n]]=e[n]}),t};const d={sort:"sort",stylesEnabled:"styles_enabled",layout:"layout"};var u=n("./src/reddit/constants/headers.ts");n.d(t,"f",function(){return l}),n.d(t,"c",function(){return b}),n.d(t,"e",function(){return p}),n.d(t,"d",function(){return m}),n.d(t,"g",function(){return f}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return g}),n.d(t,"h",function(){return _});const l=e=>Object(o.c)(Object(r.a)(e,[u.a]),{method:i.jb.PATCH,endpoint:`${e.apiUrl}/api/v1/me/prefs`,type:"json",data:{over_18:"true"}}),b=(e,t)=>Object(o.c)(Object(r.a)(t,[u.a]),{method:i.jb.PATCH,endpoint:`${t.apiUrl}/api/v1/me/prefs`,type:"json",data:{video_autoplay:e}}),p=(e,t)=>Object(o.c)(Object(r.a)(t,[u.a]),{method:i.jb.PATCH,endpoint:`${t.apiUrl}/api/v1/me/prefs`,type:"json",data:{nightmode:e}}),m=(e,t)=>Object(o.c)(Object(r.a)(t,[u.a]),{method:i.jb.PATCH,endpoint:`${t.apiUrl}/api/v1/me/prefs`,type:"json",data:{geopopular:e}}),f=(e,t)=>Object(o.c)(Object(r.a)(t,[u.a]),{method:i.jb.PATCH,endpoint:`${t.apiUrl}/api/v1/me/prefs`,type:"json",data:c(e)}),h=(e,t)=>Object(o.c)(Object(r.a)(t,[u.a]),{method:i.jb.POST,endpoint:`${t.apiUrl}/api/quarantine_optin`,data:{sr_name:e,api_type:"json",accept:!0}}),g=(e,t)=>Object(o.c)(t,{method:i.jb.POST,endpoint:`${s.a.gatewayUrl}/desktopapi/v1/set_preferences`,type:"json",data:{type:"account",preferences:c(e)}}),_=(e,t,n)=>Object(o.c)(n,{method:i.jb.POST,endpoint:`${s.a.gatewayUrl}/desktopapi/v1/set_preferences`,type:"json",data:{type:"subreddit",subreddit_id:e,preferences:(e=>{const t={};return Object.keys(e).map(n=>{t[d[n]]=e[n]}),t})(t)}})},"./src/reddit/helpers/addRedesignIdentifier/index.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var s=n("./src/config.ts"),i=n("./src/lib/addQueryParams/index.ts");function o(e){const t=s.a.telemetry.appName.redesign,n={redditWebClient:t,app:`${t}-client-production`};return Object(i.a)(e,n)}},"./src/reddit/helpers/history/index.ts":function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return a});var s=n("./node_modules/lodash/omit.js"),i=n.n(s);const o=(e,t)=>{const n=Object.assign({},history.state,{state:Object.assign({},history.state.state,{[e]:t})});history.replaceState(n,window.document.title)},r=e=>{const t=Object.assign({},history.state,{state:Object.assign({},i()(history.state.state,e))});history.replaceState(t,window.document.title)},a=e=>history&&history.state&&history.state.state&&history.state.state[e]},"./src/reddit/helpers/overlay/index.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a});var s=n("./node_modules/history/index.js"),i=n("./node_modules/react-router-redux/es/index.js"),o=n("./src/reddit/helpers/path/index.ts");const r=e=>{if("string"==typeof e)return Object(s.createLocation)(Object(o.b)(e),{isOverlay:!0});{const t=Object(s.createLocation)(e);return t.state=Object.assign({},t.state||{},{isOverlay:!0}),t}},a=e=>Object(i.b)(r(e))},"./src/reddit/helpers/redesignOptoutCookie/index.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return c});var s=n("./src/config.ts"),i=n("./node_modules/js-cookie/src/js.cookie.js"),o=n.n(i);const r="redesign_optout";function a(){o.a.get(r)||o.a.set(r,"true",{domain:s.a.cookieDomain,expires:function(){const e=new Date;return e.setFullYear(e.getFullYear()+3),e}()})}function c(){o.a.get(r)&&o.a.remove(r,{domain:s.a.cookieDomain})}},"./src/reddit/helpers/styles/mixins/fonts.tsx":function(e,t,n){"use strict";n.r(t),n.d(t,"BODY_FONT_FALLBACKS",function(){return s}),n.d(t,"BODY_FONT_FAMILY",function(){return i}),n.d(t,"CODE_FONT_FALLBACKS",function(){return o}),n.d(t,"CODE_FONT_FAMILY",function(){return r}),n.d(t,"VERDANA_CLASS",function(){return a}),n.d(t,"titleFontH1",function(){return d}),n.d(t,"titleFontH2",function(){return u}),n.d(t,"titleFontH3",function(){return l}),n.d(t,"titleFontH4",function(){return b}),n.d(t,"titleFontH5",function(){return p}),n.d(t,"titleFontH6",function(){return m}),n.d(t,"metadataFont",function(){return f}),n.d(t,"userFlairFont",function(){return h}),n.d(t,"flairFont",function(){return g}),n.d(t,"labelsFont",function(){return _}),n.d(t,"actionFont",function(){return j}),n.d(t,"smallButtonFont",function(){return O}),n.d(t,"largeButtonFont",function(){return C}),n.d(t,"tabFont",function(){return v}),n.d(t,"bodyFontH1",function(){return y}),n.d(t,"bodyFontH2",function(){return E}),n.d(t,"bodyFontH3",function(){return x}),n.d(t,"bodyFontH4",function(){return S}),n.d(t,"bodyFontH5",function(){return w}),n.d(t,"bodyFontH6",function(){return k}),n.d(t,"bodyFont",function(){return T}),n.d(t,"bodyFontSmall",function(){return F}),n.d(t,"bodyFontMono",function(){return R});const s="Arial, sans-serif",i=`Noto Sans, ${s}`,o="Menlo, Monaco, Consolas",r=`Noto Mono, ${o}`,a="fvfo";function c(e,t,n,o,r=i,c=s){return`\n font-family ${r};\n font-size: ${e}px;\n font-weight: 400;\n line-height: ${t}px;\n\n .${a} & {\n font-family: ${c};\n ${n?`font-size: ${n}px;`:""}\n ${o?`line-height: ${o}px;`:""}\n }\n `}const d="\n font-size: 22px;\n font-weight: 500;\n line-height: 26px;\n",u="\n font-size: 20px;\n font-weight: 500;\n line-height: 24px;\n",l="\n font-size: 18px;\n font-weight: 500;\n line-height: 22px;\n",b="\n font-size: 16px;\n font-weight: 500;\n line-height: 20px;\n",p="\n font-size: 14px;\n font-weight: 500;\n line-height: 18px;\n",m="\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n",f="\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n",h=f,g="\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n",_="\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.5px;\n line-height: 12px;\n text-transform: uppercase;\n",j="\n font-size: 12px;\n font-weight: 700;\n line-height: 16px;\n",O="\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 0.5px;\n line-height: 24px;\n text-transform: uppercase;\n",C="\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 0.5px;\n line-height: 32px;\n text-transform: uppercase;\n",v="\n font-size: 14px;\n font-weight: 700;\n line-height: 32px;\n",y=`\n ${c(22,26,void 0,28)}\n`,E=`\n ${c(20,24,void 0,26)}\n`,x=`\n ${c(18,22,void 0,24)}\n`,S=`\n ${c(16,20,void 0,22)}\n`,w=`\n ${c(14,18)}\n`,k=`\n ${c(12,16)}\n`,T=`\n ${c(14,21,void 0,22)}\n`,F=`\n ${c(12,18)}\n`,R=`\n ${c(13,20,14,22,r,o)}\n`},"./src/reddit/helpers/trackers/profileSettings.ts":function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"d",function(){return b}),n.d(t,"e",function(){return p}),n.d(t,"k",function(){return m}),n.d(t,"j",function(){return f}),n.d(t,"g",function(){return g}),n.d(t,"f",function(){return _}),n.d(t,"i",function(){return j}),n.d(t,"c",function(){return O}),n.d(t,"h",function(){return C}),n.d(t,"a",function(){return v});var s=n("./node_modules/lodash/pick.js"),i=n.n(s),o=n("./src/reddit/constants/tracking.ts"),r=n("./src/reddit/selectors/telemetry.ts"),a=n("./src/telemetry/index.ts"),c=n("./src/telemetry/models/PostComposer.ts");const d=e=>Object.assign({source:"profile_settings"},Object(r.defaults)(e)),u=(e,t=[])=>{const n=Object(r.currentProfileModelSelector)(e);if(n)return i()(n,["id","name","type",...t])},l=e=>{Object(a.a)(Object.assign({},d(e),{noun:"twitter_connect_link",action:o.b.CLICK}))},b=e=>{Object(a.a)(Object.assign({},d(e),{noun:"twitter_disconnect_link",action:o.b.CLICK}))},p=(e,t)=>{Object(a.a)(Object.assign({},d(e),{noun:"display_twitter_checkbox",action:Object(c.getToggleAction)(t)}))},m=(e,t)=>{Object(a.a)(Object.assign({},d(e),{noun:"twitter_account",action:o.b.CLICK,profile:{id:t.id,name:t.username}}))},f=e=>{Object(a.a)(Object.assign({},d(e),{profile:u(e,["display_name","about","avatar_url","cover_url","nsfw","content_visible","communities_visible"]),action:o.b.VIEW,noun:"settings_page"}))},h={profileIcon:"avatar",profileBanner:"cover"},g=(e,t)=>{Object(a.a)(Object.assign({},d(e),{profile:u(e,["avatar_url","cover_url"]),action:"upload",noun:h[t]}))},_=(e,t)=>{Object(a.a)(Object.assign({},d(e),{profile:u(e,[]),action:"remove",noun:h[t]}))},j=e=>{Object(a.a)(Object.assign({},d(e),{profile:u(e,["display_name","about","nsfw","content_visible","communities_visible"]),action:"click",noun:"save_settings"}))},O=e=>t=>Object.assign({},d(t),{profile:u(t,[]),action:e?"select":"deselect",noun:"content_visible"}),C=e=>t=>Object.assign({},d(t),{profile:u(t,[]),action:e?"select":"deselect",noun:"nsfw"}),v=e=>t=>Object.assign({},d(t),{profile:u(t,[]),action:e?"select":"deselect",noun:"active_in_communities"})},"./src/reddit/models/NewStructuredStyles/index.ts":function(e,t,n){"use strict";n.d(t,"c",function(){return l}),n.d(t,"a",function(){return f}),n.d(t,"b",function(){return h});var s=n("./node_modules/polished/dist/polished.es.js"),i=n("./src/reddit/models/Theme/NewColorSystem/index.ts");const o={borderRadius:"24",customSize:"32",padding:"6",size:"24"},r={highlight:"#E9F5FD",metaText:"#787C7E",placeholder:"#D3D6DA",postIcon:"#878A8C",postLine:"#D3D6DA",report:"#FFF7E5"},a={body:"#FFFFFF",actionIcon:"#878A8C",navIcon:"#1A1A1B",errorText:"#FF0000",field:"#F6F7F8",flair:"#EDEFF1",inactive:"#EDEFF1",line:"#EDEFF1",lightText:"#FFFFFF",pageHeader:"#0079D3",postFlairText:"#1A1A1B"},c={active:"#24A0ED",banner:{backgroundColor:"#24A0ED",backgroundImage:void 0,backgroundImagePosition:"cover",communityNameFormat:"slashtag",iconColor:"#24A0ED",iconImage:void 0,iconDimensions:o,lineHeight:"38",height:64,positionedImage:void 0,positionedImageHeight:48,positionedImageAlignment:"cover",secondaryBannerPositionedImage:void 0,showCommunityIcon:!0},bodyText:"#1A1A1B",button:"#0079D3",canvas:"#DAE0E6",linkText:"#0079D3",menu:"#FFFFFF",menuActiveText:"#0079D3",menuInactiveText:"#0079D3",metaText:"#787C7E",navBar:{activeLink:r.highlight,activeSubmenuCaret:"#24A0ED",activeSubmenuLink:"#24A0ED",backgroundColor:"#24A0ED",backgroundImage:void 0,hoverLink:r.highlight,inactiveLink:a.inactive,inactiveSubmenuCaret:Object(s.f)(.6,"#24A0ED"),inactiveSubmenuLink:Object(s.f)(.6,"#24A0ED"),submenuBackgroundColor:Object(s.f)(.93,"#24A0ED"),useOverlay:!1},post:"#FFFFFF",postFlairText:"#1A1A1B",titleText:"#1A1A1B",voteText:{base:"#878A8C",downvote:"#7193FF",upvote:"#FF4500"},voteIcons:{upvoteActive:void 0,upvoteInactive:void 0,downvoteActive:void 0,downvoteInactive:void 0},widgetColors:{sidebarWidgetBackgroundColor:"#FFFFFF",sidebarWidgetHeaderColor:"#FFFFFF",lineColor:Object(i.d)("#1A1A1B")}},d={actionIcon:"#818384",body:"#1A1A1B",bodyText:"#D7DADC",button:"#D7DADC",canvas:"#030303",errorText:"#FF0000",field:"#272729",highlight:"#17232D",inactive:"#343536",lightText:"#FFFFFF",line:"#343536",linkText:"#4FBCFF",menu:"#030303",menuActiveText:"#D7DADC",menuInactiveText:"#D7DADC",metaText:"#818384",navIcon:"#D7DADC",pageHeader:"#818384",placeholder:"#3A3A3C",post:"#1A1A1B",postFlairText:"#FFFFFF",postIcon:"#818384",postLine:"#343536",report:"#1C1402",titleText:"#D7DADC",voteText:{base:"#818384",downvote:"#7193FF",upvote:"#FF4500"},voteIcons:{upvoteActive:void 0,upvoteInactive:void 0,downvoteActive:void 0,downvoteInactive:void 0},widgetColors:{sidebarWidgetBackgroundColor:"#1A1A1B",sidebarWidgetHeaderColor:"#1A1A1B",lineColor:"#343536"}},u={active:"#0079D3",banner:{backgroundColor:"#24A0ED",backgroundImage:void 0,backgroundImagePosition:"cover",communityNameFormat:"slashtag",iconColor:"#24A0ED",iconImage:void 0,iconDimensions:o,lineHeight:"38",height:64,positionedImage:void 0,positionedImageHeight:48,positionedImageAlignment:"cover",secondaryBannerPositionedImage:void 0,showCommunityIcon:!0},flair:"#343536",navBar:{activeLink:r.highlight,activeSubmenuCaret:"#D7DADC",activeSubmenuLink:"#D7DADC",backgroundColor:"#030303",backgroundImage:void 0,hoverLink:"#D7DADC",inactiveLink:"#D7DADC",inactiveSubmenuCaret:"#D7DADC",inactiveSubmenuLink:"#D7DADC",submenuBackgroundColor:"#1A1A1B",useOverlay:!1}},l=(e,t,n)=>n?b(e):p(e,t),b=e=>Object.assign({},h,{banner:e.banner||u.banner,navBar:e.navBar||u.navBar}),p=(e,t)=>{let n;return e.post?((n=Object.assign({},a,t,e,{bodyText:m(e.post,!1,.89),metaText:m(e.post,!1,.51),placeholder:m(e.post,!1,.16),postIcon:m(e.post,!1,.46),postLine:m(e.post,!1,.2),report:Object(s.c)(.1,"#FFB000",e.post)})).voteText.base=m(e.post,!1,.46),e.active?n.highlight=Object(s.c)(.1,e.active,e.post):n.highlight=m(e.post,!1,.1)):(n=Object.assign({},e,a,{active:c.active})).voteText.base=c.voteText.base,n},m=(e,t,n)=>Object(s.c)(n,(e=>e?"#FFFFFF":"#000000")(t),e),f=Object.assign({},c,r,a),h=Object.assign({},u,d)},"./src/reddit/models/RichTextJson/addRTJParam.ts":function(e,t,n){"use strict";var s=n("./src/lib/addQueryParams/index.ts");t.a=(e=>Object(s.a)(e,{rtj:"only"}))},"./src/reddit/models/Theme/NewColorSystem/index.ts":function(e,t,n){"use strict";n.d(t,"f",function(){return o}),n.d(t,"d",function(){return r}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return c}),n.d(t,"a",function(){return d}),n.d(t,"b",function(){return u});var s=n("./node_modules/polished/dist/polished.es.js"),i=n("./src/reddit/models/NewStructuredStyles/index.ts");const o={borderRadius:"32",customSize:"52",padding:"10",size:"36"};function r(e){return Object(s.j)(.93,e)}function a(e,t,n){return Object(i.c)(e,t,n)}function c(e){return e.redditStyle||e["data-redditstyle"]?e.theme.newRedditTheme:e.theme.newCommunityTheme}function d(e){return e.theme.newRedditTheme}function u(e){return Object(s.e)(e,.2)}},"./src/reddit/models/Toast/index.ts":function(e,t,n){"use strict";var s,i,o;n.d(t,"b",function(){return i}),n.d(t,"a",function(){return o}),function(e){e.AuthError="auth-error"}(s||(s={})),function(e){e[e.SuccessCommunity=0]="SuccessCommunity",e[e.SuccessCommunityGreen=1]="SuccessCommunityGreen",e[e.SuccessMod=2]="SuccessMod",e[e.Error=3]="Error",e[e.Undo=4]="Undo",e[e.EuCookiePolicy=5]="EuCookiePolicy",e[e.UappBanner=6]="UappBanner",e[e.AuthError=7]="AuthError",e[e.Custom=8]="Custom"}(i||(i={})),function(e){e[e.subscribeMilestone=0]="subscribeMilestone",e[e.subscribeCap=1]="subscribeCap",e[e.voteMilestone=2]="voteMilestone"}(o||(o={}))}}]);
|
|
//# sourceMappingURL=Governance~Profile~ProfileHomepage~ProfilePostComments~R2CommentsPage~R2Listing~Reddit.9d0a4deeaad07def9f6e.js.map
|