(self.webpackChunklite=self.webpackChunklite||[]).push([[4200],{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:()=>Pn});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(38352),m=t(93310),p=t(77355),k=t(18634),v=t(353);function f(e){var n=e.onClick,t=e.hidePopover,a=e.showAt,l=(0,i.useCallback)((function(){t(),n()}),[n,t]);return i.createElement(k.y,{xs:a.xs,sm:a.sm,md:a.md,lg:a.lg,xl:a.xl},i.createElement(u.Sl,null,i.createElement(m.r,{"aria-controls":"aria-id","aria-expanded":"false",onClick:l},i.createElement(p.x,{display:"flex",flexDirection:"row",alignItems:"center",ariaHidden:"true",gap:"12px"},i.createElement(v.Z,null),"Save"))),i.createElement(u.oK,null))}var g=t(81253),b=t(38356),S=t(42130),y=["isResponsive"],h=function(e){var n=e.isResponsive,t=(0,g.Z)(e,y);return i.createElement(b.u,(0,a.Z)({text:n?"More":void 0,icon:i.createElement(S.Z,null)},t))},E=t(86706),N=t(13195),w=t(6443),x=t(39507),C=t(83486),F=t(43487),O=t(51681),P=function(e){var n=e.post,t=e.hidePopover,a=(0,w.H)().value,l=null==a?void 0:a.id,o=(0,x.T)(n).viewerEdge,r=(0,E.I0)(),d=i.useCallback((function(e){return r((0,C.at)(e))}),[r]),s=(0,F.b$)((function(e){return e.multiVote.clapsPerPost})),c=(0,O.l)(s,n,o),p=c.clapCount,k=c.viewerClapCount,v=(0,N.C)();return l&&p&&k&&k>0?i.createElement(i.Fragment,null,i.createElement(u.Sl,null,i.createElement(m.r,{onClick:function(){v(n,(null==a?void 0:a.id)||"",-k,o),d({postId:n.id,clapCount:p-k,viewerClapCount:0,viewerHasClappedSinceFetch:!0}),t()}},"Undo claps")),i.createElement(u.oK,null)):null},I=t(23768),D=t(32947),T=t(70028),R=t(66021),A=t(90833),V=t(70679),_=t(87691),M=t(14646),j=t(50458),L={cursor:"not-allowed",marginBottom:"8px",opacity:.5},Z=function(e){var n=e.post,t=e.shareKey,a=(0,M.I)();return n&&t?i.createElement(u.Sl,null,i.createElement(p.x,{width:"174px"},i.createElement("div",{className:a(L)},"Copy Friend Link"),i.createElement(_.F,{scale:"S",color:"LIGHTER"},'Friend links have moved to the "Share" menu.  ',i.createElement(m.r,{linkStyle:"OBVIOUS",inline:!0,href:(0,j.wA)()},"Learn more")))):null},B=t(32493),U=t(78285),z={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"}}]}}]}}]},H=(0,E.$j)()((function(e){var n=e.children,t=e.dispatch,a=e.onCompleted,l=e.targetPostId;return i.createElement(B.m,{mutation:z,onCompleted:function(){t((0,U.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})}))})),G=(0,E.$j)()((function(e){var n=e.children,t=e.dispatch,a=e.onCompleted,l=e.targetPostId;return i.createElement(B.m,{mutation:z,onCompleted:function(){t((0,U.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})}))})),K=t(75675),W=t(68894),Q=function(e){var n=e.hidePopover,t=e.postId,a=e.allowResponses,o=(0,W.O)(!1),r=(0,l.Z)(o,3),d=r[0],s=r[1],c=r[2],p=function(){c(),n()};return i.createElement(i.Fragment,null,i.createElement(H,{targetPostId:t},(function(e){var n=e.mutate;return i.createElement(K.w,{onConfirm:n,isVisible:d,hide:p,entityTypename:"Post"})})),i.createElement(G,{targetPostId:t},(function(e){var n=e.mutate;return i.createElement(u.Sl,null,i.createElement(m.r,{onClick:function(){a?s():n()}},a?"Hide responses":"Show responses"))})))},Y=t(75412),J=t(71652),q=t(87329),X=t(84683),$={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)(X.d.definitions))},ee={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)($.definitions))},ne=t(21919),te=t(75221),ie=[{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"}}]}}],ae={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)(ie))},le={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)(ie))},oe=function(e){var n=(0,ne.D)(ae),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:te.Zj.APPROVED}})}),[e])},re=function(e){var n=(0,ne.D)(le),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:te.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])},de=t(25267),se=t(91583),ce=t(47230),ue=t(66227),me=t(73917),pe=t(70310),ke=t(20113),ve=t(90586),fe=t(34135),ge="collectionSubmissionPopover",be=[{name:"",value:"No publication",content:i.createElement(p.x,{height:"32px",display:"flex",alignItems:"center",marginLeft:"5px"},i.createElement(_.F,{scale:"M",color:"DARKER"},"No publication"))}];function Se(e){var n=e.collection;return n.name?i.createElement(p.x,{display:"flex",justifyContent:"space-between",width:"200px",alignItems:"center",marginLeft:"5px"},i.createElement(_.F,{scale:"M",color:"DARKER"},n.name),i.createElement(J.v,{collection:n,size:32})):null}function ye(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||fe.V6.on("load",(function(){return c(!0)})),!a&&o&&s?i.createElement(Ee,{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(u.Sl,null,i.createElement(m.r,{"aria-controls":ge,"aria-expanded":"false",onClick:n},"Add to publication"))})):null}function he(e){var n=e.isVisible,t=e.hide;return i.createElement(se.V,{isVisible:n,hide:t,withCloseButton:!0},i.createElement(p.x,{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",maxWidth:"480px"},i.createElement(ke.X6,{scale:"M",tag:"h3"},"Story submitted"),i.createElement(p.x,{paddingTop:"8px",paddingBottom:"24px"},i.createElement(ve.QE,{scale:"M"},"We’ll email you when the publication editor has reviewed your submission.")),i.createElement(ce.zx,{buttonStyle:"OBVIOUS",onClick:t},"OK")))}var Ee=function(e){var n=e.children,t=e.post,a=e.noQueryReturn,l=t.creator;return l?i.createElement(de.I,null,(function(e){return e?e.id!==l.id?a:i.createElement(Y.A,{query:ee,ssr:!1},(function(e){var t=e.loading,i=e.error,a=e.data;return n({loading:t,error:i,data:a})})):a})):a},Ne=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],k=i.useState(""),v=(0,l.Z)(k,2),f=v[0],g=v[1],b=oe(n),S=function(e){var n=(0,ne.D)(ae),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:te.Zj.PENDING},optimisticResponse:{manageCollectionPostStatus:{__typename:"Post",id:e.id,statusForCollection:te.Zj.PENDING,pendingCollection:n}}})}),[e])}(n);return c||fe.V6.on("load",(function(){return u(!0)})),n.isPublished&&c?i.createElement(ue.B,null,(function(e){var l=e.isVisible,d=e.hide,s=e.show;return i.createElement(i.Fragment,null,i.createElement(he,{hide:d,isVisible:l}),i.createElement(Ee,{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,k=n.creator;if(!u||!k||u.id!==k.id)return r;var v=u.adminCollections,y=u.writerCollections;if(0===v.length&&0===y.length)return r;var h=v.concat(y).filter((function(e){return!!e&&!!e.slug&&!!e.name})).map((function(e){return{name:e.slug||"",value:e.name||"",content:i.createElement(Se,{collection:e})}})),E=be.concat(h),N=v.reduce((function(e,n){return e[n.slug||""]=n,e}),{}),w=y.reduce((function(e,n){return e[n.slug||""]=n,e}),{}),x="";if(f){var C=E.find((function(e){return e.name===f}));C&&(x=C.value)}var F="addStoryToPublicationTitle";return i.createElement(me.J,{ariaId:ge,hide:t,isVisible:o,popoverRenderFn:function(){return i.createElement(p.x,{padding:"20px",width:"280px",display:"flex",flexDirection:"column"},i.createElement(_.F,{scale:"M",color:"DARKER",ariaLabelledById:F},"Add your story to a publication:"),i.createElement(p.x,{marginTop:"10px",position:"relative"},i.createElement(p.x,{position:"absolute",height:"16px",width:"100%",bottom:"0",zIndex:"100",backgroundImage:"linear-gradient(transparent, #ffffff)"}),i.createElement(p.x,{maxHeight:"160px",overflow:"auto"},i.createElement(pe.E,{value:x,onChange:g,options:E,radioButtonsName:"addStory",ariaLabelledBy:F}))),i.createElement(p.x,{display:"flex",marginTop:"20px"},f in N?i.createElement(ce.zx,{onClick:function(){var e=N[f];t(),a(),b(e).then((function(){window.location.reload()}))},buttonStyle:"OBVIOUS"},"Add story"):i.createElement(ce.zx,{onClick:function(){var e=w[f];S(e),t(),s()},disabled:!f},"Submit"),i.createElement(p.x,{marginLeft:"10px"},i.createElement(_.F,{scale:"M",color:"LIGHTER"},i.createElement(m.r,{onClick:t},i.createElement(p.x,{padding:"10px"},"Cancel"))))),i.createElement(p.x,{marginTop:"10px"},i.createElement(_.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},we=function(e){var n=e.children,t=e.isVisible,a=e.post,l=e.hide,o=e.showLoadingIndicator,r=oe(a),d=re(a),s=(0,E.I0)(),c=a.pendingCollection;return c?i.createElement(me.J,{ariaId:"manageSubmissionPopover",isVisible:t,hide:l,popoverRenderFn:function(){return i.createElement(p.x,{padding:"16px",maxWidth:"280px"},i.createElement(p.x,{display:"flex",flexDirection:"row",alignItems:"center"},i.createElement(p.x,{paddingRight:"8px"},i.createElement(J.v,{collection:c,size:40})),i.createElement(_.F,{scale:"S"},"This draft is submitted to ",c.name,".")),i.createElement(p.x,{flexDirection:"row",display:"flex",paddingTop:"16px"},i.createElement(p.x,{paddingRight:"8px"},i.createElement(ce.zx,{buttonStyle:"OBVIOUS",onClick:function(){l(),o(),r(a.pendingCollection).then((function(){window.location.reload()}))}},"Accept")),i.createElement(ce.zx,{buttonStyle:"SUBTLE",onClick:function(){d(a.pendingCollection).then((function(){s((0,U.Dx)({message:"Story removed from ".concat(c.name||"publication")}))})),l()}},"Don't accept")))}},n):n},xe=function(e,n){return n&&e.creator&&n.id===e.creator.id},Ce=t(39727),Fe="removeFromPublicationPopover",Oe=function(e){var n=e.viewer,t=e.show,a=e.post,l=(0,Ce.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)||xe(a,n))||"PENDING"===a.statusForCollection&&xe(a,n))?i.createElement(u.Sl,null,i.createElement(m.r,{"aria-controls":Fe,"aria-expanded":"false",onClick:t},"Remove story from publication")):null},Pe=function(e){var n=e.children,t=e.isVisible,a=e.hide,l=e.post,o=e.viewer,r=(0,E.I0)(),d=re(l),s=l.collection||l.pendingCollection;return s?i.createElement(me.J,{ariaId:Fe,isVisible:t,hide:a,popoverRenderFn:function(){return i.createElement(p.x,{padding:"16px",maxWidth:"280px"},i.createElement(p.x,{display:"flex",flexDirection:"row",alignItems:"center"},i.createElement(p.x,{paddingRight:"8px"},i.createElement(J.v,{collection:s,size:40})),"APPROVED"===l.statusForCollection?i.createElement(_.F,{scale:"S"},xe(l,o)?"Your":"This"," story is published in"," ",s.name,"."):"PENDING"===l.statusForCollection?i.createElement(_.F,{scale:"S"},"Your story is being reviewed by ",s.name," editors."):i.createElement(_.F,{scale:"S"},"This draft is submitted to ",s.name)),i.createElement(p.x,{flexDirection:"row",display:"flex",paddingTop:"16px"},i.createElement(p.x,{paddingRight:"8px"},i.createElement(ce.zx,{buttonStyle:"SUBTLE",onClick:function(){d(s).then((function(){r((0,U.Dx)({message:"Story removed from ".concat(s.name||"publication")}))}),(function(){r((0,U.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},Ie=t(43220),De=t(31048),Te=t(74302),Re=t(44573),Ae=t(26350),Ve=t(96462),_e=t(45509),Me=t(37774),je=t(1383),Le=t(92661),Ze=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,Z=void 0===L||L,B=e.hideOnConfirm,U=void 0===B||B,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),Z&&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/4200.e1b73304.chunk.js.map