1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55954],{26434:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[prefix]",function(){return n(58979)}])},58979:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return N},default:function(){return O}});var o=n(85893),r=n(43551),l=n.n(r),a=n(67294),i=()=>{let[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(!1),l=()=>{r(!1),t("")};return{showNotification:e=>{t(e),r(!0),setTimeout(()=>{l()},3e3)},closeNotification:l,Notification:()=>(0,o.jsx)("div",{className:"notification fixed left-0 w-full px-2 z-20 bottom-14",children:(0,o.jsxs)("div",{className:" ".concat(n&&e?"opacity-100 ":"invisible opacity-0 bottom-0"," transition-opacity duration-200 \n max-w-3xl mx-auto bg-green-500 flex items-center justify-between px-4 py-2 text-white rounded-lg shadow-lg"),children:[e,(0,o.jsx)("button",{onClick:l,className:"ml-4 p-2 cursor-pointer bg-transparent text-white border-none",children:(0,o.jsx)("i",{className:"fas fa-times"})})]})})}},s=n(69325),u=n(93348),c=n(78174),d=n(11163);let f=e=>{document.querySelectorAll("a.catalog-item").forEach(t=>{e?(t.style.pointerEvents="none",t.style.opacity="0.5"):(t.style.pointerEvents="auto",t.style.opacity="1")})};function p(e,t){if(!e||!t)return!1;let n=e.replace(/\?.*$/,"").replace(/.*\/([^/]+)(?:\.html)?$/,"$1");return t.includes(n)}var _=()=>{let e=(0,d.useRouter)(),t=(0,s.JA)("OPEN_WRITE_QRCODE","请é
ç½®å
¬ä¼å·äºç»´ç "),n=(0,s.JA)("OPEN_WRITE_BLOG_ID"),r=(0,s.JA)("OPEN_WRITE_NAME","请é
ç½®å
¬ä¼å·å"),l=(0,s.JA)("OPEN_WRITE_KEYWORD","请é
ç½®å
¬ä¼å·å
³é®è¯"),i=(0,s.JA)("OPEN_WRITE_BTN_TEXT","åå䏿ï¼å®æäººæºæ£æµï¼é
读å
¨æ"),_=(0,s.JA)("OPEN_WRITE_VALIDITY_DURATION",1),v=(0,s.JA)("OPEN_WRITE_WHITE_LIST",""),w=(0,s.JA)("OPEN_WRITE_YELLOW_LIST",""),{isLoaded:E,isSignedIn:m}=(0,u.O)(),h=async()=>{try{var e;await (0,c.loadExternalResource)("https://readmore.openwrite.cn/js/readmore-2.0.js","js");let o=null===(e=window)||void 0===e?void 0:e.BTWPlugin;if(o){let e=new o;window.btw=e,e.init({qrcode:t,id:"article-wrapper",name:r,btnText:i,keyword:l,blogId:n,cookieAge:_});let a=setInterval(()=>{let e=document.getElementById("read-more-wrap"),t=document.getElementById("article-wrapper");!e&&t&&(f(!1),t.style.height="auto",clearInterval(a))},1e3);return()=>clearInterval(a)}}catch(e){console.error("OpenWrite å è½½å¼å¸¸",e)}};return(0,a.useEffect)(()=>{let t=p(e.asPath,w),o=p(e.asPath,v);if(w&&w.length>0){if(!t){console.log("å½åè·¯å¾ä¸å¨é»ååä¸ï¼æ¾è¡");return}}else if(o){console.log("å½åè·¯å¾å¨ç½ååä¸ï¼æ¾è¡");return}if(m){console.log("ç¨æ·å·²ç»å½ï¼æ¾è¡");return}c.isBrowser&&n&&!m&&(f(!0),document.getElementById("read-more-wrap")||h())},[E,e]),(0,o.jsx)(o.Fragment,{})},v=n(22362);let w={header:0,sub_header:1,sub_sub_header:2},E=(e,t)=>{var n;let o=function e(t,n,o){if(o||(o=[]),!t)return o;for(let i of t){var r,l,a;let t=null===(r=n.block[i])||void 0===r?void 0:r.value;if(!t)continue;let{type:s}=t;(null===(l=t.content)||void 0===l?void 0:l.length)>0?e(t.content,n,o):s.indexOf("header")>=0?o.find(e=>e.id===i)||o.push({id:i,type:s,text:(0,v.FB)(null===(a=t.properties)||void 0===a?void 0:a.title),indentLevel:w[s]}):"transclusion_reference"===s?e([t.format.transclusion_reference_pointer.id],n,o):"transclusion_container"===s&&e(t.content,n,o)}return o}(null!==(n=e.content)&&void 0!==n?n:[],t),r=[{actual:-1,effective:-1}];for(let e of o){let{indentLevel:t}=e;for(;;){let{actual:n,effective:o}=r[r.length-1];if(t>n)e.indentLevel=o+1,r.push({actual:t,effective:e.indentLevel});else if(t===n){e.indentLevel=o;break}else r.pop()}}return o},m=e=>{let t=new URL(e,c.isBrowser?window.location.origin:""),n=Object.fromEntries(t.searchParams.entries());n.password&&localStorage.setItem("password_default",n.password);let o=t.pathname,r=localStorage.getItem("password_"+o),l=localStorage.getItem("password_default");return[n.password,r,l].filter(Boolean)};var h=n(31123),g=n(88495),I=n.n(g),N=!0,O=e=>{let{post:t}=e,n=(0,d.useRouter)(),{locale:r}=(0,u.O)(),[c,f]=(0,a.useState)((null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""),{showNotification:p,Notification:v}=i(),w=e=>{if(!t)return!1;let o=I()((null==t?void 0:t.slug)+e);return!!e&&o===(null==t?void 0:t.password)&&(f(!1),localStorage.setItem("password_"+n.asPath,e),p(r.COMMON.ARTICLE_UNLOCK_TIPS),!0)};(0,a.useEffect)(()=>{(null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""?f(!0):f(!1);let e=m(n.asPath);if(e.length>0){for(let t of e)if(w(t))break}},[t]),(0,a.useEffect)(()=>{var e;!c&&(null==t?void 0:null===(e=t.blockMap)||void 0===e?void 0:e.block)&&(t.content=Object.keys(t.blockMap.block).filter(e=>{var n,o;return(null===(o=t.blockMap.block[e])||void 0===o?void 0:null===(n=o.value)||void 0===n?void 0:n.parent_id)===t.id}),t.toc=E(t,t.blockMap))},[n,c]),e={...e,lock:c,validPassword:w};let g=(0,s.JA)("THEME",l().THEME,e.NOTION_CONFIG);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(h.DynamicLayout,{theme:g,layoutName:"LayoutSlug",...e}),(null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""&&!c&&(0,o.jsx)(v,{}),(0,o.jsx)(_,{})]})}}},function(e){e.O(0,[88495,92888,49774,40179],function(){return e(e.s=26434)}),_N_E=e.O()}]);
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.