PageSourceSearch

https://cloud.linkwarden.app/_next/static/chunks/874-3bfdc3c513dd1648.js

js linkwarden.app collected 2026-09-24 09:14:16 UTC 29,303 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[874],{23473:(e,s,l)=>{l.d(s,{A:()=>d});var t=l(6029),i=l(23645),a=l(19784),n=l(14187),r=l(82203),c=l.n(r),o=l(81278);function d(e){var s;let{link:l}=e,{t:r}=(0,n.Bd)(),d=!!(0,o.useRouter)().pathname.startsWith("/public")||void 0;return(0,t.jsxs)("div",{className:"flex gap-1 text-neutral",children:[(0,i.B8)(l,"monolith")&&(0,t.jsx)(c(),{href:"".concat(d?"/public":"","/preserved/").concat(null==l?void 0:l.id,"?format=").concat(a.Q3.monolith),target:"_blank",onClick:e=>{e.stopPropagation()},className:"hover:opacity-70 duration-100",children:(0,t.jsx)("i",{className:"bi-filetype-html text-md leading-none",title:r("webpage")})}),(0,i.B8)(l,"image")&&(0,t.jsx)(c(),{href:"".concat(d?"/public":"","/preserved/").concat(null==l?void 0:l.id,"?format=").concat((null==l||null==(s=l.image)?void 0:s.endsWith("png"))?a.Q3.png:a.Q3.jpeg),target:"_blank",onClick:e=>{e.stopPropagation()},className:"hover:opacity-70 duration-100",children:(0,t.jsx)("i",{className:"bi-file-earmark-image text-md leading-none",title:r("image")})}),(0,i.B8)(l,"pdf")&&(0,t.jsx)(c(),{href:"".concat(d?"/public":"","/preserved/").concat(null==l?void 0:l.id,"?format=").concat(a.Q3.pdf),target:"_blank",onClick:e=>{e.stopPropagation()},className:"hover:opacity-70 duration-100",children:(0,t.jsx)("i",{className:"bi-file-earmark-pdf text-md leading-none",title:r("pdf")})}),(0,i.B8)(l,"readable")&&(0,t.jsx)(c(),{href:"".concat(d?"/public":"","/preserved/").concat(null==l?void 0:l.id,"?format=").concat(a.Q3.readability),target:"_blank",onClick:e=>{e.stopPropagation()},className:"hover:opacity-70 duration-100",children:(0,t.jsx)("i",{className:"bi-file-earmark-text text-md leading-none",title:r("readable")})})]})}},35455:(e,s,l)=>{l.d(s,{A:()=>u});var t=l(6029),i=l(55729),a=l(19784),n=l(9320);let r=async(e,s)=>{await e.cancelQueries({queryKey:s}),e.setQueriesData({queryKey:s},e=>{if(e)return{pages:e.pages.slice(0,1),pageParams:e.pageParams.slice(0,1)}}),await e.invalidateQueries({queryKey:s})};var c=l(93251),o=l(73639),d=l(35270);function u(e){let{sortBy:s,setSort:l,t:u}=e,{updateSettings:x}=(0,n.A)(),m=(0,c.jE)();return(0,i.useEffect)(()=>{x({sortBy:s})},[s]),(0,t.jsxs)(o.rI,{children:[(0,t.jsx)(o.ty,{asChild:!0,children:(0,t.jsx)(d.$,{variant:"ghost",size:"icon",children:(0,t.jsx)("i",{className:"bi-chevron-expand text-neutral text-xl"})})}),(0,t.jsx)(o.SQ,{sideOffset:4,align:"end",children:(0,t.jsxs)(o.Hr,{value:s.toString(),onValueChange:e=>{r(m,["links"]),l(e)},children:[(0,t.jsx)(o.Ht,{value:a.FU.DateNewestFirst.toString(),children:u("date_newest_first")}),(0,t.jsx)(o.Ht,{value:a.FU.DateOldestFirst.toString(),children:u("date_oldest_first")}),(0,t.jsx)(o.Ht,{value:a.FU.NameAZ.toString(),children:u("name_az")}),(0,t.jsx)(o.Ht,{value:a.FU.NameZA.toString(),children:u("name_za")})]})})]})}},46048:(e,s,l)=>{l.d(s,{A:()=>h});var t=l(6029),i=l(55729),a=l(45900),n=l(11912),r=l(74255),c=l(58578),o=l(32764),d=l(14187),u=l(34169),x=l(35270),m=l(36919);function h(e){let{onClose:s}=e,{t:l}=(0,d.Bd)(),{selectedIds:h,clearSelected:p,selectionCount:g}=(0,r.A)(),[j,f]=(0,i.useState)(!1),[v,b]=(0,i.useState)(!1),[N,y]=(0,i.useState)({tags:[]}),k=(0,u.jr)(),w=async()=>{if(!j){f(!0);let e=c.Ay.loading(l("updating")),t=Object.keys(h).map(e=>({id:Number(e)}));await k.mutateAsync({links:t,newData:N,removePreviousTags:v},{onSettled:(t,i)=>{f(!1),c.Ay.dismiss(e),i?c.Ay.error(i.message):(p(),s(),c.Ay.success(l("updated")))}})}};return(0,t.jsxs)(o.A,{toggleModal:s,children:[(0,t.jsx)("p",{className:"text-xl font-thin",children:1===g?l("edit_link"):l("edit_links",{count:g})}),(0,t.jsx)(m.w,{className:"my-3"}),(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsxs)("div",{className:"grid sm:grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2",children:l("move_to_collection")}),(0,t.jsx)(a.A,{showDefaultValue:!1,onChange:e=>{let s=(null==e?void 0:e.value)||null;y(e=>({...e,collectionId:s}))},creatable:!1})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2",children:l("add_tags")}),(0,t.jsx)(n.A,{onChange:e=>{let s=e.map(e=>({name:e.label}));y(e=>({...e,tags:s}))}})]})]}),(0,t.jsx)("div",{className:"sm:ml-auto w-1/2 p-3",children:(0,t.jsxs)("label",{className:"flex items-center gap-2 ",children:[(0,t.jsx)("input",{type:"checkbox",className:"checkbox checkbox-primary",checked:v,onChange:e=>b(e.target.checked)}),l("remove_previous_tags")]})})]}),(0,t.jsx)("div",{className:"flex justify-end items-center mt-5",children:(0,t.jsx)(x.$,{variant:"primary",onClick:w,children:l("save_changes")}
1)})]})}},47088:(e,s,l)=>{l.d(s,{A:()=>c});var t=l(6029),i=l(81278),a=l(50212),n=l(40311),r=l(35270);function c(e){let{link:s,btnStyle:l}=e,c=(0,n.A)();(0,i.useRouter)().pathname.startsWith("/public");let o=null!=s&&!!s.pinnedBy&&!!s.pinnedBy[0];return(0,t.jsx)(r.$,{variant:"simple",size:"icon",className:(0,a.A)("absolute top-3 right-[3.25rem] group-hover:opacity-100 group-focus-within:opacity-100 opacity-0 duration-100 text-neutral",l),onClick:()=>c(s),children:(0,t.jsx)("i",{title:"Pin",className:(0,a.A)("text-xl",o?"bi-pin-fill":"bi-pin")})})}},47175:(e,s,l)=>{l.d(s,{A:()=>r});var t=l(6029),i=l(69566),a=l(82203),n=l.n(a);let r=l(55729).memo(function(e){let{link:s,collection:l,isPublicRoute:a}=e;return!a&&(null==l?void 0:l.name)?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(n(),{href:"/collections/".concat(s.collection.id),onClick:e=>{e.stopPropagation()},className:"flex items-center gap-1 max-w-full w-fit hover:opacity-70 duration-100 select-none",title:null==l?void 0:l.name,children:[s.collection.icon?(0,t.jsx)(i.A,{icon:s.collection.icon,size:20,weight:s.collection.iconWeight||"regular",color:s.collection.color}):(0,t.jsx)("i",{className:"bi-folder-fill text-lg",style:{color:s.collection.color}}),(0,t.jsx)("p",{className:"truncate",children:null==l?void 0:l.name})]})}):null})},53649:(e,s,l)=>{l.d(s,{A:()=>d});var t=l(6029),i=l(73639),a=l(9320),n=l(19784),r=l(14187),c=l(35270),o=l(55729);function d(e){let{viewMode:s,setViewMode:l,dashboard:d}=e,{settings:u,updateSettings:x}=(0,a.A)(e=>e),{t:m}=(0,r.Bd)();(0,o.useEffect)(()=>{x({viewMode:s})},[s,x]);let h=Object.keys(u.show).filter(e=>d||u.viewMode!==n.nE.List?!d&&u.viewMode!==n.nE.Card||"tags"!==e&&"description"!==e:"tags"!==e&&"image"!==e&&"description"!==e);return(0,t.jsxs)(i.rI,{children:[(0,t.jsx)(i.ty,{asChild:!0,children:(0,t.jsx)(c.$,{variant:"ghost",size:"icon",children:d||s===n.nE.Card?(0,t.jsx)("i",{className:"bi-grid text-neutral"}):s===n.nE.Masonry?(0,t.jsx)("i",{className:"bi-columns-gap text-neutral"}):(0,t.jsx)("i",{className:"bi-view-stacked text-neutral"})})}),(0,t.jsxs)(i.SQ,{sideOffset:4,align:"end",children:[!d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-1",children:[(0,t.jsx)("p",{className:"text-xs font-bold text-neutral mb-1",children:m("view")}),(0,t.jsx)("div",{className:"flex gap-1 border-border",children:[n.nE.Card,n.nE.Masonry,n.nE.List].map(e=>{let i=e===n.nE.Card?()=>(0,t.jsx)("i",{className:"bi-grid w-4 h-4 text-neutral"}):e===n.nE.Masonry?()=>(0,t.jsx)("i",{className:"bi-columns-gap w-4 h-4 text-neutral"}):()=>(0,t.jsx)("i",{className:"bi-view-stacked w-4 h-4 text-neutral"});return(0,t.jsx)(c.$,{variant:"ghost",size:"sm",onClick:()=>{l(e),x({viewMode:e})},className:"flex-1 "+(s===e?"bg-primary/20 hover:bg-primary/20":"hover:bg-neutral/20"),children:(0,t.jsx)(i,{})},e)})})]}),(0,t.jsx)(i.mB,{})]}),(0,t.jsx)("p",{className:"text-xs font-bold text-neutral px-1 mb-1",children:m("show")}),h.map(e=>(0,t.jsx)(i.hO,{checked:u.show[e],onSelect:s=>{s.preventDefault(),x({show:{...u.show,[e]:!u.show[e]}})},children:m(e)},e)),!d&&u.viewMode!==n.nE.List&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.mB,{}),(0,t.jsxs)("div",{className:"px-1",children:[(0,t.jsxs)("p",{className:"text-xs font-bold text-neutral mb-1",children:[m("columns"),":"," ",0===u.columns?m("default"):u.columns]}),(0,t.jsx)("input",{type:"range",min:0,max:8,step:1,value:u.columns,onChange:e=>{x({columns:Number(e.target.value)})},className:"range range-xs range-primary w-full"}),(0,t.jsx)("div",{className:"flex justify-between text-xs text-neutral select-none px-1",children:Array.from({length:9}).map((e,s)=>(0,t.jsx)("span",{children:"|"},s))})]})]})]})]})}},55856:(e,s,l)=>{l.d(s,{A:()=>r});var t=l(6029),i=l(82203),a=l.n(i),n=l(55729);let r=n.memo(function(e){let{link:s}=e,[l,i]=(0,n.useState)("");return(0,n.useEffect)(()=>{if("url"===s.type&&s.url)try{i(new URL(s.url).host.toLowerCase())}catch(e){console.log(e)}},[s]),s.url&&l?(0,t.jsxs)(a(),{href:s.url||"",target:"_blank",title:s.url||"",onClick:e=>{e.stopPropagation()},className:"flex gap-1 item-center select-none text-neutral hover:opacity-70 duration-100 max-w-full w-fit",children:[(0,t.jsx)("i",{className:"bi-l
1ink-45deg text-lg leading-none"}),(0,t.jsx)("p",{className:"text-xs truncate",children:l})]}):(0,t.jsxs)("div",{className:"flex gap-1 item-center select-none text-neutral duration-100 max-w-full w-fit",children:[(0,t.jsx)("i",{className:(()=>{switch(s.type){case"pdf":return"bi-file-earmark-pdf";case"image":return"bi-file-earmark-image";default:return"bi-link-45deg"}})()+" text-md leading-none"}),(0,t.jsx)("p",{className:"text-xs truncate",children:s.type})]})})},58503:(e,s,l)=>{l.d(s,{A:()=>a});var t=l(19784),i=l(23319);let a=(e,s,l)=>{if(s.linksRouteTo===i.LinksRouteTo.DETAILS)l();else{let l=(e=>{let{link:s,preference:l}=e;if("ORIGINAL"===l&&"url"===s.type)return null;if("PDF"===l||"pdf"===s.type)return s.pdf&&"unavailable"!==s.pdf?t.Q3.pdf:null;if("READABLE"===l&&"url"===s.type)return s.readable&&"unavailable"!==s.readable?t.Q3.readability:null;if("SCREENSHOT"===l||"image"===s.type){var i;return s.image&&"unavailable"!==s.image?(null==s||null==(i=s.image)?void 0:i.endsWith("png"))?t.Q3.png:t.Q3.jpeg:null}if("MONOLITH"!==l)return null;else return s.monolith&&"unavailable"!==s.monolith?t.Q3.monolith:null})({link:e,preference:s.linksRouteTo});window.open(null!==l?"/preserved/".concat(null==e?void 0:e.id,"?format=").concat(l):e.url,"_blank")}}},74255:(e,s,l)=>{l.d(s,{A:()=>t});let t=(0,l(29784).vt)()((e,s)=>({selectedIds:{},isSelected:e=>!!s().selectedIds[e],toggleSelected:s=>e(e=>{let l={...e.selectedIds};return l[s]?(delete l[s],{selectedIds:l,selectionCount:e.selectionCount-1}):(l[s]=!0,{selectedIds:l,selectionCount:e.selectionCount+1})}),clearSelected:()=>e({selectedIds:{},selectionCount:0}),setSelected:s=>e(()=>{let e={};for(let l=0;l<s.length;l++)e[s[l]]=!0;return{selectedIds:e,selectionCount:Object.keys(e).length}}),selectionCount:0}))},88202:(e,s,l)=>{l.d(s,{A:()=>$});var t=l(6029),i=l(19784),a=l(55729),n=l(21485),r=l(4796),c=l(2595),o=l(47175),d=l(8588),u=l.n(d),x=l(23645),m=l(6472),h=l(58578),p=l(55856),g=l(9320),j=l(47088),f=l(23473),v=l(58503),b=l(36919),N=l(70047),y=l(45933);let k=a.memo(function(e){var s,l;let{link:d,collection:k,isPublicRoute:w,t:A,user:_,disableDraggable:C,isSelected:S,toggleSelected:E,imageHeightClass:M,editMode:P}=e,{attributes:L,listeners:B,setNodeRef:R,isDragging:z}=(0,N.PM)({id:null!=(l=null==(s=d.id)?void 0:s.toString())?l:"",data:{linkId:d.id,link:d},disabled:C}),{settings:{show:I}}=(0,g.A)(),Q=(0,a.useRef)(null),[D,F]=(0,a.useState)(!1);return(0,t.jsx)("div",{ref:R,className:(0,y.cn)("border border-solid border-neutral-content bg-base-200 shadow-md hover:shadow-none duration-100 rounded-xl relative group",S&&"border-primary bg-base-300",z?"opacity-30":"opacity-100","relative group touch-manipulation select-none"),onClick:()=>P?E(d.id):P?h.Ay.error(A("link_selection_error")):void 0,children:(0,t.jsxs)("div",{ref:Q,className:"h-full",children:[(0,t.jsxs)("div",{className:"rounded-xl cursor-pointer h-full flex flex-col justify-between",onClick:()=>!P&&(0,v.A)(d,_,()=>F(!0)),...B,...L,children:[I.image&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"relative rounded-t-xl ".concat(M," overflow-hidden"),children:[(0,x.B8)(d,"preview")?(0,t.jsx)(u(),{src:"/api/v1/archives/".concat(d.id,"?format=").concat(i.Q3.jpeg,"&preview=true&updatedAt=").concat(d.updatedAt),width:1280,height:720,alt:"",className:"rounded-t-xl select-none object-cover z-10 ".concat(M," w-full shadow opacity-80 scale-105"),style:I.icon?{filter:"blur(1px)"}:void 0,draggable:"false",onError:e=>{e.target.style.display="none"},unoptimized:!0}):"unavailable"===d.preview?(0,t.jsx)("div",{className:"bg-gray-50 ".concat(M," bg-opacity-80")}):(0,t.jsx)("div",{className:"".concat(M," bg-opacity-80 skeleton rounded-none")}),I.icon&&(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 bottom-0 rounded-t-xl flex items-center justify-center rounded-md",children:(0,t.jsx)(m.A,{link:d})}),I.preserved_formats&&"url"===d.type&&(0,x.Zp)(d)&&(0,t.jsx)("div",{className:"absolute bottom-0 right-0 m-2 bg-base-200 bg-opacity-60 px-1 rounded-md",children:(0,t.jsx)(f.A,{link:d})})]}),(0,t.jsx)(b.w,{})]}),(0,t.jsxs)("div",{className:"flex flex-col justify-between h-full min-h-11",children:[(0,t.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[I.name&&(0,t.jsx)("p",{className:"truncate w-full text-primary text-sm",children:(0,n.A)(d.name)}),I.link&&(0,t.jsx)(p.A,{link:d})]}),(I.collection||I.date)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(b.w,{className:"mb-1"}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs text-neutral px-3 pb-1 gap-2",children:[I.collection&&!w&&k&&(0,t.jsx)("div",{className:"cursor-pointer truncate",children:(0,t.jsx)(o.A,{link:d,collection:k,isPublicRoute:w})}),I.date&&(0,t.jsx)(c.A,{link:d})]})]})]})]}),(0,t.jsx)("div",{className:"absolute pointer-events-none top-0 left-0 right-0 bottom-0 bg-base-100 bg-opacity-0 group-hover:bg-opacity-20 group-focus-within:opacity-20 rounded-xl duration-100"}),(0,t.jsx)(r.A,{link:d,linkModal:D,t:A,setLinkModal:e=>F(e),className:"absolute top-3 right-3 group-hover:opacity-100 group-focus-within:opacity-100 opacity-0 duration-100 text-neutral z-20"}),!w&&(0,t.jsx)(j.A,{link:d})]})})});var w=l(43072),A=l(82203),_=l.n(A),C=l(50212),S=l(35270),E=l(23994);let M=a.memo(function(e){var s,l;let{link:d,collection:y,isPublicRoute:k,t:w,disableDraggable:A,user:M,isSelected:P,toggleSelected:L,imageHeightClass:B,editMode:R}=e,{attributes:z,listeners:I,setNodeRef:Q,isDragging:D}=(0,N.PM)({id:null!=(l=null==(s=d.id)?void 0:s.toString())?l:"",data:{linkId:d.id,link:d},disabled:A}),{settings:{show:F}}=(0,g.A)(),O=(0,a.useRef)(null),[$,H]=(0,a.useState)(!1);return(0,t.jsx)("div",{ref:Q,className:(0,E.cn)("border border-solid border-neutral-content bg-base-200 shadow-md hover:shadow-none duration-100 rounded-xl relative group",P&&"border-primary bg-base-300"),onClick:()=>R?L(d.id):R?h.Ay.error(w("link_selection_error")):void 0,children:(0,t.jsxs)("div",{ref:O,children:[(0,t.jsxs)("div",{className:"rounded-xl cursor-pointer",onClick:()=>!R&&(0,v.A)(d,M,()=>H(!0)),...I,...z,children:[F.image&&(0,x.B8)(d,"preview")&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"relative rounded-t-xl overflow-hidden",children:[(0,x.B8)(d,"preview")?(0,t.jsx)(u(),{src:"/api/v1/archives/".concat(d.id,"?format=").concat(i.Q3.jpeg,"&preview=true&updatedAt=").concat(d.updatedAt),width:1280,height:720,alt:"",className:"rounded-t-xl select-none object-cover z-10 ".concat(B," w-full shadow opacity-80 scale-105"),style:F.icon?{filter:"blur(1px)"}:void 0,draggable:"false",onError:e=>{e.target.style.display="none"},unoptimized:!0}):"unavailable"===d.preview?null:(0,t.jsx)("div",{className:"duration-100 ".concat(B," bg-opacity-80 skeleton rounded-none")}),F.icon&&(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 bottom-0 rounded-t-xl flex items-center justify-center rounded-md",children:(0,t.jsx)(m.A,{link:d})})]}),(0,t.jsx)(b.w,{})]}),(0,t.jsxs)("div",{className:"p-3 flex flex-col gap-2 h-full min-h-14",children:[F.name&&(0,t.jsxs)("div",{className:"hyphens-auto w-full text-primary text-sm",children:[(0,n.A)(d.name),F.preserved_formats&&"url"===d.type&&(0,x.Zp)(d)&&(0,t.jsx)("div",{className:"pl-1 inline-block",children:(0,t.jsx)(f.A,{link:d})})]}),F.link&&(0,t.jsx)(p.A,{link:d}),F.description&&d.description&&(0,t.jsx)("p",{className:(0,C.A)("hyphens-auto text-sm w-full"),children:(0,n.A)(d.description)}),F.tags&&d.tags&&d.tags[0]&&(0,t.jsx)("div",{className:"flex gap-1 items-center flex-wrap",children:d.tags.map((e,s)=>(0,t.jsx)(S.$,{variant:"ghost",size:"sm",children:(0,t.jsxs)(_(),{href:"/tags/"+e.id,onClick:e=>{e.stopPropagation()},className:"truncate max-w-[19rem]",children:["#",e.name]})}
1,s))})]}),(F.collection||F.date)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(b.w,{className:"mb-1"}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-between items-center text-xs text-neutral px-3 pb-1 w-full gap-x-2",children:[!k&&F.collection&&y&&(0,t.jsx)("div",{className:"cursor-pointer truncate",children:(0,t.jsx)(o.A,{link:d,collection:y,isPublicRoute:k})}),F.date&&(0,t.jsx)(c.A,{link:d})]})]})]}),(0,t.jsx)("div",{className:"absolute pointer-events-none top-0 left-0 right-0 bottom-0 bg-base-100 bg-opacity-0 group-hover:bg-opacity-20 group-focus-within:opacity-20 rounded-xl duration-100"}),(0,t.jsx)(r.A,{link:d,linkModal:$,t:w,setLinkModal:e=>H(e),className:"absolute top-3 right-3 group-hover:opacity-100 group-focus-within:opacity-100 opacity-0 duration-100 text-neutral z-20"}),!k&&(0,t.jsx)(j.A,{link:d})]})})});var P=l(43235);let L=a.memo(function(e){var s,l;let{link:i,collection:d,isPublicRoute:u,t:b,disableDraggable:k,user:w,isSelected:A,toggleSelected:_,editMode:C}=e,{attributes:S,listeners:E,setNodeRef:M,isDragging:P}=(0,N.PM)({id:null!=(l=null==(s=i.id)?void 0:s.toString())?l:"",data:{linkId:i.id,link:i},disabled:k}),{settings:{show:L}}=(0,g.A)(),[B,R]=(0,a.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:M,className:(0,y.cn)("rounded-md border relative group items-center flex",A?"border border-primary bg-base-300":"border-transparent",(0,y.xx)()?"py-1":"hover:bg-base-300 px-2 py-1",P?"opacity-30":"opacity-100","duration-200, touch-manipulation select-none"),onClick:()=>C?_(i.id):C?h.Ay.error(b("link_selection_error")):void 0,children:[(0,t.jsxs)("div",{className:"flex items-center cursor-pointer w-full min-h-12",onClick:()=>!C&&(0,v.A)(i,w,()=>R(!0)),...S,...E,children:[L.icon&&(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(m.A,{link:i,hideBackground:!0})}),(0,t.jsxs)("div",{className:"w-[calc(100%-56px)] ml-2",children:[L.name&&(0,t.jsxs)("div",{className:"flex gap-1 mr-20",children:[(0,t.jsx)("p",{className:"truncate text-primary",children:(0,n.A)(i.name)}),L.preserved_formats&&"url"===i.type&&(0,x.Zp)(i)&&(0,t.jsx)("div",{className:"pl-1 inline-block text-lg",children:(0,t.jsx)(f.A,{link:i})})]}),(0,t.jsx)("div",{className:"mt-1 flex flex-col sm:flex-row sm:items-center gap-2 text-xs text-neutral",children:(0,t.jsxs)("div",{className:"flex items-center gap-x-3 text-neutral flex-wrap",children:[L.link&&(0,t.jsx)(p.A,{link:i}),L.collection&&d&&(0,t.jsx)(o.A,{link:i,collection:d,isPublicRoute:u}),L.date&&(0,t.jsx)(c.A,{link:i})]})})]})]}),!u&&(0,t.jsx)(j.A,{link:i}),(0,t.jsx)(r.A,{link:i,linkModal:B,t:b,setLinkModal:e=>R(e),className:"absolute top-3 right-3 group-hover:opacity-100 group-focus-within:opacity-100 opacity-0 duration-100 text-neutral z-20"})]}),(0,t.jsx)("div",{className:"last:hidden rounded-none my-0 mx-1 border-t border-base-300 h-[1px]"})]})});var B=l(85492),R=l(81278),z=l(14187),I=l(74255),Q=l(38544);function D(e){let{links:s,collectionsById:l,isPublicRoute:i,t:n,user:r,disableDraggable:c,isSelected:o,toggleSelected:d,editMode:u,isLoading:x,hasNextPage:m,placeHolderRef:h}=e,p=(0,g.A)(e=>e.settings),j={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},f=()=>{let e=window.innerWidth;return e>=1501?5:e>=881?4:e>=701?3:e>=501?2:1},[v,b]=(0,a.useState)(p.columns||f()),N=(0,a.useMemo)(()=>j[v],[v]),y={1:"h-44",2:"h-40",3:"h-36",4:"h-32",5:"h-28",6:"h-24",7:"h-20",8:"h-20"},w=(0,a.useMemo)(()=>v?y[v]:"h-40",[v]);return(0,a.useEffect)(()=>{let e=()=>{0===p.columns&&b(f())};return 0===p.columns&&window.addEventListener("resize",e),b(p.columns||f()),()=>{0===p.columns&&window.removeEventListener("resize",e)}},[p.columns]),(0,t.jsxs)("div",{className:"".concat(N," grid gap-3 pb-3"),children:[null==s?void 0:s.map(e=>{let s=l.get(e.collection.id),a=o(e.id);return(0,t.jsx)(k,{link:e,collection:s,isPublicRoute:i,t:n,user:r,disableDraggable:c,isSelected:a,toggleSelected:d,editMode:u,imageHeightClass:w},e.id)}),(m||x)&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",ref:h,children:[(0,t.jsx)("div",{className:"skeleton h-40 w-full"}),(0,t.jsx)("div",{className:"skeleton h-3 w-2/3"}),(0,t.jsx)("div",{className:"skeleton h-3 w-full"}),(0,t.jsx)("div",{className:"skeleton h-3 w-full"}),(0,t.jsx)("div",{className:"skeleton h-3 w-1/3"})]})]})}function F(e){let{links:s,collectionsById:l,isPublicRoute:i,t:n,disableDraggable:r,user:c,isSelected:o,toggleSelected:d,editMode:u,isLoading:x,hasNextPage:m,placeHolderRef:h}=e,p=(0,g.A)(e=>e.settings),j={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},f=()=>{let e=window.innerWidth;return e>=1501?5:e>=881?4:e>=701?3:e>=501?2:1},[v,b]=(0,a.useState)(p.columns||f()),N=(0,a.useMemo)(()=>j[v],[v]),y={1:"h-44",2:"h-40",3:"h-36",4:"h-32",5:"h-28",6:"h-24",7:"h-20",8:"h-20"},k=(0,a.useMemo)(()=>v?y[v]:"h-40",[v]);return(0,a.useEffect)(()=>{let e=()=>{0===p.columns&&b(f())};return 0===p.columns&&window.addEventListener("resize",e),b(p.columns||f()),()=>{0===p.columns&&window.removeEventListener("resize",e)}},[p.columns]),(0,t.jsxs)(P.A,{breakpointCols:0===p.columns?{default:5,1500:4,881:3,700:2,500:1}:v,columnClassName:"flex flex-col gap-3 !w-full",className:"".concat(N," grid gap-3 pb-3"),children:[null==s?void 0:s.map(e=>{let s=l.get(e.collection.id),a=o(e.id);return(0,t.jsx)(M,{link:e,collection:s,isPublicRoute:i,t:n,disableDraggable:r,user:c,isSelected:a,toggleSelected:d,imageHeightClass:k,editMode:u},e.id)}),(m||x)&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",ref:h,children:[(0,t.jsx)("div",{className:"skeleton h-40 w-full"}),(0,t.jsx)("div",{className:"skeleton h-3 w-2/3"}),(0,t.jsx)("div",{className:"skeleton h-3 w-full"}),(0,t.jsx)("div",{className:"skeleton h-3 w-full"}),(0,t.jsx)("div",{className:"skeleton h-3 w-1/3"})]})]})}function O(e){let{links:s,collectionsById:l,isPublicRoute:i,t:a,disableDraggable:n,user:r,isSelected:c,toggleSelected:o,editMode:d,isLoading:u,hasNextPage:x,placeHolderRef:m}=e;return(0,t.jsxs)("div",{className:"flex flex-col",children:[null==s?void 0:s.map((e,s)=>{let u=l.get(e.collection.id),x=c(e.id);return(0,t.jsx)(L,{link:e,collection:u,isPublicRoute:i,t:a,disableDraggable:n,user:r,isSelected:x,toggleSelected:o,count:s,editMode:d},e.id)}),(x||u)&&(0,t.jsxs)("div",{ref:m,className:"flex gap-2 py-2 px-1",children:[(0,t.jsx)("div",{className:"skeleton h-12 w-12"}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,t.jsx)("div",{className:"skeleton h-2 w-2/3"}),(0,t.jsx)("div",{className:"skeleton h-2 w-full"}),(0,t.jsx)("div",{className:"skeleton h-2 w-1/3"})]})]})]})}function $(e){let{layout:s,links:l,editMode:n,useData:r}=e,{ref:c,inView:o}=(0,w.Wx)(),{t:d}=(0,z.Bd)(),u=!!(0,R.useRouter)().pathname.startsWith("/public");(0,a.useEffect)(()=>{o&&r.hasNextPage&&(r.isFetchingNextPage||r.fetchNextPage())},[o,r.hasNextPage,r.isFetchingNextPage,r.fetchNextPage]);let{data:x=[]}=(0,B.Xd)(),m=(0,a.useMemo)(()=>{let e=new Map;for(let s of x)e.set(s.id,s);return e},[x]),{clearSelected:h,isSelected:p,toggleSelected:g}=(0,I.A)();(0,a.useEffect)(()=>{n||h()},[n]);let j=function(e){let[s,l]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let s=window.matchMedia(e),t=e=>{l(e.matches)};return l(s.matches),s.addEventListener("change",t),()=>{s.removeEventListener("change",t)}},[e]),s}("(max-width: 1023px)"),{data:f}=(0,Q.Jd)();return s===i.nE.List?(0,t.jsx)(O,{links:l||[],collectionsById:m,isPublicRoute:u,t:d,disableDraggable:j,user:f,toggleSelected:g,isSelected:p,editMode:n||!1,isLoading:null==r?void 0:r.isLoading,hasNextPage:null==r?void 0:r.hasNextPage,placeHolderRef:c}):s===i.nE.Masonry?(0,t.jsx)(F,{links:l||[],collectionsById:m,isPublicRoute:u,t:d,disableDraggable:j,user:f,toggleSelected:g,isSelected:p,editMode:n||!1,isLoading:null==r?void 0:r.isLoading,hasNextPage:null==r?void 0:r.hasNextPage,placeHolderRef:c}):(0,t.jsx)(D,{links:l||[],collectionsById:m,isPublicRoute:u,t:d,user:f,disableDraggable:j,toggleSelected:g,isSelected:p,editMode:n||!1,isLoading:null==r?void 0:r.isLoading,hasNextPage:null==r?void 0:r.hasNextPage,placeHolderRef:c})}},90273:(e,s,l)=>{l.d(s,{A:()=>g});var t=l(6029),i=l(55729),a=l(35455),n=l(53649),r=l(94941),c=l(46048),o=l(81278),d=l(74255),u=l(34169),x=l(58578),m=l(35270),h=l(29035),p=l(63505);let g=e=>
1{let{children:s,t:l,viewMode:g,setViewMode:j,sortBy:f,setSortBy:v,editMode:b,setEditMode:N,links:y}=e,{selectedIds:k,setSelected:w,clearSelected:A,selectionCount:_}=(0,d.A)(),C=(0,u.Cy)(),S=(0,u._E)(),E=(0,o.useRouter)(),[M,P]=(0,i.useState)(!1),[L,B]=(0,i.useState)(!1),[R,z]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(b&&N)return N(!1)},[E]);let I=async()=>{let e=x.Ay.loading(l("deleting")),s=Object.keys(k).map(Number);await C.mutateAsync(s,{onSettled:(s,t)=>{x.Ay.dismiss(e),t?x.Ay.error(t.message):(A(),null==N||N(!1),x.Ay.success(l("deleted")))}})},Q=async()=>{let e=x.Ay.loading(l("sending_request")),s=Object.keys(k).map(Number);await S.mutateAsync({linkIds:s},{onSettled:(s,t)=>{x.Ay.dismiss(e),t?x.Ay.error(t.message):(A(),null==N||N(!1),x.Ay.success(l("links_being_archived")))}})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[s,(0,t.jsx)("div",{className:"flex gap-3 items-center justify-end",children:(0,t.jsxs)("div",{className:"flex gap-2 items-center mt-2",children:[y&&y.length>0&&void 0!==b&&N&&(0,t.jsx)(m.$,{variant:"ghost",size:"icon",onClick:()=>{N(!b),A()},className:b?"bg-primary/20 hover:bg-primary/20":"",children:(0,t.jsx)("i",{className:"bi-pencil-fill text-neutral text-xl"})}),(0,t.jsx)(a.A,{sortBy:f,setSort:e=>{v(e)},t:l}),(0,t.jsx)(n.A,{viewMode:g,setViewMode:j})]})})]}),y&&b&&y.length>0&&(0,t.jsxs)("div",{className:"w-full flex justify-between items-center min-h-[32px]",children:[(0,t.jsxs)("div",{className:"flex gap-3 ml-3",children:[(0,t.jsx)("input",{type:"checkbox",className:"checkbox checkbox-primary",onChange:()=>void(_===y.length?A():w(y.map(e=>e.id))),checked:_===y.length&&y.length>0}),_>0?(0,t.jsx)("span",{children:1===_?l("link_selected"):l("links_selected",{count:_})}):(0,t.jsx)("span",{children:l("nothing_selected")})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(h.Bc,{children:(0,t.jsxs)(h.m_,{children:[(0,t.jsx)(h.k$,{asChild:!0,children:(0,t.jsx)(m.$,{variant:"ghost",size:"icon",onClick:()=>z(!0),disabled:0===_,children:(0,t.jsx)("i",{className:"bi-arrow-clockwise"})})}),(0,t.jsx)(h.ZI,{children:(0,t.jsx)("p",{children:l("refresh_preserved_formats")})})]})}),(0,t.jsx)(h.Bc,{children:(0,t.jsxs)(h.m_,{children:[(0,t.jsx)(h.k$,{asChild:!0,children:(0,t.jsx)(m.$,{onClick:()=>B(!0),variant:"ghost",size:"icon",disabled:0===_,children:(0,t.jsx)("i",{className:"bi-pencil-square"})})}),(0,t.jsx)(h.ZI,{children:(0,t.jsx)("p",{children:l("edit")})})]})}),(0,t.jsx)(h.Bc,{children:(0,t.jsxs)(h.m_,{children:[(0,t.jsx)(h.k$,{asChild:!0,children:(0,t.jsx)(m.$,{onClick:e=>{e.shiftKey?I():P(!0)},variant:"ghost",size:"icon",disabled:0===_,children:(0,t.jsx)("i",{className:"bi-trash text-error"})})}),(0,t.jsx)(h.ZI,{children:(0,t.jsxs)("p",{children:[" ",l("delete")]})})]})})]})]}),M&&(0,t.jsx)(r.A,{onClose:()=>{P(!1),null==N||N(!1)}}),L&&(0,t.jsx)(c.A,{onClose:()=>{B(!1),null==N||N(!1)}}),R&&(0,t.jsx)(p.A,{toggleModal:()=>{z(!1)},onConfirmed:async()=>{await Q()},title:l("refresh_preserved_formats"),children:(0,t.jsx)("p",{className:"mb-5",children:1===_?l("refresh_preserved_formats_confirmation_desc"):l("refresh_multiple_preserved_formats_confirmation_desc",{count:_})})})]})}},94941:(e,s,l)=>{l.d(s,{A:()=>u});var t=l(6029);l(55729);var i=l(74255),a=l(32764),n=l(35270),r=l(14187),c=l(34169),o=l(58578),d=l(36919);function u(e){let{onClose:s}=e,{t:l}=(0,r.Bd)(),{selectedIds:u,clearSelected:x,selectionCount:m}=(0,i.A)(),h=(0,c.Cy)(),p=async()=>{let e=o.Ay.loading(l("deleting")),t=Object.keys(u).map(Number);await h.mutateAsync(t,{onSettled:(t,i)=>{o.Ay.dismiss(e),i?o.Ay.error(i.message):(x(),s(),o.Ay.success(l("deleted")))}})};return(0,t.jsxs)(a.A,{toggleModal:s,children:[(0,t.jsx)("p",{className:"text-xl font-thin text-red-500",children:1===m?l("delete_link"):l("delete_links",{count:m})}),(0,t.jsx)(d.w,{className:"my-3"}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{children:1===m?l("link_deletion_confirmation_message"):l("links_deletion_confirmation_message",{count:m})}),(0,t.jsxs)("div",{role:"alert",className:"alert alert-warning",children:[(0,t.jsx)("i",{className:"bi-exclamation-triangle text-xl"}),(0,t.jsx)("span",{children:l("warning_irreversible")})]}),(0,t.jsx)("p",{children:l("shift_key_tip")}),(0,t.jsxs)(n.$,{className:"ml-auto",variant:"destructive",onClick:p,children:[(0,t.jsx)("i",{className:"bi-trash text-xl"}),l("delete")]})]})]})}}}]);

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.