1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9763],{9282:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var r=s(37876),a=s(14232),l=s(89099),i=s(14747),d=s(90657),n=s(24168),c=s(48260),o=s(8220),u=s(47849),h=s(20227);let x=()=>{var e;let t=(0,l.useRouter)(),{filter:s}=t.query,{prefetchLibraryVaults:x}=(0,h.z)(),m=[{id:"my-library",label:"Your Library"},{id:"purchased",label:"Purchased"}],[b,g]=(0,a.useState)(null==(e=m[0])?void 0:e.id);return(0,a.useEffect)(()=>{x(),"purchased"===s?g("purchased"):g("my-library")},[s,x]),(0,r.jsx)(c.A,{children:(0,r.jsxs)("div",{className:"space-y-10",children:[(0,r.jsx)(o.A,{title:"My Library",showMyLibrary:!1,showCreate:!0}),(0,r.jsxs)("div",{className:" md:flex space-y-6 md:space-y-0 justify-between items-center",children:[(0,r.jsx)(i.A,{tabs:m,active:b,set:e=>{g(e)},onTabClick:e=>{t.push({pathname:t.pathname,query:{filter:e.id}})}}),(0,r.jsxs)("div",{className:"flex items-center rounded-lg md:w-[450px] bg-white dark:bg-[#000000] border border-[#0000001C] gap-1 dark:text-white dark:border-[rgba(255,255,255,0.13)] p-3",children:[(0,r.jsx)(u.A,{}),(0,r.jsx)("input",{className:"outline-none text-sm cursor-pointer bg-white dark:bg-[#000000] px-[10px] font-[450] rounded-[6px]"})]})]}),(0,r.jsxs)("div",{className:"tab-content",children:["my-library"===b&&(0,r.jsx)(d.default,{}),"purchased"===b&&(0,r.jsx)(n.default,{})]})]})})}},14747:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var r=s(37876);s(14232);var a=s(93704);let l=e=>{let{tabs:t,onTabClick:s,set:l,active:i,className:d}=e;function n(e){s&&s(e),l(e.id)}return t&&0!==t.length?(0,r.jsxs)("div",{className:(0,a.cn)("w-full",d),children:[(0,r.jsx)("div",{className:"md:hidden",children:(0,r.jsx)("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide pb-2",children:t.map(e=>(0,r.jsx)("button",{onClick:()=>n(e),className:(0,a.cn)("px-4 py-2 border rounded-lg text-sm whitespace-nowrap flex-shrink-0 transition-all",i===e.id?"bg-black text-white border-black":"text-gray-700 bg-white border-gray-300 hover:bg-gray-50"),children:e.label},e.id))})}),(0,r.jsx)("div",{className:"hidden md:flex gap-2",children:t.map(e=>(0,r.jsx)("button",{onClick:()=>n(e),className:(0,a.cn)("px-4 py-2 border cursor-pointer rounded-lg text-sm transition-all",i===e.id?"bg-black text-white border-black":"text-gray-700 bg-white border-gray-300 hover:bg-gray-50"),children:e.label},e.id))})]}):null}},14966:(e,t,s)=>{"use strict";s.d(t,{jH:()=>l});var r=s(14232);s(37876);var a=r.createContext(void 0);function l(e){let t=r.useContext(a);return e||t||"ltr"}},24168:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(37876),a=s(14232),l=s(42367),i=s(20227);let d=e=>{let{filter:t="purchased"}=e,{purchasedVaults:s,purchasedLoading:d,purchasedError:n,fetchLibraryVaults:c}=(0,i.z)();return(0,a.useEffect)(()=>{c({filter:"purchased"})},[c]),(0,r.jsx)(l.default,{vaults:s,loading:d,error:n,onVaultClick:e=>{},showHeart:!1,emptyStateAction:(0,r.jsx)("button",{className:"px-4 py-2 bg-black text-white rounded-md transition-colors",children:"Browse Vaults"})})}},29053:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(17963).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},47849:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var r=s(37876);s(14232);var a=s(93704);let l=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:(0,a.cn)("dark:stroke-white stroke-black",t),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M9.16797 16.667C13.3101 16.667 16.668 13.3091 16.668 9.16699C16.668 5.02486 13.3101 1.66699 9.16797 1.66699C5.02583 1.66699 1.66797 5.02486 1.66797 9.16699C1.66797 13.3091 5.02583 16.667 9.16797 16.667Z",stroke:"",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M15.775 17.2404C16.2167 18.5737 17.225 18.707 18 17.5404C18.7084 16.4737 18.2417 15.5987 16.9584 15.5987C16.0084 15.5904 15.475 16.332 15.775 17.2404Z",stroke:"",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},90657:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s(37876);s(14232);var a=s(93964);let l=e=>{let{filter:t}=e;return(0,r.jsx)(a.default,{filter:t})}},91348:(e,t,s)=>{"use strict";function r(e,[t,s]){return Math.min(s,Math.max(t,e))}s.d(t,{q:()=>r})},93964:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var r=s(37876),a=s(17425),l=s(14232),i=s(8190),d=s(20227),n=s(93704),c=s(54587),o=s.n(c),u=s(67716);let h=e=>{let{filter:t}=e,{libraryVaults:s,purchasedVaults:c,libraryLoading:h,purchasedLoading:x,libraryError:m,purchasedError:b,fetchLibraryVaults:g,deleteVault:p}=(0,d.z)(),[y,j]=(0,l.useState)(!1),[v,w]=(0,l.useState)(null),[f,N]=(0,l.useState)(!1);(0,l.useEffect)(()=>{g({filter:t})},[g,t]);let k=async e=>{w(e),j(!0)},C=async()=>
1{if(v)try{N(!0),await p(v.id),j(!1),w(null),g({filter:t})}finally{N(!1)}},E="purchased"===t,A=E?b:m,_=E?c:s;return(E?x:h)?(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:Array.from({length:6}).map((e,t)=>(0,r.jsxs)("div",{className:"animate-pulse",children:[(0,r.jsx)("div",{className:"bg-gray-200 h-[300px] rounded-lg mb-4"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),(0,r.jsx)("div",{className:"h-6 bg-gray-200 rounded w-1/2"})]})]},t))})}):A?(0,r.jsx)(a.A,{title:"Error loading your library",description:A||"Please try again.",action:(0,r.jsx)("button",{onClick:()=>g({filter:t}),className:"px-4 py-2 bg-black text-white rounded-md hover:bg-gray-800 transition-colors",children:"Try Again"})}):_&&0!==_.length?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:_.map(e=>e?(0,r.jsx)(i.A,{image:e.images&&e.images.length>0?e.images[0]:"/images/FrameCard.png",price:"".concat((0,n.$g)(e.price)),title:e.title||"Untitled",showHeart:!1,onCardClick:()=>(e=>{console.log("View vault:",e.title),e.slug?window.location.href="/vault/".concat(e.slug):window.location.href="/vault/".concat(e.id)})(e),buttonA:(0,r.jsx)("button",{onClick:()=>(e=>{console.log("Edit vault:",e.title),e.slug?window.location.href="/vault/edit/".concat(e.slug):window.location.href="/vault/edit/".concat(e.id)})(e),className:"px-3 py-1 bg-black text-white text-xs rounded-md hover:bg-gray-800 transition-colors",children:"Edit"}),buttonB:(0,r.jsx)("button",{onClick:()=>k(e),className:"px-3 py-1 border border-[#E10F08] text-[#E10F08] text-xs rounded-md hover:bg-red-50 transition-colors",children:"Delete"}),vault:e},e.id||Math.random()):null)}),(0,r.jsx)(u._s,{open:y,onOpenChange:e=>{!f&&(j(!!e),e||w(null))},children:(0,r.jsx)(u.zj,{className:"px-4 sm:px-6 py-6 sm:py-8",children:(0,r.jsxs)("div",{className:"w-full max-w-md mx-auto",children:[(0,r.jsxs)(u.BE,{className:"flex items-start justify-between p-0 mb-3",children:[(0,r.jsx)(u.gk,{className:"text-[20px] sm:text-[24px] font-semibold",children:"Delete vault"}),(0,r.jsx)(u.cp,{className:"h-8 w-8 rounded-full top-6 absolute right-4 sm:right-6 border flex items-center justify-center"})]}),v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex gap-3 items-center border border-[#FEE2E2] bg-[#FEF2F2] rounded-lg p-3 mb-4",children:[(0,r.jsx)("div",{className:"relative w-16 h-16 rounded-md overflow-hidden bg-gray-100",children:(0,r.jsx)(o(),{src:v.images&&v.images[0]||"/images/FrameCard.png",alt:v.title||"Vault",fill:!0,sizes:"64px",className:"object-cover"})}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("p",{className:"text-sm font-medium truncate",children:v.title||"Untitled"})})]}),(0,r.jsx)(u.I6,{className:"mb-3 text-[#6B7280] text-sm",children:"Are you sure you want to delete this vault? This action cannot be undone."}),(0,r.jsxs)("ul",{className:"mb-4 text-sm text-[#6B7280] list-disc pl-5 space-y-1",children:[(0,r.jsx)("li",{children:"Removed from your library immediately"}),(0,r.jsx)("li",{children:"Buyers keep access; your copy is deleted"}),(0,r.jsx)("li",{children:"You can republish later as a new item"})]}),(0,r.jsxs)(u.tb,{className:"!p-0 gap-3",children:[(0,r.jsx)("button",{onClick:()=>{f||(j(!1),w(null))},className:"w-full border border-[#D0D5DD] text-[#3E3E3E] text-sm py-3 rounded-lg hover:bg-gray-50 disabled:opacity-60",disabled:f,children:"Cancel"}),(0,r.jsx)("button",{onClick:C,disabled:f,className:"w-full py-3 rounded-lg text-sm ".concat(f?"bg-[#DCDCDC] text-[#717171]":"bg-[#E10F08] text-white hover:bg-red-600"),children:f?"Deletingâ¦":"Yes, delete"})]})]})]})})})]}):(0,r.jsx)(a.A,{title:"Your library is empty",description:"Start publishing vaults to see them here.",action:(0,r.jsx)("button",{onClick:()=>window.location.href="/vault/publish",className:"px-4 py-2 bg-black text-white rounded-md hover:bg-gray-800 transition-colors",children:"Publish Your First Vault"})})}},98397:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/vault/my-library",function(){return s(9282)}])}},e=>{e.O(0,[713,9776,4587,6090,9075,8653,9388,2414,1128,6848,3842,3784,9065,7645,4650,4748,6899,1960,636,6593,8792],()=>e(e.s=98397)),_N_E=e.O()}]);
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.