
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="33133689-80e8-5ced-a269-9ddef7d23600")}catch(e){}}();
import{j as i}from"./jsx-runtime-BjG_zV1W.js";import{g as v,r as d,u as y}from"./index-D6da9p6-.js";import{T as w}from"./index-BdpAPpdN.js";import{u as j}from"./useTranslation-CfKJAmGY.js";import{L as k}from"./components-1fH5YjVo.js";import{F as N}from"./ArrowLeftIcon-Dz9QYxn0.js";var x={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(r){(function(){var s={}.hasOwnProperty;function e(){for(var n="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(n=l(n,t(c)))}return n}function t(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var c in n)s.call(n,c)&&n[c]&&(o=l(o,c));return o}function l(n,o){return o?n?n+" "+o:n+o:n}r.exports?(e.default=e,r.exports=e):window.classNames=e})()})(x);var E=x.exports;const S=v(E);var T="lexbia5",z="lexbia0",C="lexbia4",R="lexbia7",B="lexbia8",F="lexbia2",H="lexbia6",L="lexbia1",P="lexbia3";function U({element:r,attributes:s,className:e,theme:t,url:l="#"}){const{data:n}=r.attrs||{},{title:o="Upgrade Now",description:c="Get access to premium content",cta_text:b="Subscribe",benefits:m=[],subheader:_="Subscription benefits",image_url:f="",style:a={show_image:!0,background_color:"#ffffff",text_color:"#000",button_background_color:"#000000",button_text_color:"#ffffff",container_shadow:"0 0 #00000000"}}=n,p=m.length>0,h={fontFamily:t?.paragraph_font_family,fontSize:`${t?.paragraph_font_size||0}px`,lineHeight:t?.paragraph_line_height_size},g={fontFamily:t?.h4_font_family,fontSize:`${t?.h4_font_size||0}px`,lineHeight:t?.h4_line_height_size,fontWeight:"600",marginTop:"0px"};return i.jsxs("div",{className:S(e,z),style:{width:"100%",boxShadow:a?.container_shadow,backgroundColor:a?.background_color,color:a?.text_color,borderRadius:`${t?.button_border_radius||0}px`},children:[i.jsxs("div",{className:L,children:[a?.show_image&&f&&i.jsx("img",{src:f,alt:"logo",className:F,style:{borderRadius:`${t?.button_border_radius||0}px`,overflow:"hidden"}}),i.jsx("h2",{className:P,style:{fontFamily:t?.h2_font_family,fontSize:`${t?.h2_font_size||0}px`,lineHeight:t?.h2_line_height_size,marginTop:"8px"},children:o}),i.jsx("p",{className:C,style:h,children:c}),i.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:T,style:{padding:`${t?.button_padding_top}px ${t?.button_padding_bottom}px`,backgroundColor:a?.button_background_color,fontFamily:t?.button_font_family,color:a?.button_text_color,borderRadius:`${t?.button_border_radius||0}px`,pointerEvents:l==="#"?"none":"auto",cursor:l==="#"?"default":"pointer"},onClick:u=>{l==="#"&&u.preventDefault()},children:b}),p&&i.jsxs("h4",{className:H,style:g,children:[_,":"]})]}),p&&i.jsx("ul",{className:R,children:m.map(u=>i.jsx("li",{className:B,style:h,children:u},u))})]})}const J=({subscription:r,publication:s,paywall:e})=>{const{t}=j(),[l,n]=d.useState("");return d.useEffect(()=>{if(window)try{let o=new URL(`${window.location.origin}/upgrade`+window.location.search);e.offer_id&&o.searchParams.set("offer_id",e.offer_id),n(o.toString())}catch{n(`${window.location.origin}/upgrade`+window.location.search)}},[]),i.jsxs("div",{className:"mx-auto mb-16 max-w-xl space-y-4",children:[i.jsx(U,{theme:e.theme,url:l,element:{type:"paywall_break",attrs:{id:e.id,data:{title:e.title,description:e.description,cta_text:e.cta_text,benefits:e.benefits,subheader:e.subheader,image_url:e.image_url,style:e.style}},content:[{id:"text",text:""}]},children:null}),!r&&i.jsxs(w,{as:"span",type:"body",theme:"content",size:"xs",className:"flex items-center justify-center text-center text-xs tracking-wide opacity-75 sm:text-lg",children:[t("login.already_a_subscriber"),i.jsxs(k,{to:"/login",className:"ml-1",children:[i.jsx("span",{className:"text-wt-primary underline underline-offset-1",children:t("shared.cta.sign_in")}),"."]})]})]})},K=()=>{const r=y(),s=()=>{window.history.state.idx===0?r("/"):r(-1)};return i.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-wt transition-all hover:bg-black/5",children:i.jsx("button",{className:"cursor-pointer",onClick:s,children:i.jsx(N,{className:"h-6 w-6 stroke-1 text-wt-text-on-background opacity-50"})})})},G=(r,s)=>{d.useEffect(()=>{const e=document.getElementsByClassName("tiktok-embed")||[];let t;return e.length>0&&(t=document.createElement("script"),t.src="https://www.tiktok.com/embed.js",t.async=!0,document.head.appendChild(t)),()=>{t&&document?.head?.removeChild(t)}},[r,s])},O=(r,s)=>{d.useEffect(()=>{const e=document.getElementById("#content-blocks");window.twttr?.widgets?.load(e)},[r,s])},A=({html:r,slug:s,update:e=!0})=>(G(s,e),O(s,e),i.jsx("div",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r}})),Q=d.memo(A,(r,s)=>r.slug===s.slug&&r.update===s.update);function X({updateOn:r}){return d.useEffect(()=>{try{const s=document.createElement("script");s.src="https://platform.twitter.com/widgets.js",document.getElementsByTagName("body")[0].appendChild(s)}catch{}},[r]),null}export{K as B,J as P,Q as T,X as a};
//# sourceMappingURL=TwitterEmbed-CMw8s1la.js.map

//# debugId=33133689-80e8-5ced-a269-9ddef7d23600
