@articles-media/articles-dev-box 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,6 +32,8 @@ npm link @articles-media/articles-dev-box
32
32
  - Articles Ad component that connects with user data.
33
33
  - GlobalBody
34
34
  - Easy way to add future logic and components to all projects with ease. For now handling the font awesome script.
35
+ - ViewUserModal
36
+ - View user profile data and recent activity
35
37
 
36
38
  # Roadmap
37
39
  ⏹️ Remove Bootstrap reliance
package/dist/Ad.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const s=require("./jsx-runtime-nZSsnGb7.cjs"),c=require("react"),m=require("./toDate-CzgAa_PT.cjs"),U=require("./Button-BVYvDTtH.cjs");function W(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const b=W(c);var k=new Map,S=new WeakMap,P=0,X;function K(e){return e?(S.has(e)||(P+=1,S.set(e,P.toString())),S.get(e)):"0"}function F(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?K(e.root):e[t]}`).toString()}function G(e){const t=F(e);let i=k.get(t);if(!i){const n=new Map;let d;const o=new IntersectionObserver(l=>{l.forEach(a=>{var p;const N=a.isIntersecting&&d.some(v=>a.intersectionRatio>=v);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=N),(p=n.get(a.target))==null||p.forEach(v=>{v(N,a)})})},e);d=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:o,elements:n},k.set(t,i)}return i}function H(e,t,i={},n=X){if(typeof window.IntersectionObserver>"u"&&n!==void 0){const p=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:typeof i.threshold=="number"?i.threshold:0,time:0,boundingClientRect:p,intersectionRect:p,rootBounds:p}),()=>{}}const{id:d,observer:o,elements:l}=G(i),a=l.get(e)||[];return l.has(e)||l.set(e,a),a.push(t),o.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(l.delete(e),o.unobserve(e)),l.size===0&&(o.disconnect(),k.delete(d))}}function J({threshold:e,delay:t,trackVisibility:i,rootMargin:n,root:d,triggerOnce:o,skip:l,initialInView:a,fallbackInView:p,onChange:N}={}){var v;const[w,E]=b.useState(null),_=b.useRef(N),x=b.useRef(a),[h,A]=b.useState({inView:!!a,entry:void 0});_.current=N,b.useEffect(()=>{if(x.current===void 0&&(x.current=a),l||!w)return;let g;return g=H(w,(R,D)=>{const C=x.current;x.current=R,!(C===void 0&&!R)&&(A({inView:R,entry:D}),_.current&&_.current(R,D),D.isIntersecting&&o&&g&&(g(),g=void 0))},{root:d,rootMargin:n,threshold:e,trackVisibility:i,delay:t},p),()=>{g&&g()}},[Array.isArray(e)?e.toString():e,w,d,n,o,l,i,p,t]);const y=(v=h.entry)==null?void 0:v.target,M=b.useRef(void 0);!w&&y&&!o&&!l&&M.current!==y&&(M.current=y,A({inView:!!a,entry:void 0}),x.current=a);const j=[E,h.inView,h.entry];return j.ref=j[0],j.inView=j[1],j.entry=j[2],j}const Q=async e=>{if(process.env.NODE_ENV==="development")try{return(await m.axios.get(`http://localhost:3001/api/ads/${e.ad_id}`,{params:{ad_id:e.ad_id}})).data.result}catch{}return m.axios.get(e.url,{params:{ad_id:e.ad_id}}).then(t=>t.data.result)},Y=60,Z={dedupingInterval:1e3*60*Y},ee=e=>{const{data:t,error:i,isLoading:n,mutate:d}=m.useSWR(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e}:null,Q,Z);return{data:t,error:i,isLoading:n,mutate:d}};function se(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function te(e,t){return+m.toDate(e)-+m.toDate(t)}function T(e,t,i){const n=te(e,t)/m.millisecondsInMinute;return se(i?.roundingMethod)(n)}function V(e){return Math.trunc(e*m.millisecondsInMinute)}const re=async e=>{if(process.env.NODE_ENV==="development")try{return(await m.axios.get("http://localhost:3001/api/ads",{params:{}})).data}catch{}return m.axios.get(e.url,{params:{}}).then(t=>t.data)},L=60,ne={dedupingInterval:V(L),focusThrottleInterval:V(L)},oe=e=>{const{data:t,error:i,isLoading:n,mutate:d}=m.useSWR({url:"https://articles.media/api/ads"},re,ne);return{data:t,error:i,isLoading:n,mutate:d}},ie=c.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-CHgLXn9p.cjs"))),ae=c.lazy(()=>Promise.resolve().then(()=>require("./AdConfirmExitModal-BRpOrF3L.cjs")));function ce(e,t){return Math.floor(Math.random()*(t-e+1))+e}function le(e){const i=[],{data:n}=oe();let{previewMode:d}=e,o=e.previewData||{};const[l,a]=c.useState(null),[p,N]=c.useState(null),[v,w]=c.useState(null),[E,_]=c.useState(null),[x,h]=c.useState(0),[A,y]=c.useState(!1),[M,j]=c.useState(!1),[g,R]=c.useState(!1),[D,C]=c.useState(new Date),[$,B]=c.useState([]),{data:r}=ee(l);c.useEffect(()=>{n&&n?.length>0&&!l&&(console.log("Ad Mounted or reduxAds changed"),a(e.ad_id||n[ce(0,n?.length-1)]?._id))},[n]),c.useEffect(()=>{},[r]),c.useEffect(()=>{r?.populated_promos&&x>=0&&_(r?.populated_promos[x])},[x,r]);function q(){j(!M)}const{ref:z,inView:I}=J({threshold:0,triggerOnce:!0});function O(u){if(d&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),$.find(f=>f==u)){console.log("Already logged this event");return}m.axios.get("/api/ads/event",{params:{ad_id:r?._id,event:u}}).then(function(f){B([...$,u]),console.log(f.data)}).catch(function(f){console.log(f)})}return c.useEffect(()=>{if(!d&&(console.log("inView",I),I&&l)){let u=[{ad_id:l,date:new Date().toString()},...i.filter(f=>{if(console.log(T(new Date,new Date(f.date))),T(new Date,new Date(f.date))>5){console.log("adsViewed - Remove Old Ad View Object");return}else return console.log("adsViewed - Keep Ad View Object"),f})];console.log("unexpiredRecentViews",u)}},[I,l]),s.jsxRuntimeExports.jsxs("div",{ref:z,className:"ad-wrap",style:{"--articles-ad-background-color":o.background_color||r?.background_color,"--articles-ad-font-color":o.font_color||r?.font_color,"--articles-ad-border-color":o.border_color||r?.border_color},children:[M&&s.jsxRuntimeExports.jsx(ie,{setModalShow:j,ad:r,previewData:o}),g&&s.jsxRuntimeExports.jsx(ae,{setModalShow:R,ad:r,previewData:o}),s.jsxRuntimeExports.jsx("div",{className:"ad",children:s.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[s.jsxRuntimeExports.jsx("div",{className:"ad-warning flex-header",children:s.jsxRuntimeExports.jsxs("div",{className:"",children:[r?.city&&"Local"," Advertisement"]})}),s.jsxRuntimeExports.jsxs("div",{className:"content-wrap",children:[s.jsxRuntimeExports.jsxs("div",{className:"photo-banner",children:[s.jsxRuntimeExports.jsx("div",{className:"logo",children:(o.logo?.location||r?.logo?.location)&&s.jsxRuntimeExports.jsx("img",{src:o?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.logo?.key}`,alt:""})}),s.jsxRuntimeExports.jsx("div",{className:"icon d-none",children:s.jsxRuntimeExports.jsx("i",{className:"fas fa-mug-hot"})}),s.jsxRuntimeExports.jsx("img",{className:"photo",src:o?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${o.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.background?.key}`,alt:""})]}),s.jsxRuntimeExports.jsxs("div",{className:"details-wrap",children:[s.jsxRuntimeExports.jsxs("div",{className:"detail-title",children:[s.jsxRuntimeExports.jsx("div",{className:"detail",children:s.jsxRuntimeExports.jsx("span",{className:"h4",children:o?.business||r?.business})}),s.jsxRuntimeExports.jsxs("div",{className:"flex flex-column d-none",children:[s.jsxRuntimeExports.jsxs("div",{className:"detail",children:[s.jsxRuntimeExports.jsx("span",{className:"icon",children:s.jsxRuntimeExports.jsx("i",{className:"fas fa-search-location"})}),s.jsxRuntimeExports.jsxs("span",{children:[r?.city,", ",r?.state]})]}),s.jsxRuntimeExports.jsxs("div",{className:"detail",children:[s.jsxRuntimeExports.jsx("span",{className:"icon",children:s.jsxRuntimeExports.jsx("i",{className:"fas fa-clock me-2"})}),s.jsxRuntimeExports.jsx("span",{children:"6:30AM–8PM"})]})]})]}),r?.city&&s.jsxRuntimeExports.jsx("div",{className:"details mb-3 d-none"}),s.jsxRuntimeExports.jsx("div",{className:"short-description",children:o?.description||r?.description})]})]}),(!1)?.roles?.isDev&&r?.populated_promos?.length>0&&s.jsxRuntimeExports.jsxs("div",{children:[E&&s.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:E&&s.jsxRuntimeExports.jsxs("div",{className:"promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",children:[s.jsxRuntimeExports.jsxs("div",{className:"",children:[s.jsxRuntimeExports.jsx("div",{children:E.title}),s.jsxRuntimeExports.jsx("div",{className:"small",children:s.jsxRuntimeExports.jsx("div",{className:"small",children:E.details})})]}),s.jsxRuntimeExports.jsx(U.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),y(!0)},children:"Save"})]},E._id)}),s.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between",children:[s.jsxRuntimeExports.jsxs("div",{className:"px-2",children:[r?.populated_promos?.length," Promos Active"]}),s.jsxRuntimeExports.jsxs("div",{className:"controls",children:[s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-left",type:"button",onClick:()=>{x==0?h(r?.populated_promos?.length-1):h(u=>u-1)}}),r?.populated_promos?.map((u,f)=>s.jsxRuntimeExports.jsx("i",{className:`fa-square ${f==x?"fad":"fas"}`},u._id)),s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{x==r?.populated_promos?.length-1?h(0):h(u=>u+1)}})]})]})]}),s.jsxRuntimeExports.jsx("hr",{style:{borderColor:"white"},className:"mt-auto mb-0"}),s.jsxRuntimeExports.jsxs("div",{className:"action-wrap d-flex justify-content-lg-between px-3 py-2",children:[s.jsxRuntimeExports.jsx("div",{onClick:()=>{q(),O("Details")},className:"action flex-grow-1 flex-shrink-0",children:"Details"}),s.jsxRuntimeExports.jsx("span",{className:"px-4"}),s.jsxRuntimeExports.jsx("a",{className:"action flex-grow-1 flex-shrink-0",href:r?.website,target:"_blank",rel:"noreferrer",onClick:u=>{u.preventDefault(),R(!0),O("Confirm Exit Modal Opened")},children:s.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]})}),!d&&s.jsxRuntimeExports.jsx("div",{className:"advertise-with-us p-1",style:{backgroundColor:o.background_color||r?.background_color,color:o.font_color||r?.font_color,borderColor:o.border_color||r?.border_color},children:s.jsxRuntimeExports.jsxs(m.Link,{className:"small d-block w-100 text-center",href:"https://articles.media/advertising",newPage:!0,children:[s.jsxRuntimeExports.jsx("i",{className:"fas fa-share me-1"}),"Advertise with Articles Media!"]})})]})}const de=c.memo(le);module.exports=de;
1
+ "use strict";const e=require("./jsx-runtime-nZSsnGb7.cjs"),c=require("react"),M=require("./toDate-CDU0W0Ek.cjs"),N=require("./index-Ddv_TnxK.cjs"),X=require("./Button-BVYvDTtH.cjs");function K(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const i in s)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>s[i]})}}return t.default=s,Object.freeze(t)}const _=K(c);var C=new Map,S=new WeakMap,V=0,Y;function F(s){return s?(S.has(s)||(V+=1,S.set(s,V.toString())),S.get(s)):"0"}function G(s){return Object.keys(s).sort().filter(t=>s[t]!==void 0).map(t=>`${t}_${t==="root"?F(s.root):s[t]}`).toString()}function H(s){const t=G(s);let i=C.get(t);if(!i){const n=new Map;let l;const d=new IntersectionObserver(u=>{u.forEach(a=>{var o;const m=a.isIntersecting&&l.some(h=>a.intersectionRatio>=h);s.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=m),(o=n.get(a.target))==null||o.forEach(h=>{h(m,a)})})},s);l=d.thresholds||(Array.isArray(s.threshold)?s.threshold:[s.threshold||0]),i={id:t,observer:d,elements:n},C.set(t,i)}return i}function J(s,t,i={},n=Y){if(typeof window.IntersectionObserver>"u"&&n!==void 0){const o=s.getBoundingClientRect();return t(n,{isIntersecting:n,target:s,intersectionRatio:typeof i.threshold=="number"?i.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:l,observer:d,elements:u}=H(i),a=u.get(s)||[];return u.has(s)||u.set(s,a),a.push(t),d.observe(s),function(){a.splice(a.indexOf(t),1),a.length===0&&(u.delete(s),d.unobserve(s)),u.size===0&&(d.disconnect(),C.delete(l))}}function Q({threshold:s,delay:t,trackVisibility:i,rootMargin:n,root:l,triggerOnce:d,skip:u,initialInView:a,fallbackInView:o,onChange:m}={}){var h;const[y,$]=_.useState(null),A=_.useRef(m),b=_.useRef(a),[f,D]=_.useState({inView:!!a,entry:void 0});A.current=m,_.useEffect(()=>{if(b.current===void 0&&(b.current=a),u||!y)return;let g;return g=J(y,(R,w)=>{const k=b.current;b.current=R,!(k===void 0&&!R)&&(D({inView:R,entry:w}),A.current&&A.current(R,w),w.isIntersecting&&d&&g&&(g(),g=void 0))},{root:l,rootMargin:n,threshold:s,trackVisibility:i,delay:t},o),()=>{g&&g()}},[Array.isArray(s)?s.toString():s,y,l,n,d,u,i,o,t]);const j=(h=f.entry)==null?void 0:h.target,E=_.useRef(void 0);!y&&j&&!d&&!u&&E.current!==j&&(E.current=j,D({inView:!!a,entry:void 0}),b.current=a);const v=[$,f.inView,f.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const Z=async s=>{if(process.env.NODE_ENV==="development")try{return(await N.axios.get(`http://localhost:3001/api/ads/${s.ad_id}`,{params:{ad_id:s.ad_id,user_ad_token:s.user_ad_token}})).data.result}catch{}return N.axios.get(s.url,{params:{ad_id:s.ad_id}}).then(t=>t.data.result)},ee=60,se={dedupingInterval:1e3*60*ee},te=(s,t)=>{const{data:i,error:n,isLoading:l,mutate:d}=N.useSWR(s?{url:`https://articles.media/api/ads/${s}`,ad_id:s,user_ad_token:t}:null,Z,se);return{data:i,error:n,isLoading:l,mutate:d}};function re(s){return t=>{const n=(s?Math[s]:Math.trunc)(t);return n===0?0:n}}function ne(s,t){return+M.toDate(s)-+M.toDate(t)}function L(s,t,i){const n=ne(s,t)/M.millisecondsInMinute;return re(i?.roundingMethod)(n)}function q(s){return Math.trunc(s*M.millisecondsInMinute)}const oe=async s=>{if(process.env.NODE_ENV==="development")try{return(await N.axios.get("http://localhost:3001/api/ads",{params:{}})).data}catch{}return N.axios.get(s.url,{params:{}}).then(t=>t.data)},B=60,ie={dedupingInterval:q(B),focusThrottleInterval:q(B)},ae=s=>{const{data:t,error:i,isLoading:n,mutate:l}=N.useSWR({url:"https://articles.media/api/ads"},oe,ie);return{data:t,error:i,isLoading:n,mutate:l}},ce=c.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-Cj0Uwazv.cjs"))),le=c.lazy(()=>Promise.resolve().then(()=>require("./AdConfirmExitModal-ZUzQA_M8.cjs")));function de(s,t){return Math.floor(Math.random()*(t-s+1))+s}function ue(s){const i=[],{data:n}=ae();let{previewMode:l,darkMode:d,user_ad_token:u,userDetails:a}=s,o=s.previewData||{};const[m,h]=c.useState(null),[y,$]=c.useState(null),[A,b]=c.useState(null),[f,D]=c.useState(null),[j,E]=c.useState(0),[v,g]=c.useState(!1),[R,w]=c.useState(!1),[k,O]=c.useState(!1),[me,pe]=c.useState(new Date),[P,W]=c.useState([]),{data:r}=te(m,u);c.useEffect(()=>{n&&n?.length>0&&!m&&(console.log("Ad Mounted or reduxAds changed"),h(s.ad_id||n[de(0,n?.length-1)]?._id))},[n]),c.useEffect(()=>{},[r]),c.useEffect(()=>{r?.populated_promos&&j>=0&&D(r?.populated_promos[j])},[j,r]);function z(){w(!R)}const{ref:U,inView:I}=Q({threshold:0,triggerOnce:!0});function T(x){if(l&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),P.find(p=>p==x)){console.log("Already logged this event");return}N.axios.get("/api/ads/event",{params:{ad_id:r?._id,event:x}}).then(function(p){W([...P,x]),console.log(p.data)}).catch(function(p){console.log(p)})}return c.useEffect(()=>{if(!l&&(console.log("inView",I),I&&m)){let x=[{ad_id:m,date:new Date().toString()},...i.filter(p=>{if(console.log(L(new Date,new Date(p.date))),L(new Date,new Date(p.date))>5){console.log("adsViewed - Remove Old Ad View Object");return}else return console.log("adsViewed - Keep Ad View Object"),p})];console.log("unexpiredRecentViews",x)}},[I,m]),e.jsxRuntimeExports.jsxs("div",{ref:U,className:"ad-wrap",style:{"--articles-ad-background-color":o.background_color||r?.background_color,"--articles-ad-font-color":o.font_color||r?.font_color,"--articles-ad-border-color":o.border_color||r?.border_color},children:[R&&e.jsxRuntimeExports.jsx(ce,{setModalShow:w,ad:r,previewData:o}),k&&e.jsxRuntimeExports.jsx(le,{setModalShow:O,ad:r,previewData:o}),e.jsxRuntimeExports.jsxs("div",{className:"ad",children:[a?.articles_membership?.status!=="Active"&&e.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[e.jsxRuntimeExports.jsx("div",{className:"ad-warning flex-header",children:e.jsxRuntimeExports.jsxs("div",{className:"",children:[r?.city&&"Local"," Advertisement"]})}),e.jsxRuntimeExports.jsxs("div",{className:"content-wrap",children:[e.jsxRuntimeExports.jsxs("div",{className:"photo-banner",children:[e.jsxRuntimeExports.jsx("div",{className:"logo",children:(o.logo?.location||r?.logo?.location)&&e.jsxRuntimeExports.jsx("img",{src:o?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.logo?.key}`,alt:""})}),e.jsxRuntimeExports.jsx("div",{className:"icon d-none",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-mug-hot"})}),e.jsxRuntimeExports.jsx("img",{className:"photo",src:o?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${o.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${r?.background?.key}`,alt:""})]}),e.jsxRuntimeExports.jsxs("div",{className:"details-wrap",children:[e.jsxRuntimeExports.jsxs("div",{className:"detail-title",children:[e.jsxRuntimeExports.jsx("div",{className:"detail",children:e.jsxRuntimeExports.jsx("span",{className:"h4",children:o?.business||r?.business})}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-column d-none",children:[e.jsxRuntimeExports.jsxs("div",{className:"detail",children:[e.jsxRuntimeExports.jsx("span",{className:"icon",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-search-location"})}),e.jsxRuntimeExports.jsxs("span",{children:[r?.city,", ",r?.state]})]}),e.jsxRuntimeExports.jsxs("div",{className:"detail",children:[e.jsxRuntimeExports.jsx("span",{className:"icon",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-clock me-2"})}),e.jsxRuntimeExports.jsx("span",{children:"6:30AM–8PM"})]})]})]}),r?.city&&e.jsxRuntimeExports.jsx("div",{className:"details mb-3 d-none"}),e.jsxRuntimeExports.jsx("div",{className:"short-description",children:o?.description||r?.description})]})]}),(!1)?.roles?.isDev&&r?.populated_promos?.length>0&&e.jsxRuntimeExports.jsxs("div",{children:[f&&e.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:f&&e.jsxRuntimeExports.jsxs("div",{className:"promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"",children:[e.jsxRuntimeExports.jsx("div",{children:f.title}),e.jsxRuntimeExports.jsx("div",{className:"small",children:e.jsxRuntimeExports.jsx("div",{className:"small",children:f.details})})]}),e.jsxRuntimeExports.jsx(X.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),g(!0)},children:"Save"})]},f._id)}),e.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsxRuntimeExports.jsxs("div",{className:"px-2",children:[r?.populated_promos?.length," Promos Active"]}),e.jsxRuntimeExports.jsxs("div",{className:"controls",children:[e.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-left",type:"button",onClick:()=>{j==0?E(r?.populated_promos?.length-1):E(x=>x-1)}}),r?.populated_promos?.map((x,p)=>e.jsxRuntimeExports.jsx("i",{className:`fa-square ${p==j?"fad":"fas"}`},x._id)),e.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{j==r?.populated_promos?.length-1?E(0):E(x=>x+1)}})]})]})]}),e.jsxRuntimeExports.jsx("hr",{style:{borderColor:"white"},className:"mt-auto mb-0"}),e.jsxRuntimeExports.jsxs("div",{className:"action-wrap d-flex justify-content-lg-between px-3 py-2",children:[e.jsxRuntimeExports.jsx("div",{onClick:()=>{z(),T("Details")},className:"action flex-grow-1 flex-shrink-0",children:"Details"}),e.jsxRuntimeExports.jsx("span",{className:"px-4"}),e.jsxRuntimeExports.jsx("a",{className:"action flex-grow-1 flex-shrink-0",href:r?.website,target:"_blank",rel:"noreferrer",onClick:x=>{x.preventDefault(),O(!0),T("Confirm Exit Modal Opened")},children:e.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]}),a?.articles_membership?.status=="Active"&&e.jsxRuntimeExports.jsx("div",{className:"main-panel",children:e.jsxRuntimeExports.jsxs("div",{className:"content-wrap",children:[e.jsxRuntimeExports.jsxs("div",{className:"photo-banner",children:[e.jsxRuntimeExports.jsx("div",{className:"logo"}),e.jsxRuntimeExports.jsx("div",{className:"icon d-none",children:e.jsxRuntimeExports.jsx("i",{className:"fas fa-mug-hot"})}),e.jsxRuntimeExports.jsx("img",{className:"photo",alt:""})]}),e.jsxRuntimeExports.jsxs("div",{className:"details-wrap",children:[e.jsxRuntimeExports.jsx("div",{className:"detail-title",children:e.jsxRuntimeExports.jsx("div",{className:"detail",children:e.jsxRuntimeExports.jsx("span",{className:"h4",children:"Thank You So Much!"})})}),e.jsxRuntimeExports.jsxs("div",{className:"short-description",children:[e.jsxRuntimeExports.jsx("div",{className:"mb-2",children:"Without support from users like you, we wouldn't be here."}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("i",{className:"fas fa-comments-alt"}),"3 unread messages."]}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("i",{className:"fas fa-bell"}),"2 notifications."]})]})]})]})})]}),!l&&e.jsxRuntimeExports.jsx("div",{className:"advertise-with-us p-1",style:{backgroundColor:o.background_color||r?.background_color,color:o.font_color||r?.font_color,borderColor:o.border_color||r?.border_color},children:e.jsxRuntimeExports.jsxs(M.Link,{className:"small d-block w-100 text-center",href:"https://articles.media/advertising",newPage:!0,children:[e.jsxRuntimeExports.jsx("i",{className:"fas fa-share me-1"}),"Advertise with Articles Media!"]})})]})}const xe=c.memo(ue);module.exports=xe;