PageSourceSearch

https://www.illustration.lol/_next/static/chunks/3c2f77621e3eba0b.js?dpl=dpl_GPVGaPmeswDpngCjxdZH7w6bnWnA

js illustration.lol collected 2026-10-04 10:46:13 UTC 104,120 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="f87dc1ac-d556-392f-22c2-5ea576144775")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,783036,e=>{"use strict";var t=e.i(271645);function i(e,t){function i(n){document.removeEventListener("pointerup",i,!0),document.removeEventListener("pointercancel",i,!0);let r=n.target;"pointerup"===n.type&&r instanceof Node&&e.contains(r)||t()}document.addEventListener("pointerup",i,!0),document.addEventListener("pointercancel",i,!0)}function n(e){let n=(0,t.useRef)(!1);return{onPointerDown:t=>{"mouse"===t.pointerType&&0===t.button&&(n.current=!0,i(t.currentTarget,()=>{n.current=!1}),e())},onClick:()=>{if(n.current){n.current=!1;return}e()}}}e.s(["releaseIfClickMisses",()=>i,"usePressActivate",()=>n])},833157,941092,e=>{"use strict";let t;var i=e.i(843476),n=e.i(271645),r=e.i(790959),a=e.i(30747);let s=new Set(["slow-2g","2g","3g"]);function o(e){return Number.isFinite(e)?Math.max(1,Math.round(e)):8}let l=null;function d(e){let t=new Set,i=[];for(let n of e)t.has(n.id)||(t.add(n.id),i.push(n));return i}function c(e,t){let i=+(e.playCount>0),n=+(t.playCount>0);return i!==n?i-n:e.waitSeq-t.waitSeq}function u(e,t,i){if(!e)return 1/0;let n=t??{top:0,height:i};return Math.abs(e.top+e.height/2-(n.top+n.height/2))}function h(e){"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(e)}class p{observer;cap;elementIds=new Map;elementsById=new Map;listeners=new Map;inView=[];admitted=new Set;hover=new Set;reducedMotion=!1;lastNotified=new Map;distances=new Map;playCounts=new Map;waitSeqs=new Map;nextSeq=0;scrollListenerAttached=!1;scrollRafId=null;handleScroll=()=>{if(null===this.scrollRafId){var e;this.scrollRafId=(e=()=>{this.scrollRafId=null,this.refreshDistancesForInView(),this.recomputeAttention()},"function"==typeof requestAnimationFrame?requestAnimationFrame(e):(e(0),-1))}};constructor(e,t){this.cap=t,this.observer=e(e=>{let t=!1;for(let i of e){let e=this.elementIds.get(i.target);if(void 0!==e)if(i.isIntersecting){let n=u(i.boundingClientRect,i.rootBounds,window.innerHeight);this.enter(e,n),t=!0}else this.leave(e)}this.ensureScrollListener(),t?this.recomputeAttention():this.recomputeFill()})}subscribe(e,t,i){return this.elementIds.set(e,t),this.elementsById.set(t,e),this.listeners.set(t,i),this.observer.observe(e),()=>{this.observer.unobserve(e),this.elementIds.delete(e),this.elementsById.delete(t),this.listeners.delete(t),this.lastNotified.delete(t),this.distances.delete(t),this.playCounts.delete(t),this.waitSeqs.delete(t),this.hover.delete(t),this.leave(t),this.ensureScrollListener(),this.recomputeFill()}}setHover(e,t){this.listeners.has(e)&&this.hover.has(e)!==t&&(t?this.hover.add(e):this.hover.delete(e),this.notify(this.computeEffective(this.admitted)))}setReducedMotion(e){this.reducedMotion!==e&&(this.reducedMotion=e,this.recomputeAttention())}loopCompleted(e){if(!this.admitted.has(e))return!1;this.playCounts.set(e,(this.playCounts.get(e)??0)+1);let t=function(e,t,i){if(!i.has(e))return new Set(i);let n=d(t).filter(t=>t.id!==e&&!i.has(t.id)).sort(c),r=new Set(i),a=n[0];return a&&(r.delete(e),r.add(a.id)),r}(e,this.buildEntries(),this.admitted);return t.has(e)||this.waitSeqs.set(e,++this.nextSeq),this.applyAdmitted(t),t.has(e)}buildEntries(){return this.inView.map(e=>({id:e,distance:this.distances.get(e)??1/0,playCount:this.playCounts.get(e)??0,waitSeq:this.waitSeqs.get(e)??0}
2))}enter(e,t){this.inView.includes(e)||(this.inView.push(e),this.distances.set(e,t),this.playCounts.set(e,0),this.waitSeqs.set(e,++this.nextSeq))}leave(e){let t=this.inView.indexOf(e);-1!==t&&this.inView.splice(t,1)}ensureScrollListener(){let e=this.inView.length>0;e&&!this.scrollListenerAttached?(window.addEventListener("scroll",this.handleScroll,{passive:!0}),this.scrollListenerAttached=!0):!e&&this.scrollListenerAttached&&(window.removeEventListener("scroll",this.handleScroll),this.scrollListenerAttached=!1,null!==this.scrollRafId&&(h(this.scrollRafId),this.scrollRafId=null))}refreshDistancesForInView(){let e=window.innerHeight;for(let t of this.inView){let i=this.elementsById.get(t);i&&this.distances.set(t,u(i.getBoundingClientRect(),null,e))}}recomputeAttention(){let e=window.innerHeight,t=function(e,t){if(t.reducedMotion)return new Set;let i=t.cap??4,n=t.hysteresis??160,r=d(e),a=new Map(r.map(e=>[e.id,e])),s=new Set;for(let e of t.prevAdmitted??[]){if(s.size>=i)break;a.has(e)&&s.add(e)}let o=(e,t)=>e.distance-t.distance||e.waitSeq-t.waitSeq;for(let e of r.filter(e=>!s.has(e.id)).sort(o)){if(s.size>=i)break;s.add(e.id)}if(s.size<i)return s;let l=[...s].map(e=>a.get(e)).filter(e=>void 0!==e).filter(e=>e.playCount>=1).sort((e,t)=>t.distance-e.distance||e.waitSeq-t.waitSeq),c=r.filter(e=>!s.has(e.id)).sort(o);for(let e of l){let t=c[0];if(!t)break;if(t.distance<e.distance-n)s.delete(e.id),s.add(t.id),c=c.slice(1);else break}return s}(this.buildEntries(),{reducedMotion:this.reducedMotion,cap:this.cap,prevAdmitted:this.admitted,hysteresis:void 0!==e?.25*e:160});this.applyAdmitted(t)}recomputeFill(){let e=function(e,t){if(t.reducedMotion)return new Set;let i=t.cap??4,n=d(e),r=new Map(n.map(e=>[e.id,e])),a=new Set;for(let e of t.prevAdmitted){if(a.size>=i)break;r.has(e)&&a.add(e)}if(a.size>=i)return a;for(let e of n.filter(e=>!a.has(e.id)).sort(c)){if(a.size>=i)break;a.add(e.id)}return a}(this.buildEntries(),{reducedMotion:this.reducedMotion,cap:this.cap,prevAdmitted:this.admitted});this.applyAdmitted(e)}computeEffective(e){if(this.reducedMotion||0===this.hover.size)return e;let t=new Set(e);for(let e of this.hover)t.add(e);return t}notify(e){for(let[t,i]of this.listeners){let n=e.has(t),r=this.inView.includes(t),a=this.lastNotified.get(t);a&&a.admitted===n&&a.inView===r||(i(n,r),this.lastNotified.set(t,{admitted:n,inView:r}))}}applyAdmitted(e){this.admitted=e,this.notify(this.computeEffective(e))}dispose(){this.scrollListenerAttached&&window.removeEventListener("scroll",this.handleScroll),null!==this.scrollRafId&&(h(this.scrollRafId),this.scrollRafId=null),this.observer.disconnect()}}let f=null;function m(){return"u"<typeof IntersectionObserver?null:(f||(f=new p(e=>new IntersectionObserver(e,{threshold:0}),t??(null===l&&(l=function(e){var t,i;if(!0===e.saveData||"string"==typeof(t=e.effectiveType)&&s.has(t)||"number"==typeof(i=e.deviceMemory)&&i<=2)return o(4);let n=e.viewportWidth;if("number"==typeof n&&Number.isFinite(n)){if(n>=2560)return o(16);if(n>=1536)return o(12)}return o(8)}(function(){let e={};if("u">typeof navigator){let t=navigator,i=t.connection;i&&"object"==typeof i&&("boolean"==typeof i.saveData&&(e.saveData=i.saveData),"string"==typeof i.effectiveType&&(e.effectiveType=i.effectiveType)),"number"==typeof t.deviceMemory&&(e.deviceMemory=t.deviceMemory)}return"number"==typeof window.innerWidth&&(e.viewportWidth=window.innerWidth),e}())),l))),f)}function v(e,t){m()?.setHover(e,t)}function g(e,t){let{enabled:i,manualPlay:r=!1,hover:s}=t,{prefersReduced:o}=(0,a.useMotionSafe)(),l=(0,n.useId)(),[d,c]=(0,n.useState)("idle"),[u,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{var e;e=o??!1,m()?.setReducedMotion(e)},[o]),(0,n.useEffect)(()=>{var t;let n;if(!i)return;let r=e.current;if(!r)return;let a=(t=(e,t)=>{h(t),c(t=>e?"playing":"idle"===t?"idle":"paused")},(n=m())?n.subscribe(r,l,t):()=>{}),s=-1/0,o=-1/0,d=()=>{s=-1/0,o=-1/0};r.addEventListener("play",d);let u=()=>{let e;(e=m())&&e.loopCompleted(l)},p=null,f="function"==typeof r.requestVideoFrameCallback;if(f){let e=(t,i)=>{!r.paused&&i.mediaTime<s&&u(),s=i.mediaTime,p=r.requestVideoFrameCallback(e)};p=r.requestVideoFrameCallback(e)}let v=()=>{!r.paused&&r.currentTime<o&&u(),o=r.currentTime};return f||r.addEventListener("timeupdate",v),()=>{r.removeEventListener("play",d),f||r.removeEventListener("timeupdate",v),null!==p&&r.cancelVideoFrameCallback(p
2),a()}},[i,l]),(0,n.useEffect)(()=>{if(i)return v(l,!!s&&!o),()=>{v(l,!1)}},[s,o,l,i]);let p=r&&u||"playing"===d,f=r&&u||"idle"!==d;return(0,n.useEffect)(()=>{let t=e.current;if(t){if(p){let e=()=>t.play()?.catch(()=>{});return e(),t.addEventListener("emptied",e),()=>{t.removeEventListener("emptied",e)}}t.pause(),t.currentSrc&&(t.currentTime=0)}},[p]),{srcAttached:f,playing:p}}function b({media:e,alt:t,width:a,height:s,blurDataURL:o,className:l,sizes:d,priority:c,manualPlay:u,hover:h,rendition:p="full"}){let f=(0,n.useRef)(null),{srcAttached:m}=g(f,{enabled:"motion"===e.kind,manualPlay:u,hover:h});if("motion"===e.kind)return(0,i.jsx)("video",{ref:f,className:l,width:a,height:s,poster:e.poster.thumbUrl,src:m?e.videoUrls[p]:void 0,loop:!0,muted:!0,playsInline:!0,preload:"none",disablePictureInPicture:!0,disableRemotePlayback:!0,"aria-label":t});let v="still"===e.kind?e.src:e.poster.src;return(0,i.jsx)(r.BlurHashImage,{src:v,alt:t,width:a,height:s,blurDataURL:o,className:l,sizes:d,priority:c})}e.s(["useMotionPlayback",()=>g],941092),e.s(["AssetMedia",()=>b],833157)},787456,e=>{"use strict";var t=e.i(271645);function i(){let[e,i]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{let e=window.matchMedia("(hover: hover)");i(e.matches);let t=e=>i(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),e}e.s(["useHasHover",()=>i])},776639,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(228894),r=e.i(97905),a=e.i(577854);let s={dim:"bg-[var(--color-ink)]/40",blur:"bg-[var(--color-ink)]/40 backdrop-blur-sm",heavy:"bg-[var(--color-ink)]/55 backdrop-blur-md"},o={default:"text-xl",display:"text-4xl sm:text-5xl leading-[0.95]"},l={sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg",xl:"sm:max-w-xl"},d={default:"p-6",roomy:"p-8 sm:p-10"},c={default:"top-4 right-4",roomy:"top-6 right-6"};function u({open:e,onOpenChange:u,title:h,description:p,children:f,footer:m,size:v="sm",presentation:g="auto",backdrop:b="blur",entrance:y="none",dirtyGuard:x,isDirty:w=!1,finalFocusEl:S,initialFocusEl:C,titleSize:A="default",padding:k="default"}){let[j,P]=(0,i.useState)(!1),D=(0,i.useCallback)(()=>{j?P(!1):x&&w?P(!0):u(!1)},[j,x,w,u]);(0,i.useEffect)(()=>{e||P(!1)},[e]);let E=l[v];return(0,t.jsx)(n.Dialog.Root,{open:e,onOpenChange:e=>{e.open?u(!0):D()},finalFocusEl:S,initialFocusEl:C,lazyMount:!0,children:(0,t.jsxs)(r.Portal,{children:[(0,t.jsx)(n.Dialog.Backdrop,{
2className:`fixed inset-0 z-[60] ${s[b]}${"none"!==y?" dialog-entrance-fade motion-reduce:animate-none":""}`}),(0,t.jsx)(n.Dialog.Positioner,{className:"fixed inset-0 z-[60] flex justify-center items-end sm:items-center",children:(0,t.jsxs)(n.Dialog.Content,{"data-presentation":g,className:`relative w-full ${E} bg-[var(--background)] text-[var(--text)] border border-[var(--text)]/15 rounded-t-2xl sm:rounded-xl ${d[k]} shadow-lg max-h-[90vh] overflow-y-auto${"lift"===y?" dialog-entrance-lift motion-reduce:animate-none":"fade"===y?" dialog-entrance-fade motion-reduce:animate-none":""}`,children:[(0,t.jsx)(n.Dialog.Title,{className:`font-serif ${o[A]} text-[var(--text)]`,children:h}),p&&(0,t.jsx)(n.Dialog.Description,{className:"mt-1 font-sans text-sm text-[var(--color-gray-7)]",children:p}),j?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("p",{className:"font-sans text-sm text-[var(--text)]",children:x?.message??"Discard your changes?"}),(0,t.jsxs)("div",{className:"mt-4 flex gap-2 justify-end",children:[(0,t.jsx)("button",{type:"button",onClick:()=>P(!1),className:"font-mono text-xs uppercase tracking-wider px-3 py-2 rounded-sm border border-[var(--text)]/20 hover:border-[var(--text)]/40",children:"Cancel"}),(0,t.jsx)("button",{type:"button",autoFocus:!0,onClick:()=>{P(!1),u(!1)},className:"font-mono text-xs uppercase tracking-wider px-3 py-2 rounded-sm bg-[var(--color-accent-red)] text-[var(--color-snow)]",children:x?.confirmLabel??"Discard"})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-4",children:f}),m&&(0,t.jsx)("div",{className:"mt-6",children:m})]}),(0,t.jsx)(n.Dialog.CloseTrigger,{className:`absolute ${c[k]} inline-flex items-center justify-center w-7 h-7 rounded-md text-[var(--color-gray-7)] hover:text-[var(--text)] hover:bg-[var(--text)]/5`,"aria-label":"Close dialog",children:(0,t.jsx)(a.X,{size:16,"aria-hidden":"true"})})]})})]})})}e.s(["Dialog",()=>u],776639)},787311,398157,411003,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(572488),r=e.i(618566),a=e.i(776639),s=e.i(617140),o=e.i(425660);let l={card:{manageWorkBioLinks:"Manage work, bio, and links.",claimProfileTrigger:"Claim profile",claimProfileTriggerAria:e=>`Claim profile for ${e}`},pending:{eyebrow:"Claim status",underReviewAria:e=>`Claim for ${e} is under review`,underReview:"Claim under review",reviewedWithinDays:"Usually reviewed within a few days.",withdrawClaim:"Withdraw claim",withdrawTriggerAria:e=>`Withdraw your claim for ${e}`},verdict:{ariaNotApproved:e=>`Your claim for ${e} wasn't approved`,deniedLine:"This claim wasn't approved",deniedSub:"We’ve reviewed it and aren’t able to approve it right now. The details are in your email.",siblingApprovedLine:"This profile was claimed by another account",siblingApprovedSub:"The details are in your email.",needsMoreEvidenceLine:"Needs more evidence",needsMoreEvidenceSub:"We couldn't confirm this from what you sent.",needsMoreEvidenceCta:"Resubmit with evidence",ctaAria:(e,t)=>`${e} — claim profile for ${t}`},withdrawDialog:{title:"Withdraw this claim?",description:"You can claim again any time.",confirming:"Withdrawing…",successToast:"Claim withdrawn.",errorToast:"Couldn’t withdraw the claim. Try again."},gateLadder:{title:"Log in to continue",description:"Log in to save illustrations or claim a profile.",dirtyGuardMessage:"Discard your login details?",newHere:"New here?",signUpLink:"Sign up"},verifyPrompt:{title:"Verify your email",description:e=>`Check your inbox for ${e} to verify. Then you can save and claim.`,recheckResting:"I've verified",resendResting:"Resend verification email",reloadHint:"Already verified? Reload this page to continue."},dialog:{title:"Claim this profile",description:"Claiming links this profile to your account. We'll review your request and email you with the result.",dirtyGuardMessage:"Discard your claim details?",submitResting:"Submit claim",submitInFlight:"Submitting…",emailMatchCallout:"The email on your account matches this profile. That’ll help us verify your claim.",noteLabel:"Note (optional)",notePlaceholder:"Anything that helps us confirm this is you.",evidenceLabel:"Evidence URL (optional)",evidencePlaceholder:"https://… a link that helps us verify",successToastTitle:"Claim submitted",successToastDescription:"We’ll email you once it’s reviewed."},errors:{alreadyPending:"You already have a pending claim for this profile.",alreadyClaimed:"This profile has already been claimed.",alreadyOwner:"You already manage a profile — one per account for now.",rateLimited:"You’ve reached the claim limit. Try again later.",invalidUrl:"Enter a valid link starting with http:// or https://.",urlTooLong:"That link is too long.",noteTooLong:"Your note is too long (2000 characters max).",unverified:"Verify your email before claiming a profile.",unauthenticated:"Log in to claim a profile.",fallback:"Something went wrong. Try again."}};function d({open:e,onOpenChange:d,onAuthenticated:c,title:u=l.gateLadder.title,de
2scription:h=l.gateLadder.description}){let[p,f]=(0,i.useState)(!1),m=(0,r.usePathname)();return(0,t.jsxs)(a.Dialog,{open:e,onOpenChange:e=>{e||f(!1),d(e)},title:u,description:h,dirtyGuard:{message:l.gateLadder.dirtyGuardMessage,confirmLabel:o.SHARED_COPY.dialogChrome.discard},isDirty:p,children:[(0,t.jsx)(s.AuthForm,{context:"dialog",onAuthenticated:()=>{f(!1),c?.()},onDirtyChange:f}),(0,t.jsxs)("p",{className:"mt-6 text-center font-mono text-xs uppercase tracking-wider text-[var(--dimmed)]",children:["New here?"," ",(0,t.jsx)(n.AppLink,{href:`/signup?next=${encodeURIComponent(m??"/")}`,className:"text-[var(--text)] underline underline-offset-4 hover:opacity-70 transition-opacity",children:"Sign up"})]})]})}e.s(["CLAIMS_COPY",0,l],398157),e.s(["GatedActionDialog",()=>d],787311);var c=e.i(631973),u=e.i(912598),h=e.i(582796),p=e.i(500694),f=e.i(45880),m=e.i(120851),v=e.i(989965);function g({open:e,onOpenChange:n,email:r,onVerified:s,reloadHint:d,title:g=l.verifyPrompt.title,description:b=l.verifyPrompt.description}){let y=(0,c.useNavigation)(),x=(0,u.useQueryClient)(),[w,S]=(0,i.useState)(null),[C,A]=(0,i.useState)(!1),[k,j]=(0,i.useState)(!1),P=C||k;function D(){x.invalidateQueries({queryKey:["account-profile"]}),s?s():y.replace("/")}async function E(){if(P)return;j(!0);let e=(0,f.verifyRecheckOutcome)(await (0,h.getSessionVerificationState)());j(!1),e.verified?D():S(e.display??null)}async function _(){if(P)return;A(!0);let e=(0,f.verifyPromptState)(await (0,p.resendVerification)());A(!1),S(e),e.redirect&&setTimeout(D,400)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||S(null),n(e)},title:g,description:b(r),children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("button",{type:"button",onClick:E,disabled:P,className:m.AUTH_BUTTON_CLASS,children:k?o.SHARED_COPY.loading.checking:l.verifyPrompt.recheckResting}),(0,t.jsx)("button",{type:"button",onClick:_,disabled:P,className:m.AUTH_LINK_CLASS,children:C?o.SHARED_COPY.loading.sending:l.verifyPrompt.resendResting}),(0,t.jsx)("p",{"aria-live":"polite","aria-atomic":"true",className:`font-mono text-xs ${w?.kind==="sent"?"text-[var(--color-accent-green)]":"text-[var(--dimmed)]"}`,children:w?.message??""}),w?.accountSettings&&(0,t.jsx)("a",{href:"/settings/account",className:m.AUTH_LINK_CLASS,children:v.AUTH_COPY.verify.goToAccountSettings}),d&&(0,t.jsx)("p",{className:"font-sans text-xs text-[var(--dimmed)]",children:l.verifyPrompt.reloadHint})]})})}e.s(["VerifyPromptDialog",()=>g],411003)},993855,e=>{"use strict";var t=e.i(843476);let i="inline-flex items-center gap-2 rounded-full border px-4 py-2 text-sm font-medium cursor-pointer touch-manipulation disabled:opacity-50 disabled:cursor-default",n=`${i}
2 border-foreground/15 text-foreground/70 enabled:hover:border-foreground/40 enabled:hover:bg-foreground/[0.04] enabled:hover:text-foreground focus-visible:text-foreground [transition:color_150ms_ease-out,background-color_150ms_ease-out,border-color_150ms_ease-out,scale_100ms_ease-out] motion-reduce:transition-none motion-safe:enabled:active:scale-[0.97]`,r=`${i} border-transparent bg-foreground/[0.06] pointer-events-none`;function a({labels:e,current:i,currentStyle:n}){return(0,t.jsx)("span",{className:"inline-grid whitespace-nowrap",children:e.map(e=>e===i?(0,t.jsx)("span",{"data-pill-label":"current",className:"[grid-area:1/1]",style:n,children:e},e):(0,t.jsx)("span",{"data-pill-label":"sizer","aria-hidden":"true",className:"invisible [grid-area:1/1]",children:e},e))})}function s({labels:e,className:i="",...n}){return(0,t.jsx)("span",{...n,"aria-hidden":!0,className:`${r} ${i}`,children:(0,t.jsxs)("span",{className:"invisible inline-flex items-center gap-2",children:[(0,t.jsx)("span",{style:{width:18,height:18}}),(0,t.jsx)(a,{labels:e,current:e[0]})]})})}e.s(["ACTION_PILL_CLASS",0,n,"ACTION_PILL_ICON_CLASS",0,"text-foreground","ACTION_PILL_ICON_SIZE",0,18,"ActionPillSkeleton",()=>s,"PillLabelSizer",()=>a])},782968,e=>{"use strict";var t=e.i(271645);function i(e,i,n){(0,t.useEffect)(()=>{if(i)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(t){if("Tab"!==t.key)return;let i=[];if(n)for(let e of n)e.current&&i.push(e.current);if(e.current&&i.push(...e.current.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')),0===i.length)return;let r=i[0],a=i[i.length-1],s=document.activeElement,o=s===e.current,l=!o&&!i.includes(s)&&!!e.current?.contains(s);if(o||l){t.preventDefault(),t.shiftKey?a.focus():r.focus();return}t.shiftKey&&s===r?(t.preventDefault(),a.focus()):t.shiftKey||s!==a||(t.preventDefault(),r.focus())}},[i,e,n])}e.s(["useFocusTrap",()=>i])},962507,e=>{"use strict";var t=e.i(271645);function i(e){let[t,i]=e.split("-");return{side:t,align:i??"center"}}function n({anchorRef:e,floatingRef:n,active:r,placement:a,offset:s}){(0,t.useLayoutEffect)(()=>{if(r)return t(),window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)};function t(){let t=e.current,r=n.current;if(!t||!r)return;let o=t.getBoundingClientRect(),l={width:window.innerWidth,height:window.innerHeight},d=function({anchor:e,floating:t,viewport:n,placement:r,offset:a}){let{side:s,align:o}=i(r),l=n.height-e.bottom-a-8,d=e.top-a-8,c="bottom"===s?l:d,u=c<t.height&&("bottom"===s?d:l)>c?"bottom"===s?"top":"bottom":s,h="bottom"===u?e.bottom+a:e.top-a-t.height,p="start"===o?e.left:"end"===o?e.right-t.width:e.left+e.width/2-t.width/2;return{top:h,left:Math.max(8,Math.min(n.width-8-t.width,p)),placement:"center"===o?u:`${u}-${o}`}}({anchor:o,floating:{width:r.offsetWidth,height:r.offsetHeight},viewport:l,placement:a,offset:s});r.style.top=`${d.top}px`,r.style.left=`${d.left}px`,r.style.transformOrigin=function(e){let{side:t,align:n}=i(e);return`${"bottom"===t?"top":"bottom"} ${"start"===n?"left":"end"===n?"right":"center"}`}(d.placement),r.dataset.placement=d.placement;let c=d.placement.startsWith("bottom")?l.height-o.bottom-s-8:o.top-s-8;r.style.setProperty("--floating-available-height",`${Math.max(0,c)}px`)}},[r,e,n,a,s])}let r=()=>()=>{};function a(){return(0,t.useSyncExternalStore)(r,()=>!0,()=>!1)}e.s(["useFloatingPosition",()=>n,"useIsClient",()=>a])},171715,e=>{"use strict";function t(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function i(e,t){return i=>{e?.(i),i.defaultPrevented||t(i)}}e.s(["assignRef",()=>t,"composeHandlers",()=>i])},337822,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(174080),r=e.i(88653),a=e.i(846932),s=e.i(30747),o=e.i(783036),l=e.i(782968),d=e.i(962507),c=e.i(171715);let u=(0,i.createContext)(null);function h(e){let t=(0,i.useContext)(u);if(!t)throw Error(`<${e}> must be rendered inside <Popover>`);return t}function p({open:e,defaultOpen:n=!1,onOpenChange:r,children:a}){let[s,o]=(0,i.useState)(n),l=void 0!==e,d=l?e:s,c=(0,i.useRef)(null),h=(0,i.useRef)(null),p=(0,i.useId)(),f=(0,i.useCallback)(e=>{l||o(e),r?.(e)},[l,r]),m=(0,i.useRef)(d);return(0,i.useEffect)(()=>
2{if(m.current&&!d){let e=document.activeElement;(!e||e===document.body||h.current?.contains(e))&&c.current?.focus({preventScroll:!0})}m.current=d},[d]),(0,t.jsx)(u.Provider,{value:{open:d,setOpen:f,triggerRef:c,contentRef:h,contentId:p},children:a})}function f({asChild:e,children:n,ref:r,...a}){let{open:s,setOpen:l,triggerRef:d,contentId:u}=h("PopoverTrigger"),p=(0,o.usePressActivate)(()=>l(!s)),f={"aria-haspopup":"dialog","aria-expanded":s,"aria-controls":s?u:void 0,onPointerDown:p.onPointerDown,onClick:p.onClick,onMouseDown:e=>{0===e.button&&e.preventDefault()},onKeyDown:e=>{"ArrowDown"!==e.key||s?"Escape"===e.key&&s&&(e.preventDefault(),e.stopPropagation(),l(!1)):(e.preventDefault(),l(!0))}};if(e&&(0,i.isValidElement)(n)){let e=n.type,i=n.props;return(0,t.jsx)(e,{...i,...a,"aria-haspopup":f["aria-haspopup"],"aria-expanded":f["aria-expanded"],"aria-controls":f["aria-controls"],onPointerDown:(0,c.composeHandlers)(i.onPointerDown,f.onPointerDown),onClick:(0,c.composeHandlers)(i.onClick,f.onClick),onMouseDown:(0,c.composeHandlers)(i.onMouseDown,f.onMouseDown),onKeyDown:(0,c.composeHandlers)(i.onKeyDown,f.onKeyDown),ref:e=>{d.current=e,(0,c.assignRef)(i.ref,e),(0,c.assignRef)(r,e)}})}return(0,t.jsx)("button",{type:"button",...a,...f,onPointerDown:(0,c.composeHandlers)(a.onPointerDown,f.onPointerDown),onClick:(0,c.composeHandlers)(a.onClick,f.onClick),onMouseDown:(0,c.composeHandlers)(a.onMouseDown,f.onMouseDown),onKeyDown:(0,c.composeHandlers)(a.onKeyDown,f.onKeyDown),ref:e=>{d.current=e,(0,c.assignRef)(r,e)},children:n})}let m={duration:.14,ease:[.23,1,.32,1]},v={duration:.1,ease:[.4,0,1,1]};function g({children:e,placement:a="bottom-start",offset:s=6,className:o,swallowOutsidePress:c=!1,initialFocus:u,...p}){let{open:f,setOpen:m,triggerRef:v,contentRef:g,contentId:x}=h("PopoverContent"),w=(0,d.useIsClient)();return((0,d.useFloatingPosition)({anchorRef:v,floatingRef:g,active:f,placement:a,offset:s}),(0,l.useFocusTrap)(g,f),(0,i.useEffect)(()=>{if(f&&!c)return document.addEventListener("pointerdown",e,!0),()=>document.removeEventListener("pointerdown",e,!0);function e(e){let t=e.target;!t||g.current?.contains(t)||v.current?.contains(t)||m(!1)}},[f,c,m,g,v]),w)?(0,n.createPortal)((0,t.jsxs)(r.AnimatePresence,{children:[f&&c&&(0,t.jsx)(b,{onPress:()=>m(!1)},"popover-swallow"),f&&(0,t.jsx)(y,{id:x,contentRef:g,className:o,label:p,initialFocus:u,onEscape:()=>m(!1),children:e},"popover")]}),document.body):null}function b({onPress:e}){let{safeTransition:i}=(0,s.useMotionSafe)();return(0,t.jsx)(a.motion.div,{"data-popover-swallow":"","aria-hidden":"true",className:"fixed inset-0 z-[69]",initial:{opacity:0}
2,animate:{opacity:1,transition:{duration:0}},exit:{opacity:0,transition:i(v)},onPointerDown:t=>{0===t.button&&(t.preventDefault(),e())},onClick:e=>e.stopPropagation()})}function y({id:e,contentRef:n,className:r,label:o,initialFocus:l,onEscape:d,children:c}){let{safeTransition:u}=(0,s.useMotionSafe)();return(0,i.useEffect)(()=>{let e=n.current;e&&(l?.current??e.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')??e).focus({preventScroll:!0})},[n,l]),(0,t.jsx)(a.motion.div,{ref:n,id:e,role:"dialog",tabIndex:-1,...o,initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1,transition:u(m)},exit:{opacity:0,scale:.99,transition:u(v)},onKeyDown:e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),d())},className:["fixed left-0 top-0 z-[70] rounded-xl bg-background text-foreground ring-1 ring-foreground/10 shadow-lg outline-none",r].filter(Boolean).join(" "),children:c})}e.s(["Popover",()=>p,"PopoverContent",()=>g,"PopoverTrigger",()=>f])},461713,e=>{"use strict";var t=e.i(271645);let i="(min-width: 48rem)";function n(e){let t=window.matchMedia(i);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function r(){return(0,t.useSyncExternalStore)(n,()=>window.matchMedia(i).matches,()=>!0)}e.s(["useIsDesktop",()=>r])},114272,e=>{"use strict";var t=e.i(540143),i=e.i(88587),n=e.i(936553),r=class extends i.Removable{#e;#t;#i;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#t=[],this.state=e.state||a(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#r({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,n.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#r({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let r="pending"===this.state.status,a=!this.#n.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),this.#i.config.onMutate&&await this.#i.config.onMutate(e,this,i);let t=await this.options.onMutate?.(e,i);t!==this.state.context&&this.#r({type:"pending",context:t,variables:e,isPaused:a})}let n=await this.#n.start();return await this.#i.config.onSuccess?.(n,e,this.state.context,this,i),await this.options.onSuccess?.(n,e,this.state.context,i),await this.#i.config.onSettled?.(n,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(n,null,e,this.state.context,i),this.#r({type:"success",data:n}),n}catch(t){try{await this.#i.config.onError?.(t,e,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,i)}catch(e){Promise.reject(e)}try{await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,i)}catch(e){Promise.reject(e)}throw this.#r({type:"error",error:t}),t}finally{this.#i.runNext(this)}}#r(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
2sed:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#i.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",()=>r,"getDefaultState",()=>a])},954616,e=>{"use strict";var t=e.i(271645),i=e.i(114272),n=e.i(540143),r=e.i(915823),a=e.i(619273),s=class extends r.Subscribable{#e;#a=void 0;#s;#o;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.hashKey)(t.mutationKey)!==(0,a.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#d(e)}getCurrentResult(){return this.#a}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#l(),this.#d()}mutate(e,t){return this.#o=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#l(){let e=this.#s?.state??(0,i.getDefaultState)();this.#a={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#d(e){n.notifyManager.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#a.variables,i=this.#a.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#o.onSuccess?.(e.data,t,i,n)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(e.data,null,t,i,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#o.onError?.(e.error,t,i,n)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(void 0,e.error,t,i,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#a)})})}},o=e.i(912598);function l(e,i){let r=(0,o.useQueryClient)(i),[l]=t.useState(()=>new s(r,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let d=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(n.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),c=t.useCallback((e,t)=>{l.mutate(e,t).catch(a.noop)},[l]);if(d.error&&(0,a.shouldThrowError)(l.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>l],954616)},366777,833152,e=>{"use strict";var t=e.i(954616),i=e.i(266027),n=e.i(912598),r=e.i(333815),a=e.i(909578),s=e.i(902800),o=e.i(508418);function l(e,t,i,n,r){return e.map(e=>{if(e.id!==t)return e;let a=new Set(e.itemIds);return"file"===n?a.add(i):a.delete(i),"file"===n?{...e,itemIds:a,lastFiledAt:r}:{...e,itemIds:a}})}function d(e,t){return e.some(e=>e.id===t.id)?e:[...e,t]}function c(e,t,i){return e.some(e=>e.id===t)?e.map(e=>e.id===t?{...e,...i}:e):e}function u(e,t){return e.some(e=>e.id===t)?e.filter(e=>e.id!==t):e}function h(e){let t=(e,t)=>e.lastFiledAt&&t.lastFiledAt?Date.parse(t.lastFiledAt)-Date.parse(e.lastFiledAt):e.lastFiledAt?-1:t.lastFiledAt?1:Date.parse(t.createdAt)-Date.parse(e.createdAt);return{public:e.filter(e=>"public"===e.visibility).sort(t),private:e.filter(e=>"private"===e.visibility).sort(t)}}function p(e){return e.itemIds.size>=o.BOARD_ITEM_CAP}function f(e){let t=e?.message;return"string"!=typeof t?"unknown":t.includes("board_full")?"full":t.includes("board_cap_reached")?"cap":"unknown"}let m=e=>({id:e.id,shortId:e.short_id,slug:e.slug,name:e.name,visibility:e.visibility,updatedAt:e.updated_at,createdAt:e.created_at}),v=e=>{let t=e.collection_illustrations??[],i=t.reduce((e,t)=>null===e||Date.parse(t.created_at)>Date.parse(e)?t.created_at:e,null);return{...m(e),lastFiledAt:i,itemIds:new Set(t.map(e=>e.illustration_id))}};async function g(e,t){let{data:i,error:n}=await e.from("collections").select("id, short_id, slug, name, visibility, updated_at, created_at, collection_illustrations(illustration_id, created_at)").eq("user_id",t).eq("is_default",!1);if(n)throw n;return(i??[]).map(v)}async function b(e,t,{place:i}={}){let{error:n}=await (0,r.createClient)().from("collection_illustrations").insert({collection_id:e,illustration_id:t,...i?.filedAt?{created_at:i.filedAt}:{},...i?.position?{position:i.position}:{}});if(n&&!(0,s.isUniqueViolation)(n))throw n}async function y(e,t){let{data:i,error:n}=await (0,r.createClient)().from("collection_illustrations").delete().eq("collection_id",e).eq("illustration_id",t).select("created_at, position::text");if(n)throw n;let a=i?.[0];return a?{filedAt:a.created_at,position:a.position}:null}async function x(e){let{data:t,error:i}=await (0,r.createClient)().from("collections").insert({name:e.name,visibility:e.visibility,user_id:e.userId}).select("id, short_id, slug, name, visibility, updated_at, created_at").single();if(i)throw i;return m(t)}e.s(["appendBoard",()=>d,"classifyBoardError",()=>f,"createBoard",()=>x,"fetchBoardMemberships",()=>g,"fileIntoBoard",()=>b,"isBoardFull",()=>p,"orderForPicker",()=>h,"patchBoardInList",()=>c,"removeBoardFromList",()=>u,"toggleMembership",()=>l,"unfileFromBoard",()=>y],833152);let w=e=>["board-memberships",e];function S(e,t){return{queryKey:w(e),queryFn:()=>g((0,r.createClient)(),e),enabled:t&&!!e,staleTime:1/0}}function C({enabled:e}){let{user:t,isAuthenticated:n}=(0,a.useUser)();return(0,i.useQuery)(S(t?.id??null,e&&n))}function A(e){let{user:t,isAuthenticated:n}=(0,a.useUser)(),{data:r}
2=(0,i.useQuery)({...S(t?.id??null,n),select:t=>k(t,e).map(e=>e.name)});return r??j}function k(e,t){return e.filter(e=>e.itemIds.has(t))}let j=[];function P(e){let{user:t,isAuthenticated:n}=(0,a.useUser)(),{data:r}=(0,i.useQuery)({...S(t?.id??null,n),select:t=>k(t,e).map(({shortId:e,slug:t,name:i,visibility:n})=>({shortId:e,slug:t,name:i,visibility:n}))});return r??null}function D(){let e=(0,n.useQueryClient)(),{user:i}=(0,a.useUser)(),r=w(i?.id??null);return(0,t.useMutation)({mutationFn:async({boardId:e,illustrationId:t,intent:i})=>{"file"===i?await b(e,t):await y(e,t)},onMutate:async({boardId:t,illustrationId:i,intent:n})=>{await e.cancelQueries({queryKey:r}),e.setQueryData(r,e=>e?l(e,t,i,n,new Date().toISOString()):e)},onError:(t,{boardId:i,illustrationId:n,intent:a})=>{e.setQueryData(r,e=>e?l(e,i,n,"file"===a?"unfile":"file",new Date().toISOString()):e)}})}class E extends Error{stage;kind;cause;board;constructor(e,t,i,n){super(`createBoard ${e} failed (${t})`),this.stage=e,this.kind=t,this.cause=i,this.board=n,this.name="CreateBoardError"}}function _(){let e=(0,n.useQueryClient)(),{user:i}=(0,a.useUser)(),r=i?.id??null,s=w(r);return(0,t.useMutation)({mutationFn:async({name:t,visibility:i,illustrationId:n})=>{let a;if(!r)throw new E("create","unknown",Error("not signed in"));try{a=await x({name:t,visibility:i,userId:r})}catch(e){throw new E("create",f(e),e)}let o={...a,lastFiledAt:null,itemIds:new Set};if(!n)return e.setQueryData(s,e=>e?d(e,o):e),o;try{await b(o.id,n)}catch(t){throw e.setQueryData(s,e=>e?d(e,o):e),new E("file",f(t),t,o)}return o.itemIds=new Set([n]),o.lastFiledAt=new Date().toISOString(),e.setQueryData(s,e=>e?d(e,o):e),o}})}e.s(["CreateBoardError",()=>E,"boardMembershipsKey",0,w,"useBoardMemberships",()=>C,"useCreateBoard",()=>_,"useFiledBoardEntries",()=>P,"useFiledBoards",()=>A,"useToggleBoardMembership",()=>D],366777)},576036,e=>{"use strict";e.s(["BOARDS_COPY",0,{notFound:{title:"Nothing here",message:"This board doesn’t exist, or it isn’t public.",logInIfYours:"Log in if this is yours",backToGallery:"Back to gallery",metaTitle:"Nothing here"},page:{emptyTitle:"Nothing here yet",emptyOwnerTitle:"Nothing filed here yet",emptyOwner:"Tap + on any illustration to file it here. The first four become the cover.",emptyVisitor:e=>`${e} hasn’t filed anything on this board yet.`,emptyBrowse:"Browse illustrations",visibilityMark:{public:"Public",private:"Private",alwaysPrivate:"Always private",aria:e=>`Visibility: ${e}`}},foot:{related:"Other boards with these pieces",moreFromOwner:e=>`More from ${e}`},hero:{boardCount:e=>1===e?"1 board":`${e} boards`,boardsArrow:"→",ownerAria:(e,t)=>`${e}, @${t}`,addDescription:"Add a description",savedExplainer:{line:"Every piece you save lands here. This is just for you.",link:"How Saved works",bullets:["Save a piece with the heart and it lands here.","It’s private. Only you can see Saved.","Boards are different. You can have up to ten boards, name them, and they default to public.","To file a saved piece into a board, use Add to board.","To unsave a piece, tap its heart again."]},wheelLabel:"Key colors on this board",specs:{holds:"Holds",publishedIn:"Published in",publisherAndOthers:(e,t)=>`${e}, +${t}`,publications:e=>`${e} publications`,mostly:"Mostly",palette:"Palette",warm:"warm",cool:"cool",years:"Years",updated:"Updated",yearRange:(e,t)=>e===t?`${e}`:`${e} to ${t}`}},view:{label:"View",grid:"Grid",credits:"Credits"},credits:{caption:"Credits for every piece on this board",illustration:"Illustration",illustrator:"Illustrator",artDirector:"Art director",publishedIn:"Published in",date:"Date",available:"Available",availableYes:e=>`${e} is available for commissions`,availableNo:e=>`${e} isn’t listed as available`,notRecorded:"Not recorded",actions:"Actions"},remove:{label:"Remove",aria:e=>`Remove ${e} from this board`,removedToast:"Removed from this board",undo:"Undo",failedToast:"Couldn’t save. Try again."},arrange:{arrange:"Arrange",done:"Done",saving:"Saving…",hint:"Drag to reorder. The first four make the cover.",cover:"Cover",handleAria:(e,t,i)=>`Move ${e}, position ${t} of ${i}`,instructions:"Press space to pick up a piece. Use the arrow keys to move it, space to drop it, or escape to put it back.",pickedUp:(e,t,i)=>`Picked up ${e}, position ${t} of ${i}.`,movedTo:(e,t,i)=>`${e} is over position ${t} of ${i}.`,dropped:(e,t,i)=>`Dropped ${e} at position ${t} of ${i}.`,inCover:" It’s part of the cover now.",canceled:(e,t)=>`Move canceled. ${e} is back at position ${t}.`,saved:"Order saved",failedToast:"Couldn’t save the order. Try again.",staleToast:"This board changed since you opened it. Here’s the latest order."},tombstone:{title:"No longer on illustration.lol",note:"Only you can see this."},meta:{collectionsShellTitle:"Boards",shareImageAlt:"A Board on illustration.lol",title:(e,t)=>
2`${e} \xb7 @${t}`,description:(e,t)=>`${e}, a board by @${t} on illustration.lol.`},picker:{title:"Add to board",searchLabel:"Search your boards",noMatch:e=>`No board called “${e}”.`,newBoard:"New board",done:"Done",loadFailed:"Couldn’t load your boards. Try again.",groups:{saved:"Saved",publicHead:"Public · on your profile",privateHead:"Private · only you",count:e=>0===e?"Empty":1===e?"1 piece":`${e} pieces`},failed:{rowNote:"Couldn’t save",toast:"Couldn’t save. Try again."}},caps:{fullRow:e=>`Full (${e})`,newBoardDisabled:e=>`You have ${e} boards, the limit. Delete one to make another.`,boardFullToast:e=>`That board is full. It holds ${e} pieces.`,boardCapToast:e=>`You’ve reached ${e} boards. Delete one to make another.`},create:{nameLabel:"Name this board",namePlaceholder:"Cover ideas",remaining:e=>`${e} left`,submit:"Create",submitting:"Creating…",failedToast:"Couldn’t create that board. Try again."},visibility:{groupLabel:"Who can see this board",public:"Public",private:"Private",publicLine:e=>`Anyone can see it. It shows on your profile once it holds ${e} pieces.`,privateLine:"Only you can see it."},edit:{open:"Edit board",nameLabel:"Name",descriptionLabel:"Description",descriptionPlaceholder:"A line about what this holds (optional)",visibilityLabel:"Visibility",goingPrivate:"Links to this board will stop working.",coverHint:"The cover is the first four pieces. Rearrange them with Arrange on desktop.",save:"Save",saving:"Saving…",saveFailedToast:"Couldn’t save. Try again.",savePartialToast:"Some changes didn’t save. Try again.",deleteBoard:"Delete board",deleteConfirm:e=>`Delete ${e}? Its link stops working.`,deleteConfirmCta:"Delete",deleting:"Deleting…",deletedToast:e=>`${e} deleted`,deleteFailedToast:"Couldn’t delete that board. Try again.",savedCannotDelete:"Saved can’t be deleted. It’s where things land when you save them."},share:{button:"Share",copied:"Link copied",copyFailedToast:"Couldn’t copy the link. Try again."},gates:{loginTitle:"Log in to add to a board",loginDescription:"Log in to keep illustrations in boards you name.",verifyTitle:"Verify your email",verifyDescription:e=>`Check your inbox for ${e} to verify. Then you can save, add to boards and follow.`},filed:{addAria:"Add to board",filedAria:e=>`In ${e} of your boards`,tooltip:e=>{if(0===e.length)return"";let t=e.slice(0,3).join(", "),i=e.length-3;return i>0?`In ${t} and ${i} more`:`In ${t}`}},illustrationPage:{button:"Add to board",filed:"Added",yourBoards:"In your boards:",inPublicBoards:e=>1===e?"In 1 public board":`In ${e} public boards`,you:"You"},card:{ago:{today:"today",days:e=>`${e}d ago`,weeks:e=>`${e}w ago`,months:e=>`${e}mo ago`,years:e=>`${e}y ago`},agoFull:{today:"today",yesterday:"yesterday",days:e=>`${e} days ago`,weeks:e=>1===e?"1 week ago":`${e} weeks ago`,months:e=>1===e?"1 month ago":`${e} months ago`,years:e=>1===e?"1 year ago":`${e} years ago`},updated:e=>
2`Updated ${e}`,count:e=>1===e?"1 illustration":`${e} illustrations`,byOwner:(e,t)=>`${e}, by ${t}`,belowFloor:e=>`Visitors won’t see it until it holds ${e} illustrations.`}}])},724143,544318,e=>{"use strict";var t=e.i(425660);let i={button:{save:"Save",saved:"Saved",unsave:"Unsave",removeAria:"Remove from Saved"},toasts:{savedTitle:"Added to Saved",savedDescription:"Find it any time under Saved.",savedViewAction:"View",updateFailed:"Couldn’t update your saves",removedTitle:"Removed from Saved",undo:"Undo"},savedPage:{pageTitle:"Saved",breadcrumb:"Saved",heading:"Saved"},emptyStates:{signedOut:{title:"Save illustrations you love",message:"Log in to save illustrations and sort them into boards.",logIn:"Log in",signUp:"Sign up"},unverified:{title:"Verify your email to start saving",checkInboxMessage:e=>`Check your inbox for ${e} to verify. Then you can save illustrations.`},verifiedEmpty:{title:"No saved illustrations yet",message:"Find an illustration you love, open it, and tap the heart.",browseIllustrations:"Browse illustrations"}},noLongerPublic:{label:"No longer available"}};function n(e){return e.isLoading?"loading":e.isAuthenticated?e.isVerified?e.isSaved?"saved":"unsaved":"unverified":"signed-out"}function r(e){return e?t.SHARED_COPY.errors.suspendedAccount:i.toasts.updateFailed}function a(e,t,i){let n=new Set(e);return"save"===i?n.add(t):n.delete(t),n}function s(e){return null===e.illustration}function o(e,t,i){return"save"===i?e:e.filter(e=>e.illustration_id!==t)}e.s(["SAVES_COPY",0,i],544318),e.s(["deriveSaveButtonState",()=>n,"getSaveFailureToastTitle",()=>r,"isNoLongerPublic",()=>s,"optimisticListToggle",()=>o,"toggleSavedSet",()=>a],724143)},746798,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(174080),r=e.i(846932),a=e.i(30747),s=e.i(962507),o=e.i(171715);let l={duration:.12,ease:"easeOut"},d=-1/0;function c({content:e,children:c,describe:u=!0,placement:h="top",offset:p=6}){let[f,m]=(0,i.useState)(!1),{safeTransition:v}=(0,a.useMotionSafe)(),g=(0,s.useIsClient)(),b=(0,i.useId)(),y=(0,i.useRef)(null),x=(0,i.useRef)(null),w=(0,i.useRef)(null),S=(0,i.useRef)(-1/0),C=null!=e&&""!==e,[A,k]=(0,i.useState)(C);function j(){w.current&&clearTimeout(w.current),w.current=null}function P(){j(),C&&m(!0)}function D(){j(),m(!1)}function E(){j(),w.current=setTimeout(D,120)}A!==C&&(k(C),m(!1)),(0,s.useFloatingPosition)({anchorRef:y,floatingRef:x,active:f,placement:h,offset:p}),(0,i.useEffect)(()=>{if(f)return()=>{d=Date.now()}},[f]),(0,i.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]);let _=c.props,N=C&&u,O=[_["aria-describedby"],N?b:null].filter(Boolean).join(" ")||void 0,R=c.type;function I(e,t){return _[e]?.(t),!t.defaultPrevented}let M=(0,t.jsx)(R,{..._,"aria-describedby":O,ref:e=>{y.current=e,(0,o.assignRef)(_.ref,e)}
2,onPointerEnter:e=>{I("onPointerEnter",e)&&"mouse"===e.pointerType&&function(){if(j(),C){if(Date.now()-d<300)return P();w.current=setTimeout(P,400)}}()},onPointerLeave:e=>{I("onPointerLeave",e)&&"mouse"===e.pointerType&&E()},onPointerDown:e=>{I("onPointerDown",e)&&(S.current=Date.now(),D())},onFocus:e=>{!I("onFocus",e)||Date.now()-S.current<1e3||P()},onBlur:e=>{I("onBlur",e)&&D()},onKeyDown:e=>{I("onKeyDown",e)&&"Escape"===e.key&&f&&(e.stopPropagation(),D())}});return(0,t.jsxs)(t.Fragment,{children:[M,N&&(0,t.jsx)("span",{id:b,hidden:!0,children:e}),g&&f&&C&&(0,n.createPortal)((0,t.jsx)(r.motion.div,{ref:x,role:"tooltip",initial:{opacity:0},animate:{opacity:1,transition:v(l)},onPointerEnter:j,onPointerLeave:E,className:"fixed left-0 top-0 z-[80] max-w-64 rounded-sm bg-background px-2 py-1 font-sans text-xs text-foreground ring-1 ring-foreground/10 shadow-lg",children:e}),document.body)]})}e.s(["TOOLTIP_CLOSE_DELAY_MS",0,120,"TOOLTIP_OPEN_DELAY_MS",0,400,"Tooltip",()=>c])},12616,e=>{"use strict";var t=e.i(843476),i=e.i(746798),n=e.i(576036);function r({names:e,suppressed:r=!1,placement:a="top",describe:s=!0,children:o}){return(0,t.jsx)(i.Tooltip,{content:r?null:n.BOARDS_COPY.filed.tooltip(e),placement:a,describe:s,children:o})}e.s(["BoardNamesTooltip",()=>r])},850277,e=>{"use strict";var t=e.i(271645),i=e.i(769464);let n=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm83.13,96H179.56a144.3,144.3,0,0,0-21.35-66.36A84.22,84.22,0,0,1,211.13,116ZM128,207c-9.36-10.81-24.46-33.13-27.45-67h54.94a119.74,119.74,0,0,1-17.11,52.77A108.61,108.61,0,0,1,128,207Zm-27.45-91a119.74,119.74,0,0,1,17.11-52.77A108.61,108.61,0,0,1,128,49c9.36,10.81,24.46,33.13,27.45,67ZM97.79,49.64A144.3,144.3,0,0,0,76.44,116H44.87A84.22,84.22,0,0,1,97.79,49.64ZM44.87,140H76.44a144.3,144.3,0,0,0,21.35,66.36A84.22,84.22,0,0,1,44.87,140Zm113.34,66.36A144.3,144.3,0,0,0,179.56,140h31.57A84.22,84.22,0,0,1,158.21,206.36Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),t.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm87.62,96H175.79C174,83.49,159.94,57.67,148.41,42.4A88.19,88.19,0,0,1,215.63,120ZM96.23,136h63.54c-2.31,41.61-22.23,67.11-31.77,77C118.45,203.1,98.54,177.6,96.23,136Zm0-16C98.54,78.39,118.46,52.89,128,43c9.55,9.93,29.46,35.43,31.77,77Zm11.36-77.6C96.06,57.67,82,83.49,80.21,120H40.37A88.19,88.19,0,0,1,107.59,42.4ZM40.37,136H80.21c1.82,36.51,15.85,62.33,27.38,77.6A88.19,88.19,0,0,1,40.37,136Zm108,77.6c11.53-15.27,25.56-41.09,27.38-77.6h39.84A88.19,88.19,0,0,1,148.41,213.6Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm87.62,96H175.79C174,83.49,159.94,57.67,148.41,42.4A88.19,88.19,0,0,1,215.63,120ZM96.23,136h63.54c-2.31,41.61-22.23,67.11-31.77,77C118.45,203.1,98.54,177.6,96.23,136Zm0-16C98.54,78.39,118.46,52.89,128,43c9.55,9.93,29.46,35.43,31.77,77Zm52.18,93.6c11.53-15.27,25.56-41.09,27.38-77.6h39.84A88.19,88.19,0,0,1,148.41,213.6Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm89.8,96H173.89c-1.54-40.77-18.48-68.23-30.43-82.67A90.19,90.19,0,0,1,217.8,122ZM128,215.83a110,110,0,0,1-15.19-19.45A128.37,128.37,0,0,1,94.13,134h67.74a128.37,128.37,0,0,1-18.68,62.38A110,110,0,0,1,128,215.83ZM94.13,122a128.37,128.37,0,0,1,18.68-62.38A110,110,0,0,1,128,40.17a110,110,0,0,1,15.19,19.45A128.37,128.37,0,0,1,161.87,122Zm18.41-82.67c-12,14.44-28.89,41.9-30.43,82.67H38.2A90.19,90.19,0,0,1,112.54,39.33ZM38.2,134H82.11c1.54,40.77,18.48,68.23,30.43,82.67A90.19,90.19,0,0,1,38.2,134Zm105.26,82.67c11.95-14.44,28.89-41.9,30.43-82.67H217.8A90.19,90.19,0,0,1,143.46,216.67Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm87.62,96H175.79C174,83.49,159.94,57.67,148.41,42.4A88.19,88.19,0,0,1,215.63,120ZM96.23,136h63.54c-2.31,41.61-22.23,67.11-31.77,77C118.45,203.1,98.54,177.6,96.23,136Zm0-16C98.54,78.39,118.46,52.89,128,43c9.55,9.93,29.46,35.43,31.77,77Zm11.36-77.6C96.06,57.67,82,83.49,8
20.21,120H40.37A88.19,88.19,0,0,1,107.59,42.4ZM40.37,136H80.21c1.82,36.51,15.85,62.33,27.38,77.6A88.19,88.19,0,0,1,40.37,136Zm108,77.6c11.53-15.27,25.56-41.09,27.38-77.6h39.84A88.19,88.19,0,0,1,148.41,213.6Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm91.9,96h-48c-1.15-45.55-21.74-74.52-33.48-87.4A92.14,92.14,0,0,1,219.91,124ZM128,218.61c-8.32-8-34.57-37.13-35.93-86.61h71.86C162.57,181.48,136.32,210.61,128,218.61ZM92.07,124C93.43,74.52,119.68,45.39,128,37.39c8.32,8,34.57,37.13,35.93,86.61Zm25.47-87.4C105.8,49.48,85.21,78.45,84.06,124h-48A92.14,92.14,0,0,1,117.54,36.6ZM36.09,132h48c1.15,45.55,21.74,74.52,33.48,87.4A92.14,92.14,0,0,1,36.09,132Zm102.37,87.4c11.74-12.88,32.33-41.85,33.48-87.4h48A92.14,92.14,0,0,1,138.46,219.4Z"}))]]),r=t.forwardRef((e,r)=>t.createElement(i.default,{ref:r,...e,weights:n}));r.displayName="GlobeSimpleIcon",e.s(["GlobeSimple",()=>r],850277)},978890,e=>{"use strict";var t=e.i(271645);let i=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),t.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]);e.s(["default",()=>i])},305376,e=>{"use strict";var t=e.i(271645),i=e.i(769464),n=e.i(978890);let r=t.forwardRef((e,r)=>t.createElement(i.default,{ref:r,...e,weights:n.default}));r.displayName="LockSimpleIcon",e.s(["LockSimple",()=>r])},278953,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(174080),r=e.i(88653),a=e.i(846932),s=e.i(947414);class o{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(i=>{i.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}}let l=()=>new o;var d=e.i(30747),c=e.i(782968);function u(e){let t=window.visualViewport;return t?(t.addEventListener("resize",e),t.addEventListener("scroll",e),()=>{t.removeEventListener("resize",e),t.removeEventListener("scroll",e)}):()=>{}}function h(){let e=window.visualViewport;if(!e)return`0:${window.innerHeight}`;let{inset:t,visibleHeight:i}=function(e){let{innerHeight:t,vvHeight:i,vvOffsetTop:n,vvScale:r}=e;return r>1.01?{inset:0,visibleHeight:t}:{inset:Math.max(0,Math.round(t-(n+i))),visibleHeight:Math.round(i)}}({innerHeight:window.innerHeight,vvHeight:e.height,vvOffsetTop:e.offsetTop,vvScale:e.scale});return`${t}:${i}`}let p=()=>()=>{},f=()=>"0:0";var m=e.i(962507);let v={duration:.2,ease:[.4,0,1,1]},g={duration:.2,ease:"easeOut"};function b({offsetY:e,velocityY:t}){return e>96||t>500}function y({open:e,onOpenChange:a,header:s,footer:o,children:l,initialFocus:d,liftAboveKeyboard:c=!1,...u}){let h=(0,m.useIsClient)(),p=(0,i.useRef)(null);return((0,i.useLayoutEffect)(()=>{e&&(p.current=document.activeElement)},[e]),(0,i.useEffect)(()=>{let t,i,n;if(!e)return;let r=(t=document.documentElement,i=window.innerWidth-t.clientWidth,n={overflow:t.style.overflow,paddingRight:t.style.paddingRight},t.style.overflow="hidden",i>0&&(t.style.paddingRight=`${i}px`),()=>{t.style.overflow=n.overflow,t.style.paddingRight=n.paddingRight});return()=>{r(),p.current?.focus({preventScroll:!0}),p.current=null}},[e]),h)?(0,n.createPortal)((0,t.jsx)(r.AnimatePresence,{children:e&&(0,t.jsx)(x,{onClose:()=>a(!1),header:s,footer:o,initialFocus:d,liftAboveKeyboard:c,label:u,children:l},"bottom-sheet")}),document.body):null}function x({onClose:e,header:n,footer:r,initialFocus:o,liftAboveKeyboard:m,label:y,children:x}){let{prefersReduced:w,safeTransition:S}=(0,d.useMotionSafe)(),C=(0,s.useConstant)(l),A=(0,i.useRef)(null),k=function(e){let[t,n]=(0,i.useSyncExternalStore)(e?u:p,e?h:f,f).split(":").map(Number);return{inset:t,visibleHeight:n}}(m),j=m&&k.inset>=80;function P(e){e.target.closest("button, a[href], input, select, textarea, [role='button'], [contenteditable='true']")||("mouse"===e.pointerType&&e.preventDefault(),C.start(e))}(0,c.useFocusTrap)(A,!0),(0,i.useEffect)(()=>{(o?.current??A.current)?.focus({preventScroll:!0})}
2,[o]),(0,i.useEffect)(()=>{function t(t){"Escape"!==t.key||t.defaultPrevented||(t.preventDefault(),e())}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]);let D=w?{initial:{opacity:0},animate:{opacity:1,transition:S(g)},exit:{opacity:0,transition:S(v)}}:{initial:{y:"100%"},animate:{y:0,transition:d.springs.crisp},exit:{y:"100%",transition:v}};return(0,t.jsxs)("div",{className:"fixed inset-0 z-[60]",children:[(0,t.jsx)(a.motion.div,{"data-sheet-backdrop":"","aria-hidden":"true",className:"absolute inset-0 bg-[var(--color-ink)]/40",initial:{opacity:0},animate:{opacity:1,transition:S(g)},exit:{opacity:0,transition:S(v)},onClick:e}),(0,t.jsxs)(a.motion.div,{ref:A,role:"dialog","aria-modal":"true",tabIndex:-1,...y,...D,drag:"y",dragListener:!1,dragControls:C,dragConstraints:{top:0,bottom:0},dragElastic:{top:0,bottom:1},dragMomentum:!1,onDragEnd:function(t,i){b({offsetY:i.offset.y,velocityY:i.velocity.y})&&e()},style:j?{bottom:k.inset,maxHeight:k.visibleHeight-16,paddingBottom:0}:void 0,className:"absolute inset-x-0 bottom-0 flex max-h-[85dvh] flex-col rounded-t-2xl bg-background text-foreground ring-1 ring-foreground/10 outline-none pb-[env(safe-area-inset-bottom)]",children:[(0,t.jsx)("div",{"data-sheet-handle":"","data-sheet-drag-zone":"",onPointerDown:P,className:"flex h-6 shrink-0 cursor-grab touch-none select-none items-center justify-center active:cursor-grabbing",children:(0,t.jsx)("span",{"aria-hidden":"true",className:"h-1 w-9 rounded-full bg-foreground
2/20"})}),null!=n&&(0,t.jsx)("div",{"data-sheet-header":"","data-sheet-drag-zone":"",onPointerDown:P,className:"shrink-0 touch-none",children:n}),(0,t.jsx)("div",{"data-sheet-body":"",className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:x}),null!=r&&(0,t.jsx)("div",{"data-sheet-footer":"",className:"shrink-0",children:r})]})]})}e.s(["BottomSheet",()=>y,"shouldDismissSheet",()=>b],278953)},257428,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(201796),r=e.i(769464);let a=new Map([["bold",i.createElement(i.Fragment,null,i.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"}))],["duotone",i.createElement(i.Fragment,null,i.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),i.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["fill",i.createElement(i.Fragment,null,i.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z"}))],["light",i.createElement(i.Fragment,null,i.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z"}))],["regular",i.createElement(i.Fragment,null,i.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["thin",i.createElement(i.Fragment,null,i.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z"}))]]),s=i.forwardRef((e,t)=>i.createElement(r.default,{ref:t,...e,weights:a}));function o({checked:e,defaultChecked:r,onCheckedChange:a,indeterminate:o=!1,disabled:l=!1,pending:d=!1,label:c,hideLabel:u=!1,name:h,value:p,id:f,className:m=""}){let v=i.useRef(null);i.useEffect(()=>{v.current&&(v.current.indeterminate=o)},[o]);let g=void 0!==e;return(0,t.jsxs)("label",{className:["group/checkbox inline-flex items-center gap-2",l?"cursor-not-allowed opacity-40":"cursor-pointer",m].join(" "),children:[(0,t.jsx)("input",{ref:v,id:f,type:"checkbox",name:h,value:p,disabled:l,...g?{checked:e}:{defaultChecked:r},onChange:e=>a?.(e.target.checked),className:"peer sr-only"}),(0,t.jsx)("span",{"aria-hidden":"true",className:["inline-flex size-4 shrink-0 items-center justify-center rounded-sm border text-foreground-inverted transition-[background-color,border-color,opacity] duration-150 ease-out motion-reduce:transition-none border-foreground
2/30 bg-transparent group-hover/checkbox:border-foreground/60 peer-checked:border-foreground peer-checked:bg-foreground peer-indeterminate:border-foreground peer-indeterminate:bg-foreground peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--text)] peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-[var(--background)]",d?"opacity-50":"opacity-100"].join(" "),children:o?(0,t.jsx)(s,{size:11,weight:"bold"}):(0,t.jsx)(n.Check,{size:11,weight:"bold",className:"scale-50 opacity-0 transition-[opacity,transform] duration-150 ease-out group-has-[:checked]/checkbox:scale-100 group-has-[:checked]/checkbox:opacity-100 motion-reduce:transition-none"})}),(0,t.jsx)("span",{className:u?"sr-only":"font-sans text-sm text-foreground",children:c})]})}function l({checked:e,pending:i=!1}){return(0,t.jsx)("span",{"aria-hidden":"true",className:["inline-flex size-4 shrink-0 items-center justify-center rounded-sm border text-foreground-inverted transition-[background-color,border-color,opacity] duration-150 ease-out motion-reduce:transition-none",e?"border-foreground bg-foreground":"border-foreground
2/30 bg-transparent group-hover/checkbox:border-foreground/60",i?"opacity-50":"opacity-100"].join(" "),children:(0,t.jsx)(n.Check,{size:11,weight:"bold",className:["transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none",e?"scale-100 opacity-100":"scale-50 opacity-0"].join(" ")})})}s.displayName="MinusIcon",e.s(["Checkbox",()=>o,"CheckboxMark",()=>l],257428)},106344,767994,e=>{"use strict";var t=e.i(843476),i=e.i(271645);let n="M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z",r=(()=>{let e=6,t=30,i=241,n=135.5,r=Math.max(2,Math.round(20)),a=244/(r-1),s="";for(let o=0;o<r;o++){let r=e+o*a,l=o%2==0,d=l?t:i,c=l?i:t,u=l?10:-10;s+=(0===o?`M${r.toFixed(1)} ${d.toFixed(1)}`:`L${r.toFixed(1)} ${d.toFixed(1)}`)+`Q${(r+u).toFixed(1)} ${n.toFixed(1)} ${r.toFixed(1)} ${c.toFixed(1)}`}return s})();function a({size:e=18,className:a=""}){let s=(0,i.useId)();return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"-22.5 -15 301 301",fill:"none","aria-hidden":"true",className:`sketch-heart ${a}`,"data-mode":"clip",children:[(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:s,children:(0,t.jsx)("path",{d:n})})}),(0,t.jsx)("path",{d:n,className:"sketch-heart-solid"}),(0,t.jsx)("path",{d:r,pathLength:1,className:"sketch-heart-scribble",clipPath:`url(#${s})`}),(0,t.jsx)("path",{d:n,className:"sketch-heart-outline"})]})}e.s(["SketchHeart",()=>a],106344);var s=e.i(266027),o=e.i(333815),l=e.i(909578);async function d(e){let t=(0,o.createClient)(),{data:i,error:n}=await t.from("collection_illustrations").select("illustration_id, collections!inner(user_id, is_default)").eq("collections.user_id",e).eq("collections.is_default",!0);if(n)throw n;return new Set((i??[]).map(e=>e.illustration_id))}function c(e){return u(e)??!1}function u(e){var t;let{user:i,isAuthenticated:n}=(0,l.useUser)(),{data:r}=(0,s.useQuery)({...{queryKey:["saves",t=i?.id??null],queryFn:()=>d(t),enabled:n&&!!t,staleTime:1/0,gcTime:18e5},select:t=>t.has(e)});return r??null}e.s(["useIsSaved",()=>c,"useSavedStatus",()=>u],767994)},709787,e=>{"use strict";var t=e.i(333815),i=e.i(902800);async function n(e){let n=(0,t.createClient)(),{data:r,error:a}=await n.rpc("get_or_create_default_collection");if(a||!r)throw a??Error("saveIllustration: no collection id");let{error:s}=await n.from("collection_illustrations").insert({collection_id:r,illustration_id:e});if(s&&!(0,i.isUniqueViolation)(s))throw s;return r}async function r(e,i,n){let r=(0,t.createClient)(),a=n??(await r.from("collections").select("id").eq("user_id",i).eq("is_default",!0).maybeSingle()).data?.id;if(!a)return;let{error:s}=await r.from("collection_illustrations").delete().eq("collection_id",a).eq("illustration_id",e);if(s)throw s}e.s(["saveIllustration",()=>n,"unsaveIllustration",()=>r])},79474,e=>{"use strict";var t=e.i(271645),i=e.i(954616),n=e.i(912598),r=e.i(909578),a=e.i(324522),s=e.i(709787),o=e.i(724143);function l(){let e=(0,n.useQueryClient)(),{user:l}=(0,r.useUser)(),{track:d}=(0,a.useAnalytics)(),c=l?.id??null,u=(0,t.useRef)(void 0);return(0,i.useMutation)({mutationFn:async({illustrationId:e,intent:t})=>{if("save"===t){let t=await (0,s.saveIllustration)(e);return u.current=t,t}await (0,s.unsaveIllustration)(e,c,u.current)},onMutate:async({illustrationId:t,intent:i,isUndo:n})=>{await e.cancelQueries({queryKey:["saves",c]}),await e.cancelQueries({queryKey:["saved-list",c]});let r=e.getQueryData(["saves",c]),a=!n&&"save"===i&&void 0!==r&&0===r.size;e.setQueryData(["saves",c],e=>(0,o.toggleSavedSet)(e??new Set,t,i));let s=e.getQueryData(["saved-list",c]);return s&&e.setQueryData(["saved-list",c],(0,o.optimisticListToggle)(s,t,i)),{prev:r,prevList:s,isFirstSave:a}},onSuccess:(e,{illustrationId:t,intent:i,context:n},r)=>{"save"===i&&(d("Illustration Saved",{illustration_id:t,context:n}),r?.isFirstSave&&d("First Save",{context:n}))},onError:(t,i,n)=>{n?.prev&&e.setQueryData(["saves",c],n.prev),n?.prevList&&e.setQueryData(["saved-list",c],n.prevList)}})}e.s(["useSaveIllustration",()=>l])},513032,e=>{"use strict";var t=e.i(843476),i=e.i(171123);function n({value:e,onValueChange:n,options:r,label:a,variant:s="default",size:o="md",fullWidth:l=!1,bordered:d=!1,className:c=""}){let u="inverse"===s,h="lg"===o;return(0,t.jsxs)(i.SegmentGroup.Root,{value:e,onValueChange:e=>{e.value&&n(e.value)},"aria-label":a,className:["relative items-center rounded-md border p-0.5",l?"flex w-full":"inline-flex",h?"h-9":"h-7",d?"border-foreground":u?"border-snow/30":"border-foreground
2/15",c].join(" "),children:[(0,t.jsx)(i.SegmentGroup.Indicator,{className:["absolute transition-[left,width] duration-200 motion-reduce:transition-none",d?"rounded-[3px]":"rounded-sm","motion-reduce:[--transition-duration:0s]",d?"bg-foreground":u?"bg-snow/15":"bg-foreground/10"].filter(Boolean).join(" "),style:{left:"var(--left)",width:"var(--width)",top:"var(--top)",height:"var(--height)"}}),r.map(e=>(0,t.jsxs)(i.SegmentGroup.Item,{value:e.value,className:["relative z-[1] flex cursor-pointer items-center gap-1",h?"h-8 px-3 text-[12px]":"h-6 px-2 text-[11px]",l?"flex-1 justify-center":"","font-mono uppercase tracking-[0.08em] transition-colors duration-200",u?"text-snow/60 data-[state=checked]:text-snow hover:text-snow":"text-dimmed hover:text-foreground",!u&&(d?"data-[state=checked]:text-background data-[state=checked]:hover:text-background":"data-[state=checked]:text-foreground"),"data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2",u?"data-[focus-visible]:outline-snow":"data-[focus-visible]:outline-[var(--text)]",d&&"data-[focus-visible]:data-[state=checked]:outline-background"].filter(
2Boolean).join(" "),children:[e.icon,(0,t.jsx)(i.SegmentGroup.ItemText,{children:e.label}),(0,t.jsx)(i.SegmentGroup.ItemControl,{}),(0,t.jsx)(i.SegmentGroup.ItemHiddenInput,{})]},e.value))]})}e.s(["SegmentGroup",()=>n])},4197,e=>{"use strict";let t={dense:{button:"small",segment:"md",header:"gap-2 px-3 pb-2 pt-3",title:"text-[13px]",field:"h-8 text-[13px]",row:"h-9 px-3 text-[13px]",inset:"px-3",message:"px-3 text-[13px]",line:"text-xs",footer:"px-3 py-2",form:"px-3 py-3",tap:"",done:"min-w-16",cancel:"px-2 py-1.5"},roomy:{button:"default",segment:"lg",header:"gap-3 px-4 pb-3 pt-1",title:"text-base",field:"h-11 text-base",row:"min-h-12 px-4 text-[15px]",inset:"px-4",message:"px-4 text-[15px]",line:"text-sm",footer:"px-4 py-3",form:"px-4 py-3",tap:"min-h-11",done:"min-h-11 min-w-24",cancel:"min-h-11 px-3"}};function i(e){return t[e?"dense":"roomy"]}e.s(["PICKER_DISABLED_CLASS",0,"disabled:cursor-default disabled:opacity-40","PICKER_FIELD_CLASS",0,"w-full rounded-sm border border-foreground/15 bg-transparent text-foreground placeholder:text-dimmed focus-visible:border-foreground
2/40 focus-visible:outline-none","pickerDensity",()=>i])},520759,687178,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(201796),r=e.i(356530),a=e.i(787311),s=e.i(411003),o=e.i(993855),l=e.i(337822),d=e.i(403620),c=e.i(461713),u=e.i(783036),h=e.i(909578),p=e.i(366777),f=e.i(576036),m=e.i(724143),v=e.i(12616),g=e.i(174080),b=e.i(850277),y=e.i(305376),x=e.i(525209),w=e.i(324522),S=e.i(278953),C=e.i(519455),A=e.i(257428),k=e.i(106344),j=e.i(377855),P=e.i(386909),D=e.i(508418),E=e.i(833152),_=e.i(767994),N=e.i(79474),O=e.i(846932),R=e.i(513032),I=e.i(425660),M=e.i(30747),L=e.i(4197);function $({surface:e,illustrationId:n,chrome:r="footer",dense:a,nameInputRef:s,onCancel:o,onCreated:l,onFileFailed:d,onBusyChange:c}){let{safeTransition:u}=(0,M.useMotionSafe)(),h=(0,p.useCreateBoard)(),{track:m}=(0,w.useAnalytics)(),[v,g]=(0,i.useState)(""),[x,S]=(0,i.useState)("public"),A=(0,i.useId)(),k=(0,i.useId)(),P=h.isPending,E=v.trim(),_=D.BOARD_NAME_MAX-v.length,N=_<=10;async function $(){if(E&&!P){c(!0);try{let t=await h.mutateAsync({name:E,visibility:x,illustrationId:n});m("Board Created",{visibility:x,surface:e}),n&&m("Piece Filed",{kind:"illustration",surface:e,visibility:x,just_created:!0}),l(t)}catch(i){let t=i instanceof p.CreateBoardError?i:null;if(t?.stage==="file"){m("Board Created",{visibility:x,surface:e}),(0,j.notify)({title:f.BOARDS_COPY.picker.failed.toast,type:"error"}),t.board&&d?d(t.board.id):o();return}(0,j.notify)({title:t?.kind==="cap"?f.BOARDS_COPY.caps.boardCapToast(D.BOARD_CAP):f.BOARDS_COPY.create.failedToast,type:"error"}),s.current?.focus()}finally{c(!1)}}}let T=(0,L.pickerDensity)(a);return(0,t.jsxs)(O.motion.form,{initial:{opacity:0,y:4},animate:{opacity:1,y:0,transition:u(M.springs.crisp)},"aria-busy":P||void 0,onKeyDown:function(e){"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),P||o())},onSubmit:e=>{e.preventDefault(),$()},className:"footer"===r?`flex flex-col gap-2.5 border-t border-foreground
2/10 ${T.form}`:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("label",{htmlFor:A,className:"sr-only",children:f.BOARDS_COPY.create.nameLabel}),(0,t.jsx)("input",{ref:s,id:A,type:"text",value:v,onChange:e=>g(e.target.value),readOnly:P,placeholder:f.BOARDS_COPY.create.namePlaceholder,maxLength:D.BOARD_NAME_MAX,autoComplete:"off",autoCapitalize:"sentences",spellCheck:!1,enterKeyHint:"done","data-1p-ignore":!0,"aria-describedby":N?k:void 0,className:`${L.PICKER_FIELD_CLASS} px-2.5 ${T.field}`}),N&&(0,t.jsx)("p",{id:k,"aria-live":"polite",className:`text-right font-mono tabular-nums text-dimmed ${T.line}`,children:f.BOARDS_COPY.create.remaining(_)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(R.SegmentGroup,{value:x,onValueChange:e=>{P||"public"!==e&&"private"!==e||S(e)},label:f.BOARDS_COPY.visibility.groupLabel,options:[{value:"public",label:f.BOARDS_COPY.visibility.public,icon:(0,t.jsx)(b.GlobeSimple,{size:12,weight:"bold","aria-hidden":"true"})},{value:"private",label:f.BOARDS_COPY.visibility.private,icon:(0,t.jsx)(y.LockSimple,{size:12,weight:"bold","aria-hidden":"true"})}],size:T.segment,fullWidth:!0}),(0,t.jsx)("p",{"aria-live":"polite",className:`text-dimmed ${T.line}`,children:"public"===x?f.BOARDS_COPY.visibility.publicLine(D.QUALITY_FLOOR):f.BOARDS_COPY.visibility.privateLine})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsx)(C.Button,{type:"button",variant:"text",size:T.button,onClick:o,disabled:P,className:`${L.PICKER_DISABLED_CLASS} ${T.cancel}`,children:I.SHARED_COPY.dialogChrome.cancel}),(0,t.jsx)(C.Button,{type:"submit",variant:"primary",size:T.button,disabled:!E,"aria-disabled":P||void 0,className:`${L.PICKER_DISABLED_CLASS} aria-disabled:cursor-default ${T.tap}`,children:(0,t.jsxs)("span",{className:"grid",children:[(0,t.jsx)("span",{className:`col-start-1 row-start-1 ${P?"invisible":""}`,children:f.BOARDS_COPY.create.submit}),(0,t.jsx)("span",{className:`col-start-1 row-start-1 ${P?"":"invisible"}`,"aria-hidden":!P,children:f.BOARDS_COPY.create.submitting})]})})]})]})}e.s(["CreateBoardForm",()=>$],687178);let T="saved";function B(e){let t=(0,E.orderForPicker)(e);return{public:t.public.map(e=>e.id),private:t.private.map(e=>e.id)}}function H(e,t){return new Set(e).add(t)}function F(e,t){let i=new Set(e);return i.delete(t),i}function V({illustrationId:e,context:t,onDone:n,onBusyChange:r,savedRowRef:a,footerRef:s,nameInputRef:o}){var l;let c,u,h,v,b=(0,p.useBoardMemberships)({enabled:!0}),y=b.data,x=(0,p.useToggleBoardMembership)(),{track:S}=(0,w.useAnalytics)(),C=(0,_.useIsSaved)(e),A=(0,N.useSaveIllustration)(),k=(0,d.useAccountProfileQuery)(),O=k.data?.status===P.USER_STATUS.SUSPENDED,R="detail"===t?"page":"tile",[I,M]=(0,i.useState)(""),[L,$]=(0,i.useState)(!1),[V,Y]=(0,i.useState)(T),[Z,z]=(0,i.useState)(()=>new Set),[U,K]=(0,i.useState)(()=>new Set),[q,Q]=(0,i.useState)(()=>y?B(y):null);null===q&&y&&Q(B(y));let G=(0,i.useRef)(new Map),W=(0,i.useRef)(null),X=(0,i.useRef)(new Set),J=(0,i.useId)(),ee=(0,i.useId)(),et=(0,i.useId)();(0,i.useEffect)(()=>{let e=X.current;return()=>e.forEach(e=>window.clearTimeout(e))},[]);let ei=(0,i.useCallback)(e=>{K(t=>H(t,e));let t=window.setTimeout(()=>{X.current.delete(t),K(t=>F(t,e))},1800);X.current.add(t)},[]),en=y??[],er=(c=new Set([...(l=q??{public:[],private:[]}).public,...l.private]),u=(0,E.orderForPicker)(en.filter(e=>!c.has(e.id))),h=new Map(en.map(e=>[e.id,e])),{public:(v=e=>[...u[e],...l[e].flatMap(t=>{let i=h.get(t);return i&&i.visibility===e?[i]:[]})])("public"),private:v("private")}),ea=I.trim().toLowerCase(),es=e=>!ea||e.name.toLowerCase().includes(ea),eo={public:er.public.filter(es),private:er.private.filter(es)},el=t=>{let i=t.itemIds.has(e);return{kind:"board",id:t.id,board:t,checked:i,busy:Z.has(t.id),note:U.has(t.id),blocked:!i&&(0,E.isBoardFull)(t)}},ed={kind:"saved",id:T,checked:C,busy:A.isPending,note:U.has(T),blocked:!1},ec=eo.public.map(el),eu=eo.private.map(el),eh=[ed,...ec,...eu],ep=en.length+1>D.BOARD_CAP,ef=en.length>=D.BOARD_CAP,em=!y&&b.isPending,ev=!y&&b.isError,eg=!!y&&!ef,eb=ea&&ec.length+eu.length===0?f.BOARDS_COPY.picker.noMatch(I.trim()):null,ey=eh.some(e=>e.id===V)?V:T;async function ex(){if(!A.isPending)try{await A.mutateAsync({illustrationId:e,intent:C?"unsave":"save",context:t})}catch{ei(T),(0,j.notify)({title:(0,m.getSaveFailureToastTitle)(O),type:"error"})}}async function ew(t){if(Z.has(t.id))return;let i=t.itemIds.has(e);if(!(!i&&(0,E.isBoardFull)(t))){z(e=>H(e,t.id));try{await x.mutateAsync({boardId:t.id,illustrationId:e,intent:i?"unfile":"file"}),S(i?"Piece Unfiled":"Piece Filed",{kind:"illustration",surface:R,visibility:t.visibility,...i?{}:{just_created:!1}})}catch(e){ei(t.id),(0,j.notify)({title:"full"===(0,E.classifyBoardError)(e)?f.BOARDS_COPY.caps.boardFullToast(D.BOARD_ITEM_CAP):f.BOARDS_COPY.picker.failed.toast,type:"error"})}finally{z(e=>F(e,t.id))}}}function eS(e){"saved"===e.kind?ex():e.blocked||ew(e.board)}function eC(e){e&&G.current.get(e)?.focus()}return(0,i.useEffect)(()=>{let e=W.current;if(!e||L)return;let t=G.current.get(e)??G.current.get(T);t&&(W.current=null,t.focus({preventScroll:!0}),t.scrollIntoView?.({block:"nearest"}))}),{illustrationId:e,surface:R,onDone:n,titleId:ee,listId:et,searchId:J,query:I,setQuery:M,showSearch:ep,noMatch:eb,loading:em,loadFailed:ev,savedRow:ed,publicRows:ec,privateRows:eu,rovingId:ey,setActiveId:Y,registerRow:function(e,t){t?G.current.set(e,t):G.current.delete(e),e===T&&(a.current=t)},toggleRow:eS,onListKeyDown:function(e){let t=eh.findIndex(e=>e.id===ey),i=t=>{e.preventDefault(),eC(eh[Math.max(0,Math.min(eh.length-1,t))]?.id)};switch(e.key){case"ArrowDown":return i(t+1);case"ArrowUp":if(t<=0&&ep){e.preventDefault(),document.getElementById(J)?.focus();return}return i(t-1);case"Home":return i(0);case"End":return i(eh.length-1);case" ":case"Enter":{e.preventDefault();let t=eh.find(e=>e.id===ey);t&&eS(t);return}}},onSearchKeyDown:function(e){if("ArrowDown"===e.key)e.preventDefault(),eC(eh[0]?.id);else if("Enter"===e.key){e.preventDefault();let t=[...ec,...eu][0];if(!ea||!t||"board"!==t.kind)return;t.checked||t.blocked||ew(t.board),Y(t.id),eC(t.id)}},creating:L,openCreate:function(){(0,g.flushSync)(()=>$(!0));let e=o.current;e&&(e.focus({preventScroll:!0}),e.setSelectionRange(e.value.length,e.value.length))},cancelCreate:function(){(0,g.flushSync)(()=>$(!1)),s.current?.querySelector("[data-new-board]")?.focus()},landOnNewBoard:function(e){W.current=e,M(""),$(!1),Y(e)},flagNote:ei,onBusyChange:r,atCap:ef,canCreate:eg}}let Y="font-mono text-[10px] uppercase tracking-[0.08em] text-dimmed";function Z(e){"Escape"!==e.key&&"Tab"!==e.key&&e.nativeEvent.stopImmediatePropagation()}function z({picker:e,dense:i}){let n=(0,L.pickerDensity)(i);return(0,t.jsxs)("div",{onKeyDown:Z,className:`flex flex-col ${n.header}`,children:[(0,t.jsx)("h2",{id:e.titleId,className:`select-none font-medium text-foreground ${n.title}`,children:f.BOARDS_COPY.picker.title}),e.showSearch&&(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("label",{htmlFor:e.searchId,className:"sr-only",children:f.BOARDS_COPY.picker.searchLabel}),(0,t.jsx)(x.MagnifyingGlass,{size:14,"aria-hidden":"true",className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-dimmed"}),(0,t.jsx)("input",{id:e.searchId,type:"search",value:e.query,onChange:t=>e.setQuery(t.target.value),onKeyDown:e.onSearchKeyDown,placeholder:f.BOARDS_COPY.picker.searchLabel,autoComplete:"off",spellCheck:!1,"data-1p-ignore":!0,"aria-controls":e.listId,className:[L.PICKER_FIELD_CLASS,"pl-8 pr-2.5 [&::-webkit-search-cancel-button]:appearance-none",n.field].join(" ")})]})]})}function U({picker:e,row:i,dense:n,className:r="",dataSaved:a,children:s}
2){let o=i.blocked?"":i.checked?"bg-foreground/[0.07] hover:bg-foreground/[0.1]":"hover:bg-foreground/[0.04]";return(0,t.jsx)("div",{ref:t=>e.registerRow(i.id,t),role:"option","aria-selected":i.checked,"aria-disabled":i.blocked||void 0,"aria-busy":i.busy||void 0,"data-saved":a,tabIndex:e.rovingId===i.id?0:-1,onFocus:()=>e.setActiveId(i.id),onClick:()=>e.toggleRow(i),className:["group/checkbox relative flex select-none items-center gap-2.5 outline-none touch-manipulation focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[var(--text)] transition-[background-color] duration-150 ease-out motion-reduce:transition-none scroll-mt-7",(0,L.pickerDensity)(n).row,i.blocked?"cursor-default opacity-40":"cursor-pointer",o,r].join(" "),children:s})}function K(){return(0,t.jsx)("span",{className:`${Y} !text-foreground`,children:f.BOARDS_COPY.picker.failed.rowNote})}function q({picker:e,dense:i}){let n=e.savedRow;return(0,t.jsxs)(U,{picker:e,row:n,dense:i,dataSaved:n.checked,className:"save-heart-host border-b border-foreground
2/10",children:[(0,t.jsx)(A.CheckboxMark,{checked:n.checked,pending:n.busy}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-foreground",children:[(0,t.jsx)("span",{className:"truncate",children:f.BOARDS_COPY.picker.groups.saved}),(0,t.jsx)(k.SketchHeart,{size:12,className:"shrink-0 text-dimmed"})]}),n.note?(0,t.jsx)(K,{}):(0,t.jsxs)("span",{className:`flex items-center gap-1 ${Y}`,children:[(0,t.jsx)(y.LockSimple,{size:10,weight:"bold","aria-hidden":"true"}),f.BOARDS_COPY.visibility.private]})]})}function Q({picker:e,row:i,dense:n}){let r=i.board.itemIds.size;return(0,t.jsxs)(U,{picker:e,row:i,dense:n,children:[(0,t.jsx)(A.CheckboxMark,{checked:i.checked,pending:i.busy}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",title:i.board.name.length>36?i.board.name:void 0,children:i.board.name}),i.note?(0,t.jsx)(K,{}):(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] tabular-nums text-dimmed",children:i.blocked?f.BOARDS_COPY.caps.fullRow(D.BOARD_ITEM_CAP):f.BOARDS_COPY.picker.groups.count(r)})]})}function G({id:e,visibility:i,dense:n}){let r="private"===i?y.LockSimple:b.GlobeSimple;return(0,t.jsxs)("div",{id:e,role:"presentation",className:`sticky top-0 z-[1] flex h-7 items-center gap-1.5 border-b border-foreground
2/10 bg-background ${(0,L.pickerDensity)(n).inset} ${Y}`,children:[(0,t.jsx)(r,{size:10,weight:"bold","aria-hidden":"true"}),"private"===i?f.BOARDS_COPY.picker.groups.privateHead:f.BOARDS_COPY.picker.groups.publicHead]})}function W({picker:e,dense:i,className:n=""}){let r=`${e.listId}-public`,a=`${e.listId}-private`,s=e.noMatch??(e.loadFailed?f.BOARDS_COPY.picker.loadFailed:null);return(0,t.jsxs)("div",{className:`border-t border-foreground/10 ${n}`,children:[(0,t.jsxs)("div",{id:e.listId,role:"listbox","aria-multiselectable":"true","aria-labelledby":e.titleId,"aria-busy":e.loading||void 0,onKeyDown:t=>{Z(t),e.onListKeyDown(t)},children:[(0,t.jsx)(q,{picker:e,dense:i}),e.publicRows.length>0&&(0,t.jsxs)("div",{role:"group","aria-labelledby":r,children:[(0,t.jsx)(G,{id:r,visibility:"public",dense:i}),e.publicRows.map(n=>"board"===n.kind?(0,t.jsx)(Q,{picker:e,row:n,dense:i},n.id):null)]}),e.privateRows.length>0&&(0,t.jsxs)("div",{role:"group","aria-labelledby":a,children:[(0,t.jsx)(G,{id:a,visibility:"private",dense:i}),e.privateRows.map(n=>"board"===n.kind?(0,t.jsx)(Q,{picker:e,row:n,dense:i},n.id):null)]})]}),(0,t.jsx)("p",{role:"status",className:s?`py-4 text-dimmed ${(0,L.pickerDensity)(i).message}`:void 0,children:s})]})}function X({picker:e,dense:i,footerRef:n,nameInputRef:a}){if(e.creating)return(0,t.jsx)("div",{onKeyDown:Z,children:(0,t.jsx)($,{surface:e.surface,illustrationId:e.illustrationId,dense:i,nameInputRef:a,onCancel:e.cancelCreate,onCreated:t=>e.landOnNewBoard(t.id),onFileFailed:t=>{e.landOnNewBoard(t),e.flagNote(t)},onBusyChange:e.onBusyChange})});let s=(0,L.pickerDensity)(i);return(0,t.jsxs)("div",{ref:n,className:`flex flex-col gap-2 border-t border-foreground
2/10 ${s.footer}`,children:[e.atCap&&(0,t.jsx)("p",{className:`text-dimmed ${s.line}`,children:f.BOARDS_COPY.caps.newBoardDisabled(D.BOARD_CAP)}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)(C.Button,{"data-new-board":"",type:"button",variant:"secondary",size:s.button,icon:(0,t.jsx)(r.Plus,{size:12,weight:"bold","aria-hidden":"true"}),onClick:e.openCreate,disabled:!e.canCreate,className:`${L.PICKER_DISABLED_CLASS} ${s.tap}`,children:f.BOARDS_COPY.picker.newBoard}),(0,t.jsx)(C.Button,{type:"button",variant:"primary",size:s.button,onClick:e.onDone,className:s.done,children:f.BOARDS_COPY.picker.done})]})]})}function J(e){let n=(0,i.useRef)(null),r=(0,i.useRef)(null),a=V({...e,footerRef:n,nameInputRef:r});return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsx)(z,{picker:a,dense:!0}),(0,t.jsx)(W,{picker:a,dense:!0,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain"}),(0,t.jsx)(X,{picker:a,dense:!0,footerRef:n,nameInputRef:r})]})}function ee({open:e,...n}){let r=(0,i.useRef)(null),a=(0,i.useRef)(null),s=V({...n,footerRef:r,nameInputRef:a});return(0,t.jsx)(S.BottomSheet,{open:e,onOpenChange:e=>{e||n.onDone()},"aria-label":f.BOARDS_COPY.picker.title,initialFocus:n.savedRowRef,liftAboveKeyboard:!0,header:(0,t.jsx)(z,{picker:s,dense:!1}),footer:(0,t.jsx)(X,{picker:s,dense:!1,footerRef:r,nameInputRef:a}),children:(0,t.jsx)(W,{picker:s,dense:!1})})}let et=[f.BOARDS_COPY.illustrationPage.button,f.BOARDS_COPY.illustrationPage.filed],ei="[grid-area:1/1] [transition:opacity_150ms_ease-out] motion-reduce:transition-none";function en(e){e.stopPropagation()}function er({names:e,suppressed:i,tipPlacement:n,describe:r,...a}){return(0,t.jsx)(v.BoardNamesTooltip,{names:e,suppressed:i,placement:n,describe:r,children:(0,t.jsx)("button",{...a})})}function ea({illustrationId:e,variant:v="icon",filed:g,className:b=""}){let y="labeled"===v?"detail":"grid",{user:x,isAuthenticated:w,loading:S}=(0,h.useUser)(),C=(0,d.useAccountProfileQuery)(),A=!!C.data?.emailVerifiedAt,k=S||w&&C.isLoading,j=(0,m.deriveSaveButtonState)({isLoading:k,isAuthenticated:w,isVerified:A,isSaved:!1}),P="unsaved"===j,D=(0,c.useIsDesktop)(),[E,_]=(0,i.useState)(!1),[N,O]=(0,i.useState)(0),[R,I]=(0,i.useState)("bottom-start"),[M,L]=(0,i.useState)(null),[$,T]=(0,i.useState)(!1),B=(0,i.useRef)(null),H=(0,i.useRef)(null),F=(0,i.useRef)(!1),V=(0,i.useRef)(!1),Y=(0,i.useRef)(!1),Z=(0,i.useCallback)(e=>{Y.current=e},[]),z=(0,i.useCallback)(()=>{let e=B.current?.getBoundingClientRect();I(e&&e.left+e.width/2>window.innerWidth/2?"bottom-end":"bottom-start"),O(e=>e+1),_(!0)},[]),U=(0,i.useCallback)(()=>{if("loading"!==j){if("signed-out"===j){T(!0),L("login");return}if("unverified"===j){T(!0),L("verify");return}z()}},[j,z]);(0,i.useLayoutEffect)(()=>{V.current&&!k&&w&&A&&(V.current=!1,z())},[k,w,A,z]);let K=(0,i.useRef)(U);(0,i.useEffect)(()=>{K.current=U},[U]),(0,i.useEffect)(()=>{let e=B.current;if("icon"===v&&e)return e.addEventListener("pointerdown",t),()=>e.removeEventListener("pointerdown",t);function t(e){D&&P&&"mouse"===e.pointerType&&0===e.button&&(F.current=!0,(0,u.releaseIfClickMisses)(e.currentTarget,()=>{F.current=!1}),K.current())}},[v,D,P]);let q=(0,i.useCallback)(e=>{B.current=e,e&&"icon"===v&&e.addEventListener("pointerdown",en)},[v]),Q={type:"button","aria-haspopup":"dialog",onPointerDown:e=>{D&&P||e.preventDefault()},onClick:e=>{if(F.current){F.current=!1,e.preventDefault();return}D||U()}},G=(0,p.useFiledBoards)(e),W=g??G.length>0,X=W?G:[],ea="labeled"===v?(0,t.jsxs)(er,{...Q,ref:q,names:X,suppressed:E,tipPlacement:"top","data-filed":W,className:`${o.ACTION_PILL_CLASS} ${b}`,children:[(0,t.jsxs)("span",{className:"inline-grid",style:{width:o.ACTION_PILL_ICON_SIZE,height:o.ACTION_PILL_ICON_SIZE},children:[(0,t.jsx)(r.Plus,{size:o.ACTION_PILL_ICON_SIZE,weight:"bold","aria-hidden":"true","data-pill-plus":!0,className:`${o.ACTION_PILL_ICON_CLASS} ${ei} ${W?"opacity-0":"opacity-100"}`}),(0,t.jsx)(n.Check,{size:o.ACTION_PILL_ICON_SIZE,weight:"bold","aria-hidden":"true","data-pill-check":!0,className:`${o.ACTION_PILL_ICON_CLASS} ${ei} ${W?"opacity-100":"opacity-0"}`})]}),(0,t.jsx)(o.PillLabelSizer,{labels:et,current:W?f.BOARDS_COPY.illustrationPage.filed:f.BOARDS_COPY.illustrationPage.button})]}):(0,t.jsx)(er,{...Q,ref:q,names:X,suppressed:E,tipPlacement:"top-end",describe:!1,"aria-label":X.length>0?f.BOARDS_COPY.filed.filedAria(X.length):f.BOARDS_COPY.filed.addAria,"data-filed":W,className:`save-btn-icon inline-flex items-center justify-center cursor-pointer touch-manipulation ${b}`,children:(0,t.jsx)("span",{className:"save-btn-visual",children:(0,t.jsxs)("span",{className:"inline-grid",style:{width:18,height:18},children:[(0,t.jsx)(r.Plus,{size:18,weight:"bold","aria-hidden":"true",className:`${ei} ${W?"opacity-0":"opacity-100"}`}),(0,t.jsx)(n.Check,{size:18,weight:"bold","aria-hidden":"true","data-tile-check":!0,className:`${ei} ${W?"opacity-100":"opacity-0"}`})]})})}),es=()=>{Y.current||_(!1)};return(0,t.jsxs)(t.Fragment,{children:[D?(0,t.jsxs)(l.Popover,{open:E,onOpenChange:e=>{e?U():es()},children:[(0,t.jsx)(l.PopoverTrigger,{asChild:!0,children:ea}),N>0&&(0,t.jsx)(l.PopoverContent,{"aria-label":f.BOARDS_COPY.picker.title,placement:R,swallowOutsidePress:!0,initialFocus:H,className:"flex w-[320px] max-w-[calc(100vw-16px)] flex-col overflow-hidden max-h-[min(480px,var(--floating-available-height,480px))]",children:(0,t.jsx)(J,{illustrationId:e,context:y,onDone:es,onBusyChange:Z,savedRowRef:H},N)})]}):(0,t.jsxs)(t.Fragment,{children:[ea,N>0&&(0,t.jsx)(ee,{open:E,illustrationId:e,context:y,onDone:es,onBusyChange:Z,savedRowRef:H},N)]}),$&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.GatedActionDialog,{open:"login"===M,onOpenChange:e=>{e||L(null)},onAuthenticated:()=>{L(null),V.current=!0}
2,title:f.BOARDS_COPY.gates.loginTitle,description:f.BOARDS_COPY.gates.loginDescription}),(0,t.jsx)(s.VerifyPromptDialog,{open:"verify"===M,onOpenChange:e=>{e||L(null)},email:x?.email??"",onVerified:()=>{L(null),V.current=!0},title:f.BOARDS_COPY.gates.verifyTitle,description:f.BOARDS_COPY.gates.verifyDescription})]})]})}e.s(["AddToBoardButton",()=>ea],520759)},462538,e=>{"use strict";var t=e.i(271645),i=e.i(618566);function n(){let[e,n]=(0,t.useState)(null),r=(0,i.usePathname)();return(0,t.useEffect)(()=>{n(null)},[r]),{pending:e,stash:(0,t.useCallback)(e=>n(e),[]),clear:(0,t.useCallback)(()=>n(null),[])}}e.s(["usePendingAction",()=>n])},951982,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(846932),r=e.i(577854),a=e.i(106344),s=e.i(912598),o=e.i(909578),l=e.i(403620),d=e.i(767994),c=e.i(79474),u=e.i(462538),h=e.i(724143),p=e.i(386909),f=e.i(30747),m=e.i(993855),v=e.i(787311),g=e.i(411003),b=e.i(377855),y=e.i(544318);let x=[y.SAVES_COPY.button.save,y.SAVES_COPY.button.saved,y.SAVES_COPY.button.unsave],w="unsave",S={duration:.3,ease:"easeInOut"};function C(){return(0,t.jsxs)("span",{className:"relative inline-flex h-[18px] w-[18px] items-center justify-center",children:[(0,t.jsx)("span",{className:"save-glyph-heart absolute inset-0 inline-flex items-center justify-center",children:(0,t.jsx)(a.SketchHeart,{size:18})}),(0,t.jsx)("span",{className:"save-glyph-remove absolute inset-0 inline-flex items-center justify-center",children:(0,t.jsx)(r.X,{size:16,weight:"bold","aria-hidden":!0,style:{color:"var(--save-color-remove, #fff)"}})})]})}function A({illustrationId:e,variant:r="icon",onRemoved:a,className:A=""}){let{user:k,isAuthenticated:j,loading:P}=(0,o.useUser)(),D=(0,l.useAccountProfileQuery)(),E=!!D.data?.emailVerifiedAt,_=D.data?.status===p.USER_STATUS.SUSPENDED,N=(0,d.useIsSaved)(e),O=P||j&&D.isLoading,R=(0,h.deriveSaveButtonState)({isLoading:O,isAuthenticated:j,isVerified:E,isSaved:N}),I=(0,c.useSaveIllustration)(),{stash:M,clear:L}=(0,u.usePendingAction)(),$=(0,s.useQueryClient)(),{safeTransition:T}=(0,f.useMotionSafe)(),[B,H]=(0,i.useState)(!1),[F,V]=(0,i.useState)(!1),[Y,Z]=(0,i.useState)(!1),[z,U]=(0,i.useState)(!1),K=(0,i.useRef)(!1),[q,Q]=(0,i.useState)(!1),G=(0,i.useRef)(0),W=(0,i.useRef)(void 0),X=(0,i.useCallback)(()=>{U(!0),window.clearTimeout(W.current),W.current=window.setTimeout(()=>U(!1),5e3)},[]),J=(0,i.useCallback)(()=>{window.clearTimeout(W.current),U(!1)},[]),ee=(0,i.useCallback)(e=>{e?.addEventListener("pointerdown",e=>e.stopPropagation())},[]),et=(0,i.useCallback)(()=>{Z(!0),(0,b.notify)({title:(0,h.getSaveFailureToastTitle)(_),type:"error"}),window.setTimeout(()=>Z(!1),320)},[_]),ei=(0,i.useCallback)(t=>{I.mutate({illustrationId:e,intent:t,context:"labeled"===r?"detail":"grid"},{onError:et,onSuccess:()=>{if("unsave"===t){a?.(),(0,b.notify)({title:y.SAVES_COPY.toasts.removedTitle,type:"info",id:w,action:{label:y.SAVES_COPY.toasts.undo,onClick:()=>I.mutate({illustrationId:e,intent:"save",context:"labeled"===r?"detail":"grid",isUndo:!0})}});return}(0,b.notify)({title:y.SAVES_COPY.toasts.savedTitle,description:y.SAVES_COPY.toasts.savedDescription,type:"success",id:"save",action:{label:y.SAVES_COPY.toasts.savedViewAction,href:"/collections/saved"},duration:5e3})}})},[e,I,a,et,r]);if((0,i.useLayoutEffect)(()=>{K.current&&!O&&j&&E&&(K.current=!1,$.setQueryData(["saves",k?.id],t=>(0,h.toggleSavedSet)(t??new Set,e,"save")),X(),ei("save"),L())},[O,j,E,$,k?.id,e,ei,L,X]),"loading"===R)return"labeled"===r?(0,t.jsx)(m.ActionPillSkeleton,{"data-testid":"save-skeleton",labels:x,className:A}):(0,t.jsx)("span",{"data-testid":"save-skeleton","aria-hidden":!0,className:`inline-flex h-8 w-8 rounded-full bg-foreground
2/[0.06] ${A}`});let en=N?y.SAVES_COPY.button.saved:y.SAVES_COPY.button.save,er=N&&q&&!z,ea=er?y.SAVES_COPY.button.unsave:en,es="remove"===r||N?y.SAVES_COPY.button.removeAria:y.SAVES_COPY.button.save,eo=Y?{x:[0,-4,4,-4,0]}:{x:0},el={type:"button",onClick:function(){if("loading"===R||I.isPending)return;if("remove"===r)return void a?.();if("signed-out"===R){M({illustrationId:e,intent:"save"}),H(!0);return}if("unverified"===R)return void V(!0);let t=Date.now();if(t-G.current<300)return;G.current=t;let i=N?"unsave":"save";"save"===i?X():J(),ei(i)},onPointerDown:e=>e.stopPropagation(),disabled:I.isPending,"aria-pressed":"saved"===R||"unsaved"===R?N:void 0,"aria-haspopup":"signed-out"===R||"unverified"===R?"dialog":void 0};return(0,t.jsxs)(t.Fragment,{children:["labeled"===r?(0,t.jsxs)(n.motion.button,{...el,"data-saved":N,"data-just-saved":z,onPointerEnter:()=>Q(!0),onPointerLeave:()=>{Q(!1),J()},animate:eo,transition:T(S),className:`save-btn-labeled save-heart-host ${m.ACTION_PILL_CLASS} ${A}`,children:[(0,t.jsx)("span",{className:`save-glyph-pop inline-flex ${m.ACTION_PILL_ICON_CLASS}`,children:(0,t.jsx)(C,{})}),(0,t.jsx)(m.PillLabelSizer,{labels:x,current:ea,currentStyle:er?{color:"var(--save-color-remove)"}:void 0})]}):(0,t.jsx)(n.motion.button,{...el,ref:ee,"aria-label":es,"data-saved":N,"data-just-saved":z,onPointerLeave:J,animate:eo,transition:T(S),className:`save-btn-icon group/save inline-flex items-center justify-center cursor-pointer disabled:opacity-50 disabled:cursor-default save-heart-host ${A}`,children:(0,t.jsx)("span",{className:"save-btn-visual",children:(0,t.jsx)(C,{})})}),(0,t.jsx)(v.GatedActionDialog,{open:B,onOpenChange:e=>{H(e),e||L()},onAuthenticated:()=>{H(!1),K.current=!0}}),(0,t.jsx)(g.VerifyPromptDialog,{open:F,onOpenChange:V,email:k?.email??"",onVerified:()=>{V(!1),K.current=!0}})]})}e.s(["SaveIllustrationButton",()=>A,"UNSAVE_UNDO_TOAST_ID",0,w])},952884,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(572488),r=e.i(846932),a=e.i(833157),s=e.i(425660),o=e.i(374930),l=e.i(30747),d=e.i(787456),c=e.i(520759),u=e.i(951982),h=e.i(880980);let p="w-full h-auto max-h-[75vh] object-contain",f="aspect-[4/3] bg-gray-1 flex items-center justify-center text-dimmed text-sm";function m(e){return e?{className:"",style:{backgroundColor:function(e){let t=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16),r=(299*t+587*i+114*n)/1e3;if(r>240||r<30)return e;let a=r>128?.85:1.25,s=[t,i,n].map(e=>Math.min(255,Math.max(0,Math.round(e*a))).toString(16).padStart(2,"0"));return`#${s.join("")}`}(e)}}
2:{className:"bg-foreground/[0.03] dark:bg-foreground/[0.07]",style:void 0}}function v(e){let t=(0,d.useHasHover)(),[n,r]=(0,i.useState)(!1);return e?{hoverIntent:n,hoverProps:{onPointerEnter:()=>{t&&r(!0)},onPointerLeave:()=>{t&&r(!1)},onFocus:()=>r(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||r(!1)}}}:{hoverIntent:!1,hoverProps:{}}}let g="lift-cascade",b=0,y=0,x=0,w=1,S=0,C=0,A=.99,k={type:"spring",stiffness:700,damping:51,mass:1.1},j={type:"spring",stiffness:400,damping:86},P=470,D=43,E=.2,_=0;function N({illustrationId:e,variant:i,onRemoved:n,motionVariants:a,motionTransition:s}){let o="icon"===i?"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 has-[[aria-expanded=true]]:opacity-100 max-sm:opacity-100":"";return(0,t.jsxs)(r.motion.div,{variants:a,transition:s,className:`save-overlay absolute right-2 top-2 z-10 flex items-center gap-1 ${o}`,children:["icon"===i&&(0,t.jsx)(c.AddToBoardButton,{illustrationId:e,variant:"icon"}),(0,t.jsx)(u.SaveIllustrationButton,{illustrationId:e,variant:i,onRemoved:n})]})}function O({variant:e="editorial",slug:i,title:n,coverImage:s,illustrators:d,artDirectors:c,publisher:u,sizes:p,priority:m=!1,showTitle:O,showCredits:L,titleClassName:$,contentClassName:T,imageClassName:B="w-full h-auto",constrainHeight:H=!1,scaleClass:F,hoverIntensity:V=1,showSaveHeart:Y=!1,illustrationId:Z,saveHeartVariant:z="icon",onSaveRemoved:U}){let{safeTransition:K}=(0,l.useMotionSafe)(),q="image-only"===e,Q=O??!q,G=L??!q,W=Q||G,X=s?.background_color??null,J=(0,o.resolveAssetMedia)(s?{...s,file_type:s.file_type??null}:null),{hoverIntent:ee,hoverProps:et}=v(J?.kind==="motion");if(void 0!==F)return(0,t.jsx)(M,{scaleClass:F,slug:i,title:n,variant:e,coverImage:s,media:J,imageClassName:B,constrainHeight:H,sizes:p,priority:m,shouldShowTitle:Q,shouldShowCredits:G,hasContent:W,titleClassName:$,contentClassName:T,illustrators:d,artDirectors:c,publisher:u,showSaveHeart:Y,illustrationId:Z,saveHeartVariant:z,onSaveRemoved:U});let ei="lift-cascade"===g,en=y*V,er=1+(w-1)*V,ea={rest:{},hover:{transition:{staggerChildren:b,...k}}},es=ei?{rest:{y:0,scale:1,boxShadow:"0 0px 0px rgba(0,0,0,0)"},hover:{y:en,scale:er,boxShadow:`0 ${Math.abs(en)}px ${S}px rgba(0,0,0,${C})`,transition:k}}:{rest:{scale:1},hover:{scale:er,transition:k}},eo=ei?void 0:{rest:{boxShadow:"0 0px 0px rgba(0,0,0,0)"},hover:{boxShadow:`0 4px ${S}px rgba(0,0,0,${C})`}},el={type:"tween",duration:E,ease:"easeOut"},ed=ei?{rest:{y:0,opacity:.55,transition:K(j)},hover:{y:x*V,opacity:1}}:{rest:{opacity:.55,transition:K(j)},hover:{opacity:1}},ec=_,eu=K(ei?{y:{type:"spring",stiffness:P,damping:D,delay:ec},opacity:{...el,delay:ec}}:{opacity:{...el,delay:ec}}),eh="max-sm:!opacity-100";return(0,t.jsxs)(r.motion.div,{className:"group self-start relative",variants:ea,initial:"rest",whileHover:"hover",whileTap:{scale:1+(A-1)*V},transition:K(k),...et,children:[(0,t.jsx)(h.IntentLink,{href:`/illustration/${i}`,className:"block",...G||Y?{tabIndex:-1}:{},children:(0,t.jsxs)("article",{className:`flex flex-col ${W?"gap-2.5":""}`,children:[J&&s?H?(0,t.jsx)(R,{media:J,title:n,coverImage:s,sizes:p,priority:m,imageVariants:es,imageWrapperVariants:eo,isLiftCascade:ei,restoreSpring:j,backgroundColor:X,hover:ee}):ei?(0,t.jsx)(r.motion.div,{variants:es,transition:j,children:(0,t.jsx)(a.AssetMedia,{media:J,alt:n,width:s.width??800,height:s.height??600,blurDataURL:s.blur_data_url,className:B,sizes:p,priority:m,rendition:"grid",hover:ee})}):(0,t.jsx)(r.motion.div,{variants:eo,transition:j,className:"overflow-hidden",children:(0,t.jsx)(r.motion.div,{variants:es,transition:j,children:(0,t.jsx)(a.AssetMedia,{media:J,alt:n,width:s.width??800,height:s.height??600,blurDataURL:s.blur_data_url,className:B,sizes:p,priority:m,rendition:"grid",hover:ee})})}):(0,t.jsx)("div",{className:f,children:"No image"}),Q&&(0,t.jsx)(r.motion.h2,{variants:ed,transition:eu,className:`${T??""} ${$??("editorial"===e?"font-serif text-[26px] leading-tight":"font-sans font-semibold text-lg leading-tight")} text-foreground ${eh}`,children:n})]})}),Y&&Z&&(0,t.jsx)(N,{illustrationId:Z,variant:z,onRemoved:U}),G&&(0,t.jsx)(I,{illustrators:d,artDirectors:c,publisher:u,contentClassName:T,textVariants:ed,textTransition:eu,mobileTextClass:eh})]})}function R({media:e,title:i,coverImage:n,sizes:s,priority:o,imageVariants:l,imageWrapperVariants:d,isLiftCascade:c,restoreSpring:u,backgroundColor:h,hover:f}){let v=(0,t.jsx)(a.AssetMedia,{media:e,alt:i,width:n.width??800,height:n.height??600,blurDataURL:n.blur_data_url,className:p,sizes:s,priority:o,rendition:"grid",hover:f}),g=m(h);return c?(0,t.jsx)(r.motion.div,{variants:l,transition:u,className:`w-full ${g.className}`,style:g.style,children:v}):(0,t.jsx)(r.motion.div,{variants:d,transition:u,className:`w-full ${g.className} overflow-hidden`,style:g.style,children:(0,t.jsx)(r.motion.div,{variants:l,transition:u,children:v})})}function I({illustrators:e,artDirectors:i,publisher:a,contentClassName:o,textVariants:l,textTransition:d,mobileTextClass:c}){return e&&e.length>0||i&&i.length>0||a?(0,t.jsxs)(r.motion.div,{variants:l,transition:d,className:`flex flex-col text-sm leading-tight mt-1 text-foreground ${c} ${o??""}`,children:[e?.map(e=>(0,t.jsxs)("p",{children:[s.SHARED_COPY.credit.illustratedBy," ",(0,t.jsx)(n.AppLink,{href:`/profile/${e.slug}`,prefetch:!1,className:"font-semibold hover:underline underline-offset-4",onClick:e=>e.stopPropagation(),children:e.name})]},`illustrator-${e.slug}`)),i?.map(e=>(0,t.jsxs)("p",{children:[s.SHARED_COPY.credit.artDirectedBy," ",(0,t.jsx)(n.AppLink,{href:`/profile/${e.slug}`,prefetch:!1,className:"font-semibold hover:underline underline-offset-4",onClick:e=>e.stopPropagation(),children:e.name})]},`ad-${e.slug}`)),a&&(0,t.jsxs)("p",{children:[s.SHARED_COPY.credit.forPublisher," ",(0,t.jsx)(n.AppLink,{href:`/publisher/${a.slug}`,prefetch:!1,className:"font-semibold hover:underline underline-offset-4",onClick:e=>e.stopPropagation(),children:a.name})]})]}):null}function M({scaleClass:e,slug:i,title:n,variant:r,coverImage:s,media:o,imageClassName:l,constrainHeight:d,sizes:c,priority:u,shouldShowTitle:g,shouldShowCredits:b,hasContent:y,titleClassName:x,contentClassName:w,illustrators:S,artDirectors:C,publisher:A,showSaveHeart:k=!1,illustrationId:j,saveHeartVariant:P="icon",onSaveRemoved:D}){let E="text-foreground sm:text-dimmed transition-colors duration-200 ease-linear sm:group-hover:text-foreground",_=m(s?.background_color),{hoverIntent:O,hoverProps:R}=v(o?.kind==="motion");return(0,t.jsxs)("div",{className:`group self-start relative ${e}`,...R,children:[(0,t.jsx)(h.IntentLink,{href:`/illustration/${i}`,className:"block",...b||k?{tabIndex:-1}:{},children:(0,t.jsxs)("article",{className:`flex flex-col ${y?"gap-2.5":""}`,children:[o&&s?d?(0,t.jsx)("div",{className:`w-full ${_.className}`,style:_.style,children:(0,t.jsx)(a.AssetMedia,{media:o,alt:n,width:s.width??800,height:s.height??600,blurDataURL:s.blur_data_url,className:p,sizes:c,priority:u,rendition:"grid",hover:O})}):(0,t.jsx)(a.AssetMedia,{media:o,alt:n,width:s.width??800,height:s.height??600,blurDataURL:s.blur_data_url,className:l,sizes:c,priority:u,rendition:"grid",hover:O}):(0,t.jsx)("div",{className:f,children:"No image"}),g&&(0,t.jsx)("h2",{className:`${w??""} ${x??("editorial"===r?"font-serif text-[26px] leading-tight":"font-sans font-semibold text-lg leading-tight")} ${E}`,children:n})]})}),k&&j&&(0,t.jsx)(N,{illustrationId:j,variant:P,onRemoved:D}),b&&(0,t.jsx)(L,{illustrators:S,artDirectors:C,publisher:A,textDimClasses:E,contentClassName:w})]})}function L({illustrators:e,artDirectors:i,publisher:r,textDimClasses:a,contentClassName:o}){return e&&e.length>0||i&&i.length>0||r?(0,t.jsxs)("div",{className:`flex flex-col text-sm leading-tight mt-1 ${a} ${o??""}`,children:[e?.map(e=>(0,t.jsxs)("p",{children:[s.SHARED_COPY.credit.illustratedBy," ",(0,t.jsx)(n.AppLink,{href:`/profile/${e.slug}`,prefetch:!1,className:"font-semibold hover:underline underline-offset-4",onClick:e=>e.stopPropagation(),children:e.name})]},`illustrator-${e.slug}`)),i?.map(e=>(0,t.jsxs)("p",{children:[s.SHARED_COPY.credit.artDirectedBy," ",(0,t.jsx)(n.AppLink,{href:`/profile/${e.slug}`,prefetch:!1,className:"font-semibold hover:underline underline-offset-4",onClick:e=>e.stopPropagation(),children:e.name})]},`ad-${e.slug}`)),r&&(0,t.jsxs)("p",{children:[s.SHARED_COPY.credit.forPublisher," ",(0,t.jsx)(n.AppLink,{href:`/publisher/${r.slug}`,prefetch:!1,className:"font-semibold hover:underline underline-offset-4",onClick:e=>e.stopPropagation(),children:r.name})]})]}):null}e.s(["ImageCard",()=>O])},340397,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(846932),r=e.i(30747);let a={type:"spring",stiffness:400,damping:35},s={type:"spring",stiffness:500,damping:12},o={single:{shape:"square",dotSize:14,rx:2,dots:[{x:0,y:0}]},large:{shape:"circle",dotSize:7,dots:[{x:-5.5,y:-5.5},{x:5.5,y:-5.5},{x:-5.5,y:5.5},{x:5.5,y:5.5}]},medium:{shape:"circle",dotSize:4.5,dots:[{x:-7.5,y:-7.5},{x:0,y:-7.5},{x:7.5,y:-7.5},{x:-7.5,y:0},{x:0,y:0},{x:7.5,y:0},{x:-7.5,y:7.5},{x:0,y:7.5},{x:7.5,y:7.5}]},small:{shape:"circle",dotSize:3,dots:[{x:-7.5,y:-7.5},{x:-2.5,y:-7.5},{x:2.5,y:-7.5},{x:7.5,y:-7.5},{x:-7.5,y:-2.5},{x:-2.5,y:-2.5},{x:2.5,y:-2.5},{x:7.5,y:-2.5},{x:-7.5,y:2.5},{x:-2.5,y:2.5},{x:2.5,y:2.5},{x:7.5,y:2.5},{x:-7.5,y:7.5},{x:-2.5,y:7.5},{x:2.5,y:7.5},{x:7.5,y:7.5}]}};function l({size:e,isHovered:l=!1,isActive:d=!1,bloomOnMount:c=!1}){let{safeTransition:u}=(0,r.useMotionSafe)(),h=o[e],[p,f]=(0,i.useState)(c&&d?1:0),m=(0,i.useRef)(d);(0,i.useEffect)(()=>{d&&!m.current&&f(e=>e+1),m.current=d},[d]);let v=Math.max(...h.dots.map(e=>Math.sqrt(e.x*e.x+e.y*e.y)),1);return(0,t.jsx)("div",{className:"relative",style:{width:20,height:20},"aria-hidden":"true",children:h.dots.map((e,i)=>{let r=Math.sqrt(e.x*e.x+e.y*e.y)/v*.025*h.dots.length,o=l?1.15*e.x:e.x,c=l?1.15*e.y:e.y,f=d?1.05:1,m="square"===h.shape;return(0,t.jsx)(n.motion.div,{className:`absolute bg-current ${m?"":"rounded-full"}`,style:{width:h.dotSize,height:h.dotSize,left:10-h.dotSize/2,top:10-h.dotSize/2,borderRadius:m?h.rx:void 0,transformOrigin:"center"},initial:!!d&&p>0&&{scale:.5,x:e.x,y:e.y},animate:{x:o,y:c,scale:f},transition:u(d&&p>0?{...s,delay:r}:a)},`${i}-${p}`)})})}e.s(["GridIcon",()=>l])}]);
3
4//# debugId=f87dc1ac-d556-392f-22c2-5ea576144775
5//# sourceMappingURL=97af24988f159650.js.map

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.