{#if data.paste}

40 ? data.paste.title : ''} > {#if !editing} {data.paste.title || 'Untitled Paste'} {:else if editMetadata} {/if}

{#if data.paste.author} {data.paste.author.username} {:else} Anonymous {/if}
{formatBytes(data.paste.size)}
{data.paste.views} view{data.paste.views !== 1 ? 's' : ''}
{extractDateFromUUIDv7(data.paste.uuid)?.toLocaleDateString() ?? 'Unknown Date'}
{#if data.paste.editedAt}
{#if new Date(data.paste.editedAt).getTime() > new Date().getTime() - 86400000} Edited {dateToRelativeString(new Date(data.paste.editedAt), false, false, now)} ago {:else} {new Date(data.paste.editedAt).toLocaleDateString()} {/if}
{/if} {#if data.paste.expiresAt !== 0 || editing}
{#if !editing} {isExpired ? 'Expired' : 'Expires in'} {dateToRelativeString(new Date(data.paste.expiresAt), false, false, now)} {isExpired ? 'ago' : ''} {:else if editMetadata} { const option = expiresOptions.find((opt) => opt.value === val); return option ? option.label : 'Select expiration...'; }} /> {/if}
{/if}
{#if !editing} {displayNames[data.paste.syntax] ?? data.paste.syntax.charAt(0).toUpperCase() + data.paste.syntax.slice(1)} {:else if editMetadata} {/if}
{#if data.paste.visibility === 0} {editing ? '' : 'Public'} {:else if data.paste.visibility === 1} {editing ? '' : 'Unlisted'} {:else if data.paste.visibility === 2} {editing ? '' : 'Private'} {/if} {#if editing && editMetadata} {/if}
{formatNumber((editContent ?? decryptedContent ?? data.content).length)} chars • {formatNumber( (editing ? (editContent ?? '') : (decryptedContent ?? data.content)).split('\n') .length )} line{(editing ? (editContent ?? '') : (decryptedContent ?? data.content)).split('\n') .length !== 1 ? 's' : ''}
{#if $user && ($user.uuid === data.paste?.author?.uuid || $user.roles.some((r) => r === 1 || r === 255))} {#if !editing} {:else} {/if} {/if}
{#if editing} {#if editError}
{editError}
{/if} {:else}
{/if}
{:else}

Paste not found

The paste you are looking for does not exist.

{/if}
{#if showPasswordModal}
{ if (passwordModalResolve) { passwordModalResolve(passwordInput); passwordModalResolve = null; } showPasswordModal = false; decryptError = ''; }} class="w-full max-w-md rounded bg-neutral-900 p-6" >

{passwordModalMode === 'decrypt' ? 'Enter password to decrypt' : 'Enter password to encrypt'}

{#if decryptError}
{decryptError}
{/if}
{/if}