mycpen-blog 0.0.0-ejbnwsbmci → 0.0.0-ejccazbfuo

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- function butterfly_swiper_injector_config(){document.getElementById("recent-posts").insertAdjacentHTML("afterbegin",'<div class="recent-post-item swiper_container_card" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/16589f92.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/zhuanzai160px.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-12-03</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/16589f92.html&quot;);" href="javascript:void(0);" alt="">01_转载-图床搭建 Backblaze B2 + Cloudflare CDN</a><div class="blog-slider__text">文章转载</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/16589f92.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/88a726.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/other-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-10</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/88a726.html&quot;);" href="javascript:void(0);" alt="">01_Other-Supervisor管理进程-Twikoo版本升级</a><div class="blog-slider__text">其他分类</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/88a726.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/5552.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/error-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-09</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/5552.html&quot;);" href="javascript:void(0);" alt="">01_Error-Nginx 反代后端接口报错</a><div class="blog-slider__text">Troubleshooting</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/5552.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/63259.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/php-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-08</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/63259.html&quot;);" href="javascript:void(0);" alt="">01_PHP-CentOS8.2 编译安装 PHP8.1.10</a><div class="blog-slider__text">一种开源的通用计算机脚本语言</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/63259.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/16756.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/python-logo3.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/16756.html&quot;);" href="javascript:void(0);" alt="">01_Python-CSDN_环境搭建</a><div class="blog-slider__text">一种广泛使用的解释型、高级和通用的编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/16756.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/14763.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/django-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-24</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/14763.html&quot;);" href="javascript:void(0);" alt="">01_Django-介绍-项目结构-URL和视图函数</a><div class="blog-slider__text">一个开放源代码的 Web 应用框架</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/14763.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/12907.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/java-logo3.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-21</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/12907.html&quot;);" href="javascript:void(0);" alt="">01_Java-特性-jdk-运行机制-转义字符-注释-代码规范</a><div class="blog-slider__text">一种广泛使用的计算机编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/12907.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/8236.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/hexo-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-20</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/8236.html&quot;);" href="javascript:void(0);" alt="">01_Hexo-Hexo + Pure搭建博客-自定义</a><div class="blog-slider__text">一个快速、简洁且高效的博客框架</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/8236.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/48860.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyunetadxq/image/blog/logo/linux-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-08-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/48860.html&quot;);" href="javascript:void(0);" alt="">01_Linux基础-部署-VMware-Xshell-Xftp-内核-安迪比尔定理</a><div class="blog-slider__text">一种自由和开放源码的类 UNIX 操作系统</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/48860.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div><div id="random"><div id="random-banner"><canvas id="peoplecanvas"></canvas></div><a id="random-hover" style="width:100%;height:auto;" href="javascript:toRandomPost()" rel="external nofollow noreferrer" one-link-mark="yes"><i class="fa fa-paper-plane" style="margin-left:13px"></i><div style="margin-left:13px;-webkit-line-clamp: 1;overflow: hidden;-webkit-box-orient: vertical;display: -webkit-box;word-break: break-all;">随便逛逛</div><i class="fa-solid fa-arrow-right" style="margin-left:107px"></i></a></div></div>')}function whenDOMReadyHomePageSwiper(){for(var l="undefined".split(","),t=location.pathname,o=0;o<l.length;o++)t.includes(l[o])&&0;document.getElementById("mycpen1-home-first-page-tag")&&butterfly_swiper_injector_config();var a=new Swiper(".blog-slider",{passiveListeners:!0,spaceBetween:30,effect:"fade",loop:!0,autoplay:{disableOnInteraction:!0,delay:3e3},mousewheel:!0,pagination:{el:".blog-slider__pagination",clickable:!0}}),s=document.getElementById("swiper_container");null!==s&&(s.onmouseenter=function(){a.autoplay.stop()},s.onmouseleave=function(){a.autoplay.start()})}whenDOMReadyHomePageSwiper(),document.addEventListener("pjax:complete",whenDOMReadyHomePageSwiper);
1
+ function butterfly_swiper_injector_config(){document.getElementById("recent-posts").insertAdjacentHTML("afterbegin",'<div class="recent-post-item swiper_container_card" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/16589f92.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/zhuanzai160px.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-12-03</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/16589f92.html&quot;);" href="javascript:void(0);" alt="">01_转载-图床搭建 Backblaze B2 + Cloudflare CDN</a><div class="blog-slider__text">文章转载</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/16589f92.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/88a726.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/other-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-10</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/88a726.html&quot;);" href="javascript:void(0);" alt="">01_Other-Supervisor管理进程-Twikoo版本升级</a><div class="blog-slider__text">其他分类</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/88a726.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/5552.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/error-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-09</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/5552.html&quot;);" href="javascript:void(0);" alt="">01_Error-Nginx 反代后端接口报错</a><div class="blog-slider__text">Troubleshooting</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/5552.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/63259.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/php-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-08</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/63259.html&quot;);" href="javascript:void(0);" alt="">01_PHP-CentOS8.2 编译安装 PHP8.1.10</a><div class="blog-slider__text">一种开源的通用计算机脚本语言</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/63259.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/16756.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/python-logo3.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/16756.html&quot;);" href="javascript:void(0);" alt="">01_Python-CSDN_环境搭建</a><div class="blog-slider__text">一种广泛使用的解释型、高级和通用的编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/16756.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/14763.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/django-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-24</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/14763.html&quot;);" href="javascript:void(0);" alt="">01_Django-介绍-项目结构-URL和视图函数</a><div class="blog-slider__text">一个开放源代码的 Web 应用框架</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/14763.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/12907.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/java-logo3.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-21</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/12907.html&quot;);" href="javascript:void(0);" alt="">01_Java-特性-jdk-运行机制-转义字符-注释-代码规范</a><div class="blog-slider__text">一种广泛使用的计算机编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/12907.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/8236.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/hexo-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-20</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/8236.html&quot;);" href="javascript:void(0);" alt="">01_Hexo-Hexo + Pure搭建博客-自定义</a><div class="blog-slider__text">一个快速、简洁且高效的博客框架</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/8236.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/48860.html&quot;);" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/linux-logo2.png" alt="" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-08-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/48860.html&quot;);" href="javascript:void(0);" alt="">01_Linux基础-部署-VMware-Xshell-Xftp-内核-安迪比尔定理</a><div class="blog-slider__text">一种自由和开放源码的类 UNIX 操作系统</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/48860.html&quot;);" href="javascript:void(0);" alt="">详情 </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div><div id="random"><div id="random-banner"><canvas id="peoplecanvas"></canvas></div><a id="random-hover" style="width:100%;height:auto;" href="javascript:toRandomPost()" rel="external nofollow noreferrer" one-link-mark="yes"><i class="fa fa-paper-plane" style="margin-left:13px"></i><div style="margin-left:13px;-webkit-line-clamp: 1;overflow: hidden;-webkit-box-orient: vertical;display: -webkit-box;word-break: break-all;">随便逛逛</div><i class="fa-solid fa-arrow-right" style="margin-left:107px"></i></a></div></div>')}function whenDOMReadyHomePageSwiper(){for(var l="undefined".split(","),t=location.pathname,o=0;o<l.length;o++)t.includes(l[o])&&0;document.getElementById("mycpen1-home-first-page-tag")&&butterfly_swiper_injector_config();var a=new Swiper(".blog-slider",{passiveListeners:!0,spaceBetween:30,effect:"fade",loop:!0,autoplay:{disableOnInteraction:!0,delay:3e3},mousewheel:!0,pagination:{el:".blog-slider__pagination",clickable:!0}}),s=document.getElementById("swiper_container");null!==s&&(s.onmouseenter=function(){a.autoplay.stop()},s.onmouseleave=function(){a.autoplay.start()})}whenDOMReadyHomePageSwiper(),document.addEventListener("pjax:complete",whenDOMReadyHomePageSwiper);x2248\x22\x20src=\x22https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/hexo-logo2.png\x22\x20alt=\x22\x22\x20onerror=\x22this.onerror=null,this.src=&quot;/img/404.jpg&quot;\x22/></a><div\x20class=\x22blog-slider__content\x22><span\x20class=\x22blog-slider__code\x22>2022-09-20</span><a\x20class=\x22blog-slider__title\x22\x20onclick=\x22pjax.loadUrl(&quot;posts/8236.html&quot;);\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>01_Hexo-Hexo\x20+\x20Pure搭建博客-自定义</a><div\x20class=\x22blog-slider__text\x22>一个快速、简洁且高效的博客框架</div><a\x20class=\x22blog-slider__button\x22\x20onclick=\x22pjax.loadUrl(&quot;posts/8236.html&quot;);\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>详情\x20\x20\x20\x20\x20\x20\x20</a></div></div><div\x20class=\x22blog-slider__item\x20swiper-slide\x22\x20style=\x22width:\x20750px;\x20opacity:\x201;\x20transform:\x20translate3d(0px,\x200px,\x200px);\x20transition-duration:\x200ms;\x22><a\x20class=\x22blog-slider__img\x22\x20onclick=\x22pjax.loadUrl(&quot;posts/48860.html&quot;);\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22><img\x20class=\x22nolazyload\x22\x20width=\x2248\x22\x20height=\x2248\x22\x20src=\x22https://open.lightxi.com/unpkg/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/linux-logo2.png\x22\x20alt=\x22\x22\x20onerror=\x22this.onerror=null,this.src=&quot;/img/404.jpg&quot;\x22/></a><div\x20class=\x22blog-slider__content\x22><span\x20class=\x22blog-slider__code\x22>2022-08-28</span><a\x20class=\x22blog-slider__title\x22\x20onclick=\x22pjax.loadUrl(&quot;posts/48860.html&quot;);\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>01_Linux基础-部署-VMware-Xshell-Xftp-内核-安迪比尔定理</a><div\x20class=\x22blog-slider__text\x22>一种自由和开放源码的类\x20UNIX\x20操作系统</div><a\x20class=\x22blog-slider__button\x22\x20onclick=\x22pjax.loadUrl(&quot;posts/48860.html&quot;);\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>详情\x20\x20\x20\x20\x20\x20\x20</a></div></div></div><div\x20class=\x22blog-slider__pagination\x20swiper-pagination-clickable\x20swiper-pagination-bullets\x22></div></div><div\x20id=\x22random\x22><div\x20id=\x22random-banner\x22><canvas\x20id=\x22peoplecanvas\x22></canvas></div><a\x20id=\x22random-hover\x22\x20style=\x22width:100%;height:auto;\x22\x20href=\x22javascript:toRandomPost()\x22\x20rel=\x22external\x20nofollow\x20noreferrer\x22\x20one-link-mark=\x22yes\x22><i\x20class=\x22fa\x20fa-paper-plane\x22\x20style=\x22margin-left:13px\x22></i><div\x20style=\x22margin-left:13px;-webkit-line-clamp:\x201;overflow:\x20hidden;-webkit-box-orient:\x20vertical;display:\x20-webkit-box;word-break:\x20break-all;\x22>随便逛逛</div><i\x20class=\x22fa-solid\x20fa-arrow-right\x22\x20style=\x22margin-left:107px\x22></i></a></div></div>';_0xa988d9[_0x2887e6(0xc3)](_0x2887e6(0xc5),_0x50e03a);}function whenDOMReadyHomePageSwiper(){var _0x202d60=_0x3d95,_0x524835=_0x202d60(0xca)[_0x202d60(0xcc)](','),_0xa63fea=location[_0x202d60(0xd4)],_0x56c262='/',_0x144cff=0x0;for(var _0x3a560a=0x0;_0x3a560a<_0x524835[_0x202d60(0xcd)];_0x3a560a++){_0xa63fea[_0x202d60(0xd5)](_0x524835[_0x3a560a])&&_0x144cff++;}document[_0x202d60(0xbe)](_0x202d60(0xba))&&butterfly_swiper_injector_config();var _0x3f754e=new Swiper(_0x202d60(0xc4),{'passiveListeners':!0x0,'spaceBetween':0x1e,'effect':_0x202d60(0xc6),'loop':!0x0,'autoplay':{'disableOnInteraction':!0x0,'delay':0xbb8},'mousewheel':!0x0,'pagination':{'el':'.blog-slider__pagination','clickable':!0x0}}),_0x4da94=document[_0x202d60(0xbe)](_0x202d60(0xbd));null!==_0x4da94&&(_0x4da94['onmouseenter']=function(){var _0x2b7e05=_0x202d60;_0x3f754e['autoplay'][_0x2b7e05(0xcf)]();},_0x4da94['onmouseleave']=function(){var _0x4f48cb=_0x202d60;_0x3f754e[_0x4f48cb(0xd3)][_0x4f48cb(0xc1)]();});}function _0x56f3(){var _0x554da3=['fade','3327248ArCsrE','174342lOjJYO','4fbnGMP','undefined','pjax:complete','split','length','22fBejZW','stop','891983qfHzCs','105eviIUo','recent-posts','autoplay','pathname','includes','669316SqCJsq','mycpen1-home-first-page-tag','4046160lfepbZ','13620033TPLPPi','swiper_container','getElementById','38024730lxiWte','addEventListener','start','21Jiozjx','insertAdjacentHTML','.blog-slider','afterbegin'];_0x56f3=function(){return _0x554da3;};return _0x56f3();}whenDOMReadyHomePageSwiper(),document[_0xc8958e(0xc0)](_0xc8958e(0xcb),whenDOMReadyHomePageSwiper);
package/js/main.js CHANGED
@@ -1 +1 @@
1
- document.addEventListener("DOMContentLoaded",(function(){let e,t,n=!1;const o=n=>{const o=e=>Array.from(e).reduce(((e,t)=>e+t.offsetWidth),0);if(n){const n=o(document.querySelector("#blog-info > a").children),s=o(document.getElementById("menus").children);e=n+s,t=document.getElementById("nav")}const s=window.innerWidth<=768||e>t.offsetWidth-120;t.classList.toggle("hide-menu",s)},s=()=>{btf.sidebarPaddingR(),document.body.style.overflow="hidden",btf.animateIn(document.getElementById("menu-mask"),"to_show 0.5s"),document.getElementById("sidebar-menus").classList.add("open"),n=!0},i=()=>{const e=document.body;e.style.overflow="",e.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),n=!1},c=()=>{const e=GLOBAL_CONFIG.highlight;if(!e)return;const{highlightCopy:t,highlightLang:n,highlightHeightLimit:o,plugin:s}=e,i=GLOBAL_CONFIG_SITE.isHighlightShrink,c=t||n||void 0!==i,a="highlight.js"===s?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!o||!a.length)return;const l="prismjs"===s,d=!0===i?"closed":"",r=void 0!==i?'<i class="fas fa-angle-down expand"></i>':"",u=t?'<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>':"",m=(e,t)=>{if(void 0!==GLOBAL_CONFIG.Snackbar)btf.snackbarShow(t);else{const n=e.previousElementSibling;n.textContent=t,n.style.opacity=1,setTimeout((()=>{n.style.opacity=0}),800)}},g=e=>{const t=e.parentNode;t.classList.add("copy-true");const n=window.getSelection(),o=document.createRange(),s=l?"pre code":"table .code pre";var i;o.selectNodeContents(t.querySelectorAll(`${s}`)[0]),n.removeAllRanges(),n.addRange(o),i=e.lastChild,document.queryCommandSupported&&document.queryCommandSupported("copy")?(document.execCommand("copy"),m(i,GLOBAL_CONFIG.copy.success)):m(i,GLOBAL_CONFIG.copy.noSupport),n.removeAllRanges(),t.classList.remove("copy-true")},h=function(e){const t=e.target.classList;t.contains("expand")?this.classList.toggle("closed"):t.contains("copy-button")&&g(this)},f=function(){this.classList.toggle("expand-done")},L=(e,t,n)=>{const s=document.createDocumentFragment();if(c){const t=document.createElement("div");t.className=`highlight-tools ${d}`,t.innerHTML=r+e+u,btf.addEventListenerPjax(t,"click",h),s.appendChild(t)}if(o&&t.offsetHeight>o+30){const e=document.createElement("div");e.className="code-expand-btn",e.innerHTML='<i class="fas fa-angle-double-down"></i>',btf.addEventListenerPjax(e,"click",f),s.appendChild(e)}"hl"===n?t.insertBefore(s,t.firstChild):t.parentNode.insertBefore(s,t)};l?a.forEach((e=>{if(n){const t=`<div class="code-lang">${e.getAttribute("data-language")||"Code"}</div>`;btf.wrap(e,"figure",{class:"highlight"}),L(t,e)}else btf.wrap(e,"figure",{class:"highlight"}),L("",e)})):a.forEach((e=>{if(n){let t=e.getAttribute("class").split(" ")[1];"plain"!==t&&void 0!==t||(t="Code");L(`<div class="code-lang">${t}</div>`,e,"hl")}else L("",e,"hl")}))},a=async e=>{const t=await fetch(e);return await t.json()},l=(e,t,n=!1,o)=>{const s=t.length,i=new InfiniteGrid.JustifiedInfiniteGrid(e,{gap:5,isConstantSize:!0,sizeRange:[150,600],useResizeObserver:!0,observeChildren:!0,useTransform:!0});o&&btf.addGlobalFn("igOfTabs",(()=>{i.destroy()}),!1,o);const c=e=>e.replace(/"/g,"&quot;"),a=GLOBAL_CONFIG.infinitegrid.buttonText,l=(e,n)=>{i.append(((e,n)=>{const o=[],i=(e-1)*n;for(let e=0;e<n;++e){const n=i+e;if(n>=s)break;const a=t[n],l=a.alt?`alt="${c(a.alt)}"`:"",d=a.title?`title="${c(a.title)}"`:"";o.push(`<div class="item ">\n <img src="${a.url}" data-grid-maintained-target="true" ${l+d} />\n </div>`)}return o})(e,n),e)},d=Math.ceil(s/10),r=t=>{const{updated:o,isResize:s,mounted:c}=t;if(o.length&&c.length&&!s){if(btf.loadLightbox(e.querySelectorAll("img:not(.medium-zoom-image)")),i.getGroups().length===d)return btf.setLoading.remove(e),void i.off("renderComplete",r);n&&(btf.setLoading.remove(e),(e=>{const t=document.createElement("button");t.textContent=a;const n=t=>{t.target.removeEventListener("click",n),t.target.remove(),btf.setLoading.add(e),l(i.getGroups().length+1,10)};t.addEventListener("click",n),e.insertAdjacentElement("afterend",t)})(e))}},u=btf.debounce((e=>{const t=(+e.groupKey||0)+1;l(t,10),t===d&&i.off("requestAppend",u)}),300);btf.setLoading.add(e),i.on("renderComplete",r),n?l(1,10):(i.on("requestAppend",u),i.renderItems()),btf.addGlobalFn("justifiedGallery",(()=>{i.destroy()}))},d=async(e,t=!1)=>{const n=async()=>{for(const n of e){if(btf.isHidden(n))continue;if(t&&n.classList.contains("loaded")){n.querySelector(".gallery-items").innerHTML="";const e=n.querySelector(":scope > button"),t=n.querySelector(":scope > .loading-container");e&&e.remove(),t&&t.remove()}const e="true"===n.getAttribute("data-button"),o=n.firstElementChild.textContent;n.classList.add("loaded");const s="url"===n.getAttribute("data-type")?await a(o):JSON.parse(o);l(n.lastElementChild,s,e,t)}};"function"==typeof InfiniteGrid||await getScript(`${GLOBAL_CONFIG.infinitegrid.js}`),n()},r=()=>{const e=document.getElementById("rightside"),t=window.innerHeight+56;let n=0;const o=document.getElementById("page-header"),s="undefined"!=typeof chatBtn,i=GLOBAL_CONFIG.percent.rightside;if(document.body.scrollHeight<=t)return void e.classList.add("rightside-show");let c="";const a=btf.throttle((()=>{const a=window.scrollY||document.documentElement.scrollTop,l=(e=>{const t=e>n;return n=e,t})(a);a>56?(o.classList.add("is-top-bar"),""===c&&(o.classList.add("nav-fixed"),e.classList.add("rightside-show")),l?"down"!==c&&(o.classList.remove("nav-visible"),s&&window.chatBtn.hide(),c="down"):"up"!==c&&(o.classList.add("nav-visible"),s&&window.chatBtn.show(),c="up")):(c="",0===a&&(o.classList.remove("is-top-bar"),o.classList.remove("nav-fixed","nav-visible")),e.classList.remove("rightside-show")),i&&(e=>{const t=btf.getScrollPercent(e,document.body),n=document.getElementById("go-up");t<95?(n.classList.add("show-percent"),n.querySelector(".scroll-percent").textContent=t):n.classList.remove("show-percent")})(a),document.body.scrollHeight<=t&&e.classList.add("rightside-show")}),50);btf.addEventListenerPjax(window,"scroll",a,{passive:!0})},u=()=>{const e=GLOBAL_CONFIG_SITE.isToc,t=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!e&&!t)return;let o,s,i,c,a;if(e){const e=document.getElementById("card-toc");s=e.querySelector(".toc-content"),o=s.querySelectorAll(".toc-link"),c=e.querySelector(".toc-percentage"),a=s.classList.contains("is-expand");const t=t=>{const n=t.target.closest(".toc-link");n&&(t.preventDefault(),btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&e.classList.remove("open"))};btf.addEventListenerPjax(s,"click",t),i=e=>{const t=e.getBoundingClientRect().top,n=s.scrollTop;t>document.documentElement.clientHeight-100&&(s.scrollTop=n+150),t<100&&(s.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let d="";const r=btf.throttle((()=>{const r=window.scrollY||document.documentElement.scrollTop;e&&GLOBAL_CONFIG.percent.toc&&(c.textContent=btf.getScrollPercent(r,n)),(n=>{if(0===n)return!1;let c="",r="";if(l.forEach(((e,t)=>{if(n>btf.getEleTop(e)-80){const n=e.id;c=n?"#"+encodeURI(n):"",r=t}})),d!==r&&(t&&btf.updateAnchor(c),d=r,e)){if(s.querySelectorAll(".active").forEach((e=>{e.classList.remove("active")})),""===c)return;const e=o[r];if(e.classList.add("active"),setTimeout((()=>{i(e)}),0),a)return;let t=e.parentNode;for(;!t.matches(".toc");t=t.parentNode)t.matches("li")&&t.classList.add("active")}})(r)}),50);btf.addEventListenerPjax(window,"scroll",r,{passive:!0})},m=e=>{const t=(window.globalFn||{}).themeChange||{};t&&Object.keys(t).forEach((n=>{const o=t[n];["disqus","disqusjs"].includes(n)?setTimeout((()=>o(e)),300):o(e)}))},g={readmode:()=>{const e=document.body;e.classList.add("read-mode");const t=document.createElement("button");t.type="button",t.className="fas fa-sign-out-alt exit-readmode",e.appendChild(t);const n=()=>{e.classList.remove("read-mode"),t.remove(),t.removeEventListener("click",n)};t.addEventListener("click",n)},darkmode:()=>{const e="dark"===document.documentElement.getAttribute("data-theme")?"light":"dark";"dark"===e?(activateDarkMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)),saveToLocal.set("theme",e,2),m(e)},"rightside-config":e=>{const t=e.firstElementChild;t.classList.contains("show")&&(t.classList.add("status"),setTimeout((()=>{t.classList.remove("status")}),300)),t.classList.toggle("show")},"go-up":()=>{btf.scrollToDest(0,500)},"hide-aside-btn":()=>{const e=document.documentElement.classList,t=e.contains("hide-aside")?"show":"hide";saveToLocal.set("aside-status",t,2),e.toggle("hide-aside")},"mobile-toc-button":e=>{const t=document.getElementById("card-toc");t.style.transition="transform 0.3s ease-in-out",t.classList.toggle("open"),t.addEventListener("transitionend",(()=>{t.style.transition=""}),{once:!0})},"chat-btn":()=>{window.chatBtnFn()},translateLink:()=>{window.translateFn.translatePage()}};document.getElementById("rightside").addEventListener("click",(function(e){const t=e.target.closest("[id]");t&&g[t.id]&&g[t.id](this)}));const h=()=>{const e=document.querySelectorAll("#article-container .hide-button");if(!e.length)return;const t=function(e){this.classList.add("open");const t=this.nextElementSibling.querySelectorAll(".gallery-container");t.length&&d(t)};e.forEach((e=>{e.addEventListener("click",t,{once:!0})}))},f=()=>{const e=document.querySelectorAll("#article-container .tabs");if(!e.length)return;const t=(e,t)=>{Array.from(e).forEach((e=>{e.classList.remove("active"),e!==t&&e.id!==t||e.classList.add("active")}))},n=(e,n)=>{btf.addEventListenerPjax(e.firstElementChild,"click",(function(e){const o=e.target.closest("button");if(o.classList.contains("active"))return;t(this.children,o),this.classList.remove("no-default");const s=o.getAttribute("data-href"),i=this.nextElementSibling;if(t(i.children,s),n){btf.removeGlobalFnEvent("igOfTabs",this);const e=i.querySelectorAll(`:scope > #${s} .gallery-container`);e.length&&d(e,this)}}))};e.forEach((e=>{const t=!!e.querySelectorAll(".gallery-container");n(e,t),(e=>{btf.addEventListenerPjax(e.lastElementChild,"click",(t=>{t.target.closest("button")&&btf.scrollToDest(btf.getEleTop(e),300)}))})(e)}))},L=function(e){e.forEach((e=>{const t=e.getAttribute("datetime");e.textContent=btf.diffDate(t,!0),e.style.display="inline"}))};window.refreshFn=function(){o(!0),t.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&(()=>{const{limitDay:e,messagePrev:t,messageNext:n,position:o}=GLOBAL_CONFIG.noticeOutdate,s=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(s>=e){const e=document.createElement("div");e.className="post-outdate-notice",e.textContent=`${t} ${s} ${n}`;const i=document.getElementById("article-container");"top"===o?i.insertBefore(e,i.firstChild):i.appendChild(e)}})(),GLOBAL_CONFIG.relativeDate.post&&L(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&L(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const e=document.getElementById("runtimeshow");if(e){const t=e.getAttribute("data-publishDate");e.textContent=`${btf.diffDate(t)} ${GLOBAL_CONFIG.runtime}`}})(),(()=>{const e=document.getElementById("last-push-date");if(e){const t=e.getAttribute("data-lastPushDate");e.textContent=btf.diffDate(t,!0)}})(),(()=>{const e=document.querySelector("#aside-cat-list.expandBtn");if(!e)return;btf.addEventListenerPjax(e,"click",(e=>{const t=e.target;"I"===t.nodeName&&(e.preventDefault(),t.parentNode.classList.toggle("expand"))}),!0)})()),u(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const e=document.getElementById("scroll-down");e&&btf.addEventListenerPjax(e,"click",(()=>{btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),c(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((e=>{const t=e.title||e.alt;if(!t)return;const n=document.createElement("div");n.className="img-alt is-center",n.textContent=t,e.insertAdjacentElement("afterend",n)})),r(),btf.removeGlobalFnEvent("justifiedGallery");const e=document.querySelectorAll("#article-container .gallery-container");e.length&&d(e),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const e=document.querySelectorAll("#article-container table");e.length&&e.forEach((e=>{e.closest(".highlight")||btf.wrap(e,"div",{class:"table-wrap"})}))})(),h(),f(),(()=>{const e=document.getElementById("switch-btn");if(!e)return;let t=!1;const n=document.getElementById("post-comment");btf.addEventListenerPjax(e,"click",(()=>{n.classList.toggle("move"),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))})(),btf.addEventListenerPjax(document.getElementById("toggle-menu"),"click",(()=>{s()}))},refreshFn(),window.addEventListener("resize",(()=>{o(!1),n&&btf.isHidden(document.getElementById("toggle-menu"))&&i()})),document.getElementById("menu-mask").addEventListener("click",(e=>{i()})),document.querySelector("#sidebar-menus .menus_items").addEventListener("click",(e=>{const t=e.target.closest(".site-page.group");t&&t.classList.toggle("hide")})),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const{limitCount:e,languages:t}=GLOBAL_CONFIG.copyright;document.body.addEventListener("copy",(n=>{n.preventDefault();const o=window.getSelection(0).toString();let s=o;return o.length>e&&(s=`${o}\n\n\n${t.author}\n${t.link}${window.location.href}\n${t.source}\n${t.info}`),n.clipboardData?n.clipboardData.setData("text",s):window.clipboardData.setData("text",s)}))})(),GLOBAL_CONFIG.autoDarkmode&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>{void 0===saveToLocal.get("theme")&&(e.matches?m("dark"):m("light"))}))}));
1
+ document.addEventListener("DOMContentLoaded",(function(){let e,t,n=!1;const o=n=>{const o=e=>Array.from(e).reduce(((e,t)=>e+t.offsetWidth),0);if(n){const n=o(document.querySelector("#blog-info > a").children),s=o(document.getElementById("menus").children);e=n+s,t=document.getElementById("nav")}const s=window.innerWidth<=768||e>t.offsetWidth-120;t.classList.toggle("hide-menu",s)},s=()=>{btf.sidebarPaddingR(),document.body.style.overflow="hidden",btf.animateIn(document.getElementById("menu-mask"),"to_show 0.5s"),document.getElementById("sidebar-menus").classList.add("open"),n=!0},i=()=>{const e=document.body;e.style.overflow="",e.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),n=!1},c=()=>{const e=GLOBAL_CONFIG.highlight;if(!e)return;const{highlightCopy:t,highlightLang:n,highlightHeightLimit:o,plugin:s}=e,i=GLOBAL_CONFIG_SITE.isHighlightShrink,c=t||n||void 0!==i,a="highlight.js"===s?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!o||!a.length)return;const l="prismjs"===s,d=!0===i?"closed":"",r=void 0!==i?'<i class="fas fa-angle-down expand"></i>':"",u=t?'<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>':"",m=(e,t)=>{if(void 0!==GLOBAL_CONFIG.Snackbar)btf.snackbarShow(t);else{const n=e.previousElementSibling;n.textContent=t,n.style.opacity=1,setTimeout((()=>{n.style.opacity=0}),800)}},g=e=>{const t=e.parentNode;t.classList.add("copy-true");const n=window.getSelection(),o=document.createRange(),s=l?"pre code":"table .code pre";var i;o.selectNodeContents(t.querySelectorAll(`${s}`)[0]),n.removeAllRanges(),n.addRange(o),i=e.lastChild,document.queryCommandSupported&&document.queryCommandSupported("copy")?(document.execCommand("copy"),m(i,GLOBAL_CONFIG.copy.success)):m(i,GLOBAL_CONFIG.copy.noSupport),n.removeAllRanges(),t.classList.remove("copy-true")},h=function(e){const t=e.target.classList;t.contains("expand")?this.classList.toggle("closed"):t.contains("copy-button")&&g(this)},f=function(){this.classList.toggle("expand-done")},L=(e,t,n)=>{const s=document.createDocumentFragment();if(c){const t=document.createElement("div");t.className=`highlight-tools ${d}`,t.innerHTML=r+e+u,btf.addEventListenerPjax(t,"click",h),s.appendChild(t)}if(o&&t.offsetHeight>o+30){const e=document.createElement("div");e.className="code-expand-btn",e.innerHTML='<i class="fas fa-angle-double-down"></i>',btf.addEventListenerPjax(e,"click",f),s.appendChild(e)}"hl"===n?t.insertBefore(s,t.firstChild):t.parentNode.insertBefore(s,t)};l?a.forEach((e=>{if(n){const t=`<div class="code-lang">${e.getAttribute("data-language")||"Code"}</div>`;btf.wrap(e,"figure",{class:"highlight"}),L(t,e)}else btf.wrap(e,"figure",{class:"highlight"}),L("",e)})):a.forEach((e=>{if(n){let t=e.getAttribute("class").split(" ")[1];"plain"!==t&&void 0!==t||(t="Code");L(`<div class="code-lang">${t}</div>`,e,"hl")}else L("",e,"hl")}))},a=async e=>{const t=await fetch(e);return await t.json()},l=(e,t,n=!1,o)=>{const s=t.length,i=new InfiniteGrid.JustifiedInfiniteGrid(e,{gap:5,isConstantSize:!0,sizeRange:[150,600],useResizeObserver:!0,observeChildren:!0,useTransform:!0});o&&btf.addGlobalFn("igOfTabs",(()=>{i.destroy()}),!1,o);const c=e=>e.replace(/"/g,"&quot;"),a=GLOBAL_CONFIG.infinitegrid.buttonText,l=(e,n)=>{i.append(((e,n)=>{const o=[],i=(e-1)*n;for(let e=0;e<n;++e){const n=i+e;if(n>=s)break;const a=t[n],l=a.alt?`alt="${c(a.alt)}"`:"",d=a.title?`title="${c(a.title)}"`:"";o.push(`<div class="item ">\n <img src="${a.url}" data-grid-maintained-target="true" ${l+d} />\n </div>`)}return o})(e,n),e)},d=Math.ceil(s/10),r=t=>{const{updated:o,isResize:s,mounted:c}=t;if(o.length&&c.length&&!s){if(btf.loadLightbox(e.querySelectorAll("img:not(.medium-zoom-image)")),i.getGroups().length===d)return btf.setLoading.remove(e),void i.off("renderComplete",r);n&&(btf.setLoading.remove(e),(e=>{const t=document.createElement("button");t.textContent=a;const n=t=>{t.target.removeEventListener("click",n),t.target.remove(),btf.setLoading.add(e),l(i.getGroups().length+1,10)};t.addEventListener("click",n),e.insertAdjacentElement("afterend",t)})(e))}},u=btf.debounce((e=>{const t=(+e.groupKey||0)+1;l(t,10),t===d&&i.off("requestAppend",u)}),300);btf.setLoading.add(e),i.on("renderComplete",r),n?l(1,10):(i.on("requestAppend",u),i.renderItems()),btf.addGlobalFn("justifiedGallery",(()=>{i.destroy()}))},d=async(e,t=!1)=>{const n=async()=>{for(const n of e){if(btf.isHidden(n))continue;if(t&&n.classList.contains("loaded")){n.querySelector(".gallery-items").innerHTML="";const e=n.querySelector(":scope > button"),t=n.querySelector(":scope > .loading-container");e&&e.remove(),t&&t.remove()}const e="true"===n.getAttribute("data-button"),o=n.firstElementChild.textContent;n.classList.add("loaded");const s="url"===n.getAttribute("data-type")?await a(o):JSON.parse(o);l(n.lastElementChild,s,e,t)}};"function"==typeof InfiniteGrid||await getScript(`${GLOBAL_CONFIG.infinitegrid.js}`),n()},r=()=>{const e=document.getElementById("rightside"),t=window.innerHeight+56;let n=0;const o=document.getElementById("page-header"),s="undefined"!=typeof chatBtn,i=GLOBAL_CONFIG.percent.rightside;if(document.body.scrollHeight<=t)return void e.classList.add("rightside-show");let c="";const a=btf.throttle((()=>{const a=window.scrollY||document.documentElement.scrollTop,l=(e=>{const t=e>n;return n=e,t})(a);a>56?(o.classList.add("is-top-bar"),""===c&&(o.classList.add("nav-fixed"),e.classList.add("rightside-show")),l?"down"!==c&&(o.classList.remove("nav-visible"),s&&window.chatBtn.hide(),c="down"):"up"!==c&&(o.classList.add("nav-visible"),s&&window.chatBtn.show(),c="up")):(c="",0===a&&(o.classList.remove("is-top-bar"),o.classList.remove("nav-fixed","nav-visible")),e.classList.remove("rightside-show")),i&&(e=>{const t=btf.getScrollPercent(e,document.body),n=document.getElementById("go-up");t<95?(n.classList.add("show-percent"),n.querySelector(".scroll-percent").textContent=t):n.classList.remove("show-percent")})(a),document.body.scrollHeight<=t&&e.classList.add("rightside-show")}),50);btf.addEventListenerPjax(window,"scroll",a,{passive:!0})},u=()=>{const e=GLOBAL_CONFIG_SITE.isToc,t=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!e&&!t)return;let o,s,i,c,a;if(e){const e=document.getElementById("card-toc");s=e.querySelector(".toc-content"),o=s.querySelectorAll(".toc-link"),c=e.querySelector(".toc-percentage"),a=s.classList.contains("is-expand");const t=t=>{const n=t.target.closest(".toc-link");n&&(t.preventDefault(),btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&e.classList.remove("open"))};btf.addEventListenerPjax(s,"click",t),i=e=>{const t=e.getBoundingClientRect().top,n=s.scrollTop;t>document.documentElement.clientHeight-100&&(s.scrollTop=n+150),t<100&&(s.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let d="";const r=btf.throttle((()=>{const r=window.scrollY||document.documentElement.scrollTop;e&&GLOBAL_CONFIG.percent.toc&&(c.textContent=btf.getScrollPercent(r,n)),(n=>{if(0===n)return!1;let c="",r="";if(l.forEach(((e,t)=>{if(n>btf.getEleTop(e)-80){const n=e.id;c=n?"#"+encodeURI(n):"",r=t}})),d!==r&&(t&&btf.updateAnchor(c),d=r,e)){if(s.querySelectorAll(".active").forEach((e=>{e.classList.remove("active")})),""===c)return;const e=o[r];if(e.classList.add("active"),setTimeout((()=>{i(e)}),0),a)return;let t=e.parentNode;for(;!t.matches(".toc");t=t.parentNode)t.matches("li")&&t.classList.add("active")}})(r)}),50);btf.addEventListenerPjax(window,"scroll",r,{passive:!0})},m=e=>{const t=(window.globalFn||{}).themeChange||{};t&&Object.keys(t).forEach((n=>{const o=t[n];["disqus","disqusjs"].includes(n)?setTimeout((()=>o(e)),300):o(e)}))},g={readmode:()=>{const e=document.body;e.classList.add("read-mode");const t=document.createElement("button");t.type="button",t.className="fas fa-sign-out-alt exit-readmode",e.appendChild(t);const n=()=>{e.classList.remove("read-mode"),t.remove(),t.removeEventListener("click",n)};t.addEventListener("click",n)},darkmode:()=>{const e="dark"===document.documentElement.getAttribute("data-theme")?"light":"dark";"dark"===e?(activateDarkMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)),saveToLocal.set("theme",e,2),m(e)},"rightside-config":e=>{const t=e.firstElementChild;t.classList.contains("show")&&(t.classList.add("status"),setTimeout((()=>{t.classList.remove("status")}),300)),t.classList.toggle("show")},"go-up":()=>{btf.scrollToDest(0,500)},"hide-aside-btn":()=>{const e=document.documentElement.classList,t=e.contains("hide-aside")?"show":"hide";saveToLocal.set("aside-status",t,2),e.toggle("hide-aside")},"mobile-toc-button":e=>{const t=document.getElementById("card-toc");t.style.transition="transform 0.3s ease-in-out",t.classList.toggle("open"),t.addEventListener("transitionend",(()=>{t.style.transition=""}),{once:!0})},"chat-btn":()=>{window.chatBtnFn()},translateLink:()=>{window.translateFn.translatePage()}};document.getElementById("rightside").addEventListener("click",(function(e){const t=e.target.closest("[id]");t&&g[t.id]&&g[t.id](this)}));const h=()=>{const e=document.querySelectorAll("#article-container .hide-button");if(!e.length)return;const t=function(e){this.classList.add("open");const t=this.nextElementSibling.querySelectorAll(".gallery-container");t.length&&d(t)};e.forEach((e=>{e.addEventListener("click",t,{once:!0})}))},f=()=>{const e=document.querySelectorAll("#article-container .tabs");if(!e.length)return;const t=(e,t)=>{Array.from(e).forEach((e=>{e.classList.remove("active"),e!==t&&e.id!==t||e.classList.add("active")}))},n=(e,n)=>{btf.addEventListenerPjax(e.firstElementChild,"click",(function(e){const o=e.target.closest("button");if(o.classList.contains("active"))return;t(this.children,o),this.classList.remove("no-default");const s=o.getAttribute("data-href"),i=this.nextElementSibling;if(t(i.children,s),n){btf.removeGlobalFnEvent("igOfTabs",this);const e=i.querySelectorAll(`:scope > #${s} .gallery-container`);e.length&&d(e,this)}}))};e.forEach((e=>{const t=!!e.querySelectorAll(".gallery-container");n(e,t),(e=>{btf.addEventListenerPjax(e.lastElementChild,"click",(t=>{t.target.closest("button")&&btf.scrollToDest(btf.getEleTop(e),300)}))})(e)}))},L=function(e){e.forEach((e=>{const t=e.getAttribute("datetime");e.textContent=btf.diffDate(t,!0),e.style.display="inline"}))};window.refreshFn=function(){o(!0),t.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&(()=>{const{limitDay:e,messagePrev:t,messageNext:n,position:o}=GLOBAL_CONFIG.noticeOutdate,s=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(s>=e){const e=document.createElement("div");e.className="post-outdate-notice",e.textContent=`${t} ${s} ${n}`;const i=document.getElementById("article-container");"top"===o?i.insertBefore(e,i.firstChild):i.appendChild(e)}})(),GLOBAL_CONFIG.relativeDate.post&&L(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&L(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const e=document.getElementById("runtimeshow");if(e){const t=e.getAttribute("data-publishDate");e.textContent=`${btf.diffDate(t)} ${GLOBAL_CONFIG.runtime}`}})(),(()=>{const e=document.getElementById("last-push-date");if(e){const t=e.getAttribute("data-lastPushDate");e.textContent=btf.diffDate(t,!0)}})(),(()=>{const e=document.querySelector("#aside-cat-list.expandBtn");if(!e)return;btf.addEventListenerPjax(e,"click",(e=>{const t=e.target;"I"===t.nodeName&&(e.preventDefault(),t.parentNode.classList.toggle("expand"))}),!0)})()),u(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const e=document.getElementById("scroll-down");e&&btf.addEventListenerPjax(e,"click",(()=>{btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),c(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((e=>{const t=e.title||e.alt;if(!t)return;const n=document.createElement("div");n.className="img-alt is-center",n.textContent=t,e.insertAdjacentElement("afterend",n)})),r(),btf.removeGlobalFnEvent("justifiedGallery");const e=document.querySelectorAll("#article-container .gallery-container");e.length&&d(e),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const e=document.querySelectorAll("#article-container table");e.length&&e.forEach((e=>{e.closest(".highlight")||btf.wrap(e,"div",{class:"table-wrap"})}))})(),h(),f(),(()=>{const e=document.getElementById("switch-btn");if(!e)return;let t=!1;const n=document.getElementById("post-comment");btf.addEventListenerPjax(e,"click",(()=>{n.classList.toggle("move"),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))})(),btf.addEventListenerPjax(document.getElementById("toggle-menu"),"click",(()=>{s()}))},refreshFn(),window.addEventListener("resize",(()=>{o(!1),n&&btf.isHidden(document.getElementById("toggle-menu"))&&i()})),document.getElementById("menu-mask").addEventListener("click",(e=>{i()})),document.querySelector("#sidebar-menus .menus_items").addEventListener("click",(e=>{const t=e.target.closest(".site-page.group");t&&t.classList.toggle("hide")})),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const{limitCount:e,languages:t}=GLOBAL_CONFIG.copyright;document.body.addEventListener("copy",(n=>{n.preventDefault();const o=window.getSelection(0).toString();let s=o;return o.length>e&&(s=`${o}\n\n\n${t.author}\n${t.link}${window.location.href}\n${t.source}\n${t.info}`),n.clipboardData?n.clipboardData.setData("text",s):window.clipboardData.setData("text",s)}))})(),GLOBAL_CONFIG.autoDarkmode&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>{void 0===saveToLocal.get("theme")&&(e.matches?m("dark"):m("light"))}))}));2,_0x34fde1=_0x4e20b0[_0x1a330e(0x18c)][_0x1a330e(0x224)](_0x1a330e(0x173));if(!_0x34fde1)return;_0x4e20b0[_0x1a330e(0x1f1)](),btf['scrollToDest'](btf[_0x1a330e(0x147)](document[_0x1a330e(0x1dc)](decodeURI(_0x34fde1['getAttribute'](_0x1a330e(0x162)))[_0x1a330e(0x1e9)]('#',''))),0x12c),window[_0x1a330e(0x151)]<0x384&&_0x1ee2a0[_0x1a330e(0x1cd)][_0x1a330e(0x192)](_0x1a330e(0x1de));};btf[_0x9a06b2(0x154)](_0x115301,_0x9a06b2(0x1a7),_0x3704d0),_0x355fbd=_0x50a801=>{const _0x394273=_0x9a06b2,_0x16b3e4=_0x50a801[_0x394273(0x194)]()[_0x394273(0x14d)],_0x168b36=_0x115301['scrollTop'];_0x16b3e4>document[_0x394273(0x1f9)][_0x394273(0x15b)]-0x64&&(_0x115301[_0x394273(0x19a)]=_0x168b36+0x96),_0x16b3e4<0x64&&(_0x115301[_0x394273(0x19a)]=_0x168b36-0x96);};}const _0x2e1bcd=_0x1000af[_0x9a06b2(0x160)](_0x9a06b2(0x215));let _0x46da3c='';const _0x51e9a8=_0x521432=>{const _0x332f9e=_0x9a06b2;if(_0x521432===0x0)return![];let _0x4bf05f='',_0x4b4085='';_0x2e1bcd[_0x332f9e(0x18e)]((_0x481963,_0x52b30f)=>{const _0x1bb7b9=_0x332f9e;if(_0x521432>btf[_0x1bb7b9(0x147)](_0x481963)-0x50){const _0x4cd036=_0x481963['id'];_0x4bf05f=_0x4cd036?'#'+encodeURI(_0x4cd036):'',_0x4b4085=_0x52b30f;}});if(_0x46da3c===_0x4b4085)return;if(_0x29d7a4)btf[_0x332f9e(0x13a)](_0x4bf05f);_0x46da3c=_0x4b4085;if(_0x4f7452){_0x115301[_0x332f9e(0x160)](_0x332f9e(0x1c9))[_0x332f9e(0x18e)](_0x178cb6=>{const _0x4aac19=_0x332f9e;_0x178cb6[_0x4aac19(0x1cd)][_0x4aac19(0x192)](_0x4aac19(0x1b1));});if(_0x4bf05f==='')return;const _0x5d2fd5=_0x1cb51f[_0x4b4085];_0x5d2fd5[_0x332f9e(0x1cd)][_0x332f9e(0x1af)](_0x332f9e(0x1b1)),setTimeout(()=>{_0x355fbd(_0x5d2fd5);},0x0);if(_0x490759)return;let _0x2ecf88=_0x5d2fd5[_0x332f9e(0x159)];for(;!_0x2ecf88[_0x332f9e(0x1b0)](_0x332f9e(0x179));_0x2ecf88=_0x2ecf88[_0x332f9e(0x159)]){if(_0x2ecf88[_0x332f9e(0x1b0)]('li'))_0x2ecf88['classList']['add'](_0x332f9e(0x1b1));}}},_0x5b7cad=btf['throttle'](()=>{const _0x360f64=_0x9a06b2,_0x264ed9=window[_0x360f64(0x199)]||document['documentElement'][_0x360f64(0x19a)];_0x4f7452&&GLOBAL_CONFIG[_0x360f64(0x186)][_0x360f64(0x1bf)]&&(_0x5e3f8e[_0x360f64(0x18a)]=btf[_0x360f64(0x228)](_0x264ed9,_0x1000af)),_0x51e9a8(_0x264ed9);},0x32);btf[_0x9a06b2(0x154)](window,_0x9a06b2(0x170),_0x5b7cad,{'passive':!![]});},_0x54da05=_0x4a1a8b=>{const _0x2f78c=_0x95f4,_0x35fc34=window[_0x2f78c(0x1eb)]||{},_0x3c5785=_0x35fc34[_0x2f78c(0x1fb)]||{};if(!_0x3c5785)return;Object[_0x2f78c(0x22c)](_0x3c5785)['forEach'](_0x25fd70=>{const _0x4190fb=_0x2f78c,_0x33f97b=_0x3c5785[_0x25fd70];[_0x4190fb(0x163),_0x4190fb(0x191)][_0x4190fb(0x16a)](_0x25fd70)?setTimeout(()=>_0x33f97b(_0x4a1a8b),0x12c):_0x33f97b(_0x4a1a8b);});},_0x429007={'readmode':()=>{const _0x5e2029=_0x95f4,_0xd7238b=document['body'];_0xd7238b[_0x5e2029(0x1cd)][_0x5e2029(0x1af)](_0x5e2029(0x1d5));const _0x3bbd46=document[_0x5e2029(0x20c)](_0x5e2029(0x1ec));_0x3bbd46[_0x5e2029(0x183)]=_0x5e2029(0x1ec),_0x3bbd46[_0x5e2029(0x232)]=_0x5e2029(0x203),_0xd7238b[_0x5e2029(0x17e)](_0x3bbd46);const _0x149b91=()=>{const _0x52a437=_0x5e2029;_0xd7238b[_0x52a437(0x1cd)]['remove'](_0x52a437(0x1d5)),_0x3bbd46['remove'](),_0x3bbd46[_0x52a437(0x1d1)](_0x52a437(0x1a7),_0x149b91);};_0x3bbd46[_0x5e2029(0x1c3)]('click',_0x149b91);},'darkmode':()=>{const _0xb58f22=_0x95f4,_0x3ff3d6=document[_0xb58f22(0x1f9)]['getAttribute']('data-theme')==='dark'?_0xb58f22(0x135):_0xb58f22(0x1fe);_0x3ff3d6===_0xb58f22(0x1fe)?(activateDarkMode(),GLOBAL_CONFIG['Snackbar']!==undefined&&btf[_0xb58f22(0x152)](GLOBAL_CONFIG[_0xb58f22(0x1db)]['day_to_night'])):(activateLightMode(),GLOBAL_CONFIG[_0xb58f22(0x1db)]!==undefined&&btf[_0xb58f22(0x152)](GLOBAL_CONFIG[_0xb58f22(0x1db)][_0xb58f22(0x1f0)])),saveToLocal[_0xb58f22(0x21b)]('theme',_0x3ff3d6,0x2),_0x54da05(_0x3ff3d6);},'rightside-config':_0x5d9ec0=>{const _0x575735=_0x95f4,_0x58daf9=_0x5d9ec0[_0x575735(0x19c)];_0x58daf9[_0x575735(0x1cd)][_0x575735(0x182)]('show')&&(_0x58daf9[_0x575735(0x1cd)][_0x575735(0x1af)](_0x575735(0x1d4)),setTimeout(()=>{const _0x11e405=_0x575735;_0x58daf9['classList']['remove'](_0x11e405(0x1d4));},0x12c)),_0x58daf9['classList'][_0x575735(0x1ca)](_0x575735(0x197));},'go-up':()=>{const _0x3883ae=_0x95f4;btf[_0x3883ae(0x168)](0x0,0x1f4);},'hide-aside-btn':()=>{const _0x387aef=_0x95f4,_0x43397c=document['documentElement'][_0x387aef(0x1cd)],_0x483d8e=_0x43397c[_0x387aef(0x182)](_0x387aef(0x1c1))?_0x387aef(0x197):'hide';saveToLocal[_0x387aef(0x21b)](_0x387aef(0x22f),_0x483d8e,0x2),_0x43397c[_0x387aef(0x1ca)](_0x387aef(0x1c1));},'mobile-toc-button':_0xa36aa3=>{const _0x109b98=_0x95f4,_0x8f9e5f=document['getElementById'](_0x109b98(0x139));_0x8f9e5f['style'][_0x109b98(0x174)]=_0x109b98(0x21d),_0x8f9e5f[_0x109b98(0x1cd)][_0x109b98(0x1ca)]('open'),_0x8f9e5f['addEventListener'](_0x109b98(0x21e),()=>{const _0x15cc1c=_0x109b98;_0x8f9e5f[_0x15cc1c(0x1d3)]['transition']='';},{'once':!![]});},'chat-btn':()=>{const _0x2a6991=_0x95f4;window[_0x2a6991(0x148)]();},'translateLink':()=>{const _0x2d3f30=_0x95f4;window['translateFn'][_0x2d3f30(0x227)]();}};document[_0x19d74d(0x1dc)](_0x19d74d(0x1a9))[_0x19d74d(0x1c3)](_0x19d74d(0x1a7),function(_0xb0531f){const _0xa3a948=_0x19d74d,_0x15575d=_0xb0531f[_0xa3a948(0x18c)][_0xa3a948(0x224)](_0xa3a948(0x17d));_0x15575d&&_0x429007[_0x15575d['id']]&&_0x429007[_0x15575d['id']](this);});const _0x5d26d4=()=>{const _0x51c722=_0x19d74d,_0x98d04b=_0xbdee0d=>{const _0xbec1e1=_0x95f4,_0x18f835=_0xbdee0d[_0xbec1e1(0x18c)][_0xbec1e1(0x224)]('.site-page.group');if(!_0x18f835)return;_0x18f835[_0xbec1e1(0x1cd)][_0xbec1e1(0x1ca)](_0xbec1e1(0x143));};document[_0x51c722(0x1ee)]('#sidebar-menus\x20.menus_items')[_0x51c722(0x1c3)](_0x51c722(0x1a7),_0x98d04b);},_0x3aed5b=()=>{const _0x315e49=_0x19d74d,_0xf4d6ee=()=>{const _0x327d3d=_0x95f4;_0x674f02[_0x327d3d(0x1de)]();};btf['addEventListenerPjax'](document['getElementById']('toggle-menu'),_0x315e49(0x1a7),_0xf4d6ee);},_0x588e07=()=>{const _0x1a5e5a=_0x19d74d,{limitCount:_0x45403c,languages:_0x135e3b}=GLOBAL_CONFIG[_0x1a5e5a(0x1bc)],_0xcfe523=_0x2b014e=>{const _0x36f9d2=_0x1a5e5a;_0x2b014e[_0x36f9d2(0x1f1)]();const _0x3c5e85=window[_0x36f9d2(0x138)](0x0)[_0x36f9d2(0x221)]();let _0x5c57aa=_0x3c5e85;return _0x3c5e85['length']>_0x45403c&&(_0x5c57aa=_0x3c5e85+_0x36f9d2(0x1d2)+_0x135e3b['author']+'\x0a'+_0x135e3b[_0x36f9d2(0x1e5)]+window[_0x36f9d2(0x1b6)][_0x36f9d2(0x162)]+'\x0a'+_0x135e3b[_0x36f9d2(0x149)]+'\x0a'+_0x135e3b[_0x36f9d2(0x1e4)]),_0x2b014e[_0x36f9d2(0x181)]?_0x2b014e['clipboardData'][_0x36f9d2(0x19e)](_0x36f9d2(0x16e),_0x5c57aa):window[_0x36f9d2(0x181)]['setData'](_0x36f9d2(0x16e),_0x5c57aa);};document['body'][_0x1a5e5a(0x1c3)](_0x1a5e5a(0x1a4),_0xcfe523);},_0x3cf426=()=>{const _0x490857=_0x19d74d,_0x1fadd4=document[_0x490857(0x1dc)]('runtimeshow');if(_0x1fadd4){const _0x40e363=_0x1fadd4[_0x490857(0x15a)]('data-publishDate');_0x1fadd4[_0x490857(0x18a)]=btf[_0x490857(0x155)](_0x40e363)+'\x20'+GLOBAL_CONFIG[_0x490857(0x14b)];}},_0x1e9b9d=()=>{const _0x39dea7=_0x19d74d,_0x49a47c=document['getElementById'](_0x39dea7(0x1e3));if(_0x49a47c){const _0x3dd4f9=_0x49a47c[_0x39dea7(0x15a)](_0x39dea7(0x20f));_0x49a47c[_0x39dea7(0x18a)]=btf[_0x39dea7(0x155)](_0x3dd4f9,!![]);}},_0x386b66=()=>{const _0x44c056=_0x19d74d,_0xd34df5=document[_0x44c056(0x160)](_0x44c056(0x15d));if(!_0xd34df5[_0x44c056(0x1d0)])return;_0xd34df5['forEach'](_0x463be3=>{const _0x314c6d=_0x44c056;!_0x463be3[_0x314c6d(0x224)](_0x314c6d(0x1b2))&&btf['wrap'](_0x463be3,'div',{'class':_0x314c6d(0x188)});});},_0x5a5845=()=>{const _0x4de1b2=_0x19d74d,_0x2fc08d=document['querySelectorAll'](_0x4de1b2(0x184));if(!_0x2fc08d[_0x4de1b2(0x1d0)])return;const _0x145d4d=function(_0x295e64){const _0x46ce9c=_0x4de1b2,_0x5317db=this;_0x5317db[_0x46ce9c(0x1cd)]['add']('open');const _0x5cb5d0=_0x5317db[_0x46ce9c(0x1c7)][_0x46ce9c(0x160)](_0x46ce9c(0x1cc));_0x5cb5d0[_0x46ce9c(0x1d0)]&&_0x531b9d(_0x5cb5d0);};_0x2fc08d[_0x4de1b2(0x18e)](_0xd6843e=>{const _0x53297d=_0x4de1b2;_0xd6843e[_0x53297d(0x1c3)](_0x53297d(0x1a7),_0x145d4d,{'once':!![]});});},_0x581b23=()=>{const _0x14f591=_0x19d74d,_0x4ec7c8=document['querySelectorAll'](_0x14f591(0x14f));if(!_0x4ec7c8[_0x14f591(0x1d0)])return;const _0x228ea9=(_0x384fee,_0x233937)=>{const _0x367944=_0x14f591;Array[_0x367944(0x17f)](_0x384fee)[_0x367944(0x18e)](_0x5d0836=>{const _0x472eeb=_0x367944;_0x5d0836[_0x472eeb(0x1cd)][_0x472eeb(0x192)](_0x472eeb(0x1b1)),(_0x5d0836===_0x233937||_0x5d0836['id']===_0x233937)&&_0x5d0836[_0x472eeb(0x1cd)][_0x472eeb(0x1af)](_0x472eeb(0x1b1));});},_0x127b78=(_0x4ceada,_0x239729)=>{const _0x4494eb=_0x14f591,_0x4e50a8=function(_0xfff0e0){const _0x231e7b=_0x95f4,_0x5917d7=_0xfff0e0[_0x231e7b(0x18c)][_0x231e7b(0x224)](_0x231e7b(0x1ec));if(_0x5917d7[_0x231e7b(0x1cd)][_0x231e7b(0x182)](_0x231e7b(0x1b1)))return;_0x228ea9(this[_0x231e7b(0x1c5)],_0x5917d7),this[_0x231e7b(0x1cd)][_0x231e7b(0x192)]('no-default');const _0x2ab4ec=_0x5917d7[_0x231e7b(0x15a)](_0x231e7b(0x1c0)),_0x20e642=this[_0x231e7b(0x1c7)];_0x228ea9(_0x20e642[_0x231e7b(0x1c5)],_0x2ab4ec);if(_0x239729){btf['removeGlobalFnEvent']('igOfTabs',this);const _0x592b25=_0x20e642[_0x231e7b(0x160)](_0x231e7b(0x205)+_0x2ab4ec+_0x231e7b(0x18f));_0x592b25[_0x231e7b(0x1d0)]&&_0x531b9d(_0x592b25,this);}};btf['addEventListenerPjax'](_0x4ceada[_0x4494eb(0x19c)],_0x4494eb(0x1a7),_0x4e50a8);},_0x364d94=_0x497c7e=>{const _0x288710=_0x14f591,_0xa19e30=_0x548b70=>{const _0x3082d9=_0x95f4,_0x48afb1=_0x548b70[_0x3082d9(0x18c)][_0x3082d9(0x224)](_0x3082d9(0x1ec));if(!_0x48afb1)return;btf['scrollToDest'](btf['getEleTop'](_0x497c7e),0x12c);};btf[_0x288710(0x154)](_0x497c7e[_0x288710(0x1dd)],'click',_0xa19e30);};_0x4ec7c8[_0x14f591(0x18e)](_0x157dde=>{const _0x1a57ef=_0x14f591,_0x27ee2=!!_0x157dde[_0x1a57ef(0x160)](_0x1a57ef(0x1cc));_0x127b78(_0x157dde,_0x27ee2),_0x364d94(_0x157dde);});},_0x5c04b5=()=>{const _0x5adffb=_0x19d74d,_0x2cfa32=document[_0x5adffb(0x1ee)](_0x5adffb(0x208));if(!_0x2cfa32)return;const _0x55e500=_0x186252=>{const _0x184516=_0x5adffb,_0x490f04=_0x186252[_0x184516(0x18c)];_0x490f04[_0x184516(0x204)]==='I'&&(_0x186252[_0x184516(0x1f1)](),_0x490f04[_0x184516(0x159)][_0x184516(0x1cd)][_0x184516(0x1ca)](_0x184516(0x220)));};btf['addEventListenerPjax'](_0x2cfa32,'click',_0x55e500,!![]);},_0xf53790=()=>{const _0x33fc50=_0x19d74d,_0x2ffed4=document[_0x33fc50(0x1dc)]('switch-btn');if(!_0x2ffed4)return;let _0x943acf=![];const _0x2f4c34=document[_0x33fc50(0x1dc)](_0x33fc50(0x1ef)),_0x3cb181=()=>{const _0x1b6911=_0x33fc50;_0x2f4c34[_0x1b6911(0x1cd)]['toggle'](_0x1b6911(0x13f)),!_0x943acf&&typeof loadOtherComment===_0x1b6911(0x142)&&(_0x943acf=!![],loadOtherComment());};btf[_0x33fc50(0x154)](_0x2ffed4,_0x33fc50(0x1a7),_0x3cb181);},_0x2b995f=()=>{const _0x544504=_0x19d74d,{limitDay:_0x479c46,messagePrev:_0x3c45a8,messageNext:_0x5cb609,position:_0x342971}=GLOBAL_CONFIG['noticeOutdate'],_0x1559aa=btf[_0x544504(0x155)](GLOBAL_CONFIG_SITE[_0x544504(0x171)]);if(_0x1559aa>=_0x479c46){const _0x5ed0c9=document[_0x544504(0x20c)]('div');_0x5ed0c9[_0x544504(0x232)]=_0x544504(0x145),_0x5ed0c9['textContent']=_0x3c45a8+'\x20'+_0x1559aa+'\x20'+_0x5cb609;const _0x21968d=document[_0x544504(0x1dc)](_0x544504(0x164));_0x342971===_0x544504(0x14d)?_0x21968d['insertBefore'](_0x5ed0c9,_0x21968d['firstChild']):_0x21968d[_0x544504(0x17e)](_0x5ed0c9);}},_0x122a3a=()=>{const _0x57a3e4=_0x19d74d;window[_0x57a3e4(0x1e0)]=new LazyLoad({'elements_selector':_0x57a3e4(0x214),'threshold':0x0,'data_src':_0x57a3e4(0x20a)});},_0x194b0c=function(_0x8fd549){const _0x125bf4=_0x19d74d;_0x8fd549[_0x125bf4(0x18e)](_0x13e953=>{const _0x313778=_0x125bf4,_0x302b99=_0x13e953[_0x313778(0x15a)](_0x313778(0x1f8));_0x13e953[_0x313778(0x18a)]=btf[_0x313778(0x155)](_0x302b99,!![]),_0x13e953['style'][_0x313778(0x206)]=_0x313778(0x146);});},_0x5aa405=function(){const _0x4e6a0f=_0x19d74d;window[_0x4e6a0f(0x1c3)](_0x4e6a0f(0x218),()=>{const _0x38869e=_0x4e6a0f;_0x286b86(![]),_0x18b4c1&&btf[_0x38869e(0x1b3)](document[_0x38869e(0x1dc)](_0x38869e(0x176)))&&_0x674f02['close']();}),document[_0x4e6a0f(0x1dc)](_0x4e6a0f(0x1f2))[_0x4e6a0f(0x1c3)](_0x4e6a0f(0x1a7),_0x420f2c=>{const _0x60bb5d=_0x4e6a0f;_0x674f02[_0x60bb5d(0x209)]();}),_0x5d26d4(),GLOBAL_CONFIG[_0x4e6a0f(0x16f)]&&_0x122a3a(),GLOBAL_CONFIG[_0x4e6a0f(0x1bc)]!==undefined&&_0x588e07(),GLOBAL_CONFIG[_0x4e6a0f(0x140)]&&window[_0x4e6a0f(0x230)](_0x4e6a0f(0x156))['addEventListener'](_0x4e6a0f(0x1ce),_0x19e52c=>{const _0x3c65fc=_0x4e6a0f;if(saveToLocal['get'](_0x3c65fc(0x213))!==undefined)return;_0x19e52c[_0x3c65fc(0x1b0)]?_0x54da05(_0x3c65fc(0x1fe)):_0x54da05(_0x3c65fc(0x135));});};window[_0x19d74d(0x1cb)]=function(){const _0x2db762=_0x19d74d;_0x56be2b();GLOBAL_CONFIG_SITE[_0x2db762(0x1d8)]?(GLOBAL_CONFIG['noticeOutdate']!==undefined&&_0x2b995f(),GLOBAL_CONFIG['relativeDate'][_0x2db762(0x187)]&&_0x194b0c(document[_0x2db762(0x160)](_0x2db762(0x17a)))):(GLOBAL_CONFIG[_0x2db762(0x1f6)]['homepage']&&_0x194b0c(document[_0x2db762(0x160)](_0x2db762(0x1d7))),GLOBAL_CONFIG['runtime']&&_0x3cf426(),_0x1e9b9d(),_0x5c04b5());_0x159c44(),GLOBAL_CONFIG_SITE[_0x2db762(0x1bb)]&&_0x4215a6(),_0x98cc31(),GLOBAL_CONFIG['isPhotoFigcaption']&&_0x34823c(),_0x26e2d6(),btf[_0x2db762(0x1b9)](_0x2db762(0x14c));const _0x30435e=document[_0x2db762(0x160)](_0x2db762(0x201));_0x30435e[_0x2db762(0x1d0)]&&_0x531b9d(_0x30435e),_0xc2c9ff(),_0x386b66(),_0x5a5845(),_0x581b23(),_0xf53790(),_0x3aed5b();},refreshFn(),_0x5aa405();}));function _0x5c0f(){const _0x33e1d8=['is-top-bar','#article-container\x20table','push','32xmLXxf','querySelectorAll','insertBefore','href','disqus','article-container','alt=\x22','ceil','&quot;','scrollToDest','4228325TKnouR','includes','execCommand','infinitegrid','to_show\x200.5s','text','islazyload','scroll','postUpdate','parse','.toc-link','transition','<div\x20class=\x22copy-notice\x22></div><i\x20class=\x22fas\x20fa-paste\x20copy-button\x22></i>','toggle-menu','go-up','data-type','.toc','#post-meta\x20time','offsetHeight','body','[id]','appendChild','from','chatBtn','clipboardData','contains','type','#article-container\x20.hide-button','highlight-tools\x20','percent','post','table-wrap','.gallery-items','textContent',':scope\x20>\x20.loading-container','target','.toc-content','forEach','\x20.gallery-container','.scroll-percent','disqusjs','remove','2139080MLpOSZ','getBoundingClientRect','figure','72606UtrOQo','show','removeAllRanges','scrollY','scrollTop','wrap','firstElementChild','true','setData','<i\x20class=\x22fas\x20fa-angle-double-down\x22></i>','insertAdjacentElement','igOfTabs','<div\x20class=\x22item\x20\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','addRange','copy','is-expand','groupKey','click','data-button','rightside','throttle','hide-menu','rightside-show','off','opacity','add','matches','active','.highlight','isHidden','debounce','prismjs','location','renderItems','Code','removeGlobalFnEvent','.toc-percentage','isHome','copyright','previousElementSibling','copy-button','toc','data-href','hide-aside','1618220aSYPgp','addEventListener','success','children','<i\x20class=\x22fas\x20fa-angle-down\x20expand\x22></i>','nextElementSibling','loaded','.active','toggle','refreshFn','.gallery-container','classList','change','append','length','removeEventListener','\x0a\x0a\x0a','style','status','read-mode','renderComplete','#recent-posts\x20time','isPost','alt','menus','Snackbar','getElementById','lastElementChild','open','destroy','lazyLoadInstance','firstChild','1210470qPLgMa','last-push-date','info','link','sidebar-menus','getGroups','hidden','replace','81uDDDpO','globalFn','button','plain','querySelector','post-comment','night_to_day','preventDefault','menu-mask','DOMContentLoaded','lastChild','div','relativeDate','undefined','datetime','documentElement','figure.highlight','themeChange','createRange','afterend','dark','isAnchor','buttonText','#article-container\x20.gallery-container','class','fas\x20fa-sign-out-alt\x20exit-readmode','nodeName',':scope\x20>\x20#','display','data-language','#aside-cat-list.expandBtn','close','lazy-src','scroll-down','createElement','35GwRtsh','img:not(.medium-zoom-image)','data-lastPushDate','url','title','show-percent','theme','img','h1,h2,h3,h4,h5,h6','setLoading','content-inner','resize','requestAppend','animateIn','set','pre\x20code','transform\x200.3s\x20ease-in-out','transitionend','<div\x20class=\x22code-lang\x22>','expand','toString','\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>',':scope\x20>\x20button','closest','sidebarPaddingR','closed','translatePage','getScrollPercent','createDocumentFragment','highlight','expand-done','keys','#article-container\x20img','innerHeight','aside-status','matchMedia','\x22\x20data-grid-maintained-target=\x22true\x22\x20','className','scrollHeight','overflow','1016886GwInhW','addGlobalFn','light','noSupport','copy-true','getSelection','card-toc','updateAnchor','nav','isToc','2421404jbcZpT','innerHTML','move','autoDarkmode','page-header','function','hide','#blog-info\x20>\x20a','post-outdate-notice','inline','getEleTop','chatBtnFn','source','paddingRight','runtime','justifiedGallery','top','nav-visible','#article-container\x20.tabs','title=\x22','innerWidth','snackbarShow','offsetTop','addEventListenerPjax','diffDate','(prefers-color-scheme:\x20dark)','reduce','nav-fixed','parentNode','getAttribute','clientHeight'];_0x5c0f=function(){return _0x33e1d8;};return _0x5c0f();}
package/js/people.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var peoplejs_mycpen1_config={src:"https://cdn.jsdmirror.com/npm/mycpen-blog@0.0.0-ejbnwsbmci/img/open-peeps-sheet.png",rows:15,cols:7},randomRange=function(e,r){return e+Math.random()*(r-e)},randomIndex=function(e){return 0|randomRange(0,e.length)},removeFromArray=function(e,r){return e.splice(r,1)[0]},removeItemFromArray=function(e,r){return removeFromArray(e,e.indexOf(r))},removeRandomFromArray=function(e){return removeFromArray(e,randomIndex(e))},getRandomFromArray=function(e){return e[0|randomIndex(e)]},resetPeep=function(e){var r,t,a=e.stage,n=e.peep,o=.5<Math.random()?1:-1,i=100-250*gsap.parseEase("power2.in")(Math.random()),s=a.height-n.height+i;return 1==o?(r=-n.width,t=a.width,n.scaleX=1):(r=a.width+n.width,t=0,n.scaleX=-1),n.x=r,n.y=s,{startX:r,startY:n.anchorY=s,endX:t}},normalWalk=function(e){var r=e.peep,t=e.props,a=(t.startX,t.startY),n=t.endX,o=gsap.timeline();return o.timeScale(randomRange(.5,1.5)),o.to(r,{duration:10,x:n,ease:"none"},0),o.to(r,{duration:.25,repeat:40,yoyo:!0,y:a-10},0),o},walks=[normalWalk],Peep=function(){function e(r){var t=r.image,a=r.rect;_classCallCheck(this,e),this.image=t,this.setRect(a),this.x=0,this.y=0,this.anchorY=0,this.scaleX=1,this.walk=null}return _createClass(e,[{key:"setRect",value:function(e){this.rect=e,this.width=e[2],this.height=e[3],this.drawArgs=[this.image].concat(_toConsumableArray(e),[0,0,this.width,this.height])}},{key:"render",value:function(e){e.save(),e.translate(this.x,this.y),e.scale(this.scaleX,1),e.drawImage.apply(e,_toConsumableArray(this.drawArgs)),e.restore()}}]),e}(),img=document.createElement("img");img.onload=init,img.src=peoplejs_mycpen1_config.src;let canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,stage={width:0,height:0},allPeeps=[],availablePeeps=[],crowd=[];function init(){canvas&&(createPeeps(),resize(),gsap.ticker.add(render),window.addEventListener("resize",resize))}function createPeeps(){for(var e=peoplejs_mycpen1_config.rows,r=peoplejs_mycpen1_config.cols,t=e*r,a=img.naturalWidth/e,n=img.naturalHeight/r,o=0;o<t;o++)allPeeps.push(new Peep({image:img,rect:[o%e*a,(o/e|0)*n,a,n]}))}function resize(){canvas&&0!=canvas.clientWidth&&(stage.width=canvas.clientWidth,stage.height=canvas.clientHeight,canvas.width=stage.width*devicePixelRatio,canvas.height=stage.height*devicePixelRatio,crowd.forEach((function(e){e.walk.kill()})),crowd.length=0,availablePeeps.length=0,availablePeeps.push.apply(availablePeeps,allPeeps),initCrowd())}function initCrowd(){for(;availablePeeps.length;)addPeepToCrowd().walk.progress(Math.random())}function addPeepToCrowd(){var e=removeRandomFromArray(availablePeeps),r=getRandomFromArray(walks)({peep:e,props:resetPeep({peep:e,stage:stage})}).eventCallback("onComplete",(function(){removePeepFromCrowd(e),addPeepToCrowd()}));return e.walk=r,crowd.push(e),crowd.sort((function(e,r){return e.anchorY-r.anchorY})),e}function removePeepFromCrowd(e){removeItemFromArray(crowd,e),availablePeeps.push(e)}function render(){canvas&&(canvas.width=canvas.width,ctx.save(),ctx.scale(devicePixelRatio,devicePixelRatio),crowd.forEach((function(e){e.render(ctx)})),ctx.restore())}document.addEventListener("pjax:success",(e=>{canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,window.removeEventListener("resize",resize),gsap.ticker.remove(render),setTimeout((()=>{init()}),300)}));
1
+ "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var peoplejs_mycpen1_config={src:"https://cdn.cbd.int/mycpen-blog@0.0.0-ejccazbfuo/img/open-peeps-sheet.png",rows:15,cols:7},randomRange=function(e,r){return e+Math.random()*(r-e)},randomIndex=function(e){return 0|randomRange(0,e.length)},removeFromArray=function(e,r){return e.splice(r,1)[0]},removeItemFromArray=function(e,r){return removeFromArray(e,e.indexOf(r))},removeRandomFromArray=function(e){return removeFromArray(e,randomIndex(e))},getRandomFromArray=function(e){return e[0|randomIndex(e)]},resetPeep=function(e){var r,t,a=e.stage,n=e.peep,o=.5<Math.random()?1:-1,i=100-250*gsap.parseEase("power2.in")(Math.random()),s=a.height-n.height+i;return 1==o?(r=-n.width,t=a.width,n.scaleX=1):(r=a.width+n.width,t=0,n.scaleX=-1),n.x=r,n.y=s,{startX:r,startY:n.anchorY=s,endX:t}},normalWalk=function(e){var r=e.peep,t=e.props,a=(t.startX,t.startY),n=t.endX,o=gsap.timeline();return o.timeScale(randomRange(.5,1.5)),o.to(r,{duration:10,x:n,ease:"none"},0),o.to(r,{duration:.25,repeat:40,yoyo:!0,y:a-10},0),o},walks=[normalWalk],Peep=function(){function e(r){var t=r.image,a=r.rect;_classCallCheck(this,e),this.image=t,this.setRect(a),this.x=0,this.y=0,this.anchorY=0,this.scaleX=1,this.walk=null}return _createClass(e,[{key:"setRect",value:function(e){this.rect=e,this.width=e[2],this.height=e[3],this.drawArgs=[this.image].concat(_toConsumableArray(e),[0,0,this.width,this.height])}},{key:"render",value:function(e){e.save(),e.translate(this.x,this.y),e.scale(this.scaleX,1),e.drawImage.apply(e,_toConsumableArray(this.drawArgs)),e.restore()}}]),e}(),img=document.createElement("img");img.onload=init,img.src=peoplejs_mycpen1_config.src;let canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,stage={width:0,height:0},allPeeps=[],availablePeeps=[],crowd=[];function init(){canvas&&(createPeeps(),resize(),gsap.ticker.add(render),window.addEventListener("resize",resize))}function createPeeps(){for(var e=peoplejs_mycpen1_config.rows,r=peoplejs_mycpen1_config.cols,t=e*r,a=img.naturalWidth/e,n=img.naturalHeight/r,o=0;o<t;o++)allPeeps.push(new Peep({image:img,rect:[o%e*a,(o/e|0)*n,a,n]}))}function resize(){canvas&&0!=canvas.clientWidth&&(stage.width=canvas.clientWidth,stage.height=canvas.clientHeight,canvas.width=stage.width*devicePixelRatio,canvas.height=stage.height*devicePixelRatio,crowd.forEach((function(e){e.walk.kill()})),crowd.length=0,availablePeeps.length=0,availablePeeps.push.apply(availablePeeps,allPeeps),initCrowd())}function initCrowd(){for(;availablePeeps.length;)addPeepToCrowd().walk.progress(Math.random())}function addPeepToCrowd(){var e=removeRandomFromArray(availablePeeps),r=getRandomFromArray(walks)({peep:e,props:resetPeep({peep:e,stage:stage})}).eventCallback("onComplete",(function(){removePeepFromCrowd(e),addPeepToCrowd()}));return e.walk=r,crowd.push(e),crowd.sort((function(e,r){return e.anchorY-r.anchorY})),e}function removePeepFromCrowd(e){removeItemFromArray(crowd,e),availablePeeps.push(e)}function render(){canvas&&(canvas.width=canvas.width,ctx.save(),ctx.scale(devicePixelRatio,devicePixelRatio),crowd.forEach((function(e){e.render(ctx)})),ctx.restore())}document.addEventListener("pjax:success",(e=>{canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,window.removeEventListener("resize",resize),gsap.ticker.remove(render),setTimeout((()=>{init()}),300)}));31(0x134)]=_0x4d02df,'endX':_0x415ac3};},normalWalk=function(_0x3b22fa){var _0xe9c293=_0x317533,_0x3a9283=_0x3b22fa[_0xe9c293(0x140)],_0x2b7e79=_0x3b22fa[_0xe9c293(0x163)],_0x25823d=(_0x2b7e79[_0xe9c293(0x165)],_0x2b7e79[_0xe9c293(0x155)]),_0x4d3b68=_0x2b7e79[_0xe9c293(0x179)],_0x4279bf=gsap['timeline']();return _0x4279bf[_0xe9c293(0x172)](randomRange(0.5,1.5)),_0x4279bf['to'](_0x3a9283,{'duration':0xa,'x':_0x4d3b68,'ease':_0xe9c293(0x141)},0x0),_0x4279bf['to'](_0x3a9283,{'duration':0.25,'repeat':0x28,'yoyo':!0x0,'y':_0x25823d-0xa},0x0),_0x4279bf;},walks=[normalWalk],Peep=(function(){var _0x3714d7=_0x317533;function _0x104701(_0x4aac7d){var _0x2f36de=_0x20b9,_0x12280f=_0x4aac7d[_0x2f36de(0x142)],_0x5c5c81=_0x4aac7d[_0x2f36de(0x159)];_classCallCheck(this,_0x104701),this[_0x2f36de(0x142)]=_0x12280f,this[_0x2f36de(0x16f)](_0x5c5c81),this['x']=0x0,this['y']=0x0,this[_0x2f36de(0x134)]=0x0,this[_0x2f36de(0x14b)]=0x1,this[_0x2f36de(0x149)]=null;}return _createClass(_0x104701,[{'key':_0x3714d7(0x16f),'value':function(_0x4c965b){var _0x3d068c=_0x3714d7;this[_0x3d068c(0x159)]=_0x4c965b,this['width']=_0x4c965b[0x2],this['height']=_0x4c965b[0x3],this[_0x3d068c(0x170)]=[this[_0x3d068c(0x142)]][_0x3d068c(0x15b)](_toConsumableArray(_0x4c965b),[0x0,0x0,this[_0x3d068c(0x176)],this[_0x3d068c(0x12c)]]);}},{'key':_0x3714d7(0x12d),'value':function(_0x59f47d){var _0x4039c7=_0x3714d7;_0x59f47d[_0x4039c7(0x13f)](),_0x59f47d[_0x4039c7(0x160)](this['x'],this['y']),_0x59f47d[_0x4039c7(0x15c)](this[_0x4039c7(0x14b)],0x1),_0x59f47d['drawImage']['apply'](_0x59f47d,_toConsumableArray(this[_0x4039c7(0x170)])),_0x59f47d[_0x4039c7(0x145)]();}}]),_0x104701;}()),img=document['createElement'](_0x317533(0x157));img[_0x317533(0x151)]=init,img[_0x317533(0x13a)]=peoplejs_mycpen1_config[_0x317533(0x13a)];let canvas=document['querySelector'](_0x317533(0x14c)),ctx=canvas?canvas[_0x317533(0x14f)]('2d'):void 0x0,stage={'width':0x0,'height':0x0},allPeeps=[],availablePeeps=[],crowd=[];function init(){var _0x55c3dc=_0x317533;canvas&&(createPeeps(),resize(),gsap['ticker'][_0x55c3dc(0x153)](render),window[_0x55c3dc(0x147)](_0x55c3dc(0x161),resize));}function createPeeps(){var _0x384409=_0x317533;for(var _0x5ec6df=peoplejs_mycpen1_config[_0x384409(0x169)],_0x1f5c04=peoplejs_mycpen1_config[_0x384409(0x150)],_0x1ee143=_0x5ec6df*_0x1f5c04,_0x47cf71=img[_0x384409(0x148)]/_0x5ec6df,_0x513f83=img[_0x384409(0x15d)]/_0x1f5c04,_0x1a6bf2=0x0;_0x1a6bf2<_0x1ee143;_0x1a6bf2++)allPeeps[_0x384409(0x137)](new Peep({'image':img,'rect':[_0x1a6bf2%_0x5ec6df*_0x47cf71,(_0x1a6bf2/_0x5ec6df|0x0)*_0x513f83,_0x47cf71,_0x513f83]}));}function resize(){var _0x30626e=_0x317533;canvas&&0x0!=canvas['clientWidth']&&(stage[_0x30626e(0x176)]=canvas['clientWidth'],stage[_0x30626e(0x12c)]=canvas[_0x30626e(0x16a)],canvas[_0x30626e(0x176)]=stage['width']*devicePixelRatio,canvas['height']=stage[_0x30626e(0x12c)]*devicePixelRatio,crowd['forEach'](function(_0x5aab7e){var _0x4faf96=_0x30626e;_0x5aab7e[_0x4faf96(0x149)][_0x4faf96(0x12a)]();}),crowd[_0x30626e(0x178)]=0x0,availablePeeps[_0x30626e(0x178)]=0x0,availablePeeps['push'][_0x30626e(0x173)](availablePeeps,allPeeps),initCrowd());}function initCrowd(){var _0x4e5228=_0x317533;for(;availablePeeps[_0x4e5228(0x178)];)addPeepToCrowd()[_0x4e5228(0x149)][_0x4e5228(0x14a)](Math[_0x4e5228(0x168)]());}function addPeepToCrowd(){var _0x267df5=_0x317533,_0x794a1c=removeRandomFromArray(availablePeeps),_0x2458a7=getRandomFromArray(walks)({'peep':_0x794a1c,'props':resetPeep({'peep':_0x794a1c,'stage':stage})})[_0x267df5(0x12b)](_0x267df5(0x17b),function(){removePeepFromCrowd(_0x794a1c),addPeepToCrowd();});return _0x794a1c['walk']=_0x2458a7,crowd[_0x267df5(0x137)](_0x794a1c),crowd['sort'](function(_0x3f58aa,_0x5c18d9){var _0x4049e6=_0x267df5;return _0x3f58aa['anchorY']-_0x5c18d9[_0x4049e6(0x134)];}),_0x794a1c;}function removePeepFromCrowd(_0x55315e){var _0x28e59e=_0x317533;removeItemFromArray(crowd,_0x55315e),availablePeeps[_0x28e59e(0x137)](_0x55315e);}function render(){var _0x2eed76=_0x317533;canvas&&(canvas[_0x2eed76(0x176)]=canvas[_0x2eed76(0x176)],ctx[_0x2eed76(0x13f)](),ctx[_0x2eed76(0x15c)](devicePixelRatio,devicePixelRatio),crowd[_0x2eed76(0x156)](function(_0x1add41){_0x1add41['render'](ctx);}),ctx[_0x2eed76(0x145)]());}document[_0x317533(0x147)]('pjax:success',_0x5dfd42=>{var _0x41f2c5=_0x317533;canvas=document['querySelector'](_0x41f2c5(0x14c)),ctx=canvas?canvas[_0x41f2c5(0x14f)]('2d'):void 0x0,window['removeEventListener']('resize',resize),gsap[_0x41f2c5(0x14e)]['remove'](render),setTimeout(()=>{init();},0x12c);});function _0xee16(){var _0x2c1422=['translate','resize','1676HNIdyj','props','603eABcfp','startX','694023tqogGb','7AgrXoc','random','rows','clientHeight','test','writable','parseEase','undefined','setRect','drawArgs','key','timeScale','apply','constructor','defineProperty','width','1hjWaZt','length','endX','6NXpMIV','onComplete','call','kill','eventCallback','height','render','enumerable','1041FVRCzZ','https://cdn.cbd.int/mycpen-blog@0.0.0-ejccazbfuo/img/open-peeps-sheet.png','Cannot\x20call\x20a\x20class\x20as\x20a\x20function','881569cRiKah','46045vVLNor','anchorY','from','isArray','push','Invalid\x20attempt\x20to\x20spread\x20non-iterable\x20instance.\x0aIn\x20order\x20to\x20be\x20iterable,\x20non-array\x20objects\x20must\x20have\x20a\x20[Symbol.iterator]()\x20method.','Object','src','707496rAqCdn','prototype','21250nHbvZr','power2.in','save','peep','none','image','slice','splice','restore','stage','addEventListener','naturalWidth','walk','progress','scaleX','#peoplecanvas','toString','ticker','getContext','cols','onload','iterator','add','indexOf','startY','forEach','img','Set','rect','121894PexIIR','concat','scale','naturalHeight','42dEVmzP','24lnhrnP'];_0xee16=function(){return _0x2c1422;};return _0xee16();}
package/js/random.js CHANGED
@@ -1 +1 @@
1
- var posts=["posts/14763.html","posts/57095.html","posts/42935.html","posts/65154.html","posts/5552.html","posts/cb0ae693.html","posts/fe8dbc73.html","posts/8236.html","posts/5162.html","posts/43907.html","posts/38874.html","posts/51a9ee30.html","posts/9b5a2768.html","posts/4c16ee73.html","posts/df249111.html","posts/27addd89.html","posts/6f7759e0.html","posts/8b765f7a.html","posts/8d01af11.html","posts/12907.html","posts/47697.html","posts/62652.html","posts/48860.html","posts/34556.html","posts/43225.html","posts/62964.html","posts/43579.html","posts/10149.html","posts/29955.html","posts/33007.html","posts/5276.html","posts/30664.html","posts/35184.html","posts/61496.html","posts/9132.html","posts/10588.html","posts/43746.html","posts/5637.html","posts/14777.html","posts/57976.html","posts/33033.html","posts/46092.html","posts/57744.html","posts/22091.html","posts/b0a8892b.html","posts/ecc378ee.html","posts/317b0311.html","posts/dd4b1092.html","posts/45562d6f.html","posts/29e2641c.html","posts/3ae7567f.html","posts/4cb758ea.html","posts/88a726.html","posts/6a2caa19.html","posts/583c5c34.html","posts/4f5c6419.html","posts/3ffec809.html","posts/b7f58a40.html","posts/cee83196.html","posts/acb8c062.html","posts/63259.html","posts/16756.html","posts/4979.html","posts/37069.html","posts/33188.html","posts/49827.html","posts/314.html","posts/46.html","posts/13683.html","posts/9186.html","posts/62975.html","posts/16589f92.html","posts/10d5063.html","posts/3e42a4ef.html","posts/285c50ae.html","posts/85a8374a.html","posts/beb8baf2.html"];function toRandomPost(){pjax.loadUrl("/"+posts[Math.floor(Math.random()*posts.length)])}
1
+ var posts=["posts/14763.html","posts/57095.html","posts/42935.html","posts/65154.html","posts/5552.html","posts/cb0ae693.html","posts/fe8dbc73.html","posts/8236.html","posts/5162.html","posts/43907.html","posts/38874.html","posts/51a9ee30.html","posts/9b5a2768.html","posts/4c16ee73.html","posts/df249111.html","posts/27addd89.html","posts/6f7759e0.html","posts/8b765f7a.html","posts/8d01af11.html","posts/12907.html","posts/47697.html","posts/62652.html","posts/48860.html","posts/34556.html","posts/43225.html","posts/62964.html","posts/43579.html","posts/10149.html","posts/29955.html","posts/33007.html","posts/5276.html","posts/30664.html","posts/35184.html","posts/61496.html","posts/9132.html","posts/10588.html","posts/43746.html","posts/5637.html","posts/14777.html","posts/57976.html","posts/33033.html","posts/46092.html","posts/57744.html","posts/22091.html","posts/b0a8892b.html","posts/ecc378ee.html","posts/317b0311.html","posts/dd4b1092.html","posts/45562d6f.html","posts/29e2641c.html","posts/3ae7567f.html","posts/4cb758ea.html","posts/88a726.html","posts/6a2caa19.html","posts/583c5c34.html","posts/4f5c6419.html","posts/3ffec809.html","posts/b7f58a40.html","posts/cee83196.html","posts/acb8c062.html","posts/63259.html","posts/16756.html","posts/4979.html","posts/37069.html","posts/33188.html","posts/49827.html","posts/314.html","posts/46.html","posts/13683.html","posts/9186.html","posts/62975.html","posts/16589f92.html","posts/10d5063.html","posts/3e42a4ef.html","posts/beb8baf2.html","posts/285c50ae.html","posts/85a8374a.html"];function toRandomPost(){pjax.loadUrl("/"+posts[Math.floor(Math.random()*posts.length)])}x5+parseInt(_0xb62fa8(0x1e9))/0x6+-parseInt(_0xb62fa8(0x212))/0x7+-parseInt(_0xb62fa8(0x1fc))/0x8*(-parseInt(_0xb62fa8(0x1f9))/0x9)+-parseInt(_0xb62fa8(0x1f6))/0xa*(-parseInt(_0xb62fa8(0x204))/0xb);if(_0x4390f9===_0x4644de)break;else _0xa56276['push'](_0xa56276['shift']());}catch(_0x29024e){_0xa56276['push'](_0xa56276['shift']());}}}(_0x3562,0xafae5));function _0x1ba6(_0x2bd935,_0x3fbeb6){var _0x3562f9=_0x3562();return _0x1ba6=function(_0x1ba637,_0x3962b4){_0x1ba637=_0x1ba637-0x1db;var _0x5bcb4c=_0x3562f9[_0x1ba637];return _0x5bcb4c;},_0x1ba6(_0x2bd935,_0x3fbeb6);}var posts=['posts/14763.html','posts/57095.html',_0x4ab331(0x1e8),_0x4ab331(0x217),_0x4ab331(0x1fe),_0x4ab331(0x20c),_0x4ab331(0x21b),'posts/8236.html',_0x4ab331(0x216),'posts/43907.html',_0x4ab331(0x1e2),_0x4ab331(0x1f4),_0x4ab331(0x202),_0x4ab331(0x1eb),_0x4ab331(0x200),_0x4ab331(0x213),'posts/6f7759e0.html',_0x4ab331(0x219),_0x4ab331(0x1e3),_0x4ab331(0x1db),_0x4ab331(0x1fa),_0x4ab331(0x21e),_0x4ab331(0x1e6),'posts/34556.html',_0x4ab331(0x205),'posts/62964.html',_0x4ab331(0x20a),_0x4ab331(0x20b),_0x4ab331(0x1e1),'posts/33007.html',_0x4ab331(0x1f7),_0x4ab331(0x1ff),_0x4ab331(0x203),'posts/61496.html','posts/9132.html',_0x4ab331(0x1dd),_0x4ab331(0x1f2),'posts/5637.html',_0x4ab331(0x215),_0x4ab331(0x211),'posts/33033.html',_0x4ab331(0x208),_0x4ab331(0x1f8),_0x4ab331(0x1ec),_0x4ab331(0x1ea),_0x4ab331(0x21d),_0x4ab331(0x1de),_0x4ab331(0x207),'posts/45562d6f.html',_0x4ab331(0x20f),_0x4ab331(0x1ee),_0x4ab331(0x1df),_0x4ab331(0x1e0),_0x4ab331(0x201),_0x4ab331(0x1dc),'posts/4f5c6419.html',_0x4ab331(0x210),_0x4ab331(0x206),'posts/cee83196.html','posts/acb8c062.html',_0x4ab331(0x1e7),'posts/16756.html',_0x4ab331(0x214),'posts/37069.html','posts/33188.html',_0x4ab331(0x20e),'posts/314.html',_0x4ab331(0x1fd),_0x4ab331(0x209),'posts/9186.html',_0x4ab331(0x1e4),'posts/16589f92.html',_0x4ab331(0x1fb),_0x4ab331(0x1f3),_0x4ab331(0x1f1),'posts/285c50ae.html',_0x4ab331(0x1f5)];function toRandomPost(){var _0x394dd4=_0x4ab331;pjax[_0x394dd4(0x21a)]('/'+posts[Math[_0x394dd4(0x1ed)](Math[_0x394dd4(0x1e5)]()*posts['length'])]);};
@@ -1 +1 @@
1
- "use strict";var frdata={apiurl:"https://www.cpen.top:8002/",defaultFish:100,hungryFish:100};if("undefined"!=typeof frdataUser)for(var key in frdataUser)frdataUser[key]&&(frdata[key]=frdataUser[key]);var randomPostTimes=0,randomPostWorking=!1,randomPostTips=["钓到了绝世好文!","在河边打了个喷嚏,吓跑了","你和小伙伴抢夺着","你击败了巨龙,在巢穴中发现了","挖掘秦始皇坟时找到了","在路边闲逛的时候随手买了一个","从学校班主任那拿来了孩子上课偷偷看的","你的同桌无情的从你的语文书中撕下了那篇你最喜欢的","考古学家近日发现了","外星人降临地球学习地球文化,落地时被你塞了","从图书馆顶层的隐秘角落里发现了闪着金光的","徒弟修炼走火入魔,为师立刻掏出了","在大山中唱山歌,隔壁的阿妹跑来了,带着","隔壁家的孩子数学考了满分,都是因为看了","隔壁家的孩子英语考了满分,都是因为看了","小米研发了全新一代MIX手机,据说灵感","修炼渡劫成功,还好提前看了","库克坐上了苹果CEO的宝座,因为他面试的时候看了","阿里巴巴大喊芝麻开门,映入眼帘的就是","师傅说练武要先炼心,然后让我好生研读","科考队在南极大陆发现了被冰封的","飞机窗户似乎被一张纸糊上了,仔细一看是","历史上满写的仁义道德四个字,透过字缝里却全是","十几年前的录音机似乎还能够使用,插上电发现正在播的是","新版语文书拟增加一篇熟读并背诵的","经调查,99%的受访者都没有背诵过","今年的高考满分作文是","唐僧揭开了佛祖压在五指山上的","科学家发现能够解决衰老的秘密,就是每日研读","英特尔发布了全新的至强处理器,其芯片的制造原理都是","新的iPhone产能很足,新的进货渠道是","今年亩产突破了八千万斤,多亏了","陆隐一统天上宗,在无数祖境高手的目光下宣读了","黑钻风跟白钻风说道,吃了唐僧肉能长生不老,他知道是因为看了","上卫生间没带纸,直接提裤跑路也不愿意玷污手中","种下一篇文章就会产生很多很多文章,我种下了","三十年河东,三十年河西,莫欺我没有看过","踏破铁血无觅处,得来全靠","今日双色球中了两千万,预测全靠","因为卷子上没写名字,老师罚抄","为了抗议世间的不公,割破手指写下了","在艺术大街上被贴满了相同的纸,走近一看是","这区区迷阵岂能难得住我?其实能走出来多亏了","今日被一篇文章顶上了微博热搜,它是","你送给乞丐一个暴富秘籍,它是","UZI一个走A拿下五杀,在事后采访时说他当时回想起了","科学家解刨了第一个感染丧尸病毒的人,发现丧尸抗体存在于","如果你有梦想的话,就要努力去看","决定我们成为什么样人的,不是我们的能力,而是是否看过","有信心不一定会成功,没信心就去看","你真正是谁并不重要,重要的是你看没看过","玄天境重要的是锻体,为师赠你此书,好好修炼去吧,这是","上百祖境高手在天威湖大战三天三夜为了抢夺","这化仙池水乃上古真仙对后人的考校,要求熟读并背诵","庆氏三千年根基差点竟被你小子毁于一旦,能够被我拯救全是因为我看了","我就是神奇宝贝大师!我这只皮卡丘可是","我就是神奇宝贝大师!我这只小火龙可是","我就是神奇宝贝大师!我这只可达鸭可是","我就是神奇宝贝大师!我这只杰尼龟可是","上古遗迹中写道,只要习得此书,便得成功。你定睛一看,原来是","奶奶的,玩阴的是吧,我就是双料特工代号穿山甲,","你的背景太假了,我的就逼真多了,学到这个技术全是因为看了","我是云南的,云南怒江的,怒江芦水市,芦水市六库,六库傈僳族,傈僳族是","我真的栓Q了,我真的会谢如果你看","你已经习得退退退神功,接下来的心法已经被记录在","人生无常大肠包小肠,小肠包住了","你抽到了普通文章,它是","你收到了稀有文章,它是","你抽到了金色普通文章,它是","你抽到了金色稀有文章,它是","你抽到了传说文章!它是","哇!金色传说!你抽到了金色传说文章,它是","报告!侦察兵说在前往300米有一个男子在偷偷看一本书,上面赫然写着","芷莲姑娘大摆擂台,谁若是能读完此书,便可娶了她。然后从背后掏出了","请问你的梦想是什么?我的梦想是能读到","读什么才能增智慧?当然是读","纳兰嫣然掏出了退婚书,可是发现出门带错了,结果拿出了一本","你要尽全力保护你的梦想。那些嘲笑你的人,他们必定会失败,他们想把你变成和他们一样的人。如果你有梦想的话,就要努力去读","走人生的路就像爬山一样,看起来走了许多冤枉的路,崎岖的路,但终究需要读完","游戏的规则就是这么的简单,你听懂了吗?管你听没听懂,快去看"],randomPostClick=0;function fetchRandomPost(){var t,o,e,n;document.getElementById("mycpen1-fcircle-page-tag")&&(0==randomPostWorking&&document.getElementById("random-post")&&(randomPostWorking=!0,t=randomPostTips[Math.floor(Math.random()*randomPostTips.length)],"",o=1e4<randomPostTimes?"愿者上钩":1e3<randomPostTimes?"俯览天下":1e3<randomPostTimes?"超越神了":100<randomPostTimes?"绝世渔夫":75<randomPostTimes?"钓鱼王者":50<randomPostTimes?"钓鱼宗师":20<randomPostTimes?"钓鱼专家":5<randomPostTimes?"钓鱼高手":"钓鱼新手",document.getElementById("random-post").innerHTML=5<=randomPostTimes?"随机筛选... (Lv."+randomPostTimes+" 当前称号:"+o+")":"随机筛选...",e=randomNum(1e3,3e3),0==randomPostTimes&&(e=0),document.querySelector(".random-post-start").style.opacity="0.2",randomPostClick*frdata.hungryFish+frdata.defaultFish<randomPostTimes&&0==Math.round(Math.random())?document.getElementById("random-post").innerHTML="因为只钓鱼不吃鱼,过分饥饿导致本次钓鱼失败...(点击任意一篇钓鱼获得的文章即可恢复)":(n=frdata.apiurl+"randompost",fetch(n).then((function(t){return t.json()})).then((function(o){var n=o.title,a=o.link,r=o.author;document.querySelector("#random-post")&&window.setTimeout((function(){document.getElementById("random-post").innerHTML=t+"来自友链 <b>"+r+'</b> 的文章:<a class="random-friends-post" onclick="randomClickLink()" target="_blank" href="'+a+'" rel="external nofollow">'+n+"</a>",randomPostTimes+=1,localStorage.setItem("randomPostTimes",randomPostTimes),document.querySelector(".random-post-start").style.opacity="1"}),e)}))),randomPostWorking=!1))}function initRandomPost(){document.querySelector(".random-post-start")&&localStorage.randomPostTimes&&(randomPostTimes=parseInt(localStorage.randomPostTimes),randomPostClick=parseInt(localStorage.randomPostClick),document.querySelector(".random-post-start").style.transitionDuration="0.3s",document.querySelector(".random-post-start").style.transform="rotate("+360*randomPostTimes+"deg)"),fetchRandomPost()}function randomClickLink(){randomPostClick+=1,localStorage.setItem("randomPostClick",randomPostClick)}function randomNum(t,o){switch(arguments.length){case 1:return parseInt(Math.random()*t+1,10);case 2:return parseInt(Math.random()*(o-t+1)+t,10);default:return 0}}function whenDOMReadyRandomFriendsPostJS(){document.getElementById("mycpen1-fcircle-page-tag")&&initRandomPost()}whenDOMReadyRandomFriendsPostJS(),document.addEventListener("pjax:complete",whenDOMReadyRandomFriendsPostJS);
1
+ "use strict";var frdata={apiurl:"https://www.cpen.top:8002/",defaultFish:100,hungryFish:100};if("undefined"!=typeof frdataUser)for(var key in frdataUser)frdataUser[key]&&(frdata[key]=frdataUser[key]);var randomPostTimes=0,randomPostWorking=!1,randomPostTips=["钓到了绝世好文!","在河边打了个喷嚏,吓跑了","你和小伙伴抢夺着","你击败了巨龙,在巢穴中发现了","挖掘秦始皇坟时找到了","在路边闲逛的时候随手买了一个","从学校班主任那拿来了孩子上课偷偷看的","你的同桌无情的从你的语文书中撕下了那篇你最喜欢的","考古学家近日发现了","外星人降临地球学习地球文化,落地时被你塞了","从图书馆顶层的隐秘角落里发现了闪着金光的","徒弟修炼走火入魔,为师立刻掏出了","在大山中唱山歌,隔壁的阿妹跑来了,带着","隔壁家的孩子数学考了满分,都是因为看了","隔壁家的孩子英语考了满分,都是因为看了","小米研发了全新一代MIX手机,据说灵感","修炼渡劫成功,还好提前看了","库克坐上了苹果CEO的宝座,因为他面试的时候看了","阿里巴巴大喊芝麻开门,映入眼帘的就是","师傅说练武要先炼心,然后让我好生研读","科考队在南极大陆发现了被冰封的","飞机窗户似乎被一张纸糊上了,仔细一看是","历史上满写的仁义道德四个字,透过字缝里却全是","十几年前的录音机似乎还能够使用,插上电发现正在播的是","新版语文书拟增加一篇熟读并背诵的","经调查,99%的受访者都没有背诵过","今年的高考满分作文是","唐僧揭开了佛祖压在五指山上的","科学家发现能够解决衰老的秘密,就是每日研读","英特尔发布了全新的至强处理器,其芯片的制造原理都是","新的iPhone产能很足,新的进货渠道是","今年亩产突破了八千万斤,多亏了","陆隐一统天上宗,在无数祖境高手的目光下宣读了","黑钻风跟白钻风说道,吃了唐僧肉能长生不老,他知道是因为看了","上卫生间没带纸,直接提裤跑路也不愿意玷污手中","种下一篇文章就会产生很多很多文章,我种下了","三十年河东,三十年河西,莫欺我没有看过","踏破铁血无觅处,得来全靠","今日双色球中了两千万,预测全靠","因为卷子上没写名字,老师罚抄","为了抗议世间的不公,割破手指写下了","在艺术大街上被贴满了相同的纸,走近一看是","这区区迷阵岂能难得住我?其实能走出来多亏了","今日被一篇文章顶上了微博热搜,它是","你送给乞丐一个暴富秘籍,它是","UZI一个走A拿下五杀,在事后采访时说他当时回想起了","科学家解刨了第一个感染丧尸病毒的人,发现丧尸抗体存在于","如果你有梦想的话,就要努力去看","决定我们成为什么样人的,不是我们的能力,而是是否看过","有信心不一定会成功,没信心就去看","你真正是谁并不重要,重要的是你看没看过","玄天境重要的是锻体,为师赠你此书,好好修炼去吧,这是","上百祖境高手在天威湖大战三天三夜为了抢夺","这化仙池水乃上古真仙对后人的考校,要求熟读并背诵","庆氏三千年根基差点竟被你小子毁于一旦,能够被我拯救全是因为我看了","我就是神奇宝贝大师!我这只皮卡丘可是","我就是神奇宝贝大师!我这只小火龙可是","我就是神奇宝贝大师!我这只可达鸭可是","我就是神奇宝贝大师!我这只杰尼龟可是","上古遗迹中写道,只要习得此书,便得成功。你定睛一看,原来是","奶奶的,玩阴的是吧,我就是双料特工代号穿山甲,","你的背景太假了,我的就逼真多了,学到这个技术全是因为看了","我是云南的,云南怒江的,怒江芦水市,芦水市六库,六库傈僳族,傈僳族是","我真的栓Q了,我真的会谢如果你看","你已经习得退退退神功,接下来的心法已经被记录在","人生无常大肠包小肠,小肠包住了","你抽到了普通文章,它是","你收到了稀有文章,它是","你抽到了金色普通文章,它是","你抽到了金色稀有文章,它是","你抽到了传说文章!它是","哇!金色传说!你抽到了金色传说文章,它是","报告!侦察兵说在前往300米有一个男子在偷偷看一本书,上面赫然写着","芷莲姑娘大摆擂台,谁若是能读完此书,便可娶了她。然后从背后掏出了","请问你的梦想是什么?我的梦想是能读到","读什么才能增智慧?当然是读","纳兰嫣然掏出了退婚书,可是发现出门带错了,结果拿出了一本","你要尽全力保护你的梦想。那些嘲笑你的人,他们必定会失败,他们想把你变成和他们一样的人。如果你有梦想的话,就要努力去读","走人生的路就像爬山一样,看起来走了许多冤枉的路,崎岖的路,但终究需要读完","游戏的规则就是这么的简单,你听懂了吗?管你听没听懂,快去看"],randomPostClick=0;function fetchRandomPost(){var t,o,e,n;document.getElementById("mycpen1-fcircle-page-tag")&&(0==randomPostWorking&&document.getElementById("random-post")&&(randomPostWorking=!0,t=randomPostTips[Math.floor(Math.random()*randomPostTips.length)],"",o=1e4<randomPostTimes?"愿者上钩":1e3<randomPostTimes?"俯览天下":1e3<randomPostTimes?"超越神了":100<randomPostTimes?"绝世渔夫":75<randomPostTimes?"钓鱼王者":50<randomPostTimes?"钓鱼宗师":20<randomPostTimes?"钓鱼专家":5<randomPostTimes?"钓鱼高手":"钓鱼新手",document.getElementById("random-post").innerHTML=5<=randomPostTimes?"随机筛选... (Lv."+randomPostTimes+" 当前称号:"+o+")":"随机筛选...",e=randomNum(1e3,3e3),0==randomPostTimes&&(e=0),document.querySelector(".random-post-start").style.opacity="0.2",randomPostClick*frdata.hungryFish+frdata.defaultFish<randomPostTimes&&0==Math.round(Math.random())?document.getElementById("random-post").innerHTML="因为只钓鱼不吃鱼,过分饥饿导致本次钓鱼失败...(点击任意一篇钓鱼获得的文章即可恢复)":(n=frdata.apiurl+"randompost",fetch(n).then((function(t){return t.json()})).then((function(o){var n=o.title,a=o.link,r=o.author;document.querySelector("#random-post")&&window.setTimeout((function(){document.getElementById("random-post").innerHTML=t+"来自友链 <b>"+r+'</b> 的文章:<a class="random-friends-post" onclick="randomClickLink()" target="_blank" href="'+a+'" rel="external nofollow">'+n+"</a>",randomPostTimes+=1,localStorage.setItem("randomPostTimes",randomPostTimes),document.querySelector(".random-post-start").style.opacity="1"}),e)}))),randomPostWorking=!1))}function initRandomPost(){document.querySelector(".random-post-start")&&localStorage.randomPostTimes&&(randomPostTimes=parseInt(localStorage.randomPostTimes),randomPostClick=parseInt(localStorage.randomPostClick),document.querySelector(".random-post-start").style.transitionDuration="0.3s",document.querySelector(".random-post-start").style.transform="rotate("+360*randomPostTimes+"deg)"),fetchRandomPost()}function randomClickLink(){randomPostClick+=1,localStorage.setItem("randomPostClick",randomPostClick)}function randomNum(t,o){switch(arguments.length){case 1:return parseInt(Math.random()*t+1,10);case 2:return parseInt(Math.random()*(o-t+1)+t,10);default:return 0}}function whenDOMReadyRandomFriendsPostJS(){document.getElementById("mycpen1-fcircle-page-tag")&&initRandomPost()}whenDOMReadyRandomFriendsPostJS(),document.addEventListener("pjax:complete",whenDOMReadyRandomFriendsPostJS);,'我真的栓Q了,我真的会谢如果你看',_0x571139(0x107),_0x571139(0x124),_0x571139(0x138),_0x571139(0x127),_0x571139(0x128),_0x571139(0x11b),_0x571139(0x16a),_0x571139(0x105),_0x571139(0x160),_0x571139(0x13d),'请问你的梦想是什么?我的梦想是能读到',_0x571139(0x16b),_0x571139(0x115),_0x571139(0x15e),_0x571139(0x110),_0x571139(0x13a)],randomPostClick=0x0;function fetchRandomPost(){var _0x355188=_0x571139;if(document[_0x355188(0x131)](_0x355188(0x14a))){var _0x3bdaeb,_0x4e2fc6,_0x5633a7,_0x5dcb0c;0x0==randomPostWorking&&document[_0x355188(0x131)](_0x355188(0x12c))&&(randomPostWorking=!0x0,_0x3bdaeb=randomPostTips[Math['floor'](Math[_0x355188(0x114)]()*randomPostTips[_0x355188(0x14d)])],_0x4e2fc6='',_0x4e2fc6=0x2710<randomPostTimes?_0x355188(0x137):0x3e8<randomPostTimes?_0x355188(0x145):0x3e8<randomPostTimes?_0x355188(0x136):0x64<randomPostTimes?'绝世渔夫':0x4b<randomPostTimes?'钓鱼王者':0x32<randomPostTimes?_0x355188(0x126):0x14<randomPostTimes?_0x355188(0x117):0x5<randomPostTimes?_0x355188(0x16d):_0x355188(0x140),document[_0x355188(0x131)]('random-post')[_0x355188(0x165)]=0x5<=randomPostTimes?_0x355188(0x13e)+randomPostTimes+_0x355188(0x102)+_0x4e2fc6+')':_0x355188(0x151),_0x5633a7=randomNum(0x3e8,0xbb8),0x0==randomPostTimes&&(_0x5633a7=0x0),document[_0x355188(0x14c)]('.random-post-start')[_0x355188(0x149)][_0x355188(0xfa)]=_0x355188(0x158),randomPostWorking=(randomPostClick*frdata[_0x355188(0x120)]+frdata[_0x355188(0x15b)]<randomPostTimes&&0x0==Math[_0x355188(0x108)](Math[_0x355188(0x114)]())?document['getElementById']('random-post')[_0x355188(0x165)]=_0x355188(0x14b):(_0x5dcb0c=frdata[_0x355188(0xfc)]+_0x355188(0x135),fetch(_0x5dcb0c)[_0x355188(0x134)](function(_0x881974){var _0x41a42d=_0x355188;return _0x881974[_0x41a42d(0x169)]();})[_0x355188(0x134)](function(_0x37d73f){var _0x340e2d=_0x355188,_0x1105ca=_0x37d73f[_0x340e2d(0x118)],_0x36d2ad=_0x37d73f[_0x340e2d(0x171)],_0x3950b8=_0x37d73f['author'];document[_0x340e2d(0x14c)]('#random-post')&&window[_0x340e2d(0xf9)](function(){var _0x2998b4=_0x340e2d;document[_0x2998b4(0x131)]('random-post')['innerHTML']=_0x3bdaeb+'来自友链\x20<b>'+_0x3950b8+'</b>\x20的文章:<a\x20class=\x22random-friends-post\x22\x20onclick=\x22randomClickLink()\x22\x20target=\x22_blank\x22\x20href=\x22'+_0x36d2ad+_0x2998b4(0xfb)+_0x1105ca+_0x2998b4(0x156),randomPostTimes+=0x1,localStorage[_0x2998b4(0x155)](_0x2998b4(0x10b),randomPostTimes),document['querySelector']('.random-post-start')[_0x2998b4(0x149)][_0x2998b4(0xfa)]='1';},_0x5633a7);})),!0x1));}}function initRandomPost(){var _0x28237d=_0x571139;document['querySelector'](_0x28237d(0x16f))&&localStorage[_0x28237d(0x10b)]&&(randomPostTimes=parseInt(localStorage[_0x28237d(0x10b)]),randomPostClick=parseInt(localStorage[_0x28237d(0x11c)]),document[_0x28237d(0x14c)](_0x28237d(0x16f))[_0x28237d(0x149)][_0x28237d(0x100)]=_0x28237d(0x104),document[_0x28237d(0x14c)]('.random-post-start')[_0x28237d(0x149)][_0x28237d(0x170)]=_0x28237d(0x103)+0x168*randomPostTimes+_0x28237d(0xff)),fetchRandomPost();}function randomClickLink(){var _0x4e2f0f=_0x571139;randomPostClick+=0x1,localStorage['setItem'](_0x4e2f0f(0x11c),randomPostClick);}function randomNum(_0x322a7a,_0x490c88){var _0x3cc1e6=_0x571139;switch(arguments[_0x3cc1e6(0x14d)]){case 0x1:return parseInt(Math[_0x3cc1e6(0x114)]()*_0x322a7a+0x1,0xa);case 0x2:return parseInt(Math[_0x3cc1e6(0x114)]()*(_0x490c88-_0x322a7a+0x1)+_0x322a7a,0xa);default:return 0x0;}}function whenDOMReadyRandomFriendsPostJS(){var _0x2b9743=_0x571139;document[_0x2b9743(0x131)]('mycpen1-fcircle-page-tag')&&initRandomPost();}whenDOMReadyRandomFriendsPostJS(),document['addEventListener'](_0x571139(0x130),whenDOMReadyRandomFriendsPostJS);
@@ -1 +1 @@
1
- window.addEventListener("load",(()=>{const e=document.getElementById("search-mask"),t=document.querySelector("#algolia-search .search-dialog"),a=()=>{const a=document.body.style;a.width="100%",a.overflow="hidden",btf.animateIn(e,"to_show 0.5s"),btf.animateIn(t,"titleScale 0.5s"),setTimeout((()=>{document.querySelector("#algolia-search .ais-SearchBox-input").focus()}),100),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(n(),document.removeEventListener("keydown",e))})),i(),window.addEventListener("resize",i)},n=()=>{const a=document.body.style;a.width="",a.overflow="",btf.animateOut(t,"search_close .5s"),btf.animateOut(e,"to_hide 0.5s"),window.removeEventListener("resize",i)},i=()=>{window.innerWidth<768&&t.style.setProperty("--search-height",window.innerHeight+"px")},s=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",a)},o=e=>{if(""===e)return"";const t=e.indexOf("<mark>");let a=t-30,n=t+120,i="",s="";a<=0?(a=0,n=140):i="...",n>e.length?n=e.length:s="...";return i+e.substring(a,n)+s},l=GLOBAL_CONFIG.algolia;if(!(l.appId&&l.apiKey&&l.indexName))return console.error("Algolia setting is invalid!");const r=instantsearch({indexName:l.indexName,searchClient:algoliasearch(l.appId,l.apiKey),searchFunction(e){e.state.query&&e.search()}}),c=instantsearch.widgets.configure({hitsPerPage:5}),d=instantsearch.widgets.searchBox({container:"#algolia-search-input",showReset:!1,showSubmit:!1,placeholder:GLOBAL_CONFIG.algolia.languages.input_placeholder,showLoadingIndicator:!0}),h=instantsearch.widgets.hits({container:"#algolia-hits",templates:{item(e){const t=e.permalink?e.permalink:GLOBAL_CONFIG.root+e.path,a=e._highlightResult,n=a.contentStripTruncate?o(a.contentStripTruncate.value):a.contentStrip?o(a.contentStrip.value):a.content?o(a.content.value):"";return`\n <a href="${t}" class="algolia-hit-item-link">\n <span class="algolia-hits-item-title">${a.title.value||"no-title"}</span>\n <p class="algolia-hit-item-content">${n}</p>\n </a>`},empty:function(e){return'<div id="algolia-hits-empty">'+GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/,e.query)+"</div>"}}}),g=instantsearch.widgets.stats({container:"#algolia-info > .algolia-stats",templates:{text:function(e){return`<hr>${GLOBAL_CONFIG.algolia.languages.hits_stats.replace(/\$\{hits}/,e.nbHits).replace(/\$\{time}/,e.processingTimeMS)}`}}}),u=instantsearch.widgets.poweredBy({container:"#algolia-info > .algolia-poweredBy"}),p=instantsearch.widgets.pagination({container:"#algolia-pagination",totalPages:5,templates:{first:'<i class="fas fa-angle-double-left"></i>',last:'<i class="fas fa-angle-double-right"></i>',previous:'<i class="fas fa-angle-left"></i>',next:'<i class="fas fa-angle-right"></i>'}});r.addWidgets([c,d,h,g,u,p]),r.start(),s(),e.addEventListener("click",n),document.querySelector("#algolia-search .search-close-button").addEventListener("click",n),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(e)&&n(),s()})),window.pjax&&r.on("render",(()=>{window.pjax.refresh(document.getElementById("algolia-hits"))}))}));
1
+ window.addEventListener("load",(()=>{const e=document.getElementById("search-mask"),t=document.querySelector("#algolia-search .search-dialog"),a=()=>{const a=document.body.style;a.width="100%",a.overflow="hidden",btf.animateIn(e,"to_show 0.5s"),btf.animateIn(t,"titleScale 0.5s"),setTimeout((()=>{document.querySelector("#algolia-search .ais-SearchBox-input").focus()}),100),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(n(),document.removeEventListener("keydown",e))})),i(),window.addEventListener("resize",i)},n=()=>{const a=document.body.style;a.width="",a.overflow="",btf.animateOut(t,"search_close .5s"),btf.animateOut(e,"to_hide 0.5s"),window.removeEventListener("resize",i)},i=()=>{window.innerWidth<768&&t.style.setProperty("--search-height",window.innerHeight+"px")},s=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",a)},o=e=>{if(""===e)return"";const t=e.indexOf("<mark>");let a=t-30,n=t+120,i="",s="";a<=0?(a=0,n=140):i="...",n>e.length?n=e.length:s="...";return i+e.substring(a,n)+s},l=GLOBAL_CONFIG.algolia;if(!(l.appId&&l.apiKey&&l.indexName))return console.error("Algolia setting is invalid!");const r=instantsearch({indexName:l.indexName,searchClient:algoliasearch(l.appId,l.apiKey),searchFunction(e){e.state.query&&e.search()}}),c=instantsearch.widgets.configure({hitsPerPage:5}),d=instantsearch.widgets.searchBox({container:"#algolia-search-input",showReset:!1,showSubmit:!1,placeholder:GLOBAL_CONFIG.algolia.languages.input_placeholder,showLoadingIndicator:!0}),h=instantsearch.widgets.hits({container:"#algolia-hits",templates:{item(e){const t=e.permalink?e.permalink:GLOBAL_CONFIG.root+e.path,a=e._highlightResult,n=a.contentStripTruncate?o(a.contentStripTruncate.value):a.contentStrip?o(a.contentStrip.value):a.content?o(a.content.value):"";return`\n <a href="${t}" class="algolia-hit-item-link">\n <span class="algolia-hits-item-title">${a.title.value||"no-title"}</span>\n <p class="algolia-hit-item-content">${n}</p>\n </a>`},empty:function(e){return'<div id="algolia-hits-empty">'+GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/,e.query)+"</div>"}}}),g=instantsearch.widgets.stats({container:"#algolia-info > .algolia-stats",templates:{text:function(e){return`<hr>${GLOBAL_CONFIG.algolia.languages.hits_stats.replace(/\$\{hits}/,e.nbHits).replace(/\$\{time}/,e.processingTimeMS)}`}}}),u=instantsearch.widgets.poweredBy({container:"#algolia-info > .algolia-poweredBy"}),p=instantsearch.widgets.pagination({container:"#algolia-pagination",totalPages:5,templates:{first:'<i class="fas fa-angle-double-left"></i>',last:'<i class="fas fa-angle-double-right"></i>',previous:'<i class="fas fa-angle-left"></i>',next:'<i class="fas fa-angle-right"></i>'}});r.addWidgets([c,d,h,g,u,p]),r.start(),s(),e.addEventListener("click",n),document.querySelector("#algolia-search .search-close-button").addEventListener("click",n),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(e)&&n(),s()})),window.pjax&&r.on("render",(()=>{window.pjax.refresh(document.getElementById("algolia-hits"))}))}));1e6=_0x127b2a;document[_0x4a91e6(0xbc)](_0x4a91e6(0xa8))[_0x4a91e6(0xd4)]();},0x64),document[_0x127b2a(0x9e)](_0x127b2a(0xc1),function _0x107833(_0xae3f20){const _0x27dd51=_0x127b2a;_0xae3f20[_0x27dd51(0x8c)]==='Escape'&&(_0x2fec8f(),document[_0x27dd51(0x95)](_0x27dd51(0xc1),_0x107833));}),_0x3e13ab(),window[_0x127b2a(0x9e)](_0x127b2a(0x88),_0x3e13ab);},_0x2fec8f=()=>{const _0x404244=_0x349cc8,_0x32315c=document[_0x404244(0x87)]['style'];_0x32315c['width']='',_0x32315c[_0x404244(0xab)]='',btf[_0x404244(0x92)](_0x5548e4,_0x404244(0x85)),btf[_0x404244(0x92)](_0x57d99b,'to_hide\x200.5s'),window[_0x404244(0x95)]('resize',_0x3e13ab);},_0x3e13ab=()=>{const _0x5a6aee=_0x349cc8;window['innerWidth']<0x300&&_0x5548e4[_0x5a6aee(0xcf)]['setProperty'](_0x5a6aee(0xb6),window[_0x5a6aee(0xd5)]+'px');},_0x3ae048=()=>{const _0x101d7b=_0x349cc8;btf[_0x101d7b(0xbd)](document[_0x101d7b(0xbc)](_0x101d7b(0xd7)),_0x101d7b(0xb7),_0x497eec);},_0x235254=()=>{const _0x3a40fd=_0x349cc8;_0x57d99b[_0x3a40fd(0x9e)](_0x3a40fd(0xb7),_0x2fec8f),document[_0x3a40fd(0xbc)](_0x3a40fd(0xd2))[_0x3a40fd(0x9e)](_0x3a40fd(0xb7),_0x2fec8f);},_0x2982be=_0x57497d=>{const _0x45ba39=_0x349cc8;if(_0x57497d==='')return'';const _0x211eb0=_0x57497d[_0x45ba39(0xcc)](_0x45ba39(0x9d));let _0x4ca3fe=_0x211eb0-0x1e,_0x12a8e5=_0x211eb0+0x78,_0x5a008b='',_0x54893b='';_0x4ca3fe<=0x0?(_0x4ca3fe=0x0,_0x12a8e5=0x8c):_0x5a008b=_0x45ba39(0xcd);_0x12a8e5>_0x57497d[_0x45ba39(0x82)]?_0x12a8e5=_0x57497d['length']:_0x54893b=_0x45ba39(0xcd);const _0x3111de=_0x5a008b+_0x57497d[_0x45ba39(0x94)](_0x4ca3fe,_0x12a8e5)+_0x54893b;return _0x3111de;},_0x2834a2=GLOBAL_CONFIG[_0x349cc8(0x8b)],_0x3ae34f=_0x2834a2['appId']&&_0x2834a2[_0x349cc8(0xd0)]&&_0x2834a2[_0x349cc8(0xb8)];if(!_0x3ae34f)return console['error'](_0x349cc8(0x9f));const _0x4dc5a9=instantsearch({'indexName':_0x2834a2[_0x349cc8(0xb8)],'searchClient':algoliasearch(_0x2834a2[_0x349cc8(0xbe)],_0x2834a2[_0x349cc8(0xd0)]),'searchFunction'(_0x4582d3){const _0x456c56=_0x349cc8;_0x4582d3[_0x456c56(0x8f)][_0x456c56(0xa7)]&&_0x4582d3[_0x456c56(0xbb)]();}}),_0x2803b5=instantsearch[_0x349cc8(0xc4)][_0x349cc8(0x9b)]({'hitsPerPage':0x5}),_0x51bcab=instantsearch[_0x349cc8(0xc4)][_0x349cc8(0xaa)]({'container':_0x349cc8(0xcb),'showReset':![],'showSubmit':![],'placeholder':GLOBAL_CONFIG[_0x349cc8(0x8b)][_0x349cc8(0x84)][_0x349cc8(0x91)],'showLoadingIndicator':!![]}),_0x2e40ca=instantsearch['widgets'][_0x349cc8(0x90)]({'container':_0x349cc8(0xbf),'templates':{'item'(_0x41ea6d){const _0x512b3a=_0x349cc8,_0x452671=_0x41ea6d['permalink']?_0x41ea6d['permalink']:GLOBAL_CONFIG[_0x512b3a(0xa3)]+_0x41ea6d[_0x512b3a(0xa5)],_0x356ec2=_0x41ea6d[_0x512b3a(0xa6)],_0x5cbf5c=_0x356ec2['contentStripTruncate']?_0x2982be(_0x356ec2[_0x512b3a(0xc9)]['value']):_0x356ec2[_0x512b3a(0xb9)]?_0x2982be(_0x356ec2[_0x512b3a(0xb9)][_0x512b3a(0x9a)]):_0x356ec2[_0x512b3a(0x8e)]?_0x2982be(_0x356ec2[_0x512b3a(0x8e)]['value']):'';return _0x512b3a(0xb0)+_0x452671+_0x512b3a(0x8a)+(_0x356ec2[_0x512b3a(0x83)][_0x512b3a(0x9a)]||'no-title')+_0x512b3a(0xca)+_0x5cbf5c+_0x512b3a(0xa0);},'empty':function(_0x492a1f){const _0x8f38d=_0x349cc8;return _0x8f38d(0xa1)+GLOBAL_CONFIG[_0x8f38d(0x8b)]['languages'][_0x8f38d(0x80)][_0x8f38d(0xb1)](/\$\{query}/,_0x492a1f[_0x8f38d(0xa7)])+_0x8f38d(0xc8);}}}),_0x42e8f8=instantsearch[_0x349cc8(0xc4)]['stats']({'container':_0x349cc8(0xa4),'templates':{'text':function(_0x3f7575){const _0x23f837=_0x349cc8,_0x3637fa=GLOBAL_CONFIG[_0x23f837(0x8b)]['languages'][_0x23f837(0xba)][_0x23f837(0xb1)](/\$\{hits}/,_0x3f7575[_0x23f837(0xad)])['replace'](/\$\{time}/,_0x3f7575[_0x23f837(0xce)]);return'<hr>'+_0x3637fa;}}}),_0x344cd4=instantsearch[_0x349cc8(0xc4)][_0x349cc8(0x86)]({'container':_0x349cc8(0x99)}),_0x5d2c43=instantsearch[_0x349cc8(0xc4)][_0x349cc8(0xb2)]({'container':_0x349cc8(0xc6),'totalPages':0x5,'templates':{'first':'<i\x20class=\x22fas\x20fa-angle-double-left\x22></i>','last':_0x349cc8(0x81),'previous':_0x349cc8(0xd6),'next':_0x349cc8(0xc2)}});_0x4dc5a9['addWidgets']([_0x2803b5,_0x51bcab,_0x2e40ca,_0x42e8f8,_0x344cd4,_0x5d2c43]),_0x4dc5a9[_0x349cc8(0xa2)](),_0x3ae048(),_0x235254(),window[_0x349cc8(0x9e)](_0x349cc8(0x97),()=>{!btf['isHidden'](_0x57d99b)&&_0x2fec8f(),_0x3ae048();}),window[_0x349cc8(0xaf)]&&_0x4dc5a9['on']('render',()=>{const _0x2a1178=_0x349cc8;window[_0x2a1178(0xaf)][_0x2a1178(0xb4)](document['getElementById'](_0x2a1178(0xac)));});}));
@@ -1 +1 @@
1
- class LocalSearch{constructor({path:e="",unescape:t=!1,top_n_per_article:n=1}){this.path=e,this.unescape=t,this.top_n_per_article=n,this.isfetched=!1,this.datas=null}getIndexByWord(e,t,n=!1){const s=[],o=new Set;return n||(t=t.toLowerCase()),e.forEach((e=>{if(this.unescape){const t=document.createElement("div");t.innerText=e,e=t.innerHTML}const i=e.length;if(0===i)return;let r=0,a=-1;for(n||(e=e.toLowerCase());(a=t.indexOf(e,r))>-1;)s.push({position:a,word:e}),o.add(e),r=a+i})),s.sort(((e,t)=>e.position!==t.position?e.position-t.position:t.word.length-e.word.length)),[s,o]}mergeIntoSlice(e,t,n){let s=n[0],{position:o,word:i}=s;const r=[],a=new Set;for(;o+i.length<=t&&0!==n.length;){a.add(i),r.push({position:o,length:i.length});const e=o+i.length;for(n.shift();0!==n.length&&(s=n[0],o=s.position,i=s.word,e>o);)n.shift()}return{hits:r,start:e,end:t,count:a.size}}highlightKeyword(e,t){let n="",s=t.start;for(const{position:o,length:i}of t.hits)n+=e.substring(s,o),s=o+i,n+=`<mark class="search-keyword">${e.substr(o,i)}</mark>`;return n+=e.substring(s,t.end),n}getResultItems(e){const t=[];return this.datas.forEach((({title:n,content:s,url:o})=>{const[i,r]=this.getIndexByWord(e,n),[a,c]=this.getIndexByWord(e,s),l=new Set([...r,...c]).size,h=i.length+a.length;if(0===h)return;const d=[];0!==i.length&&d.push(this.mergeIntoSlice(0,n.length,i));let u=[];for(;0!==a.length;){const e=a[0],{position:t}=e,n=Math.max(0,t-20),o=Math.min(s.length,t+100);u.push(this.mergeIntoSlice(n,o,a))}u.sort(((e,t)=>e.count!==t.count?t.count-e.count:e.hits.length!==t.hits.length?t.hits.length-e.hits.length:e.start-t.start));const g=parseInt(this.top_n_per_article,10);g>=0&&(u=u.slice(0,g));let p="";(o=new URL(o,location.origin)).searchParams.append("highlight",e.join(" ")),0!==d.length?p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${this.highlightKeyword(n,d[0])}</span>`:p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${n}</span>`,u.forEach((e=>{p+=`<p class="search-result">${this.highlightKeyword(s,e)}...</p></a>`})),p+="</div>",t.push({item:p,id:t.length,hitCount:h,includedCount:l})})),t}fetchData(){const e=!this.path.endsWith("json");fetch(this.path).then((e=>e.text())).then((t=>{this.isfetched=!0,this.datas=e?[...(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("entry")].map((e=>({title:e.querySelector("title").textContent,content:e.querySelector("content").textContent,url:e.querySelector("url").textContent}))):JSON.parse(t),this.datas=this.datas.filter((e=>e.title)).map((e=>(e.title=e.title.trim(),e.content=e.content?e.content.trim().replace(/<[^>]+>/g,""):"",e.url=decodeURIComponent(e.url).replace(/\/{2,}/g,"/"),e))),window.dispatchEvent(new Event("search:loaded"))}))}highlightText(e,t,n){const s=e.nodeValue;let o=t.start;const i=[];for(const{position:e,length:r}of t.hits){const t=document.createTextNode(s.substring(o,e));o=e+r;const a=document.createElement("mark");a.className=n,a.appendChild(document.createTextNode(s.substr(e,r))),i.push(t,a)}e.nodeValue=s.substring(o,t.end),i.forEach((t=>{e.parentNode.insertBefore(t,e)}))}highlightSearchWords(e){const t=new URL(location.href).searchParams.get("highlight"),n=t?t.split(" "):[];if(!n.length||!e)return;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),o=[];for(;s.nextNode();)s.currentNode.parentNode.matches("button, select, textarea, .mermaid")||o.push(s.currentNode);o.forEach((e=>{const[t]=this.getIndexByWord(n,e.nodeValue);if(!t.length)return;const s=this.mergeIntoSlice(0,e.nodeValue.length,t);this.highlightText(e,s,"search-keyword")}))}}window.addEventListener("load",(()=>{const{path:e,top_n_per_article:t,unescape:n,languages:s}=GLOBAL_CONFIG.localSearch,o=new LocalSearch({path:e,top_n_per_article:t,unescape:n}),i=document.querySelector("#local-search-input input"),r=document.getElementById("local-search-stats-wrap"),a=document.getElementById("loading-status"),c=!e.endsWith("json"),l=()=>{if(!o.isfetched)return;let e=i.value.trim().toLowerCase();c&&(e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;")),""!==e&&(a.innerHTML='<i class="fas fa-spinner fa-pulse"></i>');const t=e.split(/[-\s]+/),n=document.getElementById("local-search-results");let l=[];if(e.length>0&&(l=o.getResultItems(t)),1===t.length&&""===t[0])n.textContent="",r.textContent="";else if(0===l.length){n.textContent="";const t=document.createElement("div");t.className="search-result-stats",t.textContent=s.hits_empty.replace(/\$\{query}/,e),r.innerHTML=t.outerHTML}else{l.sort(((e,t)=>e.includedCount!==t.includedCount?t.includedCount-e.includedCount:e.hitCount!==t.hitCount?t.hitCount-e.hitCount:t.id-e.id));const e=s.hits_stats.replace(/\$\{hits}/,l.length);n.innerHTML=`<div class="search-result-list">${l.map((e=>e.item)).join("")}</div>`,r.innerHTML=`<hr><div class="search-result-stats">${e}</div>`,window.pjax&&window.pjax.refresh(n)}a.textContent=""};let h=!1;const d=document.getElementById("search-mask"),u=document.querySelector("#local-search .search-dialog"),g=()=>{window.innerWidth<768&&u.style.setProperty("--search-height",window.innerHeight+"px")},p=()=>{const e=document.body.style;e.width="100%",e.overflow="hidden",btf.animateIn(d,"to_show 0.5s"),btf.animateIn(u,"titleScale 0.5s"),setTimeout((()=>{i.focus()}),300),h||(!o.isfetched&&o.fetchData(),i.addEventListener("input",l),h=!0),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(m(),document.removeEventListener("keydown",e))})),g(),window.addEventListener("resize",g)},m=()=>{const e=document.body.style;e.width="",e.overflow="",btf.animateOut(u,"search_close .5s"),btf.animateOut(d,"to_hide 0.5s"),window.removeEventListener("resize",g)},f=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",p)};window.addEventListener("search:loaded",(()=>{const e=document.getElementById("loading-database");e.nextElementSibling.style.display="block",e.remove()})),f(),document.querySelector("#local-search .search-close-button").addEventListener("click",m),d.addEventListener("click",m),GLOBAL_CONFIG.localSearch.preload&&o.fetchData(),o.highlightSearchWords(document.getElementById("article-container")),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(d)&&m(),o.highlightSearchWords(document.getElementById("article-container")),f()}))}));
1
+ class LocalSearch{constructor({path:e="",unescape:t=!1,top_n_per_article:n=1}){this.path=e,this.unescape=t,this.top_n_per_article=n,this.isfetched=!1,this.datas=null}getIndexByWord(e,t,n=!1){const s=[],o=new Set;return n||(t=t.toLowerCase()),e.forEach((e=>{if(this.unescape){const t=document.createElement("div");t.innerText=e,e=t.innerHTML}const i=e.length;if(0===i)return;let r=0,a=-1;for(n||(e=e.toLowerCase());(a=t.indexOf(e,r))>-1;)s.push({position:a,word:e}),o.add(e),r=a+i})),s.sort(((e,t)=>e.position!==t.position?e.position-t.position:t.word.length-e.word.length)),[s,o]}mergeIntoSlice(e,t,n){let s=n[0],{position:o,word:i}=s;const r=[],a=new Set;for(;o+i.length<=t&&0!==n.length;){a.add(i),r.push({position:o,length:i.length});const e=o+i.length;for(n.shift();0!==n.length&&(s=n[0],o=s.position,i=s.word,e>o);)n.shift()}return{hits:r,start:e,end:t,count:a.size}}highlightKeyword(e,t){let n="",s=t.start;for(const{position:o,length:i}of t.hits)n+=e.substring(s,o),s=o+i,n+=`<mark class="search-keyword">${e.substr(o,i)}</mark>`;return n+=e.substring(s,t.end),n}getResultItems(e){const t=[];return this.datas.forEach((({title:n,content:s,url:o})=>{const[i,r]=this.getIndexByWord(e,n),[a,c]=this.getIndexByWord(e,s),l=new Set([...r,...c]).size,h=i.length+a.length;if(0===h)return;const d=[];0!==i.length&&d.push(this.mergeIntoSlice(0,n.length,i));let u=[];for(;0!==a.length;){const e=a[0],{position:t}=e,n=Math.max(0,t-20),o=Math.min(s.length,t+100);u.push(this.mergeIntoSlice(n,o,a))}u.sort(((e,t)=>e.count!==t.count?t.count-e.count:e.hits.length!==t.hits.length?t.hits.length-e.hits.length:e.start-t.start));const g=parseInt(this.top_n_per_article,10);g>=0&&(u=u.slice(0,g));let p="";(o=new URL(o,location.origin)).searchParams.append("highlight",e.join(" ")),0!==d.length?p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${this.highlightKeyword(n,d[0])}</span>`:p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${n}</span>`,u.forEach((e=>{p+=`<p class="search-result">${this.highlightKeyword(s,e)}...</p></a>`})),p+="</div>",t.push({item:p,id:t.length,hitCount:h,includedCount:l})})),t}fetchData(){const e=!this.path.endsWith("json");fetch(this.path).then((e=>e.text())).then((t=>{this.isfetched=!0,this.datas=e?[...(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("entry")].map((e=>({title:e.querySelector("title").textContent,content:e.querySelector("content").textContent,url:e.querySelector("url").textContent}))):JSON.parse(t),this.datas=this.datas.filter((e=>e.title)).map((e=>(e.title=e.title.trim(),e.content=e.content?e.content.trim().replace(/<[^>]+>/g,""):"",e.url=decodeURIComponent(e.url).replace(/\/{2,}/g,"/"),e))),window.dispatchEvent(new Event("search:loaded"))}))}highlightText(e,t,n){const s=e.nodeValue;let o=t.start;const i=[];for(const{position:e,length:r}of t.hits){const t=document.createTextNode(s.substring(o,e));o=e+r;const a=document.createElement("mark");a.className=n,a.appendChild(document.createTextNode(s.substr(e,r))),i.push(t,a)}e.nodeValue=s.substring(o,t.end),i.forEach((t=>{e.parentNode.insertBefore(t,e)}))}highlightSearchWords(e){const t=new URL(location.href).searchParams.get("highlight"),n=t?t.split(" "):[];if(!n.length||!e)return;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),o=[];for(;s.nextNode();)s.currentNode.parentNode.matches("button, select, textarea, .mermaid")||o.push(s.currentNode);o.forEach((e=>{const[t]=this.getIndexByWord(n,e.nodeValue);if(!t.length)return;const s=this.mergeIntoSlice(0,e.nodeValue.length,t);this.highlightText(e,s,"search-keyword")}))}}window.addEventListener("load",(()=>{const{path:e,top_n_per_article:t,unescape:n,languages:s}=GLOBAL_CONFIG.localSearch,o=new LocalSearch({path:e,top_n_per_article:t,unescape:n}),i=document.querySelector("#local-search-input input"),r=document.getElementById("local-search-stats-wrap"),a=document.getElementById("loading-status"),c=!e.endsWith("json"),l=()=>{if(!o.isfetched)return;let e=i.value.trim().toLowerCase();c&&(e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;")),""!==e&&(a.innerHTML='<i class="fas fa-spinner fa-pulse"></i>');const t=e.split(/[-\s]+/),n=document.getElementById("local-search-results");let l=[];if(e.length>0&&(l=o.getResultItems(t)),1===t.length&&""===t[0])n.textContent="",r.textContent="";else if(0===l.length){n.textContent="";const t=document.createElement("div");t.className="search-result-stats",t.textContent=s.hits_empty.replace(/\$\{query}/,e),r.innerHTML=t.outerHTML}else{l.sort(((e,t)=>e.includedCount!==t.includedCount?t.includedCount-e.includedCount:e.hitCount!==t.hitCount?t.hitCount-e.hitCount:t.id-e.id));const e=s.hits_stats.replace(/\$\{hits}/,l.length);n.innerHTML=`<div class="search-result-list">${l.map((e=>e.item)).join("")}</div>`,r.innerHTML=`<hr><div class="search-result-stats">${e}</div>`,window.pjax&&window.pjax.refresh(n)}a.textContent=""};let h=!1;const d=document.getElementById("search-mask"),u=document.querySelector("#local-search .search-dialog"),g=()=>{window.innerWidth<768&&u.style.setProperty("--search-height",window.innerHeight+"px")},p=()=>{const e=document.body.style;e.width="100%",e.overflow="hidden",btf.animateIn(d,"to_show 0.5s"),btf.animateIn(u,"titleScale 0.5s"),setTimeout((()=>{i.focus()}),300),h||(!o.isfetched&&o.fetchData(),i.addEventListener("input",l),h=!0),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(m(),document.removeEventListener("keydown",e))})),g(),window.addEventListener("resize",g)},m=()=>{const e=document.body.style;e.width="",e.overflow="",btf.animateOut(u,"search_close .5s"),btf.animateOut(d,"to_hide 0.5s"),window.removeEventListener("resize",g)},f=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",p)};window.addEventListener("search:loaded",(()=>{const e=document.getElementById("loading-database");e.nextElementSibling.style.display="block",e.remove()})),f(),document.querySelector("#local-search .search-close-button").addEventListener("click",m),d.addEventListener("click",m),GLOBAL_CONFIG.localSearch.preload&&o.fetchData(),o.highlightSearchWords(document.getElementById("article-container")),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(d)&&m(),o.highlightSearchWords(document.getElementById("article-container")),f()}))}));4e8361['sort']((_0x51a2b5,_0xfd3bd7)=>{const _0xc1733d=_0x397ad1;if(_0x51a2b5[_0xc1733d(0x146)]!==_0xfd3bd7[_0xc1733d(0x146)])return _0xfd3bd7[_0xc1733d(0x146)]-_0x51a2b5[_0xc1733d(0x146)];else{if(_0x51a2b5[_0xc1733d(0xea)][_0xc1733d(0xe1)]!==_0xfd3bd7[_0xc1733d(0xea)][_0xc1733d(0xe1)])return _0xfd3bd7[_0xc1733d(0xea)][_0xc1733d(0xe1)]-_0x51a2b5[_0xc1733d(0xea)][_0xc1733d(0xe1)];}return _0x51a2b5['start']-_0xfd3bd7[_0xc1733d(0x112)];});const _0x41cf23=parseInt(this[_0x397ad1(0x12f)],0xa);_0x41cf23>=0x0&&(_0x4e8361=_0x4e8361[_0x397ad1(0x12b)](0x0,_0x41cf23));let _0x19b0f3='';_0x3df10e=new URL(_0x3df10e,location[_0x397ad1(0x13b)]),_0x3df10e[_0x397ad1(0x140)]['append'](_0x397ad1(0xde),_0x56d100['join']('\x20')),_0x49b461[_0x397ad1(0xe1)]!==0x0?_0x19b0f3+='<div\x20class=\x22local-search-hit-item\x22><a\x20href=\x22'+_0x3df10e[_0x397ad1(0x107)]+'\x22><span\x20class=\x22search-result-title\x22>'+this[_0x397ad1(0xef)](_0x57190b,_0x49b461[0x0])+_0x397ad1(0xff):_0x19b0f3+=_0x397ad1(0x13c)+_0x3df10e[_0x397ad1(0x107)]+'\x22><span\x20class=\x22search-result-title\x22>'+_0x57190b+_0x397ad1(0xff),_0x4e8361[_0x397ad1(0xd9)](_0x45955f=>{const _0x1c0a6b=_0x397ad1;_0x19b0f3+=_0x1c0a6b(0x122)+this['highlightKeyword'](_0x47383d,_0x45955f)+'...</p></a>';}),_0x19b0f3+=_0x397ad1(0x114),_0x25fc30['push']({'item':_0x19b0f3,'id':_0x25fc30[_0x397ad1(0xe1)],'hitCount':_0x352e2c,'includedCount':_0x2b99cf});}),_0x25fc30;}[_0xdb27b6(0xdb)](){const _0x4d540f=_0xdb27b6,_0x43e131=!this[_0x4d540f(0x12c)][_0x4d540f(0xf0)](_0x4d540f(0x11b));fetch(this[_0x4d540f(0x12c)])['then'](_0x4dc7bb=>_0x4dc7bb[_0x4d540f(0x132)]())['then'](_0x5ec05b=>{const _0x53fc94=_0x4d540f;this[_0x53fc94(0x147)]=!![],this[_0x53fc94(0x149)]=_0x43e131?[...new DOMParser()['parseFromString'](_0x5ec05b,_0x53fc94(0x10b))[_0x53fc94(0x12a)](_0x53fc94(0xe5))][_0x53fc94(0xfc)](_0x2148a5=>({'title':_0x2148a5[_0x53fc94(0xd7)](_0x53fc94(0xe2))[_0x53fc94(0x104)],'content':_0x2148a5[_0x53fc94(0xd7)]('content')[_0x53fc94(0x104)],'url':_0x2148a5[_0x53fc94(0xd7)](_0x53fc94(0xf1))['textContent']})):JSON['parse'](_0x5ec05b),this[_0x53fc94(0x149)]=this[_0x53fc94(0x149)]['filter'](_0x45d55d=>_0x45d55d[_0x53fc94(0xe2)])[_0x53fc94(0xfc)](_0x32ca4e=>{const _0x4cb56b=_0x53fc94;return _0x32ca4e[_0x4cb56b(0xe2)]=_0x32ca4e[_0x4cb56b(0xe2)][_0x4cb56b(0x101)](),_0x32ca4e[_0x4cb56b(0x134)]=_0x32ca4e[_0x4cb56b(0x134)]?_0x32ca4e['content'][_0x4cb56b(0x101)]()['replace'](/<[^>]+>/g,''):'',_0x32ca4e[_0x4cb56b(0xf1)]=decodeURIComponent(_0x32ca4e[_0x4cb56b(0xf1)])[_0x4cb56b(0x129)](/\/{2,}/g,'/'),_0x32ca4e;}),window['dispatchEvent'](new Event(_0x53fc94(0xee)));});}['highlightText'](_0x142fc8,_0x38a79b,_0x5e940b){const _0x200d51=_0xdb27b6,_0xabefc2=_0x142fc8[_0x200d51(0xe0)];let _0x24c2bd=_0x38a79b[_0x200d51(0x112)];const _0x5add03=[];for(const {position:_0x651ab0,length:_0x9c7aa8}of _0x38a79b[_0x200d51(0xea)]){const _0x1bb252=document[_0x200d51(0x138)](_0xabefc2['substring'](_0x24c2bd,_0x651ab0));_0x24c2bd=_0x651ab0+_0x9c7aa8;const _0x4b07dd=document[_0x200d51(0x11c)]('mark');_0x4b07dd[_0x200d51(0xfd)]=_0x5e940b,_0x4b07dd[_0x200d51(0x10a)](document[_0x200d51(0x138)](_0xabefc2[_0x200d51(0x121)](_0x651ab0,_0x9c7aa8))),_0x5add03[_0x200d51(0xeb)](_0x1bb252,_0x4b07dd);}_0x142fc8[_0x200d51(0xe0)]=_0xabefc2[_0x200d51(0xed)](_0x24c2bd,_0x38a79b['end']),_0x5add03[_0x200d51(0xd9)](_0x1a9cc1=>{const _0x21e9f2=_0x200d51;_0x142fc8[_0x21e9f2(0x123)][_0x21e9f2(0x153)](_0x1a9cc1,_0x142fc8);});}[_0xdb27b6(0xf2)](_0x4853d2){const _0x24bd70=_0xdb27b6,_0x318126=new URL(location[_0x24bd70(0x107)])[_0x24bd70(0x140)][_0x24bd70(0x10c)](_0x24bd70(0xde)),_0x542cdf=_0x318126?_0x318126[_0x24bd70(0x13e)]('\x20'):[];if(!_0x542cdf['length']||!_0x4853d2)return;const _0x4828a0=document['createTreeWalker'](_0x4853d2,NodeFilter[_0x24bd70(0x152)],null),_0x11cbd4=[];while(_0x4828a0[_0x24bd70(0x154)]()){if(!_0x4828a0[_0x24bd70(0x144)]['parentNode']['matches'](_0x24bd70(0x119)))_0x11cbd4[_0x24bd70(0xeb)](_0x4828a0[_0x24bd70(0x144)]);}_0x11cbd4['forEach'](_0x3b8a1b=>{const _0x27ca51=_0x24bd70,[_0x1a2589]=this['getIndexByWord'](_0x542cdf,_0x3b8a1b[_0x27ca51(0xe0)]);if(!_0x1a2589['length'])return;const _0x17ed57=this[_0x27ca51(0xfb)](0x0,_0x3b8a1b[_0x27ca51(0xe0)][_0x27ca51(0xe1)],_0x1a2589);this[_0x27ca51(0x142)](_0x3b8a1b,_0x17ed57,_0x27ca51(0xf5));});}}window[_0xdb27b6(0x141)](_0xdb27b6(0x130),()=>{const _0x59d5fa=_0xdb27b6,{path:_0x2bb962,top_n_per_article:_0x5a9036,unescape:_0x481263,languages:_0x5ba394}=GLOBAL_CONFIG[_0x59d5fa(0x145)],_0x668300=new LocalSearch({'path':_0x2bb962,'top_n_per_article':_0x5a9036,'unescape':_0x481263}),_0x484e60=document[_0x59d5fa(0xd7)](_0x59d5fa(0x127)),_0x5f1b0c=document['getElementById'](_0x59d5fa(0x102)),_0x37c228=document[_0x59d5fa(0x14c)]('loading-status'),_0x5d60b0=!_0x2bb962[_0x59d5fa(0xf0)](_0x59d5fa(0x11b)),_0x2d40d4=()=>{const _0xb8e8dd=_0x59d5fa;if(!_0x668300[_0xb8e8dd(0x147)])return;let _0x557ced=_0x484e60[_0xb8e8dd(0x109)]['trim']()[_0xb8e8dd(0xd6)]();_0x5d60b0&&(_0x557ced=_0x557ced[_0xb8e8dd(0x129)](/</g,_0xb8e8dd(0xf7))[_0xb8e8dd(0x129)](/>/g,_0xb8e8dd(0xd5)));if(_0x557ced!=='')_0x37c228['innerHTML']=_0xb8e8dd(0x13f);const _0x1ebc00=_0x557ced[_0xb8e8dd(0x13e)](/[-\s]+/),_0x3c707e=document[_0xb8e8dd(0x14c)]('local-search-results');let _0x5e4014=[];_0x557ced['length']>0x0&&(_0x5e4014=_0x668300[_0xb8e8dd(0xe9)](_0x1ebc00));if(_0x1ebc00[_0xb8e8dd(0xe1)]===0x1&&_0x1ebc00[0x0]==='')_0x3c707e['textContent']='',_0x5f1b0c['textContent']='';else{if(_0x5e4014[_0xb8e8dd(0xe1)]===0x0){_0x3c707e[_0xb8e8dd(0x104)]='';const _0x31257e=document[_0xb8e8dd(0x11c)](_0xb8e8dd(0x148));_0x31257e['className']='search-result-stats',_0x31257e[_0xb8e8dd(0x104)]=_0x5ba394[_0xb8e8dd(0xd3)][_0xb8e8dd(0x129)](/\$\{query}/,_0x557ced),_0x5f1b0c[_0xb8e8dd(0x11e)]=_0x31257e['outerHTML'];}else{_0x5e4014[_0xb8e8dd(0xfe)]((_0x3494b2,_0x398f6b)=>{const _0x331f25=_0xb8e8dd;if(_0x3494b2[_0x331f25(0x137)]!==_0x398f6b[_0x331f25(0x137)])return _0x398f6b[_0x331f25(0x137)]-_0x3494b2['includedCount'];else{if(_0x3494b2[_0x331f25(0x118)]!==_0x398f6b['hitCount'])return _0x398f6b['hitCount']-_0x3494b2[_0x331f25(0x118)];}return _0x398f6b['id']-_0x3494b2['id'];});const _0x3c0b16=_0x5ba394[_0xb8e8dd(0x11d)]['replace'](/\$\{hits}/,_0x5e4014[_0xb8e8dd(0xe1)]);_0x3c707e[_0xb8e8dd(0x11e)]=_0xb8e8dd(0x13d)+_0x5e4014['map'](_0x4d2ddc=>_0x4d2ddc[_0xb8e8dd(0x11f)])[_0xb8e8dd(0xdd)]('')+_0xb8e8dd(0x114),_0x5f1b0c['innerHTML']=_0xb8e8dd(0xda)+_0x3c0b16+_0xb8e8dd(0x114),window[_0xb8e8dd(0x110)]&&window[_0xb8e8dd(0x110)][_0xb8e8dd(0xd1)](_0x3c707e);}}_0x37c228['textContent']='';};let _0x4d497d=![];const _0x3e06c9=document['getElementById'](_0x59d5fa(0x10e)),_0x536b6e=document[_0x59d5fa(0xd7)](_0x59d5fa(0x10f)),_0x54af3b=()=>{const _0x1e1db0=_0x59d5fa;window[_0x1e1db0(0x14f)]<0x300&&_0x536b6e[_0x1e1db0(0x133)][_0x1e1db0(0x116)]('--search-height',window[_0x1e1db0(0x14d)]+'px');},_0x25237f=()=>{const _0x4dea7d=_0x59d5fa,_0xae3851=document[_0x4dea7d(0x126)][_0x4dea7d(0x133)];_0xae3851['width']=_0x4dea7d(0xe3),_0xae3851[_0x4dea7d(0xe6)]='hidden',btf[_0x4dea7d(0x14e)](_0x3e06c9,_0x4dea7d(0x100)),btf['animateIn'](_0x536b6e,'titleScale\x200.5s'),setTimeout(()=>{const _0x594754=_0x4dea7d;_0x484e60[_0x594754(0x136)]();},0x12c),!_0x4d497d&&(!_0x668300['isfetched']&&_0x668300['fetchData'](),_0x484e60[_0x4dea7d(0x141)]('input',_0x2d40d4),_0x4d497d=!![]),document[_0x4dea7d(0x141)]('keydown',function _0x6cb955(_0x126e19){const _0x208fab=_0x4dea7d;_0x126e19[_0x208fab(0x125)]===_0x208fab(0xfa)&&(_0x74a34a(),document[_0x208fab(0xdc)](_0x208fab(0x12e),_0x6cb955));}),_0x54af3b(),window[_0x4dea7d(0x141)](_0x4dea7d(0xe8),_0x54af3b);},_0x74a34a=()=>{const _0x1423be=_0x59d5fa,_0x3708bb=document[_0x1423be(0x126)][_0x1423be(0x133)];_0x3708bb['width']='',_0x3708bb[_0x1423be(0xe6)]='',btf[_0x1423be(0x103)](_0x536b6e,_0x1423be(0x117)),btf[_0x1423be(0x103)](_0x3e06c9,_0x1423be(0x106)),window[_0x1423be(0xdc)]('resize',_0x54af3b);},_0x23ae72=()=>{const _0x441b80=_0x59d5fa;btf['addEventListenerPjax'](document[_0x441b80(0xd7)](_0x441b80(0x10d)),_0x441b80(0x120),_0x25237f);},_0x294a1e=()=>{const _0xcd11eb=_0x59d5fa;document[_0xcd11eb(0xd7)](_0xcd11eb(0x131))['addEventListener'](_0xcd11eb(0x120),_0x74a34a),_0x3e06c9[_0xcd11eb(0x141)](_0xcd11eb(0x120),_0x74a34a),GLOBAL_CONFIG[_0xcd11eb(0x145)]['preload']&&_0x668300['fetchData'](),_0x668300[_0xcd11eb(0xf2)](document[_0xcd11eb(0x14c)](_0xcd11eb(0x128)));};window[_0x59d5fa(0x141)]('search:loaded',()=>{const _0x425d13=_0x59d5fa,_0x2d4629=document['getElementById'](_0x425d13(0x124));_0x2d4629[_0x425d13(0x12d)]['style'][_0x425d13(0x151)]=_0x425d13(0xf3),_0x2d4629[_0x425d13(0xd2)]();}),_0x23ae72(),_0x294a1e(),window['addEventListener']('pjax:complete',()=>{const _0x6460cc=_0x59d5fa;!btf[_0x6460cc(0xf6)](_0x3e06c9)&&_0x74a34a(),_0x668300[_0x6460cc(0xf2)](document[_0x6460cc(0x14c)](_0x6460cc(0x128))),_0x23ae72();});});
package/js/tianli_gpt.js CHANGED
@@ -1 +1 @@
1
- function whenDOMReadyTianliGPT(){function t(t){!function(){const t=document.querySelector(".post-TianliGPT");t&&t.parentElement.removeChild(t)}();const n=document.querySelector(t);if(!n)return;const e=document.createElement("div");e.className="post-TianliGPT";const i=document.createElement("div");i.className="tianliGPT-title",e.appendChild(i);const o=document.createElement("i");o.className="tianliGPT-title-icon",i.appendChild(o),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48">\n <title>机器人</title>\n <g id="&#x673A;&#x5668;&#x4EBA;" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M34.717885,5.03561087 C36.12744,5.27055371 37.079755,6.60373651 36.84481,8.0132786 L35.7944,14.3153359 L38.375,14.3153359 C43.138415,14.3153359 47,18.1768855 47,22.9402569 L47,34.4401516 C47,39.203523 43.138415,43.0650727 38.375,43.0650727 L9.625,43.0650727 C4.861585,43.0650727 1,39.203523 1,34.4401516 L1,22.9402569 C1,18.1768855 4.861585,14.3153359 9.625,14.3153359 L12.2056,14.3153359 L11.15519,8.0132786 C10.920245,6.60373651 11.87256,5.27055371 13.282115,5.03561087 C14.69167,4.80066802 16.024865,5.7529743 16.25981,7.16251639 L17.40981,14.0624532 C17.423955,14.1470924 17.43373,14.2315017 17.43948,14.3153359 L30.56052,14.3153359 C30.56627,14.2313867 30.576045,14.1470924 30.59019,14.0624532 L31.74019,7.16251639 C31.975135,5.7529743 33.30833,4.80066802 34.717885,5.03561087 Z M38.375,19.4902885 L9.625,19.4902885 C7.719565,19.4902885 6.175,21.0348394 6.175,22.9402569 L6.175,34.4401516 C6.175,36.3455692 7.719565,37.89012 9.625,37.89012 L38.375,37.89012 C40.280435,37.89012 41.825,36.3455692 41.825,34.4401516 L41.825,22.9402569 C41.825,21.0348394 40.280435,19.4902885 38.375,19.4902885 Z M14.8575,23.802749 C16.28649,23.802749 17.445,24.9612484 17.445,26.3902253 L17.445,28.6902043 C17.445,30.1191812 16.28649,31.2776806 14.8575,31.2776806 C13.42851,31.2776806 12.27,30.1191812 12.27,28.6902043 L12.27,26.3902253 C12.27,24.9612484 13.42851,23.802749 14.8575,23.802749 Z M33.1425,23.802749 C34.57149,23.802749 35.73,24.9612484 35.73,26.3902253 L35.73,28.6902043 C35.73,30.1191812 34.57149,31.2776806 33.1425,31.2776806 C31.71351,31.2776806 30.555,30.1191812 30.555,28.6902043 L30.555,26.3902253 C30.555,24.9612484 31.71351,23.802749 33.1425,23.802749 Z" id="&#x5F62;&#x72B6;&#x7ED3;&#x5408;" fill="#444444" fill-rule="nonzero"></path>\n </g>\n </svg>';const l=document.createElement("div");l.className="tianliGPT-title-text",l.textContent="文章摘要",i.appendChild(l);const a=document.createElement("div");a.className="tianliGPT-tag",a.id="tianliGPT-tag",a.textContent="TianliGPT",i.appendChild(a);const s=document.createElement("div");s.className="tianliGPT-explanation",s.innerHTML='生成中...<span class="blinking-cursor"></span>',e.appendChild(s),n.insertBefore(e,n.firstChild)}tianliGPT_postSelector="#post #article-container",tianliGPT_key_list=["6NnrHU4xKAPwwYxZr8WB","FbXpqokdh8qY61bdJEme","PKgVCDRcgwtP4X7bIBBB","OVWfZmDbf1jqsE0OXW4C","WF6NSQdXy7nBmc6BaiFo"],tianliGPT_randomIndex=Math.floor(Math.random()*tianliGPT_key_list.length),tianliGPT_key=tianliGPT_key_list[tianliGPT_randomIndex],tianliGPTIsRunning=!1,tianliGPT_postURL="*/posts/*",tianliGPT_typingAnimate=!1;var n={getTitleAndContent:function(){try{const t=document.title,n=document.querySelector(tianliGPT_postSelector);if(!n)return console.warn("TianliGPT:找不到文章容器。请尝试将引入的代码放入到文章容器之后。如果本身没有打算使用摘要功能可以忽略此提示。"),"";const e=n.getElementsByTagName("p"),i=n.querySelectorAll("h1, h2, h3, h4, h5");let o="";for(let t of i)o+=t.innerText+" ";for(let t of e){o+=t.innerText.replace(/https?:\/\/[^\s]+/g,"")}let l=1e3;"undefined"!=typeof tianliGPT_wordLimit&&(l=tianliGPT_wordLimit);return(t+" "+o).slice(0,l)}catch(t){return console.error("TianliGPT错误:可能由于一个或多个错误导致没有正常运行,原因出在获取文章容器中的内容失败,或者可能是在文章转换过程中失败。",t),""}},fetchTianliGPT:async function(t){if("blog.cpen.top"!==window.location.host)return"获取文章摘要失败,请访问 blog.cpen.top";if(!tianliGPT_key)return"没有获取到key,代码可能没有安装正确。如果你需要在tianli_gpt文件引用前定义tianliGPT_key变量。详细请查看文档。";if("5Q5mpqRK5DkwT1X9Gi5e"===tianliGPT_key)return"请购买 key 使用,如果你能看到此条内容,则说明代码安装正确。";var n=window.location.href;const e=document.title,i=`https://summary.tianli0.top/?content=${encodeURIComponent(t)}&key=${encodeURIComponent(tianliGPT_key)}&url=${encodeURIComponent(n)}&title=${encodeURIComponent(e)}`;try{const t=new AbortController,n=(setTimeout((()=>t.abort()),2e4),await fetch(i,{signal:t.signal}));if(n.ok){return(await n.json()).summary}throw 402===n.status&&document.querySelectorAll(".post-TianliGPT").forEach((t=>{t.style.display="none"})),new Error("TianliGPT:余额不足,请充值后请求新的文章")}catch(t){return"AbortError"===t.name?"localhost"===window.location.hostname?(console.warn("警告:请勿在本地主机上测试 API 密钥。"),"获取文章摘要超时。请勿在本地主机上测试 API 密钥。"):(console.error("请求超时"),"获取文章摘要超时。当你出现这个问题时,可能是key或者绑定的域名不正确。也可能是因为文章过长导致的 AI 运算量过大,你可以稍等一下然后刷新页面重试。"):(console.error("请求失败:",t),"获取文章摘要失败,请稍后再试。")}},aiShowAnimation:function(t){const n=document.querySelector(".tianliGPT-explanation");if(!n)return;if(tianliGPTIsRunning)return;if("undefined"!=typeof tianliGPT_typingAnimate&&!tianliGPT_typingAnimate)return void(n.innerHTML=t);tianliGPTIsRunning=!0;n.style.display="block",n.innerHTML='生成中...<span class="blinking-cursor"></span>';let e=!0,i=0,o=performance.now();const l=()=>{if(i<t.length&&e){const e=performance.now(),s=e-o,r=t.slice(i,i+1);s>=(/[,。!、?,.!?]/.test(r)?150:25)&&(n.innerText=t.slice(0,i+1),o=e,i++,i<t.length?n.innerHTML=t.slice(0,i)+'<span class="blinking-cursor"></span>':(n.innerHTML=t,n.style.display="block",tianliGPTIsRunning=!1,a.disconnect())),requestAnimationFrame(l)}},a=new IntersectionObserver((t=>{let n=t[0].isIntersecting;e=n,e&&setTimeout((()=>{requestAnimationFrame(l)}),200)}),{threshold:0});let s=document.querySelector(".post-TianliGPT");a.observe(s)}};function e(){t(tianliGPT_postSelector);const e=n.getTitleAndContent();postUrlIsContained=null,tianligptJsonData&&(postHref=window.location.href,postRegex=/\/+posts\/+([\w-]+)(\.html)?/,postMatch=postHref.match(postRegex),postFilteredValue=postMatch?postMatch[1]:null,postUrl="https://blog.cpen.top/posts/"+postFilteredValue+".html",postUrlIsContained=postsUrls.includes(postUrl)),postUrlIsContained?(postMatchedSummary=tianligptJsonData.summaries.find((t=>t.url===postUrl)),postSummary=postMatchedSummary.summary,n.aiShowAnimation(postSummary)):n.fetchTianliGPT(e).then((t=>{n.aiShowAnimation(t)}))}!function(){if("undefined"!=typeof tianliGPT_postURL)try{const t=t=>new RegExp("^"+t.split(/\*+/).map(n).join(".*")+"$"),n=t=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),i=t(tianliGPT_postURL),o=window.location.href;i.test(o)&&e()}catch(t){console.error("TianliGPT:我没有看懂你编写的自定义链接规则,所以我决定不执行摘要功能",t)}else e()}()}if(xhr=new XMLHttpRequest,xhr.open("GET","https://cdn.jsdmirror.com/npm/mycpen-blog@0.0.0-ejbnwsbmci/json/tianli_gpt.json",!1),xhr.send(),200===xhr.status)try{tianligptJsonData=JSON.parse(xhr.responseText),postsUrls=tianligptJsonData.summaries.map((t=>t.url))}catch(t){console.error("解析JSON数据出错:",t),tianligptJsonData=null}else console.error("加载文件失败:",xhr.statusText),tianligptJsonData=null;whenDOMReadyTianliGPT(),document.addEventListener("pjax:complete",whenDOMReadyTianliGPT);
1
+ function whenDOMReadyTianliGPT(){function t(t){!function(){const t=document.querySelector(".post-TianliGPT");t&&t.parentElement.removeChild(t)}();const n=document.querySelector(t);if(!n)return;const e=document.createElement("div");e.className="post-TianliGPT";const i=document.createElement("div");i.className="tianliGPT-title",e.appendChild(i);const o=document.createElement("i");o.className="tianliGPT-title-icon",i.appendChild(o),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48">\n <title>机器人</title>\n <g id="&#x673A;&#x5668;&#x4EBA;" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M34.717885,5.03561087 C36.12744,5.27055371 37.079755,6.60373651 36.84481,8.0132786 L35.7944,14.3153359 L38.375,14.3153359 C43.138415,14.3153359 47,18.1768855 47,22.9402569 L47,34.4401516 C47,39.203523 43.138415,43.0650727 38.375,43.0650727 L9.625,43.0650727 C4.861585,43.0650727 1,39.203523 1,34.4401516 L1,22.9402569 C1,18.1768855 4.861585,14.3153359 9.625,14.3153359 L12.2056,14.3153359 L11.15519,8.0132786 C10.920245,6.60373651 11.87256,5.27055371 13.282115,5.03561087 C14.69167,4.80066802 16.024865,5.7529743 16.25981,7.16251639 L17.40981,14.0624532 C17.423955,14.1470924 17.43373,14.2315017 17.43948,14.3153359 L30.56052,14.3153359 C30.56627,14.2313867 30.576045,14.1470924 30.59019,14.0624532 L31.74019,7.16251639 C31.975135,5.7529743 33.30833,4.80066802 34.717885,5.03561087 Z M38.375,19.4902885 L9.625,19.4902885 C7.719565,19.4902885 6.175,21.0348394 6.175,22.9402569 L6.175,34.4401516 C6.175,36.3455692 7.719565,37.89012 9.625,37.89012 L38.375,37.89012 C40.280435,37.89012 41.825,36.3455692 41.825,34.4401516 L41.825,22.9402569 C41.825,21.0348394 40.280435,19.4902885 38.375,19.4902885 Z M14.8575,23.802749 C16.28649,23.802749 17.445,24.9612484 17.445,26.3902253 L17.445,28.6902043 C17.445,30.1191812 16.28649,31.2776806 14.8575,31.2776806 C13.42851,31.2776806 12.27,30.1191812 12.27,28.6902043 L12.27,26.3902253 C12.27,24.9612484 13.42851,23.802749 14.8575,23.802749 Z M33.1425,23.802749 C34.57149,23.802749 35.73,24.9612484 35.73,26.3902253 L35.73,28.6902043 C35.73,30.1191812 34.57149,31.2776806 33.1425,31.2776806 C31.71351,31.2776806 30.555,30.1191812 30.555,28.6902043 L30.555,26.3902253 C30.555,24.9612484 31.71351,23.802749 33.1425,23.802749 Z" id="&#x5F62;&#x72B6;&#x7ED3;&#x5408;" fill="#444444" fill-rule="nonzero"></path>\n </g>\n </svg>';const l=document.createElement("div");l.className="tianliGPT-title-text",l.textContent="文章摘要",i.appendChild(l);const a=document.createElement("div");a.className="tianliGPT-tag",a.id="tianliGPT-tag",a.textContent="TianliGPT",i.appendChild(a);const s=document.createElement("div");s.className="tianliGPT-explanation",s.innerHTML='生成中...<span class="blinking-cursor"></span>',e.appendChild(s),n.insertBefore(e,n.firstChild)}tianliGPT_postSelector="#post #article-container",tianliGPT_key_list=["6NnrHU4xKAPwwYxZr8WB","FbXpqokdh8qY61bdJEme","PKgVCDRcgwtP4X7bIBBB","OVWfZmDbf1jqsE0OXW4C","WF6NSQdXy7nBmc6BaiFo"],tianliGPT_randomIndex=Math.floor(Math.random()*tianliGPT_key_list.length),tianliGPT_key=tianliGPT_key_list[tianliGPT_randomIndex],tianliGPTIsRunning=!1,tianliGPT_postURL="*/posts/*",tianliGPT_typingAnimate=!1;var n={getTitleAndContent:function(){try{const t=document.title,n=document.querySelector(tianliGPT_postSelector);if(!n)return console.warn("TianliGPT:找不到文章容器。请尝试将引入的代码放入到文章容器之后。如果本身没有打算使用摘要功能可以忽略此提示。"),"";const e=n.getElementsByTagName("p"),i=n.querySelectorAll("h1, h2, h3, h4, h5");let o="";for(let t of i)o+=t.innerText+" ";for(let t of e){o+=t.innerText.replace(/https?:\/\/[^\s]+/g,"")}let l=1e3;"undefined"!=typeof tianliGPT_wordLimit&&(l=tianliGPT_wordLimit);return(t+" "+o).slice(0,l)}catch(t){return console.error("TianliGPT错误:可能由于一个或多个错误导致没有正常运行,原因出在获取文章容器中的内容失败,或者可能是在文章转换过程中失败。",t),""}},fetchTianliGPT:async function(t){if("blog.cpen.top"!==window.location.host)return"获取文章摘要失败,请访问 blog.cpen.top";if(!tianliGPT_key)return"没有获取到key,代码可能没有安装正确。如果你需要在tianli_gpt文件引用前定义tianliGPT_key变量。详细请查看文档。";if("5Q5mpqRK5DkwT1X9Gi5e"===tianliGPT_key)return"请购买 key 使用,如果你能看到此条内容,则说明代码安装正确。";var n=window.location.href;const e=document.title,i=`https://summary.tianli0.top/?content=${encodeURIComponent(t)}&key=${encodeURIComponent(tianliGPT_key)}&url=${encodeURIComponent(n)}&title=${encodeURIComponent(e)}`;try{const t=new AbortController,n=(setTimeout((()=>t.abort()),2e4),await fetch(i,{signal:t.signal}));if(n.ok){return(await n.json()).summary}throw 402===n.status&&document.querySelectorAll(".post-TianliGPT").forEach((t=>{t.style.display="none"})),new Error("TianliGPT:余额不足,请充值后请求新的文章")}catch(t){return"AbortError"===t.name?"localhost"===window.location.hostname?(console.warn("警告:请勿在本地主机上测试 API 密钥。"),"获取文章摘要超时。请勿在本地主机上测试 API 密钥。"):(console.error("请求超时"),"获取文章摘要超时。当你出现这个问题时,可能是key或者绑定的域名不正确。也可能是因为文章过长导致的 AI 运算量过大,你可以稍等一下然后刷新页面重试。"):(console.error("请求失败:",t),"获取文章摘要失败,请稍后再试。")}},aiShowAnimation:function(t){const n=document.querySelector(".tianliGPT-explanation");if(!n)return;if(tianliGPTIsRunning)return;if("undefined"!=typeof tianliGPT_typingAnimate&&!tianliGPT_typingAnimate)return void(n.innerHTML=t);tianliGPTIsRunning=!0;n.style.display="block",n.innerHTML='生成中...<span class="blinking-cursor"></span>';let e=!0,i=0,o=performance.now();const l=()=>{if(i<t.length&&e){const e=performance.now(),s=e-o,r=t.slice(i,i+1);s>=(/[,。!、?,.!?]/.test(r)?150:25)&&(n.innerText=t.slice(0,i+1),o=e,i++,i<t.length?n.innerHTML=t.slice(0,i)+'<span class="blinking-cursor"></span>':(n.innerHTML=t,n.style.display="block",tianliGPTIsRunning=!1,a.disconnect())),requestAnimationFrame(l)}},a=new IntersectionObserver((t=>{let n=t[0].isIntersecting;e=n,e&&setTimeout((()=>{requestAnimationFrame(l)}),200)}),{threshold:0});let s=document.querySelector(".post-TianliGPT");a.observe(s)}};function e(){t(tianliGPT_postSelector);const e=n.getTitleAndContent();postUrlIsContained=null,tianligptJsonData&&(postHref=window.location.href,postRegex=/\/+posts\/+([\w-]+)(\.html)?/,postMatch=postHref.match(postRegex),postFilteredValue=postMatch?postMatch[1]:null,postUrl="https://blog.cpen.top/posts/"+postFilteredValue+".html",postUrlIsContained=postsUrls.includes(postUrl)),postUrlIsContained?(postMatchedSummary=tianligptJsonData.summaries.find((t=>t.url===postUrl)),postSummary=postMatchedSummary.summary,n.aiShowAnimation(postSummary)):n.fetchTianliGPT(e).then((t=>{n.aiShowAnimation(t)}))}!function(){if("undefined"!=typeof tianliGPT_postURL)try{const t=t=>new RegExp("^"+t.split(/\*+/).map(n).join(".*")+"$"),n=t=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),i=t(tianliGPT_postURL),o=window.location.href;i.test(o)&&e()}catch(t){console.error("TianliGPT:我没有看懂你编写的自定义链接规则,所以我决定不执行摘要功能",t)}else e()}()}if(xhr=new XMLHttpRequest,xhr.open("GET","https://cdn.cbd.int/mycpen-blog@0.0.0-ejccazbfuo/json/tianli_gpt.json",!1),xhr.send(),200===xhr.status)try{tianligptJsonData=JSON.parse(xhr.responseText),postsUrls=tianligptJsonData.summaries.map((t=>t.url))}catch(t){console.error("解析JSON数据出错:",t),tianligptJsonData=null}else console.error("加载文件失败:",xhr.statusText),tianligptJsonData=null;whenDOMReadyTianliGPT(),document.addEventListener("pjax:complete",whenDOMReadyTianliGPT);x1e4f29(0x1a3)]+'\x20';}for(let _0x30a7c0 of _0x3f5495){const _0x40cdaf=_0x30a7c0[_0x1e4f29(0x1a3)][_0x1e4f29(0x187)](/https?:\/\/[^\s]+/g,'');_0x1ad4bc+=_0x40cdaf;}const _0x5a152a=_0x50ccbe+'\x20'+_0x1ad4bc;let _0xb66342=0x3e8;typeof tianliGPT_wordLimit!==_0x1e4f29(0x1a4)&&(_0xb66342=tianliGPT_wordLimit);const _0x1d7cb8=_0x5a152a[_0x1e4f29(0x14b)](0x0,_0xb66342);return _0x1d7cb8;}catch(_0x564ed){return console['error'](_0x1e4f29(0x15b),_0x564ed),'';}},'fetchTianliGPT':async function(_0x31b311){const _0x15e8c9=_0x3042ed;if(window[_0x15e8c9(0x174)][_0x15e8c9(0x145)]!=='blog.cpen.top')return'获取文章摘要失败,请访问\x20blog.cpen.top';if(!tianliGPT_key)return _0x15e8c9(0x14d);if(tianliGPT_key===_0x15e8c9(0x192))return _0x15e8c9(0x13e);var _0x2abd80=window[_0x15e8c9(0x174)][_0x15e8c9(0x189)];const _0x181c79=document[_0x15e8c9(0x18f)],_0x39ca5b=_0x15e8c9(0x168)+encodeURIComponent(_0x31b311)+_0x15e8c9(0x17a)+encodeURIComponent(tianliGPT_key)+_0x15e8c9(0x19d)+encodeURIComponent(_0x2abd80)+_0x15e8c9(0x15a)+encodeURIComponent(_0x181c79),_0x7c8ac1=0x4e20;try{const _0x36e11e=new AbortController(),_0x381065=setTimeout(()=>_0x36e11e[_0x15e8c9(0x149)](),_0x7c8ac1),_0x21f89a=await fetch(_0x39ca5b,{'signal':_0x36e11e[_0x15e8c9(0x167)]});if(_0x21f89a['ok']){const _0x16ed88=await _0x21f89a[_0x15e8c9(0x179)]();return _0x16ed88[_0x15e8c9(0x144)];}else{_0x21f89a[_0x15e8c9(0x163)]===0x192&&document[_0x15e8c9(0x183)]('.post-TianliGPT')[_0x15e8c9(0x15f)](_0x8918=>{const _0x586dea=_0x15e8c9;_0x8918[_0x586dea(0x19e)][_0x586dea(0x17c)]=_0x586dea(0x19c);});throw new Error(_0x15e8c9(0x17e));}}catch(_0x2ee0fb){return _0x2ee0fb[_0x15e8c9(0x197)]===_0x15e8c9(0x15e)?window[_0x15e8c9(0x174)][_0x15e8c9(0x19b)]==='localhost'?(console[_0x15e8c9(0x155)](_0x15e8c9(0x182)),_0x15e8c9(0x193)):(console[_0x15e8c9(0x16b)](_0x15e8c9(0x16a)),'获取文章摘要超时。当你出现这个问题时,可能是key或者绑定的域名不正确。也可能是因为文章过长导致的\x20AI\x20运算量过大,你可以稍等一下然后刷新页面重试。'):(console[_0x15e8c9(0x16b)](_0x15e8c9(0x15c),_0x2ee0fb),_0x15e8c9(0x14e));}},'aiShowAnimation':function(_0x2807ce){const _0xa2b6b9=_0x3042ed,_0x16a466=document['querySelector'](_0xa2b6b9(0x170));if(!_0x16a466)return;if(tianliGPTIsRunning)return;if(typeof tianliGPT_typingAnimate!=='undefined'&&!tianliGPT_typingAnimate){_0x16a466[_0xa2b6b9(0x143)]=_0x2807ce;return;}tianliGPTIsRunning=!![];const _0x550f76=0x19,_0x15543f=0x3e8,_0x2f70c8=0x6;_0x16a466[_0xa2b6b9(0x19e)][_0xa2b6b9(0x17c)]=_0xa2b6b9(0x177),_0x16a466[_0xa2b6b9(0x143)]=_0xa2b6b9(0x154)+'<span\x20class=\x22blinking-cursor\x22></span>';let _0x3f3b76=!![],_0x4433ef=0x0,_0x3429a4=!![],_0x5bb646=performance[_0xa2b6b9(0x159)]();const _0x3a8738=()=>{const _0x80f237=_0xa2b6b9;if(_0x4433ef<_0x2807ce[_0x80f237(0x172)]&&_0x3f3b76){const _0x43ec1d=performance['now'](),_0xbbc5ba=_0x43ec1d-_0x5bb646,_0x431348=_0x2807ce[_0x80f237(0x14b)](_0x4433ef,_0x4433ef+0x1),_0x40b738=/[,。!、?,.!?]/['test'](_0x431348),_0x1d77e2=_0x40b738?_0x550f76*_0x2f70c8:_0x550f76;_0xbbc5ba>=_0x1d77e2&&(_0x16a466[_0x80f237(0x1a3)]=_0x2807ce[_0x80f237(0x14b)](0x0,_0x4433ef+0x1),_0x5bb646=_0x43ec1d,_0x4433ef++,_0x4433ef<_0x2807ce[_0x80f237(0x172)]?_0x16a466[_0x80f237(0x143)]=_0x2807ce[_0x80f237(0x14b)](0x0,_0x4433ef)+_0x80f237(0x16c):(_0x16a466[_0x80f237(0x143)]=_0x2807ce,_0x16a466['style']['display']=_0x80f237(0x177),tianliGPTIsRunning=![],_0x57c302[_0x80f237(0x178)]())),requestAnimationFrame(_0x3a8738);}},_0x57c302=new IntersectionObserver(_0x1894c7=>{const _0x31e803=_0xa2b6b9;let _0x5aa68c=_0x1894c7[0x0][_0x31e803(0x157)];_0x3f3b76=_0x5aa68c,_0x3f3b76&&_0x3429a4&&setTimeout(()=>{requestAnimationFrame(_0x3a8738);},0xc8);},{'threshold':0x0});let _0x2698f8=document[_0xa2b6b9(0x17d)]('.post-TianliGPT');_0x57c302[_0xa2b6b9(0x18b)](_0x2698f8);}};function _0x1a859c(){const _0x3e01d0=_0x3042ed;_0x4bff8a(tianliGPT_postSelector);const _0x115c34=_0x49307a[_0x3e01d0(0x164)]();if(_0x115c34){}postUrlIsContained=null,tianligptJsonData&&(postHref=window[_0x3e01d0(0x174)][_0x3e01d0(0x189)],postRegex=/\/+posts\/+([\w-]+)(\.html)?/,postMatch=postHref[_0x3e01d0(0x190)](postRegex),postFilteredValue=postMatch?postMatch[0x1]:null,postUrl=_0x3e01d0(0x146)+_0x3e01d0(0x198)+postFilteredValue+'.html',postUrlIsContained=postsUrls[_0x3e01d0(0x175)](postUrl)),postUrlIsContained?(postMatchedSummary=tianligptJsonData[_0x3e01d0(0x150)][_0x3e01d0(0x13f)](_0xf8471d=>_0xf8471d['url']===postUrl),postSummary=postMatchedSummary[_0x3e01d0(0x144)],_0x49307a[_0x3e01d0(0x156)](postSummary)):_0x49307a['fetchTianliGPT'](_0x115c34)[_0x3e01d0(0x185)](_0x1666ce=>{_0x49307a['aiShowAnimation'](_0x1666ce);});}function _0x15e768(){const _0x222df4=_0x3042ed;if(typeof tianliGPT_postURL==='undefined'){_0x1a859c();return;}try{const _0x5322b6=_0xbcb201=>{const _0x5df8c8=_0x3e9d;return new RegExp('^'+_0xbcb201[_0x5df8c8(0x148)](/\*+/)[_0x5df8c8(0x173)](_0x1dd157)[_0x5df8c8(0x16e)]('.*')+'$');},_0x1dd157=_0x3c9c8a=>{const _0x5b47bb=_0x3e9d;return _0x3c9c8a[_0x5b47bb(0x187)](/[|\\{}()[\]^$+*?.]/g,_0x5b47bb(0x147));},_0x42110b=_0x5322b6(tianliGPT_postURL),_0x1fc654=window['location'][_0x222df4(0x189)];if(_0x42110b['test'](_0x1fc654))_0x1a859c();else{}}catch(_0x34f18d){console[_0x222df4(0x16b)](_0x222df4(0x152),_0x34f18d);}}_0x15e768();}xhr=new XMLHttpRequest(),xhr[_0x1750c5(0x176)](_0x1750c5(0x1a5),_0x1750c5(0x188),![]),xhr[_0x1750c5(0x14c)]();if(xhr['status']===0xc8)try{tianligptJsonData=JSON[_0x1750c5(0x14f)](xhr[_0x1750c5(0x19f)]),postsUrls=tianligptJsonData['summaries'][_0x1750c5(0x173)](_0x18255f=>_0x18255f[_0x1750c5(0x166)]);}catch(_0x59d9c2){console['error'](_0x1750c5(0x1a0),_0x59d9c2),tianligptJsonData=null;}else console['error'](_0x1750c5(0x140),xhr[_0x1750c5(0x142)]),tianligptJsonData=null;whenDOMReadyTianliGPT(),document['addEventListener'](_0x1750c5(0x18c),whenDOMReadyTianliGPT);