!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"substack@538433c"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="5ad3a9c7-f8c3-4524-8e1d-79da5a6ac073",t._sentryDebugIdIdentifier="sentry-dbid-5ad3a9c7-f8c3-4524-8e1d-79da5a6ac073")}catch(t){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["83774"],{41640:function(t,e,a){a.d(e,{C:()=>d});var i=a(4006),r=a(32485),n=a.n(r),l=a(97432),s=a(15894),o=a(76977),c=a(57324);let d=t=>{let{isOpen:e,selectedNewsletters:a,user:r,pub:d,disabled:h,endpointOverride:u,onSuccess:g}=t;return(0,i.Y)(o.pT,{className:n()("fixedSubscribeBar-X5I6UT",{"open-CGNCgZ":e}),alignItems:"center",justifyContent:"center",children:(0,i.Y)(o.pT,{direction:"column",className:"fixedSubscribeBarInner-l5Soh3",alignItems:"center",justifyContent:"center",children:(0,i.FD)(o.pT,{direction:"column",alignItems:"start",justifyContent:"start",gap:8,children:[(0,i.Y)(s.T,{preset:"detail-large",color:"white",children:"Enter your email to subscribe:"}),(0,i.Y)(l.A,{onAccentBackground:!0,pub:d,source:c.VU.newsletterPageFixedBar,submitButtonText:"Subscribe",user:r,onSuccess:g,inputClassName:"emailInput-c9dJvv",subscribeButtonClassName:"subscribeButton-mRGW3e",promptClassName:"prompt-CndLXc",subscribeToSpecificSectionIds:Array.from(a),placeholder:"YOUR EMAIL",disabled:null!=h&&h,endpointOverride:u})]})})})}},91370:function(t,e,a){a.d(e,{A:()=>s});var i=a(99851),r=a(4006),n=a(17402),l=a(68349);class s extends n.Component{componentDidMount(){this.rebalance(),"undefined"!=typeof window&&window.addEventListener("resize",this.debouncedRebalance,!0)}componentDidUpdate(){this.rebalance()}componentWillUnmount(){"undefined"!=typeof window&&window.removeEventListener("resize",this.debouncedRebalance,!0)}shouldComponentUpdate(t){return t.children!==this.props.children}rebalance(){if("undefined"!=typeof window&&(0,l.nr)()&&this.base){var t;(function(t){var e;let a=t.innerHTML;if(!t.textContent)return!1;let i=t.textContent.split(" "),r=document.createElement("span");r.id="element-first-word",r.textContent=i.shift(),t.innerHTML="",t.appendChild(r),t.appendChild(document.createTextNode(" ".concat(i.join(" "))));let n=(null==(e=document.getElementById("element-first-word"))?void 0:e.offsetHeight)||r.offsetHeight,l=t.offsetHeight;return t.innerHTML=a,l-10>n})(t=this.base)&&(t.style.maxWidth="",function t(e,a,i,r){if(r-i<4)return void(e.clientHeight>a?e.style.maxWidth="".concat(r,"px"):e.style.maxWidth="".concat(e.scrollWidth+1,"px"));if(i>=r){e.style.maxWidth="".concat(r,"px");return}let n=(i+r)/2;e.style.maxWidth="".concat(n,"px"),e.clientHeight>a?t(e,a,n,r):t(e,a,i,n)}(t,t.clientHeight,0,t.clientWidth)),t.classList.add("visible")}}render(){let{text:t}=this.props;return(0,l.nr)()?(0,r.Y)("span",{"data-testid":"balanced-text",className:"balance-text",style:{display:"inline-block"},children:t}):(0,r.Y)("span",{"data-testid":"balanced-text",style:{textWrap:"balance"},children:t})}constructor(t,e){super(t,e),(0,i._)(this,"debouncedRebalance",void 0),this.debouncedRebalance=(0,l.sg)(()=>this.rebalance(),100)}}},15809:function(t,e,a){a.d(e,{A:()=>s});var i=a(69277),r=a(70408),n=a(4006),l=a(97731);let s=t=>(0,n.Y)(l.A,(0,r._)((0,i._)({},t),{name:"CreditCardIcon",svgParams:{height:21,width:32},children:(0,n.Y)("g",{fill:"none",fillRule:"evenodd",children:(0,n.Y)("g",{fill:t.fill||"#515e80",stroke:"none",children:(0,n.FD)("g",{transform:"translate(0 2)",children:[(0,n.Y)("path",{d:"M26.58 19H2.42A2.4 2.4 0 0 1 0 16.62V2.38A2.4 2.4 0 0 1 2.42 0h24.16A2.4 2.4 0 0 1 29 2.38v14.25A2.4 2.4 0 0 1 26.58 19zM10 5.83c0-.46-.35-.83-.78-.83H3.78c-.43 0-.78.37-.78.83v3.34c0 .46.35.83.78.83h5.44c.43 0 .78-.37.78-.83V5.83z",opacity:".2"}),(0,n.Y)("path",{d:"M25 15h-3c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1zm-6 0h-3c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1zm-6 0h-3c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1zm-6 0H4c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1z",opacity:".3"})]})})})}))},86224:function(t,e,a){a.d(e,{A:()=>s});var i=a(69277),r=a(70408),n=a(4006),l=a(97731);let s=t=>(0,n.Y)(l.A,(0,r._)((0,i._)({},t),{name:"FacebookIcon",svgParams:{height:24,width:24},children:(0,n.Y)("path",{d:"M18 2H15C13.6739 2 12.4021 2.52678 11.4645 3.46447C10.5268 4.40215 10 5.67392 10 7V10H7V14H10V22H14V14H17L18 10H14V7C14 6.73478 14.1054 6.48043 14.2929 6.29289C14.4804 6.10536 14.7348 6 15 6H18V2Z"})}))},74919:function(t,e,a){a.d(e,{A:()=>s});var i=a(69277),r=a(70408),n=a(4006),l=a(97731);let s=t=>(0,n.FD)(l.A,(0,r._)((0,i._)({},t),{name:"FilledCircleCheckmarkIcon",svgParams:{height:24,width:24},children:[(0,n.Y)("circle",{className:"filled-checkmark-icon-circle",cx:"12",cy:"12",r:"12",fill:"#419E4E",stroke:"none"}),(0,n.Y)("path",{d:"M7 11.7222L10.8462 16L17 9",stroke:t.stroke||"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},63446:function(t,e,a){a.d(e,{v:()=>b});var i=a(69277),r=a(70408),n=a(32641),l=a(4006),s=a(32485),o=a.n(s),c=a(69843),d=a.n(c),h=a(60250),u=a(87677),g=a(80697),p=a(75107),m=a(35369),f=a(63281);let b=t=>{var e;let{children:a,className:s,leadingIcon:c,native:b,renderAsLink:w=!1,size:y="lg",trailingIcon:v,variant:C="primary",justifyContent:Y="center",href:A,target:_}=t,N=(0,n._)(t,["children","className","leadingIcon","native","renderAsLink","size","trailingIcon","variant","justifyContent","href","target"]),k=o()(s,f.A.button,f.A["button-size-".concat(y)],f.A["button-variant-".concat(C)],f.A["button-justify-content-".concat(Y)],w&&f.A.buttonAsLink,{[null!=(e=f.A.buttonDisabled)?e:""]:N.disabled}),S="lg"===y?18:16,z=(0,l.FD)(l.FK,{children:["chevron-left"===c?(0,l.Y)(h.A,{size:S}):null,a,"chevron-right"===v?(0,l.Y)(u.A,{size:S}):null,"plus"===v?(0,l.Y)(g.A,{size:S}):null,"chevron-down"===v?(0,l.Y)(p.A,{size:S}):null]});return(0,l.Y)(l.FK,{children:w?(0,l.Y)("a",{className:k,href:A,id:N.id,target:_,onClick:N.onClick,children:z}):(0,l.Y)(m.Nm,(0,r._)((0,i._)({},N,d()(b)?null:{localNavigation:!b}),{className:k,href:A,children:z}))})}},25998:function(t,e,a){a.d(e,{K:()=>v});var i=a(4006),r=a(17402),n=a(86224),l=a(84713),s=a(38685),o=a(65590),c=a(24142),d=a(13950),h=a(15894),u=a(84605),g=a(99145),p=a(68410),m=a(76977),f=a(39318),b=a(80856);let w="footerLink-_5lFCC",y=()=>(0,i.FD)("svg",{fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.Y)("g",{"clip-path":"url(#clip0_6419_23914)",children:(0,i.Y)("path",{d:"M12.3669 8.5003C12.3894 10.9216 14.491 11.7274 14.5143 11.7376C14.4965 11.7944 14.1785 12.8859 13.4071 14.0133C12.7402 14.988 12.0481 15.9591 10.9578 15.9792C9.88643 15.9989 9.54193 15.3439 8.3171 15.3439C7.09263 15.3439 6.70988 15.9591 5.69575 15.9989C4.64333 16.0388 3.84189 14.945 3.1695 13.9738C1.7955 11.9874 0.745483 8.36062 2.15539 5.91249C2.85581 4.69673 4.1075 3.92687 5.4661 3.90713C6.49955 3.88741 7.47498 4.6024 8.10677 4.6024C8.73816 4.6024 9.92351 3.74257 11.1697 3.86884C11.6913 3.89056 13.1557 4.07957 14.096 5.45595C14.0203 5.50291 12.3487 6.476 12.3669 8.5003ZM10.3535 2.55464C10.9122 1.87831 11.2883 0.936799 11.1857 0C10.3803 0.0323694 9.4064 0.536681 8.82872 1.21264C8.31101 1.81123 7.85761 2.76931 7.97995 3.68757C8.87763 3.75702 9.79469 3.2314 10.3535 2.55464Z",fill:"#F6F4EF"})}),(0,i.Y)("defs",{children:(0,i.Y)("clipPath",{id:"clip0_6419_23914",children:(0,i.Y)("rect",{fill:"white",height:"16",width:"16"})})})]}),v=()=>{let{iString:t}=(0,u.GO)(),{isDesktop:e}=(0,p.sM)(),{open:a}=(0,g.v9)(),v=[{label:t("Latest"),href:"/archive"},{label:t("Search"),href:"#",handleOnClick:()=>{a()}},{label:t("About"),href:"/about"},{label:t("Careers"),href:"/p/careers"},{label:t("Shop"),href:"https://shop.thefp.com/"},{label:t("Podcasts"),href:"/podcasts"},{label:t("Video"),href:"/videos"},{label:t("Events"),href:"/events"}],C=[{href:"https://www.facebook.com/readthefreepress/",icon:(0,i.Y)(n.A,{fill:"white",height:28,stroke:"white",strokeWidth:.5,width:28})},{href:"https://x.com/TheFP",icon:(0,i.Y)(s.A,{fill:"white",size:24})},{href:"https://www.instagram.com/thefreepress",icon:(0,i.Y)(l.A,{fill:"white",size:24})},{href:"https://www.youtube.com/channel/UCSRRURbKlPf1HwPUhjmufTg",icon:(0,i.Y)(o.A,{fill:"white",size:24})}],Y=[{label:t("Privacy"),href:"https://www.thefp.com/p/privacy-notice"},{label:t("Terms"),href:(0,b.lk)()},{label:t("Collection notice"),href:(0,b.iQ)()}];return(0,i.Y)(d.DH,{children:(0,i.Y)("div",{className:"footer-cRMYS1",children:(0,i.FD)(m.I1,{alignItems:"stretch",className:"footerContent-TTn9F6",gap:e?80:40,paddingBottom:40,paddingTop:e?80:40,paddingX:32,children:[(0,i.Y)(h.T,{className:"footerHed-xgaXnM",color:"white",preset:"h1-serif",children:t("For Free People.")}),(0,i.Y)(m.pT,{direction:e?"row":"column",gap:e?64:32,justifyContent:"center",children:v.map(t=>{let{label:e,href:a,handleOnClick:r}=t;return(0,i.Y)(h.T,{as:"a",className:w,color:"white",href:r?void 0:a,preset:"detail-large",onClick:r,children:e})})}),(0,i.FD)(m.pT,{direction:e?"row-reverse":"column",gap:40,justifyContent:"space-between",children:[(0,i.Y)("div",{children:(0,i.Y)("a",{"data-native":!0,href:"/app",children:(0,i.FD)(m.Ye,{alignItems:"center",className:"downloadAppLink-yiuJ9E",gap:8,inline:!0,children:[(0,i.Y)(h.T,{color:"white",preset:"detail-small",children:"Download the app"}),(0,i.Y)(y,{}),(0,i.Y)("img",{alt:"Download on the Google Play Store",class:"playButton-aoPveC",height:56,src:(0,f.dJ9)("".concat((0,f.Ewe)(),"/img/play.png"),100,{quality:"auto:good",crop:"limit"}),width:100})]})})}),(0,i.Y)(m.Ye,{alignItems:"center",gap:24,justifyContent:"center",children:C.map(t=>{let{href:e,icon:a}=t;return(0,i.Y)(h.T,{as:"a",color:"white","data-native":!0,href:e,preset:"h7-sans",children:a})})})]}),(0,i.FD)(m.pT,{direction:e?"row":"column",gap:12,justifyContent:"space-between",children:[(0,i.FD)(h.T,{color:"white",preset:"caption",children:["\xa9",new Date().getFullYear()," ",t("The Free Press. All Rights Reserved."),(0,i.FD)("span",{style:{whiteSpace:"nowrap"},children:[(0,i.Y)(c.A,{className:"substackIcon-aS8sUQ",fill:"white",height:15}),t("Powered by")," ",(0,i.Y)("a",{"data-native":!0,href:"https://substack.com",style:{color:"inherit"},children:t("Substack")}),"."]})]}),(0,i.Y)(h.T,{className:w,color:"white",preset:"caption",children:Y.map((t,e)=>{let{label:a,href:n}=t;return(0,i.FD)(r.Fragment,{children:[(0,i.Y)("a",{"data-native":!0,href:n,style:{color:"inherit"},children:a}),ec});var i=a(69277),r=a(70408),n=a(32641),l=a(4006),s=a(32485),o=a.n(s);let c=(0,a(17402).forwardRef)((t,e)=>{var{className:a,type:s="text",size:c="default"}=t,d=(0,n._)(t,["className","type","size"]);return(0,l.Y)("input",(0,r._)((0,i._)({},d),{ref:e,className:o()(a,"input-yab_Zq","sm"===c&&"inputSm-LeCzcW"),type:s}))})},36520:function(t,e,a){a.d(e,{o:()=>S});var i=a(79785),r=a(4006),n=a(32485),l=a.n(n),s=a(822),o=a(63286),c=a(17402),d=a(13950),h=a(84605),u=a(86500),g=a(25757),p=a(24078),m=a(35369),f=a(76977),b=a(45974),w=a(63136),y=a(39318),v=a(46058),C=a(49807),Y=a(50963),A=a(57324);let _={innerFaceContainer:"innerFaceContainer-c1mODk",primaryFace:"primaryFace-tUpmRt",pubLogo:"pubLogo-KAzK2Q",appButton:"appButton-PcI7xD",chatMessageContainer:"chatMessageContainer-sV4x4I",chatMessage:"chatMessage-pW8jRF",chatMessageReadMore:"chatMessageReadMore-DthKRv"};function N(){let t=(0,i._)(["Join ","’s chat in the Substack app"]);return N=function(){return t},t}function k(){let t=(0,i._)(["Complete your subscription to "," in the Substack app"]);return k=function(){return t},t}let S=t=>{let{pub:e,onNext:a,canSkip:i,hasAppInstalled:n,postSlugForRedirect:S,upsellGroup:z,chatInformation:I,redirectToChat:E}=t,{iString:x,iTemplate:T}=(0,h.GO)();(0,c.useEffect)(()=>{(0,u.u4)(u.qY.MOBILE_SUBSCRIPTION_APP_TAKEOVER_SCREEN_SEEN,{canSkip:i,upsellGroup:z}),fetch("/api/v1/app_intended_state",{headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{publicationId:e.id,category:"publication-subscribe-flow",isAppMode:!0}}),method:"POST"}),(0,g.dX)()},[]);let F=E?(0,C.xWO)({pubKey:e.subdomain,utm_campaign:A._9.threadsPage,redirect:n?void 0:"app-store-no-desktop"}):S&&n?(0,y.XV8)(e.subdomain,S,{params:{utm_campaign:A._9.subscribe},source:"mobile-subscription-app-takeover"}):(0,C.Bte)({subdomain:e.subdomain,utm_campaign:A._9.subscribe,redirect:n?void 0:"app-store-no-desktop"});return(0,r.Y)(f.I1,{gap:(null==I?void 0:I.lastAuthorPost)?32:28,alignItems:"center",justifyContent:"center",children:(0,r.FD)(d.DH,{children:[(0,r.FD)(f.I1,{gap:(null==I?void 0:I.lastAuthorPost)?12:28,alignItems:"center",justifyContent:"center",children:[(0,r.Y)("div",{className:_.innerFaceContainer,children:I&&(!e.author_photo_url||(0,v.VL)(e.author_photo_url))?(0,r.Y)(b.Nq,{pub:e,size:160}):(0,r.Y)(p.eu,{className:l()(_.face,!(null==I?void 0:I.lastAuthorPost)&&_.primaryFace),size:(null==I?void 0:I.lastAuthorPost)?80:160,photoUrl:e.author_photo_url})}),(0,r.Y)(w.EY.H3,{textAlign:"center",children:I?T(N(),e.author_name||e.name):T(k(),e.name)})]}),!!(null==I?void 0:I.lastAuthorPost)&&(0,r.FD)(f.Ye,{gap:12,className:_.chatMessageContainer,flex:"grow",children:[(0,r.Y)(p.eu,{className:l()(_.face),size:32,user:{id:e.author_id,name:e.author_name,handle:e.author_handle,photo_url:e.author_photo_url}}),(0,r.FD)(f.I1,{gap:8,flex:"grow",minWidth:0,children:[(0,r.FD)(f.Ye,{gap:4,alignItems:"center",children:[(0,r.Y)(s.A,{size:16}),(0,r.FD)(w.EY.B5,{translated:!0,fontSize:11,lineHeight:16,weight:"semibold",color:"pub-secondary-text",children:["From ",I18N.p((0,Y.$k)(e.author_name)),"’s subscriber chat"]})]}),(0,r.FD)(f.I1,{className:_.chatMessage,radius:"sm",gap:8,padding:12,children:[(0,r.FD)(w.EY.B4,{fontSize:13,lineHeight:20,clamp:2,children:[(0,r.Y)("b",{children:I18N.p(e.author_name)})," ",I.lastAuthorPost.body]}),(0,r.FD)(w.EY.B3,{className:_.chatMessageReadMore,as:"a",color:"select",paddingTop:2,translated:!0,display:"flex",alignItems:"center",gap:2,href:F,children:["Read more",(0,r.Y)(o.A,{stroke:"var(--color-accent-fg-blue)",size:16})]})]})]})]}),(0,r.FD)(f.I1,{gap:12,style:{width:"100%"},children:[(0,r.Y)(m.$n,{onClick:async()=>{(0,u.u4)(u.qY.MOBILE_SUBSCRIPTION_APP_TAKEOVER_SCREEN_APP_STORE_VISITED,{canSkip:i,upsellGroup:z}),window.location.href=F,window.setTimeout(()=>{a()},5e3)},className:_.appButton,priority:"primary",size:"lg",children:x(n?"Continue":"Get the app")}),i&&(0,r.Y)(m.$n,{onClick:()=>{(0,u.u4)(u.qY.MOBILE_SUBSCRIPTION_APP_TAKEOVER_SCREEN_SKIPPED,{upsellGroup:z}),a()},priority:"tertiary",children:x("No thanks")})]})]})})}},31611:function(t,e,a){a.d(e,{CW:()=>b,Mi:()=>f,NT:()=>y,c:()=>m,h$:()=>C});var i=a(69277),r=a(32485),n=a.n(r),l=a(17402),s=a(91262),o=a(68349),c=a(39318),d=a(49807),h=a(69706),u=a(82061),g=a(29496);let p=t=>t.attrs.fullscreen?"full":t.attrs.imageSize||"normal",m={attrs:{src:{default:""},srcNoWatermark:{default:null},fullscreen:{default:null},imageSize:{default:null},height:{default:null},width:{default:null},resizeWidth:{default:null},bytes:{default:null},alt:{default:null},title:{default:null},type:{default:null},href:{default:null},belowTheFold:{default:!1},topImage:{default:!1},internalRedirect:{default:null},isProcessing:{default:!1},align:{default:null},offset:{default:!1}},inline:!1,atom:!0,group:"block",draggable:!0,selectable:!0,isolating:!0,defining:!0,parseDOM:[{tag:"p",priority:100,getAttrs:t=>{if(t.textContent.trim())return!1;let[e]=t.getElementsByTagName("img");return!!e&&b(e)}},{tag:"img[src]",getAttrs:t=>!(t.getAttribute("height")&&1>=Number(t.getAttribute("height"))||t.getAttribute("width")&&1>=Number(t.getAttribute("width")))&&b(t)}],toDOM:t=>{let{ImageActions:e}=a(69380);try{let a,i,r,o=w(t),h=p(t),u=c.MYz.map(e=>({width:e,imageSrc:w(t,{maxWidth:e})})),g=c.MYz.map(e=>({width:e,imageSrc:w(t,{maxWidth:e,imageProps:{format:"webp"}})})),{isProcessing:m}=t.attrs;t.attrs.height&&t.attrs.width&&(a=t.attrs.height,i=t.attrs.width,t.attrs.resizeWidth?(a=t.attrs.resizeWidth*a/i,i=t.attrs.resizeWidth):A(t.attrs)&&i240&&b>240)&&f<4&&y<4;let C="undefined"==typeof window;r=t.attrs.href?(0,d.Hj9)(t.attrs.href)?(0,c.dJ9)(t.attrs.href):t.attrs.href:(0,c.dJ9)(t.attrs.src);let Y=document.createElement("div");if(v&&C){Y.className="image-link-expand";try{Y.innerHTML=(0,s.F0)((0,l.createElement)(e,{size:20}))}catch(t){console.error("Error rendering ImageActions",t)}}return["a",{class:n()("image-link image2","left"===t.attrs.align&&"image2-align-left","right"===t.attrs.align&&"image2-align-right",t.attrs.offset&&"left"===t.attrs.align&&"image2-offset-left",t.attrs.offset&&"right"===t.attrs.align&&"image2-offset-right",v&&"is-viewable-img",m&&"processing"),target:"_blank",href:r,"data-component-name":"Image2ToDOM"},["div",{class:"image2-inset".concat("full"===h?" image2-full-screen":"")},["picture",{},["source",{type:"image/webp",srcset:g.map(t=>"".concat(t.imageSrc," ").concat(t.width,"w")).join(", "),sizes:"100vw"}],["img",{src:o,width:"full"===h?void 0:i,height:"full"===h?void 0:a,"data-attrs":JSON.stringify(t.attrs),class:"full"===h?"sizing-fullscreen":"large"===h?"sizing-large":"sizing-normal",alt:t.attrs.alt||"",title:t.attrs.title||t.attrs.alt,srcset:u.map(t=>"".concat(t.imageSrc," ").concat(t.width,"w")).join(", "),sizes:"100vw",loading:t.attrs.belowTheFold?"lazy":null,fetchpriority:t.attrs.topImage?"high":null}]],Y]]}catch(e){return console.error("Error rendering Maximize2",e),(0,u.D)({msg:null,node:t,err:e,group:"block"})}},toDOMStatic:t=>{var e,a;let i=p(t),r=t.attrs.href||t.attrs.internalRedirect||(0,c.dJ9)(t.attrs.src,void 0,{quality:"normal"===i?"auto:good":"auto:best"});if(t.attrs.height&&t.attrs.width&&"full"!==i){let{width:e,height:a}=t.attrs,i=e;t.attrs.resizeWidth?i=t.attrs.resizeWidth:A(t.attrs)&&(i=Math.min(Math.max(e,c.b1y),c.rmE));let n=Math.min(i,c.oSl),l=a*n/e,s=i>c.oSl,o={"data-attrs":JSON.stringify(t.attrs),alt:t.attrs.alt||"",title:t.attrs.title||t.attrs.alt,width:n,height:l,class:s?"wide-image":"",src:(0,c.dJ9)(t.attrs.src,Math.min(!A(t.attrs)&&s?2*i:i,2*c.oSl),{lossy:Y(t.attrs)})};return["table",{class:"image-wrapper",width:"100%",border:"0",cellSpacing:"0",cellPadding:"0","data-component-name":"Image2ToDOMStatic"},["tr",{},["td"],["td",{align:"left",class:"content",width:i},["a",{class:"image-link",target:"_blank",href:r},["img",o]]],["td"]]]}return"full"===i?["a",{class:"image-link",target:"_blank",href:r},["img",{src:(0,c.dJ9)(t.attrs.src,2*c.oSl,{lossy:Y(t.attrs),crop:"limit",aspect:"full"===i?h.Zi:void 0}),"data-attrs":JSON.stringify(t.attrs),alt:t.attrs.alt||"",title:t.attrs.title||t.attrs.alt,height:t.attrs.height,width:t.attrs.width}]]:["a",{class:"image-link",target:"_blank",href:r},["img",{src:(0,c.dJ9)(t.attrs.src,2*c.oSl,{lossy:Y(t.attrs)}),"data-attrs":JSON.stringify(t.attrs),alt:t.attrs.alt||"",title:t.attrs.title||t.attrs.alt,width:t.attrs.resizeWidth||t.attrs.width,height:t.attrs.resizeWidth?(e=t.attrs.width,a=t.attrs.height,a*t.attrs.resizeWidth/e):t.attrs.height}]]}},f=(0,g.C)({name:"image2",nodeSpec:m}),b=function(t,e){let a,i,r,{bytes:n,internalRedirect:l}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=t.getAttribute("data-attrs");if(s)try{return JSON.parse(s)}catch(t){}t.getAttribute("imageSize")&&(a=t.getAttribute("imageSize"));let o=t.getAttribute("style");if(o){let t=/max-height:\s*(\d+)px/.exec(o);t&&(i=Number(t[1]));let e=/max-width:\s*(\d+)px/.exec(o);e&&(r=Number(e[1]))}else t.getAttribute("width")&&t.getAttribute("height")&&(i=Number(t.getAttribute("height")),r=Number(t.getAttribute("width")));return t.complete&&t.naturalHeight&&t.naturalWidth&&(i=t.naturalHeight,r=t.naturalWidth),{src:(0,c.EVw)(t.getAttribute("data-medium-file")||t.getAttribute("src")),type:e,title:t.getAttribute("title"),alt:t.getAttribute("alt"),height:i,width:r,bytes:n,internalRedirect:l,imageSize:a,href:t.getAttribute("href"),align:t.getAttribute("align"),offset:"true"===t.getAttribute("offset")}},w=function(t){let{maxWidth:e=null,imageProps:a={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=p(t),n="full"===r?2*c.YL9:"large"===r?2*c.T$x:2*c.EZZ;return e&&(n=Math.min(e,n)),(0,c.dJ9)(t.attrs.src,n,(0,i._)({lossy:Y(t.attrs)},a))},y=function(t){var e;let{customSchema:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a&&!a.nodes.image2)return null;let i=/(https?:\/\/(giphy\.com\/gifs|gph.is\/g|media\d*\.giphy\.com\/media)\/[^\s]+)/.exec(t);return null!=(e=i&&i[1])?e:null},v=async t=>{let e=(await Promise.resolve().then(a.t.bind(a,15734,23))).default,i="image/gif",r=await e.get("/api/v1/giphy").query({url:t});return b(await new Promise(t=>(0,o.NN)(w({attrs:{type:i,src:r.body.url}}),t)),i,{bytes:r.body.bytes})},C=async function(t){let{customSchema:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(e?{schema:e}:await Promise.resolve().then(a.bind(a,86508))).schema.nodes.image2.create(await v(t))};function Y(t){return A(t)&&(!t.bytes||t.bytes>5e6)}function A(t){return!!(t.type&&"image/gif"===t.type||t.src&&t.src.split("?")[0].split("#")[0].endsWith(".gif"))}}}]);