PageSourceSearch

https://www.nickcheng.com/_next/static/chunks/8491.1f049f531e3510ce.js

js nickcheng.com collected 2026-09-27 09:47:08 UTC 15,665 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8491,75447,50774,7835,40055],{7835:function(e,t,n){var a=n(85893),r=n(41664),l=n.n(r),o=n(21384);let s=e=>{let{passHref:t,legacyBehavior:n,placeholderSrc:a,fallbackSrc:r,...l}=e;return l},i=e=>{let{placeholderSrc:t,fallbackSrc:n,src:a,alt:r,width:l,height:o,loading:s,decoding:i,onLoad:c,onError:d,...h}=e;return h};t.Z=e=>{let{href:t,children:n,...r}=e,c=(0,o.JA)("LINK"),d="";"string"==typeof t?d=t:"object"==typeof t&&null!==t&&"string"==typeof t.pathname&&(d=t.pathname);let h=d.startsWith("http")&&!d.startsWith(c),u=()=>{var e;let t=new URLSearchParams((null===(e=window.location.search)||void 0===e?void 0:e.slice(1))||""),n={};for(let[e,a]of t.entries())""!==a&&(n[e]=a);return n};if(h){let e="string"==typeof t?t:new URL(t.pathname,c).toString();return(0,a.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",...s(r),children:n})}let f="string"==typeof t?(e=>{if("string"!=typeof e||!e||e.startsWith("#"))return e;let t=u();if(0===Object.keys(t).length)return e;let n=e.startsWith("http://")||e.startsWith("https://"),a=new URL(e,c);return(Object.entries(t).forEach(e=>{let[t,n]=e;a.searchParams.has(t)||a.searchParams.set(t,n)}),n)?a.toString():"".concat(a.pathname).concat(a.search).concat(a.hash)})(t):(e=>{if(!e||"object"!=typeof e)return e;let t=u();return 0===Object.keys(t).length?e:{...e,query:{...t,...e.query||{}}}})(t);return(0,a.jsx)(l(),{href:f,...i(r),children:n})}},30548:function(e,t,n){n.d(t,{Z:function(){return a}});function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=null,a=0,r=null;return function(){for(var l=arguments.length,o=Array(l),s=0;s<l;s++)o[s]=arguments[s];let i=Date.now(),c=t-(i-a);if(r=o,c<=0){n&&(clearTimeout(n),n=null),a=i,e(...r),r=null;return}n||(n=setTimeout(()=>{n=null,a=Date.now(),r&&(e(...r),r=null)},c))}}},8491:function(e,t,n){n.r(t);var a=n(85893),r=n(67294),l=n(30548),o=n(22362),s=n(83531),i=n(3794),c=n(70772),d=n(91158),h=n(57623),u=n(81803),f=n(21317),m=n(21384),p=n(76966),x=n(50774),v=n(75447);t.default=e=>{let{toc:t,...n}=e,{isDarkMode:g,toggleDarkMode:b}=(0,p.Og)(),E=(0,m.JA)("ENDSPACE_WIDGET_DARK_MODE",!0,x.default),[y,N]=(0,r.useState)(!1),[w,j]=(0,r.useState)(null),[k,C]=(0,r.useState)(0),[A,_]=(0,r.useState)(null);(0,r.useEffect)(()=>(window.addEventListener("scroll",D),window.addEventListener("scroll",S),()=>{window.removeEventListener("scroll",D),window.removeEventListener("scroll",S)}),[]);let D=()=>{let e=window.scrollY,t=document.documentElement.scrollHeight-window.innerHeight;C(t>0?Math.min(e/t*100,100):0)},S=(0,r.useCallback)((0,l.Z)(()=>{let e=document.getElementsByClassName("notion-h"),t=null,n=A;for(let a=0;a<e.length;++a){let r=e[a];if(!r||!(r instanceof Element))continue;n||(n=r.getAttribute("data-id"));let l=r.getBoundingClientRect(),o=Math.max(150,(t?l.top-t.bottom:0)/4);if(l.top-o<0){n=r.getAttribute("data-id"),t=l;continue}break}_(n)},200),[]),O=e=>{y&&w===e?(N(!1),j(null)):(N(!0),j(e))},T=e=>{let{icon:t,onClick:n,active:r,label:l,showPercent:o,iconClassName:s="text-black",iconSize:i=20}=e;return(0,a.jsx)("button",{onClick:n,className:"w-10 h-10 rounded-full bg-white flex items-center justify-center p-1 cursor-pointer group shadow-lg transition-transform active:scale-95","aria-label":l,title:l,children:(0,a.jsx)("div",{className:"w-full h-full rounded-full flex items-center justify-center transition-colors duration-200 ".concat(r?"bg-[#FBFB46]":"bg-transparent group-hover:bg-[#FBFB46]"),children:o?(0,a.jsxs)("div",{className:"relative w-full h-full flex items-center justify-center",children:[(0,a.jsxs)("span",{className:"text-[10px] font-bold font-mono ".concat(r?"text-black hidden":"text-gray-600 group-hover:hidden"),children:[Math.round(k),"%"]}),(0,a.jsx)(t,{size:i,stroke:2,className:"".concat(s," ").concat(r?"block":"hidden group-hover:block")})]}):(0,a.jsx)(t,{size:i,stroke:2,className:s})})})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"\n            transition-all duration-300 ease-out bg-[#f7f9fe] border-[var(--endspace-border-base)] shadow-2xl overflow-hidden\n            \n            /* Mobile Styles: Bottom Sheet */\n            fixed bottom-0 left-0 right-0 w-full rounded-t-2xl border-t z-40\n            ".concat(y?"translate-y-0 opacity-100 visible":"translate-y-full opacity-0 invisible","\n\n            /* Desktop Styles: Floating Card (Left of buttons) */\n            lg:fixed lg:bottom-8 lg:right-20 lg:left-auto lg:w-80 lg:rounded-xl lg:border lg:h-auto lg:max-h-[70vh]\n            lg:max-w-[calc(100vw-2rem)]\n            ").concat(y?"lg:translate-y-0 lg:opacity-100 lg:visible":"lg:translate-y-0 lg:translate-x-4 lg:opacity-0 lg:invisible","\n        "),style:{maxHeight:"70vh"},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-white shrinking-0",children:[(0,a.jsx)("h3",{className:"font-bold text-sm uppercase flex items-center gap-2 text-black",children:"toc"===w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Z,{size:16,className:"text-black"}),(0,a.jsx)("span",{children:"Table of Contents"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{size:16,className:"text-black"}),(0,a.jsx)("span",{children:"Recent Logs"})]})}),(0,a.jsx)("button",{onClick:()=>N(!1),className:"text-gray-400 hover:text-black",children:(0,a.jsx)(c.Z,{size:18})})]}),(0,a.jsxs)("div",{className:"overflow-y-auto p-4 pb-24 lg:pb-4 flex-1",style:{scrollbarWidth:"thin"},children:["toc"===w&&(0,a.jsx)("nav",{className:"space-y-1",children:t&&t.map(e=>{let t=(0,o.Gw)(e.id),n=A===t;return(0,a.jsx)("a",{href:"#".concat(t),className:"block py-1 text-xs transition-colors rounded px-2 -mx-2 ".concat(n?"text-black font-bold bg-[#FBFB46]/10":"text-gray-500 hover:text-black hover:bg-white"),style:{paddingLeft:"".concat(12*(e.indentLevel||0)+8,"px")},onClick:()=>{},children:e.text},t)})}),"logs"===w&&(0,a.jsx)(v.SideBar,{...n,showTitle:!1})]})]}),(0,a.jsx)("div",{className:"fixed right-4 bottom-8 z-50 flex flex-col items-end gap-2 pointer-events-none",children:(0,a.jsxs)("div",{className:"bg-gray-400/80 backdrop-blur-sm p-1.5 rounded-full shadow-lg flex flex-row lg:flex-col gap-3 pointer-events-auto",children:[E&&(0,a.jsx)(T,{icon:g?d.Z:h.Z,label:g?"Light mode":"Dark mode",onClick:b,iconClassName:"text-black",iconSize:22}),(0,a.jsx)(T,{icon:i.Z,label:"Recent Logs",active:"logs"===w,onClick:()=>O("logs"),iconClassName:"text-black",iconSize:24}),t&&t.length>0&&(0,a.jsx)(T,{icon:s.Z,label:"Table of Contents",active:"toc"===w,onClick:()=>O("toc"),showPercent:!0,iconClassName:"text-gray-500",iconSize:28}),t&&t.length>0&&(0,a.jsx)(T,{icon:u.Z,label:"Jump to Comments",onClick:()=>{let e=document.getElementById("comments");e&&e.scrollIntoView({behavior:"smooth"})}}),(0,a.jsx)(T,{icon:f.Z,label:"Scroll To Top",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})}})]})})]})}},75447:function(e,t,n){n.r(t),n.d(t,{SideBar:function(){return h}});var a=n(85893),r=n(7835),l=n(11327),o=n.n(l),s=n(14442),i=n.n(s),c=n(77240),d=n.n(c);let h=e=>{let{tags:t,categories:n,latestPosts:l,locale:s,showTitle:c=!0}=e;return(0,a.jsxs)("aside",{className:"space-y-8 max-h-[calc(100vh-8rem)] overflow-y-auto overflow-x-hidden",style:{scrollbarWidth:"thin"},children:[l&&l.length>0&&(0,a.jsxs)("div",{className:"p-2",children:[c&&(0,a.jsxs)("h3",{className:"text-[var(--endspace-text-muted)] font-mono text-xs font-bold mb-6 tracking-widest uppercase flex items-center gap-2",children:[(0,a.jsx)(o(),{size:14,className:"text-[var(--endspace-accent-yellow)]"}),"Recent Logs"]}),(0,a.jsx)("div",{className:"space-y-5 border-l border-[var(--endspace-border-base)] pl-4",children:l.slice(0,5).map((e,t)=>(0,a.jsx)(r.Z,{href:"/".concat(e.slug),className:"block group",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-[10px] text-[var(--endspace-text-muted)] font-mono group-hover:text-[var(--endspace-text-primary)] transition-colors",children:e.publishDay}),(0,a.jsx)("h4",{className:"text-sm font-bold text-[var(--endspace-text-primary)] group-hover:translate-x-1 transition-transform duration-300 leading-snug",children:e.title})]})},e.id))})]}),n&&n.length>0&&(0,a.jsxs)("div",{className:"p-2",children:[(0,a.jsxs)("h3",{className:"text-[var(--endspace-text-muted)] font-mono text-xs font-bold mb-6 tracking-widest uppercase flex items-center gap-2",children:[(0,a.jsx)(i(),{size:14,className:"text-[var(--endspace-accent-yellow)]"}),"Data Types"]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:n.map(e=>(0,a.jsxs)(r.Z,{href:"/category/".concat(e.name),className:"flex items-center justify-between group py-2 border-b border-[var(--endspace-border-base)] hover:border-[var(--endspace-border-active)] transition-all",children:[(0,a.jsx)("span",{className:"text-sm text-[var(--endspace-text-secondary)] group-hover:text-[var(--endspace-text-primary)] transition-colors",children:e.name}),(0,a.jsx)("span",{className:"text-xs font-mono text-[var(--endspace-text-muted)] bg-[var(--endspace-bg-secondary)] px-2 py-0.5 rounded-full",children:e.count})]},e.name))})]}),t&&t.length>0&&(0,a.jsxs)("div",{className:"p-2",children:[(0,a.jsxs)("h3",{className:"text-[var(--endspace-text-muted)] font-mono text-xs font-bold mb-6 tracking-widest uppercase flex items-center gap-2",children:[(0,a.jsx)(d(),{size:14,className:"text-[var(--endspace-accent-yellow)]"}),"Keywords"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:t.slice(0,25).map(e=>(0,a.jsx)(r.Z,{href:"/tag/".concat(encodeURIComponent(e.name)),className:"px-3 py-1.5 text-xs font-medium bg-[var(--endspace-bg-secondary)] text-[var(--endspace-text-secondary)] hover:bg-[var(--endspace-text-primary)] hover:text-white transition-all rounded-sm",children:e.name},e.name))})]})]})}},50774:function(e,t,n){n.r(t),t.default={ENDSPACE_LOADING_COVER:!0,ENDSPACE_LOADING_SITE_NAME:"CLOUD09_SPACE",ENDSPACE_LOADING_TEXT_INIT:"INITIALIZING",ENDSPACE_LOADING_TEXT_LOADING:"LOADING",ENDSPACE_LOADING_TEXT_COMPLETE:"READY",ENDSPACE_LOADING_TEXT_SWEEPING:"LAUNCHING",ENDSPACE_LOADING_TEXT_FADEOUT:"WELCOME",ENDSPACE_LOADING_IMAGE:"/favicon.svg",ENDSPACE_BANNER_WATERMARK_TEXT:"CLOUD09_SPACE",ENDSPACE_ARTICLE_WATERMARK_TEXT:"CLOUD09",ENDSPACE_MENU_CATEGORY:!0,ENDSPACE_MENU_TAG:!0,ENDSPACE_MENU_ARCHIVE:!0,ENDSPACE_MENU_SEARCH:!0,ENDSPACE_POST_LIST_COVER:!0,ENDSPACE_POST_LIST_PREVIEW:!0,ENDSPACE_ARTICLE_LAYOUT_VERTICAL:!1,ENDSPACE_ARTICLE_ADJACENT:!0,ENDSPACE_WIDGET_DARK_MODE:!0}},14442:function(e,t,n){var a=n(67294),r=a&&"object"==typeof a&&"default"in a?a:{default:a},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o=function(e,t){var n={};for(var a in e)!(t.indexOf(a)>=0)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n},s=function(e){var t=e.color,n=e.size,a=void 0===n?24:n,s=(e.children,o(e,["color","size","children"])),i="remixicon-icon "+(s.className||"");return r.default.createElement("svg",l({},s,{className:i,width:a,height:a,fill:void 0===t?"currentColor":t,viewBox:"0 0 24 24"}),r.default.createElement("path",{d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2z"}))},i=r.default.memo?r.default.memo(s):s;e.exports=i},77240:function(e,t,n){var a=n(67294),r=a&&"object"==typeof a&&"default"in a?a:{default:a},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o=function(e,t){var n={};for(var a in e)!(t.indexOf(a)>=0)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n},s=function(e){var t=e.color,n=e.size,a=void 0===n?24:n,s=(e.children,o(e,["color","size","children"])),i="remixicon-icon "+(s.className||"");return r.default.createElement("svg",l({},s,{className:i,width:a,height:a,fill:void 0===t?"currentColor":t,viewBox:"0 0 24 24"}),r.default.createElement("path",{d:"M10.9 2.1l9.899 1.415 1.414 9.9-9.192 9.192a1 1 0 0 1-1.414 0l-9.9-9.9a1 1 0 0 1 0-1.414L10.9 2.1zm2.828 8.486a2 2 0 1 0 2.828-2.829 2 2 0 0 0-2.828 2.829z"}))},i=r.default.memo?r.default.memo(s):s;e.exports=i},11327:function(e,t,n){var a=n(67294),r=a&&"object"==typeof a&&"default"in a?a:{default:a},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o=function(e,t){var n={};for(var a in e)!(t.indexOf(a)>=0)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n},s=function(e){var t=e.color,n=e.size,a=void 0===n?24:n,s=(e.children,o(e,["color","size","children"])),i="remixicon-icon "+(s.className||"");return r.default.createElement("svg",l({},s,{className:i,width:a,height:a,fill:void 0===t?"currentColor":t,viewBox:"0 0 24 24"}),r.default.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm1-10V7h-2v7h6v-2h-4z"}))},i=r.default.memo?r.default.memo(s):s;e.exports=i},40885:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(67294),r={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"
1currentColor",stroke:"none"}};let l=(e,t,n,l)=>{let o=(0,a.forwardRef)((n,o)=>{let{color:s="currentColor",size:i=24,stroke:c=2,title:d,className:h,children:u,...f}=n;return(0,a.createElement)("svg",{ref:o,...r[e],width:i,height:i,className:["tabler-icon","tabler-icon-".concat(t),h].join(" "),..."filled"===e?{fill:s}:{strokeWidth:c,stroke:s},...f},[d&&(0,a.createElement)("title",{key:"svg-title"},d),...l.map(e=>{let[t,n]=e;return(0,a.createElement)(t,n)}),...Array.isArray(u)?u:[u]])});return o.displayName="".concat(n),o}},21317:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","arrow-up","ArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]])},3794:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","clock","Clock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]])},83531:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","list-tree","ListTree",[["path",{d:"M9 6h11",key:"svg-0"}],["path",{d:"M12 12h8",key:"svg-1"}],["path",{d:"M15 18h5",key:"svg-2"}],["path",{d:"M5 6v.01",key:"svg-3"}],["path",{d:"M8 12v.01",key:"svg-4"}],["path",{d:"M11 18v.01",key:"svg-5"}]])},81803:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","message","Message",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-2"}]])},57623:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","moon","Moon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]])},91158:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","sun","Sun",[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]])},70772:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(40885).Z)("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]])}}]);

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.