1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0e804-81f0-7181-983f-42a0b9c566d2")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3934],{2631:(e,r,t)=>{t.d(r,{z:()=>s});var a=t(16574);function s(){return(0,a.useSyncExternalStore)(n,()=>!0,()=>!1)}function n(){return()=>{}}},10133:(e,r,t)=>{t.d(r,{H:()=>s});var a=t(85109);function s(){let e=(0,a.k)(e=>e.customer);return e?.entitlement?.tier==="starter"}},15217:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},16574:(e,r,t)=>{e.exports=t(92597)},23825:(e,r,t)=>{t.r(r),t.d(r,{Avatar:()=>l,AvatarFallback:()=>d,AvatarImage:()=>i});var a=t(54568),s=t(49866),n=t(64318);function l({className:e,...r}){return(0,a.jsx)(s.Root,{"data-slot":"avatar",className:(0,n.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...r})}function i({className:e,...r}){return(0,a.jsx)(s.Image,{"data-slot":"avatar-image",className:(0,n.cn)("aspect-square size-full",e),...r})}function d({className:e,...r}){return(0,a.jsx)(s.Fallback,{"data-slot":"avatar-fallback",className:(0,n.cn)("bg-muted flex size-full items-center justify-center rounded-full",e),...r})}},26083:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},33934:(e,r,t)=>{t.r(r),t.d(r,{AccountMenu:()=>k});var a=t(54568),s=t(35198),n=t(26083),l=t(55663),i=t(58299),d=t(37270),o=t(94411),c=t(15217),u=t(77542),m=t(70452),p=t(63058),f=t(76710),x=t(65587),h=t.n(x),g=t(23825),v=t(73266),y=t(59589),j=t(11922),b=t(64318),A=t(85109);function k(){let e,{data:r}=(0,j.wV)(),t=(0,A.k)(e=>e.user),x=(0,A.k)(e=>e.isRefreshing),k=(0,y.h7)(),N=(0,y.Rs)(),w=r?.user?.avatarUrls||t?.avatarUrls,S=N.isSubscribed&&N.activePlan?{planName:N.activePlan,status:N.status}:null;return t?(0,a.jsx)("div",{suppressHydrationWarning:!0,children:(0,a.jsxs)(v.rI,{children:[(0,a.jsx)(v.ty,{asChild:!0,children:(0,a.jsxs)(g.Avatar,{className:"size-9 rounded-lg",children:[(0,a.jsx)(g.AvatarImage,{src:w?.small||"/icon-32x32.png",alt:t.username||"User"}),(0,a.jsx)(g.AvatarFallback,{className:"rounded-lg bg-primary text-primary-foreground font-semibold text-sm",children:(0,b.IM)(t.email)})]})}),(0,a.jsxs)(v.SQ,{className:"min-w-56 space-y-1 rounded-lg",side:"bottom",align:"end",sideOffset:4,children:[(0,a.jsx)(v._2,{className:"cursor-default focus:bg-transparent hover:bg-transparent",children:(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 px-1 py-1.5",children:[(0,a.jsxs)(g.Avatar,{className:"size-9 rounded-lg",children:[(0,a.jsx)(g.AvatarImage,{src:w?.small||"/icon-32x32.png",alt:t.username||"User"}),(0,a.jsx)(g.AvatarFallback,{className:"rounded-lg bg-primary text-primary-foreground font-semibold text-sm",children:(0,b.IM)(t.email)})]}),(0,a.jsxs)("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[(0,a.jsx)("span",{className:"truncate font-semibold",children:t.email}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"truncate text-xs",children:t.username||"User"}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[k&&(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-xs font-medium bg-red-100 text-red-800 border border-red-200 rounded-md",children:"Admin"}),S&&(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-xs font-medium rounded-md ${(e=S.planName.toLowerCase()).includes("pro")?"bg-amber-100 text-amber-800 border border-amber-200":e.includes("starter")?"bg-blue-100 text-blue-800 border border-blue-200":"bg-gray-100 text-gray-800 border border-gray-200"}`,children:S.planName}),N.isSupporter&&(0,a.jsx)("span",{className:"rounded-md border border-border bg-muted px-1.5 py-0.5 text-xs font-medium text-foreground",children:"Supporter"})]})]})]})]})}),(0,a.jsx)(v.mB,{}),(0,a.jsxs)(v.I,{children:[k&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)("a",{href:"/admin",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between cursor-pointer w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(s.A,{}),"Admin Panel"]}),(0,a.jsx)(n.A,{className:"size-4"})]})}),(0,a.jsx)(v.mB,{})]}),(0,a.jsxs)(v._2,{className:"cursor-default focus:bg-transparent",children:[(0,a.jsx)(l.A,{}),(0,a.jsxs)("span",{className:"flex items-center justify-between w-full",children:["My Credits",(0,a.jsx)("span",{className:"ml-auto font-semibold text-primary flex items-center gap-1",children:x?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{className:"size-3 animate-spin"}),t.credits||0]}):t.credits||0})]})]}),(0,a.jsx)(v.mB,{}),(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)(h(),{href:"/account",className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)(d.A,{}),"Account"]})}),(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)(h(),{href:"/account/plans",className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)(o.A,{}),"Plans"]})}),k&&(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)(h(),{href:"/account/orders",className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)(c.A,{}),"Orders"]})}),(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)(h(),{href:"/account/notifications",className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)(u.A,{}),"Notifications"]})}),(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)(h(),{href:"/account/profile",className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)(m.A,{}),"Profile"]})}),(0,a.jsx)(v._2,{asChild:!0,children:(0,a.jsxs)(h(),{href:"/upload",className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)(p.A,{}),"Publish existing prompt"]})})]}),(0,a.jsx)(v.mB,{}),(0,a.jsxs)(v._2,{onClick:async()=>{await (0,j.CI)(),window.location.href="/"},className:"cursor-pointer",children:[(0,a.jsx)(f.A,{}),"Log out"]})]})]})}):null}},35198:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
1y:"oel41y"}]])},37270:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},49866:(e,r,t)=>{t.r(r),t.d(r,{Avatar:()=>v,AvatarFallback:()=>A,AvatarImage:()=>j,Fallback:()=>S,Image:()=>w,Root:()=>N,createAvatarScope:()=>x});var a=t(7620),s=t(55556),n=t(55222),l=t(58009);t(97509);var i=t(33670),d=t(54568),o=Symbol("radix.slottable");function c(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}var u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var t,s;let n,l,o,u=(s=t=`Primitive.${r}`,(n=a.forwardRef((e,r)=>{let{children:t,...s}=e;if(a.isValidElement(t)){var n;let e,l,d=(n=t,(l=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.ref:(l=(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.props.ref:n.props.ref||n.ref),o=function(e,r){let t={...r};for(let a in r){let s=e[a],n=r[a];/^on[A-Z]/.test(a)?s&&n?t[a]=(...e)=>{let r=n(...e);return s(...e),r}:s&&(t[a]=s):"style"===a?t[a]={...s,...n}:"className"===a&&(t[a]=[s,n].filter(Boolean).join(" "))}return{...e,...t}}(s,t.props);return t.type!==a.Fragment&&(o.ref=r?(0,i.t)(r,d):d),a.cloneElement(t,o)}return a.Children.count(t)>1?a.Children.only(null):null})).displayName=`${s}.SlotClone`,l=n,(o=a.forwardRef((e,r)=>{let{children:t,...s}=e,n=a.Children.toArray(t),i=n.find(c);if(i){let e=i.props.children,t=n.map(r=>r!==i?r:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,d.jsx)(l,{...s,ref:r,children:a.isValidElement(e)?a.cloneElement(e,void 0,t):null})}return(0,d.jsx)(l,{...s,ref:r,children:t})})).displayName=`${t}.Slot`,o),m=a.forwardRef((e,t)=>{let{asChild:a,...s}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,d.jsx)(a?u:r,{...s,ref:t})});return m.displayName=`Primitive.${r}`,{...e,[r]:m}},{}),m=t(2631),p="Avatar",[f,x]=(0,s.A)(p),[h,g]=f(p),v=a.forwardRef((e,r)=>{let{__scopeAvatar:t,...s}=e,[n,l]=a.useState("idle");return(0,d.jsx)(h,{scope:t,imageLoadingStatus:n,onImageLoadingStatusChange:l,children:(0,d.jsx)(u.span,{...s,ref:r})})});v.displayName=p;var y="AvatarImage",j=a.forwardRef((e,r)=>{let{__scopeAvatar:t,src:s,onLoadingStatusChange:i=()=>{},...o}=e,c=g(y,t),p=function(e,{referrerPolicy:r,crossOrigin:t}){let s=(0,m.z)(),n=a.useRef(null),i=s?(n.current||(n.current=new window.Image),n.current):null,[d,o]=a.useState(()=>k(i,e));return(0,l.N)(()=>{o(k(i,e))},[i,e]),(0,l.N)(()=>{let e=e=>()=>{o(e)};if(!i)return;let a=e("loaded"),s=e("error");return i.addEventListener("load",a),i.addEventListener("error",s),r&&(i.referrerPolicy=r),"string"==typeof t&&(i.crossOrigin=t),()=>{i.removeEventListener("load",a),i.removeEventListener("error",s)}},[i,t,r]),d}(s,o),f=(0,n.c)(e=>{i(e),c.onImageLoadingStatusChange(e)});return(0,l.N)(()=>{"idle"!==p&&f(p)},[p,f]),"loaded"===p?(0,d.jsx)(u.img,{...o,ref:r,src:s}):null});j.displayName=y;var b="AvatarFallback",A=a.forwardRef((e,r)=>{let{__scopeAvatar:t,delayMs:s,...n}=e,l=g(b,t),[i,o]=a.useState(void 0===s);return a.useEffect(()=>{if(void 0!==s){let e=window.setTimeout(()=>o(!0),s);return()=>window.clearTimeout(e)}},[s]),i&&"loaded"!==l.imageLoadingStatus?(0,d.jsx)(u.span,{...n,ref:r}):null});function k(e,r){return e?r?(e.src!==r&&(e.src=r),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}A.displayName=b;var N=v,w=j,S=A},59589:(e,r,t)=>{t.d(r,{h7:()=>s,zI:()=>n.z,HE:()=>l.H,Rs:()=>d});var a=t(85109);function s(){let e=(0,a.k)(e=>e.user);return e?.admin??!1}var n=t(71169),l=t(10133);let i={starter:"Starter","starter-yearly":"Starter Yearly",pro:"PRO","pro-yearly":"PRO Yearly","early-supporter":"Early Supp
1orter",supporter:"Supporter"};function d(){var e,r;let t,s,n,l,d=(0,a.k)(e=>e.user),o=(0,a.k)(e=>e.isRefreshing),c=(0,a.k)(e=>e.hasResolvedUserData),u=(e=(0,a.k)(e=>e.customer),t=["supporter","starter","pro"].includes(e?.entitlement?.tier??"")?e?.entitlement?.tier:"free",n=(s=e?.entitlement?.subscriptionId??null)?e?.subscriptions?.find(e=>e.id===s)??null:null,l=(r=e?.entitlement?.planSlug)&&r in i?{name:i[r],slug:r}:null,{tier:t,isPro:"pro"===t,isStarter:"starter"===t,isSupporter:e?.entitlement?.hasSupporterMembership===!0,isSubscribed:"starter"===t||"pro"===t,activePlan:l?.name??null,activePlanSlug:l?.slug??null,activeProcessorPlan:n?.processorPlan??null,status:n?.status??null,currentPeriodEnd:e?.entitlement?.entitledUntil??null,endsAt:e?.entitlement?.endsAt??null,canResume:e?.entitlement?.canResume===!0});return{hasAuthenticatedUser:!!d?.id,hasResolvedUserData:c,isLoading:o,...u}}},63058:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},70452:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},71169:(e,r,t)=>{t.d(r,{z:()=>s});var a=t(85109);function s(){let e=(0,a.k)(e=>
1e.user),r=(0,a.k)(e=>e.customer);return!!e?.admin||r?.entitlement?.tier==="pro"}},76710:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]])},77542:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},92597:(e,r,t)=>{var a=t(7620),s="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},n=a.useState,l=a.useEffect,i=a.useLayoutEffect,d=a.useDebugValue;function o(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!s(e,t)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),a=n({inst:{value:t,getSnapshot:r}}),s=a[0].inst,c=a[1];return i(function(){s.value=t,s.getSnapshot=r,o(s)&&c({inst:s})},[e,t,r]),l(function(){return o(s)&&c({inst:s}),e(function(){o(s)&&c({inst:s})})},[e]),d(t),t};r.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:c},94411:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(81007).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])}}]); 2//# chunkId=01a0e804-81f0-7181-983f-42a0b9c566d2
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.