1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5734],{38370:function(e,t,a){a.r(t),a.d(t,{Header:function(){return i}});var r=a(85893),l=a(21384),s=a(7835),n=a(14310);let i=e=>(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("header",{className:"w-full px-8 h-20 z-30 flex lg:flex-row md:flex-col justify-center items-center",children:[(0,r.jsx)(s.Z,{href:"/",className:"logo whitespace-nowrap text-2xl md:text-3xl text-gray-dark no-underline flex items-center",children:(0,l.JA)("TITLE")}),(0,r.jsx)("div",{className:"ml-6 mt-7",children:(0,r.jsx)(n.default,{...e})})]})})},14310:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var r=a(85893),l=a(91627),s=a(21384),n=a(33530),i=a(11163),o=a(67294),c=a(48941),u=a(29473),d=a(23004);function f(e){let t=(0,i.useRouter)(),{customNav:a,customMenu:f}=e,{locale:m}=(0,n.O)(),[h,x]=(0,o.useState)(!1),{collapseRef:p}=(0,c.usePhotoGlobal)(),v=()=>{x(!1)},j=[{id:1,icon:"fa-solid fa-house",name:m.NAV.INDEX,href:"/",show:(0,s.JA)("PHOTO_MENU_INDEX",null,u.default)},{id:2,icon:"fas fa-search",name:m.NAV.SEARCH,href:"/search",show:(0,s.JA)("PHOTO_MENU_SEARCH",null,u.default)},{id:3,icon:"fas fa-archive",name:m.NAV.ARCHIVE,href:"/archive",show:(0,s.JA)("PHOTO_MENU_ARCHIVE",null,u.default)}];a&&(j=j.concat(a));for(let e=0;e<j.length;e++)j[e].id!==e&&(j[e].id=e);(0,s.JA)("CUSTOM_MENU")&&(j=f);let[y,g]=(0,o.useState)((0,s.JA)("BIO"));return(0,o.useEffect)(()=>{let e=j.find(e=>e.href===t.pathname);e&&g(e.name),v()},[t]),(0,r.jsxs)("div",{className:"absolute top-0 mt-7 italic text-gray-700 dark:text-gray-200",children:[(0,r.jsx)("div",{onClick:()=>{x(!h)},className:" whitespace-nowrap cursor-pointer",children:y}),(0,r.jsx)(l.Z,{className:"z-50",collapseRef:p,type:"vertical",isOpen:h,children:(0,r.jsx)("menu",{id:"nav-menu-mobile",className:"my-4 space-y-4 justify-start",children:null==j?void 0:j.map((e,t)=>e&&e.show&&(0,r.jsx)(d.MenuItemCollapse,{onHeightChange:e=>{var t;return null===(t=p.current)||void 0===t?void 0:t.updateCollapseHeight(e)},link:e},t))})}),h&&(0,r.jsx)("div",{onClick:v,className:"-z-10 fixed top-0 left-0 w-full h-full flex items-center justify-center bg-glassmorphism"})]})}},48941:function(e,t,a){a.r(t),a.d(t,{Layout404:function(){return U},LayoutArchive:function(){return G},LayoutBase:function(){return J},LayoutCategoryIndex:function(){return V},LayoutIndex:function(){return M},LayoutPostList:function(){return q},LayoutSearch:function(){return D},LayoutSlug:function(){return B},LayoutTagIndex:function(){return z},THEME_CONFIG:function(){return R.default},usePhotoGlobal:function(){return F}});var r=a(85893),l=a(34701),s=a(83610),n=a(834),i=a(88752),o=a(26416),c=a(21384),u=a(33530),d=a(39995),f=a(47935),m=a(89121),h=a(11163),x=a(67294),p=a(99109),v=a(26095),j=a(48299),y=a(74219),g=a(41869),w=a(48791),N=a(58009),A=a(98715),E=a(19748),C=a(13452),O=a(38370),b=a(79852),S=a(57522),_=a(93237),L=a(15885),T=a(67336),I=a(73609),k=a(91269),R=a(29473),H=a(86226);let P=(0,x.createContext)(),F=()=>(0,x.useContext)(P),J=e=>{let{children:t,slotTop:a}=e,{onLoading:s,fullWidth:n}=(0,u.O)(),i=(0,x.useRef)(null),o=(0,h.useRouter)(),f=(0,x.useRef)(null),[p,v]=(0,x.useState)(!1);(0,x.useEffect)(()=>{(0,d.f)()},[]);let j="/"===o.route&&(0,c.JA)("PHOTO_HOME_BACKGROUND",null,R.default)?(0,r.jsx)(b.HomeBackgroundImage,{}):null;return(0,r.jsx)(P.Provider,{value:{searchModal:f,expandMenu:p,updateExpandMenu:v,collapseRef:i},children:(0,r.jsxs)("div",{id:"theme-photo",className:"".concat((0,c.JA)("FONT_STYLE")," dark:text-gray-300 duration-300 transition-all bg-white dark:bg-[#2A2A2A] scroll-smooth min-h-screen flex flex-col justify-between"),children:[(0,r.jsx)(H.Style,{}),(0,r.jsx)(O.Header,{...e}),j,(0,r.jsx)("div",{id:"container-inner",className:"w-full relative flex-grow z-10",children:(0,r.jsx)("div",{id:"container-wrapper",className:(JSON.parse((0,c.JA)("LAYOUT_SIDEBAR_REVERSE"))?"flex-row-reverse":"")+"relative mx-auto justify-center md:flex items-start",children:(0,r.jsx)("div",{className:"w-full ".concat(""," px-0"),children:(0,r.jsxs)(m.u,{show:!s,appear:!0,enter:"transition ease-in-out duration-700 transform order-first",enterFrom:"opacity-0 translate-y-16",enterTo:"opacity-100",leave:"transition ease-in-out duration-300 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-16",unmount:!1,children:[a,t]})})})}),(0,r.jsx)(C.Footer,{...e}),(0,r.jsx)(l.default,{cRef:f,...e}),(0,r.jsx)("div",{className:"fixed right-4 bottom-4 z-10",children:(0,r.jsx)(S.default,{})})]})})},M=e=>(0,r.jsx)(q,{...e}),q=e=>(0,r.jsxs)("div",{className:"mx-auto",children:[(0,r.jsx)(L.default,{...e}),(0,r.jsx)(T.default,{...e}),(0,r.jsx)(p.default,{...e,className:"mx-auto w-full max-w-5xl my-12"})]}),B=e=>{let{post:t,lock:a,validPassword:l}=e,n=(0,h.useRouter)(),u=1e3*(0,c.JA)("POST_WAITING_TIME_FOR_404");return(0,x.useEffect)(()=>(setTimeout(()=>{!function(){let e=document.querySelector("#article-wrapper #notion-article");
1if(!e)return;let t=document.querySelectorAll(".notion-asset-wrapper");if(!t||0===t.length)return;let a=document.querySelectorAll(".video-wrapper");if(a&&a.length>0)return;let r=document.createElement("div");r.className="video-wrapper py-1 px-3 bg-gray-100 dark:bg-white dark:text-black mx-auto";let l=document.createElement("div");l.classList.add("notion-carousel-wrapper");let s=[];t.forEach((e,t)=>{var a;let r=e.querySelector("figcaption");if(!e.classList.contains("notion-asset-wrapper-video")&&!e.classList.contains("notion-asset-wrapper-embed")||!r)return;let n=r?null==r?void 0:null===(a=r.textContent)||void 0===a?void 0:a.trim():"P-".concat(t);s.push(n);let i=document.createElement("div");i.classList.add("notion-carousel"),i.appendChild(e);let o=e.querySelector("iframe");o&&(null==o||o.setAttribute("data-src",null==o?void 0:o.getAttribute("src"))),0===t?i.classList.add("active"):null==o||o.setAttribute("src",""),l.appendChild(i)});let n=document.createElement("div");n.className="notion-carousel-route py-2 max-h-36 overflow-y-auto",s.forEach(e=>{let t=document.createElement("div");t.textContent=e,t.addEventListener("click",function(){document.querySelectorAll(".notion-carousel").forEach(t=>{let a=t.querySelector("iframe");if(t.querySelector("figcaption").textContent.trim()===e)t.classList.add("active"),a&&a.setAttribute("src",a.getAttribute("data-src"));else{var r;t.classList.remove("active"),null===(r=t.querySelectorAll("video"))||void 0===r||r.forEach(e=>{e.pause()}),a&&a.setAttribute("src","")}})}),n.appendChild(t)}),l.children.length>0&&(r.appendChild(l),(n.children.length>1||(0,c.JA)("PHOTO_VIDEO_COMBINE_SHOW_PAGE_FORCE",!1,R.default))&&r.appendChild(n),e.firstChild&&e.contains(e.firstChild)?e.insertBefore(r,e.firstChild):e.appendChild(r))}()},1500),t||setTimeout(()=>{f.isBrowser&&!document.querySelector("#article-wrapper #notion-article")&&n.push("/404").then(()=>{console.warn("æ¾ä¸å°é¡µé¢",n.asPath)})},u),()=>{document.querySelectorAll(".video-wrapper").forEach(e=>{e.parentNode.removeChild(e)})}),[t]),(0,r.jsx)(r.Fragment,{children:a?(0,r.jsx)(g.ArticleLock,{validPassword:l}):t&&(0,r.jsxs)("div",{id:"article-wrapper",className:"px-2 max-w-5xl 2xl:max-w-[70%] mx-auto",children:[(0,r.jsx)(y.ArticleHeader,{post:t}),(0,r.jsx)(i.default,{post:t}),(0,r.jsx)(j.default,{post:t}),(0,r.jsx)(N.default,{...e}),(0,r.jsx)(o.default,{post:t}),(0,r.jsx)(s.default,{frontMatter:t})]})})},U=e=>{let{locale:t}=(0,u.O)(),{searchModal:a}=F(),l=(0,h.useRouter)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"h-52",children:[(0,r.jsx)("h2",{className:"text-4xl",children:t.COMMON.NO_RESULTS_FOUND}),(0,r.jsx)("hr",{className:"my-4"}),(0,r.jsxs)("div",{className:"max-w-md relative",children:[(0,r.jsx)("input",{autoFocus:!0,id:"search",onClick:()=>{(0,c.JA)("ALGOLIA_APP_ID")&&a.current.openSearch()},onKeyUp:e=>{if(13===e.keyCode){let e=document.getElementById("search").value;e&&l.push({pathname:"/search/"+e})}},className:"float-left w-full outline-none h-full p-2 rounded dark:bg-[#383838] bg-gray-100","aria-label":"Submit search",type:"search",name:"s",autoComplete:"off",placeholder:"Type then hit enter to search..."}),(0,r.jsx)("i",{className:"fas fa-search absolute right-0 my-auto p-2"})]})]}),(0,r.jsxs)("div",{className:"h-full flex-grow grid grid-cols-4 gap-4",children:[(0,r.jsx)(_.default,{...e}),(0,r.jsx)(A.default,{...e}),(0,r.jsx)(v.default,{...e}),(0,r.jsx)(I.default,{...e})]})]})},D=e=>{let{keyword:t}=e,a=(0,h.useRouter)();return(0,x.useEffect)(()=>{if(f.isBrowser){let e=document.getElementById("posts-wrapper");t&&e&&(0,n.Z)({doms:e,search:t,target:{element:"span",className:"text-red-500 border-b border-dashed"}})}},[a]),(0,r.jsx)(q,{...e})},G=e=>{let{archivePosts:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"mb-10 pb-20 md:py-12 p-3 min-h-screen w-full max-w-5xl 2xl:max-w-[70%] mx-auto",children:Object.keys(t).map(e=>(0,r.jsx)(w.default,{archiveTitle:e,archivePosts:t},e))})})},V=e=>{let{categoryOptions:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{id:"category-list",className:"duration-200 flex flex-wrap",children:null==t?void 0:t.map(e=>(0,r.jsx)(E.default,{category:e},e.name))})})},z=e=>{let{tagOptions:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{id:"tags-list",className:"duration-200 flex flex-wrap",children:t.map(e=>(0,r.jsx)(k.default,{tag:e},e.name))})})}}}]);
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.