1import{m as c,H as N,F as z,Q as E,C as O,z as r,j as t,B as m,o as R}from"./index-DeHSVeOk.js";import{r as l}from"./react-vendor-O4qKiryC.js";import{a as U}from"./app_logo-CUUZ7bpX.js";import{b as A}from"./index-CFiP56Zo.js";import{u as M}from"./i18n-ka0c0WbP.js";import"./firebase-BsxLp04Z.js";const d={background:"linear-gradient(45deg, rgba(62,140,255,1) 30%, rgba(129,49,244,1) 70%)",color:"white",border:"none",padding:"8px 16px",borderRadius:"4px",cursor:"pointer",fontSize:"14px"},G=f=>{const{displayTitle:y}=R(),{t:o}=M(),[h,p]=l.useState(o("button_copy_to_clipboard")),[e,b]=l.useState(null),[x,u]=l.useState(!1),[s,w]=l.useState(null),k=c.resolve(N),C=c.resolve(z),_=c.resolve(E);l.useEffect(()=>{v()},[]);const v=async()=>{const n=f.token,g=await C.query(O.Items,"uid",n);if(g.length>0){const i=g[0];if(b(i),i.type===r.Image||i.type===r.File)try{const a=await _.getItemDownloadUrl(i);w(a)}catch(a){k.error("Fetch download url failed",a),u(!0)}}else u(!0)},j=()=>e!=null&&(e.type===r.Text||e.type===r.Link)?t.jsx("button",{style:d,onClick:D,children:h}):null,I=()=>{if(e!=null){if(e.type===r.Link)return t.jsx("button",{style:d,onClick:S,children:o("menu_popup_open_link")});if((e.type===r.Image||e.type===r.File)&&s!=null)return t.jsx("button",{style:d,onClick:T,children:o("general_download")})}return null},T=()=>{if(s!=null&&e!=null){const n=document.createElement("a");n.download=e.content,n.target="_blank",n.href=s,document.body.appendChild(n),n.click(),document.body.removeChild(n)}},S=()=>{if(e!=null){let n=e.content;n.toLowerCase().startsWith("http")||(n="http://"+n),window.open(n,"_blank")}},D=()=>{navigator.clipboard.writeText(e!=null?e.content:""),p(o("toast_copied_clipboard")),setTimeout(()=>{p(o("menu_popup_copy"))},3e3)},L=()=>!x&&e==null?t.jsx("span",{className:"text-subTextColor dark:text-subTextColor-dark text-xl text-start",children:`${o("general_loading")}...`}):x?t.jsx("span",{className:"text-subTextColor dark:text-subTextColor-dark text-xl text-start",children:"Oops, your notification content could not be found"}):null,B=()=>e!=null&&e.type===r.Image&&s!=null?t.jsx(A.LazyLoadImage,{style:{objectFit:"scale-down",imageOrientation:"from-image",marginTop:12,marginBottom:24},src:s,width:200,height:200,draggable:!1},e.uid):null,F=()=>e==null?null:t.jsx("div",{style:{marginTop:"0px",borderRadius:"8px",width:"100%",padding:"5px",backgroundImage:"linear-gradient(45deg, rgba(62,140,255,1) 30%, rgba(129,49,244,1) 70%, rgba(129,49,244,1))"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"#ffffff",width:"100%",padding:"16px",borderRadius:"4px"},children:[t.jsx("span",{className:`multi-3line-ellipsis text-subTextColor dark:text-subTextColor-dark ${m?"text-base":"text-xl"} text-center mb-4`,children:y(e)}),B(),t.jsxs("div",{style:{display:"flex",flexDirection:m?"column":"row",gap:"16px"},children:[j(),I()]})]})});return t.jsx("div",{style:{height:"100vh",display:"flex",flexDirection:"row",backgroundSize:"auto, cover, cover",backgroundImage:'url("https://dmystapp.com/welcome/assets/css/images/overlay2.png"), url("https://dmystapp.com/welcome/assets/css/images/overlay3.svg"), linear-gradient(45deg, rgba(62,140,255,1) 30%, rgba(129,49,244,1) 70%, rgba(129,49,244,1))'},children:t.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%",width:"100%"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:"80px"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"32px"},children:[t.jsx("img",{src:U,width:32,height:32}),t.jsx("span",{style:{color:"white",fontSize:"32px",fontWeight:600,marginLeft:"10px"},children:"Dmyst Notification"})]}),t.jsxs("div",{className:"flex flex-col items-start bg-bgColor dark:bg-bgColor-dark max-w-[700px] p-10 rounded-lg shadow-[3px_3px_3px_2px_#00000033] min-w-[400px]",children:[L(),F(),t.jsxs("span",{className:"text-subTextColor dark:text-subTextColor-dark text-sm text-start mt-6",children:[o("notification_why_seeing"),t.jsx("p",{children:o("notification_why_seeing_desc")})]})]})]})})})};export{G as default};
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.