orgmode-to-gemini-blog/exports/html/L’aventure Superphénix🔥. Superphénix… s’il est un réacteur… _ by Dragonfeu _ Medium_fichiers/6546.cd03f950.chunk.js
2024-11-03 11:06:34 +01:00

2 lines
134 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[6546],{70370:(e,t,n)=>{n.d(t,{B:()=>o,_I:()=>i});var a=n(96540),r={updateWatchedBounds:function(){},watchedBounds:new Map},i=a.createContext(r),o=function(e){var t=e.children,n=e.className,r=e.name,o=e.type,l=e.offset,c=a.useContext(i).updateWatchedBounds,u=a.useRef(null);return a.useEffect((function(){c&&c(r,u,{type:o,offset:l})}),[]),a.createElement("div",{className:n,ref:u},t)}},15706:(e,t,n)=>{n.d(t,{G:()=>E,r:()=>b});var a=n(80296),r=n(64467),i=n(96540),o=n(90280),l=n(77865),c=n(52290),u=n(20239),d=n(44402),s=n(66305),p=n(42976),m=n(39160),f=n(90383);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={xs:-40,sm:-40,md:-45,lg:-80},k={xs:-55,sm:-60,md:-65,lg:-130},y={xs:0,sm:350,md:490,lg:680},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=(0,m.d4)((function(e){return e.client.hydrated})),n=h(h({},y),e),r=i.useState("lg"),o=(0,a.A)(r,2),l=o[0],c=o[1];return i.useEffect((function(){var e=function(){window.innerWidth>=n.lg?c("lg"):window.innerWidth>=n.md?c("md"):window.innerWidth>=n.sm?c("sm"):window.innerWidth>=n.xs&&c("xs")};return t&&(e(),s.R5.on("resize",e)),function(){t&&s.R5.off("resize",e)}}),[t,n.lg,n.md,n.sm,n.xs]),l},N=function(e,t,n){return function(a){var r=n&&("xs"===t||"sm"===t),i=r?3*v[t]:k[t],o=1===e?"".concat(r?2*v[t]:v[t],"px"):2===e?"".concat(i,"px"):void 0;return{position:"relative",borderRight:e<2?"".concat(3,"px solid ").concat(a.colorTokens.background.neutral.tertiary.base):void 0,backgroundColor:a.colorTokens.background.neutral.tertiary.base,zIndex:3-e,marginLeft:o,paddingLeft:0===e?"0":"4px"}}},S=function(e){var t,n=e.catalogItem,a=e.width,r=e.height,d=e.isMobile,s=null==n?void 0:n.entity,p=(0,u.D)(),m=i.createElement(c.a,{height:"inherit",minHeight:"".concat(r,"px"),width:"".concat(a,"px"),background:p.colorTokens.background.neutral.secondary.base});return s&&"Post"===s.__typename&&null!==(t=s.previewImage)&&void 0!==t&&t.id&&(m=i.createElement(o.pg,{miroId:s.previewImage.id,alt:s.previewImage.alt||"",width:a,height:r,aspectRatio:d?o.l8.FourToThree:void 0,strategy:f.qY.Crop,loading:l.u.LAZY,rules:d?void 0:{height:"100%"}})),i.createElement(c.a,{height:"100%"},m)},E=function(e){var t=e.catalogItems,n=e.isEmbeded,a=void 0!==n&&n,r=e.coverWidth,o=e.coverHeight,l=e.breakpoints,u=(0,d.l)(),s=b(l),m=t.filter((function(e){var t,n=e.entity;return!("Post"!==(null==n?void 0:n.__typename)||null===(t=n.previewImage)||void 0===t||!t.id||n.visibility===p.dL.UNLISTED)})),f=[m[0],m[1],m[2]],g="sm"===s||"xs"===s,h=function(e,t){return 3*t+v[e]+k[e]+6}(s,r);return i.createElement(c.a,{display:"flex",overflow:"hidden",justifyContent:g?a?"space-between":"flex-start":"flex-end",width:g?"100%":"".concat(h,"px"),height:"100%",borderRadius:g?"0 0 3px 3px":"0 3px 3px 0",position:"relative",flexShrink:"0"},f.map((function(e,t){return i.createElement("div",{key:(null==e?void 0:e.catalogItemId)||t,className:u(N(t,s,a))},i.createElement(S,{isMobile:g,catalogItem:e,height:o,width:r}))})))}},66496:(e,t,n)=>{n.d(t,{V:()=>c});var a=n(45458),r=n(77485),i=n(59265),o=n(73114),l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EmbedCatalog_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserAvatar_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"userUrl_user"}}]}}].concat((0,a.A)(r.R.definitions),(0,a.A)(i.v0.definitions))},c={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EmbedCatalog_catalog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"predefined"}},{kind:"Field",name:{kind:"Name",value:"postItemsCount"}},{kind:"FragmentSpread",name:{kind:"Name",value:"catalogUrl_catalog"}},{kind:"Field",name:{kind:"Name",value:"creator"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EmbedCatalog_user"}}]}},{kind:"Field",alias:{kind:"Name",value:"listItemsConnection"},name:{kind:"Name",value:"itemsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pagingOptions"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"catalogItemId"}},{kind:"FragmentSpread",name:{kind:"Name",value:"PreviewCatalogCovers_catalogItemV2"}}]}}]}}]}}].concat((0,a.A)(i.Rm.definitions),(0,a.A)(l.definitions),(0,a.A)(o.L.definitions))}},54224:(e,t,n)=>{n.d(t,{DC:()=>N,LO:()=>E,PP:()=>w,W1:()=>S,wS:()=>O});var a=n(55127),r=n.n(a),i=n(96540),o=n(15706),l=n(23393),c=n(52290),u=n(86527),d=n(99731),s=n(36557),p=n(39410),m=n(72130),f=n(49287),g=n(44402),h=n(79429),v=n(39160),k=n(15371),y=n(46879),b={xs:277,sm:277,md:196,lg:196},N={xs:140,sm:195,md:90,lg:194},S={xs:105,sm:105,md:194,lg:194},E={sm:380},O=function(e,t){return function(n){return{display:"flex",backgroundColor:n.colorTokens.background.neutral.tertiary.base,justifyContent:"space-between",flexDirection:e?"column":"row",overflow:"hidden",border:"1px solid",borderColor:n.colorTokens.border.neutral.primary.base,borderRadius:"4px",maxHeight:"".concat(b[t],"px"),maxWidth:"100%",width:e?"100%":void 0,cursor:"pointer"}}},w=function(e){var t=e.catalog,n=(0,g.l)(),a=(0,v.d4)((function(e){return e.config.authDomain})),w=(0,m.$L)(),x=(0,f.jI)(),T=(0,h.s)({onPresentedFn:function(){w.event("list.presented",{listId:t.id,source:x})}}),I=(0,o.r)(E),P="sm"===I||"xs"===I,R=S[I],A=N[I],D=i.useCallback((function(e){e.stopPropagation()}),[]),C=i.useCallback((function(){window.top?window.top.location.href=(0,y.n1u)(t,a):window.location.href=(0,y.n1u)(t,a)}),[t,a]),M=i.useCallback((function(e){"Enter"===e.key&&C()}),[C]);i.useEffect((function(){window.parent.postMessage(JSON.stringify({src:window.location.toString(),context:"iframe.resize",height:b[I]}),"*")}),[I]);var L=i.useMemo((function(){return[t.postItemsCount>0?"".concat(t.postItemsCount," ").concat(r()("story",t.postItemsCount)):null].filter((function(e){return e})).join(", ")}),[t.postItemsCount]);return i.createElement("div",{role:"button",tabIndex:0,onKeyDown:M,onClick:C,className:n(O(P,I))},i.createElement(c.a,{ref:T,padding:"24px"},i.createElement(c.a,{display:"flex",alignItems:"center"},i.createElement(l.H8,{user:t.creator,scale:"XXXS",target:"_top"}),i.createElement(c.a,{padding:"0 8px",flexShrink:"0"},i.createElement(s.kZ,{color:"LIGHTER",scale:"S",clamp:1},i.createElement(u.N,{target:"_top",onClick:D,href:(0,y.EpC)(t.creator,a)},t.creator.name)))),i.createElement(c.a,{marginTop:P?"16px":"24px",marginBottom:P?"16px":"24px",height:P?"20px":"48px"},i.createElement(p.hE,{scale:P?"XS":"S",clamp:P?1:2},t.predefined?(0,k.cm)(t.predefined):t.name)),i.createElement(c.a,{display:"flex",alignItems:"center"},i.createElement(c.a,{flexShrink:"0"},i.createElement(d.$n,{target:"_top",size:"SMALL",buttonStyle:"SUBTLE",href:(0,y.n1u)(t,a)},"View list")),L&&i.createElement(c.a,{paddingLeft:"16px",flexShrink:"0"},i.createElement(s.kZ,{color:"LIGHTER",scale:"S",tag:"span"},L)))),i.createElement(o.G,{coverHeight:R,coverWidth:A,catalogItems:t.listItemsConnection.items,isEmbeded:!0,breakpoints:E}))}},18677:(e,t,n)=>{n.d(t,{f:()=>r});var a=n(34284);function r(e){var t=e.timestamp;return(0,a.A)(t,Date.now(),{addSuffix:!0})}},53057:(e,t,n)=>{n.d(t,{y:()=>m,B:()=>p});var a=n(64467),r=n(80296),i=n(95420),o=n(69733),l=n(72130),c=n(38893),u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"QuoteDeleteMutation"},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:"targetQuoteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteQuote"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetQuoteId"},value:{kind:"Variable",name:{kind:"Name",value:"targetQuoteId"}}}]}]}}]};function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){var t=e.children,n=e.onCompleted,a=e.targetPostId,o=e.targetQuoteId,d=e.quoteType,p=e.viewerId,m=(0,l.$L)(),f=(0,i.n)(u,{variables:{targetPostId:a,targetQuoteId:o},onCompleted:function(e){m.event("quotes.ui.quoteDeleted",{postId:a,quoteId:o,quoteType:c.Wd[d]}),null==n||n(e)},update:function(e){a&&e.modify({id:e.identify({__typename:"Post",id:a}),fields:{highlights:function(e,t){var n=t.readField;return e.filter((function(e){return n("id",e)!==o}))}}}),p&&e.modify({id:e.identify({__typename:"User",id:p}),fields:{highlightsStreamConnection:function(e,t){var n=t.readField;return s(s({},e),{},{stream:e.stream.filter((function(e){return"StreamItemQuotePreview"!==e.itemType.__typename||!e.itemType.quote||o!==n("id",e.itemType.quote)}))})}}})}});return t({deleteQuote:(0,r.A)(f,1)[0]})},m=(0,o.Ng)()(p)},79480:(e,t,n)=>{n.d(t,{z:()=>r});var a=n(94644),r=function(e){for(var t=null,n=null,r=null,i=null,o=null,l=0;l<=e.length;l++){var c=e[l];if(!c)break;if(null!=t){"H4"===c.type&&(n=l);break}if("H3"===c.type||"H2"===c.type)t=l,o=i;else{if(null!=i)break;if("H4"!==c.type){if("IMG"===c.type){null===r&&(r=l);continue}if("IFRAME"===c.type||"P"===c.type&&"string"==typeof c.text&&(0,a.cw)(c.text))continue;break}i=l}}return{titleIndex:t,subtitleIndex:n,bannerImageIndex:r,kickerIndex:o}}},21874:(e,t,n)=>{n.d(t,{h:()=>a});var a=n(96540).createContext({openSidebarToRespondToHighlight:function(){return null}})},98503:(e,t,n)=>{n.d(t,{R:()=>c,v:()=>u});var a=n(80296),r=n(96540),i=n(2680),o=n(39160),l=(0,r.createContext)({openPrivateNoteId:null,privateNoteSelection:null,setOpenPrivateNoteId:function(){},setPrivateNoteSelection:function(){}}),c=function(e){var t,n,c=e.children,u=(0,o.d4)((function(e){return e.navigation.currentHash}));if(u){var d=u.split("-");t=d[0],n=d[1]}var s=(0,i.u5)().paragraphRefsMappers,p=s.paragraphRefsMap,m=s.paragraphRefsByNameMap,f=(0,r.useState)(null),g=(0,a.A)(f,2),h=g[0],v=g[1],k=(0,r.useState)(null),y=(0,a.A)(k,2),b=y[0],N=y[1];return(0,r.useEffect)((function(){v(n)}),[n]),(0,r.useEffect)((function(){if(t&&!n){var e=m.get(t);e&&setTimeout((function(){return window.scrollTo(0,e.offsetTop)}))}}),[p]),r.createElement(l.Provider,{value:{openPrivateNoteId:h,privateNoteSelection:b,setOpenPrivateNoteId:v,setPrivateNoteSelection:N}},c)},u=function(){return(0,r.useContext)(l)}},16676:(e,t,n)=>{n.d(t,{_:()=>Oe,k:()=>xe});var a=n(80296),r=n(96540),i=n(98503),o=n(2680),l=n(70031),c=n(58168),u=n(64467),d=n(80045),s=n(69733),p=n(45458),m=n(5249),f=n(72130),g=n(38893),h={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"QuoteCreateMutation_highlight"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Quote"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"paragraphs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QuoteCreateMutation_paragraph"}}]}},{kind:"Field",name:{kind:"Name",value:"startOffset"}},{kind:"Field",name:{kind:"Name",value:"endOffset"}},{kind:"Field",name:{kind:"Name",value:"userId"}},{kind:"Field",name:{kind:"Name",value:"user"},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"}}]}}]}}].concat((0,p.A)([{kind:"FragmentDefinition",name:{kind:"Name",value:"QuoteCreateMutation_paragraph"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Paragraph"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]))},v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"QuoteCreateMutation"},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:"targetPostVersionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetParagraphNames"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"startOffset"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"endOffset"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quoteType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StreamItemQuoteType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createQuote"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetPostVersionId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostVersionId"}}},{kind:"Argument",name:{kind:"Name",value:"targetParagraphNames"},value:{kind:"Variable",name:{kind:"Name",value:"targetParagraphNames"}}},{kind:"Argument",name:{kind:"Name",value:"startOffset"},value:{kind:"Variable",name:{kind:"Name",value:"startOffset"}}},{kind:"Argument",name:{kind:"Name",value:"endOffset"},value:{kind:"Variable",name:{kind:"Name",value:"endOffset"}}},{kind:"Argument",name:{kind:"Name",value:"quoteType"},value:{kind:"Variable",name:{kind:"Name",value:"quoteType"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QuoteCreateMutation_highlight"}}]}}]}}].concat((0,p.A)(h.definitions))},k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"QuoteCreateMutation_postQuotes"},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:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"highlights"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QuoteCreateMutation_highlight"}}]}}]}}]}}].concat((0,p.A)(h.definitions))};function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,u.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N,S=function(e){var t=e.children,n=e.endOffset,a=e.onUpdate,i=e.onCompleted,o=e.quoteType,l=e.startOffset,c=e.targetParagraphs,u=e.targetPostId,d=e.targetPostVersionId,s=e.viewer,h=(0,f.$L)(),y=c.map((function(e){return e.name})).filter((function(e){return!!e}));return r.createElement(m.s,{mutation:v,onCompleted:function(e){e.createQuote&&h.event("quotes.ui.quoteCreated",{postId:u,quoteId:e.createQuote.id,quoteType:g.Wd[o]}),i&&i(e)},optimisticResponse:{createQuote:{__typename:"Quote",id:"temp",paragraphs:c.map((function(e){return{id:"tempQuote_".concat(e.id),name:e.name,text:e.text,__typename:"Paragraph"}})),startOffset:l,endOffset:n,userId:s?s.id:"",user:{__typename:"User",id:s?s.id:"",name:s?s.name:""}}},update:function(e,t){var n,r=e.readQuery({query:k,variables:{postId:u}}),i=null===(n=t.data)||void 0===n?void 0:n.createQuote;if(i){var o,l,c=b(b({},r),{},{post:b(b({},null==r?void 0:r.post),{},{highlights:[].concat((0,p.A)(null!==(o=null==r||null===(l=r.post)||void 0===l?void 0:l.highlights)&&void 0!==o?o:[]),[i])})});e.writeQuery({query:k,variables:{postId:u},data:c}),null!=s&&s.id&&"temp"!==i.id&&e.modify({id:e.identify({__typename:"User",id:s.id}),fields:{highlightsStreamConnection:function(e,t){return t.DELETE}}})}a&&a(t.data)},variables:{targetPostId:u,targetPostVersionId:d,targetParagraphNames:y,startOffset:l,endOffset:n,quoteType:o}},(function(e){return t({createQuote:e})}))},E=n(53057),O=(0,s.Ng)()((function(e){var t=e.children,n=e.endOffset,a=e.onCompleted,i=e.quoteType,o=e.startOffset,l=e.onUpdate,c=e.targetParagraphs,u=e.targetPostId,d=e.targetPostVersionId,s=e.targetQuoteId,p=e.viewer;return r.createElement(S,{endOffset:n,onUpdate:l,onCompleted:a,quoteType:i,startOffset:o,targetParagraphs:c,targetPostId:u,targetPostVersionId:d,viewer:p},(function(e){var n=e.createQuote;return r.createElement(E.B,{targetPostId:u,targetQuoteId:s||"",onCompleted:a,quoteType:i,viewerId:null==p?void 0:p.id},(function(e){var a=e.deleteQuote;return t({createQuote:n,deleteQuote:a})}))}))})),w=n(21874),x=n(52764),T=n(43634),I=n(28993),P=n(44402);function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},R.apply(null,arguments)}const A=function(e){return r.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",width:25,height:25,viewBox:"0 0 25 25"},e),N||(N=r.createElement("path",{fillRule:"evenodd",d:"m13.7 15.964 5.204-9.387-4.726-2.62-5.204 9.387zm-.493.885-1.313 2.37-1.252.54-.702 1.263-3.796-.865 1.228-2.213-.202-1.35 1.314-2.37 4.722 2.616z"})))};var D;function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C.apply(null,arguments)}const M=function(e){return r.createElement("svg",C({xmlns:"http://www.w3.org/2000/svg",width:25,height:25,viewBox:"0 0 25 25"},e),D||(D=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{d:"M17.662 4.552H7.346A4.36 4.36 0 0 0 3 8.898v5.685c0 2.168 1.614 3.962 3.697 4.28v2.77c0 .303.35.476.59.29l3.904-2.994h6.48c2.39 0 4.35-1.96 4.35-4.35V8.9c0-2.39-1.95-4.346-4.34-4.346zM16 14.31a.99.99 0 0 1-1.003.99h-4.994C9.45 15.3 9 14.85 9 14.31v-3.02a.99.99 0 0 1 1-.99v-.782a2.5 2.5 0 0 1 2.5-2.51c1.38 0 2.5 1.13 2.5 2.51v.782c.552.002 1 .452 1 .99z"}),r.createElement("path",{d:"M14 9.81c0-.832-.674-1.68-1.5-1.68-.833 0-1.5.84-1.5 1.68v.49h3z"}))))};var L;function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},F.apply(null,arguments)}const j=function(e){return r.createElement("svg",F({xmlns:"http://www.w3.org/2000/svg",width:25,height:25,viewBox:"0 0 25 25"},e),L||(L=r.createElement("path",{fillRule:"evenodd",d:"M19.074 21.117c-1.244 0-2.432-.37-3.532-1.096a8 8 0 0 1-.703-.52c-.77.21-1.57.32-2.38.32-4.67 0-8.46-3.5-8.46-7.8C4 7.7 7.79 4.2 12.46 4.2c4.662 0 8.457 3.5 8.457 7.803 0 2.058-.85 3.984-2.403 5.448.023.17.06.35.118.55.192.69.537 1.38 1.026 2.04.15.21.172.48.058.7a.69.69 0 0 1-.613.38h-.03z"})))};var H=n(83615),_=function(e){return{"> path":{fill:e.colorTokens.foreground.neutral.quaternary.base}}};function V(e){var t,n=e.action,i=e.actionHandler,o=e.requireLogin,l=void 0===o||o,u=e.susiProps,d=e.viewer,s=(0,P.l)(),p=r.useState(null),m=(0,a.A)(p,2),f=m[0],g=m[1];switch(r.useEffect((function(){g(document&&document.documentElement&&"ontouchstart"in document.documentElement)}),[]),n){case"highlight":t=A;break;case"respond":t=j;break;case"tweet":t=H.A;break;case"privateNote":t=M;break;default:t=function(){return null}}var h=f?function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}:void 0,v=!d&&l?function(e){var t=e.children;return r.createElement("div",{onTouchStart:h},!!u&&r.createElement(T.r,(0,c.A)({susiEntry:"highlight_text"},u),t))}:function(e){var t=e.children;return r.createElement(I.P,{rules:{fill:"inherit"},onClick:function(){return i(n)},onTouchStart:h},t)};return r.createElement(v,null,r.createElement(t,{width:"25px",height:"25px",className:s(_)}))}var B=n(52290),U=n(36557),W=n(49287),G=n(20239),Q=n(11334),q=n(18642),z=n(40064),X=function(e,t){return function(n){return{display:"inline-block",fill:e?n.colorTokens.background.accent.secondary.hover:null,paddingRight:t?"6px":null,":hover":{fill:e?n.colorTokens.background.accent.secondary.hover:null}}}},Y=function(){return{display:"inline-block",fill:q.ON,padding:"8px 0",whiteSpace:"nowrap"}},Z=function(e){return{background:e.baseColor.overlay.lighter,display:"inline-block",height:"25px",width:"1px",verticalAlign:"top"}};function K(e){var t=e.id,n=e.allowNotes,a=e.allowMainActions,i=e.highlightSourceProvider,o=e.rightContent,l=e.isYourHighlight,c=e.hasIconAfterHighlightIcon,u=e.mouseEnter,d=e.mouseLeave,s=e.position,p=e.update,m=e.onAction,f=e.allowResponse,g=e.allowTweet,h=e.highlightSusiProps,v=(0,G.D)(),k=(0,P.l)();r.useEffect((function(){p&&p()}),[u,d,s,p]);var y=r.useCallback((function(e){return r.createElement(V,{action:"highlight",viewer:e,actionHandler:m,susiProps:h})}),[m,h]);return r.createElement(Q.N,{theme:(0,z.a5)(v)},r.createElement(x.c,{nonBlocking:!0},(function(e){return r.createElement("div",{id:t,onMouseEnter:u,onMouseLeave:d},r.createElement("div",{className:k(Y)},a&&r.createElement(r.Fragment,null,r.createElement(B.a,{display:"inline-block",padding:c?"0 12px 0 10px":"0 10px"},r.createElement(r.Fragment,null,r.createElement("div",{className:k(X(l,c))},i?r.createElement(W.Ne,{source:{name:i}},y(e)):y(e)),f&&r.createElement("div",{className:k((s=g,{display:"inline-block",paddingRight:s?"6px":null}))},r.createElement(V,{action:"respond",viewer:e,actionHandler:m})),g&&r.createElement(V,{action:"tweet",viewer:e,requireLogin:!1,actionHandler:m}))),(!!o||n)&&r.createElement("div",{className:k(Z)})),!n&&!!o&&r.createElement(B.a,{display:"inline-block",padding:"0 16px"},r.createElement(U.kZ,{color:"DARKER",scale:"S"},o)),n&&r.createElement(B.a,{display:"inline-block",padding:"0 16px"},r.createElement(V,{action:"privateNote",viewer:e,actionHandler:m}))));var s})))}var J=r.memo(K),$=n(24960),ee=n(78693),te=["visible","position"];function ne(e){var t=e.visible,n=void 0===t||t,a=e.position,i=void 0===a?{left:0,top:0,bottom:0}:a,o=(0,d.A)(e,te),l=i.left,u=i.top,s=i.bottom,p=r.useCallback((function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}),[]),m=r.useCallback((function(e){e.preventDefault()}),[]);return r.createElement("span",{onMouseDown:m,onMouseUp:p,onClick:p,style:{display:"block",position:"absolute",left:l,top:u,height:"".concat(s-u,"px"),width:"0px"}},n&&r.createElement($.A,{darkTheme:!0,disablePortalOverlay:!0,display:"block",isVisible:!0,placement:"top",customZIndex:ee.Ay.selectionMenu,popoverRenderFn:function(e){return r.createElement(J,(0,c.A)({position:i,update:e},o))},referenceHeight:"100%",refTag:"span",shouldAnimateOpen:!0},r.createElement(r.Fragment,null)))}var ae=n(42976),re=n(39160),ie=n(65550),oe=n(79959),le=n(46879),ce=["highlightId","children"];function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){(0,u.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e){var t=e.highlightId,n=e.children,a=(0,d.A)(e,ce),i=r.useContext(w.h).openSidebarToRespondToHighlight,o=r.useContext(Oe),l=o.activeSelection,u=o.setActiveSelection;return r.createElement(O,(0,c.A)({},a,{quoteType:ae.Gv.HIGHLIGHT,targetQuoteId:t}),(function(e){var o=e.createQuote,d=e.deleteQuote;return r.createElement(O,(0,c.A)({},a,{quoteType:ae.Gv.RESPONSE,onCompleted:function(e){e&&e.createQuote&&e.createQuote.id&&i(e.createQuote)}}),(function(e){var i=e.createQuote;return r.createElement(O,(0,c.A)({},a,{quoteType:ae.Gv.HIGHLIGHT,targetQuoteId:t,onUpdate:function(e){return l&&u(de(de({},l),{},{highlightId:e.createQuote.id}))}}),(function(e){var t=e.createQuote;return n({createHighlightQuote:o,createResponseQuote:i,createTweetQuote:t,deleteHighlightQuote:d})}))}))}))}function pe(e){var t=e.createPrivateNote,n=e.interactivePost,a=e.isPersistent,i=e.mouseEnter,o=e.mouseLeave,l=e.position,u=void 0===l?{left:0,top:0,bottom:0}:l,d=e.highlightId,s=e.highlights,p=e.selectedParagraphs,m=e.startOffset,g=e.endOffset,h=r.useContext(Oe),v=h.activeSelection,k=h.setActiveSelection,y=(0,f.$L)(),b=(0,re.d4)((function(e){return e.config.authDomain})),N=!!n&&!!n.isPublished,S=!!(n&&n.creator&&n.creator.allowNotes),E=s&&s.find((function(e){return e.id===d})),O=n.id,w=n.latestPublishedVersion,T=!(0,ie.L)(),I=p.map((function(e){return e.name})),P=N&&("PUBLIC"===n.visibility||!!n.isLocked),R=T||P,A=r.useCallback((function(e){var t=e.isYourHighlight,n=e.createQuote,a=e.viewer,r=v&&v.selectedParagraph&&v.selectedParagraph.text,i=v&&v.startOffset,o=v&&v.endOffset,l="";r&&"number"==typeof i&&"number"==typeof o&&(l=encodeURIComponent(r.slice(i,o))),a&&a.id&&!t&&n(),window.open("".concat((0,le.III)(b,O),"?type=highlight&text=").concat(l),"_blank"),y.event("post.shareOpen",{postId:O,source:"highlight_menu",dest:"twitter",dialogType:"native"})}),[v,m,g,O]),D=r.useCallback((function(e,n){return function(a){"highlight"===a?(k(null),n?e.deleteHighlightQuote():e.createHighlightQuote()):"respond"===a?e.createResponseQuote():"tweet"===a?e.createTweetQuote():"privateNote"===a&&t()}}),[k,t]);return r.createElement(x.c,{nonBlocking:!0},(function(e){var t,n=!(!E||!e)&&e.id===E.userId;if(n)t="You highlighted";else if(E&&"anon"===E.userId)t="Top highlight";else{var l,s;t=null!==(l=null==E||null===(s=E.user)||void 0===s?void 0:s.name)&&void 0!==l?l:""}var f={targetPostId:O,targetPostVersionId:w,targetParagraphs:p,startOffset:m,endOffset:g,viewer:e};return r.createElement(se,(0,c.A)({highlightId:d},f),(function(l){return r.createElement(ne,{position:u,allowMainActions:N,visible:S||N,allowNotes:a&&S,allowResponse:T,allowTweet:P,rightContent:a?void 0:t,isYourHighlight:n,hasIconAfterHighlightIcon:R,hasPaddingAfterResponse:P,highlightSourceProvider:E?"quote_click_menu":"selection_menu",highlightSusiProps:{actionUrl:(0,oe.ST)((0,le.k9W)(b,O),{endOffset:g.toString(),paragraphName:I.toString(),startOffset:m.toString(),versionId:w}),operation:"register"},mouseEnter:i,mouseLeave:o,onAction:D(de(de({},l),{},{createTweetQuote:function(){return A({isYourHighlight:n,viewer:e,createQuote:l.createTweetQuote})}}),n)})}))}))}var me=n(75121),fe=n(19),ge=[{kind:"FragmentDefinition",name:{kind:"Name",value:"NoteCreateMutation_privateNote"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Note"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"anchor"}},{kind:"Field",name:{kind:"Name",value:"author"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"replies"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"post"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"postId"}},{kind:"Field",name:{kind:"Name",value:"selectionStartOffset"}},{kind:"Field",name:{kind:"Name",value:"selectionEndOffset"}}]}}],he={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteCreateMutation"},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:"targetPostVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetParagraphName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"noteContent"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selectionStartOffset"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selectionEndOffset"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createNote"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetPostVersion"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostVersion"}}},{kind:"Argument",name:{kind:"Name",value:"targetParagraphName"},value:{kind:"Variable",name:{kind:"Name",value:"targetParagraphName"}}},{kind:"Argument",name:{kind:"Name",value:"noteContent"},value:{kind:"Variable",name:{kind:"Name",value:"noteContent"}}},{kind:"Argument",name:{kind:"Name",value:"selectionStartOffset"},value:{kind:"Variable",name:{kind:"Name",value:"selectionStartOffset"}}},{kind:"Argument",name:{kind:"Name",value:"selectionEndOffset"},value:{kind:"Variable",name:{kind:"Name",value:"selectionEndOffset"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NoteCreateMutation_privateNote"}}]}}]}}].concat((0,p.A)(ge))},ve={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NoteCreateMutation_postNotes"},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:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"privateNotes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NoteCreateMutation_privateNote"}}]}}]}}]}}].concat((0,p.A)(ge))};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){(0,u.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=function(e){var t=e.children,n=e.onCompleted,a=e.targetPostId,o=e.targetPostVersion,l=e.targetParagraphName,c=e.selectionStartOffset,u=e.selectionEndOffset,d=(0,i.v)().setOpenPrivateNoteId;return r.createElement(x.c,null,(function(e){return r.createElement(m.s,{mutation:he,onCompleted:n,update:function(e,t){var n=e.readQuery({query:ve,variables:{postId:a}}),r=ye(ye({},t.data.createNote),{},{selectionStartOffset:c,selectionEndOffset:u,post:{id:a,__typename:"Post"}}),i={post:ye(ye({},n.post),{},{privateNotes:[].concat((0,p.A)(n.post.privateNotes),[r])})};e.writeQuery({query:ve,variables:{postId:a},data:i})}},(function(n){return t({onCreateMutate:function(t){var r=n({variables:{targetPostId:a,targetPostVersion:o,targetParagraphName:l,selectionStartOffset:c,selectionEndOffset:u,noteContent:t},optimisticResponse:{__typename:"Mutation",createNote:{__typename:"Note",id:"temp",anchor:l,author:e,content:t,createdAt:new Date,replies:[],postId:a,selectionStartOffset:c,selectionEndOffset:u,post:{id:a,__typename:"Post"}}}});return d("temp"),r}})}))}))},Ne=n(27399),Se=function(e){var t=e.activeSelection,n=t.selectedParagraph.name,a=t.startOffset,i=t.endOffset,o=e.onCancel,l=e.onMutationComplete,c=e.onNoteCreation,u=e.post;return n?r.createElement(B.a,{padding:"12px 20px"},r.createElement(be,{targetPostId:u.id,targetPostVersion:u.latestPublishedVersion,targetParagraphName:n,selectionStartOffset:a,selectionEndOffset:i,onCompleted:l},(function(e){var t=e.onCreateMutate;return r.createElement(Ne.b,{onSubmit:function(e){t(e),c()},onCancel:o})}))):null},Ee=n(85864),Oe=(0,r.createContext)({activeSelection:null,setActiveSelection:function(){}}),we=function(e,t,n){for(var a,r=document.createNodeIterator(n,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_TEXT),i=0;a=r.nextNode();)if("NOSCRIPT"!==a.nodeName){if(e===a)return i+t;a.nodeType===Node.TEXT_NODE?i+=a.nodeValue.length:"BR"===a.nodeName&&(i+=1)}else r.nextNode();return-1},xe=function(e){var t=e.children,n=e.highlights,c=e.interactivePost,u=e.disableSelection,d=void 0!==u&&u,s=(0,r.useState)(null),p=(0,a.A)(s,2),m=p[0],f=p[1],g=(0,i.v)(),h=g.setOpenPrivateNoteId,v=g.setPrivateNoteSelection,k=(0,o.u5)().paragraphRefsMappers,y=k.paragraphRefsMap,b=k.paragraphRefsByNameMap,N=(0,r.useCallback)((function(e){var t=e.createNote,n=null==t?void 0:t.id;n&&h(n)}),[h]),S=(0,r.useCallback)((function(e,t){var n=function(e,t){return{startOffset:we(e.startContainer,e.startOffset,t),endOffset:we(e.endContainer,e.endOffset,t)}}(e,t),a=n.startOffset,r=n.endOffset;if(-1!==a&&-1!==r&&r-a!=0&&(!m||m.startOffset!==a||m.endOffset!==r)){var i=y.get(t);if(i){var o=e.getBoundingClientRect(),l=o.left,c=o.top,u=o.right,d=o.bottom,s={isFocused:!0,selectedParagraph:i,startOffset:a,endOffset:r,menuPosition:{left:(l+u)/2+window.scrollX,top:c+window.scrollY,bottom:d+window.scrollY}};setTimeout((function(){f(s)}))}}}),[y,m,f]);return(0,l.s)(S,f,d),r.createElement(Oe.Provider,{value:{activeSelection:m,setActiveSelection:f}},r.createElement(Ee.B,null,(function(e){var t=e.isVisible,a=e.hide,i=e.show,o=function(){f(null),v(null),a()},l=m&&m.selectedParagraph&&m.selectedParagraph.name,u=b.get(l||"");return r.createElement(fe.K,{isVisible:t,hide:o,reference:u,popoverRenderFn:function(){return r.createElement(me.h,null,c&&m?r.createElement(Se,{activeSelection:m,onCancel:o,onMutationComplete:N,onNoteCreation:o,post:c}):r.createElement(r.Fragment,null))}},c&&!t&&m&&m.menuPosition?r.createElement(pe,{createPrivateNote:function(){v({id:"private-note-selection",paragraphs:[m.selectedParagraph],userId:null,startOffset:m.startOffset,endOffset:m.endOffset,user:void 0}),i()},endOffset:m.endOffset,highlightId:m.highlightId,highlights:n,interactivePost:c,isPersistent:m.isFocused,mouseEnter:m.menuMouseEnter,mouseLeave:m.menuMouseLeave,position:m.menuPosition,selectedParagraphs:[m.selectedParagraph],startOffset:m.startOffset}):r.createElement(r.Fragment,null))})),t)}},2680:(e,t,n)=>{n.d(t,{aB:()=>c,fc:()=>d,u5:()=>u});var a=n(80296),r=n(96540),i=n(70031),o=r.createContext({paragraphRefsMappers:{paragraphRefsMap:new Map,paragraphTitlesRefsByStyleMap:new Map,paragraphRefsByNameMap:new Map},addParagraphRef:function(){}}),l=function(){return{paragraphRefsMap:new Map,paragraphTitlesRefsByStyleMap:new Map,paragraphRefsByNameMap:new Map}},c=function(e){var t=e.children,n=r.useState(l),i=(0,a.A)(n,2),c=i[0],u=i[1],d=r.useCallback((function(e,t,n){u((function(a){if(!e.current)return a;var r=a.paragraphRefsMap,i=a.paragraphTitlesRefsByStyleMap,o=a.paragraphRefsByNameMap,l=["Title","Subtitle"].includes(n),c=new Map(i);n&&l&&c.set(n,e.current);var u=new Map(r);l||u.set(e.current,t);var d=new Map(o);return t.name&&!l&&d.set(t.name,e.current),{paragraphRefsMap:u,paragraphTitlesRefsByStyleMap:c,paragraphRefsByNameMap:d}}))}),[u]);return r.createElement(o.Provider,{value:{paragraphRefsMappers:c,addParagraphRef:d}},t)},u=function(){return r.useContext(o)},d=function(e,t){var n=r.useContext(o).addParagraphRef,a=r.useRef(null);return r.useEffect((function(){a.current&&(a.current.setAttribute(i.M,""),n(a,e,t))}),[a]),a}},70031:(e,t,n)=>{n.d(t,{M:()=>l,s:()=>c});var a=n(38221),r=n.n(a),i=n(96540),o=n(98503),l="data-selectable-paragraph",c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,o.v)().privateNoteSelection;(0,i.useEffect)((function(){if(!n&&!a){var i=r()((function(){var n=document.getSelection();if(n)if("Range"===n.type){if(!(n.rangeCount>1)){var a=n.getRangeAt(0);if(a){var r=function(e){if(!e.commonAncestorContainer)return null;var t=e.commonAncestorContainer instanceof Element?e.commonAncestorContainer:e.commonAncestorContainer.parentElement;return t?t.closest("[".concat(l,"]")):null}(a);r?e(a,r):t(null)}else t(null)}}else t((function(e){return null!=e&&e.highlightId?e:null}));else t(null)}),100);return document.addEventListener("selectionchange",i,{passive:!0}),function(){return document.removeEventListener("selectionchange",i)}}}),[e,t,n,a])}},6546:(e,t,n)=>{n.d(t,{xl:()=>Oe,_t:()=>we,me:()=>Te});var a=n(64467),r=n(80296),i=n(58168),o=n(96540),l=n(70370),c=n(23029),u=n(92901),d=n(85501),s=n(56822),p=n(53954),m=n(73711),f=n(86322),g=n(52290),h=o.forwardRef((function(e,t){var n=e.height,a=void 0===n?1:n,r=e.width,i=void 0===r?1:r,l=e.backgroundColor,c=void 0===l?"BASE_NORMAL":l,u=e.children,d=(i=i||1)/(a=a||1);return o.createElement(g.a,{position:"relative",margin:"auto",backgroundColor:c,ref:t,overflow:"hidden"},o.createElement(g.a,{paddingBottom:"".concat(100/d,"%"),height:"0"},u))})),v=n(45458),k=n(39),y=n(12378),b=n(44402),N=n(38667),S=function(e){return function(t){return(0,a.A)({marginTop:"10px",textAlign:e,maxWidth:"".concat((0,y.z)(t,8,!0),"px"),marginLeft:"left"===e?"0":"auto",marginRight:"auto"},N.lg(t),{marginLeft:"auto",textAlign:"center"})}},E=function(e){return function(){var t=e&&100*e;return{width:"".concat(t,"%"),position:"relative",left:"calc(".concat(100-t/2,"% - 8px)"),transform:"translateX(-50%)"}}},O=o.forwardRef((function(e,t){var n=e.children,a=e.richTextStyle,r=e.textAlign,i=void 0===r?"center":r,l=e.extendLeftRatio,c=(0,b.l)(),u=(0,k.Z)({name:"detail",scale:"CARD"===a?"S":"M",color:"LIGHTER"});return o.createElement("figcaption",{className:c([S(i),u].concat((0,v.A)(l?[E(l)]:[]))),ref:t},n)}));function w(e){var t=e.children,n=e.figCaption,a=e.className,r=e.figureRef;return o.createElement("figure",{className:a,ref:r},t,n)}var x=n(66305),T=n(31104),I=function(e){var t=e.rootMargin,n=e.children,a=e.target,i=o.useState(!1),l=(0,r.A)(i,2),c=l[0],u=l[1],d=o.useCallback((function(e){!c&&e.isIntersecting&&u(!0)}),[c]);return(0,T.B)({onIntersect:d,target:a,disconnect:function(){return c},rootMargin:t},[c]),"function"==typeof n?o.createElement(o.Fragment,null,n(c)):c?o.createElement(o.Fragment,null,n):null},P=function(){return{width:"1px",minWidth:"100%","*width":"100%"}};function R(e){var t,n=e.src,a=e.title,l=e.height,c=e.width,u=e.allowFullScreen,d=e.frameBorder,s=e.rules,p=e.placeholderRef,m=e.iframeRef,f=(0,b.l)(),g={src:n,allowFullScreen:u,frameBorder:d,height:l,width:c},h=o.useState(!1),v=(0,r.A)(h,2),k=v[0],y=v[1],N=o.useState(!1),S=(0,r.A)(N,2),E=S[0],O=S[1];return E||x.R5.on("load",(function(){return O(!0)})),null!=m&&null!==(t=m.current)&&void 0!==t&&t.parentElement&&m.current.parentElement.offsetWidth<m.current.offsetWidth&&!k&&y(!0),E?o.createElement(I,{rootMargin:"200px 0px",target:p},(function(e){return e?o.createElement("iframe",(0,i.A)({},g,{ref:m,title:a,className:f(k?[s,P]:s),scrolling:"no"})):null})):null}var A=n(51260),D=n(89796),C=n(48619),M=function(e){var t=e.paragraph,n=e.paragraphStyle,i=e.richTextStyle,l=e.spaceTop,c=e.updateWatchedBounds,u=(0,b.l)(),d=o.useRef(null),s=(t.iframe||{}).mediaResource,p=s||{},g=p.id,v=p.iframeSrc,k=p.iframeHeight,y=p.iframeWidth,S=p.title,E=(0,A.au)(),x=v;x||(x=g?E("FetchMediaResourceEmbed",{mediaResourceId:g}):"");var T=function(e){var t=e.src,n=e.initialHeight,a=e.initialWidth,i=o.useRef(null),l=o.useState(n),c=(0,r.A)(l,2),u=c[0],d=c[1],s=o.useState(a),p=(0,r.A)(s,2),m=p[0],g=p[1];return o.useEffect((function(){if(""!==t){var e=(0,f.u)((function(e,n){i.current&&"MEASURE"===e.type&&e.details.height>0&&(g(i.current.offsetWidth),i.current.contentWindow===n&&d(e.details.height)),"iframe.resize"===e.context&&e.src===t&&e.height>0&&(i.current&&g(i.current.offsetWidth),d(e.height))})).destructor;return function(){e()}}}),[t,n]),[u,m,i]}({src:x,initialHeight:k||0,initialWidth:y||0}),I=(0,r.A)(T,3),P=I[0],M=I[1],L=I[2],F=o.useRef(null);if(o.useEffect((function(){if(c&&s&&s.id&&M&&P){var e="";d.current&&(e=d.current.offsetTop.toString()),c("".concat(s.id,"-").concat(e),d,{type:"image"})}}),[]),!x)return null;var j=t.text?o.createElement(O,{richTextStyle:i},o.createElement(m.O,{paragraph:t,paragraphStyle:n,richTextStyle:i})):null,H=[(0,C.o8)(l)];return H.push((function(){return{clear:"both"}})),"OUTSET_LEFT"===(t.layout||void 0)&&"STREAM"!==i&&"INLINE"!==i&&H.push((function(e){var t;return t={background:e.backgroundColor,borderWidth:e.borderWidthThick+"px",borderStyle:e.borderStyle,borderColor:e.backgroundColor,float:"left",marginLeft:"-150px",marginRight:"30px",width:"75%",padding:"0",paddingBottom:"10px"},(0,a.A)(t,N.md(e),{float:"none",marginLeft:"0",marginRight:"0",width:"100%"}),(0,a.A)(t,"marginBottom","16px"),t})),o.createElement(w,{className:u(H),figCaption:j,figureRef:d},o.createElement(h,{height:P,width:M,backgroundColor:"NONE",ref:F},o.createElement(R,{placeholderRef:F,iframeRef:L,src:x,title:S||"",height:P,width:M,allowFullScreen:!0,frameBorder:"0",rules:D.u})))},L=o.memo(M),F=n(36944),j=n.n(F),H=n(2680),_=n(15324),V=n(9459),B=n(90383),U=function(e){var t=(0,r.A)(e,1)[0];return"number"==typeof t?"".concat(t,"px"):t},W=function(e){var t=(0,r.A)(e,1)[0];return"".concat(t[0],"% ").concat(t[1],"%")},G=function(e){return(0,r.A)(e,1)[0]};function Q(e){var t=e.backgroundImage,n=e.boxShadowRules,a=e.miroId,r=e.height,i=e.width,l=e.minHeight,c=e.minWidth,u=e.imgHeight,d=e.imgWidth,s=e.focusPercent,p=e.strategy,m=void 0===p?B.qY.Resample:p,f=e.freezeGifs,g=(0,b.l)(),h=t;if(!h){var v=(0,B.rP)({miroId:a,height:u,width:d,strategy:m,freezeGifs:f});h="url(".concat(v,")")}var k=(0,V.Fv)(U,r),y=(0,V.Fv)(U,i),N=l&&(0,V.Fv)(U,l),S=c&&(0,V.Fv)(U,c),E=(0,V.Fv)(W,s),O={backgroundImage:(0,V.Fv)(G,h),display:"block",backgroundOrigin:"border-box",backgroundSize:"cover",height:k,width:y,minHeight:N,minWidth:S,backgroundPosition:E,maxWidth:"100%"};return o.createElement("div",{className:g([O,n])})}Q.defaultProps={focusPercent:[50,50]};var q=n(60763),z=function(e){return{backgroundColor:e.colorTokens.background.accent.quaternary.base}},X=function(e,t){var n=(0,B.rP)({freezeGifs:!1,miroId:e,strategy:B.qY.Resample,width:t.breakpoints.sm}),a=(0,B.rP)({freezeGifs:!1,miroId:e,strategy:B.qY.Resample,width:t.breakpoints.md}),r=(0,B.rP)({freezeGifs:!1,miroId:e,strategy:B.qY.Resample,width:t.breakpoints.lg}),i=(0,B.rP)({freezeGifs:!1,miroId:e,strategy:B.qY.Resample,width:t.breakpoints.xl});return{xl:"url('".concat(i,"')"),lg:"url('".concat(i,"')"),md:"url('".concat(r,"')"),sm:"url('".concat(a,"')"),xs:"url('".concat(n,"')")}};function Y(e){var t=e.metadata,n=(0,b.l)();return o.createElement(q.A,null,(function(e){return o.createElement("div",{className:n(z)},o.createElement(Q,{backgroundImage:X(t.id,e),miroId:t.id,height:"60vh",width:"100%",minHeight:{xl:500,lg:400,md:400,sm:300,xs:300},imgHeight:500,imgWidth:2e3,focusPercent:null===t.focusPercentX||void 0===t.focusPercentX||null===t.focusPercentY||void 0===t.focusPercentY?void 0:[t.focusPercentX,t.focusPercentY]}))}))}var Z=n(79501),K=n(77865),J=n(91958),$=n(60561),ee=function(e){var t=e.highlights,n=e.isSequenceCover,l=void 0!==n&&n,c=e.marginTopOverride,u=e.paragraph,d=e.paragraphStyle,s=e.privateNotes,p=e.richTextStyle,f=e.sequenceAspectRatio,h=e.spaceTop,v=e.updateWatchedBounds,k=e.loading,y=void 0===k?K.u.LAZY:k,S=e.marginBottomOverride,E=(0,b.l)(),x=o.useRef(null),T=(0,H.fc)(u,d);return o.useEffect((function(){if(v){var e=u.name,t=u.metadata&&u.metadata.id;if(e&&t){var n="";x.current&&(n=x.current.offsetTop.toString()),v("".concat(e,"-").concat(t,"-").concat(n),x,{type:"image"})}}}),[]),o.useMemo((function(){var e=u.metadata,n=u.layout;if(!e)return null;var v,k=e.id,b=e.originalHeight,I=e.originalWidth,P=e.alt,R=(0,B.dP)(k),A="CARD"===p||"INLINE"===p,D=(0,$.ky)({layout:n,originalWidth:I||0,originalHeight:b||0,sequenceAspectRatio:f,richTextStyle:p}),M=D.width,L=D.height,F=D.strategy;if("OUTSET_ROW_CONTINUE"===n&&I&&b&&f){var H=I/b;v=j()(f/H,2)}var U,W=u.text?o.createElement(O,{ref:T,richTextStyle:p,textAlign:l?"left":"center",extendLeftRatio:v},s&&o.createElement(_.F,{paragraph:u,privateNotes:s}),o.createElement(m.O,{highlights:t,paragraph:u,paragraphStyle:d,richTextStyle:p})):null;if(l)U=o.createElement(Y,{metadata:{id:k,focusPercentX:e.focusPercentX,focusPercentY:e.focusPercentY}});else{var G={alt:P||"",miroId:k,height:L,width:M,rules:[{width:"100%",maxWidth:"100%",height:"auto"}],maxWidth:L?void 0:"100%",strategy:F,freezeGifs:"STREAM"===p||"RESAMPLE"!==F,focusPercentX:e.focusPercentX,focusPercentY:e.focusPercentY,expectedWidth:M,loading:y,webp:!0};if("FULL_WIDTH"===n)U=o.createElement(Z.t,(0,i.A)({},G,{height:e.originalHeight||G.height,width:e.originalWidth||G.width}));else if("OUTSET_LEFT"===n||"INSET_LEFT"===n||"INSET_CENTER"===n&&I||"OUTSET_CENTER"===n&&I){var Q=I&&(R?I/2:I);U=o.createElement(J.pB,{isLinked:!!u.href,width:G.width,height:G.height,originalHeight:e.originalHeight,originalWidth:e.originalWidth,paragraphRef:x},o.createElement("div",{className:E((function(e){return{marginLeft:"auto",marginRight:"auto",maxWidth:"OUTSET_CENTER"===n&&Q&&Q<e.maxWidths.outset?"".concat(e.maxWidths.outset,"px"):"".concat(Q,"px")}}))},o.createElement(Z.t,(0,i.A)({},G,{height:G.height||e.originalHeight||void 0,width:G.width||e.originalWidth||void 0}))))}else U=I&&"INSET_CENTER"!==n?o.createElement(J.pB,{isLinked:!!u.href,width:G.width,height:G.height,originalHeight:e.originalHeight,originalWidth:e.originalWidth,paragraphRef:x},o.createElement(Z.t,(0,i.A)({},G,{height:e.originalHeight||G.height,width:e.originalWidth||G.width}))):o.createElement(g.a,{display:"flex",justifyContent:"center",alignItems:"flex-start",sm:{display:"block"}},o.createElement(J.pB,{isLinked:!!u.href,width:G.width,height:G.height,originalHeight:e.originalHeight,originalWidth:e.originalWidth,paragraphRef:x},o.createElement(Z.t,(0,i.A)({},G,{width:void 0,maxWidth:"100%",strategy:B.qY.Proxy}))));u.href&&(U=o.createElement("a",{href:u.href},U))}var q=[void 0===c?(0,C.o8)(h):(0,C.o8)(c)];if(S&&q.push((function(){return{marginBottom:(0,V.Fv)((function(e){var t=(0,r.A)(e,1)[0];return"".concat(t,"px")}),S)}})),q.push({clear:"both"}),l)q.push((function(e){return(0,a.A)({},N.lg(e),{paddingLeft:"0px",paddingRight:"0px"})}));else if(("OUTSET_ROW"===n||"OUTSET_ROW_CONTINUE"===n)&&I&&b&&f){var z=I/b,X=j()(z/f*100,2);q.push({width:"".concat(X,"%"),marginRight:"10px",paddingTop:"5px",paddingBottom:"5px",":last-of-type":{marginRight:0}})}else"OUTSET_LEFT"===n&&A?q.push({marginLeft:"auto",marginRight:"auto"}):"OUTSET_LEFT"!==n||A?"INSET_LEFT"===n?q.push({float:"left",width:"50%",paddingBottom:"10px",paddingRight:"30px",marginBottom:"16px"}):"FULL_WIDTH"===n?q.push({width:"100%"}):"INSET_CENTER"===n?q.push({marginLeft:"auto",marginRight:"auto"}):"OUTSET_CENTER"===n&&q.push({paddingTop:"5px",paddingBottom:"5px"}):q.push((function(e){var t;return t={background:e.backgroundColor,borderWidth:e.borderWidthThick+"px",borderStyle:e.borderStyle,borderColor:e.backgroundColor,float:"left",marginLeft:"-150px",marginRight:"30px",width:"75%",padding:"0",paddingBottom:"10px"},(0,a.A)(t,N.lg(e),{float:"none",marginLeft:"0",marginRight:"0",width:"100%"}),(0,a.A)(t,"marginBottom","16px"),t}));return o.createElement(w,{className:"".concat(E(q)," paragraph-image"),figCaption:W,figureRef:x},U)}),[JSON.stringify(u),JSON.stringify(s),JSON.stringify(t)])},te=o.memo(ee),ne=n(39181),ae=n(64373),re=n(54224),ie=n(15706),oe=function(){var e=(0,b.l)(),t=(0,ie.r)(re.LO),n="sm"===t||"xs"===t,a=re.W1[t],r=re.DC[t];return o.createElement("div",{className:e((0,re.wS)(n,t))},o.createElement(g.a,{padding:"24px"},o.createElement(g.a,{display:"flex",alignItems:"center"},o.createElement(g.a,{height:"20px",width:"20px",borderRadius:"50%",backgroundColor:"BASE_NORMAL"}),o.createElement(g.a,{padding:"0 8px",flexShrink:"0"},o.createElement(g.a,{height:"4px",width:"50px",backgroundColor:"BASE_NORMAL"}))),o.createElement(g.a,{marginTop:n?"16px":"24px",marginBottom:n?"16px":"24px",height:n?"20px":"48px"},o.createElement(g.a,{height:"20px",width:"120px",backgroundColor:"BASE_NORMAL"})),o.createElement(g.a,{display:"flex",alignItems:"center"},o.createElement(g.a,{flexShrink:"0"},o.createElement(g.a,{height:"40px",width:"100px",borderRadius:"20px",backgroundColor:"BASE_NORMAL"})))),o.createElement(ie.G,{coverHeight:a,coverWidth:r,catalogItems:[],isEmbeded:!0,breakpoints:re.LO}))},le=function(e){var t=e.catalog;return e.loading?o.createElement(oe,null):t?o.createElement(re.PP,{catalog:t}):null},ce=n(86975),ue=n(39410),de=n(27622),se=n(36557),pe=function(e){return{boxShadow:"inset 0 0 0 1px ".concat(e.colorTokens.border.neutral.primary.base)}},me=function(e){var t=e.paragraph,n=e.processedStructuredMarkup,a=t.mixtapeMetadata;if(!a||!a.href)return null;var r=a.href,i=n.title,l=n.description,c=n.domain;return o.createElement(ce.D,{href:r||"",target:"_blank"},o.createElement(g.a,{display:"flex",flexShrink:"0",padding:"0px"},o.createElement(g.a,{padding:"16px 20px",flexShrink:"1",flexGrow:"1",display:"flex",justifyContent:"center",flexDirection:"column",sm:{padding:"10px 12px 10px"}},o.createElement(ue.hE,{scale:"XS",clamp:2},i),l&&o.createElement(g.a,{marginTop:"8px"},o.createElement(de.Pd,{scale:"S",clamp:2},l)),c&&o.createElement(g.a,{marginTop:"12px"},o.createElement(se.kZ,{scale:"S",clamp:2},c))),a&&a.thumbnailImageId&&o.createElement(g.a,{width:"160px"},o.createElement(Q,{boxShadowRules:pe,miroId:a.thumbnailImageId,width:160,height:167,strategy:B.qY.Resample,focusPercent:[50,50],imgHeight:167,imgWidth:160}))))},fe=function(e){return{boxShadow:"inset 0 0 0 1px ".concat(e.colorTokens.border.neutral.primary.base)}},ge=function(e){var t,n,a,r,i,l=e.paragraph,c=e.spaceTop,u=e.structuredMarkup,d=(0,b.l)(),s=!(null===(t=l.mixtapeMetadata)||void 0===t||null===(n=t.mediaResource)||void 0===n||!n.mediumCatalog),p=(0,ne.I)(ae.q,{variables:{catalogId:null===(a=l.mixtapeMetadata)||void 0===a||null===(r=a.mediaResource)||void 0===r||null===(i=r.mediumCatalog)||void 0===i?void 0:i.id},skip:!s}),m=p.loading,f=p.data,g=p.error,h=l.mixtapeMetadata,v=l.type;if(!h||!h.href||!v)return null;var k,y=u||function(e){var t=e.text,n=e.markups;if(!t)return null;var a=n.find((function(e){return"STRONG"===e.type}));if(!a)return null;var r=n.find((function(e){return"EM"===e.type})),i=a.end,o=r?r.end:a.end;return{title:t.slice(a.start,i).trim(),description:r?t.slice(r.start,r.end).trim():null,domain:t.slice(o).trim()||null}}(l),N=[(0,C.o8)(c)],S=!!g||f&&"Catalog"!==f.catalogById.__typename;if(s&&!S)k=o.createElement(le,{catalog:null==f?void 0:f.catalogById,loading:m});else{if(!y)return null;N.push(fe),k=o.createElement(me,{paragraph:l,processedStructuredMarkup:y})}return o.createElement("div",{className:d(N)},k)},he=n(45639),ve=n(49728),ke=n(24023);var ye=function(e){(0,d.A)(r,e);var t,n,a=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=(0,p.A)(t);if(n){var r=(0,p.A)(this).constructor;e=Reflect.construct(a,arguments,r)}else e=a.apply(this,arguments);return(0,s.A)(this,e)});function r(){return(0,c.A)(this,r),a.apply(this,arguments)}return(0,u.A)(r,[{key:"render",value:function(){var e,t=this.props,n=t.highlights,a=t.inserts,r=t.marginTopOverride,i=t.paragraph,c=t.paragraphStyle,u=t.privateNotes,d=t.richTextStyle,s=t.sequenceAspectRatio,p=t.spaceTop,m=t.loading,f=t.marginBottomOverride;switch(c){case ve.em.IMG:e=o.createElement(l._I.Consumer,null,(function(e){var t=e.updateWatchedBounds;return o.createElement(te,{highlights:n,marginTopOverride:r,paragraph:i,paragraphStyle:c,privateNotes:u,richTextStyle:d,sequenceAspectRatio:s,spaceTop:p,updateWatchedBounds:t,loading:m,marginBottomOverride:f})}));break;case ve.em.P:case ve.em.BQ:case ve.em.PQ:case ve.em.H1:case ve.em.H2:case ve.em.H3:case ve.em.H4:case ve.em.ULI:case ve.em.OLI:case ve.em.PRE:case ve.em.Kicker:case ve.em.Subtitle:case ve.em.Title:e=o.createElement(he.i,{highlights:n,marginTopOverride:r,paragraph:i,paragraphStyle:c,privateNotes:u,richTextStyle:d,spaceTop:p,marginBottomOverride:f});break;case ve.em.IFRAME:e=o.createElement(l._I.Consumer,null,(function(e){var t=e.updateWatchedBounds;return o.createElement(L,{paragraph:i,paragraphStyle:c,richTextStyle:d,spaceTop:p,updateWatchedBounds:t})}));break;case ve.em.MIXTAPE_EMBED:e=o.createElement(ge,{paragraph:i,spaceTop:p});break;case ve.em.COVER_TITLE:case ve.em.SECTION_CAPTION:case ve.em.HR:e=null;break;default:(0,ke.xb)(c),e=null}return a&&a.length?o.createElement(o.Fragment,null,a.map((function(e){return"before"===e.order&&e.component})),e,a.map((function(e){return"after"===e.order&&e.component}))):e}}]),r}(o.Component),be=n(80890);function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=function(e){var t=e.styleGroup,n=e.postBodyInserts,a=e.loading,r=(0,b.l)(),c=Ie(t),u=t.paragraphViewModels.map((function(e){var t=e.paragraph.name,r=n&&n[null!=t?t:""],c=o.createElement(ye,(0,i.A)({key:e.paragraph.name,inserts:r,loading:a},e));return"Title"===e.paragraphStyle||"Subtitle"===e.paragraphStyle?o.createElement(l.B,{name:"title",type:"byline",offset:{left:-600},key:"".concat(e.paragraph.name,"-wb")},c):c}));return c?o.createElement(c,{className:r([Te({paragraphStyle:t.paragraphStyle,topSpacing:t.topSpacing,paragraphLayout:t.paragraphLayout,richTextStyle:t.paragraphViewModels[0].richTextStyle,paragraph:t.paragraphViewModels[0].paragraph})])},u):o.createElement(o.Fragment,null,u)},Oe=o.memo(Ee),we=function(e){var t=[];return e.forEach((function(e){var n=e.paragraphStyle,a=e.paragraph.layout,r=t[t.length-1];r&&xe(r,e)?r.paragraphViewModels.push(e):t.push({paragraphStyle:n,paragraphLayout:a,topSpacing:e.sequenceSpaceTop||0,paragraphViewModels:[e]})})),t},xe=function(e,t){if(e.paragraphStyle!==t.paragraphStyle)return!1;if("PRE"===e.paragraphStyle){var n,a=!(null===(n=e.paragraphViewModels[0].paragraph)||void 0===n||!n.codeBlockMetadata);return!t.paragraph.codeBlockMetadata&&!a}var r=t.paragraph.layout;return"OUTSET_ROW"===e.paragraphLayout?"OUTSET_ROW_CONTINUE"===r:e.paragraphLayout===r},Te=function(e){var t=e.paragraphStyle,n=e.topSpacing,a=e.paragraphLayout,i=e.richTextStyle,o=e.paragraph;return function(e){var l={};switch(n&&(l.marginTop=(0,V.Fv)((function(e){var t=(0,r.A)(e,1)[0];return"".concat(t,"px")}),n)),t){case"BQ":var c=e.colorTokens.border.neutral.secondary.base||"";return Se(Se({},l),{},{boxShadow:"inset ".concat(3,"px 0 0 0 ").concat(c),paddingLeft:"".concat(23,"px"),marginLeft:(0,ve.GG)(i)?"0px":"-20px"});case"PRE":var u=null==o?void 0:o.codeBlockMetadata,d=Se(Se({},l),{},{overflowX:"auto",fontFamily:be.xG}),s={padding:"32px",borderRadius:"4px",border:"".concat(e.borderWidth,"px solid ").concat(e.colorTokens.border.neutral.tertiary.base),background:e.colorTokens.background.neutral.tertiary.base,color:e.colorTokens.foreground.neutral.primary.base},p={padding:"20px",borderRadius:0,border:"none",background:e.colorTokens.background.neutral.secondary.base,color:e.colorTokens.foreground.neutral.primary.base};return Se(Se({},d),u?s:p);case"PQ":return Se(Se({},l),{},{paddingLeft:"SERIES"===i?"0px":"30px"})}return"OUTSET_ROW"===a?Se(Se({},l),{},{display:"flex",flexDirection:"row"}):l}},Ie=function(e){var t=e.paragraphStyle,n=e.paragraphLayout;switch(t){case"OLI":return"ol";case"ULI":return"ul";case"BQ":case"PQ":return"blockquote";case"PRE":return"pre"}return"OUTSET_ROW"===n?"div":null}},18863:(e,t,n)=>{n.d(t,{C:()=>l});var a=n(96540),r=n(44402),i=n(80890),o=function(e){return{backgroundColor:e.colorTokens.background.neutral.secondary.base,padding:"2px 4px",fontSize:"75%","> strong":{fontFamily:"inherit"}}},l=function(e){var t=e.children,n=(0,r.l)();return a.createElement("code",{className:n([o,(0,i.WL)()])},t)}},4171:(e,t,n)=>{n.d(t,{q:()=>s,u:()=>f});var a=n(64467),r=n(80296),i=n(96540),o=n(16676);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u,d,s=i.createContext({updateHighlightSegments:function(){},highlightSegments:new Map}),p=function(){return new Map},m=function(e,t,n){var a=e.reduce((function(e,a){var r=t.get(a);if(!r||!r.startOffset&&0!==r.startOffset||!r.endOffset&&0!==r.endOffset)return e;if(!e||!e.startOffset&&0!==e.startOffset||!e.endOffset&&0!==e.endOffset)return r;var i=e.endOffset-e.startOffset,o=r.endOffset-r.startOffset;return r.userId===n&&e.userId!==n||i>o?r:e}),null);return a&&a.id},f=function(e){var t=e.children,n=e.highlights,a=e.paragraphs,l=e.viewer,f=n||[],g=i.useMemo((function(){return new Map(f.map((function(e){return[e.id,e]})))}),[f]),h=i.useMemo((function(){return new Map}),[]),v=i.useState(p),k=(0,r.A)(v,2),y=k[0],b=k[1],N=i.useContext(o._),S=N.activeSelection,E=N.setActiveSelection,O=function(e){var t=h.get(e);if(t){var n=Array.from(t).map((function(e){return y.get(e)})).filter(Boolean).reduce((function(e,t){if(!t.ref.current)return e;var n=t.ref.current.getBoundingClientRect(),a=n.left,r=n.top,i=n.right,o=n.bottom,l=a+window.pageXOffset,c=i+window.pageXOffset,u=r+window.pageYOffset,d=o+window.pageYOffset;return(!e.minLeft||l<e.minLeft)&&(e.minLeft=l),(!e.maxRight||c>e.maxRight)&&(e.maxRight=c),(!e.minTop||u<e.minTop)&&(e.minTop=u),(!e.maxTop||d<e.maxTop)&&(e.maxTop=d),e}),{});return{left:(n.minLeft+n.maxRight)/2,top:n.minTop,bottom:n.maxTop}}},w=function(e){if(e&&e.paragraphs&&(e.startOffset||0===e.startOffset)&&(e.endOffset||0===e.endOffset)){var t=a.find((function(t){var n=t.name;return e&&e.paragraphs[0].name===n}));return t?{isFocused:!1,selectedParagraph:t,highlightId:e.id,startOffset:e.startOffset,endOffset:e.endOffset,menuPosition:O(e.id)}:null}},x={highlightSegments:i.useMemo((function(){var e=new Map;return y.forEach((function(t,n){var a=t.highlightIds,r=function(){S&&S.isFocused||(d=function(){m(a,g,l&&l.id)&&(E(null),u=null,d=null)},u=setTimeout(d,100))},i=c(c({},t),{},{isActive:!!S&&t.highlightIds.includes(S.highlightId),onClick:function(){var e=document.getSelection();if(!e||"Range"!==e.type){var t=m(a,g,l&&l.id),n=g.get(t||""),r=w(n);r&&setTimeout((function(){E(c(c({},r),{},{isFocused:!0}));var e=document.documentElement&&"ontouchstart"in document.documentElement?"touchstart":"click";document.addEventListener(e,(function t(){E(null),document.removeEventListener(e,t)}))}))}}});document.documentElement&&!("ontouchstart"in document.documentElement)&&(i.onMouseEnter=function e(){if(!S||!S.isFocused){u&&d&&(clearTimeout(u),d());var t=m(a,g,l&&l.id),n=g.get(t||""),i=w(n);i&&E(c(c({},i),{},{isFocused:!1,menuMouseEnter:e,menuMouseLeave:r}))}},i.onMouseLeave=r),e.set(n,i)})),e}),[y,g,l,S]),updateHighlightSegments:function(e,t){var n=t.highlightIds,a=t.ref;b((function(t){var r=new Map(t);return r.set(e,{isActive:!!S&&n.includes(S.highlightId),highlightIds:n,ref:a,viewerIsOwner:n.some((function(e){var t=g.get(e);return l&&t&&t.userId===l.id}))}),r})),n.forEach((function(t){var n=h.get(t);n||(n=new Set),n.add(e),h.set(t,n)}))}};return i.createElement(s.Provider,{value:x},t)}},73711:(e,t,n)=>{n.d(t,{O:()=>q});var a=n(45458),r=n(96540),i=n(14596),o=n(42976),l=[o.FU.PQ,o.FU.H4],c=n(44402),u=n(39160),d=n(79959),s=n(61215),p=function(e,t){var n="Kicker"===e||function(e,t){return["Title"].concat((0,a.A)(l)).includes(e)&&("CARD"===t||"INLINE"===t&&"Title"===e)}(e,t)?"none":"underline";return{color:"inherit",textDecoration:n}},m=function(e){var t=e.href,n=e.children,a=e.paragraphStyle,o=e.richTextStyle,l=(0,c.l)(),m=(0,u.d4)((function(e){return e.config.authDomain}));if(!(0,s.M)(t))return n;var f=!(0,d.mk)(t,m);return"STREAM"===o?r.createElement("span",{className:l(p(a,o))},n):r.createElement(i.M,{href:t,className:l(p(a,o)),target:f?"_blank":void 0,disableSourceParam:!0},n)},f=n(18863),g=n(64467),h=n(90280),v=n(20239),k=n(89796),y=n(90383);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}var N=3,S=function(e,t){return{display:"block",float:"left",height:"".concat(t,"px"),marginRight:"12px",position:"relative",width:"".concat(e,"px")}},E=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,g.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({maxWidth:"100%",marginTop:{xs:"-2px",sm:"-2px",md:"11px",lg:"11px",xl:"11px"}},(0,k.u)());function O(e){var t=e.children,n=e.image,a=e.text,i=(0,c.l)(),o=(0,v.D)();if(!n||!n.originalWidth||!n.originalHeight)return r.createElement(r.Fragment,null,t);var l=o.newFonts.body.lineHeight.S*N-5,u=n.originalHeight,d=l*(n.originalWidth/u);return r.createElement("span",{className:i(S(d,l))},r.createElement(h.pg,{alt:a,miroId:n.id,rules:[E],strategy:y.qY.Resample,height:l,width:d,freezeGifs:!1}),t)}function w(e){var t,n=(0,c.l)(),a=e.image,i=e.text;return r.createElement(O,e,r.createElement("span",{className:n((t=!!a,{display:"block",float:"left",fontSize:"66px",lineHeight:".83",marginRight:"12px",paddingTop:{xs:"0",sm:"0",md:"7px",lg:"7px",xl:"7px"},position:"relative",opacity:t?"0":null}))},i))}var x=n(49728),T=function(e){switch(e){case"P":case"OLI":case"ULI":case"BQ":case"PRE":return"italic"===(0,x.Vs)(e)?{fontStyle:"normal"}:{fontStyle:"italic"};default:return{fontStyle:"inherit"}}},I=function(e){var t=e.children,n=e.paragraphStyle,a=(0,c.l)();return r.createElement("em",{className:a(T(n))},t)},P=/[\r\n↵]/,R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split(P);if(n.length<=1)return e;if(1===e.length&&""===n[0]&&""===n[1])return r.createElement("br",{key:"".concat(t)});""===n[n.length-1]&&n.pop();var a=[];return n.forEach((function(e){a.push(e),a.push("br")})),P.test(e[e.length-1])||a.pop(),r.createElement(r.Fragment,null,a.map((function(e,n){return n%2==0?e||null:r.createElement("br",{key:"".concat(t).concat(n)})})))},A=n(4171),D=function(e,t){return function(n){return{backgroundColor:e&&n.colorTokens.background.accent.secondary.base||t&&n.colorTokens.background.accent.tertiary.base||n.colorTokens.background.accent.quaternary.base,color:"currentColor",cursor:"pointer"}}},C=function(e){var t=e.children,n=e.highlightIds,a=e.segmentId,i=(0,c.l)(),o=r.useRef(null),l=n.some((function(e){return"private-note-selection"===e})),u=r.useContext(A.q),d=u.highlightSegments,s=u.updateHighlightSegments,p=d.get(a),m=p||{},f=m.isActive,g=m.viewerIsOwner,h=m.onClick,v=m.onMouseEnter,k=m.onMouseLeave;return r.useEffect((function(){l||p&&p.ref&&p.ref.current&&n.length===p.highlightIds.length&&n.every((function(e){return p.highlightIds.includes(e)}))||s(a,{highlightIds:n,ref:o})}),[n,o]),r.createElement("mark",{className:i(D(f||l,!!g)),onClick:h,onMouseEnter:v,onMouseLeave:k,ref:o},t)},M=r.memo(C),L=n(60602),F=n(80890),j=function(e,t){return function(n){switch(e){case"P":case"BQ":case"OLI":case"ULI":return t?(0,F.or)()(n):{fontFamily:n.newFonts.body.family,fontWeight:n.newFonts.body.boldWeight};case"PRE":return(0,F.qy)()(n);case"IMG":return{fontFamily:n.newFonts.detail.family,fontWeight:n.newFonts.detail.boldWeight};default:return{fontWeight:"inherit"}}}},H=function(e){var t=e.children,n=e.paragraphStyle,a=(0,c.l)(),i=r.useContext(L.a).threadDepthOnPage;return r.createElement("strong",{className:a(j(n,!!i))},t)},_=n(29977),V=function e(t){var n=t.data,a=t.prefix,i=t.paragraphStyle,o=t.richTextStyle;if("string"==typeof n)return R(n,a);var l=n.children.map((function(t,n){return"string"==typeof t?R(t,"".concat(a).concat(n)):r.createElement(e,{key:n,data:t,paragraphStyle:i,prefix:"".concat(a).concat(n),richTextStyle:o})}));switch(n.type){case"A":return r.createElement(m,{href:n.href,paragraphStyle:i,richTextStyle:o},l);case"CODE":return"PRE"===i?r.createElement(r.Fragment,null,l):r.createElement(f.C,null,l);case"DROPCAP":var c=l[0];return c&&"string"==typeof c?"BQ"===i||"PQ"===i?c:r.createElement(w,{text:c,image:n.dropCapImage}):null;case"EM":return r.createElement(I,{paragraphStyle:i},l);case"QUOTE":return r.createElement(M,{highlightIds:n.highlightIds,segmentId:n.segmentId,key:n.segmentId},l);case"STRONG":return r.createElement(H,{paragraphStyle:i},l);case"USER_MENTION":return r.createElement(_.M,{popoverTag:"span",userId:n.userId,richTextStyle:o},l);case"HLJS_MARKUP":return r.createElement("span",{className:"hljs-"+n.className},l);default:return null}},B=r.memo(V),U="ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƏǺǼǾȘȚẀẂẄẞỲΩ∆",W="abcdefghijklmnopqrstuvwxyzµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſǻǽǿșțȷəẁẃẅỳ",G=new RegExp("^["+U+"]["+W+"\\,\\.](?= )|^["+U+"](?=["+W+"])|^[’‘“„”]?["+U+"]|^[0-9]{1,4}\\.?(?![0-9])"),Q=function(e){var t=e.highlights,n=e.paragraph,a=e.paragraphStyle,i=e.richTextStyle,o=e.allowDropCap,l=void 0!==o&&o,c=e.hljsMarkups;return Y(n,i,l,t||[],c).map((function(e,t){return r.createElement(B,{key:t,data:e,paragraphStyle:a,prefix:t.toString(),richTextStyle:i})}))},q=r.memo(Q),z=function(e){return null!=e.type&&null!=e.start&&null!=e.end},X=function(e,t){var n={COMMENT:1,HIGHLIGHT:2,FULL_HIGHLIGHT:3,HIGHLIGHT_SEGMENT:4,QUOTE:5,QUERY:6,CODE:7,A:8,STRONG:9,EM:10,WARNING:11,DROPCAP:12,UNUSED_DETAIL:14,SENTENCE_DEPRECATED:15,HLJS_MARKUP:16};if(null==e.type||null==e.start||null==e.end||null==t.type||null==t.start||null==t.end)throw new Error("Comparing markups requires type, start, and end fields.");var a=n[e.type]-n[t.type];if(0!==a)return a;if("HLJS_MARKUP"===e.type&&"HLJS_MARKUP"===t.type){var r=e.priority-t.priority;if(0!==r)return r}if(0!=(a=e.start-t.start))return a;if(0!=(a=e.end-t.end))return a;var i=JSON.stringify(e),o=JSON.stringify(t);return i>o?1:i<o?-1:0},Y=function(e,t,n,r,i){var o=e.dropCapImage,l=[],c=function(e,t,n,r,i){var o=e.hasDropCap,l=e.text;if(!l)return[];var c=n&&("FULL_PAGE"===t||"INLINE"===t)&&o,u=e.text?e.text.length:0,d=r.map((function(t){return{type:"FULL_HIGHLIGHT",highlightId:t.id,start:t.startOffset||0,end:t.paragraphs[0].name===e.name&&t.endOffset||u-1}})),s=void 0!==i?[].concat((0,a.A)(d),(0,a.A)(i)).filter(z):[].concat((0,a.A)(e.markups),(0,a.A)(d)).filter(z),p=new Set;p.add(0),p.add(l.length),s.forEach((function(e){p.add(e.start),p.add(e.end)}));var m=[];if(s.slice().sort(X).forEach((function(e){m.push(e)})),c){var f=function(e){if(!e)return"";var t=G.exec(e),n=t?t[0]:"";return n.length>=e.trim().length?"":n}(e.text);f.length>0&&(p.add(f.length),m.unshift({type:"DROPCAP",start:0,end:f.length}))}var g=Array.from(p).sort((function(e,t){return e-t})),h=g.map((function(e,t){var n;return{point:e,markups:m.filter((function(t){return t.start<=e&&t.end>e})).reduce((function(a,r){return"FULL_HIGHLIGHT"===r.type?(n||(n={type:"HIGHLIGHT_SEGMENT",highlightIds:[],start:e,end:g[t]-1},a.push(n)),n.highlightIds.push(r.highlightId)):a.push(r),a}),[])}}));if(c){var v=h[0].markups.filter((function(e){return"DROPCAP"===e.type}));if(v.length>0){var k=v[0];h[0].markups=[k]}}return h}(e,t,n,r,i),u=[],d=[];return c.forEach((function(t,n){var a=t.point,r=t.markups,i=(c[n+1]||c[c.length-1]).point,s=(e.text||"").slice(a,i);u=d,d=[];var p=!1,m=l,f=function(e){d.push(e);var t=e.markupNodeData;"string"!=typeof t&&(m=t.children)};r.forEach((function(t,n){var a=u[n];if(!p&&a&&a.markup===t)f({markup:t,markupNodeData:a.markupNodeData});else{p=!0;var r=Z(t,o,e);r&&(m.push(r),f({markup:t,markupNodeData:r}))}})),m.push(s)})),l},Z=function(e,t,n){switch(e.type){case"A":return"LINK"!==e.anchorType&&e.anchorType?"USER"===e.anchorType&&e.userId?{type:"USER_MENTION",userId:e.userId,children:[]}:null:e.href?{type:"A",href:e.href,children:[]}:null;case"CODE":return{type:"CODE",children:[]};case"DROPCAP":return{type:"DROPCAP",dropCapImage:t,children:[]};case"EM":return{type:"EM",children:[]};case"STRONG":return{type:"STRONG",children:[]};case"HIGHLIGHT":return{type:"QUOTE",highlightIds:[],segmentId:"".concat(n.name||"","_").concat(e.start),children:[]};case"HIGHLIGHT_SEGMENT":return{type:"QUOTE",highlightIds:e.highlightIds,segmentId:"".concat(n.name||"","_").concat(e.start),children:[]};case"HLJS_MARKUP":return{type:"HLJS_MARKUP",className:e.className,children:[]};default:return null}}},15324:(e,t,n)=>{n.d(t,{F:()=>me});var a=n(45458),r=n(80296),i=n(96540),o=n(98503),l=n(75121),c=n(19),u=n(69733),d=n(91271),s=n(67476),p=n(18677),m=n(64467),f=n(5249),g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteDeleteMutation"},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:"targetNoteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteNote"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetNoteId"},value:{kind:"Variable",name:{kind:"Name",value:"targetNoteId"}}}]}]}}]},h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NoteDeleteMutation_postNotes"},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:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"privateNotes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]};function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,m.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=(0,u.Ng)()((function(e){var t=e.children,n=e.onCompleted,a=e.targetPostId,r=e.targetNoteId;return i.createElement(f.s,{mutation:g,onCompleted:n,optimisticResponse:{deleteNote:!0},update:function(e){var t=e.readQuery({query:h,variables:{postId:a}}),n={post:k(k({},t.post),{},{privateNotes:t.post.privateNotes.filter((function(e){return e.id!==r}))})};e.writeQuery({query:h,variables:{postId:a},data:n})},variables:{targetPostId:a,targetNoteId:r}},(function(e){return t({mutate:e})}))})),b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteDismissMutation"},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:"targetNoteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dismissNote"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetNoteId"},value:{kind:"Variable",name:{kind:"Name",value:"targetNoteId"}}}]}]}}]},N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NoteDismissMutation_postNotes"},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:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"privateNotes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]};function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,m.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=(0,u.Ng)()((function(e){var t=e.children,n=e.onCompleted,a=e.targetPostId,r=e.targetNoteId;return i.createElement(f.s,{mutation:b,onCompleted:n,optimisticResponse:{dismissNote:!0},update:function(e){var t=e.readQuery({query:N,variables:{postId:a}}),n={post:E(E({},t.post),{},{privateNotes:t.post.privateNotes.filter((function(e){return e.id!==r}))})};e.writeQuery({query:N,variables:{postId:a},data:n})},variables:{targetPostId:a,targetNoteId:r}},(function(e){return t({mutate:e})}))})),w=[{kind:"FragmentDefinition",name:{kind:"Name",value:"NoteReplyCreateMutation_privateNoteReply"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"NoteReply"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"noteId"}},{kind:"Field",name:{kind:"Name",value:"author"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"postId"}}]}}],x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteReplyCreateMutation"},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:"targetNoteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"replyContent"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createNoteReply"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetNoteId"},value:{kind:"Variable",name:{kind:"Name",value:"targetNoteId"}}},{kind:"Argument",name:{kind:"Name",value:"replyContent"},value:{kind:"Variable",name:{kind:"Name",value:"replyContent"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NoteReplyCreateMutation_privateNoteReply"}}]}}]}}].concat((0,a.A)(w))},T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NoteReplyCreateMutation_postNotes"},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:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"privateNotes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"replies"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NoteReplyCreateMutation_privateNoteReply"}}]}}]}}]}}]}}].concat((0,a.A)(w))};function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){(0,m.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=function(e){var t=e.children,n=e.targetPostId,r=e.targetNoteId;return i.createElement(f.s,{mutation:x,update:function(e,t){var i=e.readQuery({query:T,variables:{postId:n}}),o=i.post.privateNotes.map((function(e){return e.id!==r?e:P(P({},e),{},{replies:[].concat((0,a.A)(e.replies),[t.data.createNoteReply])})})),l={post:P(P({},i.post),{},{privateNotes:o})};e.writeQuery({query:T,variables:{postId:n},data:l})}},(function(e){return t({mutate:function(t){return e(P(P({},t),{},{variables:P({targetPostId:n,targetNoteId:r},t&&t.variables)}))}})}))},A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteReplyDeleteMutation"},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:"targetNoteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetReplyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteNoteReply"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetPostId"},value:{kind:"Variable",name:{kind:"Name",value:"targetPostId"}}},{kind:"Argument",name:{kind:"Name",value:"targetNoteId"},value:{kind:"Variable",name:{kind:"Name",value:"targetNoteId"}}},{kind:"Argument",name:{kind:"Name",value:"targetReplyId"},value:{kind:"Variable",name:{kind:"Name",value:"targetReplyId"}}}]}]}}]},D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PostNotesReplies"},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:"post"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"privateNotes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"replies"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]};function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,m.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L,F=function(e){var t=e.children,n=e.targetPostId,a=e.targetNoteId,r=e.targetReplyId;return i.createElement(f.s,{mutation:A,optimisticResponse:{deleteNoteReply:!0},update:function(e){var t=e.readQuery({query:D,variables:{postId:n}}),i=t.post.privateNotes.map((function(e){return e.id!==a?e:M(M({},e),{},{replies:e.replies.filter((function(e){return e.id!==r}))})})),o={post:M(M({},t.post),{},{privateNotes:i})};e.writeQuery({query:D,variables:{postId:n},data:o})},variables:{targetPostId:n,targetNoteId:a,targetReplyId:r}},(function(e){return t({mutate:e})}))},j=n(95420),H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteReplyReportMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reportNoteReply"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetNoteReplyId"},value:{kind:"Variable",name:{kind:"Name",value:"targetId"}}}]}]}}]},_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NoteReportMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reportNote"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetNoteId"},value:{kind:"Variable",name:{kind:"Name",value:"targetId"}}}]}]}}]},V=n(27399),B=n(52764),U=n(86329),W=n(23393),G=n(52290),Q=n(86527),q=n(85864),z=n(46445),X=n(36557),Y=n(91830),Z=n(39160),K=n(46879),J=function(e){var t=e.timestamp;return t?n.g.Date.now()-t<864e5?i.createElement(p.f,{timestamp:t}):i.createElement(d.n9,{timestamp:t}):null},$=function(e){var t=(0,Z.d4)((function(e){return e.config.authDomain})),n=e.author,a=e.content,o=e.createdAt,l=e.id,c=e.isNote,u=e.onDelete,d=e.onReportError,p=function(e){var t=e.onError,n=e.targetId;return(0,j.n)(H,{onError:t,variables:{targetId:n},optimisticResponse:{reportNoteReply:!0}})}({onError:d,targetId:l}),m=function(e){var t=e.onCompleted,n=e.onError,a=e.targetId;return(0,j.n)(_,{onCompleted:t,onError:n,optimisticResponse:{reportNote:!0},variables:{targetId:a}})}({onError:d,targetId:l});if(!n)return null;var f=c?m:p,g=(0,r.A)(f,2),h=g[0],v=g[1],k=v.called,y=v.error,b=v.loading;return y&&d(),i.createElement(B.c,{nonBlocking:!0},(function(e){return i.createElement(G.a,{padding:"12px 0"},i.createElement(G.a,{display:"flex",alignItems:"center",marginBottom:"12px"},i.createElement(G.a,{marginRight:"12px"},i.createElement(W.H8,{scale:"XS",user:n,link:!0})),i.createElement(G.a,{flexGrow:"1",flexShrink:"1"},i.createElement(X.kZ,{scale:"M",tag:"h4",color:"DARKER",clamp:1},i.createElement(Q.N,{href:(0,K.EpC)(n,t),inline:!0},n.name)),i.createElement(X.kZ,{scale:"M"},i.createElement(J,{timestamp:o}))),e&&e.id===n.id&&i.createElement(G.a,{alignSelf:"flex-start",marginLeft:"12px"},i.createElement(X.kZ,{scale:"M",tag:"div"},i.createElement(Q.N,{linkStyle:"SUBTLE",onClick:u},"Delete"))),e&&e.id!==n.id&&i.createElement(G.a,{alignSelf:"flex-start"},i.createElement(X.kZ,{scale:"M",tag:"div"},i.createElement(q.B,null,(function(e){var t=e.isVisible,n=e.show,a=e.hide;return i.createElement(G.a,null,i.createElement(z.T,{confirmText:"Report",hide:a,isVisible:t,onConfirm:h,titleText:"Confirm",isDestructiveAction:!0},"Are you sure you want to report this note?"),i.createElement(Q.N,{linkStyle:"SUBTLE",onClick:n,disabled:k||b},k?"Reported":"Report"))}))))),i.createElement(G.a,{whiteSpace:"pre-wrap"},i.createElement(X.kZ,{scale:"M",tag:"span",color:"DARKER"},i.createElement(s.O,{target:"_blank",wrapLinks:!0},a))))}))},ee=function(e){var t=e.note,n=e.exitReplyingMode;return i.createElement(G.a,{padding:"12px 0"},i.createElement(R,{targetPostId:t.postId,targetNoteId:t.id},(function(e){var t=e.mutate;return i.createElement(V.P,{onSubmit:function(e){t({variables:{replyContent:e}}),n()},onCancel:n})})))},te=function(e){var t=e.note,n=e.isReplyingMode,a=e.exitReplyingMode,r=e.dispatch,o=t.replies;return 0!==o.length||n?i.createElement(G.a,{tag:"ol",marginLeft:"20px"},o.map((function(e){return i.createElement("li",{key:e.id},i.createElement(F,{targetPostId:e.postId,targetNoteId:e.noteId,targetReplyId:e.id},(function(t){var n=t.mutate;return i.createElement($,{author:e.author,content:e.content,createdAt:e.createdAt,onDelete:function(){n(),r((0,Y.MZ)({duration:5e3,message:"The reply has been deleted."}))},id:e.id,isNote:!1,onReportError:function(){r((0,Y.MZ)({duration:5e3,toastStyle:"ERROR",message:"An error occurred while reporting this reply."}))}})})))})),n&&i.createElement("li",{key:"reply-new"},i.createElement(ee,{note:t,exitReplyingMode:a}))):null},ne=(0,u.Ng)()((function(e){var t,n=e.isLast,a=e.isReplyingMode,r=e.onReplyClick,l=e.note,c=e.dispatch,u=e.viewer,d=(0,o.v)().setPrivateNoteSelection,s=(0,U.J)(null===(t=l.post)||void 0===t?void 0:t.collection).viewerEdge;if(!u||!l.post)return null;var p=!a,m=l.post.creator&&l.post.creator.id&&l.post.creator.id===u.id||(null==s?void 0:s.isEditor),f=p&&i.createElement(X.kZ,{scale:"M",tag:"div"},i.createElement(Q.N,{linkStyle:"OBVIOUS",onClick:r},"Reply")),g=m&&i.createElement(O,{targetPostId:l.postId,targetNoteId:l.id},(function(e){var t=e.mutate;return i.createElement(G.a,{flexGrow:"1",flexShrink:"1",textAlign:"right"},i.createElement(X.kZ,{scale:"M",tag:"span"},i.createElement(Q.N,{linkStyle:"SUBTLE",onClick:function(){t(),d(null),c((0,Y.MZ)({duration:5e3,message:"The note has been dismissed."}))}},"Dismiss note")))}));return f||g||!n?i.createElement(G.a,{display:"flex",borderTop:"neutral.primary",padding:"12px 0",marginTop:"8px",marginBottom:n?"0":"16px"},f,g):null})),ae=(0,u.Ng)()((function(e){var t=e.dispatch,n=e.isLast,a=e.paragraph,l=e.note,c=i.useState(!1),u=(0,r.A)(c,2),d=u[0],s=u[1],p=(0,o.v)().setPrivateNoteSelection;return i.useEffect((function(){if((l.selectionStartOffset||0===l.selectionStartOffset)&&(l.selectionEndOffset||0===l.selectionEndOffset))return p({id:"private-note-selection",paragraphs:[a],userId:null,startOffset:l.selectionStartOffset,endOffset:l.selectionEndOffset,user:void 0}),function(){return p(null)}}),[]),i.createElement(G.a,{padding:"0 20px"},i.createElement(y,{targetPostId:l.postId,targetNoteId:l.id},(function(e){var n=e.mutate;return i.createElement($,{author:l.author,createdAt:l.createdAt,content:l.content,id:l.id,isNote:!0,onDelete:function(){n(),p(null),t((0,Y.MZ)({duration:5e3,message:"The note has been deleted."}))},onReportError:function(){t((0,Y.MZ)({duration:5e3,toastStyle:"ERROR",message:"An error occurred while reporting this note."}))}})})),i.createElement(te,{note:l,isReplyingMode:d,exitReplyingMode:function(){s(!1)},dispatch:t}),i.createElement(B.c,{nonBlocking:!0},(function(e){return i.createElement(ne,{note:l,viewer:e,isLast:n,isReplyingMode:d,onReplyClick:function(){return s(!0)}})})))})),re=n(84569),ie=n(28993),oe=n(72130),le=n(44402);function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ce.apply(null,arguments)}const ue=function(e){return i.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",width:19,height:19},e),L||(L=i.createElement("path",{fillRule:"evenodd",d:"M14.78 8.07a8.7 8.7 0 0 0-.427-1.383.48.48 0 0 0-.584-.27l-3.12.77V4.034c0-.247-.19-.48-.43-.5a7.2 7.2 0 0 0-1.38 0c-.24.02-.43.253-.43.5V7.19L5.3 6.415a.48.48 0 0 0-.583.27q-.271.673-.426 1.383c-.05.24.1.5.32.58l3.06.754-1.98 2.956c-.14.196-.13.502.04.67.34.332.7.632 1.09.896.2.136.49.077.63-.117l2.09-3.114 2.09 3.112c.15.193.43.252.63.116.39-.26.75-.56 1.09-.89.17-.17.19-.47.04-.67L11.4 9.41l3.06-.76a.52.52 0 0 0 .32-.58"})))};var de=n(60603),se={float:"right",position:"relative",width:"0",height:"0"},pe={position:"absolute",left:0,top:0,fontSize:0,lineHeight:0,userSelect:"none","-webkit-user-select":"none"},me=function(e){var t=e.paragraph,n=e.privateNotes,u=(0,le.l)(),d=(0,oe.$L)(),s=(0,o.v)(),p=s.openPrivateNoteId,m=s.setOpenPrivateNoteId,f=s.privateNoteSelection,g=s.setPrivateNoteSelection,h=n.map((function(e){return e.id})),v=i.useMemo((function(){return new Set(h)}),[h]),k=i.useRef(null),y=(0,de.e)(!1),b=(0,r.A)(y,4),N=b[0],S=b[1],E=b[2],O=b[3];if(i.useEffect((function(){p&&v.has(p)&&!N&&k.current&&(S(),window.scrollTo({top:k.current.offsetTop}))}),[p]),!n||0===n.length)return null;var w=n[0].postId,x=Math.min.apply(Math,(0,a.A)(n.map((function(e){var t;return null!==(t=e.selectionStartOffset)&&void 0!==t?t:0})))),T=Math.max.apply(Math,(0,a.A)(n.map((function(e){var t;return null!==(t=e.selectionEndOffset)&&void 0!==t?t:0}))));return i.createElement("span",{className:u(se),ref:k},i.createElement(c.K,{isVisible:N,hide:function(){m(null),E()},popoverRenderFn:function(){return i.createElement(l.h,null,n.map((function(e,a){return i.createElement(ae,{isLast:a===n.length-1,key:e.id,note:e,paragraph:t})})))}},i.createElement("span",{className:u(pe)},i.createElement(re.h,{onMouseEnter:function(){g({id:"private-note-hover",paragraphs:[t],userId:null,startOffset:x,endOffset:T,user:void 0})},onMouseLeave:function(){"private-note-hover"===(null==f?void 0:f.id)&&g(null)}},i.createElement(ie.P,{onClick:function(){O(),d.event("notes.ui.showNotes",{postId:w,noteIds:h})}},i.createElement(ue,{"aria-label":"View ".concat(n.length," Private Notes")}))))))}},75121:(e,t,n)=>{n.d(t,{h:()=>m});var a,r=n(96540),i=n(19228),o=n(52290),l=n(86527),c=n(33154),u=n(36557);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}const s=function(e){return r.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:19,height:19},e),a||(a=r.createElement("path",{fillRule:"evenodd",d:"M14 14.052a1 1 0 0 1-.992.998H5.992A.99.99 0 0 1 5 14.052v-4.004a1 1 0 0 1 .992-.998h7.016a.99.99 0 0 1 .992.998zM7 5.445C7 4.187 8.114 3.15 9.5 3.15S12 4.19 12 5.445V8.05H7zm6.008 2.605H13V5.445c0-1.822-1.578-3.295-3.5-3.295C7.577 2.15 6 3.618 6 5.445V8.05h-.008A2 2 0 0 0 4 10.048v4.004a1.99 1.99 0 0 0 1.992 1.998h7.016A2 2 0 0 0 15 14.052v-4.004a1.99 1.99 0 0 0-1.992-1.998"})))};var p=n(46879),m=function(e){return r.createElement(i.Cq,null,r.createElement(o.a,{width:"400px",backgroundColor:"BACKGROUND"},r.createElement(o.a,{backgroundColor:"BASE_DARK",padding:"12px 20px",display:"flex",alignItems:"center"},r.createElement(o.a,{marginLeft:"-4px",marginRight:"8px"},r.createElement(s,null)),r.createElement(o.a,{flexGrow:"1",flexShrink:"1",position:"relative",top:"1px"},r.createElement(c.bz,{tag:"h4"},r.createElement(u.kZ,{scale:"S",tag:"span",color:"DARKER"},"Private Notes"))),r.createElement(o.a,{position:"relative",top:"1px"},r.createElement(u.kZ,{scale:"S",color:"DARKER"},r.createElement(l.N,{href:(0,p.$Jl)(),inline:!0,target:"_blank",linkStyle:"SUBTLE"},"Learn more")))),e.children))}},19:(e,t,n)=>{n.d(t,{K:()=>p});var a=n(58168),r=n(80296),i=n(96540),o=n(51036),l=n(33781),c=n(24252),u=n(44402),d=function(e){return{background:e.backgroundColor,boxSizing:"border-box",border:"1px solid ".concat(e.colorTokens.border.neutral.primary.base),borderRadius:"".concat(e.borderRadius.regular,"px"),boxShadow:"0 1px 4px ".concat(e.colorTokens.border.neutral.primary.base),maxHeight:"100vh",overflowY:"auto"}},s=function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},p=function(e){var t=e.boundariesElement,n=void 0===t?"viewport":t,p=e.children,m=e.popoverRenderFn,f=e.isVisible,g=e.hide,h=e.placement,v=void 0===h?"right-start":h,k=e.referenceHeight,y=e.reference,b=(0,u.l)(),N={display:"block",height:k},S=i.useState(null),E=(0,r.A)(S,2),O=E[0],w=E[1],x=i.useState(null),T=(0,r.A)(x,2),I=T[0],P=T[1],R=i.useCallback((function(e){return w(e)}),[]),A=i.useCallback((function(e){return P(e)}),[]),D=(0,o.E)(y||O,I,{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{altAxis:!0,rootBoundary:n,padding:15}}],placement:v}),C=D.styles,M=D.attributes,L=D.update,F=i.createElement(l.i,{disableOverlay:!1,onClick:function(e){return(0,c.D)(g,e)},onKeyDown:function(e){return(0,c.x)(g,e)}},i.createElement("div",{onClick:s},i.createElement("div",(0,a.A)({ref:A,style:C.popper,className:b(d)},M.popper),i.createElement("div",null,m(L)))));return i.createElement(i.Fragment,null,y?p:i.createElement("span",{ref:R,className:b(N)},p),f?F:null)}},27399:(e,t,n)=>{n.d(t,{P:()=>y,b:()=>v});var a=n(58168),r=n(80296),i=n(96540),o=n(79766),l=n(52764),c=n(23393),u=n(52290),d=n(86527),s=n(36557),p=n(39),m=n(44402),f={border:"none",display:"block",resize:"none",width:"100%",":focus":{outline:"none"}},g=function(e){var t=e.onSubmit,n=e.onCancel,a=e.thresholdMaxChars,g=e.thresholdCharsShowIndicator,h=e.placeholderText,v=e.numTextAreaLines,k=(0,m.l)(),y=i.useState(""),b=(0,r.A)(y,2),N=b[0],S=b[1],E=i.useRef(null);i.useEffect((function(){E.current&&"function"==typeof E.current.focus&&setTimeout((function(){E.current&&E.current.focus()}))})),(0,o.c)({disabled:!N,message:"Note input not empty"});var O=function(e){var t=e.target.value;S(t)},w=(0,p.Z)({name:"detail",scale:"M",color:"DARKER"});return i.createElement(l.c,null,(function(e){return!!e&&i.createElement(u.a,null,i.createElement(u.a,{display:"flex",alignItems:"center",marginBottom:"12px"},i.createElement(u.a,{marginRight:"12px"},i.createElement(c.H8,{scale:"XS",user:e})),i.createElement(s.kZ,{scale:"M",tag:"h5",color:"DARKER",clamp:1},e&&e.name||"")),i.createElement(u.a,{marginBottom:"12px",tag:"label"},i.createElement("textarea",{ref:E,required:!0,placeholder:h,value:N,rows:v,onChange:O,className:k([w,f])}),N.length>=g&&i.createElement(u.a,{marginTop:"4px"},i.createElement(s.kZ,{scale:"XS",color:N.length>a?"ERROR":"LIGHTER"},N.length,"/",a))),i.createElement(s.kZ,{scale:"M",tag:"div"},i.createElement(u.a,{display:"flex",justifyContent:"space-between"},i.createElement(u.a,{display:"flex"},i.createElement(d.N,{disabled:0===N.length||N.length>a,linkStyle:"OBVIOUS",onClick:function(){t(N)}},"Send")),i.createElement(u.a,{display:"flex"},i.createElement(d.N,{linkStyle:"SUBTLE",onClick:n},"Cancel")))))}))},h={thresholdMaxChars:400,thresholdCharsShowIndicator:255,placeholderText:"Write a note…",numTextAreaLines:5},v=function(e){return i.createElement(g,(0,a.A)({},h,e))},k={thresholdMaxChars:200,thresholdCharsShowIndicator:133,placeholderText:"Leave a reply…",numTextAreaLines:3},y=function(e){return i.createElement(g,(0,a.A)({},k,e))}},86322:(e,t,n)=>{function a(e){e&&e.iframe&&e.height&&e.iframe.getAttribute&&"number"==typeof e.height&&o({context:"iframe.resize",height:e.height,src:e.iframe.getAttribute("src")||""})}function r(e){if(e.data&&"string"==typeof e.data){var t;try{t=JSON.parse(e.data)}catch(e){return}o(t,e.source)}}n.d(t,{u:()=>l});var i=[];function o(e,t){i.forEach((function(n){return n(e,t)}))}function l(e){return window._resizeIframe||(window._resizeIframe=a,window.addEventListener("message",r)),i.push(e),{destructor:function(){0===(i=i.filter((function(t){return e!==t}))).length&&"undefined"!=typeof window&&(window._resizeIframe=null,window.removeEventListener("message",r))}}}},64373:(e,t,n)=>{n.d(t,{q:()=>l,Y:()=>o});var a=n(45458),r=n(66496),i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CatalogMixtapeParagraph_catalog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EmbedCatalog_catalog"}}]}}].concat((0,a.A)(r.V.definitions))},o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"MixtapeParagraph_paragraph"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Paragraph"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"mixtapeMetadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"href"}},{kind:"Field",name:{kind:"Name",value:"mediaResource"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mediumCatalog"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"GenericMixtapeParagraph_paragraph"}}]}}].concat((0,a.A)([{kind:"FragmentDefinition",name:{kind:"Name",value:"GenericMixtapeParagraph_paragraph"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Paragraph"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"text"}},{kind:"Field",name:{kind:"Name",value:"mixtapeMetadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"href"}},{kind:"Field",name:{kind:"Name",value:"thumbnailImageId"}}]}},{kind:"Field",name:{kind:"Name",value:"markups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"href"}}]}}]}}]))},l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CatalogMixtapeParagraphQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"catalogId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"catalogById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"catalogId"},value:{kind:"Variable",name:{kind:"Name",value:"catalogId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CatalogMixtapeParagraph_catalog"}}]}}]}}]}}].concat((0,a.A)(i.definitions))}},45639:(e,t,n)=>{n.d(t,{i:()=>ae,_:()=>ne});var a=n(80296),r=n(36944),i=n.n(r),o=n(96540),l=n(2680),c=n(73711),u=n(64467),d=function e(t){return"string"==typeof t?t.length:t.children.reduce((function(t,n){return t+e(n)}),0)};function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,u.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m,f=function e(t,n,a){var r=[],i=n;return t.forEach((function(t){var n=d(t),o=function(e){if("string"!=typeof e)return{type:"HLJS_MARKUP",start:0,end:d(e),className:e.scope,priority:1}}(t);if(o){var l=function(e,t){return p(p({},e),{},{start:t,end:t+(e.end-e.start)})}(o,i),c=function(e,t){return p(p({},e),{},{priority:t})}(l,a);r.push(c)}"string"!=typeof t&&(r=r.concat(e(t.children,i,a+1))),i+=n})),r},g=n(15324),h=n(39),v=n(44402),k={xs:"S",sm:"S",md:"SM",lg:"SM",xl:"SM"},y=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.rules,i=e.richTextStyle,l=(0,v.l)(),c="FULL_PAGE"===i||"CARD"===i||"INLINE"===i?k:"S",u=l([r,{wordBreak:"break-word"},(0,h.Z)({name:"body",scale:c})]);return o.createElement("p",{id:a,className:u,ref:t},n)})),b=n(42976),N={card:{xs:"S",sm:"S",md:"M",lg:"M",xl:"M"},fullPage:{xs:"M",sm:"M",md:"L",lg:"L",xl:"L"},streamLike:"M"},S={card:{xs:"XS",sm:"XS",md:"S",lg:"S",xl:"S"},fullPage:{xs:"S",sm:"S",md:"M",lg:"M",xl:"M"},streamLike:"S"},E=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.rules,i=e.paragraphType,l=(0,v.l)(),c=i===b.FU.H4?"h2":"h1",u=("h1"===c?N:S).card,d=l([r,(0,h.Z)({name:"heading",scale:u,fontWeight:"INLINE",color:"NORMAL"})]);return o.createElement(c,{id:a,className:d,ref:t},n)})),O=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.rules,i=(0,v.l)()([r,(0,h.Z)({name:"overline",scale:"M",color:"LIGHTER"})]);return o.createElement("h2",{id:a,className:i,ref:t,"aria-label":"kicker paragraph"},n)})),w={xs:"S",sm:"S",md:"SM",lg:"SM",xl:"SM"},x=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.rules,i=e.richTextStyle,l=(0,v.l)(),c="FULL_PAGE"===i?w:"S",u=l([r,{listStyleType:"decimal",marginLeft:"30px",paddingLeft:"0px"},(0,h.Z)({name:"body",scale:c})]);return o.createElement("li",{id:a,className:u,ref:t},n)})),T=n(45458),I={xs:"S",sm:"S",md:"SM",lg:"SM",xl:"SM"},P=o.forwardRef((function(e,t){var n=e.children,a=e.hasDropCap,r=e.paragraphName,i=e.rules,l=(0,v.l)()([i,{wordBreak:"break-word"},(0,h.Z)({name:"body",scale:I})].concat((0,T.A)(a?[{clear:"left"}]:[])));return o.createElement("p",{id:r,className:"pw-post-body-paragraph ".concat(l),ref:t},n)})),R=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.richTextStyle,i=e.rules,l=(0,v.l)()([i,(0,h.Z)({name:"pullQuote",scale:"CARD"===r?{xs:"M",sm:"M",md:"L",lg:"L",xl:"L"}:"L"})]);return o.createElement("p",{id:a,className:l,ref:t},n)})),A=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.rules,i=e.whiteSpace,l=(0,v.l)()([r,{display:"block",whiteSpace:i||"pre-wrap",minWidth:"fit-content"}]);return o.createElement("span",{id:a,className:l,ref:t},n)})),D=o.forwardRef((function(e,t){var n=e.paragraphName,a=e.rules,r=e.children;return o.createElement(A,{paragraphName:n,ref:t,rules:a,whiteSpace:"pre"},r)})),C=function(e){var t=e.children,n=e.paragraphName,a=e.rules,r=e.paragraphRef,i=e.paragraph,l=i.text,c=i.codeBlockMetadata,u=null==c?void 0:c.lang;return c?o.createElement(D,{lang:u,paragraphName:n,ref:r,rules:a,text:l},t):o.createElement(A,{paragraphName:n,ref:r,rules:a},t)},M=n(58168),L={xs:"L",sm:"L",md:"L",lg:"L",xl:"L"},F={xs:"M",sm:"M",md:"L",lg:"L",xl:"L"},j=function(e){var t=e.children,n=e.paragraphName,a=e.richTextStyle,r=e.rules,i=e.forwardedRef,l="FULL_PAGE"===a,c="CARD"===a,u="INLINE"===a,d=(0,v.l)()([r,(0,h.Z)({name:"subtitle",scale:u?L:l||c?F:"L",color:"LIGHTER",richTextStyle:a})]);return o.createElement("h2",{id:n,className:"pw-subtitle-paragraph ".concat(d),ref:i},t)},H=o.forwardRef((function(e,t){return o.createElement(j,(0,M.A)({},e,{forwardedRef:t}))})),_=function(e){switch(e){case"FULL_PAGE":return{xs:"L",sm:"L",md:"XL",lg:"XL",xl:"XL"};case"CARD":return{xs:"S",sm:"S",md:"L",lg:"L",xl:"L"};case"INLINE":return"L";default:return"M"}},V=function(e){var t=e.children,n=e.richTextStyle,a=e.paragraphName,r=e.rules,i=e.forwardedRef,l=(0,v.l)()([r,[(0,h.Z)({name:"title",scale:_(n),richTextStyle:n,color:"NORMAL"})]]);return o.createElement("h1",{id:a,className:"pw-post-title ".concat(l),ref:i,"data-testid":"FULL_PAGE"===n?"storyTitle":void 0},t)},B=o.forwardRef((function(e,t){return o.createElement(V,(0,M.A)({},e,{forwardedRef:t}))})),U={xs:"S",sm:"S",md:"SM",lg:"SM",xl:"SM"},W=o.forwardRef((function(e,t){var n=e.children,a=e.paragraphName,r=e.rules,i=e.richTextStyle,l=(0,v.l)(),c="FULL_PAGE"===i?U:"S",u=l([r,{listStyleType:"disc",marginLeft:"30px",paddingLeft:"0px"},(0,h.Z)({name:"body",scale:c})]);return o.createElement("li",{id:a,className:u,ref:t},n)})),G=n(9459),Q=n(20239),q=n(80890),z=n(58059),X=n.n(z),Y={bash:X()((function(){return n.e(9510).then(n.bind(n,69510))})),c:X()((function(){return n.e(2711).then(n.bind(n,52711))})),cpp:X()((function(){return n.e(4887).then(n.bind(n,34887))})),csharp:X()((function(){return n.e(7435).then(n.bind(n,77435))})),css:X()((function(){return n.e(2753).then(n.bind(n,92753))})),dart:X()((function(){return n.e(8605).then(n.bind(n,8605))})),diff:X()((function(){return n.e(6551).then(n.bind(n,76551))})),go:X()((function(){return n.e(1058).then(n.bind(n,11058))})),graphql:X()((function(){return n.e(9075).then(n.bind(n,79075))})),ini:X()((function(){return n.e(6e3).then(n.bind(n,56e3))})),java:X()((function(){return n.e(3736).then(n.bind(n,83736))})),javascript:X()((function(){return n.e(5603).then(n.bind(n,15603))})),json:X()((function(){return n.e(7402).then(n.bind(n,27402))})),kotlin:X()((function(){return n.e(4433).then(n.bind(n,14433))})),less:X()((function(){return n.e(4145).then(n.bind(n,96526))})),lua:X()((function(){return n.e(2328).then(n.bind(n,22328))})),makefile:X()((function(){return n.e(3308).then(n.bind(n,83308))})),markdown:X()((function(){return n.e(3265).then(n.bind(n,33265))})),objectivec:X()((function(){return n.e(9948).then(n.bind(n,49948))})),perl:X()((function(){return n.e(8349).then(n.bind(n,28349))})),"php-template":X()((function(){return n.e(7401).then(n.bind(n,37401))})),php:X()((function(){return n.e(5130).then(n.bind(n,95130))})),plaintext:X()((function(){return n.e(9273).then(n.bind(n,49273))})),"python-repl":X()((function(){return n.e(3302).then(n.bind(n,53302))})),python:X()((function(){return n.e(5262).then(n.bind(n,85262))})),r:X()((function(){return n.e(9200).then(n.bind(n,39200))})),ruby:X()((function(){return n.e(9928).then(n.bind(n,99928))})),rust:X()((function(){return n.e(7206).then(n.bind(n,67206))})),scss:X()((function(){return n.e(9687).then(n.bind(n,12068))})),shell:X()((function(){return n.e(6340).then(n.bind(n,76340))})),swift:X()((function(){return n.e(7841).then(n.bind(n,7841))})),sql:X()((function(){return n.e(7470).then(n.bind(n,57470))})),typescript:X()((function(){return n.e(5387).then(n.bind(n,95387))})),vbnet:X()((function(){return n.e(8789).then(n.bind(n,38789))})),xml:X()((function(){return n.e(9359).then(n.bind(n,69359))})),x86asm:X()((function(){return n.e(9725).then(n.bind(n,29725))})),yaml:X()((function(){return n.e(6347).then(n.bind(n,36347))}))},Z=X()((function(){return n.e(11).then(n.bind(n,50011)).then((function(e){return m=e.default}))})),K=n(49728),J=n(24023),$=function(e,t){var n=null==t?void 0:t.mode,r=null==t?void 0:t.lang,i=function(e){var t,n,r,i,l,c=void 0!==(t=e)&&Object.keys(Y).includes(t),u=(n=(0,o.useState)(m),r=(0,a.A)(n,2),i=r[0],l=r[1],(0,o.useEffect)((function(){i||Z().then((function(e){l(e)}))}),[]),i),d=(0,o.useState)(e&&null!=u&&u.getLanguage(e)?u:void 0),s=(0,a.A)(d,2),p=s[0],f=s[1];return(0,o.useEffect)((function(){c&&u&&!p&&Y[e]().then((function(t){null==u||u.registerLanguage(e,t.default),f(u)}))}),[e,u,p]),p}(r||void 0);return o.useMemo((function(){if(n&&r&&n!==b.Pr.DISABLED){var t=null==i?void 0:i.highlight(e||"",{language:r});return t?(a=t._emitter.rootNode,f(a.children,0,1)):void 0}var a}),[i])},ee={xs:"M",sm:"M",md:"L",lg:"L",xl:"L"},te=function(e,t,n,r,o,l){return{marginTop:void 0===o?(0,G.Fv)((function(e){var n=(0,a.A)(e,2),o=n[0],l=n[1];return"".concat(i()(o/l-(r.xHeight+(t-1)/2),2),"em")}),e,n):(0,G.Fv)((function(e){var t=(0,a.A)(e,1)[0];return"".concat(t,"px")}),o),marginBottom:void 0===l?"".concat(i()(-1*(r.baseline+(t-1)/2),2),"em"):(0,G.Fv)((function(e){var t=(0,a.A)(e,1)[0];return"".concat(t,"px")}),l)}},ne=function(e){var t=e.children,n=e.hasDropCap,r=e.marginTopOverride,i=e.marginBottomOverride,l=e.name,c=e.paragraphRef,u=e.paragraphStyle,d=e.richTextStyle,s=e.spaceTop,p=e.paragraph,m=function(e){var t=e.marginTopOverride,n=e.paragraphStyle,r=e.richTextStyle,i=e.spaceTop,o=e.theme,l=e.isPreV2,c=void 0!==l&&l,u=e.marginBottomOverride,d=function(e,t,n,r){var i="FULL_PAGE"===t,o="CARD"===t,l="INLINE"===t,c="STREAM"===t||o||l;switch(e){case K.em.Title:var u=n.newFonts.title.fontSize,d=u&&(0,G.Fv)((function(e){var t=(0,a.A)(e,1)[0];return u[t]}),_(t));return i||o||l?{fontRule:q.eh,multipliers:q.yW,fontSize:d,lineHeight:1.23,letterSpacing:"0"}:{fontRule:q.sI,multipliers:q.Bf,fontSize:c?34:30,lineHeight:1.12,letterSpacing:"-0.022em"};case K.em.Subtitle:var s=n.newFonts.subtitle.fontSize,p=s&&(0,G.Fv)((function(e){var t=(0,a.A)(e,1)[0];return s[t]}),ee);return{fontRule:q.B_,multipliers:q.Bf,fontSize:c?24:p,lineHeight:1.394,letterSpacing:"0"};case K.em.Kicker:var m=n.newFonts.overline.fontSize,f=m&&m.M;return{fontRule:q.B_,multipliers:q.Bf,fontSize:f||22,lineHeight:1.18,letterSpacing:"-0.022em"};case K.em.P:case K.em.BQ:return{fontRule:q.N_,multipliers:q.nx,fontSize:{xs:18,sm:18,md:i||o||l?20:18,lg:i||o||l?20:18,xl:i||o||l?20:18},lineHeight:1.58,letterSpacing:"-0.004em"};case K.em.ULI:case K.em.OLI:return{fontRule:q.N_,multipliers:q.nx,fontSize:{xs:18,sm:18,md:i||l?20:18,lg:i||l?20:18,xl:i||l?20:18},lineHeight:1.58,letterSpacing:"-0.004em"};case K.em.H1:case K.em.H2:case K.em.H3:return{fontRule:q.sI,multipliers:q.Bf,fontSize:o||l?{xs:n.newFonts.heading.fontSize.S,sm:n.newFonts.heading.fontSize.S,md:n.newFonts.heading.fontSize.M,lg:n.newFonts.heading.fontSize.M,xl:n.newFonts.heading.fontSize.M}:c?26:{xs:30,sm:30,md:34,lg:34,xl:34},lineHeight:o||l?1.31:1.12,letterSpacing:"-0.022em"};case K.em.H4:return{fontRule:q.sI,multipliers:q.Bf,fontSize:o||l?{xs:n.newFonts.heading.fontSize.XS,sm:n.newFonts.heading.fontSize.XS,md:n.newFonts.heading.fontSize.S,lg:n.newFonts.heading.fontSize.S,xl:n.newFonts.heading.fontSize.S}:c?22:{xs:24,sm:24,md:26,lg:26,xl:26},lineHeight:o?1.22:1.18,letterSpacing:"-0.022em"};case K.em.PRE:return{fontRule:q.WL,multipliers:q.q8,fontSize:r?14:16,lineHeight:r?1.4:1.18,letterSpacing:"-0.022em"};case K.em.PQ:return{fontRule:q.eh,multipliers:q.uE,fontSize:24,lineHeight:1.48,letterSpacing:"-0.014em"};default:return null}}(n,r,o,c);if(null==d)return[];var s=d.fontRule,p=d.multipliers,m=d.fontSize,f=d.lineHeight;return[{lineHeight:f,letterSpacing:d.letterSpacing,fontStyle:(0,K.Vs)(n)},s({fontSize:m}),te(i,f,m,p,t,u)]}({marginTopOverride:r,richTextStyle:d,paragraphStyle:u,spaceTop:s,theme:(0,Q.D)(),isPreV2:!(null==p||!p.codeBlockMetadata),marginBottomOverride:i});switch(u){case K.em.Title:return o.createElement(B,{paragraphName:l,richTextStyle:d,ref:c,rules:m},t);case K.em.Subtitle:return o.createElement(H,{paragraphName:l,richTextStyle:d,ref:c,rules:m},t);case K.em.PQ:return o.createElement(R,{paragraphName:l,richTextStyle:d,ref:c,rules:m},t);case K.em.Kicker:return o.createElement(O,{paragraphName:l,ref:c,rules:m},t);case K.em.P:return o.createElement(P,{hasDropCap:n,paragraphName:l,ref:c,rules:m},t);case K.em.BQ:return o.createElement(y,{paragraphName:l,richTextStyle:d,ref:c,rules:m},t);case K.em.ULI:return o.createElement(W,{paragraphName:l,richTextStyle:d,ref:c,rules:m},t);case K.em.OLI:return o.createElement(x,{paragraphName:l,richTextStyle:d,ref:c,rules:m},t);case K.em.H1:case K.em.H2:case K.em.H3:case K.em.H4:return o.createElement(E,{paragraphName:l,paragraphType:u,ref:c,rules:m},t);case K.em.PRE:return o.createElement(C,{paragraphName:l,paragraphRef:c,rules:m,paragraph:p},t);default:return(0,J.xb)(u),null}};function ae(e){var t=e.highlights,n=e.marginTopOverride,a=e.paragraph,r=e.paragraphStyle,i=e.privateNotes,u=e.richTextStyle,d=e.spaceTop,s=e.marginBottomOverride,p=!!a&&!!a.hasDropCap,m=(0,l.fc)(a,r),f=$(a.text,a.codeBlockMetadata);return o.createElement(ne,{hasDropCap:p,marginTopOverride:n,marginBottomOverride:s,name:a.name||void 0,paragraphRef:m,paragraphStyle:r,richTextStyle:u,spaceTop:d,paragraph:a},i&&o.createElement(g.F,{paragraph:a,privateNotes:i}),o.createElement(c.O,{allowDropCap:!0,highlights:t,paragraph:a,paragraphStyle:r,richTextStyle:u,hljsMarkups:f}))}},60602:(e,t,n)=>{n.d(t,{a:()=>a});var a=n(96540).createContext({inResponseToEntityId:"",isThreadedResponsesVisible:!1,toggleThreadedResponses:function(){},showThreadedResponses:function(){},threadDepthFromRootEntity:0,threadDepthOnPage:0,hideCreateReply:function(){},toggleCreateReply:function(){},loadThreadedResponses:function(){},isThreadedResponsesQueryCalled:!1,isThreadedResponsesQueryLoading:!1,showContinueThisThreadSidebar:function(){}})},79501:(e,t,n)=>{n.d(t,{t:()=>m});var a=n(45458),r=n(64467),i=n(80296),o=n(96540),l=n(77865),c=n(91958),u=n(90383),d=n(60561);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(e){var t=e.alt,n=e.rules,r=e.miroId,s=e.width,m=e.maxWidth,f=e.expectedWidth,g=e.height,h=e.strategy,v=e.freezeGifs,k=e.focusPercentX,y=e.focusPercentY,b=e.loading,N=e.webp,S=void 0!==N&&N,E=(0,c.f4)(),O=(0,o.useState)(!1),w=(0,i.A)(O,2),x=w[0],T=w[1],I=S&&!x,P={miroId:r,width:s,height:g,strategy:h,freezeGifs:v,focusPercentX:k,focusPercentY:y},R=(0,u.rP)(P),A=f===d.Vw||E?"100vw":"".concat(f,"px"),D=(0,o.useMemo)((function(){var e=[320,360,375,393,414,550];f&&e.push(f),E&&e.push(d.Vw);var t=e.map((function(e){var t=2*e,n=(0,u.rP)(p(p({},P),{},{width:t,ignorePixelRatio:!0}));return"".concat(n," ").concat(t,"w")})),n=e.map((function(e){var t=2*e,n=(0,u.rP)(p(p({},P),{},{ignorePixelRatio:!0,width:t,webp:!0}));return"".concat(n," ").concat(t,"w")})),r=(0,a.A)(t).join(", "),i=(0,a.A)(n).join(", ");return{sizes:"(min-resolution: 4dppx) and (max-width: ".concat(d.E2,"px) 50vw,\n (-webkit-min-device-pixel-ratio: 4) and (max-width: ").concat(d.E2,"px) 50vw, \n (min-resolution: 3dppx) and (max-width: ").concat(d.E2,"px) 67vw,\n (-webkit-min-device-pixel-ratio: 3) and (max-width: ").concat(d.E2,"px) 65vw, \n (min-resolution: 2.5dppx) and (max-width: ").concat(d.E2,"px) 80vw,\n (-webkit-min-device-pixel-ratio: 2.5) and (max-width: ").concat(d.E2,"px) 80vw,\n (min-resolution: 2dppx) and (max-width: ").concat(d.E2,"px) 100vw,\n (-webkit-min-device-pixel-ratio: 2) and (max-width: ").concat(d.E2,"px) 100vw,\n ").concat(A).replace(/\s+/g," "),srcSet:r,transcodedSrcSet:i}}),[E,f,d.E2,P,2]),C=D.sizes,M=D.srcSet,L=D.transcodedSrcSet,F=[],j={};return m&&(j.maxWidth=m,F=F.concat([j])),n&&(F=F.concat(n).concat((function(e){return{backgroundColor:e.backgroundColor}}))),o.createElement("picture",null,I&&o.createElement("source",{srcSet:L,sizes:C,type:"image/webp"}),o.createElement("source",{"data-testid":"og",srcSet:M,sizes:C}),o.createElement(l._,{imgRef:function(e){return function(t){t&&!t.src&&(t.src=e)}}(R),alt:t,rules:F,width:f,height:g,loading:b,handleError:function(){return T(!0)}}))}},91958:(e,t,n)=>{n.d(t,{f4:()=>y,pB:()=>b});var a=n(80296),r=n(64467),i=n(96540),o=n(3005),l=n(72130),c=n(44402),u=n(66305),d=n(15578),s=n(78693),p=n(42396);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=(0,r.A)({},(0,d.Oe)("no-preference"),{transition:"transform 300ms cubic-bezier(0.2, 0, 0.2, 1)"}),h=function(e,t,n,a,r,i){var o=r*i,l=a*i,c=(e-l)/2,u=((t-o)/2-(n.left+(r-o)/2))/i,d=(c-(n.top+(a-l)/2))/i;return f(f({},g),{},{zIndex:s.Ay.floating,transform:"scale(".concat(i,") translate(").concat(u,"px, ").concat(d,"px)"),position:"absolute",cursor:"zoom-out",height:"".concat(a,"px"),width:"".concat(r,"px")})},v=function(e,t,n,a,r,i,o){if(!(r&&o&&i&&e))return{};var l=Math.min(Math.min(t,a||1/0)/o,Math.min(e,n||1/0)/i);return l<1?h(e,t,r,r.height,r.width,Math.min(t/r.width,e/r.height)):h(e,t,r,i,o,l)},k=(0,i.createContext)(!1),y=function(){return(0,i.useContext)(k)},b=function(e){var t=e.children,n=e.height,a=e.width,r=e.originalHeight,o=e.originalWidth,l=e.paragraphRef;return e.isLinked||!r||!o||!n||n===r&&a===o?t:i.createElement(N,{originalHeight:r,originalWidth:o,height:n,width:a,paragraphRef:l},t)},N=function(e){var t=e.children,n=e.originalHeight,r=e.originalWidth,d=e.height,m=e.width,h=e.paragraphRef,y=(0,i.useState)(null),b=(0,a.A)(y,2),N=b[0],S=b[1],E=(0,i.useState)(0),O=(0,a.A)(E,2),w=O[0],x=O[1],T=(0,i.useState)(0),I=(0,a.A)(T,2),P=I[0],R=I[1],A=(0,c.l)(),D=(0,l.$L)(),C=h&&h.current&&h.current.getBoundingClientRect(),M=(0,i.useRef)(null),L=(0,i.useCallback)((function(){D.event("client.action",{action:"zoom",eventType:"click"})}),[]),F=(0,i.useCallback)((function(){M.current&&M.current.focus(),S(!1)}),[null==M?void 0:M.current,S]);!function(e,t){var n=(0,i.useRef)(0),a=(0,i.useRef)(1),r=(0,i.useCallback)((function(){var e=window.visualViewport.scale;e===a.current&&Math.abs(n.current-window.scrollY)>40&&t(),a.current=e}),[t]);(0,i.useEffect)((function(){if(e)return n.current=window.scrollY,a.current=window.visualViewport.scale,u.R5.on("scroll",r),function(){u.R5.off("scroll",r)}}),[r,e])}(!!N,F);var j=(0,i.useCallback)((function(){x(window.innerHeight),R(window.innerWidth)}),[x,R]);(0,i.useEffect)((function(){return x(window.innerHeight),R(window.innerWidth),u.R5.on("resize",j),function(){u.R5.off("resize",j)}}),[x,R,j]);var H,_=(0,p.x)((function(){N?F():(L(),S(!0))}),[L,S,N,F]);return i.createElement(i.Fragment,null,i.createElement(k.Provider,{value:N},i.createElement("div",{onClick:_,onKeyDown:_,role:"button",tabIndex:0,ref:M,className:A(N?v(w,P,n,r,C,d,m):(H=N,f(f({},g),{},{cursor:"zoom-in",position:"relative",zIndex:null===H?"auto":s.Ay.floating,width:"100%",":focus":{transform:"scale(1.01)"}}))),onTransitionEnd:function(){N||S(null)}},t),i.createElement(o.l,{shouldTrapFocus:!1,padding:0,withPageScroll:!0,isVisible:!!N,hide:F,withCloseButton:!1},i.createElement(i.Fragment,null))))}},89796:(e,t,n)=>{n.d(t,{u:()=>a});var a=function(){return{position:"absolute",top:0,left:0,height:"100%",width:"100%"}}},48619:(e,t,n)=>{n.d(t,{A9:()=>m,DX:()=>h,GP:()=>k,Hi:()=>c,M6:()=>d,SG:()=>E,Zl:()=>S,gf:()=>b,iY:()=>u,kw:()=>s,l7:()=>f,mb:()=>v,o8:()=>w,op:()=>N,pu:()=>O,rs:()=>g,u$:()=>y,xo:()=>p});var a=n(80296),r=n(64467),i=n(9459);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=0,u=10,d={xs:24,sm:24,md:32,lg:32,xl:32},s={xs:28,sm:28,md:32,lg:32,xl:32},p={xs:32,sm:32,md:40,lg:40,xl:40},m={xs:52,sm:52,md:68,lg:68,xl:68},f={xs:40,sm:40,md:46,lg:46,xl:46},g={xs:52,sm:52,md:76,lg:76,xl:76},h={xs:40,sm:40,md:56,lg:56,xl:56},v={xs:48,sm:48,md:66,lg:66,xl:66},k={xs:48,sm:48,md:80,lg:80,xl:80},y=36,b=24,N=16,S=32,E=40,O=l(l({},h),{},{lg:0,xl:0}),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(t){return{marginTop:(0,i.Fv)((function(e){var t=(0,a.A)(e,1)[0];return"".concat(t,"px")}),e)}}}},42396:(e,t,n)=>{n.d(t,{x:()=>r});var a=n(96540),r=function(e,t){return a.useCallback((function(t){"key"in t&&"Enter"!==t.key&&" "!==t.key||("key"in t&&" "===t.key&&t.preventDefault(),e(t))}),t)}},60561:(e,t,n)=>{n.d(t,{E2:()=>o,Vw:()=>r,ky:()=>l});var a=n(90383),r=2400,i=1e3,o=700,l=function(e){var t=e.layout,n=e.originalWidth,l=e.originalHeight,c=e.sequenceAspectRatio,u=e.richTextStyle,d=a.qY.Resample,s=l&&n?l/n:null,p=n;switch(t){case"CROPPED_HEIGHT_PREVIEW":p=o,s=.3,d=a.qY.Crop;break;case"CONSTRAINED_HEIGHT_PREVIEW":p=o,s&&240/s<p&&(p=240/s);break;case"INSET_LEFT":case"INSET_CENTER_SMALL":case"INSET_RIGHT":p=350;break;case"OUTSET_LEFT":p="CARD"===u?i:500;break;case"OUTSET_ROW":case"OUTSET_ROW_CONTINUE":p=i,c&&s&&(p*=1/s/c);break;case"OUTSET_CENTER":p=i;break;case"FULL_WIDTH":case"FULL_WIDTH_CROPPED_COVER":p=r;break;default:p=o}return n&&(p=Math.min(p,n)),{width:p=Math.ceil(p),height:s?Math.ceil(s*p):void 0,strategy:d}}},38893:(e,t,n)=>{n.d(t,{Oi:()=>f,H8:()=>m,Wd:()=>p});var a,r=n(64467),i=n(88055),o=n.n(i);!function(e){e[e.HIGHLIGHT=0]="HIGHLIGHT",e[e.RESPONSE=1]="RESPONSE"}(a||(a={}));var l,c=n(42976);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=(l={},(0,r.A)(l,c.Gv.HIGHLIGHT,a.HIGHLIGHT),(0,r.A)(l,c.Gv.RESPONSE,a.RESPONSE),l),m=function(e){var t=100;if(1!==e.paragraphs.length)return null;var n=o()(e.paragraphs[0]),a=n.text||"",r=0,i=e.startOffset||0,l=e.endOffset||a.length;if(a.length-l>t&&(a=a.substring(0,l+t)+"…"),i>t){var u=i-t;a="…"+a.substring(u),r=u-1}n.text=a,n.type=c.FU.P,n.markups.unshift({end:l,start:i,type:c.Fi.HIGHLIGHT});var d,p=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw i}}}}(n.markups);try{for(p.s();!(d=p.n()).done;){var m=d.value;m.start-=r,m.end-=r}}catch(e){p.e(e)}finally{p.f()}return n},f=function(e){if(1!==e.paragraphs.length)return null;var t=e.paragraphs[0].text||"",n=e.startOffset||0,a=e.endOffset||t.length,r=t.slice(n,a);return r.length>=185&&(r=r.substring(0,185)+"..."),d(d({},e.paragraphs[0]),{},{text:r,type:c.FU.P,markups:[{end:r.length,start:0,type:c.Fi.HIGHLIGHT,anchorType:null,href:null,linkMetadata:null,userId:null}],hasDropCap:null,dropCapImage:null,codeBlockMetadata:null})}},49728:(e,t,n)=>{n.d(t,{GG:()=>f,Vg:()=>m,Vs:()=>p,em:()=>s,zH:()=>d});var a=n(64467),r=n(79480),i=n(42976),o=n(48619);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u,d=function(e,t,n){var a=e[t+1];return a&&null!=a.startIndex?a.startIndex:n};!function(e){e.Title="Title",e.Subtitle="Subtitle",e.Kicker="Kicker"}(u||(u={}));var s=c(c({},u),i.FU),p=function(e){return"BQ"===e?"italic":"normal"},m=function(e,t){var n=t.bylineParagraphName,a=t.meterParagraphName,l=t.highlights,c=t.isAuroraPostPageEnabled,u=void 0!==c&&c,p=t.isPostPage,m=void 0!==p&&p,g=t.privateNotes,h=t.richTextStyle,v=t.shouldAddHrs,k=void 0===v||v;if(!e)return[];var y=e.paragraphs,b=e.sections,N=function(e){var t=e.paragraphs,n=e.sections;if(!n[0])return[];for(var a=d(n,0,t.length),r=t.map((function(e){return e.type||i.FU.P})),o=!1,l=-1,c=0;c<a;c++){var u=t[c];if(o){"H4"===u.type&&(r[c]=s.Subtitle);break}if("H3"===u.type||"H2"===u.type)r[c]=s.Title,o=!0;else{if(-1!==l)break;if("H4"!==u.type){if("IMG"===u.type||"IFRAME"===u.type||"P"===u.type&&/^\s*$/.test(u.text||""))continue;break}l=c}}return o&&-1!==l&&(r[l]=s.Kicker),r}(e),S=function(e,t,n){for(var a,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=e.paragraphs,c="SERIES"===n?function(e,t){var n=e.paragraphs,a=e.sections,r=o.M6,i=o.DX,l=o.GP,c=-1;return n.map((function(e,n){var u=a[c+1];if(u&&u.startIndex===n)return c++,o.Hi;var d=t[n],s=t[n-1];if("PQ"===s&&"PQ"!==d)return l;switch(d){case"BQ":return"BQ"===s?r:i;case"OLI":return"OLI"===s?r:i;case"ULI":return"ULI"===s?r:i;case"PQ":return"PQ"===s?i:l}return i}))}(e,t):function(e,t,n){var a=e.paragraphs,i=e.sections,l="number"==typeof(0,r.z)(a).titleIndex,c=f(n),u=c?o.gf:o.M6,d=c?o.Zl:o.DX,s=c?o.SG:o.GP,p=-1;return a.map((function(e,n){var r=t[n],m=t[n-1],f=e.layout,g=a[n-1]&&a[n-1].layout,h=i[p+1];if(h&&h.startIndex===n){if(p++,("IMG"===r||"IFRAME"===r)&&!c){if("OUTSET_LEFT"===f)return o.pu;if("INSET_LEFT"===f)return o.Hi;if(0===n)return"FULL_WIDTH"===f?l?o.Hi:o.M6:o.xo}return"Title"===r?o.rs:d}if("PQ"===m)return r===m?d:c?o.SG:o.mb;switch(r){case"Title":switch(m){case"Kicker":return o.kw;case"IMG":return o.A9;default:return d}case"Kicker":return"IMG"===m?o.l7:d;case"Subtitle":return"Title"===m?u:d;case"P":switch(m){case"H1":case"H2":case"H3":case"H4":return u;default:return d}case"H1":case"H2":case"H3":return s;case"OLI":switch(m){case"H1":case"H2":case"H3":case"H4":return u;case"OLI":return o.u$;default:return d}case"ULI":switch(m){case"H1":case"H2":case"H3":case"H4":return u;case"ULI":return o.u$;default:return d}case"IMG":case"IFRAME":switch(m){case"IMG":case"IFRAME":switch(g){case"OUTSET_LEFT":case"INSET_LEFT":return o.Hi;case"OUTSET_CENTER":switch(f){case"OUTSET_CENTER":case"OUTSET_ROW":return o.Hi;case"FULL_WIDTH":return s;default:return d}case"OUTSET_ROW_CONTINUE":switch(f){case"OUTSET_CENTER":case"OUTSET_ROW":return o.Hi;default:return d}case"INSET_CENTER":switch(f){case"INSET_LEFT":return o.Hi;case"OUTSET_LEFT":return o.iY;case"FULL_WIDTH":return s;default:return d}case"FULL_WIDTH":return"FULL_WIDTH"===f?o.Hi:s;default:return d}case"Title":return o.xo;default:return d}case"PRE":return"PRE"===m?o.op:d;case"PQ":switch(m){case"H1":case"H2":case"H3":case"H4":case"P":return d;default:return s}case"MIXTAPE_EMBED":return u}return d}))}(e,t,n),u=function(e,t,n){var a=e.paragraphs;return a.map((function(e,r){var i=t[r],o=t[r-1];if(0===r&&!n)return 24;switch(i){case"Title":switch(o){case"Kicker":return 8;case"IMG":return a[r-1].text?48:32;default:return n?48:24}case"Subtitle":return"Title"===o?18:24;case"P":switch(o){case"Title":return 30;case"Subtitle":return 23;case"H1":case"H2":return 14;case"H3":return 13;case"H4":return 11;case"P":return 42;case"BQ":return 40;case"PQ":return 35;case"IMG":return 32;case"MIXTAPE_EMBED":return 48;default:return}case"H1":case"H2":case"H3":return"P"===o?40:void 0;case"H4":return"P"===o?36:void 0;case"IMG":case"IFRAME":return"Subtitle"===o?31:void 0;case"BQ":return"P"===o?24:void 0;case"PQ":return"P"===o?32:void 0;case"MIXTAPE_EMBED":return"P"===o?40:void 0}}))}(e,t,i),d=[],s=0;s<l.length;s++)if(l[s]){var p=l[s].layout,m=l[s].type;if("OUTSET_ROW"===p&&"IMG"===m){var g=l[s].metadata;if(!g||!g.originalHeight||!g.originalWidth)continue;for(var h=g.originalWidth/g.originalHeight,v=s+1;(a=l[v])&&"OUTSET_ROW_CONTINUE"===a.layout&&"IMG"===a.type;){var k=l[v].metadata;if(!k||!k.originalHeight||!k.originalWidth)break;h+=k.originalWidth/k.originalHeight,v++}for(;s<v;)d[s]=h,s++;s=v-1}}return l.map((function(e,a){var r,s=c[a],p=u[a],m={paragraphTopSpacing:s},f=e.codeBlockMetadata,g=null===(r=l[a-1])||void 0===r?void 0:r.codeBlockMetadata,h=t[a],v=t[a-1],k=e.layout,y=l[a-1]?l[a-1].layout:null;switch("PRE"===h&&("PRE"===v?(f||g)&&(m={sequenceTopSpacing:m.paragraphTopSpacing,paragraphTopSpacing:o.Hi}):m={sequenceTopSpacing:m.paragraphTopSpacing,paragraphTopSpacing:o.Hi}),k){case"OUTSET_ROW":switch(y){case"OUTSET_ROW_CONTINUE":case"OUTSET_CENTER":m={paragraphTopSpacing:o.Hi};break;default:m={paragraphTopSpacing:o.Hi,sequenceTopSpacing:m.paragraphTopSpacing}}break;case"OUTSET_ROW_CONTINUE":m={paragraphTopSpacing:"STREAM"===n?o.Zl:o.Hi}}return d[a]&&(m.sequenceAspectRatio=d[a]),i&&(m.paragraphTopMarginForPostPage=p),m}))}(e,N,h,m),E=function(e,t){if(!t)return[];var n=new Map;return t.forEach((function(e){e.paragraphs.forEach((function(t){var a=n.get(t.name)||[];a.push(e),n.set(t.name,a)}))})),e.map((function(e){return n.get(e.name)||[]}))}(y,l),O=function(e,t){if(!t)return[];var n=new Map;return t.forEach((function(e){var t=e.anchor,a=n.get(t)||[];a.push(e),n.set(t,a)})),e.map((function(e){return n.get(e.name)||[]}))}(y,g),w=y.findIndex((function(e){return e.name===n})),x=y.map((function(e,t){var n,r,i,o=N[t],l=y[t].layout,c=N[t-1],d=null===(n=y[t+1])||void 0===n?void 0:n.layout,s="OUTSET_ROW"===l&&"OUTSET_ROW_CONTINUE"===d;if(u&&"FULL_PAGE"===h)switch(o){case"Title":w===t&&(i={xs:24,sm:24,md:32,lg:32,xl:32}),0!==t&&"IMG"!==c||(r=a?0:void 0),"Kicker"===c&&(r=12);break;case"Kicker":0===t&&a?r={xs:8,sm:8,md:16,lg:16,xl:16}:a&&(r={xs:24,sm:24,md:32,lg:32,xl:32});break;case"Subtitle":w===t&&(i=24)}else m&&!s&&"CARD"===h&&S[t].paragraphTopMarginForPostPage&&(r=u&&0===t&&"Title"===o?12:S[t].paragraphTopMarginForPostPage);return{highlights:E[t],marginTopOverride:r,marginBottomOverride:i,paragraph:e,paragraphStyle:o,privateNotes:O[t],richTextStyle:h,sequenceAspectRatio:S[t].sequenceAspectRatio,sequenceSpaceTop:S[t].sequenceTopSpacing,spaceTop:S[t].paragraphTopSpacing}})),T=[];return b.forEach((function(e,t){var n=d(b,t,y.length);k&&0!==t&&T.push("HR"),T.push({section:e,paragraphViewModels:x.slice(e.startIndex,n)})})),T},f=function(e){return"STREAM"===e||"CARD"===e}},61215:(e,t,n)=>{n.d(t,{M:()=>o,e:()=>l});var a=n(45458),r=new Set(["http:","https:"]),i=new Set([].concat((0,a.A)(r),["mailto:"])),o=function(e){try{var t=new URL(e,"http://example.com");return i.has(t.protocol)}catch(e){return!1}},l=function(e){try{var t=new URL(e,"http://example.com");return r.has(t.protocol)}catch(e){return!1}}}}]);
//# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/6546.cd03f950.chunk.js.map