(self.webpackChunklite=self.webpackChunklite||[]).push([[6487],{24049:(e,n,t)=>{"use strict";t.d(n,{Z:()=>o});var i=t(67294);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n{"use strict";t.d(n,{Z:()=>o});var i=t(67294);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n{"use strict";t.d(n,{M:()=>r});var i=t(67294),a=t(77355),l=t(93310),o=t(50458);function r(e){var n=e.entityName,t=void 0===n?"story":n;return i.createElement(a.x,{textAlign:"center"},"Deletion is not reversible, and the story will be completely deleted. If you do not want to delete, you can"," ",i.createElement(l.r,{target:"_blank",href:o.aH,inline:!0,linkStyle:"OBVIOUS"},"unlist the ",t),".")}},5351:(e,n,t)=>{"use strict";t.d(n,{f:()=>c,w:()=>u});var i=t(34699),a=t(67294),l=t(14646),o=t(68894),r=t(47786),d=function(e){return{overflow:"hidden",transition:"opacity 300ms ease".concat(e?"":" 300ms",", max-height 300ms ease").concat(e?" 300ms":""),maxHeight:e?"0":"450px",opacity:e?0:1}},s=(0,a.createContext)({});function c(e){var n=e.children,t=e.post,c=e.hidePost,u=e.unhidePost,m=(0,l.I)(),p=(0,a.useRef)(!1),k=(0,a.useState)(!1),v=(0,i.Z)(k,2),f=v[0],g=v[1],b=(0,o.O)(!1),S=(0,i.Z)(b,3),y=S[0],h=S[1],E=S[2],N=(0,a.useCallback)((function(e){f&&p.current&&("max-height"===e.propertyName?(h(),p.current=!1):null==c||c(t.id))}),[f,t.id,c]),w=(0,a.useCallback)((function(){p.current=!0,g(!0)}),[]),x=(0,a.useCallback)((function(){g(!1),null==u||u(t.id)}),[u,t.id]),C=(0,a.useMemo)((function(){return{animateShowLess:w,animateUndo:x}}),[w,x]);return a.createElement(s.Provider,{value:C},a.createElement("div",{className:m(d(f)),onTransitionEnd:N},n),a.createElement(r.T,{post:t,isVisible:y,hide:E}))}var u=function(){return(0,a.useContext)(s)}},67912:(e,n,t)=>{"use strict";t.d(n,{d:()=>a});var i=t(87329),a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NegativeSignalModal_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creator"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NegativeSignalModal_publisher"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isMuting"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NegativeSignalModal_publisher"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isMuting"}}]}}]}}]}}].concat((0,i.Z)([{kind:"FragmentDefinition",name:{kind:"Name",value:"NegativeSignalModal_publisher"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Publisher"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]))}},47786:(e,n,t)=>{"use strict";t.d(n,{T:()=>x});var i=t(34699),a=t(67294),l=t(78964),o=t(78038),r=t(25550),d=t(61095),s=t(50474),c=t(77355),u=t(53563),m=t(18627),p=t(66411),k=t(75221),v=t(68894),f=t(87691),g=t(14646),b=t(24049);function S(){return S=Object.assign?Object.assign.bind():function(e){for(var n=1;n{"use strict";t.d(n,{e:()=>h});var i=t(96156),a=t(34699),l=t(21919),o=t(64718),r=t(67294),d=t(25550),s=t(18627),c=t(66411),u=t(75221),m=t(78285),p=t(11462),k=t(5351),v=t(87329),f=t(67912),g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ExplicitSignalPostQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NegativeSignalModal_post"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"explicitSignalState"}}]}}]}}]}}].concat((0,v.Z)(f.d.definitions))},b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ExplicitSignalMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"signal"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ExplicitUserSignal"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendExplicitSignal"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"ObjectField",name:{kind:"Name",value:"signal"},value:{kind:"Variable",name:{kind:"Name",value:"signal"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function y(e){for(var n=1;n{"use strict";t.d(n,{t:()=>Cn});var i=t(67294),a=t(22122),l=t(34699),o=t(96156),r=t(48403),d=t.n(r),s=t(64718),c=t(14045),u=t(81253),m=t(38356),p=t(42130),k=["isResponsive"],v=function(e){var n=e.isResponsive,t=(0,u.Z)(e,k);return i.createElement(m.u,(0,a.Z)({text:n?"More":void 0,icon:i.createElement(p.Z,null)},t))},f=t(86706),g=t(13195),b=t(6443),S=t(39507),y=t(38352),h=t(93310),E=t(83486),N=t(43487),w=t(51681),x=function(e){var n=e.post,t=e.hidePopover,a=(0,b.H)().value,l=null==a?void 0:a.id,o=(0,S.T)(n).viewerEdge,r=(0,f.I0)(),d=i.useCallback((function(e){return r((0,E.at)(e))}),[r]),s=(0,N.b$)((function(e){return e.multiVote.clapsPerPost})),c=(0,w.l)(s,n,o),u=c.clapCount,m=c.viewerClapCount,p=(0,g.C)();return l&&u&&m&&m>0?i.createElement(i.Fragment,null,i.createElement(y.Sl,null,i.createElement(h.r,{onClick:function(){p(n,(null==a?void 0:a.id)||"",-m,o),d({postId:n.id,clapCount:u-m,viewerClapCount:0,viewerHasClappedSinceFetch:!0}),t()}},"Undo claps")),i.createElement(y.oK,null)):null},C=t(23768),F=t(32947),O=t(70028),P=t(66021),I=t(90833),D=t(70679),T=t(77355),R=t(87691),A=t(14646),V=t(50458),_={cursor:"not-allowed",marginBottom:"8px",opacity:.5},M=function(e){var n=e.post,t=e.shareKey,a=(0,A.I)();return n&&t?i.createElement(y.Sl,null,i.createElement(T.x,{width:"174px"},i.createElement("div",{className:a(_)},"Copy Friend Link"),i.createElement(R.F,{scale:"S",color:"LIGHTER"},'Friend links have moved to the "Share" menu.  ',i.createElement(h.r,{linkStyle:"OBVIOUS",inline:!0,href:(0,V.wA)()},"Learn more")))):null},j=t(32493),L=t(78285),B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PostAllowResponsesMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowResponses"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setPostAllowResponses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"allowResponses"},value:{kind:"Variable",name:{kind:"Name",value:"allowResponses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"allowResponses"}}]}}]}}]},Z=(0,f.$j)()((function(e){var n=e.children,t=e.dispatch,a=e.onCompleted,l=e.targetPostId;return i.createElement(j.m,{mutation:B,onCompleted:function(){t((0,L.Dx)({message:"Responses are now hidden for this post."})),a&&a()},variables:{targetPostId:l,allowResponses:!1},optimisticResponse:{__typename:"Mutation",setPostAllowResponses:{__typename:"Post",id:l,allowResponses:!1}}},(function(e){return n({mutate:e})}))})),U=(0,f.$j)()((function(e){var n=e.children,t=e.dispatch,a=e.onCompleted,l=e.targetPostId;return i.createElement(j.m,{mutation:B,onCompleted:function(){t((0,L.Dx)({message:"Responses are now shown for this post."})),a&&a()},variables:{targetPostId:l,allowResponses:!0},optimisticResponse:{__typename:"Mutation",setPostAllowResponses:{__typename:"Post",id:l,allowResponses:!0}}},(function(e){return n({mutate:e})}))})),z=t(75675),H=t(68894),G=function(e){var n=e.hidePopover,t=e.postId,a=e.allowResponses,o=(0,H.O)(!1),r=(0,l.Z)(o,3),d=r[0],s=r[1],c=r[2],u=function(){c(),n()};return i.createElement(i.Fragment,null,i.createElement(Z,{targetPostId:t},(function(e){var n=e.mutate;return i.createElement(z.w,{onConfirm:n,isVisible:d,hide:u,entityTypename:"Post"})})),i.createElement(U,{targetPostId:t},(function(e){var n=e.mutate;return i.createElement(y.Sl,null,i.createElement(h.r,{onClick:function(){a?s():n()}},a?"Hide responses":"Show responses"))})))},K=t(75412),W=t(71652),Q=t(87329),Y=t(84683),J={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollectionSubmissionOption_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionAvatar_collection"}}]}}].concat((0,Q.Z)(Y.d.definitions))},q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CollectionSubmissionPopoverQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"writerCollections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionSubmissionOption_collection"}}]}},{kind:"Field",name:{kind:"Name",value:"adminCollections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionSubmissionOption_collection"}}]}}]}}]}}].concat((0,Q.Z)(J.definitions))},X=t(21919),$=t(75221),ee=[{kind:"FragmentDefinition",name:{kind:"Name",value:"ManageCollectionPostStatus_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}}]}}],ne={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionPostStatusMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"status"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CollectionPostStatus"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionPostStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"Argument",name:{kind:"Name",value:"collectionSlug"},value:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}}},{kind:"Argument",name:{kind:"Name",value:"status"},value:{kind:"Variable",name:{kind:"Name",value:"status"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"statusForCollection"}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ManageCollectionPostStatus_collection"}}]}}]}}]}}].concat((0,Q.Z)(ee))},te={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RejectPostFromPubMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"status"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CollectionPostStatus"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionPostStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"Argument",name:{kind:"Name",value:"collectionSlug"},value:{kind:"Variable",name:{kind:"Name",value:"collectionSlug"}}},{kind:"Argument",name:{kind:"Name",value:"status"},value:{kind:"Variable",name:{kind:"Name",value:"status"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"statusForCollection"}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ManageCollectionPostStatus_collection"}}]}}]}}]}}].concat((0,Q.Z)(ee))},ie=function(e){var n=(0,X.D)(ne),t=(0,l.Z)(n,1)[0];return(0,i.useCallback)((function(n){return t({variables:{collectionSlug:(null==n?void 0:n.slug)||"",postId:e.id,status:$.Zj.APPROVED}})}),[e])},ae=function(e){var n=(0,X.D)(te),t=(0,l.Z)(n,1)[0];return(0,i.useCallback)((function(n){return t({variables:{collectionSlug:(null==n?void 0:n.slug)||"",postId:e.id,status:$.Zj.REMOVED},optimisticResponse:{manageCollectionPostStatus:{__typename:"Post",id:e.id,statusForCollection:null,collection:null,pendingCollection:null}}}).then((function(e){if(e.errors&&e.errors[0])throw e.errors[0];return e}))}),[e])},le=t(25267),oe=t(91583),re=t(47230),de=t(66227),se=t(73917),ce=t(70310),ue=t(20113),me=t(90586),pe=t(34135),ke="collectionSubmissionPopover",ve=[{name:"",value:"No publication",content:i.createElement(T.x,{height:"32px",display:"flex",alignItems:"center",marginLeft:"5px"},i.createElement(R.F,{scale:"M",color:"DARKER"},"No publication"))}];function fe(e){var n=e.collection;return n.name?i.createElement(T.x,{display:"flex",justifyContent:"space-between",width:"200px",alignItems:"center",marginLeft:"5px"},i.createElement(R.F,{scale:"M",color:"DARKER"},n.name),i.createElement(W.v,{collection:n,size:32})):null}function ge(e){var n=e.show,t=e.post,a=t.statusForCollection,o=t.isPublished,r=i.useState(!1),d=(0,l.Z)(r,2),s=d[0],c=d[1];return s||pe.V6.on("load",(function(){return c(!0)})),!a&&o&&s?i.createElement(Se,{post:t,noQueryReturn:null},(function(e){var a=e.loading,l=e.error,o=e.data;if(a||l)return null;var r=(void 0===o?{viewer:void 0}:o).viewer,d=t.creator;if(!r||!d||r.id!==d.id)return null;var s=r.adminCollections,c=r.writerCollections;return 0===s.length&&0===c.length?null:i.createElement(y.Sl,null,i.createElement(h.r,{"aria-controls":ke,"aria-expanded":"false",onClick:n},"Add to publication"))})):null}function be(e){var n=e.isVisible,t=e.hide;return i.createElement(oe.V,{isVisible:n,hide:t,withCloseButton:!0},i.createElement(T.x,{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",maxWidth:"480px"},i.createElement(ue.X6,{scale:"M",tag:"h3"},"Story submitted"),i.createElement(T.x,{paddingTop:"8px",paddingBottom:"24px"},i.createElement(me.QE,{scale:"M"},"We’ll email you when the publication editor has reviewed your submission.")),i.createElement(re.zx,{buttonStyle:"OBVIOUS",onClick:t},"OK")))}var Se=function(e){var n=e.children,t=e.post,a=e.noQueryReturn,l=t.creator;return l?i.createElement(le.I,null,(function(e){return e?e.id!==l.id?a:i.createElement(K.A,{query:q,ssr:!1},(function(e){var t=e.loading,i=e.error,a=e.data;return n({loading:t,error:i,data:a})})):a})):a},ye=function(e){var n=e.post,t=e.hide,a=e.showLoadingIndicator,o=e.isVisible,r=e.children,d=i.useState(!1),s=(0,l.Z)(d,2),c=s[0],u=s[1],m=i.useState(""),p=(0,l.Z)(m,2),k=p[0],v=p[1],f=ie(n),g=function(e){var n=(0,X.D)(ne),t=(0,l.Z)(n,1)[0];return(0,i.useCallback)((function(n){return t({variables:{collectionSlug:(null==n?void 0:n.slug)||"",postId:e.id,status:$.Zj.PENDING},optimisticResponse:{manageCollectionPostStatus:{__typename:"Post",id:e.id,statusForCollection:$.Zj.PENDING,pendingCollection:n}}})}),[e])}(n);return c||pe.V6.on("load",(function(){return u(!0)})),n.isPublished&&c?i.createElement(de.B,null,(function(e){var l=e.isVisible,d=e.hide,s=e.show;return i.createElement(i.Fragment,null,i.createElement(be,{hide:d,isVisible:l}),i.createElement(Se,{post:n,noQueryReturn:r},(function(e){var l=e.loading,d=e.error,c=e.data;if(l||d)return r;var u=(void 0===c?{viewer:void 0}:c).viewer,m=n.creator;if(!u||!m||u.id!==m.id)return r;var p=u.adminCollections,b=u.writerCollections;if(0===p.length&&0===b.length)return r;var S=p.concat(b).filter((function(e){return!!e&&!!e.slug&&!!e.name})).map((function(e){return{name:e.slug||"",value:e.name||"",content:i.createElement(fe,{collection:e})}})),y=ve.concat(S),E=p.reduce((function(e,n){return e[n.slug||""]=n,e}),{}),N=b.reduce((function(e,n){return e[n.slug||""]=n,e}),{}),w="";if(k){var x=y.find((function(e){return e.name===k}));x&&(w=x.value)}var C="addStoryToPublicationTitle";return i.createElement(se.J,{ariaId:ke,hide:t,isVisible:o,popoverRenderFn:function(){return i.createElement(T.x,{padding:"20px",width:"280px",display:"flex",flexDirection:"column"},i.createElement(R.F,{scale:"M",color:"DARKER",ariaLabelledById:C},"Add your story to a publication:"),i.createElement(T.x,{marginTop:"10px",position:"relative"},i.createElement(T.x,{position:"absolute",height:"16px",width:"100%",bottom:"0",zIndex:"100",backgroundImage:"linear-gradient(transparent, #ffffff)"}),i.createElement(T.x,{maxHeight:"160px",overflow:"auto"},i.createElement(ce.E,{value:w,onChange:v,options:y,radioButtonsName:"addStory",ariaLabelledBy:C}))),i.createElement(T.x,{display:"flex",marginTop:"20px"},k in E?i.createElement(re.zx,{onClick:function(){var e=E[k];t(),a(),f(e).then((function(){window.location.reload()}))},buttonStyle:"OBVIOUS"},"Add story"):i.createElement(re.zx,{onClick:function(){var e=N[k];g(e),t(),s()},disabled:!k},"Submit"),i.createElement(T.x,{marginLeft:"10px"},i.createElement(R.F,{scale:"M",color:"LIGHTER"},i.createElement(h.r,{onClick:t},i.createElement(T.x,{padding:"10px"},"Cancel"))))),i.createElement(T.x,{marginTop:"10px"},i.createElement(R.F,{scale:"M"},"This story will be automatically submitted to the publication. When you submit your story, the publication's editors will be notified and will be able to edit your story.")))}},r)})))})):r},he=function(e){var n=e.children,t=e.isVisible,a=e.post,l=e.hide,o=e.showLoadingIndicator,r=ie(a),d=ae(a),s=(0,f.I0)(),c=a.pendingCollection;return c?i.createElement(se.J,{ariaId:"manageSubmissionPopover",isVisible:t,hide:l,popoverRenderFn:function(){return i.createElement(T.x,{padding:"16px",maxWidth:"280px"},i.createElement(T.x,{display:"flex",flexDirection:"row",alignItems:"center"},i.createElement(T.x,{paddingRight:"8px"},i.createElement(W.v,{collection:c,size:40})),i.createElement(R.F,{scale:"S"},"This draft is submitted to ",c.name,".")),i.createElement(T.x,{flexDirection:"row",display:"flex",paddingTop:"16px"},i.createElement(T.x,{paddingRight:"8px"},i.createElement(re.zx,{buttonStyle:"OBVIOUS",onClick:function(){l(),o(),r(a.pendingCollection).then((function(){window.location.reload()}))}},"Accept")),i.createElement(re.zx,{buttonStyle:"SUBTLE",onClick:function(){d(a.pendingCollection).then((function(){s((0,L.Dx)({message:"Story removed from ".concat(c.name||"publication")}))})),l()}},"Don't accept")))}},n):n},Ee=function(e,n){return n&&e.creator&&n.id===e.creator.id},Ne=t(39727),we="removeFromPublicationPopover",xe=function(e){var n=e.viewer,t=e.show,a=e.post,l=(0,Ne.g)(a.pendingCollection||a.collection).viewerEdge,o=null==l?void 0:l.isEditor;return n&&("APPROVED"===a.statusForCollection&&(o||function(e,n){var t=e.pendingCollection||e.collection;return t&&t.creator&&n.id===t.creator.id}(a,n)||Ee(a,n))||"PENDING"===a.statusForCollection&&Ee(a,n))?i.createElement(y.Sl,null,i.createElement(h.r,{"aria-controls":we,"aria-expanded":"false",onClick:t},"Remove story from publication")):null},Ce=function(e){var n=e.children,t=e.isVisible,a=e.hide,l=e.post,o=e.viewer,r=(0,f.I0)(),d=ae(l),s=l.collection||l.pendingCollection;return s?i.createElement(se.J,{ariaId:we,isVisible:t,hide:a,popoverRenderFn:function(){return i.createElement(T.x,{padding:"16px",maxWidth:"280px"},i.createElement(T.x,{display:"flex",flexDirection:"row",alignItems:"center"},i.createElement(T.x,{paddingRight:"8px"},i.createElement(W.v,{collection:s,size:40})),"APPROVED"===l.statusForCollection?i.createElement(R.F,{scale:"S"},Ee(l,o)?"Your":"This"," story is published in"," ",s.name,"."):"PENDING"===l.statusForCollection?i.createElement(R.F,{scale:"S"},"Your story is being reviewed by ",s.name," editors."):i.createElement(R.F,{scale:"S"},"This draft is submitted to ",s.name)),i.createElement(T.x,{flexDirection:"row",display:"flex",paddingTop:"16px"},i.createElement(T.x,{paddingRight:"8px"},i.createElement(re.zx,{buttonStyle:"SUBTLE",onClick:function(){d(s).then((function(){r((0,L.Dx)({message:"Story removed from ".concat(s.name||"publication")}))}),(function(){r((0,L.Dx)({message:"There was a problem removing the story from ".concat(s.name||"publication"),toastStyle:"ERROR"}))})),a()}},"PENDING"===l.statusForCollection?"Cancel submission":"Remove from ".concat(s.name||"")))))}},n):n},Fe=t(43220),Oe=t(31048),Pe=t(74302),Ie=t(44573),De=t(26350),Te=t(96462),Re=t(45509),Ae=t(37774),Ve=t(1383),_e=t(92661),Me=function(){for(var e=arguments.length,n=new Array(e),t=0;t{"use strict";t.d(n,{g:()=>l});var i=t(87329),a=t(46732),l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"OverflowMenuItemUndoClaps_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"clapCount"}},{kind:"FragmentSpread",name:{kind:"Name",value:"ClapMutation_post"}}]}}].concat((0,i.Z)(a.JP.definitions))}},42732:(e,n,t)=>{"use strict";t.d(n,{c:()=>k});var i=t(87329),a=t(82492),l=t.n(a),o=t(26075),r=t(90386),d=t(67294),s=t(59250),c=t(25550),u=t(18627),m=t(66411),p=t(78285),k=function(e){var n=e.post,t=e.onShowLess,a=e.setDismissedPostId,k=n.id,v=n.collection,f=(0,c.r)().viewerId,g=(0,s.jM)(),b=g.setSeeLessPostIds,S=g.isMutingFromHomeFeed,y=(0,p.w)(),h=(0,o.x)().cache,E=(0,u.A)(),N=(0,m.pK)(),w=(0,d.useRef)(null),x=(0,d.useCallback)((function(){w.current=window.setTimeout((function(){E.event("post.see_less",{userId:f,collection:null==v?void 0:v.id,postId:k,source:N})}),3e3)}),[]),C=(0,d.useCallback)((function(){null!==w.current&&window.clearTimeout(w.current)}),[]),F=(0,d.useCallback)((function(){h.modify({id:h.identify((0,r.kQ)("ROOT_QUERY")),fields:{webRecommendedFeed:function(e,n){var t=n.readField;return l()({},e,{items:e.items.filter((function(e){return(null==e?void 0:e.post)&&t("id",e.post)!==k}))})}}})}),[k]);return{handleShowLess:(0,d.useCallback)((function(){x(),F(),S&&(b((function(e){return[].concat((0,i.Z)(e),[k])})),null==a||a(k)),y({toastStyle:"USER_NEGATIVE_SIGNAL",extraParams:{onClickUndo:C}}),null==t||t()}),[])}}},32947:(e,n,t)=>{"use strict";t.d(n,{l:()=>k});var i=t(22122),a=t(81253),l=t(67294),o=t(38352),r=t(93310),d=t(47230),s=t(92661),c=t(60448),u=["size","href","children","handleClick","buttonStyle","type","isVisible"],m=["href","children","handleClick"],p=["handleClick","isVisible","children","href"],k=function(e){var n=e.size,t=e.href,o=e.children,r=e.handleClick,d=e.buttonStyle,m=e.type,p=e.isVisible,k=void 0===p||p,b=(0,a.Z)(e,u),S=!(0,c.T)(),y=(0,s.dh)(),h=(0,s.H2)(),E=(0,l.useCallback)((function(e){null==r||r(e)}),[r]);if(!k)return null;var N=y(new URL(t).pathname),w=null==N?void 0:N.params.postId,x=t;switch(S||(x=w?h("ShowMobileWebEditorRedirectEditStory",{postId:w}):h("ShowMobileWebEditorRedirectNewStory",{})),m){case"link":return l.createElement(v,(0,i.Z)({href:x,handleClick:E},b),o);case"button":return l.createElement(g,{buttonStyle:d,size:n,href:x,handleClick:E},o);case"popover":return l.createElement(f,(0,i.Z)({isVisible:k,href:x,handleClick:E},b),o)}},v=function(e){var n=e.href,t=e.children,o=e.handleClick,d=(0,a.Z)(e,m);return l.createElement(r.r,(0,i.Z)({href:n,onClick:o},d),t)},f=function(e){var n=e.handleClick,t=e.isVisible,r=void 0===t||t,d=e.children,s=e.href,c=(0,a.Z)(e,p);return r?l.createElement(o.Sl,null,l.createElement(v,(0,i.Z)({href:s,handleClick:n},c),d)):null},g=function(e){var n=e.href,t=e.size,i=e.buttonStyle,a=e.children,o=e.handleClick;return l.createElement(d.zx,{buttonStyle:i,size:t,href:n,onClick:o},a)}},75514:(e,n,t)=>{"use strict";t.d(n,{H:()=>i});var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UserReportStoryMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetAuthorId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"alsoBlockAuthor"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reason"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reportStoryAndMaybeBlockAuthor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetAuthorId"},value:{kind:"Variable",name:{kind:"Name",value:"targetAuthorId"}}},{kind:"Argument",name:{kind:"Name",value:"alsoBlockAuthor"},value:{kind:"Variable",name:{kind:"Name",value:"alsoBlockAuthor"}}},{kind:"Argument",name:{kind:"Name",value:"reason"},value:{kind:"Variable",name:{kind:"Name",value:"reason"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isBlocking"}}]}}]}}]}}]}},78964:(e,n,t)=>{"use strict";t.d(n,{J:()=>s});var i=t(34699),a=t(21919),l=t(67294),o=t(18627),r=t(78285),d=t(75514);function s(e){var n=e.viewerId,t=e.targetAuthorId,s=e.targetPostId,c=e.onOptimisticComplete,u=(0,r.w)(),m=(0,o.A)(),p=(0,a.D)(d.H),k=(0,i.Z)(p,1)[0];return(0,l.useCallback)((function(e,i){k({variables:{targetAuthorId:t,targetPostId:s,alsoBlockAuthor:e,reason:i},onCompleted:function(){u({message:"Successfully reported post."}),m.event("post.flagged",{postId:s,reason:i})},onError:function(){u({message:"Unable to report this story. Please try again later."})},optimisticResponse:{__typename:"Mutation",reportStoryAndMaybeBlockAuthor:{__typename:"User",id:t,viewerEdge:{__typename:"UserViewerEdge",id:"userId:".concat(t,"-viewerId:").concat(n),isBlocking:e}}}}),null==c||c()}),[k,n,t,s,c])}},91727:(e,n,t)=>{"use strict";t.d(n,{S:()=>i,P:()=>a});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterV3EmailToSubscribersMenuItem_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creator"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"subscribersCount"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"isNewsletter"}},{kind:"Field",name:{kind:"Name",value:"isAuthorNewsletter"}}]}}]},a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SendPostAsEmailsMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendPostAsEmails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}]}]}}]}},70679:(e,n,t)=>{"use strict";t.d(n,{w:()=>w});var i=t(96156),a=t(34699),l=t(21919),o=t(67294),r=t(25267),d=t(38352),s=t(93310),c=t(77355),u=t(1383),m=t(87691),p=t(14646),k=t(78285);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var n=1;n0?o.createElement(o.Fragment,null,o.createElement(d.Sl,{paddingTopBottom:"8px"},o.createElement(s.r,{"data-testid":"emailToSubscribersMenuItem",onClick:function(){null!=n&&n.isAuthorNewsletter?(F({message:"You’ve already sent this story to subscribers.",toastStyle:"ERROR",duration:2e3}),t()):x()}},"TEXT"===i?o.createElement(c.x,{display:"inline-block"},o.createElement(m.F,{scale:"M"},"Email to subscribers")):o.createElement(c.x,{display:"inline-block"},o.createElement(g,{className:v([E,N])}),o.createElement(c.x,{display:"inline-block",marginLeft:"20px"},o.createElement(m.F,{scale:"S"},"Email to subscribers"))))),o.createElement(u.Q,{onConfirm:function(){I(),O()},isVisible:w,hide:O,titleText:"Email to subscribers",confirmText:"Send",buttonStyle:"STRONG",buttonSize:"LARGE",showCancelButton:!0,withCloseButton:!0,isDestructiveAction:!1},"A link to this story will be emailed to all your subscribers.")):o.createElement(o.Fragment,null)}))}},43220:(e,n,t)=>{"use strict";t.d(n,{U:()=>i,I:()=>a});var i=function(e){return!!e&&(e.isAuroraVisible||"Collection"===e.__typename&&e.isAuroraEligible&&e.viewerEdge.isEditor)},a=function(e){return!!e&&("Collection"===e.__typename?e.isAuroraVisible||e.isAuroraEligible&&e.viewerEdge.isEditor:e.isAuroraVisible)}},36736:(e,n,t)=>{"use strict";t.d(n,{x:()=>i});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"useIsPinnedInContext_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pinnedAt"}},{kind:"Field",name:{kind:"Name",value:"pinnedByCreatorAt"}}]}}]}},31048:(e,n,t)=>{"use strict";t.d(n,{K:()=>d,I:()=>s});var i=t(34699),a=t(21919),l=t(67294),o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetPinnedAtMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pinnedAt"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"setPinnedAt"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"Argument",name:{kind:"Name",value:"targetCollectionId"},value:{kind:"Variable",name:{kind:"Name",value:"collectionId"}}},{kind:"Argument",name:{kind:"Name",value:"pinnedAt"},value:{kind:"Variable",name:{kind:"Name",value:"pinnedAt"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"collection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pendingCollection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pinnedAt"}}]}}]}}]}}]},r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PostSetPinnedByCreatorAtMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isPinned"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setPostPinnedOnCreatorProfile"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}},{kind:"ObjectField",name:{kind:"Name",value:"isPinned"},value:{kind:"Variable",name:{kind:"Name",value:"isPinned"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]},d=function(e){var n=e.id,t=e.collection,r=e.pendingCollection,d=e.pinnedAt,s=(t||r||{id:""}).id,c=(0,a.D)(o,{optimisticResponse:{__typename:"Mutation",setPinnedAt:{__typename:"Post",id:n,collection:t,pendingCollection:r,pinnedAt:d?0:Date.now()}}}),u=(0,i.Z)(c,1)[0],m=l.useCallback((function(){return u({variables:{postId:n,collectionId:s,pinnedAt:!d}})}),[n,s,d,u]);return[d,m]},s=function(e){var n=e.id,t=e.pinnedByCreatorAt,o=(0,a.D)(r,{optimisticResponse:{setPostPinnedOnCreatorProfile:{__typename:"MutationSuccess"}},update:function(e,i){var a;"MutationSuccess"===(null===(a=i.data)||void 0===a?void 0:a.setPostPinnedOnCreatorProfile.__typename)&&e.modify({id:"Post:".concat(n),fields:{pinnedByCreatorAt:function(){return t?0:Date.now()}}})}}),d=(0,i.Z)(o,1)[0],s=l.useCallback((function(){return d({variables:{postId:n,isPinned:!t}})}),[n,d,t]);return[t,s]}},74302:(e,n,t)=>{"use strict";t.d(n,{Q:()=>i,t:()=>a});var i="This story is also a response to another story. Are you sure you want to delete this story?",a="This story is also a response to another story. Any edits are applied to both."},37774:(e,n,t)=>{"use strict";t.d(n,{z:()=>u});var i=t(34699),a=t(67294),l=t(61095),o=t(38352),r=t(50474),d=t(93310),s=t(68894),c=t(78964),u=function(e){var n=e.hidePopover,t=e.targetUserId,u=e.postId,m=e.viewerId,p=(0,l.Pd)({id:t}).viewerEdge,k=!(null==p||!p.isBlocking),v=(0,s.O)(!1),f=(0,i.Z)(v,3),g=f[0],b=f[1],S=f[2],y=(0,a.useCallback)((function(){S(),n()}),[n,S]),h=(0,c.J)({viewerId:m,targetAuthorId:t,targetPostId:u,onOptimisticComplete:y});return a.createElement(a.Fragment,null,a.createElement(r.U,{onSubmit:h,isVisible:g,hide:y,type:"story",alreadyBlocking:k}),a.createElement(o.Sl,null,a.createElement(d.r,{onClick:b,color:"RED"},"Report story...")))}},53563:(e,n,t)=>{"use strict";t.d(n,{u:()=>O});var i=t(34699),a=t(67294),l=t(71899),o=t(91553),r=t(77355),d=t(47230),s=t(91583),c=t(18635),u=t(18634),m=t(21755),p=t(20113),k=t(87691),v=t(62528),f=t(78142),g=t(17583),b={xs:"SMALL",sm:"REGULAR",md:"REGULAR",lg:"REGULAR",xl:"REGULAR"},S={position:"absolute",top:"8px",left:"0",width:"100%",minHeight:"calc(100% - 8px)",borderRadius:"12px 12px 0 0",padding:"0 24px 24px"},y=function(e){return{"0%":{transform:e?"translateY(100%)":"translateY(16px)"},"100%":{transform:e?"translateY(0%)":"translateY(0px)"}}},h=function(e){return{"0%":{transform:e?"translateY(0%)":"translateY(0px)"},"100%":{transform:e?"translateY(100%)":"translateY(16px)"}}},E={"0%":{opacity:"0"},"100%":{opacity:"1"}},N={"0%":{opacity:"1"},"100%":{opacity:"0"}},w={"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.02)"},"75%":{transform:"scale(1.02)"},"100%":{transform:"scale(1)"}},x={"0%":{background:(0,f.Uy)(0)},"100%":{background:(0,f.Uy)(.25)}},C={"0%":{background:(0,f.Uy)(.25)},"100%":{background:(0,f.Uy)(0)}},F=function(e){var n=e.slideAnimationName,t=e.fadeAnimationName,i=e.isMobile;return function(){var e="".concat(n," ").concat(300,"ms forwards cubic-bezier(0.4, 0, 0.2, 1)");if(i)return{animation:e,position:"absolute",width:"100%",height:"calc(100% - 8px)"};var a="".concat(t," 150ms forwards ease-in-out");return{animation:"".concat(e,", ").concat(a)}}},O=function(e){var n=e.hide,t=e.title,O=e.subtitle,P=e.subtitleTextAlign,I=e.onConfirm,D=e.confirmText,T=e.confirmButtonStyle,R=void 0===T?"STRONG":T,A=e.onCancel,V=e.cancelText,_=e.cancelButtonStyle,M=void 0===_?"OBVIOUS":_,j=e.children,L=e.withCloseButton,B=void 0===L||L,Z=e.hideOnConfirm,U=void 0===Z||Z,z=e.preventClickOutside,H=e.confirmDisabled,G=e.confirmBeforeLeavePage,K=e.delayHideEnabled,W=e.padding,Q=void 0===W?"32px":W,Y=e.subtitleMargin,J=void 0===Y?"24px":Y,q=(0,a.useRef)(null),X=(0,a.useState)(!1),$=(0,i.Z)(X,2),ee=$[0],ne=$[1],te=(0,a.useState)(!0),ie=(0,i.Z)(te,2),ae=ie[0],le=ie[1],oe=(0,g.s)()===m.j.xs,re=(0,v.o)({modalSlideInKeyframe:y(oe),modalSlideOutKeyframe:h(oe),modalFadeInKeyframe:E,modalFadeOutKeyframe:N,modalBounceKeyframe:w,overlayFadeInKeyframe:x,overlayFadeOutKeyframe:C}),de=re.modalSlideInKeyframe,se=re.modalSlideOutKeyframe,ce=re.modalFadeInKeyframe,ue=re.modalFadeOutKeyframe,me=re.modalBounceKeyframe,pe=re.overlayFadeInKeyframe,ke=re.overlayFadeOutKeyframe,ve=(0,a.useCallback)((function(){le(!1)}),[]),fe=(0,a.useCallback)((function(e){q.current&&z&&!oe&&(e.preventDefault(),e.stopPropagation(),q.current.style.animation="".concat(me," 600ms ease-in-out"),ne(!0))}),[me,z,oe]);(0,l.Z)(q,fe),(0,o.a)({disabled:!G});var ge,be=(0,a.useCallback)((function(){null==I||I(),U&&ve()}),[ve,I,U]),Se=(0,a.useCallback)((function(){null==A||A(),ve()}),[ve,A]),ye=(0,a.useMemo)((function(){return D||V?a.createElement(r.x,{display:"flex",justifyContent:"flex-end",gap:"16px"},V&&a.createElement(d.zx,{buttonStyle:M,onClick:Se,size:b},V),D&&a.createElement(d.zx,{buttonStyle:R,onClick:be,size:b,disabled:H},D)):null}),[I,D,R,A,V,M,ve,H]);return(0,a.useEffect)((function(){if(q.current&&ee)return q.current.addEventListener("animationend",e),function(){var n;null===(n=q.current)||void 0===n||n.removeEventListener("animationend",e)};function e(){q.current.style.animation="",ne(!1)}}),[ee,ae,n]),(0,a.useEffect)((function(){if(!ae&&n){var e=setTimeout((function(){n()}),310);return function(){clearTimeout(e)}}}),[ae,n]),(0,a.useEffect)((function(){K&&le(!1)}),[K]),a.createElement(s.V,{isVisible:ae,hide:z?void 0:ve,withCloseButton:!1,withLayerAnimation:!1,withAnimation:!0,padding:0,customBackgroundColor:(0,f.Uy)(.25),layerRules:(ge=ae?pe:ke,function(){return{animation:"".concat(ge," 150ms forwards ease-in-out")}}),containerRules:F({slideAnimationName:ae?de:se,fadeAnimationName:ae?ce:ue,isMobile:oe})},a.createElement(r.x,{ref:q,boxShadow:"rgba(0, 0, 0, 0.15) 0px 2px 10px",width:"540px",padding:Q,borderRadius:"4px",backgroundColor:"BACKGROUND",position:"relative",xs:S},a.createElement(u.y,{xs:!0,height:"56px",marginBottom:"16px",paddingTop:"16px"},ye),a.createElement(r.x,{textAlign:"center"},a.createElement(p.X6,{scale:"S"},t)),O&&a.createElement(r.x,{marginTop:J,textAlign:P},a.createElement(k.F,{scale:"M",color:"DARKER"},O)),j&&a.createElement(r.x,{marginTop:"32px"},j),ye&&a.createElement(u.y,{sm:!0,md:!0,lg:!0,xl:!0,marginTop:"32px"},ye),B&&a.createElement(r.x,{position:"absolute",right:{xs:void 0,sm:"16px",md:"16px",lg:"16px",xl:"16px"},top:{xs:"18px",sm:"16px",md:"16px",lg:"16px",xl:"16px"},left:{xs:"18px",sm:void 0,md:void 0,lg:void 0,xl:void 0}},a.createElement(c.P,{isPositionAbsolute:!1,compensateInnerPadding:!1,size:"REGULAR",onClick:ve}))))}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/6487.09cd8beb.chunk.js.map