1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([["85714"],{58924(e,t,r){r.d(t,{t:()=>m});var n=r(27181),a=r(77382),s=r(43901),o=r(72336),l=r(83087),i=r(19969);let c=(0,o.tv)({base:"flex items-center",variants:{variant:{block:"w-full flex-col justify-center rounded-xl bg-neutral-6/5 py-6 gap-3",inline:"flex-row rounded-lg bg-neutral-6/5 px-3 py-2 gap-2"}}}),d=()=>{let e=(0,a.c)("common");return(0,n.jsxs)("div",{className:c({variant:"block"}),children:[(0,n.jsx)("div",{className:"flex size-10 items-center justify-center rounded-full bg-neutral-6/10",children:(0,n.jsx)("i",{className:"i-mingcute-alert-line text-copy-16 opacity-60"})}),(0,n.jsx)("p",{className:"text-copy-13 font-medium",children:e("error_boundary_block_title")}),(0,n.jsx)("p",{className:"text-label-12 opacity-60",children:e("error_boundary_block_subtitle")}),(0,n.jsx)(i.OV,{className:"mt-1",onClick:()=>{window.location.reload()},children:e("actions_refresh")})]})},u=()=>{let e=(0,a.c)("common");return(0,n.jsxs)("div",{className:c({variant:"inline"}),children:[(0,n.jsx)("i",{className:"i-mingcute-alert-line size-3.5 opacity-40"}),(0,n.jsx)("span",{className:"text-label-12 opacity-50",children:e("error_boundary_inline_text")})]})},m=({children:e,variant:t="block"})=>(0,n.jsx)(s.tH,{fallbackRender:()=>"inline"===t?(0,n.jsx)(u,{}):(0,n.jsx)(d,{}),onError:e=>{(0,l.e)(e)&&(0,l.r)()||console.error(e)},children:e})},43451(e,t,r){r.d(t,{W:()=>u,S:()=>d});var n=r(27181),a=r(11766),s=r(64797),o=r(83273),l=r(99300),i=r(13980),c=r(36537);let d=({className:e,checked:t,defaultChecked:r,onCheckedChange:d,disabled:u,...m})=>{let[h,g]=(0,c.useState)(t??r??!1),f=void 0!==t?t:h,p="indeterminate"===f,b=!0===f,x=(0,c.useCallback)(e=>{g(e),d?.(e)},[d]);return(0,n.jsx)(a.y,{nativeButton:!0,checked:b,disabled:u,indeterminate:p,className:(0,o.A)("inline-flex size-[18px] shrink-0 items-center justify-center rounded-full border outline-none transition-colors duration-200","focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-50","data-[checked]:border-accent data-[checked]:bg-accent data-[checked]:text-white","data-[indeterminate]:border-accent data-[indeterminate]:bg-accent data-[indeterminate]:text-white","data-[unchecked]:border-neutral-4 data-[unchecked]:bg-neutral-1",e),render:(0,n.jsx)(l.m.button,{type:"button",whileHover:{scale:1.05},whileTap:{scale:.9}}),onCheckedChange:x,...m,children:(0,n.jsxs)(i.N,{mode:"wait",children:[b&&(0,n.jsx)(s.P,{keepMounted:!0,render:(0,n.jsx)(l.m.svg,{animate:"checked",className:"size-3",exit:"unchecked",fill:"none",initial:"unchecked",stroke:"currentColor",strokeWidth:"3.5",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),children:(0,n.jsx)(l.m.path,{d:"M4.5 12.75l6 6 9-13.5",strokeLinecap:"round",strokeLinejoin:"round",variants:{checked:{pathLength:1,opacity:1,transition:{duration:.2,delay:.1}},unchecked:{pathLength:0,opacity:0,transition:{duration:.15}}}})}),p&&(0,n.jsx)(s.P,{keepMounted:!0,render:(0,n.jsx)(l.m.svg,{className:"size-3",fill:"none",stroke:"currentColor",strokeWidth:"3.5",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),children:(0,n.jsx)(l.m.line,{initial:{pathLength:0,opacity:0},strokeLinecap:"round",x1:"5",x2:"19",y1:"12",y2:"12",animate:{pathLength:1,opacity:1,transition:{duration:.2}}})})]})})},u=({label:e,checked:t,disabled:r,onCheckChange:a})=>{let s=(0,c.useId)();return(0,n.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,n.jsx)(d,{checked:t,disabled:r,id:s,onCheckedChange:e=>{"boolean"==typeof e&&a?.(e)}}),(0,n.jsx)("label",{htmlFor:s,className:(0,o.A)("cursor-default select-none text-copy-13 text-neutral-7",r&&"curs
1or-not-allowed opacity-50"),children:e})]})}},26025(e,t,r){r.d(t,{C:()=>x});var n=r(27181),a=r(69007),s=r(23815),o=r(13980),l=r(99300),i=r(36537),c=r(72103),d=r(2287),u=r(58294),m=r(26385),h=r(17895),g=r(68053),f=r(17353),p=r(58782),b=r(20330);let x=function(e){if((0,c.al)()&&e.mobileAsSheet){let{triggerElement:t,TriggerComponent:r,triggerComponentProps:a}=e,s=t||(r?(0,i.createElement)(r,a):null);return(0,n.jsx)(f.L,{content:e.children,...e.sheet,children:s})}return(0,n.jsx)(k,{...e})},v=(0,i.createContext)(null),k=function(e){let{headless:t=!1,wrapperClassName:r,TriggerComponent:c,triggerElement:f,trigger:x="hover",padding:k,offset:w,popoverWrapperClassNames:y,popoverClassNames:j,debug:_,animate:N=!0,as:C="div",type:E="popover",triggerComponentProps:M,isDisabled:A,onOpen:L,onClose:S,to:T,asChild:$,...R}=e,[U,P]=(0,i.useState)(!1),{x:F,y:D,refs:I,strategy:z,isPositioned:V,elements:W,update:B,placement:O}=(0,a.we)({middleware:R.middleware??[(0,a.UU)({padding:k??20}),(0,a.cY)(w??10),(0,a.BN)()],strategy:R.strategy,placement:R.placement??"bottom-start",whileElementsMounted:R.whileElementsMounted});(0,i.useEffect)(()=>{if(U&&W.reference&&W.floating)return(0,s.ll)(W.reference,W.floating,B)},[U,W,B]);let H=(0,i.useRef)(null);(0,d.A)(H,()=>{("click"==x||"both"==x)&&Q()});let Q=(0,i.useCallback)(()=>{_||P(!1)},[_]),Y=(0,u.D)(()=>{A||P(!0)}),G=(0,i.useCallback)(()=>{Q()},[Q]),Z=(0,i.useMemo)(()=>{let e={};switch(x){case"click":return{...e,onClick:Y};case"hover":return{...e,onMouseOver:Y,onMouseOut:Q};case"both":return{...e,onClick:Y,onMouseOver:Y,onMouseOut:G}}},[Q,Y,G,x]),q=f||(c?i.cloneElement((0,i.createElement)(c,M),{tabIndex:0}):(0,n.jsx)(n.Fragment,{})),J=$?i.cloneElement("string"==typeof q?(0,n.jsx)("span",{children:q}):q,{...Z,ref:I.setReference}):(0,n.jsx)(C,{className:(0,h.c)("inline-block",r),ref:I.setReference,role:"both"===x||"click"===x?"button":"note",...Z,children:q});(0,i.useEffect)(()=>{I.floating.current&&U&&"popover"===E&&I.floating.current.focus()},[U]),(0,i.useEffect)(()=>{U?L?.():S?.()},[U]);let K=(0,i.useMemo)(()=>({close:Q}),[Q]);return e.children?(0,n.jsxs)(n.Fragment,{children:[J,(0,n.jsx)(o.N,{children:U&&(0,n.jsx)(g.RootPortal,{to:T,children:(0,n.jsx)(l.m.div,{className:(0,h.c)("float-popover","pointer-events-auto relative z-[99]",y),onWheel:m.dG,..."hover"===x||"both"===x?Z:{},ref:H,children:(0,n.jsx)(l.m.div,{...(0,p.w)(O),ref:I.setFloating,role:"tooltip"===E?"tooltip":"dialog",tabIndex:-1,className:(0,h.c)(!t&&[b.u,"p-4"],"relative z-[2]","tooltip"===E?"max-w-[25rem] break-all rounded-xl px-4 py-2":"",j),style:{...(0,p.w)(O).style,position:z,top:D??"",left:F??"",visibility:V&&null!==F?"visible":"hidden"},children:(0,n.jsx)(v,{value:K,children:e.children})})})})})]}):J}},20330(e,t,r){r.d(t,{u:()=>n});let n=["rounded-xl border border-black/5 outline-hidden dark:border-white/8","bg-paper","shadow-[0_2px_12px_rgba(0,0,0,0.04),0_0_0_0.5px_rgba(0,0,0,0.03)] dark:shadow-[0_4px_24px_rgba(0,0,0,0.3),0_0_0_0.5px_rgba(255,255,255,0.04)]"]},49237(e,t,r){r.d(t,{s:()=>l});var n=r(27181),a=r(77382),s=r(36537),o=r(88096);let l=e=>{let{displayAbsoluteTimeAfterDay:t=29}=e,{relativeTimeFromNow:r}=(0,o.V)(),l=(0,a.k)(),i=(0,s.useCallback)((e,t)=>{let n=new Date(e),a=Math.abs(Math.floor((n.getTime()-Date.now())/864e5));return t&&a>t?l.dateTime(n,{year:"numeric",month:"long",day:"numeric",weekday:"long"}):r(e)},[l,r]),[c,d]=(0,s.useState)("");return(0,s.useEffect)(()=>{d(i(e.date,t));let r=setInterval(()=>{d(i(e.date,t))},1e3);return()=>{r=clearInterval(r)}},[e.date,t,i]),(0,n.jsx)(s.Fragment,{children:c})}},2287(e,t,r){r.d(t,{A:()=>s});var n=r(36537);let a=["mousedown","touchstart"],s=(e,t,r=a)=>{let s=(0,n.useRef)(t);(0,n.useEffect)(()=>{s.current=t},[t]),(0,n.useEffect)(()=>{let t=t=>{let{current:r}=e;r&&!r.contains(t.target)&&s.current(t)};for(let e of r)!function(e,...t){e&&e.addEventListener&&e.addEventListener(...t)}(document,e,t);return()=>{for(let e of r)!function(e,...t){e&&e.removeEventListener&&e.removeEventListener(...t)}(document,e,t)}},[r,e])}},88096(e,t,r){r.d(t,{V:()=>s});var n=r(77382),a=r(36537);let s=()=>{let e=(0,n.c)("datetime");return{relativeTimeFromNow:(0,a.useCallback)((t,r=new Date)=>{if(!t)return"";let n=r-(t=new Date(t));if(n<6e4){let t=Math.ceil(n/1e3);return t<=0?e("relative_justNow"):e("relative_secondsAgo",{count:t})}if(n<36e5)return e("relative_minutesAgo",{count:Math.round(n/6e4)});if(n<864e5)return e("relative_hoursAgo",{count:Math.round(n/36e5)});if(n<2592e6)return e("relative_daysAgo",{count:Math.round(n/864e5)});if(n<31536e6)return e("relative_monthsAgo",{count:Math.round(n/2592e6)});else return e("relative_yearsAgo",{count:Math.round(n/31536e6)})},[e])}}},94011(e,t,r){r.d(t,{T:()=>a});var n=r(36537);let a=e=>{let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e},[e]),t}},83087(e,t,r){r.d(t,{e:()=>s,r:()=>o});let n=[/chunkloaderror/i,/loading chunk [\w-]+ failed/i,/loading css chunk [\w-]+ failed/i,/failed to fetch dynamically imported module/i,/but the module factory is not available/i,/originalfactory is undefined/i],a="__chunk_reload_at",s=e=>{if(!e)return!1;let t=e instanceof Error?`${e.name} ${e.message}`:"string"==typeof e?e:e?.message||"";return!!t&&n.some(e=>e.test(t))},o=()=>{try{let e=Number(sessionStorage.getItem(a)??"0"),t=Date.now();if(t-e<6e4)return!1;sessionStorage.setItem(a,String(t))}catch{}return window.location.reload(),!0}},76143(e,t,r){r.d(t,{Wb:()=>a,_c:()=>n});let n=[],a={}},49147(e,t,r){r.d(t,{QR:()=>n,iH:()=>a});let n=e=>((e,t)=>{if(!t)return e;let r=new URLSearchParams({password:t});return`${e}?${r.toString()}`})((e=>{if(!e.slug||!e.createdAt)return null;let t=new Date(e.createdAt);return`/notes/${t.getUTCFullYear()}/${t.getUTCMonth()+1}/${t.getUTCDate()}/${e.slug}`})(e)??`/notes/${e.nid}`,e.password),a=e=>({id:e.nid,created:e.createdAt,slug:"string"==typeof e.slug?e.slug:void 0})},96102(e,t,r){r.d(t,{B:()=>s,t:()=>o});var n,a=r(49147),s=((n={}).Categories="/categories",n.Category="/categories/",n.Friends="/friends",n.Home="//",n.Login="/login",
1n.Note="/notes/",n.Notes="/notes",n.NoteTopic="/notes/series/",n.NoteTopics="/notes/series",n.Page="/",n.PageDeletd="/common/deleted",n.Post="/posts/",n.Posts="/posts",n.Project="/projects/",n.Projects="/projects",n.Says="/says",n.Tag="/posts/tag",n.Thinking="/thinking",n.ThinkingItem="/thinking/",n.Timelime="/timeline",n);function o(e,t){let r=e;switch(e){case"/notes/":r=(0,a.QR)({nid:t.id,slug:t.slug,createdAt:t.createdAt,password:t.password});break;case"/posts/":r+=`${t.category}/${t.slug}`;break;case"/posts":case"/timeline":r+=`?${new URLSearchParams(t).toString()}`;break;case"/notes/series/":case"/categories/":case"/":r+=t.slug;break;case"//":r="/";break;case"/posts/tag":r+=`/${t.name}`;break;case"/projects/":r+=t.id;break;case"/thinking/":r+=`${t.id}`}return r}},61951(e,t,r){r.d(t,{io:()=>v,Um:()=>x,CS:()=>b,V$:()=>p,Wb:()=>g});var n=r(27181),a=r(84040),s=r(17328),o=r(74168),l=r(36537),i=r(69372);let c=(0,s.eU)(!1);var d=r(85650),u=r(71518);let m=(0,s.eU)(0),h=(0,s.eU)(null),g=({children:e})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f,{}),e]}),f=()=>{let e=(0,o.useSetAtom)(m),t=(0,o.useSetAtom)(h),r=(0,l.useRef)(0),n=(0,l.useRef)(!1);return(0,a.E)(()=>{let a=(0,u.nF)(()=>{!n.current&&(i.Z.set(c,!0),n.current=!0);let a=document.documentElement.scrollTop;if(0===a){let e=document.body.style;"fixed"===e.position&&(a=Math.abs(Number.parseInt(e.top,10)))}t(r.current-a>0?"up":"down"),r.current=a,e(r.current)},16,{leading:!1});return window.addEventListener("scroll",a),a(),()=>{window.removeEventListener("scroll",a)}},[]),null},p=()=>(0,o.useAtomValue)(h),b=(0,d.p)(m),x=(0,d.p)(h),v=e=>(0,o.useAtomValue)((0,l.useMemo)(()=>(0,s.eU)(t=>{let r=t(m),n=t(h);return r>e&&"up"===n}),[e]))}}]);
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.