1import{_ as fe,u as ye,b as he,a as ke,o as be,O as we,d as ge,j as v,w as o,r,Q as _e,i as n,f as d,V as xe,g as e,e as h,p as s,k as J,n as S,v as u,q as C,s as c,t as p,an as Le,H as Ie,am as $e,T as Ce,x as Q,y as se,B as ae,F as G,eQ as le,b1 as Ve,C as Te,E as Oe,G as je,ac as Be,ap as Pe,A as Ee,af as Se,h as K,a6 as ze,a7 as Me}from"./Bd7sooHk.js";import{C as De}from"./Dj75N0Ho.js";import"./BpzJ_Ra5.js";import"./XmIJRr0j.js";import"./DvQduk6a.js";const Ne=[{id:0,icon:"mdi-google-play",platform:"Android",link:"https://play.google.com/store/apps/details?id=com.journey.app"},{id:1,icon:"mdi-apple-ios",platform:"iOS / iPad OS",link:"https://itunes.apple.com/us/app/journey-diary-journal/id1300202543"},{id:2,icon:"mdi-apple",platform:"Mac OS",link:"https://apps.apple.com/us/app/journey-diary-journal/id1300202543"},{id:3,icon:"mdi-apple",platform:"Mac OS (Classic)",link:"https://releases-journey.2appstudio.com/download/osx?filetype=zip"},{id:4,icon:"mdi-microsoft-windows",platform:"Windows (64-bit)",link:"https://releases-journey.2appstudio.com/download/win32_x64?filetype=exe"},{id:5,icon:"mdi-microsoft-windows",platform:"Windows (32-bit)",link:"https://releases-journey.2appstudio.com/download/win32?filetype=exe"},{id:6,icon:"mdi-linux",platform:"Linux",link:"https://snapcraft.io/journey"},{id:7,icon:"mdi-google-chrome",platform:"Chrome Webstore",link:"https://chrome.google.com/webstore/detail/journey/cpdnilooeakjhhmlbliacfdimhblkmnc"}],qe={key:0,class:"d-flex justify-center align-center h-100"},Ae={class:"pa-4 text-center text-white"},Ue={class:"text-body-large"},Re={key:0,class:"text-body-small mt-3"},Fe={class:"text-center py-8"},He={class:"ms-2 text-capitalize"},We={class:"text-body-small mt-6"},Je={class:"footer mx-auto text-center mt-8"},Qe={class:"d-inline-block mb-2"},Ge=["innerHTML"],Ke={class:"text-body-small"},Xe={class:"text-body-small"},Ye=["href"],Ze=["href"],et=["href"],tt={class:"my-4 mx-4 text-white"},st={class:"d-flex justify-space-between align-center"},at={class:"text-body-large"},lt={class:"text-capitalize"},it={class:"text-body-small d-flex justify-space-between"},ot={key:1},nt={key:0,class:"mx-auto text-center"},dt={class:"footer mx-auto text-center mt-12"},rt={class:"d-inline-block mb-2"},ut=["innerHTML"],ct={class:"text-body-small"},pt={class:"text-body-small"},mt=["href"],vt=["href"],ft=["href"],yt={key:2,class:"d-flex justify-center align-center h-100"},ht={class:"text-body-medium text-medium-emphasis"},kt={__name:"index",setup(bt){const{$axios:z,$config:M,$router:ie,$store:X}=ye(),m=he(),{t:Y}=ke(),k=r(!1),w=r(!1),D=r(!1),g=r(0),j=r(""),N=r(""),f=r(null),q=r(null),A=r(""),b=r(null),B=r(""),x=r(""),T=r(!1),O=r(!0),U=r(!1),R=r(0),L=r(0),_=r("desc"),V=Ne,Z=K(()=>X?.user),oe=K(()=>Z.value?.uid&&(Z.value?.uid===f.value.uid||q.value?.some&&q.value?.some(l=>l.uid===l.value.uid))),ne=K(()=>U.value?[Y("syncDrive.invalidPassphrase")]:[]);be(async()=>{k.value=!0,await de(),k.value=!1});const de=async()=>{const l=m.query.syncDriveId,t=m.query.webLinkId,y=m.query.code;try{const i=await z.post(`${M.public.syncBaseUrl}/webLinks/_check`,{syncDriveId:l,webLinkId:t,code:y});i?.data?.data?(j.value=i?.data?.data?.title,N.value=i?.data?.data?.description,f.value=i?.data?.data?.owner,q.value=i?.data?.data?.users,A.value=i?.data?.data?.thumbnail?.path,R.value=i?.data?.data?.entriesCount,T.value=i?.data?.data?.hasPassphrase):O.value=!1}catch{O.value=!1}},re=async()=>{k.value=!0;const l=await P({sortBy:E[L.value].value,order:_.value},!1);k.value=!1,l?O.value=!1:U.value=!0},ue=l=>{const t=m.query.syncDriveId,y=m.query.webLinkId,i=m.query.code;T.value&&(X.webLinkPassphrases[`${t}${y}${i}`]=x.value),ie.push(`/app/webLink/entry/?syncDriveId=${t}&webLinkId=${y}&code=${i}&entryId=${l.id}`)},P=async(l={},t=!1)=>{D.value=!0,t||(b.value=null,B.value="");const y=m.query.syncDriveId,i=m.query.webLinkId,I=m.query.code,ee=["activity","address","favourite","location","previewText","music","sentiment","timezone","files.ext","files.variants.small","type","weather"];let F=[];try{const a=await z.post(`${M.public.syncBaseUrl}/webLinks/_list`,{syncDriveId:y,webLinkId:i,code:I,fields:ee,passphrase:x.value,sortBy:"publishedAt",order:_.value,pageSize:10,lastId:B.value});a?.data?.data&&(F=a?.data?.data),B.value=a?.data?.lastId??""}catch(a){if(a?.response?.data?.status==="forbidden")return!1}return F.forEach(a=>{b.value=(b.value??[]).concat(a?.id??"")}),await Promise.all(F.map(async a=>{if(!a||Object.keys(a).length<=1)return;let H;a.type!=="html"?H=ze(a.previewText):H=a.previewText;const ve=a.location?Me(a.location.lat,a.location.lng,null):"";if(a.id){const W={externalFileId:a.id,entryId:a.id,version:a.version,id:a.id,favourite:a.favourite,content:H,img:a.files?.map($=>({name:`${$.id}${$.variants?.small?.ext??$.ext}`,thumbnailLink:$.variants?.small?.path??"",mimeType:$.variants?.small?.mimeType,encrypted:!!$.variants?.small?.encrypted,encryption:$.variants?.small?.encryption}))??[],sentiment:a.sentiment,activity:a.activity,address:a.address||ve,weatherIcon:a.weather?.icon||"",temperature:a.weather?.degreeC||null,tags:[],dateOfJournal:a.dateOfJournal,timezone:a.timezone,musicTitle:a.music?.title||null,musicArtist:a.music?.artist||null,latLng:a.location?{lat:a.location.lat,lng:a.location.lng}:null},te=b.value.indexOf(W.entryId);te>=0?b.value.splice(te,1,W):b.value=b.value.concat(W)}D.value=!1})),!0},ce=()=>{g.value=g.value?0:1},pe=async l=>{g.value=2;const t=m.query.syncDriveId,y=m.query.webLinkId;if(l.type==="delete"){let i="";
1typeof l.selectedEntry=="string"?i=l.selectedEntry:l.id&&(i=l.id),i&&(await z.post(`${M.public.syncBaseUrl}/webLinks/update`,{syncDriveId:t,webLinkId:y,removedEntryIds:[i]}))?.data?.status==="ok"&&(w.value=!0,await P({sortBy:E[L.value].value,order:_.value},!1),w.value=!1)}g.value=0},me=async l=>{l!==L.value?(L.value=l,_.value="desc"):_.value=_.value==="desc"?"asc":"desc",w.value=!0,await P({sortBy:E[L.value].value,order:_.value},!1),w.value=!1};we(x,l=>{U.value=!1});const E=[{name:"menu.lastPublished",value:"publishedAt",active:!0}];return ge({title:()=>j.value||Y("webLink.sharedWebLinks")}),(l,t)=>{const y=_e;return n(),v(y,null,{default:o(()=>[d(xe,{style:{"max-width":"1000px",height:"100%"}},{default:o(()=>[e(O)||e(k)?(n(),h("div",qe,[s("div",null,[d(J,{class:"mx-2",variant:"flat",color:"surface5",rounded:"xl",width:"80vw","max-width":"480","min-height":"480"},{default:o(()=>[e(O)?(n(),v(S,{key:0,class:"align-end",src:e(A),cover:"",width:"100%",height:"320",color:"primary",gradient:"to bottom, rgba(0,0,0,0), rgba(0,0,0,.3), rgba(0,0,0,.8)"},{default:o(()=>[s("div",Ae,[s("h1",null,u(e(j)),1),s("div",Ue,[e(T)?(n(),v(C,{key:0,class:"me-2",size:"x-small",color:"white"},{default:o(()=>[...t[3]||(t[3]=[c("mdi-lock",-1)])]),_:1})):p("",!0),c(u(e(N)),1)]),e(k)?p("",!0):(n(),h("div",Re,u(l.$t("webLink.NEntries",{entriesCount:e(R)})),1))])]),_:1},8,["src"])):p("",!0),s("div",Fe,[d(Le,{onSubmit:t[1]||(t[1]=Ie(i=>re(),["prevent"]))},{default:o(()=>[e(T)?(n(),v($e,{key:0,class:"wider mx-auto",modelValue:e(x),"onUpdate:modelValue":t[0]||(t[0]=i=>Ce(x)?x.value=i:null),label:l.$t("webLink.passphrase"),variant:"solo-filled",flat:"",density:"compact",type:"password",rounded:"xl","error-messages":e(ne),disabled:e(k),autofocus:""},null,8,["modelValue","label","error-messages","disabled"])):p("",!0),e(k)?p("",!0):(n(),v(Q,{key:1,class:"rounded-xl mt-2",color:"primary",type:"submit",flat:"",disabled:e(T)&&!e(x).length},{default:o(()=>[d(C,{small:""},{default:o(()=>[...t[4]||(t[4]=[c("mdi-application-import",-1)])]),_:1}),s("strong",He,u(l.$t("webLink.openLink")),1)]),_:1},8,["disabled"]))]),_:1}),e(k)?(n(),v(se,{key:0,color:"primary",indeterminate:"",size:"16"})):p("",!0),s("div",We,[e(f)?.photoURL?(n(),v(ae,{key:0,class:"me-2",size:"18",color:"secondaryContainer"},{default:o(()=>[d(S,{src:e(f)?.photoURL},null,8,["src"])]),_:1})):p("",!0),e(f)?.displayName?(n(),h(G,{key:1},[c(u(l.$t("webLink.sharedBy",{displayName:e(f)?.displayName})),1)],64)):p("",!0)])])]),_:1}),s("div",Je,[s("div",Qe,[(n(),h("svg",{class:"logo",innerHTML:e(le)},null,8,Ge)),t[5]||(t[5]=s("span",{class:"on-surface"},"®",-1))]),s("div",Ke,u(l.$t("articles.download2")),1),s("div",Xe,[s("a",{class:"hyperlink",href:e(V)[0]?.link,target:"_blank"},"Android",8,Ye),t[6]||(t[6]=c(" | ",-1)),s("a",{class:"hyperlink",href:e(V)[1]?.link,target:"_blank"},"iOS/iPadOS",8,Ze),t[7]||(t[7]=c(" | ",-1)),s("a",{class:"hyperlink",href:e(V)[2]?.link,target:"_blank"},"MacOS",8,et),t[8]||(t[8]=c(" | ",-1)),t[9]||(t[9]=s("a",{class:"hyperlink",href:"/",target:"_blank"},"Web",-1))])])])])):e(b)||e(w)?(n(),h(G,{key:1},[d(J,{class:"mb-4",variant:"flat",color:"surface5",rounded:"lg"},{default:o(()=>[d(S,{class:"align-end",src:e(A),cover:"",width:"100%",height:"240",color:"primary",gradient:"to bottom, rgba(0,0,0,0), rgba(0,0,0,.3), rgba(0,0,0,.8)"},{default:o(()=>[s("div",tt,[s("div",st,[s("div",null,[s("h1",null,u(e(j)),1),s("div",at,u(e(N)),1)]),s("div",null,[e(oe)?(n(),v(Q,{key:0,color:"white",variant:"text",icon:"",size:"small",onClick:t[2]||(t[2]=i=>ce()),disabled:e(w)||e(g)===2},{default:o(()=>[d(C,null,{default:o(()=>[c(u(e(g)===0?"mdi-pencil":"mdi-check"),1)]),_:1})]),_:1},8,["disabled"])):p("",!0),d(Ve,null,{activator:o(({props:i})=>[d(Q,Pe(i,{color:"white",variant:"text",icon:"",disabled:e(w)||e(g)===2}),{default:o(()=>[d(C,null,{default:o(()=>[...t[10]||(t[10]=[c("mdi-sort-variant",-1)])]),_:1})]),_:1},16,["disabled"])]),default:o(()=>[d(Te,{density:"compact",nav:""},{default:o(()=>[(n(),h(G,null,Oe(E,(i,I)=>d(je,{key:I,onClick:ee=>me(I)},{title:o(()=>[d(C,{class:"me-2",size:"small",style:Be(`opacity: ${e(L)===I?"1":"0"};`)},{default:o(()=>[...t[11]||(t[11]=[c("mdi-check",-1)])]),_:1},8,["style"]),s("span",lt,u(l.$t(i.name)),1)]),append:o(()=>[I===e(L)?(n(),v(C,{key:0,size:"small"},{default:o(()=>[c(u(e(_)==="desc"?"mdi-arrow-down":"mdi-arrow-up"),1)]),_:1})):p("",!0)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1})])]),d(Ee,{class:"my-2"}),s("div",it,[s("div",null,[e(f)?.photoURL?(n(),v(ae,{key:0,class:"me-2",size:"18",color:"secondaryContainer"},{default:o(()=>[d(S,{src:e(f)?.photoURL},null,8,["src"])]),_:1})):p("",!0),e(f)?.displayName?(n(),h("span",ot,u(l.$t("webLink.sharedBy",{displayName:e(f)?.displayName})),1)):p("",!0)]),s("div",null,u(l.$t("webLink.NEntries",{entriesCount:e(R)})),1)])])]),_:1},8,["src"])]),_:1}),e(w)?(n(),h("div",nt,[d(se,{class:"my-12",color:"primary",indeterminate:""})])):(n(),v(De,{key:1,disableToolbar:!0,entries:e(b),isLoading:e(D),editMode:e(g),nextPageToken:e(B),encryptionInfo:null,onToggleSelect:ue,onEdit:pe,onDownloadEntries:P},null,8,["entries","isLoading","editMode","nextPageToken"])),s("div",dt,[s("div",rt,[(n(),h("svg",{class:"logo",innerHTML:e(le)}
1,null,8,ut)),t[12]||(t[12]=s("span",{class:"on-surface"},"®",-1))]),s("div",ct,u(l.$t("articles.download2")),1),s("div",pt,[s("a",{class:"hyperlink",href:e(V)[0]?.link,target:"_blank"},"Android",8,mt),t[13]||(t[13]=c(" | ",-1)),s("a",{class:"hyperlink",href:e(V)[1]?.link,target:"_blank"},"iOS/iPadOS",8,vt),t[14]||(t[14]=c(" | ",-1)),s("a",{class:"hyperlink",href:e(V)[2]?.link,target:"_blank"},"MacOS",8,ft),t[15]||(t[15]=c(" | ",-1)),t[16]||(t[16]=s("a",{class:"hyperlink",href:"/",target:"_blank"},"Web",-1))])])],64)):(n(),h("div",yt,[d(J,{class:"mx-2 pa-4 text-center",variant:"flat",color:"transparent"},{default:o(()=>[d(C,null,{default:o(()=>[...t[17]||(t[17]=[c("mdi-file-link",-1)])]),_:1}),d(Se,{class:"my-4"},{default:o(()=>[c(u(l.$t("webLink.notFound")),1)]),_:1}),s("div",ht,u(l.$t("webLink.invalid")),1)]),_:1})]))]),_:1})]),_:1})}}},It=fe(kt,[["__scopeId","data-v-e7db3ca4"]]);export{It 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.