1import{n as D}from"./preload-helper.DSVgyDmj.js";import{Ht as u,Nt as T,ct as V,en as y,ft as m,ht as A,kt as r,ln as t,lt as f,ot as e,pn as h,pt as o,st as p}from"./tiptap.BdaQ6C40.js";import{c as I}from"./vendor.mWMwHLVu.js";import{n as M,r as j}from"./dialog.CZD5dy-i.js";import{t as E}from"./CalendarDaysIcon.HRpNGUK_.js";import{t as N}from"./CheckIcon.C-kvH8pl.js";import{t as U}from"./Cog6ToothIcon.aQgRm5fh.js";import{t as B}from"./ModalWindow.DA1Zwl-Q.js";import{t as G}from"./useCalendarSubscribe.BdrM4xxr.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"703f8047946e712fb749e5a7aadfc0405ed594c2"};var l=new a.Error().stack;l&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[l]="75f2d7d4-1d3c-4220-afff-38b36d9cfe9b",a._sentryDebugIdIdentifier="sentry-dbid-75f2d7d4-1d3c-4220-afff-38b36d9cfe9b")}catch{}})();function O(a,l){return r(),f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"fill-rule":"evenodd",d:"M13.887 3.182c.396.037.79.08 1.183.128C16.194 3.45 17 4.414 17 5.517V16.75A2.25 2.25 0 0 1 14.75 19h-9.5A2.25 2.25 0 0 1 3 16.75V5.517c0-1.103.806-2.068 1.93-2.207.393-.048.787-.09 1.183-.128A3.001 3.001 0 0 1 9 1h2c1.373 0 2.531.923 2.887 2.182ZM7.5 4A1.5 1.5 0 0 1 9 2.5h2A1.5 1.5 0 0 1 12.5 4v.5h-5V4Z","clip-rule":"evenodd"})])}var Y={class:"flex flex-col w-full"},$={class:"px-4 py-6 sm:px-8"},Z={class:"flex flex-row items-center gap-2 mb-2"},z={key:0,class:"mt-6 text-sm text-slate-500 dark:text-slate-400"},H={key:1,class:"p-3 mt-6 text-sm rounded-xl bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-300"},J={key:2,class:"mt-6 space-y-5"},P={class:"flex items-center gap-2"},W=["value"],q={class:"ml-2 hidden sm:inline"},F={class:"flex flex-col sm:flex-row gap-2"},K=["href"],Q=["href"],X={class:"sticky inset-x-0 bottom-0 flex flex-col justify-between p-4 mt-auto space-y-4 z-9988 sm:p-6 bg-slate-100 sm:flex-row-reverse sm:space-y-0 rounded-b-xl border-t-1 border-slate-200 dark:bg-slate-950 dark:border-slate-700"},ee=A({__name:"CalendarSubscribeModal",setup(a){const l=G(),{errorMessage:c,googleURL:w,httpsURL:n,isOpen:_,loading:C,webcalURL:R}=I(l),{close:d,fetchLink:b}=l,g=y(null),i=y(!1),k=()=>{g.value?.select()},L=async()=>{if(!n.value)return;const[v]=await D(navigator.clipboard.writeText(n.value));if(v){k();return}i.value=!0,setTimeout(()=>{i.value=!1},1500)};return(v,s)=>{const S=T("RouterLink");return r(),p(B,{"is-open":t(_),class:"sm:!max-w-2xl",onClose:t(d)},{default:u(()=>[e("div",Y,[e("div",$,[o(t(j),null,{default:u(()=>[e("div",Z,[o(t(E),{class:"w-6 h-6 text-dc-orange-600"}),s[2]||(s[2]=e("span",{class:"text-lg font-semibold text-slate-900 dark:text-slate-100"}," Your DC Calendar ",-1))])]),_:1}),o(t(M),{class:"text-sm text-slate-600 dark:text-slate-400"},{default:u(()=>[...s[3]||(s[3]=[m(" Subscribe to a personal calendar feed of everything you're attending across DC. It updates automatically as your tickets, RSVPs, and bookmarks change. ",-1)])]),_:1}),t(C)?(r(),f("div",z," Generating your calendar link⦠")):t(c)?(r(),f("div",H,[m(h(t(c))+" ",1),e("button",{type:"button",class:"ml-2 underline",onClick:s[0]||(s[0]=(...x)=>t(b)&&t(b)(...x))}," Try again ")])):t(n)?(r(),f("div",J,[e("div",null,[s[4]||(s[4]=e("p",{class:"text-sm font-semibold text-slate-700 dark:text-slate-300 mb-2"}," Your subscription URL ",-1)),e("div",P,[e("input",{ref_key:"urlInput",ref:g,value:t(n),readonly:"",class:"block w-full px-4 py-3 border-0 rounded-xl text-slate-900 dark:text-slate-100 bg-white dark:bg-slate-800 ring-2 ring-inset ring-slate-300 dark:ring-slate-600 sm:text-sm sm:leading-6 font-mono text-xs",onClick:k},null,8,W),e("button",{type:"button",class:"flex items-center justify-center px-3 py-3 text-sm font-semibold text-slate-700 bg-white rounded-xl ring-1 ring-inset ring-slate-300 hover:bg-slate-50 dark:bg-slate-800 dark:text-slate-100 dark:ring-slate-600 dark:hover:bg-slate-700 flex-none",onClick:L},[i.value?(r(),p(t(N),{key:0,class:"w-5 h-5 text-dc-mint-500"})):(r(),p(t(O),{key:1,class:"w-5 h-5"})),e("span",q,h(i.value?"Copied":"Copy"),1)])]),s[5]||(s[5]=e("p",{class:"mt-2 text-xs text-slate-500 dark:text-slate-400"}," Treat this link like a password â anyone with it can see your DC calendar. ",-1))]),e("div",null,[s[6]||(s[6]=e("p",{class:"text-sm font-semibold text-slate-700 dark:text-slate-300 mb-2"}," One-click subscribe ",-1)),e("div",F,[e("a",{href:t(w),target:"_blank",rel:"noopener",class:"flex items-center justify-center px-4 py-3 text-sm font-semibold text-slate-900 bg-white rounded-xl ring-1 ring-inset ring-slate-300 hover:bg-slate-50 dark:bg-slate-800 dark:text-slate-100 dar
1k:ring-slate-600 dark:hover:bg-slate-700 flex-1"}," Google Calendar ",8,K),e("a",{href:t(R),class:"flex items-center justify-center px-4 py-3 text-sm font-semibold text-slate-900 bg-white rounded-xl ring-1 ring-inset ring-slate-300 hover:bg-slate-50 dark:bg-slate-800 dark:text-slate-100 dark:ring-slate-600 dark:hover:bg-slate-700 flex-1"}," Apple / Outlook ",8,Q)]),s[7]||(s[7]=e("p",{class:"mt-2 text-xs text-slate-500 dark:text-slate-400"}," Apple Calendar refreshes within minutes. Google Calendar can take a few hours to pick up new items â if yours looks stuck, remove it and re-subscribe. ",-1))])])):V("",!0)]),e("div",X,[e("button",{type:"button",class:"flex items-center justify-center w-full px-4 py-2 text-sm font-semibold text-white rounded-xl bg-dc-orange-600 hover:bg-dc-orange-700 sm:ml-3 sm:w-auto",onClick:s[1]||(s[1]=(...x)=>t(d)&&t(d)(...x))}," Done "),o(S,{to:{name:"calendar-settings"},class:"flex items-center justify-center w-full px-4 py-2 text-sm font-medium leading-6 text-slate-700 bg-white rounded-xl ring-1 ring-inset ring-slate-300 hover:bg-slate-50 sm:w-auto sm:mr-auto dark:bg-slate-800 dark:text-slate-100 dark:ring-slate-600 dark:hover:bg-slate-700",onClick:t(d)},{default:u(()=>[o(t(U),{class:"w-4 h-4 mr-2"}),s[8]||(s[8]=m(" Configure what's included ",-1))]),_:1},8,["onClick"])])])]),_:1},8,["is-open","onClose"])}}}),ue=ee;export{ue as default}; 2 3//# sourceMappingURL=CalendarSubscribeModal.BRsZfv4Z.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.