PageSourceSearch

https://kiokun.com/_app/immutable/nodes/54.BRJk9ljR.js

js kiokun.com collected 2026-10-09 22:06:14 UTC 6,432 bytes, 2 lines download raw bytes

1import{_ as De}from"../chunks/D5bF6Uet.js";import"../chunks/Bzak7iHL.js";import{ar as Te,aE as h,aF as Ae,af as Ee,as as Q,at as _,au as Oe,av as Ie,aw as f,A as e,ax as Ne,ay as s,az as v,aC as n,aD as Ce,aG as r,aA as x,aB as Le,Z as w}from"../chunks/CL7c6soW.js";import{d as Me,s as k,a as $}from"../chunks/z594Fepx.js";import{i as I}from"../chunks/DU8dkTXG.js";import{e as Be,i as Re}from"../chunks/r-DPrC5X.js";import{h as $e}from"../chunks/nYSca4qD.js";import{h as je}from"../chunks/b19vE9Yx.js";import{s as N,r as Fe,a as qe}from"../chunks/D21hl974.js";import{i as He,s as Ge}from"../chunks/B1eG5aWi.js";import{k as Ke}from"../chunks/qzHDuxX2.js";import{H as Qe}from"../chunks/BJuCEQqO.js";async function Ve({params:j}){return{userId:j.userId}}const ya=Object.freeze(Object.defineProperty({__proto__:null,load:Ve},Symbol.toStringTag,{value:"Module"}));var We=f('<div class="loading svelte-znhycs"><p>Loading...</p></div>'),Ze=f('<div class="error svelte-znhycs"><p> </p> <a href="/users" class="back-link svelte-znhycs">← Back to Users</a></div>'),Je=f('<img decoding="async" class="svelte-znhycs"/>'),Xe=f('<div class="avatar-placeholder svelte-znhycs"> </div>'),Ye=f('<article class="note-item divider-cell svelte-znhycs"><div class="note-header svelte-znhycs"><a class="character svelte-znhycs"> </a> <span class="date svelte-znhycs"> </span></div> <div class="note-content markdown-content svelte-znhycs"></div></article>'),ea=f('<div class="empty svelte-znhycs"><p>No notes match your search</p></div>'),aa=f('<nav class="pagination divider-grid mobile-full-bleed svelte-znhycs" aria-label="Profile notes pages"><button type="button" class="divider-cell svelte-znhycs">← Previous</button> <span aria-live="polite" class="svelte-znhycs"> </span> <button type="button" class="divider-cell svelte-znhycs">Next →</button></nav>'),ta=f(`<div class="controls svelte-znhycs"><label for="profile-note-search" class="visually-hidden">Search this learner's notes</label> <input id="profile-note-search" type="text" placeholder="Search notes..." class="search-input svelte-znhycs"/> <label for="profile-note-sort" class="visually-hidden">Sort notes</label> <select id="profile-note-sort" class="sort-select svelte-znhycs"><option>Recently Updated</option><option>Recently Created</option><option>Character</option></select></div> <div class="notes-list divider-grid mobile-full-bleed svelte-znhycs"></div> <!> <!>`,1),ra=f(`<div class="empty svelte-znhycs"><p>This user hasn't created any notes yet</p></div>`),sa=f('<div class="user-header svelte-znhycs"><a href="/users" class="back-link svelte-znhycs">← Back to Users</a> <div class="user-profile svelte-znhycs"><div class="user-avatar svelte-znhycs"><!></div> <div class="user-details svelte-znhycs"><h1 class="svelte-znhycs"> </h1> <p class="note-count svelte-znhycs"> </p></div></div></div> <!>',1),oa=f('<!> <main id="main-content" class="sheet-page user-notes-page svelte-znhycs"><div class="container svelte-znhycs"><!></div></main>',1);function ga(j,V){Te(V,!0);let d=h(null),F=h(Ae([])),q=h(!0),D=h(""),g=h(""),C=h("updated"),l=h(1),T=h(0),L=h(1),A=h(!1),H=h(null),W=Ce(()=>V.data.userId);function oe(a){var o;const t=Ke.parse(a);return((o=e(H))==null?void 0:o.sanitize(t))??""}async function ne(a){try{r(A,e(d)!==null),r(q,e(d)===null),r(D,"");const t=new URLSearchParams({page:String(e(l)),pageSize:"50",sort:e(C)});e(g).trim()&&t.set("q",e(g).trim());const o=await fetch(`/api/users/${e(W)}/notes?${t}`,{signal:a});if(!o.ok){if(o.status===404){r(D,"User not found");return}throw new Error("Failed to load user notes")}const c=await o.json();if(!e(H)){const{default:y}=await De(async()=>{const{default:E}=await import("../chunks/DedTAGkB.js");return{default:E}},[],import.meta.url);r(H,y,!0)}r(d,c.user,!0),r(F,c.notes,!0),r(l,c.pagination.page,!0),r(T,c.pagination.total,!0),r(L,c.pagination.totalPages,!0)}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;r(D,"Failed to load user notes"),console.error("Error loading user notes:",t)}finally{r(q,!1),r(A,!1)}}function ie(a){r(g,a.currentTarget.value,!0),r(l,1)}function le(a){r(C,a.currentTarget.value,!0),r(l,1)}function ce(a){return new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}Ee(()=>{const a=e(W),t=e(g),o=e(C),c=e(l);if(!a||!o||c<1)return;const y=new AbortController,E=window.setTimeout(()=>void ne(y.signal),t.trim()?250:0);return()=>{window.clearTimeout(E),y.abort()}});var Z=oa();je("znhycs",a=>{Ie(()=>{Ne.title=`${e(d)?`${e(d).name}'s Notes`:"User Notes"} - Kiokun`})});var J=Q(Z);Qe(J,{currentWord:""});var X=s(J,2),Y=v(X),ve=v(Y);{var de=a=>{var t=We();_(a,t)},ue=a=>{var t=Ze(),o=v(t),c=x(o,!0);Le(2),n(t),w(()=>k(c,e(D))),_(a,t)},pe=a=>{var t=sa(),o=Q(t),c=s(v(o),2),y=v(c),E=v(y);{var he=i=>{var u=Je();w(()=>{N(u,"src",e(d).image),N(u,"alt",e(d).name)}),_(i,u)},_e=i=>{var u=Xe(),O=x(u,!0);w(P=>k(O,P),[()=>e(d).name.charAt(0).toUpperCase()]),_(i,u)};I(E,i=>{e(d).image?i(he):i(_e,-1)})}n(y);var ee=s(y,2),ae=v(ee),fe=x(ae,!0),me=s(ae,2),ye=x(me);n(ee),n(c),n(o);var ge=s(o,2);{var ze=i=>{var u=ta(),O=Q(u),P=s(v(O),2);Fe(P);var z=s(P,4),G=v(z);G.value=G.__value="updated";var K=s(G);K.value=K.__value="created";var te=s(K);te.value=te.__value="character",n(z);var M;He(z),n(O);var B=s(O,2);Be(B,21,()=>e(F),Re,(m,p)=>{var b=Ye(),S=v(b),U=v(S),R=x(U,!0),Pe=s(U,2),Se=x(Pe,!0);n(S);var se=s(S,2);$e(se,()=>oe(e(p).noteText),!0),n(se),n(b),w(Ue=>{N(U,"href",`/${e(p).character??""}`),N(U,"aria-label",`Open ${e(p).character} in the dictionary`),k(R,e(p).character),k(Se,Ue)},[()=>ce(e(p).updatedAt)]),_(m,b)}),n(B);var re=s(B,2);{var xe=m=>{var p=ea();_(m,p)};I(re,m=>{e(F).length===0&&m(xe)})}var we=s(re,2);{var ke=m=>{var p=aa(),b=v(p),S=s(b,2),U=x(S),R=s(S,2);n(p),w(()=>{b.disabled=e(l)<=1||e(A),k(U,`Page ${e(l)??""} of ${e(L)??""}`),R.disabled=e(l)>=e(L)||e(A)}),$("click",b,()=>r(l,e(l)-1)),$("click",R,()=>r(l,e(l)+1)),_(m,p)};I(we,m=>{e(L)>1&&m(ke)})}w(()=>{qe(P,e(g)),M!==(M=e(C))&&(z.value=(z.__value=M)??"",Ge(z,M)),N(B,"aria-busy",e(A))}),$("input",P,ie),$("change",z,le),_(i,u)},be=i=>{var u=ra();_(i,u)};I(ge,i=>{e(T)>0||e(g)?i(ze):i(be,-1)})}w(()=>{k(fe,e(d).name),k(ye,`${e(T)??""}
2							${e(g)?e(T)===1?"matching note":"matching notes":e(T)===1?"note":"notes"}`)}),_(a,t)};I(ve,a=>{e(q)?a(de):e(D)?a(ue,1):e(d)&&a(pe,2)})}n(Y),n(X),_(j,Z),Oe()}Me(["input","change","click"]);export{ga as component,ya as universal};

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.