PageSourceSearch

https://shelfy.so/_next/static/chunks/75945-3f612dc45721ab34.js

js shelfy.so collected 2026-10-09 22:42:25 UTC 26,923 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[45532,75945],{22629:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(95155);r(12115);var o=r(64269),s=r(20781);function i(e){let{name:t,description:r,logoText:i,logoClassName:n,logoImage:l,logoElement:d,actionLabel:c="Coming Soon",onAction:p,className:g}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("flex w-full items-center justify-between gap-4 rounded-xl bg-gray-100 p-4 dark:bg-gray-600/70 sm:w-[calc(50%-0.5rem)]",g),children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[d?(0,a.jsx)("div",{"aria-hidden":"true",children:d}):l?(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center","aria-hidden":"true",children:(0,a.jsx)("img",{src:l,alt:"".concat(t," logo"),className:"h-10 w-10 rounded-lg"})}):(0,a.jsx)("div",{className:(0,o.cn)("flex h-10 w-10 items-center justify-center rounded-lg text-sm font-semibold",n),"aria-hidden":"true",children:i}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-300",children:r})]})]}),(0,a.jsx)(s.$,{type:"button",variant:"black",size:"md",onClick:p,className:"whitespace-nowrap",children:c})]})}},23215:(e,t,r)=>{r.d(t,{FH:()=>s,ql:()=>i});var a=r(61321),o=r(49973);let s=(0,a.xP)({reducerPath:"importsApi",baseQuery:o.W,tagTypes:["Imports"],endpoints:e=>({getImports:e.query({query:()=>({url:"imports"}),providesTags:["Imports"]}),confirmImport:e.mutation({query:e=>({url:"imports",method:"POST",body:e}),invalidatesTags:["Imports"]})})}),{useGetImportsQuery:i,useConfirmImportMutation:n}=s},28437:(e,t,r)=>{r.d(t,{A:()=>h});var a=r(95155),o=r(12115),s=r(20781),i=r(71810),n=r(51834),l=r(80187),d=r.n(l),c=r(77317),p=r(23215),g=r(2225);function m(e){let{provider:t,open:r,onClose:i}=e,[l,m]=(0,o.useState)(null),[h,u]=(0,o.useState)(!1),[x,f]=(0,o.useState)(null),y=(0,o.useRef)(null),{upload:k,progress:b,stage:v,error:j,reset:w}=function(){let[e,t]=(0,o.useState)("idle"),[r,a]=(0,o.useState)(0),[s,i]=(0,o.useState)(null),n=(0,c.wA)(),l=(0,c.d4)(e=>e.auth.currentAccountType||"personal"),g=(0,o.useCallback)(()=>{t("idle"),a(0),i(null)},[]);return{upload:(0,o.useCallback)(async(e,r)=>{i(null),a(0);try{var o,s;t("computing");let i=await new Promise((t,r)=>{let a=new(d()).ArrayBuffer,o=new FileReader,s=0,i=()=>{o.readAsArrayBuffer(e.slice(s,s+2097152))};o.onload=r=>{a.append(r.target.result),(s+=2097152)<e.size?i():t(btoa(a.end(!0)))},o.onerror=()=>r(Error("Failed to read file")),i()}),c=await fetch("/api/imports/presign",{method:"POST",headers:{"Content-Type":"application/json",Account:l},credentials:"include",body:JSON.stringify({source:r,filename:e.name,content_type:e.type||"application/octet-stream",byte_size:e.size,checksum:i})});if(!c.ok){let e=await c.json().catch(()=>({}));throw Error((null==e||null==(o=e.errors)?void 0:o[0])||(null==e?void 0:e.message)||(null==e?void 0:e.error)||"Failed to authorize upload")}let{signed_id:g,direct_upload_url:m,headers:h}=await c.json();t("uploading"),await new Promise((t,r)=>{let o=new XMLHttpRequest;o.timeout=18e5,o.upload.onprogress=e=>{e.lengthComputable&&a(Math.round(e.loaded/e.total*100))},o.onload=()=>{o.status>=200&&o.status<300?t():r(Error("Upload to storage failed (".concat(o.status,"). Please try again.")))},o.onerror=()=>r(Error("Upload failed. Check your connection and try again.")),o.ontimeout=()=>r(Error("Upload timed out. Please try again.")),o.onabort=()=>r(Error("Upload was cancelled.")),o.onreadystatechange=()=>{4===o.readyState&&0===o.status&&r(Error("Upload failed — could not reach storage. This may be a CORS or network issue."))},o.open("PUT",m),Object.entries(h).forEach(e=>{let[t,r]=e;return o.setRequestHeader(t,r)}),o.send(e)}),t("confirming");let u=await fetch("/api/imports",{method:"POST",headers:{"Content-Type":"application/json",Account:l},credentials:"include",body:JSON.stringify({source:r,signed_id:g})});if(!u.ok){let e=await u.json().catch(()=>({}));throw Error((null==e||null==(s=e.errors)?void 0:s[0])||(null==e?void 0:e.message)||(null==e?void 0:e.error)||"Failed to create import")}return n(p.FH.util.invalidateTags(["Imports"])),t("done"),!0}catch(e){return i((null==e?void 0:e.message)||"Something went wrong. Please try again."),t("error"),!1}},[l,n]),progress:r,stage:e,error:s,reset:g}}(),{canUpload:N,remainingMB:S}=(0,g.r)(),C="idle"!==v&&"done"!==v&&"error"!==v,M=j||x;(0,o.useEffect)(()=>
1{if(!C)return;let e=e=>{e.preventDefault()};window.history.pushState(null,"",window.location.href);let t=()=>{window.confirm("Upload is in progress. Are you sure you want to leave?")?window.history.back():window.history.pushState(null,"",window.location.href)};return window.addEventListener("beforeunload",e),window.addEventListener("popstate",t),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("popstate",t)}},[C]);let F=()=>{C||(m(null),u(!1),f(null),w(),i())},I=e=>{if(f(null),!N(e.size)){let t=(e.size/1048576).toFixed(1);f("This file (".concat(t," MB) exceeds your available storage (").concat(S.toFixed(0)," MB remaining). Please upgrade your plan to import larger files."));return}m(e)},T=(0,o.useCallback)(e=>{var t;e.preventDefault(),u(!1);let r=null==(t=e.dataTransfer.files)?void 0:t[0];r&&I(r)},[]),E=async()=>{l&&await k(l,t.id)};return(0,a.jsx)(n.lG,{open:r,onOpenChange:e=>!e&&F(),children:(0,a.jsxs)(n.Cf,{className:"max-w-lg p-0 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-6 pt-5 pb-4 border-b border-gray-100 dark:border-gray-600",children:[(0,a.jsx)(n.c7,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("img",{src:t.logo,alt:"".concat(t.name," logo"),className:"h-7 w-7 rounded-md object-cover flex-shrink-0"}),(0,a.jsxs)(n.L3,{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:["Import from ",t.name]})]})}),(0,a.jsx)(n.HM,{onClick:F,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 cursor-pointer transition-colors ml-4","aria-label":"Close",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),(0,a.jsxs)("div",{className:"px-6 py-5 space-y-5 max-h-[70vh] overflow-y-auto",children:[t.steps&&t.steps.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mb-3",children:["How to export from ",t.name]}),(0,a.jsx)("ol",{className:"space-y-3",children:t.steps.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-3",children:[(0,a.jsx)("span",{className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full bg-gray-100 dark:bg-gray-600 text-xs font-semibold text-gray-600 dark:text-gray-300 mt-0.5",children:t+1}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 dark:text-gray-100",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:e.description}),e.screenshot&&(0,a.jsx)("div",{className:"mt-2 flex justify-center",children:(0,a.jsx)("img",{src:e.screenshot,alt:"Step ".concat(t+1," screenshot"),className:"rounded-lg border border-gray-200 dark:border-gray-600 h-28 w-auto object-contain"})})]})]},t))})]}),M&&(0,a.jsxs)("div",{className:"flex items-start gap-2.5 rounded-lg border border-red-200 bg-red-50 dark:border-red-500/30 dark:bg-red-900/20 px-4 py-3",children:[(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"text-red-500 dark:text-red-400 flex-shrink-0 mt-0.5",children:(0,a.jsx)("path",{d:"M8 5v3M8 10.5h.01M2 8a6 6 0 1 0 12 0A6 6 0 0 0 2 8z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("p",{className:"text-sm text-red-700 dark:text-red-400 leading-snug",children:M})]}),("uploading"===v||"computing"===v||"confirming"===v)&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 dark:text-gray-400",children:[(0,a.jsx)("span",{children:"computing"===v?"Preparing…":"confirming"===v?"Finalizing…":"Uploading…"}),"uploading"===v&&(0,a.jsxs)("span",{children:[b,"%"]})]}),(0,a.jsx)("div",{className:"h-2.5 w-full rounded-full bg-gray-200 dark:bg-gray-600 overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-150",style:{width:"uploading"===v?"".concat(b,"%"):"100%",backgroundColor:"var(--color-accent-primary)"}})})]}),"done"===v&&(0,a.jsxs)("div",{className:"flex items-start gap-2.5 rounded-lg border border-yellow-300 bg-yellow-50 dark:border-yellow-500/30 dark:bg-yellow-900/20 px-4 py-3",children:[(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"text-yellow-500 dark:text-yellow-400 flex-shrink-0 mt-0.5",children:(0,a.jsx)("path",{d:"M8 5v3M8 10.5h.01M2 8a6 6 0 1 0 12 0A6 6 0 0 0 2 8z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-400 leading-snug",children:"Upload complete! Your import is now being processed. You'll receive an email once it's done."})]}),!C&&"done"!==v&&(0,a.jsxs)("div",{onDragOver:e=>{e.preventDefault(),u(!0)},onDragLeave:e=>{e.preventDefault(),u(!1)},onDrop:T,onClick:()=>{var e;return null==(e=y.current)?void 0:e.click()},className:"relative flex flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed transition-colors py-8 px-4 text-center select-none cursor-pointer\n              ".concat(h?"border-blue-400 bg-blue-50 dark:border-blue-500 dark:bg-blue-900/20":l?"border-green-400 bg-green-50 dark:border-green-500 dark:bg-green-900/20":"border-gray-300 dark:border-gray-500 hover:border-gray-400 dark:hover:border-gray-400 bg-gray-50 dark:bg-gray-600/40"),children:[l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",className:"text-green-500",children:(0,a.jsx)("path",{d:"M9 12l2 2 4-4M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("p",{className:"text-sm font-medium text-green-700 dark:text-green-400",children:l.name}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Click to change file"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",className:"text-gray-400",children:(0,a.jsx)("path",{d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1M12 12V4m0 0L8 8m4-4l4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsxs)("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-200",children:["Drop your file here, or"," ",(0,a.jsx)("span",{className:"text-blue-500 hover:underline",children:"browse"})]}),(0,a.jsx)("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:t.fileAccept?"Accepts ".concat(t.fileAccept.split(",").join(", ")," files"):"Select a file"})]}),(0,a.jsx)("input",{ref:y,type:"file",accept:t.fileAccept,className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&I(r),e.target.value=""}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 px-6 py-4 border-t border-gray-100 dark:border-gray-600",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-400 dark:text-gray-500 flex items-center gap-1.5",children:[(0,a.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:[(0,a.jsx)("path",{d:"M2 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4z",stroke:"currentColor",strokeWidth:"1.3"}),(0,a.jsx)("path",{d:"M2 4l6 5 6-5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),"You'll be notified by email when the import is complete."]}),"done"===v?(0,a.jsx)(s.$,{variant:"black",size:"md",onClick:F,children:"Close"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.$,{variant:"dark",size:"md",onClick:F,disabled:C,children:"Cancel"}),(0,a.jsx)(s.$,{variant:"black",size:"md",onClick:E,disabled:!l||C,children:"done"===v?"Done":C?"Importing…":"Import"})]})]})]})})}function h(e){var t;let{provider:r}=e,[n,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-4 roun
1ded-xl bg-gray-100 p-4 dark:bg-gray-600/70 sm:w-[calc(50%-0.5rem)]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center flex-shrink-0","aria-hidden":"true",children:(0,a.jsx)("img",{src:r.logo,alt:"".concat(r.name," logo"),className:"h-10 w-10 rounded-lg object-cover ".concat(null!=(t=r.logoClass)?t:"")})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:["Import from ",r.name]}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-300 mt-0.5",children:r.description}),(0,a.jsx)("p",{className:"text-xs text-gray-400 dark:text-gray-400 mt-1",children:r.note})]})]}),r.importable?(0,a.jsx)(s.$,{type:"button",variant:"black",size:"md",onClick:()=>l(!0),className:"whitespace-nowrap flex-shrink-0",children:"Import"}):(0,a.jsx)(s.$,{type:"button",variant:"dark",size:"md",onClick:()=>c(!0),className:"whitespace-nowrap flex-shrink-0",children:"Request Feature"})]}),r.importable&&(0,a.jsx)(m,{provider:r,open:n,onClose:()=>l(!1)}),!r.importable&&(0,a.jsx)(i.A,{isOpen:d,onClose:()=>c(!1)})]})}},45532:(e,t,r)=>{r.r(t),r.d(t,{statsApi:()=>s,useCreateFeedbackMutation:()=>l,useGetFeedbacksQuery:()=>n,useGetStatsQuery:()=>i});var a=r(61321),o=r(49973);let s=(0,a.xP)({reducerPath:"statsApi",baseQuery:o.W,tagTypes:["Stats","Feedbacks"],endpoints:e=>({getStats:e.query({query:()=>({url:"/stats"}),providesTags:["Stats"]}),getFeedbacks:e.query({query:()=>({url:"/feedbacks"}),providesTags:["Feedbacks"]}),createFeedback:e.mutation({query:e=>({url:"feedbacks",method:"POST",body:{feedback:{feedback_type:e.feedback_type,title:e.title,description:e.description,metadata:e.metadata||{}}}}),invalidatesTags:["Feedbacks"]})})}),{useGetStatsQuery:i,useGetFeedbacksQuery:n,useCreateFeedbackMutation:l}=s},61143:(e,t,r)=>{r.d(t,{q:()=>a});let a=[{id:"raindrop",name:"Raindrop",logo:"/images/integrations/raindrop/logo.png",description:"Move your existing bookmark collections into Shelfy.",note:"Accepts a CSV export from Raindrop.io.",importable:!0,fileAccept:".csv",steps:[{title:"Open Settings",description:"Log into raindrop.io and click Settings in the left sidebar.",screenshot:"/images/integrations/raindrop/step-1.png"},{title:"Go to Backups",description:"Inside Settings, select the Backups tab.",screenshot:"/images/integrations/raindrop/step-2.png"},{title:"Download the CSV",description:"Find the latest backup entry and click the CSV download button next to it.",screenshot:"/images/integrations/raindrop/step-3.png"},{title:"Upload here",description:"Drop or select the downloaded CSV file above, then click Import."}]},{id:"reader",name:"Reader",logo:"/images/integrations/reader/logo.png",description:"Import your Reader reading list and highlights into Shelfy.",note:"Accepts a ZIP export from Readwise Reader.",importable:!0,fileAccept:".zip",steps:[{title:"Access your Profile page",description:"Log into Reader and navigate to your Profile page to find the export options.",screenshot:"/images/integrations/reader/step-1.png"},{title:"Download the CSV export",description:'Reader\'s export consists of multiple parts. First, download the CSV file — it contains the names, original URLs, and tags of all your resources. The file will be called "export.csv".',screenshot:"/images/integrations/reader/step-2.png"},{title:"Download full files & articles",description:"Next, download the full files and articles export. This ZIP contains the actual file contents and article HTML. Unzip it into the same folder where you already have the export.csv.",screenshot:"/images/integrations/reader/step-3.png"},{title:"Combine everything into one ZIP",description:"Make sure the unzipped folders (full files & articles) are in the same folder as export.csv. Then select all of them and compress into a single ZIP file.",screenshot:"/images/integrations/reader/step-4.png"},{title:"Upload here",description:"Drop or select the combined ZIP file above, then click Import."}]},{id:"chrome",name:"Chrome",logo:"/images/integrations/chrome.png",description:"Import your Chrome bookmarks into Shelfy.",note:"Accepts an HTML bookmarks file exported from Chrome.",importable:!0,fileAccept:".html,.htm",steps:[{title:"Open Bookmark Manager",description:"In Chrome, press Ctrl+Shift+O (⌘+Opt+B on Mac) or go to chrome://bookmarks."},{title:"Export bookmarks",description:'Click the 3-dot menu (⋮) in the top-right corner of the Bookmark Manager and select "Export bookmarks".'},{title:"Save the HTML file",description:"Choose where to save it on your computer, then return here."},{title:"Upload here",description:"Drop or select the saved file above, then click Import."}]},{id:"safari",name:"Safari",logo:"/images/integrations/safari/logo.jpg",description:"Bring your Safari bookmarks into Shelfy.",note:"Accepts an HTML bookmarks file exported from Safari.",importable:!0,fileAccept:".html,.htm",steps:[{title:"Export Browser Data",description:"In Safari, go to File → Export Browser Data…",screenshot:"/images/integrations/safari/step-1.png"},{title:"Select Bookmarks only",description:"In the export dialog, make sure only Bookmarks is checked, then click Export.",screenshot:"/images/integrations/safari/step-2.png"},{title:"Unzip and upload",description:"Safari exports a zip archive. Unzip it, then drop or select the HTML file above and click Import."}]},{id:"firefox",name:"Firefox",logo:"/images/integrations/firefox/logo.png",description:"Move your Firefox bookmarks into Shelfy.",note:"Accepts an HTML bookmarks file exported from Firefox.",importable:!0,fileAccept:".html,.htm",steps:[{title:"Open Bookmarks Manager",description:"Click the Bookmarks menu → Manage Bookmarks (or press Ctrl+Shift+O / ⌘+Shift+O on Mac).",screenshot:"/images/integrations/firefox/step-1.png"},{title:"Export to HTML",description:"Click Import and Backup → Export Bookmarks to HTML… Firefox downloads the file directly.",screenshot:"/images/integrations/firefox/step-2.png"},{title:"Upload here",description:"Drop or select the downloaded HTML file above, then click Import."}]},{id:"edge",name:"Edge",logo:"/images/integrations/edge/logo.png",description:"Import your Edge favorites into Shelfy.",note:"Accepts an HTML favorites file exported from Edge.",importable:!0,fileAccept:".html,.htm",steps:[{title:"Open Favorites",description:"Click the Favorites icon (★) in the toolbar, then click the ⋯ menu → Manage favorites.",screenshot:"/images/integrations/edge/step-1.png"},{title:"Export favorites",description:"Click the ⋯ menu at the top of the Manage favorites page and choose Export favorites. Edge downloads the HTML file directly.",screenshot:"/images/integrations/edge/step-2.png"},{title:"Upload here",description:"Drop or select the downloaded HTML file above, then click Import."}]},{id:"mymind",name:"MyMind",logo:"/images/integrations/mymind/logo.png",description:"Bring your saved inspiration and notes over seamlessly.",note:"Accepts a ZIP of your mymind export folder.",importable:!0,fileAccept:".zip",steps:[{title:"Open Settings",description:"Click the settings (cog) icon at the bottom of the mymind sidebar.",screenshot:"/images/integrations/mymind/step-1.png"},{title:"Export mymind",description:'Scroll to the bottom of the Settings page and click "Export mymind".',screenshot:"/images/integrations/mymind/step-2.png"},{title:"Zip the exported folder",description:"Once the export is downloaded, select all the contents of the folder and compress them into a single ZIP file."},{title:"Upload here",description:"Drop or select the ZIP file above, then click Import."}]},{id:"notion",name:"Notion",logo:"/images/integrations/notion.svg",description:"Import your Notion pages and databases into Shelfy.",note:"Request this import and we'll set it up for you.",importable:!1},{id:"evernote",name:"Evernote",logo:"/images/integrations/evernote.webp",description:"Move your Evernote notes and notebooks into Shelfy.",note:"Request this import and we'll set it up for you.",importable:!1},{id:"pocket",name:"Pocket",logo:"/images/integrations/pocket.svg",description:"Import your Pocket reading list into Shelfy.",note:"Request this import and we'll set it up for you.",importable:!1}]},71227:(e,t,r)=>{r.d(t,{T:()=>a});let a=[{id:"notion",name:"Notion",description:"Sync your notes and databases so Shelfy can organize them.",logoImage:"/images/integrations/notion.svg"},{id:"google-drive",name:"Google Drive",description:"Connect your files and keep research documents in Shelfy.",logoImage:"/images/integrations/google-drive.svg"}
1,{id:"slack",name:"Slack",description:"Save shared links automatically from your team channels.",logoImage:"/images/integrations/slack.svg"},{id:"gmail",name:"Gmail",description:"Save important emails and attachments directly into Shelfy.",logoImage:"/images/integrations/gmail.svg"},{id:"google-calendar",name:"Google Calendar",description:"Link meetings and notes so Shelfy keeps context organized.",logoImage:"/images/integrations/google-calendar.svg"}]},71810:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(95155),o=r(12115),s=r(51834),i=r(20781),n=r(79933),l=r(45532);function d(e){let{isOpen:t,onClose:r}=e,[d,c]=(0,o.useState)("feedback"),[p,g]=(0,o.useState)(""),[m,h]=(0,o.useState)(""),{toast:u}=(0,n.dj)(),[x,{isLoading:f}]=(0,l.useCreateFeedbackMutation)(),y=()=>{r(),setTimeout(()=>{c("feedback"),g(""),h("")},200)},k=async e=>{if(e.preventDefault(),m.trim().length<10)return void u({variant:"destructive",title:"Error",description:"Description must be at least 10 characters long"});if(m.trim().length>5e3)return void u({variant:"destructive",title:"Error",description:"Description must not exceed 5000 characters"});if(p.trim().length>200)return void u({variant:"destructive",title:"Error",description:"Title must not exceed 200 characters"});try{await x({feedback_type:d,title:p.trim()||void 0,description:m.trim()}).unwrap(),u({title:"Feedback submitted",description:"Thank you for your feedback! We'll review it shortly."}),y()}catch(e){var t;console.error("❌ [Feedback Modal] Failed to submit feedback:",e),console.error("❌ [Feedback Modal] Error status:",null==e?void 0:e.status),console.error("❌ [Feedback Modal] Error data:",null==e?void 0:e.data),console.error("❌ [Feedback Modal] Full error object:",JSON.stringify(e,null,2)),u({variant:"destructive",title:"Error",description:(null==e||null==(t=e.data)?void 0:t.message)||(null==e?void 0:e.message)||"Failed to submit feedback. Please try again."})}};return(0,a.jsx)(s.lG,{open:t,onOpenChange:e=>!e&&y(),children:(0,a.jsxs)(s.Cf,{className:"sm:max-w-[500px] p-6 rounded-2xl",onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,a.jsxs)(s.c7,{children:[(0,a.jsx)(s.L3,{className:"text-gray-900 dark:text-gray-100",children:"Feedback / Feature Request"}),(0,a.jsx)(s.rr,{className:"text-gray-600 dark:text-gray-400",children:"We'd love to hear from you! Share your thoughts, ideas, or report bugs."})]}),(0,a.jsxs)("form",{onSubmit:k,className:"space-y-4 py-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-3 block",children:"Type"}),(0,a.jsx)("div",{className:"space-y-2",children:["feedback","feature_request","bug"].map(e=>(0,a.jsxs)("label",{className:"flex items-center cursor-pointer group",children:[(0,a.jsx)("input",{type:"radio",name:"feedbackType",value:e,checked:d===e,onChange:e=>c(e.target.value),className:"w-4 h-4 text-blue-600 border-gray-300 focus:ring-blue-500 cursor-pointer"}),(0,a.jsx)("span",{className:"ml-3 text-sm text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100",children:(e=>{switch(e){case"feedback":return"General Feedback";case"feature_request":return"Feature Request";case"bug":return"Bug Report";default:return""}})(e)})]},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"feedback-title",className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block",children:["Title ",(0,a.jsx)("span",{className:"text-gray-500 dark:text-gray-400 font-normal",children:"(Optional)"})]}),(0,a.jsx)("input",{id:"feedback-title",type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Brief summary...",maxLength:200,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-600 text-gray-900 dark:text-gray-100 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors hover:border-gray-400 dark:hover:border-gray-500"}),p.length>0&&(0,a.jsxs)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[p.length," / 200 characters"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"feedback-description",className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block",children:["Description ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{id:"feedback-description",value:m,onChange:e=>h(e.target.value),placeholder:"Please share your thoughts, ideas, or describe the issue in detail...",rows:6,required:!0,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-600 text-gray-900 dark:text-gray-100 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors hover:border-gray-400 dark:hover:border-gray-500 resize-none"}),(0,a.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Minimum 10 characters"}),(0,a.jsxs)("p",{className:"text-xs ".concat(m.length>5e3?"text-red-500":"text-gray-500 dark:text-gray-400"),children:[m.length," / 5000 characters"]})]})]})]}),(0,a.jsxs)(s.Es,{className:"flex gap-2 justify-end",children:[(0,a.jsx)(i.$,{variant:"outline",onClick:y,disabled:f,className:"cursor-pointer rounded-lg transition-all hover:bg-gray-100 dark:hover:bg-gray-600",children:"Cancel"}),(0,a.jsx)(i.$,{onClick:k,disabled:f||m.trim().length<10||m.length>5e3,className:"cursor-pointer rounded-lg transition-all disabled:cursor-not-allowed",children:f?"
1Submitting...":"Submit Feedback"})]})]})})}}}]);

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.