@articles-media/articles-dev-box 1.0.6 → 1.0.7
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/dist/Ad.cjs +1 -1
- package/dist/Ad.js +147 -140
- package/dist/{AdDetailsModal-C3ytLQho.js → AdDetailsModal-CvFpYG_9.js} +6 -6
- package/dist/AdDetailsModal-Diavle2E.cjs +1 -0
- package/dist/GameScoreboard.cjs +1 -1
- package/dist/GameScoreboard.js +1 -1
- package/package.json +1 -1
- package/dist/AdDetailsModal-CHgLXn9p.cjs +0 -1
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 s=require("./jsx-runtime-nZSsnGb7.cjs"),c=require("react"),m=require("./toDate-CzgAa_PT.cjs"),W=require("./Button-BVYvDTtH.cjs");function X(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 w=X(c);var I=new Map,A=new WeakMap,T=0,K;function F(e){return e?(A.has(e)||(T+=1,A.set(e,T.toString())),A.get(e)):"0"}function G(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?F(e.root):e[t]}`).toString()}function H(e){const t=G(e);let i=I.get(t);if(!i){const n=new Map;let l;const d=new IntersectionObserver(u=>{u.forEach(a=>{var o;const p=a.isIntersecting&&l.some(g=>a.intersectionRatio>=g);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=p),(o=n.get(a.target))==null||o.forEach(g=>{g(p,a)})})},e);l=d.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:d,elements:n},I.set(t,i)}return i}function J(e,t,i={},n=K){if(typeof window.IntersectionObserver>"u"&&n!==void 0){const o=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,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(e)||[];return u.has(e)||u.set(e,a),a.push(t),d.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(u.delete(e),d.unobserve(e)),u.size===0&&(d.disconnect(),I.delete(l))}}function Q({threshold:e,delay:t,trackVisibility:i,rootMargin:n,root:l,triggerOnce:d,skip:u,initialInView:a,fallbackInView:o,onChange:p}={}){var g;const[y,C]=w.useState(null),M=w.useRef(p),N=w.useRef(a),[j,D]=w.useState({inView:!!a,entry:void 0});M.current=p,w.useEffect(()=>{if(N.current===void 0&&(N.current=a),u||!y)return;let E;return E=J(y,(b,_)=>{const S=N.current;N.current=b,!(S===void 0&&!b)&&(D({inView:b,entry:_}),M.current&&M.current(b,_),_.isIntersecting&&d&&E&&(E(),E=void 0))},{root:l,rootMargin:n,threshold:e,trackVisibility:i,delay:t},o),()=>{E&&E()}},[Array.isArray(e)?e.toString():e,y,l,n,d,u,i,o,t]);const h=(g=j.entry)==null?void 0:g.target,R=w.useRef(void 0);!y&&h&&!d&&!u&&R.current!==h&&(R.current=h,D({inView:!!a,entry:void 0}),N.current=a);const v=[C,j.inView,j.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const Y=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,user_ad_token:e.user_ad_token}})).data.result}catch{}return m.axios.get(e.url,{params:{ad_id:e.ad_id}}).then(t=>t.data.result)},Z=60,ee={dedupingInterval:1e3*60*Z},se=(e,t)=>{const{data:i,error:n,isLoading:l,mutate:d}=m.useSWR(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e,user_ad_token:t}:null,Y,ee);return{data:i,error:n,isLoading:l,mutate:d}};function te(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function re(e,t){return+m.toDate(e)-+m.toDate(t)}function V(e,t,i){const n=re(e,t)/m.millisecondsInMinute;return te(i?.roundingMethod)(n)}function L(e){return Math.trunc(e*m.millisecondsInMinute)}const ne=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)},B=60,oe={dedupingInterval:L(B),focusThrottleInterval:L(B)},ie=e=>{const{data:t,error:i,isLoading:n,mutate:l}=m.useSWR({url:"https://articles.media/api/ads"},ne,oe);return{data:t,error:i,isLoading:n,mutate:l}},ae=c.lazy(()=>Promise.resolve().then(()=>require("./AdDetailsModal-Diavle2E.cjs"))),ce=c.lazy(()=>Promise.resolve().then(()=>require("./AdConfirmExitModal-BRpOrF3L.cjs")));function le(e,t){return Math.floor(Math.random()*(t-e+1))+e}function de(e){const i=[],{data:n}=ie();let{previewMode:l,darkMode:d,user_ad_token:u,userDetails:a}=e,o=e.previewData||{};const[p,g]=c.useState(null),[y,C]=c.useState(null),[M,N]=c.useState(null),[j,D]=c.useState(null),[h,R]=c.useState(0),[v,E]=c.useState(!1),[b,_]=c.useState(!1),[S,$]=c.useState(!1),[xe,me]=c.useState(new Date),[O,q]=c.useState([]),{data:r}=se(p,u);c.useEffect(()=>{n&&n?.length>0&&!p&&(console.log("Ad Mounted or reduxAds changed"),g(e.ad_id||n[le(0,n?.length-1)]?._id))},[n]),c.useEffect(()=>{},[r]),c.useEffect(()=>{r?.populated_promos&&h>=0&&D(r?.populated_promos[h])},[h,r]);function z(){_(!b)}const{ref:U,inView:k}=Q({threshold:0,triggerOnce:!0});function P(x){if(l&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),O.find(f=>f==x)){console.log("Already logged this event");return}m.axios.get("/api/ads/event",{params:{ad_id:r?._id,event:x}}).then(function(f){q([...O,x]),console.log(f.data)}).catch(function(f){console.log(f)})}return c.useEffect(()=>{if(!l&&(console.log("inView",k),k&&p)){let x=[{ad_id:p,date:new Date().toString()},...i.filter(f=>{if(console.log(V(new Date,new Date(f.date))),V(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",x)}},[k,p]),s.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:[b&&s.jsxRuntimeExports.jsx(ae,{setModalShow:_,ad:r,previewData:o}),S&&s.jsxRuntimeExports.jsx(ce,{setModalShow:$,ad:r,previewData:o}),s.jsxRuntimeExports.jsx("div",{className:"ad",children:a?.articles_membership?.status!=="Active"&&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:[j&&s.jsxRuntimeExports.jsx("div",{className:"promos-wrap",children:j&&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:j.title}),s.jsxRuntimeExports.jsx("div",{className:"small",children:s.jsxRuntimeExports.jsx("div",{className:"small",children:j.details})})]}),s.jsxRuntimeExports.jsx(W.ArticlesButton,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),E(!0)},children:"Save"})]},j._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:()=>{h==0?R(r?.populated_promos?.length-1):R(x=>x-1)}}),r?.populated_promos?.map((x,f)=>s.jsxRuntimeExports.jsx("i",{className:`fa-square ${f==h?"fad":"fas"}`},x._id)),s.jsxRuntimeExports.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{h==r?.populated_promos?.length-1?R(0):R(x=>x+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:()=>{z(),P("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:x=>{x.preventDefault(),$(!0),P("Confirm Exit Modal Opened")},children:s.jsxRuntimeExports.jsx("div",{children:"Website"})})]})]})}),!l&&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 ue=c.memo(de);module.exports=ue;
|
package/dist/Ad.js
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-tc70JA_2.js";
|
|
2
|
-
import * as
|
|
3
|
-
import { lazy as
|
|
4
|
-
import { u as
|
|
5
|
-
import { A as
|
|
6
|
-
var S = /* @__PURE__ */ new Map(),
|
|
7
|
-
function Y(e) {
|
|
8
|
-
return e ? (R.has(e) || (O += 1, R.set(e, O.toString())), R.get(e)) : "0";
|
|
9
|
-
}
|
|
2
|
+
import * as A from "react";
|
|
3
|
+
import { lazy as W, memo as H, useState as p, useEffect as E } from "react";
|
|
4
|
+
import { u as z, a as M, t as O, m as q, L as J } from "./toDate-CDo8dBwb.js";
|
|
5
|
+
import { A as Q } from "./Button-B5nVYPMZ.js";
|
|
6
|
+
var S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new WeakMap(), T = 0, Y;
|
|
10
7
|
function Z(e) {
|
|
8
|
+
return e ? (I.has(e) || (T += 1, I.set(e, T.toString())), I.get(e)) : "0";
|
|
9
|
+
}
|
|
10
|
+
function ee(e) {
|
|
11
11
|
return Object.keys(e).sort().filter(
|
|
12
12
|
(t) => e[t] !== void 0
|
|
13
|
-
).map((t) => `${t}_${t === "root" ?
|
|
13
|
+
).map((t) => `${t}_${t === "root" ? Z(e.root) : e[t]}`).toString();
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const t =
|
|
15
|
+
function se(e) {
|
|
16
|
+
const t = ee(e);
|
|
17
17
|
let a = S.get(t);
|
|
18
18
|
if (!a) {
|
|
19
19
|
const n = /* @__PURE__ */ new Map();
|
|
20
20
|
let d;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
const
|
|
25
|
-
e.trackVisibility && typeof i.isVisible > "u" && (i.isVisible =
|
|
26
|
-
|
|
21
|
+
const c = new IntersectionObserver((l) => {
|
|
22
|
+
l.forEach((i) => {
|
|
23
|
+
var o;
|
|
24
|
+
const f = i.isIntersecting && d.some((v) => i.intersectionRatio >= v);
|
|
25
|
+
e.trackVisibility && typeof i.isVisible > "u" && (i.isVisible = f), (o = n.get(i.target)) == null || o.forEach((v) => {
|
|
26
|
+
v(f, i);
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
}, e);
|
|
30
|
-
d =
|
|
30
|
+
d = c.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), a = {
|
|
31
31
|
id: t,
|
|
32
|
-
observer:
|
|
32
|
+
observer: c,
|
|
33
33
|
elements: n
|
|
34
34
|
}, S.set(t, a);
|
|
35
35
|
}
|
|
36
36
|
return a;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function te(e, t, a = {}, n = Y) {
|
|
39
39
|
if (typeof window.IntersectionObserver > "u" && n !== void 0) {
|
|
40
|
-
const
|
|
40
|
+
const o = e.getBoundingClientRect();
|
|
41
41
|
return t(n, {
|
|
42
42
|
isIntersecting: n,
|
|
43
43
|
target: e,
|
|
44
44
|
intersectionRatio: typeof a.threshold == "number" ? a.threshold : 0,
|
|
45
45
|
time: 0,
|
|
46
|
-
boundingClientRect:
|
|
47
|
-
intersectionRect:
|
|
48
|
-
rootBounds:
|
|
46
|
+
boundingClientRect: o,
|
|
47
|
+
intersectionRect: o,
|
|
48
|
+
rootBounds: o
|
|
49
49
|
}), () => {
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
const { id: d, observer:
|
|
53
|
-
return
|
|
54
|
-
i.splice(i.indexOf(t), 1), i.length === 0 && (
|
|
52
|
+
const { id: d, observer: c, elements: l } = se(a), i = l.get(e) || [];
|
|
53
|
+
return l.has(e) || l.set(e, i), i.push(t), c.observe(e), function() {
|
|
54
|
+
i.splice(i.indexOf(t), 1), i.length === 0 && (l.delete(e), c.unobserve(e)), l.size === 0 && (c.disconnect(), S.delete(d));
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function re({
|
|
58
58
|
threshold: e,
|
|
59
59
|
delay: t,
|
|
60
60
|
trackVisibility: a,
|
|
61
61
|
rootMargin: n,
|
|
62
62
|
root: d,
|
|
63
|
-
triggerOnce:
|
|
64
|
-
skip:
|
|
63
|
+
triggerOnce: c,
|
|
64
|
+
skip: l,
|
|
65
65
|
initialInView: i,
|
|
66
|
-
fallbackInView:
|
|
67
|
-
onChange:
|
|
66
|
+
fallbackInView: o,
|
|
67
|
+
onChange: f
|
|
68
68
|
} = {}) {
|
|
69
|
-
var
|
|
70
|
-
const [
|
|
69
|
+
var v;
|
|
70
|
+
const [y, $] = A.useState(null), D = A.useRef(f), _ = A.useRef(i), [g, k] = A.useState({
|
|
71
71
|
inView: !!i,
|
|
72
72
|
entry: void 0
|
|
73
73
|
});
|
|
74
|
-
|
|
74
|
+
D.current = f, A.useEffect(
|
|
75
75
|
() => {
|
|
76
|
-
if (
|
|
77
|
-
let
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
(
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
inView:
|
|
84
|
-
entry:
|
|
85
|
-
}),
|
|
76
|
+
if (_.current === void 0 && (_.current = i), l || !y) return;
|
|
77
|
+
let j;
|
|
78
|
+
return j = te(
|
|
79
|
+
y,
|
|
80
|
+
(b, w) => {
|
|
81
|
+
const R = _.current;
|
|
82
|
+
_.current = b, !(R === void 0 && !b) && (k({
|
|
83
|
+
inView: b,
|
|
84
|
+
entry: w
|
|
85
|
+
}), D.current && D.current(b, w), w.isIntersecting && c && j && (j(), j = void 0));
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
root: d,
|
|
@@ -92,9 +92,9 @@ function te({
|
|
|
92
92
|
trackVisibility: a,
|
|
93
93
|
delay: t
|
|
94
94
|
},
|
|
95
|
-
|
|
95
|
+
o
|
|
96
96
|
), () => {
|
|
97
|
-
|
|
97
|
+
j && j();
|
|
98
98
|
};
|
|
99
99
|
},
|
|
100
100
|
// We break the rule here, because we aren't including the actual `threshold` variable
|
|
@@ -102,103 +102,105 @@ function te({
|
|
|
102
102
|
[
|
|
103
103
|
// If the threshold is an array, convert it to a string, so it won't change between renders.
|
|
104
104
|
Array.isArray(e) ? e.toString() : e,
|
|
105
|
-
|
|
105
|
+
y,
|
|
106
106
|
d,
|
|
107
107
|
n,
|
|
108
|
-
o,
|
|
109
108
|
c,
|
|
109
|
+
l,
|
|
110
110
|
a,
|
|
111
|
-
|
|
111
|
+
o,
|
|
112
112
|
t
|
|
113
113
|
]
|
|
114
114
|
);
|
|
115
|
-
const
|
|
116
|
-
!
|
|
115
|
+
const h = (v = g.entry) == null ? void 0 : v.target, N = A.useRef(void 0);
|
|
116
|
+
!y && h && !c && !l && N.current !== h && (N.current = h, k({
|
|
117
117
|
inView: !!i,
|
|
118
118
|
entry: void 0
|
|
119
|
-
}),
|
|
120
|
-
const
|
|
121
|
-
return
|
|
119
|
+
}), _.current = i);
|
|
120
|
+
const x = [$, g.inView, g.entry];
|
|
121
|
+
return x.ref = x[0], x.inView = x[1], x.entry = x[2], x;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
123
|
+
const oe = async (e) => {
|
|
124
124
|
if (process.env.NODE_ENV === "development")
|
|
125
125
|
try {
|
|
126
|
-
return (await
|
|
126
|
+
return (await M.get(`http://localhost:3001/api/ads/${e.ad_id}`, {
|
|
127
127
|
params: {
|
|
128
|
-
ad_id: e.ad_id
|
|
128
|
+
ad_id: e.ad_id,
|
|
129
|
+
user_ad_token: e.user_ad_token
|
|
129
130
|
}
|
|
130
131
|
})).data.result;
|
|
131
132
|
} catch {
|
|
132
133
|
}
|
|
133
|
-
return
|
|
134
|
+
return M.get(e.url, {
|
|
134
135
|
params: {
|
|
135
136
|
ad_id: e.ad_id
|
|
136
137
|
}
|
|
137
138
|
}).then((t) => t.data.result);
|
|
138
|
-
},
|
|
139
|
-
dedupingInterval: 1e3 * 60 *
|
|
139
|
+
}, ne = 60, ae = {
|
|
140
|
+
dedupingInterval: 1e3 * 60 * ne
|
|
140
141
|
// keepPreviousData: true,
|
|
141
142
|
// fallbackData: []
|
|
142
|
-
},
|
|
143
|
-
const { data:
|
|
143
|
+
}, ie = (e, t) => {
|
|
144
|
+
const { data: a, error: n, isLoading: d, mutate: c } = z(
|
|
144
145
|
e ? {
|
|
145
146
|
url: `https://articles.media/api/ads/${e}`,
|
|
146
|
-
ad_id: e
|
|
147
|
+
ad_id: e,
|
|
148
|
+
user_ad_token: t
|
|
147
149
|
} : null,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
oe,
|
|
151
|
+
ae
|
|
150
152
|
);
|
|
151
153
|
return {
|
|
152
|
-
data:
|
|
153
|
-
error:
|
|
154
|
-
isLoading:
|
|
155
|
-
mutate:
|
|
154
|
+
data: a,
|
|
155
|
+
error: n,
|
|
156
|
+
isLoading: d,
|
|
157
|
+
mutate: c
|
|
156
158
|
};
|
|
157
159
|
};
|
|
158
|
-
function
|
|
160
|
+
function de(e) {
|
|
159
161
|
return (t) => {
|
|
160
162
|
const n = (e ? Math[e] : Math.trunc)(t);
|
|
161
163
|
return n === 0 ? 0 : n;
|
|
162
164
|
};
|
|
163
165
|
}
|
|
164
166
|
function ce(e, t) {
|
|
165
|
-
return +
|
|
167
|
+
return +O(e) - +O(t);
|
|
166
168
|
}
|
|
167
|
-
function
|
|
168
|
-
const n = ce(e, t) /
|
|
169
|
-
return
|
|
169
|
+
function B(e, t, a) {
|
|
170
|
+
const n = ce(e, t) / q;
|
|
171
|
+
return de(a?.roundingMethod)(n);
|
|
170
172
|
}
|
|
171
|
-
function
|
|
172
|
-
return Math.trunc(e *
|
|
173
|
+
function U(e) {
|
|
174
|
+
return Math.trunc(e * q);
|
|
173
175
|
}
|
|
174
|
-
const
|
|
176
|
+
const le = async (e) => {
|
|
175
177
|
if (process.env.NODE_ENV === "development")
|
|
176
178
|
try {
|
|
177
|
-
return (await
|
|
179
|
+
return (await M.get("http://localhost:3001/api/ads", {
|
|
178
180
|
params: {
|
|
179
181
|
// ad_id: data.ad_id
|
|
180
182
|
}
|
|
181
183
|
})).data;
|
|
182
184
|
} catch {
|
|
183
185
|
}
|
|
184
|
-
return
|
|
186
|
+
return M.get(e.url, {
|
|
185
187
|
params: {
|
|
186
188
|
// ad_id: data.ad_id
|
|
187
189
|
}
|
|
188
190
|
}).then((t) => t.data);
|
|
189
|
-
},
|
|
190
|
-
dedupingInterval:
|
|
191
|
-
focusThrottleInterval:
|
|
191
|
+
}, X = 60, ue = {
|
|
192
|
+
dedupingInterval: U(X),
|
|
193
|
+
focusThrottleInterval: U(X)
|
|
192
194
|
// keepPreviousData: true,
|
|
193
195
|
// fallbackData: []
|
|
194
|
-
},
|
|
195
|
-
const { data: t, error: a, isLoading: n, mutate: d } =
|
|
196
|
+
}, fe = (e) => {
|
|
197
|
+
const { data: t, error: a, isLoading: n, mutate: d } = z(
|
|
196
198
|
{
|
|
197
199
|
url: "https://articles.media/api/ads"
|
|
198
200
|
// ad_id
|
|
199
201
|
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
+
le,
|
|
203
|
+
ue
|
|
202
204
|
);
|
|
203
205
|
return {
|
|
204
206
|
data: t,
|
|
@@ -206,69 +208,74 @@ const de = async (e) => {
|
|
|
206
208
|
isLoading: n,
|
|
207
209
|
mutate: d
|
|
208
210
|
};
|
|
209
|
-
},
|
|
210
|
-
function
|
|
211
|
+
}, me = W(() => import("./AdDetailsModal-CvFpYG_9.js")), he = W(() => import("./AdConfirmExitModal-TTHQo9Ou.js"));
|
|
212
|
+
function pe(e, t) {
|
|
211
213
|
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
212
214
|
}
|
|
213
|
-
function
|
|
215
|
+
function ge(e) {
|
|
214
216
|
const a = [], {
|
|
215
217
|
data: n
|
|
216
|
-
} =
|
|
217
|
-
let {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
218
|
+
} = fe();
|
|
219
|
+
let {
|
|
220
|
+
previewMode: d,
|
|
221
|
+
darkMode: c,
|
|
222
|
+
user_ad_token: l,
|
|
223
|
+
userDetails: i
|
|
224
|
+
} = e, o = e.previewData || {};
|
|
225
|
+
const [f, v] = p(null), [y, $] = p(null), [D, _] = p(null), [g, k] = p(null), [h, N] = p(0), [x, j] = p(!1), [b, w] = p(!1), [R, L] = p(!1), [ve, xe] = p(/* @__PURE__ */ new Date()), [P, K] = p([]), { data: r } = ie(f, l);
|
|
226
|
+
E(() => {
|
|
227
|
+
n && n?.length > 0 && !f && (console.log("Ad Mounted or reduxAds changed"), v(e.ad_id || n[pe(0, n?.length - 1)]?._id));
|
|
228
|
+
}, [n]), E(() => {
|
|
229
|
+
}, [r]), E(() => {
|
|
230
|
+
r?.populated_promos && h >= 0 && k(r?.populated_promos[h]);
|
|
231
|
+
}, [h, r]);
|
|
232
|
+
function F() {
|
|
233
|
+
w(!b);
|
|
227
234
|
}
|
|
228
|
-
const { ref:
|
|
235
|
+
const { ref: G, inView: C } = re({
|
|
229
236
|
/* Optional options */
|
|
230
237
|
threshold: 0,
|
|
231
238
|
triggerOnce: !0
|
|
232
239
|
});
|
|
233
|
-
function
|
|
234
|
-
if (d && console.log("Preventing this event from being logged as this ad is being shown in preview mode."),
|
|
240
|
+
function V(u) {
|
|
241
|
+
if (d && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), P.find((m) => m == u)) {
|
|
235
242
|
console.log("Already logged this event");
|
|
236
243
|
return;
|
|
237
244
|
}
|
|
238
|
-
|
|
245
|
+
M.get("/api/ads/event", {
|
|
239
246
|
params: {
|
|
240
247
|
ad_id: r?._id,
|
|
241
|
-
event:
|
|
248
|
+
event: u
|
|
242
249
|
}
|
|
243
250
|
}).then(function(m) {
|
|
244
|
-
|
|
251
|
+
K([...P, u]), console.log(m.data);
|
|
245
252
|
}).catch(function(m) {
|
|
246
253
|
console.log(m);
|
|
247
254
|
});
|
|
248
255
|
}
|
|
249
|
-
return
|
|
250
|
-
if (!d && (console.log("inView", C), C &&
|
|
251
|
-
let
|
|
256
|
+
return E(() => {
|
|
257
|
+
if (!d && (console.log("inView", C), C && f)) {
|
|
258
|
+
let u = [
|
|
252
259
|
{
|
|
253
|
-
ad_id:
|
|
260
|
+
ad_id: f,
|
|
254
261
|
date: (/* @__PURE__ */ new Date()).toString()
|
|
255
262
|
},
|
|
256
263
|
...a.filter((m) => {
|
|
257
264
|
if (console.log(
|
|
258
|
-
|
|
259
|
-
),
|
|
265
|
+
B(/* @__PURE__ */ new Date(), new Date(m.date))
|
|
266
|
+
), B(/* @__PURE__ */ new Date(), new Date(m.date)) > 5) {
|
|
260
267
|
console.log("adsViewed - Remove Old Ad View Object");
|
|
261
268
|
return;
|
|
262
269
|
} else
|
|
263
270
|
return console.log("adsViewed - Keep Ad View Object"), m;
|
|
264
271
|
})
|
|
265
272
|
];
|
|
266
|
-
console.log("unexpiredRecentViews",
|
|
273
|
+
console.log("unexpiredRecentViews", u);
|
|
267
274
|
}
|
|
268
|
-
}, [C,
|
|
275
|
+
}, [C, f]), /* @__PURE__ */ s.jsxs(
|
|
269
276
|
"div",
|
|
270
277
|
{
|
|
271
|
-
ref:
|
|
278
|
+
ref: G,
|
|
272
279
|
className: "ad-wrap",
|
|
273
280
|
style: {
|
|
274
281
|
"--articles-ad-background-color": o.background_color || r?.background_color,
|
|
@@ -276,18 +283,18 @@ function pe(e) {
|
|
|
276
283
|
"--articles-ad-border-color": o.border_color || r?.border_color
|
|
277
284
|
},
|
|
278
285
|
children: [
|
|
279
|
-
|
|
280
|
-
|
|
286
|
+
b && /* @__PURE__ */ s.jsx(
|
|
287
|
+
me,
|
|
281
288
|
{
|
|
282
|
-
setModalShow:
|
|
289
|
+
setModalShow: w,
|
|
283
290
|
ad: r,
|
|
284
291
|
previewData: o
|
|
285
292
|
}
|
|
286
293
|
),
|
|
287
|
-
|
|
288
|
-
|
|
294
|
+
R && /* @__PURE__ */ s.jsx(
|
|
295
|
+
he,
|
|
289
296
|
{
|
|
290
|
-
setModalShow:
|
|
297
|
+
setModalShow: L,
|
|
291
298
|
ad: r,
|
|
292
299
|
previewData: o
|
|
293
300
|
}
|
|
@@ -296,7 +303,7 @@ function pe(e) {
|
|
|
296
303
|
"div",
|
|
297
304
|
{
|
|
298
305
|
className: "ad",
|
|
299
|
-
children: /* @__PURE__ */ s.jsxs(
|
|
306
|
+
children: i?.articles_membership?.status !== "Active" && /* @__PURE__ */ s.jsxs(
|
|
300
307
|
"div",
|
|
301
308
|
{
|
|
302
309
|
className: "main-panel",
|
|
@@ -347,29 +354,29 @@ function pe(e) {
|
|
|
347
354
|
] })
|
|
348
355
|
] }),
|
|
349
356
|
(!1)?.roles?.isDev && r?.populated_promos?.length > 0 && /* @__PURE__ */ s.jsxs("div", { children: [
|
|
350
|
-
|
|
357
|
+
g && /* @__PURE__ */ s.jsx("div", { className: "promos-wrap", children: g && /* @__PURE__ */ s.jsxs(
|
|
351
358
|
"div",
|
|
352
359
|
{
|
|
353
360
|
className: "promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",
|
|
354
361
|
children: [
|
|
355
362
|
/* @__PURE__ */ s.jsxs("div", { className: "", children: [
|
|
356
|
-
/* @__PURE__ */ s.jsx("div", { children:
|
|
357
|
-
/* @__PURE__ */ s.jsx("div", { className: "small", children: /* @__PURE__ */ s.jsx("div", { className: "small", children:
|
|
363
|
+
/* @__PURE__ */ s.jsx("div", { children: g.title }),
|
|
364
|
+
/* @__PURE__ */ s.jsx("div", { className: "small", children: /* @__PURE__ */ s.jsx("div", { className: "small", children: g.details }) })
|
|
358
365
|
] }),
|
|
359
366
|
/* @__PURE__ */ s.jsx(
|
|
360
|
-
|
|
367
|
+
Q,
|
|
361
368
|
{
|
|
362
369
|
className: "px-3",
|
|
363
370
|
small: !0,
|
|
364
371
|
onClick: () => {
|
|
365
|
-
console.log("Load Save Modal"),
|
|
372
|
+
console.log("Load Save Modal"), j(!0);
|
|
366
373
|
},
|
|
367
374
|
children: "Save"
|
|
368
375
|
}
|
|
369
376
|
)
|
|
370
377
|
]
|
|
371
378
|
},
|
|
372
|
-
|
|
379
|
+
g._id
|
|
373
380
|
) }),
|
|
374
381
|
/* @__PURE__ */ s.jsxs("div", { className: "d-flex justify-content-between", children: [
|
|
375
382
|
/* @__PURE__ */ s.jsxs("div", { className: "px-2", children: [
|
|
@@ -383,17 +390,17 @@ function pe(e) {
|
|
|
383
390
|
className: "fad fa-arrow-circle-left",
|
|
384
391
|
type: "button",
|
|
385
392
|
onClick: () => {
|
|
386
|
-
|
|
393
|
+
h == 0 ? N(r?.populated_promos?.length - 1) : N((u) => u - 1);
|
|
387
394
|
}
|
|
388
395
|
}
|
|
389
396
|
),
|
|
390
397
|
r?.populated_promos?.map(
|
|
391
|
-
(
|
|
398
|
+
(u, m) => /* @__PURE__ */ s.jsx(
|
|
392
399
|
"i",
|
|
393
400
|
{
|
|
394
|
-
className: `fa-square ${m ==
|
|
401
|
+
className: `fa-square ${m == h ? "fad" : "fas"}`
|
|
395
402
|
},
|
|
396
|
-
|
|
403
|
+
u._id
|
|
397
404
|
)
|
|
398
405
|
),
|
|
399
406
|
/* @__PURE__ */ s.jsx(
|
|
@@ -402,7 +409,7 @@ function pe(e) {
|
|
|
402
409
|
className: "fad fa-arrow-circle-right",
|
|
403
410
|
type: "button",
|
|
404
411
|
onClick: () => {
|
|
405
|
-
|
|
412
|
+
h == r?.populated_promos?.length - 1 ? N(0) : N((u) => u + 1);
|
|
406
413
|
}
|
|
407
414
|
}
|
|
408
415
|
)
|
|
@@ -415,7 +422,7 @@ function pe(e) {
|
|
|
415
422
|
"div",
|
|
416
423
|
{
|
|
417
424
|
onClick: () => {
|
|
418
|
-
|
|
425
|
+
F(), V("Details");
|
|
419
426
|
},
|
|
420
427
|
className: "action flex-grow-1 flex-shrink-0",
|
|
421
428
|
children: "Details"
|
|
@@ -429,8 +436,8 @@ function pe(e) {
|
|
|
429
436
|
href: r?.website,
|
|
430
437
|
target: "_blank",
|
|
431
438
|
rel: "noreferrer",
|
|
432
|
-
onClick: (
|
|
433
|
-
|
|
439
|
+
onClick: (u) => {
|
|
440
|
+
u.preventDefault(), L(!0), V("Confirm Exit Modal Opened");
|
|
434
441
|
},
|
|
435
442
|
children: /* @__PURE__ */ s.jsx("div", { children: "Website" })
|
|
436
443
|
}
|
|
@@ -452,7 +459,7 @@ function pe(e) {
|
|
|
452
459
|
borderColor: o.border_color || r?.border_color
|
|
453
460
|
},
|
|
454
461
|
children: /* @__PURE__ */ s.jsxs(
|
|
455
|
-
|
|
462
|
+
J,
|
|
456
463
|
{
|
|
457
464
|
className: "small d-block w-100 text-center",
|
|
458
465
|
href: "https://articles.media/advertising",
|
|
@@ -469,7 +476,7 @@ function pe(e) {
|
|
|
469
476
|
}
|
|
470
477
|
);
|
|
471
478
|
}
|
|
472
|
-
const
|
|
479
|
+
const we = H(ge);
|
|
473
480
|
export {
|
|
474
|
-
|
|
481
|
+
we as default
|
|
475
482
|
};
|
|
@@ -3,7 +3,7 @@ import { useEffect as t } from "react";
|
|
|
3
3
|
import { L as n } from "./toDate-CDo8dBwb.js";
|
|
4
4
|
import { M as i } from "./Modal-CZ77qLgM.js";
|
|
5
5
|
import { A as l } from "./Button-B5nVYPMZ.js";
|
|
6
|
-
function
|
|
6
|
+
function b(d) {
|
|
7
7
|
let { setModalShow: r, ad: e, previewData: c } = d;
|
|
8
8
|
t(() => {
|
|
9
9
|
console.log("Mounted");
|
|
@@ -29,7 +29,7 @@ function u(d) {
|
|
|
29
29
|
children: [
|
|
30
30
|
/* @__PURE__ */ s.jsxs("p", { className: "mb-1", children: [
|
|
31
31
|
"Advertiser: ",
|
|
32
|
-
/* @__PURE__ */ s.jsx("b", { children: e
|
|
32
|
+
/* @__PURE__ */ s.jsx("b", { children: e?.business })
|
|
33
33
|
] }),
|
|
34
34
|
/* @__PURE__ */ s.jsxs("p", { className: "mb-0", children: [
|
|
35
35
|
"Ad ID: ",
|
|
@@ -40,14 +40,14 @@ function u(d) {
|
|
|
40
40
|
e.city ? /* @__PURE__ */ s.jsxs("div", { children: [
|
|
41
41
|
/* @__PURE__ */ s.jsx("div", { className: "h4 mb-1", children: e.business }),
|
|
42
42
|
/* @__PURE__ */ s.jsx("div", { children: "Is advertising to all zip codes within a" }),
|
|
43
|
-
/* @__PURE__ */ s.jsx("span", { children: /* @__PURE__ */ s.jsx("div", { className: "badge bg-
|
|
43
|
+
/* @__PURE__ */ s.jsx("span", { children: /* @__PURE__ */ s.jsx("div", { className: "badge bg-black shadow-articles", children: "15 Mile Radius" }) }),
|
|
44
44
|
/* @__PURE__ */ s.jsx("div", { children: "of it's business" }),
|
|
45
45
|
/* @__PURE__ */ s.jsx("hr", { className: "border w-50 border-white" }),
|
|
46
46
|
/* @__PURE__ */ s.jsxs("div", { className: "d-flex align-items-center", children: [
|
|
47
47
|
/* @__PURE__ */ s.jsx("div", { children: "Your Zip code" }),
|
|
48
|
-
/* @__PURE__ */ s.jsx("div", { className: "badge bg-
|
|
48
|
+
/* @__PURE__ */ s.jsx("div", { className: "badge bg-black shadow-articles ms-2", children: "00000" }),
|
|
49
49
|
/* @__PURE__ */ s.jsx("div", { className: "ms-2", children: "is" }),
|
|
50
|
-
/* @__PURE__ */ s.jsx("div", { className: "badge bg-
|
|
50
|
+
/* @__PURE__ */ s.jsx("div", { className: "badge bg-black shadow-articles ms-2", children: "4.2 miles away" })
|
|
51
51
|
] })
|
|
52
52
|
] }) : /* @__PURE__ */ s.jsxs("div", { children: [
|
|
53
53
|
/* @__PURE__ */ s.jsx("div", { className: "h4 mb-1", children: e.business }),
|
|
@@ -79,5 +79,5 @@ function u(d) {
|
|
|
79
79
|
) });
|
|
80
80
|
}
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
b as default
|
|
83
83
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-nZSsnGb7.cjs"),o=require("react"),x=require("./toDate-CzgAa_PT.cjs"),t=require("./Modal-Cr0uB770.cjs"),r=require("./Button-BVYvDTtH.cjs");function d(n){let{setModalShow:a,ad:e,previewData:l}=n;o.useEffect(()=>{console.log("Mounted")},[]);const i=()=>{a(!1)};return s.jsxRuntimeExports.jsx("div",{children:s.jsxRuntimeExports.jsxs(t.Modal,{show:!0,backdropClassName:"ad-details-modal-backdrop",className:"articles-modal",centered:!0,onHide:i,size:"md",children:[s.jsxRuntimeExports.jsx(t.Modal.Header,{className:"align-items-center",closeButton:!0,children:s.jsxRuntimeExports.jsx(t.Modal.Title,{children:"Ad Details"})}),s.jsxRuntimeExports.jsxs(t.Modal.Body,{className:"",children:[s.jsxRuntimeExports.jsxs("p",{className:"mb-1",children:["Advertiser: ",s.jsxRuntimeExports.jsx("b",{children:e?.business})]}),s.jsxRuntimeExports.jsxs("p",{className:"mb-0",children:["Ad ID: ",s.jsxRuntimeExports.jsx("b",{children:l?._id||e._id})]}),s.jsxRuntimeExports.jsx("hr",{}),s.jsxRuntimeExports.jsx("div",{className:"mb-1",children:"This ad is being shown to you for the following reasons"}),e.city?s.jsxRuntimeExports.jsxs("div",{children:[s.jsxRuntimeExports.jsx("div",{className:"h4 mb-1",children:e.business}),s.jsxRuntimeExports.jsx("div",{children:"Is advertising to all zip codes within a"}),s.jsxRuntimeExports.jsx("span",{children:s.jsxRuntimeExports.jsx("div",{className:"badge bg-black shadow-articles",children:"15 Mile Radius"})}),s.jsxRuntimeExports.jsx("div",{children:"of it's business"}),s.jsxRuntimeExports.jsx("hr",{className:"border w-50 border-white"}),s.jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center",children:[s.jsxRuntimeExports.jsx("div",{children:"Your Zip code"}),s.jsxRuntimeExports.jsx("div",{className:"badge bg-black shadow-articles ms-2",children:"00000"}),s.jsxRuntimeExports.jsx("div",{className:"ms-2",children:"is"}),s.jsxRuntimeExports.jsx("div",{className:"badge bg-black shadow-articles ms-2",children:"4.2 miles away"})]})]}):s.jsxRuntimeExports.jsxs("div",{children:[s.jsxRuntimeExports.jsx("div",{className:"h4 mb-1",children:e.business}),s.jsxRuntimeExports.jsx("div",{children:"Is advertising to all users"})]}),s.jsxRuntimeExports.jsx("div",{className:"grow"}),s.jsxRuntimeExports.jsx("hr",{className:"w-100"}),s.jsxRuntimeExports.jsx("div",{className:"reason lh-sm mb-2",children:"Ads we display to you will always be transparent as to why you are seeing them."}),s.jsxRuntimeExports.jsx(x.Link,{href:"https://articles.media/settings/account",newPage:!0,className:"",children:s.jsxRuntimeExports.jsx(r.ArticlesButton,{small:!0,children:"Settings"})})]}),s.jsxRuntimeExports.jsx(t.Modal.Footer,{className:"d-flex justify-content-center",children:s.jsxRuntimeExports.jsx(r.ArticlesButton,{variant:"articles",onClick:i,children:"Close"})})]})})}exports.default=d;
|
package/dist/GameScoreboard.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./jsx-runtime-nZSsnGb7.cjs"),h=require("react"),j=require("./Modal-Cr0uB770.cjs"),M=require("./toDate-CzgAa_PT.cjs"),S=require("./Button-BVYvDTtH.cjs"),un=require("react-dom");function ln(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ce=ln(h);let dn={};function Ie(){return dn}function Se(e,t){const n=Ie(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=M.toDate(e,t?.in),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function Ye(e,t){return Se(e,{...t,weekStartsOn:1})}function Yt(e,t){const n=M.toDate(e,t?.in),r=n.getFullYear(),s=M.constructFrom(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const i=Ye(s),o=M.constructFrom(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const c=Ye(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function vt(e){const t=M.toDate(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fn(e,...t){const n=M.constructFrom.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function gt(e,t){const n=M.toDate(e,t?.in);return n.setHours(0,0,0,0),n}function mn(e,t,n){const[r,s]=fn(n?.in,e,t),i=gt(r),o=gt(s),c=+i-vt(i),u=+o-vt(o);return Math.round((c-u)/M.millisecondsInDay)}function pn(e,t){const n=Yt(e,t),r=M.constructFrom(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ye(r)}function hn(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xn(e){return!(!hn(e)&&typeof e!="number"||isNaN(+M.toDate(e)))}function vn(e,t){const n=M.toDate(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const gn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bn=(e,t,n)=>{let r;const s=gn[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Qe(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const yn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},En={date:Qe({formats:yn,defaultWidth:"full"}),time:Qe({formats:jn,defaultWidth:"full"}),dateTime:Qe({formats:wn,defaultWidth:"full"})},Rn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},On=(e,t,n,r)=>Rn[e];function Re(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):o;s=e.formattingValues[c]||e.formattingValues[o]}else{const o=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;s=e.values[c]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const Nn={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Dn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Sn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},_n=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Cn={ordinalNumber:_n,era:Re({values:Nn,defaultWidth:"wide"}),quarter:Re({values:Pn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Re({values:Mn,defaultWidth:"wide"}),day:Re({values:Dn,defaultWidth:"wide"}),dayPeriod:Re({values:Sn,defaultWidth:"wide",formattingValues:kn,defaultFormattingWidth:"wide"})};function Oe(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?An(c,m=>m.test(o)):Tn(c,m=>m.test(o));let f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;const l=t.slice(o.length);return{value:f,rest:l}}}function Tn(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function An(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Wn(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const c=t.slice(s.length);return{value:o,rest:c}}}const Bn=/^(\d+)(th|st|nd|rd)?/i,Fn=/\d+/i,$n={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ln={any:[/^b/i,/^(a|c)/i]},Yn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Un={any:[/1/i,/2/i,/3/i,/4/i]},In={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},qn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qn={ordinalNumber:Wn({matchPattern:Bn,parsePattern:Fn,valueCallback:e=>parseInt(e,10)}),era:Oe({matchPatterns:$n,defaultMatchWidth:"wide",parsePatterns:Ln,defaultParseWidth:"any"}),quarter:Oe({matchPatterns:Yn,defaultMatchWidth:"wide",parsePatterns:Un,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oe({matchPatterns:In,defaultMatchWidth:"wide",parsePatterns:qn,defaultParseWidth:"any"}),day:Oe({matchPatterns:Hn,defaultMatchWidth:"wide",parsePatterns:Vn,defaultParseWidth:"any"}),dayPeriod:Oe({matchPatterns:Xn,defaultMatchWidth:"any",parsePatterns:zn,defaultParseWidth:"any"})},Gn={code:"en-US",formatDistance:bn,formatLong:En,formatRelative:On,localize:Cn,match:Qn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jn(e,t){const n=M.toDate(e,t?.in);return mn(n,vn(n))+1}function Kn(e,t){const n=M.toDate(e,t?.in),r=+Ye(n)-+pn(n);return Math.round(r/M.millisecondsInWeek)+1}function Ut(e,t){const n=M.toDate(e,t?.in),r=n.getFullYear(),s=Ie(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=M.constructFrom(t?.in||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const c=Se(o,t),u=M.constructFrom(t?.in||e,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const f=Se(u,t);return+n>=+c?r+1:+n>=+f?r:r-1}function Zn(e,t){const n=Ie(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Ut(e,t),i=M.constructFrom(t?.in||e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),Se(i,t)}function er(e,t){const n=M.toDate(e,t?.in),r=+Se(n,t)-+Zn(n,t);return Math.round(r/M.millisecondsInWeek)+1}function D(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const oe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return D(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):D(n+1,2)},d(e,t){return D(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return D(e.getHours()%12||12,t.length)},H(e,t){return D(e.getHours(),t.length)},m(e,t){return D(e.getMinutes(),t.length)},s(e,t){return D(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return D(s,t.length)}},ve={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bt={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return oe.y(e,t)},Y:function(e,t,n,r){const s=Ut(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return D(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):D(i,t.length)},R:function(e,t){const n=Yt(e);return D(n,t.length)},u:function(e,t){const n=e.getFullYear();return D(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return D(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return D(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return oe.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return D(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=er(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):D(s,t.length)},I:function(e,t,n){const r=Kn(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):D(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):oe.d(e,t)},D:function(e,t,n){const r=Jn(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):D(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return D(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return D(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return D(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=ve.noon:r===0?s=ve.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=ve.evening:r>=12?s=ve.afternoon:r>=4?s=ve.morning:s=ve.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return oe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):oe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oe.s(e,t)},S:function(e,t){return oe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return jt(r);case"XXXX":case"XX":return de(r);default:return de(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return jt(r);case"xxxx":case"xx":return de(r);default:return de(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yt(r,":");default:return"GMT"+de(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yt(r,":");default:return"GMT"+de(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return D(r,t.length)},T:function(e,t,n){return D(+e,t.length)}};function yt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+D(i,2)}function jt(e,t){return e%60===0?(e>0?"-":"+")+D(Math.abs(e)/60,2):de(e,t)}function de(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=D(Math.trunc(r/60),2),i=D(r%60,2);return n+s+t+i}const wt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},It=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},tr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return wt(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",wt(r,t)).replace("{{time}}",It(s,t))},nr={p:It,P:tr},rr=/^D+$/,sr=/^Y+$/,ar=["D","DD","YY","YYYY"];function ir(e){return rr.test(e)}function or(e){return sr.test(e)}function cr(e,t,n){const r=ur(e,t,n);if(console.warn(r),ar.includes(e))throw new RangeError(r)}function ur(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fr=/^'([^]*?)'?$/,mr=/''/g,pr=/[a-zA-Z]/;function hr(e,t,n){const r=Ie(),s=r.locale??Gn,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=M.toDate(e,n?.in);if(!xn(c))throw new RangeError("Invalid time value");let u=t.match(dr).map(l=>{const m=l[0];if(m==="p"||m==="P"){const x=nr[m];return x(l,s.formatLong)}return l}).join("").match(lr).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const m=l[0];if(m==="'")return{isToken:!1,value:xr(l)};if(bt[m])return{isToken:!0,value:l};if(m.match(pr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:l}});s.localize.preprocessor&&(u=s.localize.preprocessor(c,u));const f={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return u.map(l=>{if(!l.isToken)return l.value;const m=l.value;(or(m)||ir(m))&&cr(m,t,String(e));const x=bt[m[0]];return x(c,m,s.localize,f)}).join("")}function xr(e){const t=e.match(fr);return t?t[1].replace(mr,"'"):e}function vr(){const e=h.useRef(!0),t=h.useRef(()=>e.current);return h.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}const Ke=2**31-1;function qt(e,t,n){const r=n-Date.now();e.current=r<=Ke?setTimeout(t,r):setTimeout(()=>qt(e,t,n),Ke)}function gr(){const e=vr(),t=h.useRef();return j.useWillUnmount(()=>clearTimeout(t.current)),h.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(s,i=0){e()&&(n(),i<=Ke?t.current=setTimeout(s,i):qt(t,s,Date.now()+i))}return{set:r,clear:n,handleRef:t}},[])}var Ge,Et;function br(){if(Et)return Ge;Et=1;var e=process.env.NODE_ENV!=="production",t=function(){};if(e){var n=function(s,i){var o=arguments.length;i=new Array(o>1?o-1:0);for(var c=1;c<o;c++)i[c-1]=arguments[c];var u=0,f="Warning: "+s.replace(/%s/g,function(){return i[u++]});typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}};t=function(r,s,i){var o=arguments.length;i=new Array(o>2?o-2:0);for(var c=2;c<o;c++)i[c-2]=arguments[c];if(s===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");r||n.apply(null,[s].concat(i))}}return Ge=t,Ge}var yr=br();const Ht=S.getDefaultExportFromCjs(yr);function jr(e,t,n){var r=h.useRef(e!==void 0),s=h.useState(t),i=s[0],o=s[1],c=e!==void 0,u=r.current;return r.current=c,!c&&u&&i!==t&&o(t),[c?e:i,h.useCallback(function(f){for(var l=arguments.length,m=new Array(l>1?l-1:0),x=1;x<l;x++)m[x-1]=arguments[x];n&&n.apply(void 0,[f].concat(m)),o(f)},[n])]}function Rt(){return h.useState(null)}var Ot=Object.prototype.hasOwnProperty;function Nt(e,t,n){for(n of e.keys())if(Pe(n,t))return n}function Pe(e,t){var n,r,s;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Pe(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=Nt(t,s),!s)||!t.has(s))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=Nt(t,s),!s)||!Pe(r[1],t.get(s)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Ot.call(e,n)&&++r&&!Ot.call(t,n)||!(n in t)||!Pe(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function wr(e){const t=j.useMounted();return[e[0],h.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var I="top",z="bottom",Q="right",q="left",tt="auto",Ce=[I,z,Q,q],ge="start",ke="end",Er="clippingParents",Vt="viewport",Ne="popper",Rr="reference",Pt=Ce.reduce(function(e,t){return e.concat([t+"-"+ge,t+"-"+ke])},[]),Xt=[].concat(Ce,[tt]).reduce(function(e,t){return e.concat([t,t+"-"+ge,t+"-"+ke])},[]),Or="beforeRead",Nr="read",Pr="afterRead",Mr="beforeMain",Dr="main",Sr="afterMain",kr="beforeWrite",_r="write",Cr="afterWrite",Tr=[Or,Nr,Pr,Mr,Dr,Sr,kr,_r,Cr];function K(e){return e.split("-")[0]}function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function me(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function Z(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function nt(e){if(typeof ShadowRoot>"u")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var fe=Math.max,Ue=Math.min,be=Math.round;function Ze(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zt(){return!/^((?!chrome|android).)*safari/i.test(Ze())}function ye(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),s=1,i=1;t&&Z(e)&&(s=e.offsetWidth>0&&be(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&be(r.height)/e.offsetHeight||1);var o=me(e)?H(e):window,c=o.visualViewport,u=!zt()&&n,f=(r.left+(u&&c?c.offsetLeft:0))/s,l=(r.top+(u&&c?c.offsetTop:0))/i,m=r.width/s,x=r.height/i;return{width:m,height:x,top:l,right:f+m,bottom:l+x,left:f,x:f,y:l}}function rt(e){var t=ye(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Qt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&nt(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ue(e){return e?(e.nodeName||"").toLowerCase():null}function se(e){return H(e).getComputedStyle(e)}function Ar(e){return["table","td","th"].indexOf(ue(e))>=0}function le(e){return((me(e)?e.ownerDocument:e.document)||window.document).documentElement}function qe(e){return ue(e)==="html"?e:e.assignedSlot||e.parentNode||(nt(e)?e.host:null)||le(e)}function Mt(e){return!Z(e)||se(e).position==="fixed"?null:e.offsetParent}function Wr(e){var t=/firefox/i.test(Ze()),n=/Trident/i.test(Ze());if(n&&Z(e)){var r=se(e);if(r.position==="fixed")return null}var s=qe(e);for(nt(s)&&(s=s.host);Z(s)&&["html","body"].indexOf(ue(s))<0;){var i=se(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function Te(e){for(var t=H(e),n=Mt(e);n&&Ar(n)&&se(n).position==="static";)n=Mt(n);return n&&(ue(n)==="html"||ue(n)==="body"&&se(n).position==="static")?t:n||Wr(e)||t}function st(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Me(e,t,n){return fe(e,Ue(t,n))}function Br(e,t,n){var r=Me(e,t,n);return r>n?n:r}function Gt(){return{top:0,right:0,bottom:0,left:0}}function Jt(e){return Object.assign({},Gt(),e)}function Kt(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Fr=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Jt(typeof t!="number"?t:Kt(t,Ce))};function $r(e){var t,n=e.state,r=e.name,s=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,c=K(n.placement),u=st(c),f=[q,Q].indexOf(c)>=0,l=f?"height":"width";if(!(!i||!o)){var m=Fr(s.padding,n),x=rt(i),d=u==="y"?I:q,v=u==="y"?z:Q,b=n.rects.reference[l]+n.rects.reference[u]-o[u]-n.rects.popper[l],p=o[u]-n.rects.reference[u],E=Te(i),g=E?u==="y"?E.clientHeight||0:E.clientWidth||0:0,N=b/2-p/2,y=m[d],O=g-x[l]-m[v],R=g/2-x[l]/2+N,P=Me(y,R,O),T=u;n.modifiersData[r]=(t={},t[T]=P,t.centerOffset=P-R,t)}}function Lr(e){var t=e.state,n=e.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||Qt(t.elements.popper,s)&&(t.elements.arrow=s))}const Yr={name:"arrow",enabled:!0,phase:"main",fn:$r,effect:Lr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function je(e){return e.split("-")[1]}var Ur={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ir(e,t){var n=e.x,r=e.y,s=t.devicePixelRatio||1;return{x:be(n*s)/s||0,y:be(r*s)/s||0}}function Dt(e){var t,n=e.popper,r=e.popperRect,s=e.placement,i=e.variation,o=e.offsets,c=e.position,u=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,m=e.isFixed,x=o.x,d=x===void 0?0:x,v=o.y,b=v===void 0?0:v,p=typeof l=="function"?l({x:d,y:b}):{x:d,y:b};d=p.x,b=p.y;var E=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),N=q,y=I,O=window;if(f){var R=Te(n),P="clientHeight",T="clientWidth";if(R===H(n)&&(R=le(n),se(R).position!=="static"&&c==="absolute"&&(P="scrollHeight",T="scrollWidth")),R=R,s===I||(s===q||s===Q)&&i===ke){y=z;var A=m&&R===O&&O.visualViewport?O.visualViewport.height:R[P];b-=A-r.height,b*=u?1:-1}if(s===q||(s===I||s===z)&&i===ke){N=Q;var k=m&&R===O&&O.visualViewport?O.visualViewport.width:R[T];d-=k-r.width,d*=u?1:-1}}var C=Object.assign({position:c},f&&Ur),B=l===!0?Ir({x:d,y:b},H(n)):{x:d,y:b};if(d=B.x,b=B.y,u){var _;return Object.assign({},C,(_={},_[y]=g?"0":"",_[N]=E?"0":"",_.transform=(O.devicePixelRatio||1)<=1?"translate("+d+"px, "+b+"px)":"translate3d("+d+"px, "+b+"px, 0)",_))}return Object.assign({},C,(t={},t[y]=g?b+"px":"",t[N]=E?d+"px":"",t.transform="",t))}function qr(e){var t=e.state,n=e.options,r=n.gpuAcceleration,s=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,c=n.roundOffsets,u=c===void 0?!0:c,f={placement:K(t.placement),variation:je(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Dt(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dt(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Hr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qr,data:{}};var Fe={passive:!0};function Vr(e){var t=e.state,n=e.instance,r=e.options,s=r.scroll,i=s===void 0?!0:s,o=r.resize,c=o===void 0?!0:o,u=H(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach(function(l){l.addEventListener("scroll",n.update,Fe)}),c&&u.addEventListener("resize",n.update,Fe),function(){i&&f.forEach(function(l){l.removeEventListener("scroll",n.update,Fe)}),c&&u.removeEventListener("resize",n.update,Fe)}}const Xr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vr,data:{}};var zr={left:"right",right:"left",bottom:"top",top:"bottom"};function $e(e){return e.replace(/left|right|bottom|top/g,function(t){return zr[t]})}var Qr={start:"end",end:"start"};function St(e){return e.replace(/start|end/g,function(t){return Qr[t]})}function at(e){var t=H(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function it(e){return ye(le(e)).left+at(e).scrollLeft}function Gr(e,t){var n=H(e),r=le(e),s=n.visualViewport,i=r.clientWidth,o=r.clientHeight,c=0,u=0;if(s){i=s.width,o=s.height;var f=zt();(f||!f&&t==="fixed")&&(c=s.offsetLeft,u=s.offsetTop)}return{width:i,height:o,x:c+it(e),y:u}}function Jr(e){var t,n=le(e),r=at(e),s=(t=e.ownerDocument)==null?void 0:t.body,i=fe(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=fe(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),c=-r.scrollLeft+it(e),u=-r.scrollTop;return se(s||n).direction==="rtl"&&(c+=fe(n.clientWidth,s?s.clientWidth:0)-i),{width:i,height:o,x:c,y:u}}function ot(e){var t=se(e),n=t.overflow,r=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function Zt(e){return["html","body","#document"].indexOf(ue(e))>=0?e.ownerDocument.body:Z(e)&&ot(e)?e:Zt(qe(e))}function De(e,t){var n;t===void 0&&(t=[]);var r=Zt(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),i=H(r),o=s?[i].concat(i.visualViewport||[],ot(r)?r:[]):r,c=t.concat(o);return s?c:c.concat(De(qe(o)))}function et(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Kr(e,t){var n=ye(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function kt(e,t,n){return t===Vt?et(Gr(e,n)):me(t)?Kr(t,n):et(Jr(le(e)))}function Zr(e){var t=De(qe(e)),n=["absolute","fixed"].indexOf(se(e).position)>=0,r=n&&Z(e)?Te(e):e;return me(r)?t.filter(function(s){return me(s)&&Qt(s,r)&&ue(s)!=="body"}):[]}function es(e,t,n,r){var s=t==="clippingParents"?Zr(e):[].concat(t),i=[].concat(s,[n]),o=i[0],c=i.reduce(function(u,f){var l=kt(e,f,r);return u.top=fe(l.top,u.top),u.right=Ue(l.right,u.right),u.bottom=Ue(l.bottom,u.bottom),u.left=fe(l.left,u.left),u},kt(e,o,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function en(e){var t=e.reference,n=e.element,r=e.placement,s=r?K(r):null,i=r?je(r):null,o=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,u;switch(s){case I:u={x:o,y:t.y-n.height};break;case z:u={x:o,y:t.y+t.height};break;case Q:u={x:t.x+t.width,y:c};break;case q:u={x:t.x-n.width,y:c};break;default:u={x:t.x,y:t.y}}var f=s?st(s):null;if(f!=null){var l=f==="y"?"height":"width";switch(i){case ge:u[f]=u[f]-(t[l]/2-n[l]/2);break;case ke:u[f]=u[f]+(t[l]/2-n[l]/2);break}}return u}function _e(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=r===void 0?e.placement:r,i=n.strategy,o=i===void 0?e.strategy:i,c=n.boundary,u=c===void 0?Er:c,f=n.rootBoundary,l=f===void 0?Vt:f,m=n.elementContext,x=m===void 0?Ne:m,d=n.altBoundary,v=d===void 0?!1:d,b=n.padding,p=b===void 0?0:b,E=Jt(typeof p!="number"?p:Kt(p,Ce)),g=x===Ne?Rr:Ne,N=e.rects.popper,y=e.elements[v?g:x],O=es(me(y)?y:y.contextElement||le(e.elements.popper),u,l,o),R=ye(e.elements.reference),P=en({reference:R,element:N,placement:s}),T=et(Object.assign({},N,P)),A=x===Ne?T:R,k={top:O.top-A.top+E.top,bottom:A.bottom-O.bottom+E.bottom,left:O.left-A.left+E.left,right:A.right-O.right+E.right},C=e.modifiersData.offset;if(x===Ne&&C){var B=C[s];Object.keys(k).forEach(function(_){var F=[Q,z].indexOf(_)>=0?1:-1,W=[I,z].indexOf(_)>=0?"y":"x";k[_]+=B[W]*F})}return k}function ts(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=n.boundary,i=n.rootBoundary,o=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,f=u===void 0?Xt:u,l=je(r),m=l?c?Pt:Pt.filter(function(v){return je(v)===l}):Ce,x=m.filter(function(v){return f.indexOf(v)>=0});x.length===0&&(x=m);var d=x.reduce(function(v,b){return v[b]=_e(e,{placement:b,boundary:s,rootBoundary:i,padding:o})[K(b)],v},{});return Object.keys(d).sort(function(v,b){return d[v]-d[b]})}function ns(e){if(K(e)===tt)return[];var t=$e(e);return[St(e),t,St(t)]}function rs(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,c=o===void 0?!0:o,u=n.fallbackPlacements,f=n.padding,l=n.boundary,m=n.rootBoundary,x=n.altBoundary,d=n.flipVariations,v=d===void 0?!0:d,b=n.allowedAutoPlacements,p=t.options.placement,E=K(p),g=E===p,N=u||(g||!v?[$e(p)]:ns(p)),y=[p].concat(N).reduce(function(X,J){return X.concat(K(J)===tt?ts(t,{placement:J,boundary:l,rootBoundary:m,padding:f,flipVariations:v,allowedAutoPlacements:b}):J)},[]),O=t.rects.reference,R=t.rects.popper,P=new Map,T=!0,A=y[0],k=0;k<y.length;k++){var C=y[k],B=K(C),_=je(C)===ge,F=[I,z].indexOf(B)>=0,W=F?"width":"height",Y=_e(t,{placement:C,boundary:l,rootBoundary:m,altBoundary:x,padding:f}),V=F?_?Q:q:_?z:I;O[W]>R[W]&&(V=$e(V));var pe=$e(V),ee=[];if(i&&ee.push(Y[B]<=0),c&&ee.push(Y[V]<=0,Y[pe]<=0),ee.every(function(X){return X})){A=C,T=!1;break}P.set(C,ee)}if(T)for(var ae=v?3:1,we=function(J){var te=y.find(function(xe){var ne=P.get(xe);if(ne)return ne.slice(0,J).every(function(Ee){return Ee})});if(te)return A=te,"break"},$=ae;$>0;$--){var he=we($);if(he==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const ss={name:"flip",enabled:!0,phase:"main",fn:rs,requiresIfExists:["offset"],data:{_skip:!1}};function _t(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ct(e){return[I,Q,z,q].some(function(t){return e[t]>=0})}function as(e){var t=e.state,n=e.name,r=t.rects.reference,s=t.rects.popper,i=t.modifiersData.preventOverflow,o=_e(t,{elementContext:"reference"}),c=_e(t,{altBoundary:!0}),u=_t(o,r),f=_t(c,s,i),l=Ct(u),m=Ct(f);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:m},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":m})}const is={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:as};function os(e,t,n){var r=K(e),s=[q,I].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=i[0],c=i[1];return o=o||0,c=(c||0)*s,[q,Q].indexOf(r)>=0?{x:c,y:o}:{x:o,y:c}}function cs(e){var t=e.state,n=e.options,r=e.name,s=n.offset,i=s===void 0?[0,0]:s,o=Xt.reduce(function(l,m){return l[m]=os(m,t.rects,i),l},{}),c=o[t.placement],u=c.x,f=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=o}const us={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cs};function ls(e){var t=e.state,n=e.name;t.modifiersData[n]=en({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const ds={name:"popperOffsets",enabled:!0,phase:"read",fn:ls,data:{}};function fs(e){return e==="x"?"y":"x"}function ms(e){var t=e.state,n=e.options,r=e.name,s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,c=o===void 0?!1:o,u=n.boundary,f=n.rootBoundary,l=n.altBoundary,m=n.padding,x=n.tether,d=x===void 0?!0:x,v=n.tetherOffset,b=v===void 0?0:v,p=_e(t,{boundary:u,rootBoundary:f,padding:m,altBoundary:l}),E=K(t.placement),g=je(t.placement),N=!g,y=st(E),O=fs(y),R=t.modifiersData.popperOffsets,P=t.rects.reference,T=t.rects.popper,A=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(R){if(i){var _,F=y==="y"?I:q,W=y==="y"?z:Q,Y=y==="y"?"height":"width",V=R[y],pe=V+p[F],ee=V-p[W],ae=d?-T[Y]/2:0,we=g===ge?P[Y]:T[Y],$=g===ge?-T[Y]:-P[Y],he=t.elements.arrow,X=d&&he?rt(he):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Gt(),te=J[F],xe=J[W],ne=Me(0,P[Y],X[Y]),Ee=N?P[Y]/2-ae-ne-te-k.mainAxis:we-ne-te-k.mainAxis,U=N?-P[Y]/2+ae+ne+xe+k.mainAxis:$+ne+xe+k.mainAxis,ie=t.elements.arrow&&Te(t.elements.arrow),Ae=ie?y==="y"?ie.clientTop||0:ie.clientLeft||0:0,He=(_=C?.[y])!=null?_:0,ut=V+Ee-He-Ae,lt=V+U-He,Ve=Me(d?Ue(pe,ut):pe,V,d?fe(ee,lt):ee);R[y]=Ve,B[y]=Ve-V}if(c){var We,Xe=y==="x"?I:q,Be=y==="x"?z:Q,w=R[O],L=O==="y"?"height":"width",dt=w+p[Xe],ft=w-p[Be],ze=[I,q].indexOf(E)!==-1,mt=(We=C?.[O])!=null?We:0,pt=ze?dt:w-P[L]-T[L]-mt+k.altAxis,ht=ze?w+P[L]+T[L]-mt-k.altAxis:ft,xt=d&&ze?Br(pt,w,ht):Me(d?pt:dt,w,d?ht:ft);R[O]=xt,B[O]=xt-w}t.modifiersData[r]=B}}const ps={name:"preventOverflow",enabled:!0,phase:"main",fn:ms,requiresIfExists:["offset"]};function hs(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xs(e){return e===H(e)||!Z(e)?at(e):hs(e)}function vs(e){var t=e.getBoundingClientRect(),n=be(t.width)/e.offsetWidth||1,r=be(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gs(e,t,n){n===void 0&&(n=!1);var r=Z(t),s=Z(t)&&vs(t),i=le(t),o=ye(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((ue(t)!=="body"||ot(i))&&(c=xs(t)),Z(t)?(u=ye(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=it(i))),{x:o.left+c.scrollLeft-u.x,y:o.top+c.scrollTop-u.y,width:o.width,height:o.height}}function bs(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function s(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(c){if(!n.has(c)){var u=t.get(c);u&&s(u)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||s(i)}),r}function ys(e){var t=bs(e);return Tr.reduce(function(n,r){return n.concat(t.filter(function(s){return s.phase===r}))},[])}function js(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ws(e){var t=e.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Es(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,s=t.defaultOptions,i=s===void 0?Tt:s;return function(c,u,f){f===void 0&&(f=i);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Tt,i),modifiersData:{},elements:{reference:c,popper:u},attributes:{},styles:{}},m=[],x=!1,d={state:l,setOptions:function(E){var g=typeof E=="function"?E(l.options):E;b(),l.options=Object.assign({},i,l.options,g),l.scrollParents={reference:me(c)?De(c):c.contextElement?De(c.contextElement):[],popper:De(u)};var N=ys(ws([].concat(r,l.options.modifiers)));return l.orderedModifiers=N.filter(function(y){return y.enabled}),v(),d.update()},forceUpdate:function(){if(!x){var E=l.elements,g=E.reference,N=E.popper;if(At(g,N)){l.rects={reference:gs(g,Te(N),l.options.strategy==="fixed"),popper:rt(N)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(k){return l.modifiersData[k.name]=Object.assign({},k.data)});for(var y=0;y<l.orderedModifiers.length;y++){if(l.reset===!0){l.reset=!1,y=-1;continue}var O=l.orderedModifiers[y],R=O.fn,P=O.options,T=P===void 0?{}:P,A=O.name;typeof R=="function"&&(l=R({state:l,options:T,name:A,instance:d})||l)}}}},update:js(function(){return new Promise(function(p){d.forceUpdate(),p(l)})}),destroy:function(){b(),x=!0}};if(!At(c,u))return d;d.setOptions(f).then(function(p){!x&&f.onFirstUpdate&&f.onFirstUpdate(p)});function v(){l.orderedModifiers.forEach(function(p){var E=p.name,g=p.options,N=g===void 0?{}:g,y=p.effect;if(typeof y=="function"){var O=y({state:l,name:E,instance:d,options:N}),R=function(){};m.push(O||R)}})}function b(){m.forEach(function(p){return p()}),m=[]}return d}}const Rs=Es({defaultModifiers:[is,ds,Hr,Xr,us,ss,ps,Yr]}),Os=["enabled","placement","strategy","modifiers"];function Ns(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Ps={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ms={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(s=>s.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,s=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&s==="tooltip"&&"setAttribute"in r){const i=r.getAttribute("aria-describedby");if(i&&i.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",i?`${i},${n.id}`:n.id)}}},Ds=[];function Ss(e,t,n={}){let{enabled:r=!0,placement:s="bottom",strategy:i="absolute",modifiers:o=Ds}=n,c=Ns(n,Os);const u=h.useRef(o),f=h.useRef(),l=h.useCallback(()=>{var p;(p=f.current)==null||p.update()},[]),m=h.useCallback(()=>{var p;(p=f.current)==null||p.forceUpdate()},[]),[x,d]=wr(h.useState({placement:s,update:l,forceUpdate:m,attributes:{},styles:{popper:{},arrow:{}}})),v=h.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:p})=>{const E={},g={};Object.keys(p.elements).forEach(N=>{E[N]=p.styles[N],g[N]=p.attributes[N]}),d({state:p,styles:E,attributes:g,update:l,forceUpdate:m,placement:p.placement})}}),[l,m,d]),b=h.useMemo(()=>(Pe(u.current,o)||(u.current=o),u.current),[o]);return h.useEffect(()=>{!f.current||!r||f.current.setOptions({placement:s,strategy:i,modifiers:[...b,v,Ps]})},[i,s,v,r,b]),h.useEffect(()=>{if(!(!r||e==null||t==null))return f.current=Rs(e,t,Object.assign({},c,{placement:s,strategy:i,modifiers:[...b,Ms,v]})),()=>{f.current!=null&&(f.current.destroy(),f.current=void 0,d(p=>Object.assign({},p,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),x}const Wt=()=>{};function ks(e){return e.button===0}function _s(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Le=e=>e&&("current"in e?e.current:e),Bt={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Cs(e,t=Wt,{disabled:n,clickTrigger:r="click"}={}){const s=h.useRef(!1),i=h.useRef(!1),o=h.useCallback(f=>{const l=Le(e);Ht(!!l,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),s.current=!l||_s(f)||!ks(f)||!!j.contains(l,f.target)||i.current,i.current=!1},[e]),c=j.useEventCallback(f=>{const l=Le(e);l&&j.contains(l,f.target)?i.current=!0:i.current=!1}),u=j.useEventCallback(f=>{s.current||t(f)});h.useEffect(()=>{var f,l;if(n||e==null)return;const m=j.ownerDocument(Le(e)),x=m.defaultView||window;let d=(f=x.event)!=null?f:(l=x.parent)==null?void 0:l.event,v=null;Bt[r]&&(v=j.listen(m,Bt[r],c,!0));const b=j.listen(m,r,o,!0),p=j.listen(m,r,g=>{if(g===d){d=void 0;return}u(g)});let E=[];return"ontouchstart"in m.documentElement&&(E=[].slice.call(m.body.children).map(g=>j.listen(g,"mousemove",Wt))),()=>{v?.(),b(),p(),E.forEach(g=>g())}},[e,n,r,o,c,u])}const Ts=()=>{};function As(e,t,{disabled:n,clickTrigger:r}={}){const s=t||Ts;Cs(e,s,{disabled:n,clickTrigger:r});const i=j.useEventCallback(o=>{j.isEscKey(o)&&s(o)});h.useEffect(()=>{if(n||e==null)return;const o=j.ownerDocument(Le(e));let c=(o.defaultView||window).event;const u=j.listen(o,"keyup",f=>{if(f===c){c=void 0;return}i(f)});return()=>{u()}},[e,n,i])}function Ws(e){const t={};return Array.isArray(e)?(e?.forEach(n=>{t[n.name]=n}),t):e||t}function Bs(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Fs({enabled:e,enableEvents:t,placement:n,flip:r,offset:s,fixed:i,containerPadding:o,arrowElement:c,popperConfig:u={}}){var f,l,m,x;const d=Ws(u.modifiers);return Object.assign({},u,{placement:n,enabled:e,strategy:i?"fixed":u.strategy,modifiers:Bs(Object.assign({},d,{eventListeners:{enabled:t,options:(f=d.eventListeners)==null?void 0:f.options},preventOverflow:Object.assign({},d.preventOverflow,{options:Object.assign({padding:o},(l=d.preventOverflow)==null?void 0:l.options)}),offset:{options:Object.assign({offset:s},(m=d.offset)==null?void 0:m.options)},arrow:Object.assign({},d.arrow,{enabled:!!c,options:Object.assign({},(x=d.arrow)==null?void 0:x.options,{element:c})}),flip:Object.assign({enabled:!!r},d.flip)}))})}const tn=ce.forwardRef((e,t)=>{const{flip:n,offset:r,placement:s,containerPadding:i,popperConfig:o={},transition:c,runTransition:u}=e,[f,l]=Rt(),[m,x]=Rt(),d=j.useMergedRefs(l,t),v=j.useWaitForDOMRef(e.container),b=j.useWaitForDOMRef(e.target),[p,E]=h.useState(!e.show),g=Ss(b,f,Fs({placement:s,enableEvents:!!e.show,containerPadding:i||5,flip:n,offset:r,arrowElement:m,popperConfig:o}));e.show&&p&&E(!1);const N=(...C)=>{E(!0),e.onExited&&e.onExited(...C)},y=e.show||!p;if(As(f,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!y)return null;const{onExit:O,onExiting:R,onEnter:P,onEntering:T,onEntered:A}=e;let k=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:d}),{popper:g,placement:s,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:x})});return k=j.renderTransition(c,u,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:k,onExit:O,onExiting:R,onExited:N,onEnter:P,onEntering:T,onEntered:A}),v?un.createPortal(k,v):null});tn.displayName="Overlay";const $s=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Ls=typeof document<"u",Ys=Ls||$s?h.useLayoutEffect:h.useEffect,nn=ce.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},s)=>(t=j.useBootstrapPrefix(t,"popover-header"),a.jsxRuntimeExports.jsx(n,{ref:s,className:S.classNames(e,t),...r})));nn.displayName="PopoverHeader";const ct=ce.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},s)=>(t=j.useBootstrapPrefix(t,"popover-body"),a.jsxRuntimeExports.jsx(n,{ref:s,className:S.classNames(e,t),...r})));ct.displayName="PopoverBody";function rn(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function sn(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const an=ce.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:s,body:i,arrowProps:o,hasDoneInitialMeasure:c,popper:u,show:f,...l},m)=>{const x=j.useBootstrapPrefix(e,"popover"),d=j.useIsRTL(),[v]=t?.split("-")||[],b=rn(v,d);let p=r;return f&&!c&&(p={...r,...sn(u?.strategy)}),a.jsxRuntimeExports.jsxs("div",{ref:m,role:"tooltip",style:p,"x-placement":v,className:S.classNames(n,x,v&&`bs-popover-${b}`),...l,children:[a.jsxRuntimeExports.jsx("div",{className:"popover-arrow",...o}),i?a.jsxRuntimeExports.jsx(ct,{children:s}):s]})});an.displayName="Popover";const Us=Object.assign(an,{Header:nn,Body:ct,POPPER_OFFSET:[0,8]}),on=ce.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:s,arrowProps:i,hasDoneInitialMeasure:o,popper:c,show:u,...f},l)=>{e=j.useBootstrapPrefix(e,"tooltip");const m=j.useIsRTL(),[x]=t?.split("-")||[],d=rn(x,m);let v=r;return u&&!o&&(v={...r,...sn(c?.strategy)}),a.jsxRuntimeExports.jsxs("div",{ref:l,style:v,role:"tooltip","x-placement":x,className:S.classNames(n,e,`bs-tooltip-${d}`),...f,children:[a.jsxRuntimeExports.jsx("div",{className:"tooltip-arrow",...i}),a.jsxRuntimeExports.jsx("div",{className:`${e}-inner`,children:s})]})});on.displayName="Tooltip";const G=Object.assign(on,{TOOLTIP_OFFSET:[0,6]});function Is(e){const t=h.useRef(null),n=j.useBootstrapPrefix(void 0,"popover"),r=j.useBootstrapPrefix(void 0,"tooltip"),s=h.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(j.hasClass(t.current,n))return Us.POPPER_OFFSET;if(j.hasClass(t.current,r))return G.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[s]]}function qs(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=s=>n(j.safeFindDOMNode(s))),t.ref=r.__wrapped||(r.__wrapped=s=>r(j.safeFindDOMNode(s)))}const cn=ce.forwardRef(({children:e,transition:t=j.Fade,popperConfig:n={},rootClose:r=!1,placement:s="top",show:i=!1,...o},c)=>{const u=h.useRef({}),[f,l]=h.useState(null),[m,x]=Is(o.offset),d=j.useMergedRefs$1(c,m),v=t===!0?j.Fade:t||void 0,b=j.useEventCallback$1(p=>{l(p),n==null||n.onFirstUpdate==null||n.onFirstUpdate(p)});return Ys(()=>{f&&o.target&&(u.current.scheduleUpdate==null||u.current.scheduleUpdate())},[f,o.target]),h.useEffect(()=>{i||l(null)},[i]),a.jsxRuntimeExports.jsx(tn,{...o,ref:d,popperConfig:{...n,modifiers:x.concat(n.modifiers||[]),onFirstUpdate:b},transition:v,rootClose:r,placement:s,show:i,children:(p,{arrowProps:E,popper:g,show:N})=>{var y;qs(p,E);const O=g?.placement,R=Object.assign(u.current,{state:g?.state,scheduleUpdate:g?.update,placement:O,outOfBoundaries:(g==null||(y=g.state)==null||(y=y.modifiersData.hide)==null?void 0:y.isReferenceHidden)||!1,strategy:n.strategy}),P=!!f;return typeof e=="function"?e({...p,placement:O,show:N,...!t&&N&&{className:"show"},popper:R,arrowProps:E,hasDoneInitialMeasure:P}):ce.cloneElement(e,{...p,placement:O,arrowProps:E,popper:R,hasDoneInitialMeasure:P,className:S.classNames(e.props.className,!t&&N&&"show"),style:{...e.props.style,...p.style}})}})});cn.displayName="Overlay";function Hs(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Ft(e,t,n){const[r]=t,s=r.currentTarget,i=r.relatedTarget||r.nativeEvent[n];(!i||i!==s)&&!j.contains(s,i)&&e(...t)}j.PropTypes.oneOf(["click","hover","focus"]);const re=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:s,defaultShow:i=!1,onToggle:o,delay:c,placement:u,flip:f=u&&u.indexOf("auto")!==-1,...l})=>{const m=h.useRef(null),x=j.useMergedRefs$1(m,j.getChildRef(n)),d=gr(),v=h.useRef(""),[b,p]=jr(s,i,o),E=Hs(c),{onFocus:g,onBlur:N,onClick:y}=typeof n!="function"?ce.Children.only(n).props:{},O=W=>{x(j.safeFindDOMNode(W))},R=h.useCallback(()=>{if(d.clear(),v.current="show",!E.show){p(!0);return}d.set(()=>{v.current==="show"&&p(!0)},E.show)},[E.show,p,d]),P=h.useCallback(()=>{if(d.clear(),v.current="hide",!E.hide){p(!1);return}d.set(()=>{v.current==="hide"&&p(!1)},E.hide)},[E.hide,p,d]),T=h.useCallback((...W)=>{R(),g?.(...W)},[R,g]),A=h.useCallback((...W)=>{P(),N?.(...W)},[P,N]),k=h.useCallback((...W)=>{p(!b),y?.(...W)},[y,p,b]),C=h.useCallback((...W)=>{Ft(R,W,"fromElement")},[R]),B=h.useCallback((...W)=>{Ft(P,W,"toElement")},[P]),_=e==null?[]:[].concat(e),F={ref:O};return _.indexOf("click")!==-1&&(F.onClick=k),_.indexOf("focus")!==-1&&(F.onFocus=T,F.onBlur=A),_.indexOf("hover")!==-1&&(process.env.NODE_ENV!=="production"&&Ht(_.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),F.onMouseOver=C,F.onMouseOut=B),a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[typeof n=="function"?n(F):h.cloneElement(n,F),a.jsxRuntimeExports.jsx(cn,{...l,show:b,onHide:P,flip:f,placement:u,popperConfig:r,target:m.current,children:t})]})};function Vs(e){const{profile_photo:t,width:n,alt:r,hideDefault:s,activityStatus:i,user_id:o}=e;return t?.key?a.jsxRuntimeExports.jsxs("div",{"data-using-react-profile-photo":"true",className:`profile-photo-wrap ${n?"":"w-100 h-100"}`,style:{...n&&{width:n,height:n}},children:[a.jsxRuntimeExports.jsx($t,{activityStatus:i,user_id:o}),a.jsxRuntimeExports.jsx("img",{className:"w-100 h-100",src:`${process.env.NEXT_PUBLIC_CDN}${t.key}`,style:{objectFit:"contain"},alt:r||"Profile photo of a user"})]}):a.jsxRuntimeExports.jsxs("div",{"data-using-react-profile-photo":"true",className:S.classNames("profile-photo-wrap",{"w-100 h-100":!n,"d-none":s}),style:{...n&&{width:n,height:n}},children:[a.jsxRuntimeExports.jsx($t,{activityStatus:i,user_id:o}),a.jsxRuntimeExports.jsx("img",{className:"w-100 h-100",src:`${process.env.NEXT_PUBLIC_CDN}profile_photos/starter/articles.jpg`,style:{objectFit:"contain"},alt:r||"Profile photo of a user"})]})}function $t({activityStatus:e,user_id:t}){if(!(!e||!t))return a.jsxRuntimeExports.jsx("div",{"data-user_id":t,className:S.classNames("online-status",{"status-online":e?.status=="Online"||t=="630f0b337c52851e754b03f7","status-offline":e?.status=="Offline","status-away":e?.status=="Away","activity-active":!1})})}const Xs=e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)),zs=M.withMiddleware(M.useSWR,Xs),Qs=e=>M.axios.get(e.url,{params:{user_id:e.user_id}}).then(t=>t.data),Gs={dedupingInterval:1e3*60*1,focusThrottleInterval:1e3*60*1},Lt=e=>{const{data:t,error:n,isLoading:r,isValidating:s,mutate:i}=zs(e?.user_id?{url:process.env.NODE_ENV==="development"?"http://localhost:3000/api/user-public/getUserDetails":"https://articles.media/api/user-public/getUserDetails",user_id:e.user_id}:null,Qs,Gs);return{data:t,error:n,isLoading:r,isValidating:s,mutate:i}};function Je({className:e,noOutline:t,children:n,inline:r}){const[i,o]=h.useState();if(h.useEffect(()=>{o(!0)},[]),n&&(!1)?.roles?.isDev&&i)return a.jsxRuntimeExports.jsx("div",{className:`is-dev-content ${t&&"no-outline"} ${e} ${r&&"d-inline-block"}`,children:n})}function Js({activeLayoutProposalSentiments:e}){return a.jsxRuntimeExports.jsx("div",{children:e.user_sentiments?.map(t=>a.jsxRuntimeExports.jsxs("div",{className:"card card-articles card-sm border mb-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"card-header small",children:["Gave their sentiment on ",a.jsxRuntimeExports.jsx("b",{children:t.populated_proposal.title})]}),a.jsxRuntimeExports.jsxs("div",{className:"card-body small p-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center border-bottom pb-1",children:[t.sentiment_status=="Agree"&&a.jsxRuntimeExports.jsx("div",{className:"badge shadow-articles bg-success",children:"Agree"}),t.sentiment_status=="Needs Work"&&a.jsxRuntimeExports.jsx("div",{className:"badge shadow-articles bg-warning text-dark",children:"Needs Work"}),t.sentiment_status=="Disagree"&&a.jsxRuntimeExports.jsx("div",{className:"badge shadow-articles bg-danger",children:"Disagree"}),a.jsxRuntimeExports.jsx("span",{className:"small ms-2",children:hr(new Date(t.date),"M/dd/yy")})]}),a.jsxRuntimeExports.jsx("div",{className:"mt-1",children:t.comment})]}),a.jsxRuntimeExports.jsx("div",{className:"card-footer",children:a.jsxRuntimeExports.jsx(M.Link,{prefetch:!1,href:`https://articles.media/politics/proposals/${t.populated_proposal.url}?interaction_id=${t._id}`,children:a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,children:"View"})})})]},t._id))})}function Ks(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}const Zs=e=>M.axios.get(e).then(t=>t.data),ea=e=>{const{data:t,error:n,isLoading:r,mutate:s}=M.useSWR(process.env.NODE_ENV==="development"?"http://localhost:3000/api/news/resources/political-parties":"https://articles.media/api/news/resources/political-parties",Zs,{dedupingInterval:6e5});return{data:t,error:n,isLoading:r,mutate:s}};function ta(e){const{populated_user:t,hidePhoto:n,visibleItems:r,size:s,className:i,dangerousPopulate:o,user_id:c,buttonType:u,children:f,fakeMembership:l}=e,[m,x]=h.useState(!1),[d,v]=h.useState({}),[b,p]=h.useState([]),[E,g]=h.useState([]),[N,y]=h.useState(null),[O,R]=h.useState([]),[P,T]=h.useState([]),[A,k]=h.useState(!1),C=!1,{data:B}=ea(),[_,F]=h.useState("Proposals Stance"),W=()=>{x(!1)};h.useEffect(()=>{t&&v({...t})},[]);const[Y,V]=h.useState(!1),[pe,ee]=h.useState([]),[ae,we]=h.useState([]),{data:$,mutate:he}=Lt((c||t?._id)&&(m||o)?{user_id:c||t?._id}:null),{data:X,mutate:J}=Lt(C?._id&&(m||o)?{user_id:C?._id}:null);h.useEffect(()=>{$&&(console.log("publicUserData",$),v($),p($?.populated_public_layouts),g($?.populated_public_donations),y($?.populated_public_donations.total),T($?.populated_public_proposals),ee($?.populated_public_proposals_stance),R($?.populated_public_news_submissions||[]))},[$]),h.useEffect(()=>{X&&(console.log("personalUserData",X),we(X?.populated_public_proposals_stance))},[X]);let te=(t||d)?.articles_membership?.plan.replace(" ","-").toLowerCase(),xe=l?.replace(" ","-").toLowerCase();const ne=()=>{let w=(t||d)?.articles_membership?.status=="Active";return a.jsxRuntimeExports.jsxs("div",{style:{position:"relative"}&&(s=="lg"?{fontSize:"1.5rem"}:{}),className:`view-user-modal-badge-wrap ${s=="lg"&&"large"} ${i&&i}`,children:[a.jsxRuntimeExports.jsxs("span",{onClick:()=>{x(!0)},className:"position-relative view-user-modal-badge d-flex justify-content-between align-items-center badge bg-articles-secondary shadow-articles badge-hover ",children:[(w||l)&&a.jsxRuntimeExports.jsx("i",{className:`fad membership-badge ${xe||te} fa-badge-check`,style:{position:"absolute",top:"-2px",left:"-2px",fontSize:"0.9rem",zIndex:1}}),a.jsxRuntimeExports.jsxs("div",{className:`d-flex align-items-center ${w&&""}`,children:[!n&&a.jsxRuntimeExports.jsx("div",{className:s=="lg"?"me-0":"me-1"}),d.display_name||t?.display_name]}),a.jsxRuntimeExports.jsx("i",{className:"fad fa-plus-square me-0 ms-2"})]}),r?.includes("Not Verified")&&t?.verified?.status!=="Verified"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{style:{pointerEvents:"none"},id:"button-tooltip",children:a.jsxRuntimeExports.jsx("div",{className:"",children:"User is not verified"})}),children:a.jsxRuntimeExports.jsxs("span",{className:"verification-user-badge badge bg-danger d-flex align-items-center",children:[a.jsxRuntimeExports.jsx("i",{style:{paddingBottom:"2px"},className:"fas fa-robot me-1"}),a.jsxRuntimeExports.jsx("span",{className:"",children:"Unverified"})]})}),!1,r?.includes("Verification Status")&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"button-tooltip",style:{pointerEvents:"none",transformX:"-20px"},children:t?.verified?.status=="Verified"?"Verified":" Not Verified"}),children:t?.verified?.status=="Verified"?a.jsxRuntimeExports.jsx("span",{className:"verification-user-badge badge bg-success cursor-pointer",children:a.jsxRuntimeExports.jsx("i",{className:"fas fa-check me-0"})}):a.jsxRuntimeExports.jsxs("span",{className:"verification-user-badge badge bg-danger cursor-pointer",children:[a.jsxRuntimeExports.jsx("i",{className:"fas fa-robot me-1"}),a.jsxRuntimeExports.jsx("span",{children:"?"})]})}),r?.includes("Political Party")&&a.jsxRuntimeExports.jsx("div",{className:"d-flex",children:(t||d)?.political?.party_id&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",style:{position:"fixed"},children:[a.jsxRuntimeExports.jsx("img",{width:"40px",height:"40px",style:{objectFit:"contain",padding:"0px",zIndex:"10",position:"relative"},loading:"lazy",src:`${process.env.NEXT_PUBLIC_CDN}`+B?.find(L=>L._id==(t||d)?.political?.party_id)?.logo,alt:""}),a.jsxRuntimeExports.jsx("span",{className:"ms-2",children:B?.find(L=>L._id==(t||d)?.political?.party_id)?.name})]}),children:a.jsxRuntimeExports.jsx("div",{className:"badge bg-light text-capitalize ms-0 shadow-articles h-100 d-flex justify-content-center align-items-center",style:{padding:"0 0.15rem",cursor:"pointer"},children:(t||d)?.political?.party_id&&((t||d)?.political?.party_id=="62a830440593acbd4061c48c"?a.jsxRuntimeExports.jsx("i",{className:"fad fa-unlink unaffiliated-icon fa-lg me-0"}):a.jsxRuntimeExports.jsx("img",{width:"15px",height:"15px",style:{objectFit:"contain",padding:"0px"},loading:"lazy",src:`${process.env.NEXT_PUBLIC_CDN}`+B?.find(L=>L._id==(t||d)?.political?.party_id)?.logo,alt:""}))})})})]})};function Ee(w){return w==="Link"?a.jsxRuntimeExports.jsx("span",{type:"button",onClick:()=>{x(!0)},children:f}):a.jsxRuntimeExports.jsx(ne,{})}const[U,ie]=h.useState(!1),[Ae,He]=h.useState({}),[ut,lt]=h.useState({});h.useEffect(()=>{U&&Object.keys(Ae).length==0&&console.log("adminUserData",X)},[U]);const[Ve,We]=h.useState(null);function Xe(){alert("TODO")}const Be=h.useMemo(()=>b?.filter(w=>w.user_layout)?.[0]?.url,[b]);return a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[Ee(u),a.jsxRuntimeExports.jsxs(j.Modal,{show:m,size:"lg",id:"view-users-modal",className:"view-users-modal articles-modal",scrollable:!0,onHide:W,children:[a.jsxRuntimeExports.jsx(j.Modal.Header,{closeButton:!0,children:a.jsxRuntimeExports.jsx("div",{className:"w-100 d-flex justify-content-between align-items-center",children:a.jsxRuntimeExports.jsx("h3",{className:"mb-0",children:"User Info"})})}),a.jsxRuntimeExports.jsx(j.Modal.Body,{children:a.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column align-items-center",style:{width:"100px"},children:[a.jsxRuntimeExports.jsx("div",{type:"button",onClick:()=>{We(`${process.env.NEXT_PUBLIC_CDN}${d?.profile_photo?.key}`)},children:a.jsxRuntimeExports.jsx(Vs,{width:"100px",profile_photo:d?.profile_photo})}),a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:"Joined Articles Media"}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-black border border-white shadow-sm rounded-0",children:["Joined ",d?.sign_up_date&&format(new Date(d?.sign_up_date),"M/dd/yy")]})}),Be&&a.jsxRuntimeExports.jsx(M.Link,{href:`https://articles.media/layouts/${Be}`,className:"mt-2 w-100",children:a.jsxRuntimeExports.jsxs(S.ArticlesButton,{className:"w-100",style:{},children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-home"}),a.jsxRuntimeExports.jsx("span",{children:"Layout"})]})}),a.jsxRuntimeExports.jsx(Je,{className:"w-100",children:a.jsxRuntimeExports.jsx(M.Link,{href:{pathname:"https://articles.media/messages",query:{startMsg:d?._id}},className:"mt-2 w-100",children:a.jsxRuntimeExports.jsxs(S.ArticlesButton,{className:"w-100",style:{fontSize:"0.88rem"},children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-envelope"}),a.jsxRuntimeExports.jsx("span",{children:"Message"})]})})}),U&&a.jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column w-100 mt-2",style:{maxWidth:"100px"},children:[a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"warning",small:!0,className:"",children:a.jsxRuntimeExports.jsx(Textfit,{max:14,mode:"single",children:"Remove Photo"})}),Ae?.user?.profile_photo?.banned_uploads?a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"warning",small:!0,className:"",onClick:()=>{toggleBanCustomPhotoUpload()},children:a.jsxRuntimeExports.jsx(Textfit,{max:14,mode:"single",children:"Unban Uploads"})}):a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"danger",small:!0,className:"",onClick:()=>{toggleBanCustomPhotoUpload()},children:a.jsxRuntimeExports.jsx(Textfit,{max:14,mode:"single",children:"Ban Uploads"})})]})]}),a.jsxRuntimeExports.jsxs("div",{className:"mx-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center mb-1",children:[a.jsxRuntimeExports.jsx("h5",{className:"mb-0",children:t?.display_name||d.display_name}),a.jsxRuntimeExports.jsxs("span",{className:"ms-2",children:[" @",d?.username]})]}),d?.articles_membership?.status=="Active"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:a.jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column py-1",children:[a.jsxRuntimeExports.jsxs("div",{className:"position-relative",children:[d?.articles_membership?.plan=="Supporter"&&a.jsxRuntimeExports.jsx(Image,{src:"/images/store/memberships/supporter.jpg",width:50,height:50,alt:"Membership plan level"}),d?.articles_membership?.plan=="Premium Supporter"&&a.jsxRuntimeExports.jsx(Image,{src:"/images/store/memberships/premiumSupporter.jpg",width:50,height:50,alt:"Membership plan level"}),d?.articles_membership?.plan=="Advocate"&&a.jsxRuntimeExports.jsx(Image,{src:"/images/store/memberships/advocate.jpg",width:50,height:50,alt:"Membership plan level"}),a.jsxRuntimeExports.jsx("i",{className:`fad membership-badge ${te} fa-badge-check me-1`,style:{position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)",fontSize:"1.5rem"}})]}),a.jsxRuntimeExports.jsxs("span",{className:"lh-sm",children:[a.jsxRuntimeExports.jsx("div",{children:d?.articles_membership?.plan}),a.jsxRuntimeExports.jsxs("div",{className:"small",children:["Since ",a.jsxRuntimeExports.jsx(ArticlesDate,{format:"MM/dd/yy",date:d?.articles_membership?.membership_started})]})]})]})}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-articles border text-dark me-1 mb-1",style:{cursor:"pointer"},children:[a.jsxRuntimeExports.jsx("i",{className:`fad membership-badge ${te} fa-badge-check me-1`,style:{}}),a.jsxRuntimeExports.jsx("span",{children:d?.articles_membership?.plan}),a.jsxRuntimeExports.jsx("span",{className:"px-1",children:"|"}),a.jsxRuntimeExports.jsx("span",{className:"months fw-bold",children:differenceInMonths(new Date,new Date(d?.articles_membership?.membership_started))||0})]})}),d?.address?.state&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:d.address?.state?.length==2?a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",children:["From the state of ",convertRegion(d.address?.state,"name")?convertRegion(d.address?.state,"name")[0]:""]}):a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",children:["From the state of ",d.address?.state]}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-articles-secondary border text-dark me-1 mb-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-map-pin me-1"}),d.address?.state]})}),d.verified?.status!=="Verified"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:"User is not verified"}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-danger shadow-articles me-1 mb-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-robot me-1"}),"Unverified"]})}),d.verified?.status=="Verified"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",className:"",children:[a.jsxRuntimeExports.jsxs("div",{children:["Verified by ",d.verified?.verified_methods?.length," method",d.verified?.verified_methods?.length>1&&"s"]}),a.jsxRuntimeExports.jsx("hr",{}),a.jsxRuntimeExports.jsx("div",{className:"pb-2",children:d.verified?.verified_methods?.map((w,L)=>Object.keys(w)?.length>0?a.jsxRuntimeExports.jsx("div",{className:"object",children:w?.method_name},L):a.jsxRuntimeExports.jsx("div",{className:"single",children:w},L))})]}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-articles-secondary border text-dark me-1 mb-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-star me-1"}),d.verified?.status]})}),d.political?.party_id&&a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:a.jsxRuntimeExports.jsx("div",{children:"Users political party"})}),children:a.jsxRuntimeExports.jsx(M.Link,{href:`https://articles.media/politics/parties/${(t||d)?.political?.party_id}`,children:a.jsxRuntimeExports.jsx("div",{className:"badge bg-articles-secondary border shadow-articles text-dark text-capitalize me-1",children:a.jsxRuntimeExports.jsxs("div",{className:"",children:[(t||d)?.political?.party_id=="62a830440593acbd4061c48c"?a.jsxRuntimeExports.jsx("i",{className:"fad fa-unlink unaffiliated-icon fa-lg me-0"}):a.jsxRuntimeExports.jsx("img",{width:"14px",height:"14px",style:{objectFit:"contain",padding:"0px"},loading:"lazy",src:`${process.env.NEXT_PUBLIC_CDN}`+B?.find(w=>w._id==d?.political?.party_id)?.logo,alt:""}),a.jsxRuntimeExports.jsx("span",{className:"ms-1",children:B?.find(w=>w._id==d.political?.party_id)?.name})]})})})})}),a.jsxRuntimeExports.jsx("hr",{}),a.jsxRuntimeExports.jsx("div",{className:"small",children:d?._id=="5e90cc96579a17440c5d7d52"&&a.jsxRuntimeExports.jsx("span",{children:"Founder of Articles Media, thank you for using the site, feel free to message me with any questions, concerns or anything else."})})]})]}),a.jsxRuntimeExports.jsx("hr",{}),U&&a.jsxRuntimeExports.jsxs("div",{children:[a.jsxRuntimeExports.jsx("div",{className:"d-flex align-items-center justify-content-between",children:a.jsxRuntimeExports.jsx("div",{className:"small",children:"Admin Mode Toolbar"})}),a.jsxRuntimeExports.jsxs("div",{children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex mb-2",children:[a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,variant:"warning",className:"",onClick:()=>{loadAdminUserData()},children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-redo me-0"})}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{active:U?.edit,small:!0,className:"",onClick:()=>{ie({...U,edit:!U?.edit})},children:"Edit Mode"}),U?.edit&&a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,variant:"success",className:"me-0",onClick:()=>{Xe()},children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-save me-0"})})]}),["User Details","Verification","Moderation","Bans","Stripe","Layouts","Reset Password","Sessions"].map(w=>a.jsxRuntimeExports.jsx(S.ArticlesButton,{active:w==U?.tab,small:!0,onClick:()=>{ie({...U,tab:w})},children:w},w))]}),a.jsxRuntimeExports.jsx("hr",{})]}),a.jsxRuntimeExports.jsxs("div",{className:"pe-3 pb-3",children:[a.jsxRuntimeExports.jsx("div",{className:"mb-2 me-2",children:[{name:"Proposals Stance",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:a.jsxRuntimeExports.jsxs("div",{className:"small",children:[a.jsxRuntimeExports.jsx("span",{children:ae?.fundamental?.filter(w=>ae?.user_sentiments?.find(L=>L.proposal_id==w._id)?w:null).length}),a.jsxRuntimeExports.jsx("span",{className:"px-1",children:"/"}),a.jsxRuntimeExports.jsx("span",{children:ae?.fundamental?.length})]})})},{name:"Proposal Sentiments",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d?.populated_public_proposals_stance?.user_sentiments_count||0})},{name:"Proposal Comments",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d?.populated_public_proposals_stance?.user_comments_count||0})},{name:"Proposal Submissions",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:P?.length||0})},{name:"News Comments",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d?.populated_news_comments_count||0})},{name:"News Submissions",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:O?.length||0})},{name:"Verifications",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d.verified?.verified_methods?.length||0})},{name:"Layouts",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:b?.length||0})},{name:"Donations",badge:a.jsxRuntimeExports.jsxs("span",{children:[a.jsxRuntimeExports.jsx("span",{className:"badge bg-primary ms-1",children:$?.populated_public_donations?.count||0}),a.jsxRuntimeExports.jsxs("span",{className:"badge bg-black",children:["$",Ks(($?.populated_public_donations.total/100).toFixed(2))]})]})},{name:"Orders",badge:a.jsxRuntimeExports.jsxs("span",{children:[a.jsxRuntimeExports.jsx("span",{className:"badge bg-primary ms-1",children:"0"}),a.jsxRuntimeExports.jsx("span",{className:"badge bg-black",children:"0"})]})},{name:"Achievements",dev:!0,badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:"0"})}].map(w=>(S.ArticlesButton,w.name==_,w.name,w.badge,w.name,w.dev?a.jsxRuntimeExports.jsx(Je,{inline:!0,children:a.jsxRuntimeExports.jsxs(S.ArticlesButton,{onClick:()=>F(w.name),active:w.name==_,small:!0,children:[w.name,w.badge]},w.name)},w.name):a.jsxRuntimeExports.jsxs(S.ArticlesButton,{onClick:()=>F(w.name),active:w.name==_,small:!0,children:[w.name,w.badge]},w.name)))}),_=="Proposal Sentiments"&&a.jsxRuntimeExports.jsx(Js,{activeLayoutProposalSentiments:pe})]})]})}),a.jsxRuntimeExports.jsxs(j.Modal.Footer,{className:"justify-content-between",children:[C?._id=="5e90cc96579a17440c5d7d52"?a.jsxRuntimeExports.jsxs("span",{children:[a.jsxRuntimeExports.jsxs(Je,{inline:!0,className:"me-2",children:[a.jsxRuntimeExports.jsxs(S.ArticlesButton,{onClick:()=>{ie(U?!1:{tab:""})},small:!0,active:U,variant:"",className:"me-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-pen"}),a.jsxRuntimeExports.jsx("span",{children:"Admin Mode"})]}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{onClick:()=>{he(),J()},small:!0,variant:"warning",className:"",children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-redo me-0"})})]}),a.jsxRuntimeExports.jsx("span",{style:{fontSize:"0.8rem"},children:d?._id})]}):a.jsxRuntimeExports.jsx("span",{}),a.jsxRuntimeExports.jsx("div",{className:"justify-content-",children:a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"articles",onClick:W,children:"Close"})})]})]})]})}function na({setChecked:e,checked:t,readOnly:n}){return a.jsxRuntimeExports.jsxs("label",{className:`articles-switch mb-0 ${t&&"checked"}`,children:[a.jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!!n,checked:t,onChange:()=>{}}),a.jsxRuntimeExports.jsx("span",{onClick:r=>{if(e){e(!t);return}else{r.preventDefault();return}},className:"slider"})]})}const ra=async e=>{if(process.env.NODE_ENV==="development")try{return(await M.axios.get("http://localhost:3001/api/community/games/scoreboard",{params:{game:e.game}})).data}catch{}return M.axios.get(e.url,{params:{game:e.game}}).then(t=>t.data)},sa={dedupingInterval:1e3*60*30,refreshInterval:0,revalidateOnFocus:!1,revalidateIfStale:!1,shouldRetryOnError:!1},aa=e=>{const{data:t,error:n,isLoading:r,isValidating:s,mutate:i}=M.useSWR(e?.game?{url:"https://articles.media/api/community/games/scoreboard",game:e.game}:null,ra,sa);return{data:t,error:n,isLoading:r,isValidating:s,mutate:i}};function ia({game:e,reloadScoreboard:t,setReloadScoreboard:n}){const[r,s]=h.useState(!1),[i,o]=h.useState(!1),{data:c,mutate:u}=aa({game:e});return h.useEffect(()=>{},[]),h.useEffect(()=>{t&&(n(!1),u())},[t]),a.jsxRuntimeExports.jsxs("div",{className:"scoreboard",children:[a.jsxRuntimeExports.jsxs(j.Modal,{show:r,size:"md",className:"articles-modal",centered:!0,onHide:()=>s(!1),children:[a.jsxRuntimeExports.jsx(j.Modal.Header,{children:a.jsxRuntimeExports.jsx(j.Modal.Title,{children:"Scoreboard Settings"})}),a.jsxRuntimeExports.jsx(j.Modal.Body,{children:a.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between align-items-center",onClick:()=>o(!i),children:[a.jsxRuntimeExports.jsxs("div",{children:[a.jsxRuntimeExports.jsx("i",{className:"fas fa-trophy-alt"}),a.jsxRuntimeExports.jsx("span",{children:"Join Scoreboard?"})]}),a.jsxRuntimeExports.jsx(na,{checked:i})]})}),a.jsxRuntimeExports.jsx(j.Modal.Footer,{className:"justify-content-between",children:a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"articles",onClick:()=>{s(!1)},children:"Close"})})]}),a.jsxRuntimeExports.jsxs("div",{className:"card card-articles card-sm mb-3 mb-lg-0",children:[a.jsxRuntimeExports.jsxs("div",{className:"card-header d-flex justify-content-between align-items-center",children:[a.jsxRuntimeExports.jsxs("span",{children:[e," Scoreboard"]}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{onClick:()=>{u()},small:!0,children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-redo me-0"})})]}),a.jsxRuntimeExports.jsxs("div",{className:"card-body p-0",children:[(c?.length||0)==0&&a.jsxRuntimeExports.jsx("div",{className:"small p-2",children:"No scores yet"}),c?.map((f,l)=>a.jsxRuntimeExports.jsxs("div",{className:"result d-flex flex-column justify-content-between border-bottom p-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between lh-sm",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex",children:[a.jsxRuntimeExports.jsx("h5",{className:"mb-0 me-3",children:l+1}),a.jsxRuntimeExports.jsx("div",{className:"lh-sm",children:a.jsxRuntimeExports.jsx(ta,{populated_user:f.populated_user,user_id:f.user_id})})]}),a.jsxRuntimeExports.jsx("div",{children:a.jsxRuntimeExports.jsx("h5",{className:"mb-0",children:f.score||f.total})})]}),f.last_play&&f.public_last_play&&a.jsxRuntimeExports.jsxs("small",{className:"mt-1",style:{fontSize:"0.75rem"},children:["Played: ",format(new Date(f.last_play),"MM/d/yy hh:mmaa")]})]},f._id))]}),a.jsxRuntimeExports.jsxs("div",{className:"card-footer d-flex justify-content-between align-items-center",children:[a.jsxRuntimeExports.jsx("div",{className:"small",children:"Play to get on the board!"}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,onClick:()=>{s(!0)},children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-cog me-0"})})]})]})]})}module.exports=ia;
|
|
1
|
+
"use strict";const a=require("./jsx-runtime-nZSsnGb7.cjs"),h=require("react"),j=require("./Modal-Cr0uB770.cjs"),M=require("./toDate-CzgAa_PT.cjs"),S=require("./Button-BVYvDTtH.cjs"),un=require("react-dom");function ln(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ce=ln(h);let dn={};function Ie(){return dn}function Se(e,t){const n=Ie(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=M.toDate(e,t?.in),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function Ye(e,t){return Se(e,{...t,weekStartsOn:1})}function Yt(e,t){const n=M.toDate(e,t?.in),r=n.getFullYear(),s=M.constructFrom(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const i=Ye(s),o=M.constructFrom(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const c=Ye(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function vt(e){const t=M.toDate(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fn(e,...t){const n=M.constructFrom.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function gt(e,t){const n=M.toDate(e,t?.in);return n.setHours(0,0,0,0),n}function mn(e,t,n){const[r,s]=fn(n?.in,e,t),i=gt(r),o=gt(s),c=+i-vt(i),u=+o-vt(o);return Math.round((c-u)/M.millisecondsInDay)}function pn(e,t){const n=Yt(e,t),r=M.constructFrom(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ye(r)}function hn(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xn(e){return!(!hn(e)&&typeof e!="number"||isNaN(+M.toDate(e)))}function vn(e,t){const n=M.toDate(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const gn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bn=(e,t,n)=>{let r;const s=gn[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Qe(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const yn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},En={date:Qe({formats:yn,defaultWidth:"full"}),time:Qe({formats:jn,defaultWidth:"full"}),dateTime:Qe({formats:wn,defaultWidth:"full"})},Rn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},On=(e,t,n,r)=>Rn[e];function Re(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):o;s=e.formattingValues[c]||e.formattingValues[o]}else{const o=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;s=e.values[c]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const Nn={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Dn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Sn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},_n=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Cn={ordinalNumber:_n,era:Re({values:Nn,defaultWidth:"wide"}),quarter:Re({values:Pn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Re({values:Mn,defaultWidth:"wide"}),day:Re({values:Dn,defaultWidth:"wide"}),dayPeriod:Re({values:Sn,defaultWidth:"wide",formattingValues:kn,defaultFormattingWidth:"wide"})};function Oe(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?An(c,m=>m.test(o)):Tn(c,m=>m.test(o));let f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;const l=t.slice(o.length);return{value:f,rest:l}}}function Tn(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function An(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Wn(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const c=t.slice(s.length);return{value:o,rest:c}}}const Bn=/^(\d+)(th|st|nd|rd)?/i,Fn=/\d+/i,$n={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ln={any:[/^b/i,/^(a|c)/i]},Yn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Un={any:[/1/i,/2/i,/3/i,/4/i]},In={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},qn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qn={ordinalNumber:Wn({matchPattern:Bn,parsePattern:Fn,valueCallback:e=>parseInt(e,10)}),era:Oe({matchPatterns:$n,defaultMatchWidth:"wide",parsePatterns:Ln,defaultParseWidth:"any"}),quarter:Oe({matchPatterns:Yn,defaultMatchWidth:"wide",parsePatterns:Un,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oe({matchPatterns:In,defaultMatchWidth:"wide",parsePatterns:qn,defaultParseWidth:"any"}),day:Oe({matchPatterns:Hn,defaultMatchWidth:"wide",parsePatterns:Vn,defaultParseWidth:"any"}),dayPeriod:Oe({matchPatterns:Xn,defaultMatchWidth:"any",parsePatterns:zn,defaultParseWidth:"any"})},Gn={code:"en-US",formatDistance:bn,formatLong:En,formatRelative:On,localize:Cn,match:Qn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jn(e,t){const n=M.toDate(e,t?.in);return mn(n,vn(n))+1}function Kn(e,t){const n=M.toDate(e,t?.in),r=+Ye(n)-+pn(n);return Math.round(r/M.millisecondsInWeek)+1}function Ut(e,t){const n=M.toDate(e,t?.in),r=n.getFullYear(),s=Ie(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=M.constructFrom(t?.in||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const c=Se(o,t),u=M.constructFrom(t?.in||e,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const f=Se(u,t);return+n>=+c?r+1:+n>=+f?r:r-1}function Zn(e,t){const n=Ie(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Ut(e,t),i=M.constructFrom(t?.in||e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),Se(i,t)}function er(e,t){const n=M.toDate(e,t?.in),r=+Se(n,t)-+Zn(n,t);return Math.round(r/M.millisecondsInWeek)+1}function D(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const oe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return D(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):D(n+1,2)},d(e,t){return D(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return D(e.getHours()%12||12,t.length)},H(e,t){return D(e.getHours(),t.length)},m(e,t){return D(e.getMinutes(),t.length)},s(e,t){return D(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return D(s,t.length)}},ve={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bt={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return oe.y(e,t)},Y:function(e,t,n,r){const s=Ut(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return D(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):D(i,t.length)},R:function(e,t){const n=Yt(e);return D(n,t.length)},u:function(e,t){const n=e.getFullYear();return D(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return D(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return D(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return oe.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return D(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=er(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):D(s,t.length)},I:function(e,t,n){const r=Kn(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):D(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):oe.d(e,t)},D:function(e,t,n){const r=Jn(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):D(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return D(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return D(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return D(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=ve.noon:r===0?s=ve.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=ve.evening:r>=12?s=ve.afternoon:r>=4?s=ve.morning:s=ve.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return oe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):oe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oe.s(e,t)},S:function(e,t){return oe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return jt(r);case"XXXX":case"XX":return de(r);default:return de(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return jt(r);case"xxxx":case"xx":return de(r);default:return de(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yt(r,":");default:return"GMT"+de(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yt(r,":");default:return"GMT"+de(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return D(r,t.length)},T:function(e,t,n){return D(+e,t.length)}};function yt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+D(i,2)}function jt(e,t){return e%60===0?(e>0?"-":"+")+D(Math.abs(e)/60,2):de(e,t)}function de(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=D(Math.trunc(r/60),2),i=D(r%60,2);return n+s+t+i}const wt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},It=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},tr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return wt(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",wt(r,t)).replace("{{time}}",It(s,t))},nr={p:It,P:tr},rr=/^D+$/,sr=/^Y+$/,ar=["D","DD","YY","YYYY"];function ir(e){return rr.test(e)}function or(e){return sr.test(e)}function cr(e,t,n){const r=ur(e,t,n);if(console.warn(r),ar.includes(e))throw new RangeError(r)}function ur(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fr=/^'([^]*?)'?$/,mr=/''/g,pr=/[a-zA-Z]/;function hr(e,t,n){const r=Ie(),s=r.locale??Gn,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=M.toDate(e,n?.in);if(!xn(c))throw new RangeError("Invalid time value");let u=t.match(dr).map(l=>{const m=l[0];if(m==="p"||m==="P"){const x=nr[m];return x(l,s.formatLong)}return l}).join("").match(lr).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const m=l[0];if(m==="'")return{isToken:!1,value:xr(l)};if(bt[m])return{isToken:!0,value:l};if(m.match(pr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:l}});s.localize.preprocessor&&(u=s.localize.preprocessor(c,u));const f={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return u.map(l=>{if(!l.isToken)return l.value;const m=l.value;(or(m)||ir(m))&&cr(m,t,String(e));const x=bt[m[0]];return x(c,m,s.localize,f)}).join("")}function xr(e){const t=e.match(fr);return t?t[1].replace(mr,"'"):e}function vr(){const e=h.useRef(!0),t=h.useRef(()=>e.current);return h.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}const Ke=2**31-1;function qt(e,t,n){const r=n-Date.now();e.current=r<=Ke?setTimeout(t,r):setTimeout(()=>qt(e,t,n),Ke)}function gr(){const e=vr(),t=h.useRef();return j.useWillUnmount(()=>clearTimeout(t.current)),h.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(s,i=0){e()&&(n(),i<=Ke?t.current=setTimeout(s,i):qt(t,s,Date.now()+i))}return{set:r,clear:n,handleRef:t}},[])}var Ge,Et;function br(){if(Et)return Ge;Et=1;var e=process.env.NODE_ENV!=="production",t=function(){};if(e){var n=function(s,i){var o=arguments.length;i=new Array(o>1?o-1:0);for(var c=1;c<o;c++)i[c-1]=arguments[c];var u=0,f="Warning: "+s.replace(/%s/g,function(){return i[u++]});typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}};t=function(r,s,i){var o=arguments.length;i=new Array(o>2?o-2:0);for(var c=2;c<o;c++)i[c-2]=arguments[c];if(s===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");r||n.apply(null,[s].concat(i))}}return Ge=t,Ge}var yr=br();const Ht=S.getDefaultExportFromCjs(yr);function jr(e,t,n){var r=h.useRef(e!==void 0),s=h.useState(t),i=s[0],o=s[1],c=e!==void 0,u=r.current;return r.current=c,!c&&u&&i!==t&&o(t),[c?e:i,h.useCallback(function(f){for(var l=arguments.length,m=new Array(l>1?l-1:0),x=1;x<l;x++)m[x-1]=arguments[x];n&&n.apply(void 0,[f].concat(m)),o(f)},[n])]}function Rt(){return h.useState(null)}var Ot=Object.prototype.hasOwnProperty;function Nt(e,t,n){for(n of e.keys())if(Pe(n,t))return n}function Pe(e,t){var n,r,s;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Pe(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=Nt(t,s),!s)||!t.has(s))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=Nt(t,s),!s)||!Pe(r[1],t.get(s)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Ot.call(e,n)&&++r&&!Ot.call(t,n)||!(n in t)||!Pe(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function wr(e){const t=j.useMounted();return[e[0],h.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var I="top",z="bottom",Q="right",q="left",tt="auto",Ce=[I,z,Q,q],ge="start",ke="end",Er="clippingParents",Vt="viewport",Ne="popper",Rr="reference",Pt=Ce.reduce(function(e,t){return e.concat([t+"-"+ge,t+"-"+ke])},[]),Xt=[].concat(Ce,[tt]).reduce(function(e,t){return e.concat([t,t+"-"+ge,t+"-"+ke])},[]),Or="beforeRead",Nr="read",Pr="afterRead",Mr="beforeMain",Dr="main",Sr="afterMain",kr="beforeWrite",_r="write",Cr="afterWrite",Tr=[Or,Nr,Pr,Mr,Dr,Sr,kr,_r,Cr];function K(e){return e.split("-")[0]}function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function me(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function Z(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function nt(e){if(typeof ShadowRoot>"u")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var fe=Math.max,Ue=Math.min,be=Math.round;function Ze(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zt(){return!/^((?!chrome|android).)*safari/i.test(Ze())}function ye(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),s=1,i=1;t&&Z(e)&&(s=e.offsetWidth>0&&be(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&be(r.height)/e.offsetHeight||1);var o=me(e)?H(e):window,c=o.visualViewport,u=!zt()&&n,f=(r.left+(u&&c?c.offsetLeft:0))/s,l=(r.top+(u&&c?c.offsetTop:0))/i,m=r.width/s,x=r.height/i;return{width:m,height:x,top:l,right:f+m,bottom:l+x,left:f,x:f,y:l}}function rt(e){var t=ye(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Qt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&nt(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ue(e){return e?(e.nodeName||"").toLowerCase():null}function se(e){return H(e).getComputedStyle(e)}function Ar(e){return["table","td","th"].indexOf(ue(e))>=0}function le(e){return((me(e)?e.ownerDocument:e.document)||window.document).documentElement}function qe(e){return ue(e)==="html"?e:e.assignedSlot||e.parentNode||(nt(e)?e.host:null)||le(e)}function Mt(e){return!Z(e)||se(e).position==="fixed"?null:e.offsetParent}function Wr(e){var t=/firefox/i.test(Ze()),n=/Trident/i.test(Ze());if(n&&Z(e)){var r=se(e);if(r.position==="fixed")return null}var s=qe(e);for(nt(s)&&(s=s.host);Z(s)&&["html","body"].indexOf(ue(s))<0;){var i=se(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function Te(e){for(var t=H(e),n=Mt(e);n&&Ar(n)&&se(n).position==="static";)n=Mt(n);return n&&(ue(n)==="html"||ue(n)==="body"&&se(n).position==="static")?t:n||Wr(e)||t}function st(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Me(e,t,n){return fe(e,Ue(t,n))}function Br(e,t,n){var r=Me(e,t,n);return r>n?n:r}function Gt(){return{top:0,right:0,bottom:0,left:0}}function Jt(e){return Object.assign({},Gt(),e)}function Kt(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Fr=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Jt(typeof t!="number"?t:Kt(t,Ce))};function $r(e){var t,n=e.state,r=e.name,s=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,c=K(n.placement),u=st(c),f=[q,Q].indexOf(c)>=0,l=f?"height":"width";if(!(!i||!o)){var m=Fr(s.padding,n),x=rt(i),d=u==="y"?I:q,v=u==="y"?z:Q,b=n.rects.reference[l]+n.rects.reference[u]-o[u]-n.rects.popper[l],p=o[u]-n.rects.reference[u],E=Te(i),g=E?u==="y"?E.clientHeight||0:E.clientWidth||0:0,N=b/2-p/2,y=m[d],O=g-x[l]-m[v],R=g/2-x[l]/2+N,P=Me(y,R,O),T=u;n.modifiersData[r]=(t={},t[T]=P,t.centerOffset=P-R,t)}}function Lr(e){var t=e.state,n=e.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||Qt(t.elements.popper,s)&&(t.elements.arrow=s))}const Yr={name:"arrow",enabled:!0,phase:"main",fn:$r,effect:Lr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function je(e){return e.split("-")[1]}var Ur={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ir(e,t){var n=e.x,r=e.y,s=t.devicePixelRatio||1;return{x:be(n*s)/s||0,y:be(r*s)/s||0}}function Dt(e){var t,n=e.popper,r=e.popperRect,s=e.placement,i=e.variation,o=e.offsets,c=e.position,u=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,m=e.isFixed,x=o.x,d=x===void 0?0:x,v=o.y,b=v===void 0?0:v,p=typeof l=="function"?l({x:d,y:b}):{x:d,y:b};d=p.x,b=p.y;var E=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),N=q,y=I,O=window;if(f){var R=Te(n),P="clientHeight",T="clientWidth";if(R===H(n)&&(R=le(n),se(R).position!=="static"&&c==="absolute"&&(P="scrollHeight",T="scrollWidth")),R=R,s===I||(s===q||s===Q)&&i===ke){y=z;var A=m&&R===O&&O.visualViewport?O.visualViewport.height:R[P];b-=A-r.height,b*=u?1:-1}if(s===q||(s===I||s===z)&&i===ke){N=Q;var k=m&&R===O&&O.visualViewport?O.visualViewport.width:R[T];d-=k-r.width,d*=u?1:-1}}var C=Object.assign({position:c},f&&Ur),B=l===!0?Ir({x:d,y:b},H(n)):{x:d,y:b};if(d=B.x,b=B.y,u){var _;return Object.assign({},C,(_={},_[y]=g?"0":"",_[N]=E?"0":"",_.transform=(O.devicePixelRatio||1)<=1?"translate("+d+"px, "+b+"px)":"translate3d("+d+"px, "+b+"px, 0)",_))}return Object.assign({},C,(t={},t[y]=g?b+"px":"",t[N]=E?d+"px":"",t.transform="",t))}function qr(e){var t=e.state,n=e.options,r=n.gpuAcceleration,s=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,c=n.roundOffsets,u=c===void 0?!0:c,f={placement:K(t.placement),variation:je(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Dt(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dt(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Hr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qr,data:{}};var Fe={passive:!0};function Vr(e){var t=e.state,n=e.instance,r=e.options,s=r.scroll,i=s===void 0?!0:s,o=r.resize,c=o===void 0?!0:o,u=H(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach(function(l){l.addEventListener("scroll",n.update,Fe)}),c&&u.addEventListener("resize",n.update,Fe),function(){i&&f.forEach(function(l){l.removeEventListener("scroll",n.update,Fe)}),c&&u.removeEventListener("resize",n.update,Fe)}}const Xr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vr,data:{}};var zr={left:"right",right:"left",bottom:"top",top:"bottom"};function $e(e){return e.replace(/left|right|bottom|top/g,function(t){return zr[t]})}var Qr={start:"end",end:"start"};function St(e){return e.replace(/start|end/g,function(t){return Qr[t]})}function at(e){var t=H(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function it(e){return ye(le(e)).left+at(e).scrollLeft}function Gr(e,t){var n=H(e),r=le(e),s=n.visualViewport,i=r.clientWidth,o=r.clientHeight,c=0,u=0;if(s){i=s.width,o=s.height;var f=zt();(f||!f&&t==="fixed")&&(c=s.offsetLeft,u=s.offsetTop)}return{width:i,height:o,x:c+it(e),y:u}}function Jr(e){var t,n=le(e),r=at(e),s=(t=e.ownerDocument)==null?void 0:t.body,i=fe(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=fe(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),c=-r.scrollLeft+it(e),u=-r.scrollTop;return se(s||n).direction==="rtl"&&(c+=fe(n.clientWidth,s?s.clientWidth:0)-i),{width:i,height:o,x:c,y:u}}function ot(e){var t=se(e),n=t.overflow,r=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function Zt(e){return["html","body","#document"].indexOf(ue(e))>=0?e.ownerDocument.body:Z(e)&&ot(e)?e:Zt(qe(e))}function De(e,t){var n;t===void 0&&(t=[]);var r=Zt(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),i=H(r),o=s?[i].concat(i.visualViewport||[],ot(r)?r:[]):r,c=t.concat(o);return s?c:c.concat(De(qe(o)))}function et(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Kr(e,t){var n=ye(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function kt(e,t,n){return t===Vt?et(Gr(e,n)):me(t)?Kr(t,n):et(Jr(le(e)))}function Zr(e){var t=De(qe(e)),n=["absolute","fixed"].indexOf(se(e).position)>=0,r=n&&Z(e)?Te(e):e;return me(r)?t.filter(function(s){return me(s)&&Qt(s,r)&&ue(s)!=="body"}):[]}function es(e,t,n,r){var s=t==="clippingParents"?Zr(e):[].concat(t),i=[].concat(s,[n]),o=i[0],c=i.reduce(function(u,f){var l=kt(e,f,r);return u.top=fe(l.top,u.top),u.right=Ue(l.right,u.right),u.bottom=Ue(l.bottom,u.bottom),u.left=fe(l.left,u.left),u},kt(e,o,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function en(e){var t=e.reference,n=e.element,r=e.placement,s=r?K(r):null,i=r?je(r):null,o=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,u;switch(s){case I:u={x:o,y:t.y-n.height};break;case z:u={x:o,y:t.y+t.height};break;case Q:u={x:t.x+t.width,y:c};break;case q:u={x:t.x-n.width,y:c};break;default:u={x:t.x,y:t.y}}var f=s?st(s):null;if(f!=null){var l=f==="y"?"height":"width";switch(i){case ge:u[f]=u[f]-(t[l]/2-n[l]/2);break;case ke:u[f]=u[f]+(t[l]/2-n[l]/2);break}}return u}function _e(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=r===void 0?e.placement:r,i=n.strategy,o=i===void 0?e.strategy:i,c=n.boundary,u=c===void 0?Er:c,f=n.rootBoundary,l=f===void 0?Vt:f,m=n.elementContext,x=m===void 0?Ne:m,d=n.altBoundary,v=d===void 0?!1:d,b=n.padding,p=b===void 0?0:b,E=Jt(typeof p!="number"?p:Kt(p,Ce)),g=x===Ne?Rr:Ne,N=e.rects.popper,y=e.elements[v?g:x],O=es(me(y)?y:y.contextElement||le(e.elements.popper),u,l,o),R=ye(e.elements.reference),P=en({reference:R,element:N,placement:s}),T=et(Object.assign({},N,P)),A=x===Ne?T:R,k={top:O.top-A.top+E.top,bottom:A.bottom-O.bottom+E.bottom,left:O.left-A.left+E.left,right:A.right-O.right+E.right},C=e.modifiersData.offset;if(x===Ne&&C){var B=C[s];Object.keys(k).forEach(function(_){var F=[Q,z].indexOf(_)>=0?1:-1,W=[I,z].indexOf(_)>=0?"y":"x";k[_]+=B[W]*F})}return k}function ts(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=n.boundary,i=n.rootBoundary,o=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,f=u===void 0?Xt:u,l=je(r),m=l?c?Pt:Pt.filter(function(v){return je(v)===l}):Ce,x=m.filter(function(v){return f.indexOf(v)>=0});x.length===0&&(x=m);var d=x.reduce(function(v,b){return v[b]=_e(e,{placement:b,boundary:s,rootBoundary:i,padding:o})[K(b)],v},{});return Object.keys(d).sort(function(v,b){return d[v]-d[b]})}function ns(e){if(K(e)===tt)return[];var t=$e(e);return[St(e),t,St(t)]}function rs(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,c=o===void 0?!0:o,u=n.fallbackPlacements,f=n.padding,l=n.boundary,m=n.rootBoundary,x=n.altBoundary,d=n.flipVariations,v=d===void 0?!0:d,b=n.allowedAutoPlacements,p=t.options.placement,E=K(p),g=E===p,N=u||(g||!v?[$e(p)]:ns(p)),y=[p].concat(N).reduce(function(X,J){return X.concat(K(J)===tt?ts(t,{placement:J,boundary:l,rootBoundary:m,padding:f,flipVariations:v,allowedAutoPlacements:b}):J)},[]),O=t.rects.reference,R=t.rects.popper,P=new Map,T=!0,A=y[0],k=0;k<y.length;k++){var C=y[k],B=K(C),_=je(C)===ge,F=[I,z].indexOf(B)>=0,W=F?"width":"height",Y=_e(t,{placement:C,boundary:l,rootBoundary:m,altBoundary:x,padding:f}),V=F?_?Q:q:_?z:I;O[W]>R[W]&&(V=$e(V));var pe=$e(V),ee=[];if(i&&ee.push(Y[B]<=0),c&&ee.push(Y[V]<=0,Y[pe]<=0),ee.every(function(X){return X})){A=C,T=!1;break}P.set(C,ee)}if(T)for(var ae=v?3:1,we=function(J){var te=y.find(function(xe){var ne=P.get(xe);if(ne)return ne.slice(0,J).every(function(Ee){return Ee})});if(te)return A=te,"break"},$=ae;$>0;$--){var he=we($);if(he==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const ss={name:"flip",enabled:!0,phase:"main",fn:rs,requiresIfExists:["offset"],data:{_skip:!1}};function _t(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ct(e){return[I,Q,z,q].some(function(t){return e[t]>=0})}function as(e){var t=e.state,n=e.name,r=t.rects.reference,s=t.rects.popper,i=t.modifiersData.preventOverflow,o=_e(t,{elementContext:"reference"}),c=_e(t,{altBoundary:!0}),u=_t(o,r),f=_t(c,s,i),l=Ct(u),m=Ct(f);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:m},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":m})}const is={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:as};function os(e,t,n){var r=K(e),s=[q,I].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=i[0],c=i[1];return o=o||0,c=(c||0)*s,[q,Q].indexOf(r)>=0?{x:c,y:o}:{x:o,y:c}}function cs(e){var t=e.state,n=e.options,r=e.name,s=n.offset,i=s===void 0?[0,0]:s,o=Xt.reduce(function(l,m){return l[m]=os(m,t.rects,i),l},{}),c=o[t.placement],u=c.x,f=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=o}const us={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cs};function ls(e){var t=e.state,n=e.name;t.modifiersData[n]=en({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const ds={name:"popperOffsets",enabled:!0,phase:"read",fn:ls,data:{}};function fs(e){return e==="x"?"y":"x"}function ms(e){var t=e.state,n=e.options,r=e.name,s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,c=o===void 0?!1:o,u=n.boundary,f=n.rootBoundary,l=n.altBoundary,m=n.padding,x=n.tether,d=x===void 0?!0:x,v=n.tetherOffset,b=v===void 0?0:v,p=_e(t,{boundary:u,rootBoundary:f,padding:m,altBoundary:l}),E=K(t.placement),g=je(t.placement),N=!g,y=st(E),O=fs(y),R=t.modifiersData.popperOffsets,P=t.rects.reference,T=t.rects.popper,A=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(R){if(i){var _,F=y==="y"?I:q,W=y==="y"?z:Q,Y=y==="y"?"height":"width",V=R[y],pe=V+p[F],ee=V-p[W],ae=d?-T[Y]/2:0,we=g===ge?P[Y]:T[Y],$=g===ge?-T[Y]:-P[Y],he=t.elements.arrow,X=d&&he?rt(he):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Gt(),te=J[F],xe=J[W],ne=Me(0,P[Y],X[Y]),Ee=N?P[Y]/2-ae-ne-te-k.mainAxis:we-ne-te-k.mainAxis,U=N?-P[Y]/2+ae+ne+xe+k.mainAxis:$+ne+xe+k.mainAxis,ie=t.elements.arrow&&Te(t.elements.arrow),Ae=ie?y==="y"?ie.clientTop||0:ie.clientLeft||0:0,He=(_=C?.[y])!=null?_:0,ut=V+Ee-He-Ae,lt=V+U-He,Ve=Me(d?Ue(pe,ut):pe,V,d?fe(ee,lt):ee);R[y]=Ve,B[y]=Ve-V}if(c){var We,Xe=y==="x"?I:q,Be=y==="x"?z:Q,w=R[O],L=O==="y"?"height":"width",dt=w+p[Xe],ft=w-p[Be],ze=[I,q].indexOf(E)!==-1,mt=(We=C?.[O])!=null?We:0,pt=ze?dt:w-P[L]-T[L]-mt+k.altAxis,ht=ze?w+P[L]+T[L]-mt-k.altAxis:ft,xt=d&&ze?Br(pt,w,ht):Me(d?pt:dt,w,d?ht:ft);R[O]=xt,B[O]=xt-w}t.modifiersData[r]=B}}const ps={name:"preventOverflow",enabled:!0,phase:"main",fn:ms,requiresIfExists:["offset"]};function hs(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xs(e){return e===H(e)||!Z(e)?at(e):hs(e)}function vs(e){var t=e.getBoundingClientRect(),n=be(t.width)/e.offsetWidth||1,r=be(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gs(e,t,n){n===void 0&&(n=!1);var r=Z(t),s=Z(t)&&vs(t),i=le(t),o=ye(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((ue(t)!=="body"||ot(i))&&(c=xs(t)),Z(t)?(u=ye(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=it(i))),{x:o.left+c.scrollLeft-u.x,y:o.top+c.scrollTop-u.y,width:o.width,height:o.height}}function bs(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function s(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(c){if(!n.has(c)){var u=t.get(c);u&&s(u)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||s(i)}),r}function ys(e){var t=bs(e);return Tr.reduce(function(n,r){return n.concat(t.filter(function(s){return s.phase===r}))},[])}function js(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ws(e){var t=e.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Es(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,s=t.defaultOptions,i=s===void 0?Tt:s;return function(c,u,f){f===void 0&&(f=i);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Tt,i),modifiersData:{},elements:{reference:c,popper:u},attributes:{},styles:{}},m=[],x=!1,d={state:l,setOptions:function(E){var g=typeof E=="function"?E(l.options):E;b(),l.options=Object.assign({},i,l.options,g),l.scrollParents={reference:me(c)?De(c):c.contextElement?De(c.contextElement):[],popper:De(u)};var N=ys(ws([].concat(r,l.options.modifiers)));return l.orderedModifiers=N.filter(function(y){return y.enabled}),v(),d.update()},forceUpdate:function(){if(!x){var E=l.elements,g=E.reference,N=E.popper;if(At(g,N)){l.rects={reference:gs(g,Te(N),l.options.strategy==="fixed"),popper:rt(N)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(k){return l.modifiersData[k.name]=Object.assign({},k.data)});for(var y=0;y<l.orderedModifiers.length;y++){if(l.reset===!0){l.reset=!1,y=-1;continue}var O=l.orderedModifiers[y],R=O.fn,P=O.options,T=P===void 0?{}:P,A=O.name;typeof R=="function"&&(l=R({state:l,options:T,name:A,instance:d})||l)}}}},update:js(function(){return new Promise(function(p){d.forceUpdate(),p(l)})}),destroy:function(){b(),x=!0}};if(!At(c,u))return d;d.setOptions(f).then(function(p){!x&&f.onFirstUpdate&&f.onFirstUpdate(p)});function v(){l.orderedModifiers.forEach(function(p){var E=p.name,g=p.options,N=g===void 0?{}:g,y=p.effect;if(typeof y=="function"){var O=y({state:l,name:E,instance:d,options:N}),R=function(){};m.push(O||R)}})}function b(){m.forEach(function(p){return p()}),m=[]}return d}}const Rs=Es({defaultModifiers:[is,ds,Hr,Xr,us,ss,ps,Yr]}),Os=["enabled","placement","strategy","modifiers"];function Ns(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Ps={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ms={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(s=>s.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,s=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&s==="tooltip"&&"setAttribute"in r){const i=r.getAttribute("aria-describedby");if(i&&i.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",i?`${i},${n.id}`:n.id)}}},Ds=[];function Ss(e,t,n={}){let{enabled:r=!0,placement:s="bottom",strategy:i="absolute",modifiers:o=Ds}=n,c=Ns(n,Os);const u=h.useRef(o),f=h.useRef(),l=h.useCallback(()=>{var p;(p=f.current)==null||p.update()},[]),m=h.useCallback(()=>{var p;(p=f.current)==null||p.forceUpdate()},[]),[x,d]=wr(h.useState({placement:s,update:l,forceUpdate:m,attributes:{},styles:{popper:{},arrow:{}}})),v=h.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:p})=>{const E={},g={};Object.keys(p.elements).forEach(N=>{E[N]=p.styles[N],g[N]=p.attributes[N]}),d({state:p,styles:E,attributes:g,update:l,forceUpdate:m,placement:p.placement})}}),[l,m,d]),b=h.useMemo(()=>(Pe(u.current,o)||(u.current=o),u.current),[o]);return h.useEffect(()=>{!f.current||!r||f.current.setOptions({placement:s,strategy:i,modifiers:[...b,v,Ps]})},[i,s,v,r,b]),h.useEffect(()=>{if(!(!r||e==null||t==null))return f.current=Rs(e,t,Object.assign({},c,{placement:s,strategy:i,modifiers:[...b,Ms,v]})),()=>{f.current!=null&&(f.current.destroy(),f.current=void 0,d(p=>Object.assign({},p,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),x}const Wt=()=>{};function ks(e){return e.button===0}function _s(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Le=e=>e&&("current"in e?e.current:e),Bt={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Cs(e,t=Wt,{disabled:n,clickTrigger:r="click"}={}){const s=h.useRef(!1),i=h.useRef(!1),o=h.useCallback(f=>{const l=Le(e);Ht(!!l,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),s.current=!l||_s(f)||!ks(f)||!!j.contains(l,f.target)||i.current,i.current=!1},[e]),c=j.useEventCallback(f=>{const l=Le(e);l&&j.contains(l,f.target)?i.current=!0:i.current=!1}),u=j.useEventCallback(f=>{s.current||t(f)});h.useEffect(()=>{var f,l;if(n||e==null)return;const m=j.ownerDocument(Le(e)),x=m.defaultView||window;let d=(f=x.event)!=null?f:(l=x.parent)==null?void 0:l.event,v=null;Bt[r]&&(v=j.listen(m,Bt[r],c,!0));const b=j.listen(m,r,o,!0),p=j.listen(m,r,g=>{if(g===d){d=void 0;return}u(g)});let E=[];return"ontouchstart"in m.documentElement&&(E=[].slice.call(m.body.children).map(g=>j.listen(g,"mousemove",Wt))),()=>{v?.(),b(),p(),E.forEach(g=>g())}},[e,n,r,o,c,u])}const Ts=()=>{};function As(e,t,{disabled:n,clickTrigger:r}={}){const s=t||Ts;Cs(e,s,{disabled:n,clickTrigger:r});const i=j.useEventCallback(o=>{j.isEscKey(o)&&s(o)});h.useEffect(()=>{if(n||e==null)return;const o=j.ownerDocument(Le(e));let c=(o.defaultView||window).event;const u=j.listen(o,"keyup",f=>{if(f===c){c=void 0;return}i(f)});return()=>{u()}},[e,n,i])}function Ws(e){const t={};return Array.isArray(e)?(e?.forEach(n=>{t[n.name]=n}),t):e||t}function Bs(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Fs({enabled:e,enableEvents:t,placement:n,flip:r,offset:s,fixed:i,containerPadding:o,arrowElement:c,popperConfig:u={}}){var f,l,m,x;const d=Ws(u.modifiers);return Object.assign({},u,{placement:n,enabled:e,strategy:i?"fixed":u.strategy,modifiers:Bs(Object.assign({},d,{eventListeners:{enabled:t,options:(f=d.eventListeners)==null?void 0:f.options},preventOverflow:Object.assign({},d.preventOverflow,{options:Object.assign({padding:o},(l=d.preventOverflow)==null?void 0:l.options)}),offset:{options:Object.assign({offset:s},(m=d.offset)==null?void 0:m.options)},arrow:Object.assign({},d.arrow,{enabled:!!c,options:Object.assign({},(x=d.arrow)==null?void 0:x.options,{element:c})}),flip:Object.assign({enabled:!!r},d.flip)}))})}const tn=ce.forwardRef((e,t)=>{const{flip:n,offset:r,placement:s,containerPadding:i,popperConfig:o={},transition:c,runTransition:u}=e,[f,l]=Rt(),[m,x]=Rt(),d=j.useMergedRefs(l,t),v=j.useWaitForDOMRef(e.container),b=j.useWaitForDOMRef(e.target),[p,E]=h.useState(!e.show),g=Ss(b,f,Fs({placement:s,enableEvents:!!e.show,containerPadding:i||5,flip:n,offset:r,arrowElement:m,popperConfig:o}));e.show&&p&&E(!1);const N=(...C)=>{E(!0),e.onExited&&e.onExited(...C)},y=e.show||!p;if(As(f,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!y)return null;const{onExit:O,onExiting:R,onEnter:P,onEntering:T,onEntered:A}=e;let k=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:d}),{popper:g,placement:s,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:x})});return k=j.renderTransition(c,u,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:k,onExit:O,onExiting:R,onExited:N,onEnter:P,onEntering:T,onEntered:A}),v?un.createPortal(k,v):null});tn.displayName="Overlay";const $s=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Ls=typeof document<"u",Ys=Ls||$s?h.useLayoutEffect:h.useEffect,nn=ce.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},s)=>(t=j.useBootstrapPrefix(t,"popover-header"),a.jsxRuntimeExports.jsx(n,{ref:s,className:S.classNames(e,t),...r})));nn.displayName="PopoverHeader";const ct=ce.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},s)=>(t=j.useBootstrapPrefix(t,"popover-body"),a.jsxRuntimeExports.jsx(n,{ref:s,className:S.classNames(e,t),...r})));ct.displayName="PopoverBody";function rn(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function sn(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const an=ce.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:s,body:i,arrowProps:o,hasDoneInitialMeasure:c,popper:u,show:f,...l},m)=>{const x=j.useBootstrapPrefix(e,"popover"),d=j.useIsRTL(),[v]=t?.split("-")||[],b=rn(v,d);let p=r;return f&&!c&&(p={...r,...sn(u?.strategy)}),a.jsxRuntimeExports.jsxs("div",{ref:m,role:"tooltip",style:p,"x-placement":v,className:S.classNames(n,x,v&&`bs-popover-${b}`),...l,children:[a.jsxRuntimeExports.jsx("div",{className:"popover-arrow",...o}),i?a.jsxRuntimeExports.jsx(ct,{children:s}):s]})});an.displayName="Popover";const Us=Object.assign(an,{Header:nn,Body:ct,POPPER_OFFSET:[0,8]}),on=ce.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:s,arrowProps:i,hasDoneInitialMeasure:o,popper:c,show:u,...f},l)=>{e=j.useBootstrapPrefix(e,"tooltip");const m=j.useIsRTL(),[x]=t?.split("-")||[],d=rn(x,m);let v=r;return u&&!o&&(v={...r,...sn(c?.strategy)}),a.jsxRuntimeExports.jsxs("div",{ref:l,style:v,role:"tooltip","x-placement":x,className:S.classNames(n,e,`bs-tooltip-${d}`),...f,children:[a.jsxRuntimeExports.jsx("div",{className:"tooltip-arrow",...i}),a.jsxRuntimeExports.jsx("div",{className:`${e}-inner`,children:s})]})});on.displayName="Tooltip";const G=Object.assign(on,{TOOLTIP_OFFSET:[0,6]});function Is(e){const t=h.useRef(null),n=j.useBootstrapPrefix(void 0,"popover"),r=j.useBootstrapPrefix(void 0,"tooltip"),s=h.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(j.hasClass(t.current,n))return Us.POPPER_OFFSET;if(j.hasClass(t.current,r))return G.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[s]]}function qs(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=s=>n(j.safeFindDOMNode(s))),t.ref=r.__wrapped||(r.__wrapped=s=>r(j.safeFindDOMNode(s)))}const cn=ce.forwardRef(({children:e,transition:t=j.Fade,popperConfig:n={},rootClose:r=!1,placement:s="top",show:i=!1,...o},c)=>{const u=h.useRef({}),[f,l]=h.useState(null),[m,x]=Is(o.offset),d=j.useMergedRefs$1(c,m),v=t===!0?j.Fade:t||void 0,b=j.useEventCallback$1(p=>{l(p),n==null||n.onFirstUpdate==null||n.onFirstUpdate(p)});return Ys(()=>{f&&o.target&&(u.current.scheduleUpdate==null||u.current.scheduleUpdate())},[f,o.target]),h.useEffect(()=>{i||l(null)},[i]),a.jsxRuntimeExports.jsx(tn,{...o,ref:d,popperConfig:{...n,modifiers:x.concat(n.modifiers||[]),onFirstUpdate:b},transition:v,rootClose:r,placement:s,show:i,children:(p,{arrowProps:E,popper:g,show:N})=>{var y;qs(p,E);const O=g?.placement,R=Object.assign(u.current,{state:g?.state,scheduleUpdate:g?.update,placement:O,outOfBoundaries:(g==null||(y=g.state)==null||(y=y.modifiersData.hide)==null?void 0:y.isReferenceHidden)||!1,strategy:n.strategy}),P=!!f;return typeof e=="function"?e({...p,placement:O,show:N,...!t&&N&&{className:"show"},popper:R,arrowProps:E,hasDoneInitialMeasure:P}):ce.cloneElement(e,{...p,placement:O,arrowProps:E,popper:R,hasDoneInitialMeasure:P,className:S.classNames(e.props.className,!t&&N&&"show"),style:{...e.props.style,...p.style}})}})});cn.displayName="Overlay";function Hs(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Ft(e,t,n){const[r]=t,s=r.currentTarget,i=r.relatedTarget||r.nativeEvent[n];(!i||i!==s)&&!j.contains(s,i)&&e(...t)}j.PropTypes.oneOf(["click","hover","focus"]);const re=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:s,defaultShow:i=!1,onToggle:o,delay:c,placement:u,flip:f=u&&u.indexOf("auto")!==-1,...l})=>{const m=h.useRef(null),x=j.useMergedRefs$1(m,j.getChildRef(n)),d=gr(),v=h.useRef(""),[b,p]=jr(s,i,o),E=Hs(c),{onFocus:g,onBlur:N,onClick:y}=typeof n!="function"?ce.Children.only(n).props:{},O=W=>{x(j.safeFindDOMNode(W))},R=h.useCallback(()=>{if(d.clear(),v.current="show",!E.show){p(!0);return}d.set(()=>{v.current==="show"&&p(!0)},E.show)},[E.show,p,d]),P=h.useCallback(()=>{if(d.clear(),v.current="hide",!E.hide){p(!1);return}d.set(()=>{v.current==="hide"&&p(!1)},E.hide)},[E.hide,p,d]),T=h.useCallback((...W)=>{R(),g?.(...W)},[R,g]),A=h.useCallback((...W)=>{P(),N?.(...W)},[P,N]),k=h.useCallback((...W)=>{p(!b),y?.(...W)},[y,p,b]),C=h.useCallback((...W)=>{Ft(R,W,"fromElement")},[R]),B=h.useCallback((...W)=>{Ft(P,W,"toElement")},[P]),_=e==null?[]:[].concat(e),F={ref:O};return _.indexOf("click")!==-1&&(F.onClick=k),_.indexOf("focus")!==-1&&(F.onFocus=T,F.onBlur=A),_.indexOf("hover")!==-1&&(process.env.NODE_ENV!=="production"&&Ht(_.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),F.onMouseOver=C,F.onMouseOut=B),a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[typeof n=="function"?n(F):h.cloneElement(n,F),a.jsxRuntimeExports.jsx(cn,{...l,show:b,onHide:P,flip:f,placement:u,popperConfig:r,target:m.current,children:t})]})};function Vs(e){const{profile_photo:t,width:n,alt:r,hideDefault:s,activityStatus:i,user_id:o}=e;return t?.key?a.jsxRuntimeExports.jsxs("div",{"data-using-react-profile-photo":"true",className:`profile-photo-wrap ${n?"":"w-100 h-100"}`,style:{...n&&{width:n,height:n}},children:[a.jsxRuntimeExports.jsx($t,{activityStatus:i,user_id:o}),a.jsxRuntimeExports.jsx("img",{className:"w-100 h-100",src:`${process.env.NEXT_PUBLIC_CDN}${t.key}`,style:{objectFit:"contain"},alt:r||"Profile photo of a user"})]}):a.jsxRuntimeExports.jsxs("div",{"data-using-react-profile-photo":"true",className:S.classNames("profile-photo-wrap",{"w-100 h-100":!n,"d-none":s}),style:{...n&&{width:n,height:n}},children:[a.jsxRuntimeExports.jsx($t,{activityStatus:i,user_id:o}),a.jsxRuntimeExports.jsx("img",{className:"w-100 h-100",src:`${process.env.NEXT_PUBLIC_CDN}profile_photos/starter/articles.jpg`,style:{objectFit:"contain"},alt:r||"Profile photo of a user"})]})}function $t({activityStatus:e,user_id:t}){if(!(!e||!t))return a.jsxRuntimeExports.jsx("div",{"data-user_id":t,className:S.classNames("online-status",{"status-online":e?.status=="Online"||t=="630f0b337c52851e754b03f7","status-offline":e?.status=="Offline","status-away":e?.status=="Away","activity-active":!1})})}const Xs=e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)),zs=M.withMiddleware(M.useSWR,Xs),Qs=e=>M.axios.get(e.url,{params:{user_id:e.user_id}}).then(t=>t.data),Gs={dedupingInterval:1e3*60*1,focusThrottleInterval:1e3*60*1},Lt=e=>{const{data:t,error:n,isLoading:r,isValidating:s,mutate:i}=zs(e?.user_id?{url:process.env.NODE_ENV==="development"?"http://localhost:3000/api/user-public/getUserDetails":"https://articles.media/api/user-public/getUserDetails",user_id:e.user_id}:null,Qs,Gs);return{data:t,error:n,isLoading:r,isValidating:s,mutate:i}};function Je({className:e,noOutline:t,children:n,inline:r}){const[i,o]=h.useState();if(h.useEffect(()=>{o(!0)},[]),n&&(!1)?.roles?.isDev&&i)return a.jsxRuntimeExports.jsx("div",{className:`is-dev-content ${t&&"no-outline"} ${e} ${r&&"d-inline-block"}`,children:n})}function Js({activeLayoutProposalSentiments:e}){return a.jsxRuntimeExports.jsx("div",{children:e.user_sentiments?.map(t=>a.jsxRuntimeExports.jsxs("div",{className:"card card-articles card-sm border mb-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"card-header small",children:["Gave their sentiment on ",a.jsxRuntimeExports.jsx("b",{children:t.populated_proposal.title})]}),a.jsxRuntimeExports.jsxs("div",{className:"card-body small p-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center border-bottom pb-1",children:[t.sentiment_status=="Agree"&&a.jsxRuntimeExports.jsx("div",{className:"badge shadow-articles bg-success",children:"Agree"}),t.sentiment_status=="Needs Work"&&a.jsxRuntimeExports.jsx("div",{className:"badge shadow-articles bg-warning text-dark",children:"Needs Work"}),t.sentiment_status=="Disagree"&&a.jsxRuntimeExports.jsx("div",{className:"badge shadow-articles bg-danger",children:"Disagree"}),a.jsxRuntimeExports.jsx("span",{className:"small ms-2",children:hr(new Date(t.date),"M/dd/yy")})]}),a.jsxRuntimeExports.jsx("div",{className:"mt-1",children:t.comment})]}),a.jsxRuntimeExports.jsx("div",{className:"card-footer",children:a.jsxRuntimeExports.jsx(M.Link,{prefetch:!1,href:`https://articles.media/politics/proposals/${t.populated_proposal.url}?interaction_id=${t._id}`,children:a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,children:"View"})})})]},t._id))})}function Ks(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}const Zs=e=>M.axios.get(e).then(t=>t.data),ea=e=>{const{data:t,error:n,isLoading:r,mutate:s}=M.useSWR(process.env.NODE_ENV==="development"?"http://localhost:3001/api/news/resources/political-parties":"https://articles.media/api/news/resources/political-parties",Zs,{dedupingInterval:6e5});return{data:t,error:n,isLoading:r,mutate:s}};function ta(e){const{populated_user:t,hidePhoto:n,visibleItems:r,size:s,className:i,dangerousPopulate:o,user_id:c,buttonType:u,children:f,fakeMembership:l}=e,[m,x]=h.useState(!1),[d,v]=h.useState({}),[b,p]=h.useState([]),[E,g]=h.useState([]),[N,y]=h.useState(null),[O,R]=h.useState([]),[P,T]=h.useState([]),[A,k]=h.useState(!1),C=!1,{data:B}=ea(),[_,F]=h.useState("Proposals Stance"),W=()=>{x(!1)};h.useEffect(()=>{t&&v({...t})},[]);const[Y,V]=h.useState(!1),[pe,ee]=h.useState([]),[ae,we]=h.useState([]),{data:$,mutate:he}=Lt((c||t?._id)&&(m||o)?{user_id:c||t?._id}:null),{data:X,mutate:J}=Lt(C?._id&&(m||o)?{user_id:C?._id}:null);h.useEffect(()=>{$&&(console.log("publicUserData",$),v($),p($?.populated_public_layouts),g($?.populated_public_donations),y($?.populated_public_donations.total),T($?.populated_public_proposals),ee($?.populated_public_proposals_stance),R($?.populated_public_news_submissions||[]))},[$]),h.useEffect(()=>{X&&(console.log("personalUserData",X),we(X?.populated_public_proposals_stance))},[X]);let te=(t||d)?.articles_membership?.plan.replace(" ","-").toLowerCase(),xe=l?.replace(" ","-").toLowerCase();const ne=()=>{let w=(t||d)?.articles_membership?.status=="Active";return a.jsxRuntimeExports.jsxs("div",{style:{position:"relative"}&&(s=="lg"?{fontSize:"1.5rem"}:{}),className:`view-user-modal-badge-wrap ${s=="lg"&&"large"} ${i&&i}`,children:[a.jsxRuntimeExports.jsxs("span",{onClick:()=>{x(!0)},className:"position-relative view-user-modal-badge d-flex justify-content-between align-items-center badge bg-articles-secondary shadow-articles badge-hover ",children:[(w||l)&&a.jsxRuntimeExports.jsx("i",{className:`fad membership-badge ${xe||te} fa-badge-check`,style:{position:"absolute",top:"-2px",left:"-2px",fontSize:"0.9rem",zIndex:1}}),a.jsxRuntimeExports.jsxs("div",{className:`d-flex align-items-center ${w&&""}`,children:[!n&&a.jsxRuntimeExports.jsx("div",{className:s=="lg"?"me-0":"me-1"}),d.display_name||t?.display_name]}),a.jsxRuntimeExports.jsx("i",{className:"fad fa-plus-square me-0 ms-2"})]}),r?.includes("Not Verified")&&t?.verified?.status!=="Verified"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{style:{pointerEvents:"none"},id:"button-tooltip",children:a.jsxRuntimeExports.jsx("div",{className:"",children:"User is not verified"})}),children:a.jsxRuntimeExports.jsxs("span",{className:"verification-user-badge badge bg-danger d-flex align-items-center",children:[a.jsxRuntimeExports.jsx("i",{style:{paddingBottom:"2px"},className:"fas fa-robot me-1"}),a.jsxRuntimeExports.jsx("span",{className:"",children:"Unverified"})]})}),!1,r?.includes("Verification Status")&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"button-tooltip",style:{pointerEvents:"none",transformX:"-20px"},children:t?.verified?.status=="Verified"?"Verified":" Not Verified"}),children:t?.verified?.status=="Verified"?a.jsxRuntimeExports.jsx("span",{className:"verification-user-badge badge bg-success cursor-pointer",children:a.jsxRuntimeExports.jsx("i",{className:"fas fa-check me-0"})}):a.jsxRuntimeExports.jsxs("span",{className:"verification-user-badge badge bg-danger cursor-pointer",children:[a.jsxRuntimeExports.jsx("i",{className:"fas fa-robot me-1"}),a.jsxRuntimeExports.jsx("span",{children:"?"})]})}),r?.includes("Political Party")&&a.jsxRuntimeExports.jsx("div",{className:"d-flex",children:(t||d)?.political?.party_id&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",style:{position:"fixed"},children:[a.jsxRuntimeExports.jsx("img",{width:"40px",height:"40px",style:{objectFit:"contain",padding:"0px",zIndex:"10",position:"relative"},loading:"lazy",src:`${process.env.NEXT_PUBLIC_CDN}`+B?.find(L=>L._id==(t||d)?.political?.party_id)?.logo,alt:""}),a.jsxRuntimeExports.jsx("span",{className:"ms-2",children:B?.find(L=>L._id==(t||d)?.political?.party_id)?.name})]}),children:a.jsxRuntimeExports.jsx("div",{className:"badge bg-light text-capitalize ms-0 shadow-articles h-100 d-flex justify-content-center align-items-center",style:{padding:"0 0.15rem",cursor:"pointer"},children:(t||d)?.political?.party_id&&((t||d)?.political?.party_id=="62a830440593acbd4061c48c"?a.jsxRuntimeExports.jsx("i",{className:"fad fa-unlink unaffiliated-icon fa-lg me-0"}):a.jsxRuntimeExports.jsx("img",{width:"15px",height:"15px",style:{objectFit:"contain",padding:"0px"},loading:"lazy",src:`${process.env.NEXT_PUBLIC_CDN}`+B?.find(L=>L._id==(t||d)?.political?.party_id)?.logo,alt:""}))})})})]})};function Ee(w){return w==="Link"?a.jsxRuntimeExports.jsx("span",{type:"button",onClick:()=>{x(!0)},children:f}):a.jsxRuntimeExports.jsx(ne,{})}const[U,ie]=h.useState(!1),[Ae,He]=h.useState({}),[ut,lt]=h.useState({});h.useEffect(()=>{U&&Object.keys(Ae).length==0&&console.log("adminUserData",X)},[U]);const[Ve,We]=h.useState(null);function Xe(){alert("TODO")}const Be=h.useMemo(()=>b?.filter(w=>w.user_layout)?.[0]?.url,[b]);return a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[Ee(u),a.jsxRuntimeExports.jsxs(j.Modal,{show:m,size:"lg",id:"view-users-modal",className:"view-users-modal articles-modal",scrollable:!0,onHide:W,children:[a.jsxRuntimeExports.jsx(j.Modal.Header,{closeButton:!0,children:a.jsxRuntimeExports.jsx("div",{className:"w-100 d-flex justify-content-between align-items-center",children:a.jsxRuntimeExports.jsx("h3",{className:"mb-0",children:"User Info"})})}),a.jsxRuntimeExports.jsx(j.Modal.Body,{children:a.jsxRuntimeExports.jsxs("div",{className:"main-panel",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column align-items-center",style:{width:"100px"},children:[a.jsxRuntimeExports.jsx("div",{type:"button",onClick:()=>{We(`${process.env.NEXT_PUBLIC_CDN}${d?.profile_photo?.key}`)},children:a.jsxRuntimeExports.jsx(Vs,{width:"100px",profile_photo:d?.profile_photo})}),a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:"Joined Articles Media"}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-black border border-white shadow-sm rounded-0",children:["Joined ",d?.sign_up_date&&format(new Date(d?.sign_up_date),"M/dd/yy")]})}),Be&&a.jsxRuntimeExports.jsx(M.Link,{href:`https://articles.media/layouts/${Be}`,className:"mt-2 w-100",children:a.jsxRuntimeExports.jsxs(S.ArticlesButton,{className:"w-100",style:{},children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-home"}),a.jsxRuntimeExports.jsx("span",{children:"Layout"})]})}),a.jsxRuntimeExports.jsx(Je,{className:"w-100",children:a.jsxRuntimeExports.jsx(M.Link,{href:{pathname:"https://articles.media/messages",query:{startMsg:d?._id}},className:"mt-2 w-100",children:a.jsxRuntimeExports.jsxs(S.ArticlesButton,{className:"w-100",style:{fontSize:"0.88rem"},children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-envelope"}),a.jsxRuntimeExports.jsx("span",{children:"Message"})]})})}),U&&a.jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column w-100 mt-2",style:{maxWidth:"100px"},children:[a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"warning",small:!0,className:"",children:a.jsxRuntimeExports.jsx(Textfit,{max:14,mode:"single",children:"Remove Photo"})}),Ae?.user?.profile_photo?.banned_uploads?a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"warning",small:!0,className:"",onClick:()=>{toggleBanCustomPhotoUpload()},children:a.jsxRuntimeExports.jsx(Textfit,{max:14,mode:"single",children:"Unban Uploads"})}):a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"danger",small:!0,className:"",onClick:()=>{toggleBanCustomPhotoUpload()},children:a.jsxRuntimeExports.jsx(Textfit,{max:14,mode:"single",children:"Ban Uploads"})})]})]}),a.jsxRuntimeExports.jsxs("div",{className:"mx-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center mb-1",children:[a.jsxRuntimeExports.jsx("h5",{className:"mb-0",children:t?.display_name||d.display_name}),a.jsxRuntimeExports.jsxs("span",{className:"ms-2",children:[" @",d?.username]})]}),d?.articles_membership?.status=="Active"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:a.jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column py-1",children:[a.jsxRuntimeExports.jsxs("div",{className:"position-relative",children:[d?.articles_membership?.plan=="Supporter"&&a.jsxRuntimeExports.jsx(Image,{src:"/images/store/memberships/supporter.jpg",width:50,height:50,alt:"Membership plan level"}),d?.articles_membership?.plan=="Premium Supporter"&&a.jsxRuntimeExports.jsx(Image,{src:"/images/store/memberships/premiumSupporter.jpg",width:50,height:50,alt:"Membership plan level"}),d?.articles_membership?.plan=="Advocate"&&a.jsxRuntimeExports.jsx(Image,{src:"/images/store/memberships/advocate.jpg",width:50,height:50,alt:"Membership plan level"}),a.jsxRuntimeExports.jsx("i",{className:`fad membership-badge ${te} fa-badge-check me-1`,style:{position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)",fontSize:"1.5rem"}})]}),a.jsxRuntimeExports.jsxs("span",{className:"lh-sm",children:[a.jsxRuntimeExports.jsx("div",{children:d?.articles_membership?.plan}),a.jsxRuntimeExports.jsxs("div",{className:"small",children:["Since ",a.jsxRuntimeExports.jsx(ArticlesDate,{format:"MM/dd/yy",date:d?.articles_membership?.membership_started})]})]})]})}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-articles border text-dark me-1 mb-1",style:{cursor:"pointer"},children:[a.jsxRuntimeExports.jsx("i",{className:`fad membership-badge ${te} fa-badge-check me-1`,style:{}}),a.jsxRuntimeExports.jsx("span",{children:d?.articles_membership?.plan}),a.jsxRuntimeExports.jsx("span",{className:"px-1",children:"|"}),a.jsxRuntimeExports.jsx("span",{className:"months fw-bold",children:differenceInMonths(new Date,new Date(d?.articles_membership?.membership_started))||0})]})}),d?.address?.state&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:d.address?.state?.length==2?a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",children:["From the state of ",convertRegion(d.address?.state,"name")?convertRegion(d.address?.state,"name")[0]:""]}):a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",children:["From the state of ",d.address?.state]}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-articles-secondary border text-dark me-1 mb-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-map-pin me-1"}),d.address?.state]})}),d.verified?.status!=="Verified"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:"User is not verified"}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-danger shadow-articles me-1 mb-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-robot me-1"}),"Unverified"]})}),d.verified?.status=="Verified"&&a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsxs(G,{id:"tooltip-bottom",className:"",children:[a.jsxRuntimeExports.jsxs("div",{children:["Verified by ",d.verified?.verified_methods?.length," method",d.verified?.verified_methods?.length>1&&"s"]}),a.jsxRuntimeExports.jsx("hr",{}),a.jsxRuntimeExports.jsx("div",{className:"pb-2",children:d.verified?.verified_methods?.map((w,L)=>Object.keys(w)?.length>0?a.jsxRuntimeExports.jsx("div",{className:"object",children:w?.method_name},L):a.jsxRuntimeExports.jsx("div",{className:"single",children:w},L))})]}),children:a.jsxRuntimeExports.jsxs("div",{className:"badge bg-articles-secondary border text-dark me-1 mb-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-star me-1"}),d.verified?.status]})}),d.political?.party_id&&a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:a.jsxRuntimeExports.jsx(re,{placement:"bottom",overlay:a.jsxRuntimeExports.jsx(G,{id:"tooltip-bottom",children:a.jsxRuntimeExports.jsx("div",{children:"Users political party"})}),children:a.jsxRuntimeExports.jsx(M.Link,{href:`https://articles.media/politics/parties/${(t||d)?.political?.party_id}`,children:a.jsxRuntimeExports.jsx("div",{className:"badge bg-articles-secondary border shadow-articles text-dark text-capitalize me-1",children:a.jsxRuntimeExports.jsxs("div",{className:"",children:[(t||d)?.political?.party_id=="62a830440593acbd4061c48c"?a.jsxRuntimeExports.jsx("i",{className:"fad fa-unlink unaffiliated-icon fa-lg me-0"}):a.jsxRuntimeExports.jsx("img",{width:"14px",height:"14px",style:{objectFit:"contain",padding:"0px"},loading:"lazy",src:`${process.env.NEXT_PUBLIC_CDN}`+B?.find(w=>w._id==d?.political?.party_id)?.logo,alt:""}),a.jsxRuntimeExports.jsx("span",{className:"ms-1",children:B?.find(w=>w._id==d.political?.party_id)?.name})]})})})})}),a.jsxRuntimeExports.jsx("hr",{}),a.jsxRuntimeExports.jsx("div",{className:"small",children:d?._id=="5e90cc96579a17440c5d7d52"&&a.jsxRuntimeExports.jsx("span",{children:"Founder of Articles Media, thank you for using the site, feel free to message me with any questions, concerns or anything else."})})]})]}),a.jsxRuntimeExports.jsx("hr",{}),U&&a.jsxRuntimeExports.jsxs("div",{children:[a.jsxRuntimeExports.jsx("div",{className:"d-flex align-items-center justify-content-between",children:a.jsxRuntimeExports.jsx("div",{className:"small",children:"Admin Mode Toolbar"})}),a.jsxRuntimeExports.jsxs("div",{children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex mb-2",children:[a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,variant:"warning",className:"",onClick:()=>{loadAdminUserData()},children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-redo me-0"})}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{active:U?.edit,small:!0,className:"",onClick:()=>{ie({...U,edit:!U?.edit})},children:"Edit Mode"}),U?.edit&&a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,variant:"success",className:"me-0",onClick:()=>{Xe()},children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-save me-0"})})]}),["User Details","Verification","Moderation","Bans","Stripe","Layouts","Reset Password","Sessions"].map(w=>a.jsxRuntimeExports.jsx(S.ArticlesButton,{active:w==U?.tab,small:!0,onClick:()=>{ie({...U,tab:w})},children:w},w))]}),a.jsxRuntimeExports.jsx("hr",{})]}),a.jsxRuntimeExports.jsxs("div",{className:"pe-3 pb-3",children:[a.jsxRuntimeExports.jsx("div",{className:"mb-2 me-2",children:[{name:"Proposals Stance",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:a.jsxRuntimeExports.jsxs("div",{className:"small",children:[a.jsxRuntimeExports.jsx("span",{children:ae?.fundamental?.filter(w=>ae?.user_sentiments?.find(L=>L.proposal_id==w._id)?w:null).length}),a.jsxRuntimeExports.jsx("span",{className:"px-1",children:"/"}),a.jsxRuntimeExports.jsx("span",{children:ae?.fundamental?.length})]})})},{name:"Proposal Sentiments",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d?.populated_public_proposals_stance?.user_sentiments_count||0})},{name:"Proposal Comments",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d?.populated_public_proposals_stance?.user_comments_count||0})},{name:"Proposal Submissions",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:P?.length||0})},{name:"News Comments",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d?.populated_news_comments_count||0})},{name:"News Submissions",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:O?.length||0})},{name:"Verifications",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:d.verified?.verified_methods?.length||0})},{name:"Layouts",badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:b?.length||0})},{name:"Donations",badge:a.jsxRuntimeExports.jsxs("span",{children:[a.jsxRuntimeExports.jsx("span",{className:"badge bg-primary ms-1",children:$?.populated_public_donations?.count||0}),a.jsxRuntimeExports.jsxs("span",{className:"badge bg-black",children:["$",Ks(($?.populated_public_donations.total/100).toFixed(2))]})]})},{name:"Orders",badge:a.jsxRuntimeExports.jsxs("span",{children:[a.jsxRuntimeExports.jsx("span",{className:"badge bg-primary ms-1",children:"0"}),a.jsxRuntimeExports.jsx("span",{className:"badge bg-black",children:"0"})]})},{name:"Achievements",dev:!0,badge:a.jsxRuntimeExports.jsx("span",{className:"badge bg-black ms-1",children:"0"})}].map(w=>(S.ArticlesButton,w.name==_,w.name,w.badge,w.name,w.dev?a.jsxRuntimeExports.jsx(Je,{inline:!0,children:a.jsxRuntimeExports.jsxs(S.ArticlesButton,{onClick:()=>F(w.name),active:w.name==_,small:!0,children:[w.name,w.badge]},w.name)},w.name):a.jsxRuntimeExports.jsxs(S.ArticlesButton,{onClick:()=>F(w.name),active:w.name==_,small:!0,children:[w.name,w.badge]},w.name)))}),_=="Proposal Sentiments"&&a.jsxRuntimeExports.jsx(Js,{activeLayoutProposalSentiments:pe})]})]})}),a.jsxRuntimeExports.jsxs(j.Modal.Footer,{className:"justify-content-between",children:[C?._id=="5e90cc96579a17440c5d7d52"?a.jsxRuntimeExports.jsxs("span",{children:[a.jsxRuntimeExports.jsxs(Je,{inline:!0,className:"me-2",children:[a.jsxRuntimeExports.jsxs(S.ArticlesButton,{onClick:()=>{ie(U?!1:{tab:""})},small:!0,active:U,variant:"",className:"me-1",children:[a.jsxRuntimeExports.jsx("i",{className:"fad fa-pen"}),a.jsxRuntimeExports.jsx("span",{children:"Admin Mode"})]}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{onClick:()=>{he(),J()},small:!0,variant:"warning",className:"",children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-redo me-0"})})]}),a.jsxRuntimeExports.jsx("span",{style:{fontSize:"0.8rem"},children:d?._id})]}):a.jsxRuntimeExports.jsx("span",{}),a.jsxRuntimeExports.jsx("div",{className:"justify-content-",children:a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"articles",onClick:W,children:"Close"})})]})]})]})}function na({setChecked:e,checked:t,readOnly:n}){return a.jsxRuntimeExports.jsxs("label",{className:`articles-switch mb-0 ${t&&"checked"}`,children:[a.jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!!n,checked:t,onChange:()=>{}}),a.jsxRuntimeExports.jsx("span",{onClick:r=>{if(e){e(!t);return}else{r.preventDefault();return}},className:"slider"})]})}const ra=async e=>{if(process.env.NODE_ENV==="development")try{return(await M.axios.get("http://localhost:3001/api/community/games/scoreboard",{params:{game:e.game}})).data}catch{}return M.axios.get(e.url,{params:{game:e.game}}).then(t=>t.data)},sa={dedupingInterval:1e3*60*30,refreshInterval:0,revalidateOnFocus:!1,revalidateIfStale:!1,shouldRetryOnError:!1},aa=e=>{const{data:t,error:n,isLoading:r,isValidating:s,mutate:i}=M.useSWR(e?.game?{url:"https://articles.media/api/community/games/scoreboard",game:e.game}:null,ra,sa);return{data:t,error:n,isLoading:r,isValidating:s,mutate:i}};function ia({game:e,reloadScoreboard:t,setReloadScoreboard:n}){const[r,s]=h.useState(!1),[i,o]=h.useState(!1),{data:c,mutate:u}=aa({game:e});return h.useEffect(()=>{},[]),h.useEffect(()=>{t&&(n(!1),u())},[t]),a.jsxRuntimeExports.jsxs("div",{className:"scoreboard",children:[a.jsxRuntimeExports.jsxs(j.Modal,{show:r,size:"md",className:"articles-modal",centered:!0,onHide:()=>s(!1),children:[a.jsxRuntimeExports.jsx(j.Modal.Header,{children:a.jsxRuntimeExports.jsx(j.Modal.Title,{children:"Scoreboard Settings"})}),a.jsxRuntimeExports.jsx(j.Modal.Body,{children:a.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between align-items-center",onClick:()=>o(!i),children:[a.jsxRuntimeExports.jsxs("div",{children:[a.jsxRuntimeExports.jsx("i",{className:"fas fa-trophy-alt"}),a.jsxRuntimeExports.jsx("span",{children:"Join Scoreboard?"})]}),a.jsxRuntimeExports.jsx(na,{checked:i})]})}),a.jsxRuntimeExports.jsx(j.Modal.Footer,{className:"justify-content-between",children:a.jsxRuntimeExports.jsx(S.ArticlesButton,{variant:"articles",onClick:()=>{s(!1)},children:"Close"})})]}),a.jsxRuntimeExports.jsxs("div",{className:"card card-articles card-sm mb-3 mb-lg-0",children:[a.jsxRuntimeExports.jsxs("div",{className:"card-header d-flex justify-content-between align-items-center",children:[a.jsxRuntimeExports.jsxs("span",{children:[e," Scoreboard"]}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{onClick:()=>{u()},small:!0,children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-redo me-0"})})]}),a.jsxRuntimeExports.jsxs("div",{className:"card-body p-0",children:[(c?.length||0)==0&&a.jsxRuntimeExports.jsx("div",{className:"small p-2",children:"No scores yet"}),c?.map((f,l)=>a.jsxRuntimeExports.jsxs("div",{className:"result d-flex flex-column justify-content-between border-bottom p-2",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex justify-content-between lh-sm",children:[a.jsxRuntimeExports.jsxs("div",{className:"d-flex",children:[a.jsxRuntimeExports.jsx("h5",{className:"mb-0 me-3",children:l+1}),a.jsxRuntimeExports.jsx("div",{className:"lh-sm",children:a.jsxRuntimeExports.jsx(ta,{populated_user:f.populated_user,user_id:f.user_id})})]}),a.jsxRuntimeExports.jsx("div",{children:a.jsxRuntimeExports.jsx("h5",{className:"mb-0",children:f.score||f.total})})]}),f.last_play&&f.public_last_play&&a.jsxRuntimeExports.jsxs("small",{className:"mt-1",style:{fontSize:"0.75rem"},children:["Played: ",format(new Date(f.last_play),"MM/d/yy hh:mmaa")]})]},f._id))]}),a.jsxRuntimeExports.jsxs("div",{className:"card-footer d-flex justify-content-between align-items-center",children:[a.jsxRuntimeExports.jsx("div",{className:"small",children:"Play to get on the board!"}),a.jsxRuntimeExports.jsx(S.ArticlesButton,{small:!0,onClick:()=>{s(!0)},children:a.jsxRuntimeExports.jsx("i",{className:"fad fa-cog me-0"})})]})]})]})}module.exports=ia;
|
package/dist/GameScoreboard.js
CHANGED
|
@@ -2964,7 +2964,7 @@ function Es(e) {
|
|
|
2964
2964
|
}
|
|
2965
2965
|
const Cs = (e) => Ge.get(e).then((t) => t.data), Ts = (e) => {
|
|
2966
2966
|
const { data: t, error: n, isLoading: r, mutate: a } = pt(
|
|
2967
|
-
process.env.NODE_ENV === "development" ? "http://localhost:
|
|
2967
|
+
process.env.NODE_ENV === "development" ? "http://localhost:3001/api/news/resources/political-parties" : "https://articles.media/api/news/resources/political-parties",
|
|
2968
2968
|
Cs,
|
|
2969
2969
|
{
|
|
2970
2970
|
dedupingInterval: 6e5
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-nZSsnGb7.cjs"),o=require("react"),x=require("./toDate-CzgAa_PT.cjs"),t=require("./Modal-Cr0uB770.cjs"),r=require("./Button-BVYvDTtH.cjs");function d(n){let{setModalShow:a,ad:e,previewData:l}=n;o.useEffect(()=>{console.log("Mounted")},[]);const i=()=>{a(!1)};return s.jsxRuntimeExports.jsx("div",{children:s.jsxRuntimeExports.jsxs(t.Modal,{show:!0,backdropClassName:"ad-details-modal-backdrop",className:"articles-modal",centered:!0,onHide:i,size:"md",children:[s.jsxRuntimeExports.jsx(t.Modal.Header,{className:"align-items-center",closeButton:!0,children:s.jsxRuntimeExports.jsx(t.Modal.Title,{children:"Ad Details"})}),s.jsxRuntimeExports.jsxs(t.Modal.Body,{className:"",children:[s.jsxRuntimeExports.jsxs("p",{className:"mb-1",children:["Advertiser: ",s.jsxRuntimeExports.jsx("b",{children:e.business})]}),s.jsxRuntimeExports.jsxs("p",{className:"mb-0",children:["Ad ID: ",s.jsxRuntimeExports.jsx("b",{children:l?._id||e._id})]}),s.jsxRuntimeExports.jsx("hr",{}),s.jsxRuntimeExports.jsx("div",{className:"mb-1",children:"This ad is being shown to you for the following reasons"}),e.city?s.jsxRuntimeExports.jsxs("div",{children:[s.jsxRuntimeExports.jsx("div",{className:"h4 mb-1",children:e.business}),s.jsxRuntimeExports.jsx("div",{children:"Is advertising to all zip codes within a"}),s.jsxRuntimeExports.jsx("span",{children:s.jsxRuntimeExports.jsx("div",{className:"badge bg-light shadow-articles",children:"15 Mile Radius"})}),s.jsxRuntimeExports.jsx("div",{children:"of it's business"}),s.jsxRuntimeExports.jsx("hr",{className:"border w-50 border-white"}),s.jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center",children:[s.jsxRuntimeExports.jsx("div",{children:"Your Zip code"}),s.jsxRuntimeExports.jsx("div",{className:"badge bg-light shadow-articles ms-2",children:"12524"}),s.jsxRuntimeExports.jsx("div",{className:"ms-2",children:"is"}),s.jsxRuntimeExports.jsx("div",{className:"badge bg-light shadow-articles ms-2",children:"1.7 miles away"})]})]}):s.jsxRuntimeExports.jsxs("div",{children:[s.jsxRuntimeExports.jsx("div",{className:"h4 mb-1",children:e.business}),s.jsxRuntimeExports.jsx("div",{children:"Is advertising to all users"})]}),s.jsxRuntimeExports.jsx("div",{className:"grow"}),s.jsxRuntimeExports.jsx("hr",{className:"w-100"}),s.jsxRuntimeExports.jsx("div",{className:"reason lh-sm mb-2",children:"Ads we display to you will always be transparent as to why you are seeing them."}),s.jsxRuntimeExports.jsx(x.Link,{href:"https://articles.media/settings/account",newPage:!0,className:"",children:s.jsxRuntimeExports.jsx(r.ArticlesButton,{small:!0,children:"Settings"})})]}),s.jsxRuntimeExports.jsx(t.Modal.Footer,{className:"d-flex justify-content-center",children:s.jsxRuntimeExports.jsx(r.ArticlesButton,{variant:"articles",onClick:i,children:"Close"})})]})})}exports.default=d;
|