sinzmise-cetastories 2.0.0-1729401485124 → 2.0.0-1730024870544

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/404/index.html +1 -1
  2. package/about/index.html +1 -1
  3. package/album/index.html +1 -1
  4. package/archives/2021/12/index.html +1 -1
  5. package/archives/2021/index.html +1 -1
  6. package/archives/2022/12/index.html +1 -1
  7. package/archives/2022/index.html +1 -1
  8. package/archives/2023/01/index.html +1 -1
  9. package/archives/2023/02/index.html +1 -1
  10. package/archives/2023/03/index.html +1 -1
  11. package/archives/2023/04/index.html +1 -1
  12. package/archives/2023/07/index.html +1 -1
  13. package/archives/2023/08/index.html +1 -1
  14. package/archives/2023/09/index.html +1 -1
  15. package/archives/2023/10/index.html +1 -1
  16. package/archives/2023/11/index.html +1 -1
  17. package/archives/2023/12/index.html +1 -1
  18. package/archives/2023/index.html +1 -1
  19. package/archives/2023/page/2/index.html +1 -1
  20. package/archives/2023/page/3/index.html +1 -1
  21. package/archives/2024/01/index.html +1 -1
  22. package/archives/2024/02/index.html +1 -1
  23. package/archives/2024/03/index.html +1 -1
  24. package/archives/2024/04/index.html +1 -1
  25. package/archives/2024/05/index.html +1 -1
  26. package/archives/2024/06/index.html +1 -1
  27. package/archives/2024/07/index.html +1 -1
  28. package/archives/2024/08/index.html +1 -1
  29. package/archives/2024/09/index.html +1 -1
  30. package/archives/2024/10/index.html +1 -1
  31. package/archives/2024/index.html +1 -1
  32. package/archives/2024/page/2/index.html +1 -1
  33. package/archives/index.html +1 -1
  34. package/archives/page/2/index.html +1 -1
  35. package/archives/page/3/index.html +1 -1
  36. package/archives/page/4/index.html +1 -1
  37. package/archives/page/5/index.html +1 -0
  38. package/assets/algolia/algoliasearch.js +2 -1
  39. package/assets/algolia/algoliasearchLite.js +2 -1
  40. package/atom.xml +114 -204
  41. package/bbs/bbs.html +1 -1
  42. package/bbs/bbs.js +2 -1
  43. package/bbs/index.html +1 -1
  44. package/categories/index.html +1 -1
  45. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  46. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  47. package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  48. package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  49. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  50. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  51. package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  52. package/charts/index.html +1 -1
  53. package/comments/index.html +1 -1
  54. package/css/custom2.css +2 -1
  55. package/css/first.css +2 -0
  56. package/css/pace/big-counter.css +2 -1
  57. package/css/pace/corner-indicator.css +2 -1
  58. package/css/pace/flash.css +2 -1
  59. package/css/pace/mac-osx.css +2 -1
  60. package/css/pace/pace.css +2 -1
  61. package/css/plane.css +2 -1
  62. package/css/style.css +2 -0
  63. package/css/tags.css +2 -1
  64. package/essay/index.html +1 -1
  65. package/fcircle/index.html +1 -1
  66. package/games +3831 -509
  67. package/index.html +1 -1
  68. package/js/app.js +2 -0
  69. package/js/autoload.js +2 -1
  70. package/js/ceta/fancybox.css +2 -0
  71. package/js/ceta/fancybox.umd.js +2 -0
  72. package/js/ceta/iconfontInkss.js +2 -0
  73. package/js/ceta/lazyload.min.js +1 -0
  74. package/js/ceta/message.css +2 -0
  75. package/js/ceta/message.js +2 -0
  76. package/js/ceta/pjax.min.js +1 -0
  77. package/js/clock.js +2 -1
  78. package/js/kslink.js +2 -1
  79. package/js/newyear.js +2 -1
  80. package/js/plane.js +2 -1
  81. package/js/plugins/aplayer.js +2 -0
  82. package/js/plugins/parallax.js +2 -0
  83. package/js/plugins/rightMenus.js +2 -0
  84. package/js/plugins/tags/contributors.js +2 -0
  85. package/js/plugins/tags/friends.js +2 -0
  86. package/js/plugins/tags/sites.js +2 -0
  87. package/js/search/algolia.js +2 -0
  88. package/js/search/hexo.js +2 -0
  89. package/js/search/meilisearch.js +2 -0
  90. package/js/txmap.js +2 -1
  91. package/link/index.html +1 -1
  92. package/load.html +1 -1
  93. package/maps/assets/algolia/algoliasearch.js.map +1 -0
  94. package/maps/assets/algolia/algoliasearchLite.js.map +1 -0
  95. package/maps/bbs/bbs.js.map +1 -0
  96. package/maps/css/custom2.css.map +1 -0
  97. package/maps/css/first.css.map +1 -0
  98. package/maps/css/pace/big-counter.css.map +1 -0
  99. package/maps/css/pace/corner-indicator.css.map +1 -0
  100. package/maps/css/pace/flash.css.map +1 -0
  101. package/maps/css/pace/mac-osx.css.map +1 -0
  102. package/maps/css/pace/pace.css.map +1 -0
  103. package/maps/css/plane.css.map +1 -0
  104. package/maps/css/style.css.map +1 -0
  105. package/maps/css/tags.css.map +1 -0
  106. package/maps/js/app.js.map +1 -0
  107. package/maps/js/autoload.js.map +1 -0
  108. package/maps/js/ceta/fancybox.css.map +1 -0
  109. package/maps/js/ceta/fancybox.umd.js.map +1 -0
  110. package/maps/js/ceta/iconfontInkss.js.map +1 -0
  111. package/maps/js/ceta/message.css.map +1 -0
  112. package/maps/js/ceta/message.js.map +1 -0
  113. package/maps/js/clock.js.map +1 -0
  114. package/maps/js/kslink.js.map +1 -0
  115. package/maps/js/newyear.js.map +1 -0
  116. package/maps/js/plane.js.map +1 -0
  117. package/maps/js/plugins/aplayer.js.map +1 -0
  118. package/maps/js/plugins/parallax.js.map +1 -0
  119. package/maps/js/plugins/rightMenus.js.map +1 -0
  120. package/maps/js/plugins/tags/contributors.js.map +1 -0
  121. package/maps/js/plugins/tags/friends.js.map +1 -0
  122. package/maps/js/plugins/tags/sites.js.map +1 -0
  123. package/maps/js/search/algolia.js.map +1 -0
  124. package/maps/js/search/hexo.js.map +1 -0
  125. package/maps/js/search/meilisearch.js.map +1 -0
  126. package/maps/js/txmap.js.map +1 -0
  127. package/maps/sw.js.map +1 -0
  128. package/maps/weichuncai/css/style.css.map +1 -0
  129. package/maps/weichuncai/js/common.js.map +1 -0
  130. package/maps/weichuncai/js/jquery.js.map +1 -0
  131. package/maps/weichuncai/wcc-config.js.map +1 -0
  132. package/music/index.html +1 -1
  133. package/package.json +1 -1
  134. package/page/2/index.html +1 -1
  135. package/page/3/index.html +1 -1
  136. package/page/4/index.html +1 -1
  137. package/page/5/index.html +1 -0
  138. package/posts/10021/index.html +5 -1
  139. package/posts/10045/index.html +1 -1
  140. package/posts/10733/index.html +1 -1
  141. package/posts/10996/index.html +5 -1
  142. package/posts/12779/index.html +1 -1
  143. package/posts/13624/index.html +1 -1
  144. package/posts/15688/index.html +1 -1
  145. package/posts/15748/index.html +5 -1
  146. package/posts/15799/index.html +1 -1
  147. package/posts/15842/index.html +5 -1
  148. package/posts/16107/index.html +1 -1
  149. package/posts/18063/index.html +1 -1
  150. package/posts/20412/index.html +1 -1
  151. package/posts/21375/index.html +1 -1
  152. package/posts/22945/index.html +4 -1
  153. package/posts/23021/index.html +1 -1
  154. package/posts/27531/index.html +5 -1
  155. package/posts/28536/index.html +1 -1
  156. package/posts/28733/index.html +1 -1
  157. package/posts/29196/index.html +1 -1
  158. package/posts/38917/index.html +1 -1
  159. package/posts/38964/index.html +1 -1
  160. package/posts/42487/index.html +1 -1
  161. package/posts/42580/index.html +1 -1
  162. package/posts/45875/index.html +1 -1
  163. package/posts/46640/index.html +1 -1
  164. package/posts/48762/index.html +1 -1
  165. package/posts/50710/index.html +1 -1
  166. package/posts/52677/index.html +1 -1
  167. package/posts/53662/index.html +1 -1
  168. package/posts/54386/index.html +1 -1
  169. package/posts/54481/index.html +1 -1
  170. package/posts/54787/index.html +5 -1
  171. package/posts/56467/index.html +1 -1
  172. package/posts/57692/index.html +1 -1
  173. package/posts/58203/index.html +1 -1
  174. package/posts/61417/index.html +1 -1
  175. package/posts/61712/index.html +1 -0
  176. package/posts/646/index.html +1 -1
  177. package/posts/64856/index.html +1 -1
  178. package/posts/64935/index.html +1 -1
  179. package/search.xml +265 -352
  180. package/seas/index.html +1 -1
  181. package/sw.js +2 -1
  182. package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
  183. package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
  184. package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
  185. package/tags/index.html +1 -1
  186. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  187. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  188. package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
  189. package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +1 -1
  190. package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +1 -1
  191. package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  192. package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  193. package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
  194. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  195. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  196. package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
  197. package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
  198. package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  199. package/update/index.html +1 -1
  200. package/weichuncai/css/style.css +2 -1
  201. package/weichuncai/js/common.js +2 -1
  202. package/weichuncai/js/jquery.js +2 -1
  203. package/weichuncai/wcc-config.js +2 -1
  204. package/css/index.css +0 -1
  205. package/css/plugins/bootstrap.min.css +0 -6
  206. package/css/plugins/bootstrap.row.css +0 -1
  207. package/css/plugins/font-awesome.min.css +0 -1
  208. package/failure.ico +0 -0
  209. package/fonts/webfonts/fa-brands-400.woff2 +0 -0
  210. package/fonts/webfonts/fa-regular-400.woff2 +0 -0
  211. package/fonts/webfonts/fa-solid-900.woff2 +0 -0
  212. package/img/404.jpg +0 -0
  213. package/img/avatar.jpg +0 -0
  214. package/img/banner.png +0 -0
  215. package/img/block.jpg +0 -0
  216. package/img/favicon.svg +0 -39
  217. package/js/main.js +0 -1
  218. package/js/plugins/danmu.js +0 -1
  219. package/js/plugins/local_search.js +0 -1
  220. package/js/plugins/typing.js +0 -1
  221. package/serviceworker.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../../../../js/plugins/tags/sites.js","names":["SitesJS","requestAPI","url","callback","timeout","retryTimes","request","Promise","resolve","reject","status","timer","setTimeout","fetch","then","response","clearTimeout","ok","json","Error","data","catch","error","layout","cfg","el","api","querySelector","remove","arr","content","cellALL","forEach","item","i","cell","title","screenshot","avatar","description","innerHTML","innerText","e","start","els","document","getElementsByClassName","length","getAttribute","Object","class","volantis","GLOBAL_CONFIG","default","link","cover","addEventListener"],"sources":["js/plugins/tags/sites.js"],"mappings":"AAAA,MAAMA,QAAU,CACdC,WAAY,CAACC,EAAKC,EAAUC,KAC1B,IAAIC,EAAa,GAEjB,SAASC,IACP,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,IAAIC,EAAS,EACTC,EAAQC,YAAW,KACN,IAAXF,IACFA,EAAS,EACTC,EAAQ,KACRF,EAAO,QACW,GAAdJ,GACFD,IAEJ,GACC,KACHS,MAAMX,GAAKY,MAAK,SAAUC,GAOxB,GANe,IAAXL,IACFM,aAAaL,GACbH,EAAQO,GACRJ,EAAQ,KACRD,EAAS,GAEPK,EAASE,GACX,OAAOF,EAASG,OAElB,MAAM,IAAIC,MAAM,+BAClB,IAAGL,MAAK,SAAUM,GAChBf,EAAa,EACbF,EAASiB,EACX,IAAGC,OAAM,SAAUC,GACbjB,EAAa,GACfA,GAAc,EACdO,YAAW,KACTN,GAAS,GACR,MAEHF,GAEJ,GAAE,GAEN,CACAE,EAAS,EAEXiB,OAASC,IACP,MAAMC,EAAKD,EAAIC,GACfzB,QAAQC,WAAWuB,EAAIE,KAAK,SAAUN,GACpCK,EAAGE,cAAc,iBAAiBC,SAClC,MAAMC,EAAMT,EAAKU,QACjB,IAAIC,EAAU,GACdF,EAAIG,SAAQ,CAACC,EAAMC,KACjB,IAAIC,EAAO,0BACXA,GAAQ,iFAAmFF,EAAK/B,IAAM,KACtGiC,GAAQ,aAAeF,EAAKG,MAAQ,WAAaH,EAAKI,YAAe,iDAAmDJ,EAAK/B,KAAQ,oCACrIiC,GAAQ,qBACRA,GAAQ,aAAeF,EAAKG,MAAQ,WAAaH,EAAKK,QAAUd,EAAIc,QAAU,qCAC9EH,GAAQ,uBAAyBF,EAAKG,MAAQ,UAC9CD,GAAQ,uBAAyBF,EAAKM,aAAeN,EAAK/B,KAAO,UACjEiC,GAAQ,SACRA,GAAQ,OAERJ,GADAI,GAAQ,QACO,IAEjBV,EAAGE,cAAc,eAAea,UAAYT,CAC9C,IAAG,WACD,IACEN,EAAGE,cAAc,qBAAqBC,SACtCH,EAAGE,cAAc,mBAAmBc,UAAU,cAChD,CAAE,MAAOC,GAAK,CAChB,GAAE,EAEJC,MAAQnB,IACN,MAAMoB,EAAMC,SAASC,uBAAuB,gBAC5C,IAAK,IAAIZ,EAAI,EAAGA,EAAIU,EAAIG,OAAQb,IAAK,CACnC,MAAMT,EAAKmB,EAAIV,GACTR,EAAMD,EAAGuB,aAAa,OAC5B,GAAW,MAAPtB,GAGAF,EAAM,IAAIyB,QACVC,MAAQzB,EAAGuB,aAAa,SAC5BxB,EAAIC,GAAKA,EACTD,EAAIE,IAAMA,EACVF,EAAIc,OAASa,SAASC,cAAcC,QAAQC,KAC5C9B,EAAIa,WAAac,SAASC,cAAcC,QAAQE,MAChDvD,QAAQuB,OAAOC,EACjB,IAKJxB,QAAQ2C,QACRE,SAASW,iBAAiB,iBAAiB,WACzCxD,QAAQ2C,OACV","ignoreList":[],"sourcesContent":["const SitesJS = {\n requestAPI: (url, callback, timeout) => {\n let retryTimes = 5;\n\n function request() {\n return new Promise((resolve, reject) => {\n let status = 0; // 0 等待 1 完成 2 超时\n let timer = setTimeout(() => {\n if (status === 0) {\n status = 2;\n timer = null;\n reject('请求超时');\n if (retryTimes == 0) {\n timeout();\n }\n }\n }, 5000);\n fetch(url).then(function (response) {\n if (status !== 2) {\n clearTimeout(timer);\n resolve(response);\n timer = null;\n status = 1;\n }\n if (response.ok) {\n return response.json();\n }\n throw new Error('Network response was not ok.');\n }).then(function (data) {\n retryTimes = 0;\n callback(data);\n }).catch(function (error) {\n if (retryTimes > 0) {\n retryTimes -= 1;\n setTimeout(() => {\n request();\n }, 5000);\n } else {\n timeout();\n }\n });\n });\n }\n request();\n },\n layout: (cfg) => {\n const el = cfg.el;\n SitesJS.requestAPI(cfg.api, function (data) {\n el.querySelector('.loading-wrap').remove();\n const arr = data.content;\n var cellALL = \"\";\n arr.forEach((item, i) => {\n var cell = '<div class=\"site-card\">';\n cell += '<a class=\"card-link\" target=\"_blank\" rel=\"external noopener noreferrer\" href=\"' + item.url + '\">';\n cell += '<img alt=\"' + item.title + '\" src=\"' + (item.screenshot || ('https://image.thum.io/get/width/1024/crop/768/' + item.url)) + '\" onerror=\"errorImgCover(this)\"/>';\n cell += '<div class=\"info\">';\n cell += '<img alt=\"' + item.title + '\" src=\"' + (item.avatar || cfg.avatar) + '\" onerror=\"errorImgAvatar(this)\"/>';\n cell += '<span class=\"title\">' + item.title + '</span>';\n cell += '<span class=\"desc\">' + (item.description || item.url) + '</span>';\n cell += '</div>';\n cell += '</a>';\n cell += '</div>';\n cellALL += cell;\n });\n el.querySelector('.group-body').innerHTML = cellALL;\n }, function () {\n try {\n el.querySelector('.loading-wrap svg').remove();\n el.querySelector('.loading-wrap p').innerText('加载失败,请稍后重试。');\n } catch (e) { }\n });\n },\n start: (cfg) => {\n const els = document.getElementsByClassName('sitesjs-wrap');\n for (var i = 0; i < els.length; i++) {\n const el = els[i];\n const api = el.getAttribute('api');\n if (api == null) {\n continue;\n }\n var cfg = new Object();\n cfg.class = el.getAttribute('class');\n cfg.el = el;\n cfg.api = api;\n cfg.avatar = volantis.GLOBAL_CONFIG.default.link;\n cfg.screenshot = volantis.GLOBAL_CONFIG.default.cover;\n SitesJS.layout(cfg);\n }\n }\n}\n\n\nSitesJS.start();\ndocument.addEventListener('pjax:complete', function () {\n SitesJS.start();\n});"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../../../js/search/algolia.js","names":["SearchService","fn","search","algolia","timerId","queryText","template","init","div","document","createElement","innerHTML","body","append","volantis","GLOBAL_CONFIG","appId","apiKey","indexName","event","setAlgolia","querySelector","style","textAlign","maxHeight","addEventListener","close","querySelectorAll","forEach","e","onSubmit","input","target","value","instantsearch","searchClient","algoliasearch","searchFunction","helper","state","query","configure","widgets","hitsPerPage","searchBox","container","autofocus","showReset","showSubmit","showLoadingIndicator","searchAsYouType","placeholder","templates","queryHook","refine","clearTimeout","setTimeout","hits","item","data","keyword","link","permalink","root","path","result","_highlightResult","content","contentStripTruncate","cutContent","contentStrip","title","empty","languages","hits_empty","replace","stats","text","hits_stats","nbHits","processingTimeMS","powerBy","poweredBy","theme","dark","mode","pagination","totalPages","first","last","previous","next","addWidgets","start","window","pjax","on","refresh","getElementById","setQueryText","setUiState","display","code","once","preventDefault","firstOccur","indexOf","end","pre","post","length","substring","matchContent","Object","freeze"],"sources":["js/search/algolia.js"],"mappings":"AAAA,IAAIA,cAAgB,MAClB,MAAMC,EAAK,CAAC,EACZ,IAAIC,EAAQC,EAASC,EA+NrB,OA9NAH,EAAGI,UAAY,KACfJ,EAAGK,SAAW,u7BA6BdL,EAAGM,KAAO,KACR,IAAIC,EAAMC,SAASC,cAAc,OACjCF,EAAIG,WAAaV,EAAGK,SACpBG,SAASG,KAAKC,OAAOL,GAErBL,EAAUW,SAASC,cAAcb,OAC7BC,EAAQa,OAASb,EAAQc,QAAUd,EAAQe,WAC7CjB,EAAGkB,QACHlB,EAAGmB,eAEHX,SAASY,cAAc,6BAA6BV,UAAY,8BAChEF,SAASY,cAAc,6BAA6BC,MAAMC,UAAY,SACtEd,SAASY,cAAc,oBAAoBC,MAAME,UAAY,QAC/D,EA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SAAYX,IACbA,EAAMqF,iBACN,IAAIzE,EAAQZ,EAAMa,OAAOX,cAAc,mBACvCpB,EAAGkG,aAAapE,GAAOE,MAAQF,EAAME,MAAQd,EAAMa,OAAOC,OAC1DhC,EAAGC,QAAQ,EAGbD,EAAGoE,WAAaF,IACd,GAAgB,KAAZA,EAAgB,MAAO,GAE3B,MAAMsC,EAAatC,EAAQuC,QAAQ,UAEnC,IAAIb,EAAQY,EAAa,GACrBE,EAAMF,EAAa,IACnBG,EAAM,GACNC,EAAO,GAgBX,OAdIhB,GAAS,GACXA,EAAQ,EACRc,EAAM,KAENC,EAAM,MAGJD,EAAMxC,EAAQ2C,OAChBH,EAAMxC,EAAQ2C,OAEdD,EAAO,MAGUD,EAAMzC,EAAQ4C,UAAUlB,EAAOc,GAAOE,CAClDG,EAGT/G,EAAGyB,MAAQ,KACTjB,SAASY,cAAc,aAAaC,MAAM+E,QAAU,MAAM,EAGrD,CACL9F,KAAMN,EAAGM,KACT4F,aAAc9F,IACZJ,EAAGkG,aAAa9F,EAAU,EAE5BH,OAAQD,EAAGC,OACXwB,MAAOzB,EAAGyB,MAEb,EAzOmB,GA2OpBuF,OAAOC,OAAOlH,eAEdA,cAAcO,OACdE,SAASgB,iBAAiB,YAAazB,cAAc0B","ignoreList":[],"sourcesContent":["let SearchService = (() => {\n const fn = {};\n let search, algolia, timerId; \n fn.queryText = null;\n fn.template = `<div id=\"u-search\">\n <div class=\"modal\">\n <header class=\"modal-header\" class=\"clearfix\">\n <button type=\"submit\" id=\"u-search-modal-btn-submit\" class=\"u-search-btn-submit\">\n <span class=\"fa-solid fa-search\"></span>\n </button>\n <div id=\"algolia-search-input\"></div>\n <a id=\"u-search-btn-close\" class=\"btn-close\"> <span class=\"fa-solid fa-times\"></span> </a>\n </header>\n <main class=\"modal-body\">\n <div id=\"algolia-search-results\">\n <div id=\"algolia-hits\">\n <div class=\"search-icon\"><i class=\"fa-sharp fa-solid fa-telescope\"></i></i></div>\n </div>\n </div>\n </main>\n <footer>\n <div id=\"algolia-pagination\"></div>\n <hr>\n <div id=\"algolia-info\">\n <div class=\"algolia-stats\"></div>\n <div class=\"algolia-poweredBy\"></div>\n </div>\n </footer>\n </div>\n <div id=\"modal-overlay\" class=\"modal-overlay\"></div>\n </div>\n `;\n\n fn.init = () => {\n let div = document.createElement(\"div\");\n div.innerHTML += fn.template;\n document.body.append(div);\n\n algolia = volantis.GLOBAL_CONFIG.search;\n if (algolia.appId && algolia.apiKey && algolia.indexName) {\n fn.event();\n fn.setAlgolia();\n } else {\n document.querySelector('#u-search main.modal-body').innerHTML = 'Algolia setting is invalid!';\n document.querySelector('#u-search main.modal-body').style.textAlign = 'center';\n document.querySelector('#u-search .modal').style.maxHeight = '128px';\n }\n }\n\n fn.event = () => {\n document\n .querySelector(\"#u-search-btn-close\")\n .addEventListener(\"click\", fn.close, false);\n document\n .querySelector(\"#modal-overlay\")\n .addEventListener(\"click\", fn.close, false);\n document.querySelectorAll(\".u-search-form\").forEach((e) => {\n e.addEventListener(\"submit\", fn.onSubmit, false);\n });\n document.querySelector(\"#algolia-search-input\").addEventListener(\"input\", event => {\n let input = event.target.querySelector(\".ais-SearchBox-input\");\n if (input) {\n fn.queryText = input.value;\n } else {\n fn.queryText = event.target.value;\n }\n })\n }\n\n fn.setAlgolia = () => {\n search = instantsearch({\n indexName: algolia.indexName,\n searchClient: algoliasearch(algolia.appId, algolia.apiKey),\n searchFunction(helper) {\n helper.state.query && helper.search()\n },\n })\n\n const configure = instantsearch.widgets.configure({\n hitsPerPage: algolia.hitsPerPage\n })\n\n const searchBox = instantsearch.widgets.searchBox({\n container: '#algolia-search-input',\n autofocus: true,\n showReset: false,\n showSubmit: false,\n showLoadingIndicator: false,\n searchAsYouType: algolia.searchAsYouType,\n placeholder: algolia.placeholder,\n templates: {\n input: 'algolia-input'\n },\n queryHook(query, refine) {\n clearTimeout(timerId)\n timerId = setTimeout(() => refine(query), 500)\n }\n })\n\n const hits = instantsearch.widgets.hits({\n container: '#algolia-hits',\n templates: {\n item(data) {\n const keyword = !!fn.queryText ? `?keyword=${fn.queryText}` : ''\n const link = data.permalink ? data.permalink : `${volantis.GLOBAL_CONFIG.root}${data.path}`\n const result = data._highlightResult\n const content = result.contentStripTruncate\n ? fn.cutContent(result.contentStripTruncate.value)\n : result.contentStrip\n ? fn.cutContent(result.contentStrip.value)\n : result.content\n ? fn.cutContent(result.content.value)\n : ''\n return `\n <a href=\"${link}${keyword}\" class=\"result\">\n <span class=\"title\">${result.title.value || 'no-title'}</span>\n <span class=\"digest\">${content}</span>\n </a>`\n },\n empty: function (data) {\n return (\n `<div id=\"resule-hits-empty\"><i class=\"fa-solid fa-box-open\"></i><p>${volantis.GLOBAL_CONFIG.languages.search.hits_empty.replace(/\\$\\{query}/, data.query)}</p></div>`\n )\n }\n }\n })\n\n const stats = instantsearch.widgets.stats({\n container: '#algolia-info > .algolia-stats',\n templates: {\n text: function (data) {\n const stats = volantis.GLOBAL_CONFIG.languages.search.hits_stats\n .replace(/\\$\\{hits}/, data.nbHits)\n .replace(/\\$\\{time}/, data.processingTimeMS)\n return (\n `${stats}`\n )\n }\n }\n })\n\n const powerBy = instantsearch.widgets.poweredBy({\n container: '#algolia-info > .algolia-poweredBy',\n theme: volantis.dark?.mode === 'dark' ? 'dark' : 'light'\n })\n\n const pagination = instantsearch.widgets.pagination({\n container: '#algolia-pagination',\n totalPages: 5,\n templates: {\n first: '<i class=\"fas fa-angle-double-left\"></i>',\n last: '<i class=\"fas fa-angle-double-right\"></i>',\n previous: '<i class=\"fas fa-angle-left\"></i>',\n next: '<i class=\"fas fa-angle-right\"></i>'\n }\n })\n\n search.addWidgets([configure, searchBox, hits, stats, powerBy, pagination])\n\n search.start()\n\n window.pjax && search.on('render', () => {\n window.pjax.refresh(document.getElementById('algolia-hits'))\n })\n }\n\n fn.setQueryText = queryText => {\n fn.queryText = queryText;\n if (!search) {\n fn.init()\n }\n search?.setUiState({\n [algolia.indexName]: {\n query: queryText\n }\n })\n }\n\n fn.search = () => {\n document.querySelector(\"#u-search\").style.display = \"block\";\n document.addEventListener(\"keydown\", event => {\n if (event.code === \"Escape\") {\n fn.close();\n }\n }, { once: true })\n }\n\n fn.onSubmit = (event) => {\n event.preventDefault();\n let input = event.target.querySelector(\".u-search-input\");\n fn.setQueryText(input?.value ? input.value : event.target.value)\n fn.search();\n };\n\n fn.cutContent = content => {\n if (content === '') return ''\n\n const firstOccur = content.indexOf('<mark>')\n\n let start = firstOccur - 30\n let end = firstOccur + 120\n let pre = ''\n let post = ''\n\n if (start <= 0) {\n start = 0\n end = 140\n } else {\n pre = '...'\n }\n\n if (end > content.length) {\n end = content.length\n } else {\n post = '...'\n }\n\n let matchContent = pre + content.substring(start, end) + post\n return matchContent\n }\n\n fn.close = () => {\n document.querySelector(\"#u-search\").style.display = \"none\";\n };\n\n return {\n init: fn.init,\n setQueryText: queryText => {\n fn.setQueryText(queryText);\n },\n search: fn.search,\n close: fn.close\n }\n})()\n\nObject.freeze(SearchService);\n\nSearchService.init();\ndocument.addEventListener(\"pjax:send\", SearchService.close);\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../../../js/search/hexo.js","names":["SearchService","fn","div","document","createElement","innerHTML","template","body","append","querySelectorAll","forEach","e","addEventListener","onSubmit","querySelector","close","event","preventDefault","input","target","queryText","value","search","async","style","display","data","fetchData","results","buildResultList","pages","posts","volantis","GLOBAL_CONFIG","languages","hits_empty","replace","window","pjax","refresh","f","code","removeEventListener","fetch","dataPath","then","response","text","res","JSON","parse","html","post","title","trim","slice","contentSearch","buildResult","permalink","digest","post_title","toLowerCase","post_content","keywords","split","foundMatch","index_title","index_content","first_occur","word","index","indexOf","start","end","Math","max","min","length","match_content","substring","keyword","regS","RegExp","url","getUrlRelativePath","arrUrl","relUrl","init","setQueryText","Object","freeze"],"sources":["js/search/hexo.js"],"mappings":"AAAA,IAAIA,cAAgB,MAClB,MAAMC,EAAK,CACXA,UAAe,KACfA,KAAU,KACVA,SAAc,usBAkBdA,K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OAE3B,IACA5B,EAAKO,OAASmB,EAAgB,QAChC,MACEL,EAAMC,KAAKE,IAAI,IAAKd,EAAae,QACjCzB,EAAKO,OAASG,EAAaR,OAAOyB,UAAU,EAAGN,EAEnD,KAGGR,CAAU,EAEnBhE,YAAiB,CAACkF,EAAK9B,EAAOM,KAC5B,IACIR,EAAO,GAQX,OAPAA,GAAQ,OACRA,GACE,2BAJWlD,EAAGmF,mBAAmBD,GAIK,YAAclF,EAAGmB,UAAY,KACrE+B,GAAQ,uBAAyBE,EAAQ,UAC1B,KAAXM,IAAeR,GAAQ,wBAA0BQ,EAAS,WAC9DR,GAAQ,OACRA,GAAQ,QACDA,CAAI,EAEblD,mBAAwB,SAAUkF,GAChC,IAAIE,EAASF,EAAInB,MAAM,MACnBQ,EAAQa,EAAO,GAAGd,QAAQ,KAC1Be,EAASD,EAAO,GAAGN,UAAUP,GAIjC,OAH4B,GAAxBc,EAAOf,QAAQ,OACjBe,EAASA,EAAOtB,MAAM,KAAK,IAEtBsB,CACT,GACA,MAAO,CACLC,KAAM,KACJtF,EAAGsF,MAAM,EAEXC,aAAepE,IACbnB,EAAGmB,UAAYA,CAAS,EAE1BE,OAAQ,KACNrB,EAAGqB,QAAQ,EAGhB,EA3LmB,GA4LpBmE,OAAOC,OAAO1F,eAEdA,cAAcuF,OACdpF,SAASS,iBAAiB,eAAgBZ,cAAcuF,MACxDpF,SAASS,iBAAiB,aAAa,WACrCT,SAASW,cAAc,aAAaU,MAAMC,QAAU,MACtD","ignoreList":[],"sourcesContent":["let SearchService = (() => {\n const fn = {};\n fn.queryText = null;\n fn.data = null;\n fn.template = `<div id=\"u-search\">\n <div class=\"modal\">\n <header class=\"modal-header\" class=\"clearfix\">\n <form id=\"u-search-modal-form\" class=\"u-search-form\" name=\"uSearchModalForm\">\n <input type=\"text\" id=\"u-search-modal-input\" class=\"u-search-input\" />\n <button type=\"submit\" id=\"u-search-modal-btn-submit\" class=\"u-search-btn-submit\">\n <span class=\"fa-solid fa-search\"></span>\n </button>\n </form>\n <a id=\"u-search-btn-close\" class=\"btn-close\"> <span class=\"fa-solid fa-times\"></span> </a>\n </header>\n <main class=\"modal-body\">\n <ul class=\"modal-results\"></ul>\n </main>\n </div>\n <div id=\"modal-overlay\" class=\"modal-overlay\"></div>\n</div>\n`;\n fn.init = () => {\n let div = document.createElement(\"div\");\n div.innerHTML += fn.template;\n document.body.append(div);\n document.querySelectorAll(\".u-search-form\").forEach((e) => {\n e.addEventListener(\"submit\", fn.onSubmit, false);\n });\n let uSearchModalInput = document.querySelector(\"#u-search-modal-input\");\n uSearchModalInput.addEventListener(\"input\", fn.onSubmit);\n document\n .querySelector(\"#u-search-btn-close\")\n .addEventListener(\"click\", fn.close, false);\n document\n .querySelector(\"#modal-overlay\")\n .addEventListener(\"click\", fn.close, false);\n };\n fn.onSubmit = (event) => {\n event.preventDefault();\n let input = event.target.querySelector(\".u-search-input\");\n if (input) {\n fn.queryText = input.value;\n } else {\n fn.queryText = event.target.value;\n }\n\n if (fn.queryText) {\n fn.search();\n }\n };\n fn.search = async () => {\n document.querySelectorAll(\".u-search-input\").forEach((e) => {\n e.value = fn.queryText;\n });\n document.querySelector(\"#u-search\").style.display = \"block\";\n if (!fn.data) {\n fn.data = await fn.fetchData();\n }\n let results = \"\";\n results += fn.buildResultList(fn.data.pages);\n results += fn.buildResultList(fn.data.posts);\n if (results === \"\") {\n results = `<div id=\"resule-hits-empty\"><i class=\"fa-solid fa-box-open\"></i><p>${volantis.GLOBAL_CONFIG.languages.search.hits_empty.replace(/\\$\\{query}/, fn.queryText)}</p></div>`\n }\n document.querySelector(\"#u-search .modal-results\").innerHTML = results;\n window.pjax && pjax.refresh(document.querySelector(\"#u-search\"));\n document.addEventListener(\"keydown\", function f(event) {\n if (event.code === \"Escape\") {\n fn.close();\n document.removeEventListener(\"keydown\", f);\n }\n });\n };\n fn.close = () => {\n document.querySelector(\"#u-search\").style.display = \"none\";\n };\n fn.fetchData = () => {\n return fetch(volantis.GLOBAL_CONFIG.search.dataPath)\n .then((response) => response.text())\n .then((res) => {\n const data = JSON.parse(res);\n // console.log(data);\n return data;\n });\n };\n fn.buildResultList = (data) => {\n let html = \"\";\n data.forEach((post) => {\n if (post.text) {\n post.text = post.text.replace(/12345\\d*/g, \"\") // 简易移除代码行号\n }\n if (!post.title && post.text) {\n post.title = post.text.trim().slice(0, 15)\n }\n if (fn.contentSearch(post)) {\n html += fn.buildResult(post.permalink, post.title, post.digest);\n }\n });\n return html;\n };\n fn.contentSearch = (post) => {\n let post_title = post.title.trim().toLowerCase();\n let post_content = post.text.trim().toLowerCase();\n let keywords = fn.queryText\n .trim()\n .toLowerCase()\n .split(/[-\\s]+/);\n let foundMatch = false;\n let index_title = -1;\n let index_content = -1;\n let first_occur = -1;\n if (post_title && post_content) {\n keywords.forEach((word, index) => {\n index_title = post_title.indexOf(word);\n index_content = post_content.indexOf(word);\n if (index_title < 0 && index_content < 0) {\n foundMatch = false;\n } else {\n foundMatch = true;\n if (index_content < 0) {\n index_content = 0;\n }\n if (index === 0) {\n first_occur = index_content;\n }\n }\n if (foundMatch) {\n post_content = post.text.trim();\n let start = 0;\n let end = 0;\n if (first_occur >= 0) {\n start = Math.max(first_occur - 40, 0);\n end =\n start === 0\n ? Math.min(200, post_content.length)\n : Math.min(first_occur + 120, post_content.length);\n let match_content = post_content.substring(start, end);\n keywords.forEach(function (keyword) {\n let regS = new RegExp(keyword, \"gi\");\n match_content = match_content.replace(\n regS,\n \"<b mark>\" + keyword + \"</b>\"\n );\n });\n post.digest = match_content + \"......\";\n } else {\n end = Math.min(200, post_content.length);\n post.digest = post_content.trim().substring(0, end);\n }\n }\n });\n }\n return foundMatch;\n };\n fn.buildResult = (url, title, digest) => {\n let result = fn.getUrlRelativePath(url);\n let html = \"\";\n html += \"<li>\";\n html +=\n \"<a class='result' href='\" + result + \"?keyword=\" + fn.queryText + \"'>\";\n html += \"<span class='title'>\" + title + \"</span>\";\n if (digest !== \"\") html += \"<span class='digest'>\" + digest + \"</span>\";\n html += \"</a>\";\n html += \"</li>\";\n return html;\n };\n fn.getUrlRelativePath = function (url) {\n let arrUrl = url.split(\"//\");\n let start = arrUrl[1].indexOf(\"/\");\n let relUrl = arrUrl[1].substring(start);\n if (relUrl.indexOf(\"?\") != -1) {\n relUrl = relUrl.split(\"?\")[0];\n }\n return relUrl;\n };\n return {\n init: () => {\n fn.init();\n },\n setQueryText: (queryText) => {\n fn.queryText = queryText;\n },\n search: () => {\n fn.search();\n },\n };\n})();\nObject.freeze(SearchService);\n\nSearchService.init();\ndocument.addEventListener(\"pjax:success\", SearchService.init);\ndocument.addEventListener(\"pjax:send\", function () {\n document.querySelector(\"#u-search\").style.display = \"none\";\n});\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../../../js/search/meilisearch.js","names":["SearchService","fn","search","meilisearch","timerId","queryText","template","init","div","document","createElement","innerHTML","body","append","volantis","GLOBAL_CONFIG","appId","apiKey","indexName","event","setAlgolia","querySelector","style","textAlign","maxHeight","addEventListener","close","querySelectorAll","forEach","e","onSubmit","input","target","value","instantsearch","searchClient","instantMeiliSearch","searchFunction","helper","state","query","widgets","configure","hitsPerPage","searchBox","container","autofocus","showReset","showSubmit","showLoadingIndicator","searchAsYouType","placeholder","templates","queryHook","refine","clearTimeout","setTimeout","hits","item","data","keyword","link","permalink","root","path","result","_highlightResult","content","cutContent","text","title","empty","languages","hits_empty","replace","stats","hits_stats","nbHits","processingTimeMS","addWidgets","start","window","pjax","on","refresh","getElementById","setQueryText","setUiState","display","code","once","preventDefault","firstOccur","indexOf","end","pre","post","length","substring","matchContent","Object","freeze"],"sources":["js/search/meilisearch.js"],"mappings":"AAAA,IAAIA,cAAgB,MAClB,MAAMC,EAAK,CAAC,EACZ,IAAIC,EAAQC,EAAaC,EA4MzB,OA3MAH,EAAGI,UAAY,KACfJ,EAAGK,SAAW,0oLAgCdL,EAAGM,KAAO,KACR,IAAIC,EAAMC,SAASC,cAAc,OACjCF,EAAIG,WAAaV,EAAGK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AGC,QAAQ,EAGbD,EAAGmE,WAAaD,IACd,GAAgB,KAAZA,EAAgB,MAAO,GAE3B,MAAMyB,EAAazB,EAAQ0B,QAAQ,UAEnC,IAAIb,EAAQY,EAAa,GACrBE,EAAMF,EAAa,IACnBG,EAAM,GACNC,EAAO,GAgBX,OAdIhB,GAAS,GACXA,EAAQ,EACRc,EAAM,KAENC,EAAM,MAGJD,EAAM3B,EAAQ8B,OAChBH,EAAM3B,EAAQ8B,OAEdD,EAAO,MAGUD,EAAM5B,EAAQ+B,UAAUlB,EAAOc,GAAOE,CAClDG,EAGTlG,EAAGyB,MAAQ,KACTjB,SAASY,cAAc,aAAaC,MAAMkE,QAAU,MAAM,EAGrD,CACLjF,KAAMN,EAAGM,KACT+E,aAAcjF,IACZJ,EAAGqF,aAAajF,EAAU,EAE5BH,OAAQD,EAAGC,OACXwB,MAAOzB,EAAGyB,MAEb,EAtNmB,GAwNpB0E,OAAOC,OAAOrG,eAEdA,cAAcO,OACdE,SAASgB,iBAAiB,YAAazB,cAAc0B","ignoreList":[],"sourcesContent":["let SearchService = (() => {\n const fn = {};\n let search, meilisearch, timerId; \n fn.queryText = null;\n fn.template = `<div id=\"u-search\">\n <div class=\"modal\">\n <header class=\"modal-header\" class=\"clearfix\">\n <button type=\"submit\" id=\"u-search-modal-btn-submit\" class=\"u-search-btn-submit\">\n <span class=\"fa-solid fa-search\"></span>\n </button>\n <div id=\"meilisearch-search-input\"></div>\n <a id=\"u-search-btn-close\" class=\"btn-close\"> <span class=\"fa-solid fa-times\"></span> </a>\n </header>\n <main class=\"modal-body\">\n <div id=\"meilisearch-search-results\">\n <div id=\"meilisearch-hits\">\n <div class=\"search-icon\"><i class=\"fa-sharp fa-solid fa-telescope\"></i></i></div>\n </div>\n </div>\n </main>\n <footer>\n <hr>\n <div id=\"meilisearch-info\">\n <div class=\"meilisearch-stats\"></div>\n <div class=\"meilisearch-poweredBy\">\n <a href=\"https://www.meilisearch.com\" titile=\"meilisearch\" target=\"_blank\">\n <svg width=\"97\" height=\"20\" viewBox=\"0 0 537 83\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M49.8729 49.6398C49.8729 41.9727 53.5489 37.4565 60.5858 37.4565C67.2026 37.4565 69.4082 42.1827 69.4082 48.2744V80.9383H84.3222V46.5939C84.3222 33.7805 77.6004 24.643 64.3668 24.643C56.4897 24.643 50.9232 27.0586 46.0919 32.4151C42.941 27.5838 37.5846 24.643 30.1275 24.643C22.2504 24.643 16.7889 27.8989 14.2682 32.6251V25.9033H0.509521V80.9383H15.4236V49.3247C15.4236 41.9727 19.2046 37.4565 26.1365 37.4565C32.7532 37.4565 34.9588 42.1827 34.9588 48.2744V80.9383H49.8729V49.6398Z\" fill=\"black\"/><path d=\"M145.538 57.727C145.538 57.727 145.748 55.7314 145.748 53.3158C145.748 37.0363 134.72 24.643 118.441 24.643C102.161 24.643 90.8184 37.0363 90.8184 53.3158C90.8184 70.2253 102.266 82.1986 118.546 82.1986C131.254 82.1986 141.337 74.5315 144.593 63.3985H129.574C127.788 67.3896 123.482 69.3851 118.966 69.3851C111.509 69.3851 106.678 65.289 105.627 57.727H145.538ZM118.336 36.6162C125.268 36.6162 129.784 40.8174 130.834 47.014H105.837C107.098 40.7123 111.509 36.6162 118.336 36.6162Z\" fill=\"black\"/><path d=\"M147.947 38.7168H154.564V80.9383H169.478V25.9033H147.947V38.7168ZM162.021 18.7614C167.272 18.7614 171.054 15.0854 171.054 9.83396C171.054 4.58254 167.272 0.801514 162.021 0.801514C156.77 0.801514 152.989 4.58254 152.989 9.83396C152.989 15.0854 156.77 18.7614 162.021 18.7614Z\" fill=\"black\"/><path d=\"M200.361 68.1248C199.94 68.1248 199.31 68.2298 198.365 68.2298C195.004 68.2298 194.584 66.6544 194.584 64.3438V2.16688H179.67V65.394C179.67 76.317 183.871 81.1483 195.739 81.1483C197.735 81.1483 199.625 80.9382 200.361 80.8332V68.1248Z\" fill=\"black\"/><path d=\"M202.057 38.7168H208.674V80.9383H223.588V25.9033H202.057V38.7168ZM216.131 18.7614C221.383 18.7614 225.164 15.0854 225.164 9.83396C225.164 4.58254 221.383 0.801514 216.131 0.801514C210.88 0.801514 207.099 4.58254 207.099 9.83396C207.099 15.0854 210.88 18.7614 216.131 18.7614Z\" fill=\"black\"/><path d=\"M253.531 81.5175C268.025 81.5175 274.852 73.8504 274.852 65.7632C274.852 43.2871 241.768 55.7855 241.768 40.9765C241.768 36.1452 245.864 32.0491 254.161 32.0491C262.669 32.0491 266.66 36.6703 267.29 42.4469H274.747C274.117 35.1999 269.18 25.5373 254.371 25.5373C241.663 25.5373 234.521 33.0994 234.521 41.2916C234.521 63.2425 267.605 50.6391 267.605 65.9733C267.605 71.3297 262.564 75.0057 253.531 75.0057C244.289 75.0057 239.667 70.3845 239.142 63.5576H231.58C232.21 72.9051 238.092 81.5175 253.531 81.5175Z\" fill=\"black\"/><path d=\"M334.078 55.6805C334.078 55.6805 334.183 54 334.183 52.8447C334.183 37.7206 324.415 25.5373 308.451 25.5373C292.382 25.5373 282.194 38.6659 282.194 53.4749C282.194 68.4939 291.647 81.5175 308.556 81.5175C321.265 81.5175 330.087 73.7454 333.238 63.5576H325.466C323.155 70.0694 316.853 74.7956 308.661 74.7956C297.423 74.7956 290.386 66.4984 289.651 55.6805H334.078ZM308.451 32.2592C318.954 32.2592 325.781 39.2961 326.726 49.5888H289.861C291.121 39.7162 298.053 32.2592 308.451 32.2592Z\" fill=\"black\"/><path d=\"M380.477 54.8402V59.8816C380.477 69.0191 373.86 75.3208 361.152 75.3208C353.274 75.3208 348.968 72.0649 348.968 65.028C348.968 61.457 350.649 58.7263 353.274 57.2559C356.005 55.7855 359.681 54.8402 380.477 54.8402ZM360.311 81.5175C369.554 81.5175 377.011 78.5767 380.792 72.485V80.2571H387.934V45.2827C387.934 33.4145 381.107 25.5373 365.668 25.5373C350.859 25.5373 344.347 32.9944 342.982 42.5519H350.229C351.699 34.9899 357.476 31.9441 365.353 31.9441C375.435 31.9441 380.477 36.1452 380.477 45.1776V48.6436C363.567 48.6436 356.53 48.9587 351.279 51.0592C345.187 53.4749 341.616 58.8313 341.616 65.2381C341.616 74.5856 347.603 81.5175 360.311 81.5175Z\" fill=\"black\"/><path d=\"M428.703 26.3776C428.703 26.3776 427.443 26.2725 426.917 26.2725C417.045 26.2725 411.793 31.4189 409.798 35.0949V26.7977H402.656V80.2571H410.113V49.9039C410.113 38.7709 416.94 33.3094 426.077 33.3094C427.443 33.3094 428.703 33.4145 428.703 33.4145V26.3776Z\" fill=\"black\"/><path d=\"M429.976 53.5799C429.976 68.1789 440.059 81.5175 456.338 81.5175C470.832 81.5175 479.235 71.8548 481.335 61.247H473.773C471.568 69.5442 465.476 74.7956 456.338 74.7956C445.1 74.7956 437.538 65.8682 437.538 53.5799C437.538 41.1866 445.1 32.2592 456.338 32.2592C465.476 32.2592 471.568 37.5106 473.773 45.8078H481.335C479.235 35.1999 470.832 25.5373 456.338 25.5373C440.059 25.5373 429.976 38.8759 429.976 53.5799Z\" fill=\"black\"/><path d=\"M498.891 1.48584H491.434V80.2571H498.891V48.6436C498.891 37.7206 505.927 32.0491 514.96 32.0491C524.517 32.0491 529.034 37.9307 529.034 47.5933V80.2571H536.491V46.1229C536.491 34.2547 529.454 25.5373 516.22 25.5373C506.243 25.5373 500.781 30.9988 498.891 34.2547V1.48584Z\" fill=\"black\"/></svg>\n </a>\n </div>\n </div>\n </footer>\n </div>\n <div id=\"modal-overlay\" class=\"modal-overlay\"></div>\n </div>\n `;\n\n fn.init = () => {\n let div = document.createElement(\"div\");\n div.innerHTML += fn.template;\n document.body.append(div);\n\n meilisearch = volantis.GLOBAL_CONFIG.search;\n if (meilisearch.appId && meilisearch.apiKey && meilisearch.indexName) {\n fn.event();\n fn.setAlgolia();\n } else {\n document.querySelector('#u-search main.modal-body').innerHTML = 'Algolia setting is invalid!';\n document.querySelector('#u-search main.modal-body').style.textAlign = 'center';\n document.querySelector('#u-search .modal').style.maxHeight = '128px';\n }\n }\n\n fn.event = () => {\n document\n .querySelector(\"#u-search-btn-close\")\n .addEventListener(\"click\", fn.close, false);\n document\n .querySelector(\"#modal-overlay\")\n .addEventListener(\"click\", fn.close, false);\n document.querySelectorAll(\".u-search-form\").forEach((e) => {\n e.addEventListener(\"submit\", fn.onSubmit, false);\n });\n document.querySelector(\"#meilisearch-search-input\").addEventListener(\"input\", event => {\n let input = event.target.querySelector(\".ais-SearchBox-input\");\n if (input) {\n fn.queryText = input.value;\n } else {\n fn.queryText = event.target.value;\n }\n })\n }\n\n fn.setAlgolia = () => {\n search = instantsearch({\n indexName: meilisearch.indexName,\n searchClient: instantMeiliSearch(meilisearch.appId, meilisearch.apiKey),\n searchFunction(helper) {\n helper.state.query && helper.search()\n },\n })\n\n const configure = instantsearch.widgets.configure({\n hitsPerPage: meilisearch.hitsPerPage\n })\n\n const searchBox = instantsearch.widgets.searchBox({\n container: '#meilisearch-search-input',\n autofocus: true,\n showReset: false,\n showSubmit: false,\n showLoadingIndicator: false,\n searchAsYouType: meilisearch.searchAsYouType,\n placeholder: meilisearch.placeholder,\n templates: {\n input: 'meilisearch-input'\n },\n queryHook(query, refine) {\n clearTimeout(timerId)\n timerId = setTimeout(() => refine(query), 500)\n }\n })\n\n const hits = instantsearch.widgets.hits({\n container: '#meilisearch-hits',\n templates: {\n item(data) {\n const keyword = !!fn.queryText ? `?keyword=${fn.queryText}` : ''\n const link = data.permalink ? data.permalink : `${volantis.GLOBAL_CONFIG.root}${data.path}`\n const result = data._highlightResult\n const content = fn.cutContent(result.text.value)\n return `\n <a href=\"${link}${keyword}\" class=\"result\">\n <span class=\"title\">${result.title.value || 'no-title'}</span>\n <span class=\"digest\">${content}</span>\n </a>`\n },\n empty: function (data) {\n return (\n `<div id=\"resule-hits-empty\"><i class=\"fa-solid fa-box-open\"></i><p>${volantis.GLOBAL_CONFIG.languages.search.hits_empty.replace(/\\$\\{query}/, data.query)}</p></div>`\n )\n }\n }\n })\n\n const stats = instantsearch.widgets.stats({\n container: '#meilisearch-info > .meilisearch-stats',\n templates: {\n text: function (data) {\n const stats = volantis.GLOBAL_CONFIG.languages.search.hits_stats\n .replace(/\\$\\{hits}/, data.nbHits)\n .replace(/\\$\\{time}/, data.processingTimeMS)\n return (\n `${stats}`\n )\n }\n }\n })\n\n search.addWidgets([searchBox, hits, stats])\n\n search.start()\n\n window.pjax && search.on('render', () => {\n window.pjax.refresh(document.getElementById('meilisearch-hits'))\n })\n }\n\n fn.setQueryText = queryText => {\n fn.queryText = queryText;\n if (!search) {\n fn.init()\n }\n search?.setUiState({\n [meilisearch.indexName]: {\n query: queryText\n }\n })\n }\n\n fn.search = () => {\n document.querySelector(\"#u-search\").style.display = \"block\";\n document.addEventListener(\"keydown\", event => {\n if (event.code === \"Escape\") {\n fn.close();\n }\n }, { once: true })\n }\n\n fn.onSubmit = (event) => {\n event.preventDefault();\n let input = event.target.querySelector(\".u-search-input\");\n fn.setQueryText(input?.value ? input.value : event.target.value)\n fn.search();\n };\n\n fn.cutContent = content => {\n if (content === '') return ''\n\n const firstOccur = content.indexOf('<mark>')\n\n let start = firstOccur - 30\n let end = firstOccur + 120\n let pre = ''\n let post = ''\n\n if (start <= 0) {\n start = 0\n end = 140\n } else {\n pre = '...'\n }\n\n if (end > content.length) {\n end = content.length\n } else {\n post = '...'\n }\n\n let matchContent = pre + content.substring(start, end) + post\n return matchContent\n }\n\n fn.close = () => {\n document.querySelector(\"#u-search\").style.display = \"none\";\n };\n\n return {\n init: fn.init,\n setQueryText: queryText => {\n fn.setQueryText(queryText);\n },\n search: fn.search,\n close: fn.close\n }\n})()\n\nObject.freeze(SearchService);\n\nSearchService.init();\ndocument.addEventListener(\"pjax:send\", SearchService.close);\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../../js/txmap.js","names":["getDistance","e1","n1","e2","n2","sin","cos","asin","PI","hypot","Math","getPoint","e","n","x","y","z","a","b","r","round","showWelcome","ip","posdesc","timeChange","dist","ipLocation","result","location","lng","lat","pos","ad_info","nation","province","city","district","date","Date","getHours","includes","document","getElementById","innerHTML","err","console","log","$","ajax","type","url","data","key","output","dataType","success","res","window","onload","addEventListener"],"sources":["js/txmap.js"],"mappings":"AAaA,SAASA,YAAYC,EAAIC,EAAIC,EAAIC,GAC7B,MACMC,IAAEA,EAAGC,IAAEA,EAAGC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,GAAUC,KACtC,IAAIC,EAAW,CAACC,EAAGC,KACfD,GAAKJ,EAAK,IAEH,CAAEM,EAAGR,EADZO,GAAKL,EAAK,KACWF,EAAIM,GAAIG,EAAGT,EAAIO,GAAKR,EAAIO,GAAII,EAAGX,EAAIQ,KAGxDI,EAAIN,EAASV,EAAIC,GACjBgB,EAAIP,EAASR,EAAIC,GAEjBe,EAAkB,EAAdZ,EADAE,EAAMQ,EAAEH,EAAII,EAAEJ,EAAGG,EAAEF,EAAIG,EAAEH,EAAGE,EAAED,EAAIE,EAAEF,GAC3B,GAXP,KAYV,OAAON,KAAKU,MAAMD,EACtB,CAEA,SAASE,cAEL,IAEIC,EACAC,EA8LAC,EAjMAC,EAAOzB,YAAY,UAAW,UAAW0B,WAAWC,OAAOC,SAASC,IAAKH,WAAWC,OAAOC,SAASE,KACpGC,EAAML,WAAWC,OAAOK,QAAQC,OAIpC,OAAQP,WAAWC,OAAOK,QAAQC,QAC9B,IAAK,KACDV,EAAU,eACV,MACJ,IAAK,KACDA,EAAU,wBACV,MACJ,IAAK,KACDA,EAAU,aACV,MACJ,IAAK,MACDA,EAAU,WACV,MACJ,IAAK,KACDA,EAAU,eACV,MACJ,IAAK,KACDA,EAAU,6BACV,MACJ,IAAK,OACDA,EAAU,WACV,MACJ,IAAK,MACDA,EAAU,YACV,MACJ,IAAK,KAGD,OAFAQ,EAAML,WAAWC,OAAOK,QAAQE,SAAW,IAAMR,WAAWC,OAAOK,QAAQG,KAAO,IAAMT,WAAWC,OAAOK,QAAQI,SAClHd,EAAKI,WAAWC,OAAOL,GACfI,WAAWC,OAAOK,QAAQE,UAC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EAAU,UACV,MACJ,IAAK,MACDA,EAAU,kBACV,MACJ,IAAK,MACDA,EAAU,cACV,MACJ,IAAK,UACDA,EAAU,cACV,MACJ,IAAK,WACDA,EAAU,kBACV,MACJ,IAAK,MACDA,EAAU,aACV,MACJ,IAAK,UACDA,EAAU,mBACV,MACJ,IAAK,UACDA,EAAU,YACV,MACJ,QACIA,EAAU,cAGlB,MACJ,QACIA,EAAU,aAMlB,IAAIc,EAAO,IAAIC,KACmCd,EAA9Ca,EAAKE,YAAc,GAAKF,EAAKE,WAAa,GAAiB,+BACtDF,EAAKE,YAAc,IAAMF,EAAKE,WAAa,GAAiB,6BAC5DF,EAAKE,YAAc,IAAMF,EAAKE,WAAa,GAAiB,4BAC5DF,EAAKE,YAAc,IAAMF,EAAKE,WAAa,GAAiB,kCAC5DF,EAAKE,YAAc,IAAMF,EAAKE,WAAa,GAAiB,8BACnD,eAGdjB,EAAGkB,SAAS,OACZlB,EAAK,uBAET,IAEImB,SAASC,eAAe,gBAAgBC,UACpC,0FAA0FZ,yBAA2BR,mEAAyEE,wCAA2CH,mBAAoBE,QACrQ,CAAE,MAAOoB,GACJC,QAAQC,IAAI,aACjB,CACJ,CAnPAC,EAAEC,KAAK,CACHC,KAAM,MACNC,IAAK,4CACLC,KAAM,CACFC,IAAK,sCACLC,OAAQ,SAEZC,SAAU,QACVC,QAAS,SAAUC,GACf9B,WAAa8B,CACjB,IA0OJC,OAAOC,OAASrC,YAEhBoB,SAASkB,iBAAiB,gBAAiBtC","ignoreList":[],"sourcesContent":["//get请求\n$.ajax({\n type: 'get',\n url: 'https://apis.map.qq.com/ws/location/v1/ip',\n data: {\n key: 'RIPBZ-MLQ64-A6WUR-KL2YV-O4KY5-DZFTC',\n output: 'jsonp',\n },\n dataType: 'jsonp',\n success: function (res) {\n ipLocation = res;\n }\n})\nfunction getDistance(e1, n1, e2, n2) {\n const R = 6371\n const { sin, cos, asin, PI, hypot } = Math\n let getPoint = (e, n) => {\n e *= PI / 180\n n *= PI / 180\n return { x: cos(n) * cos(e), y: cos(n) * sin(e), z: sin(n) }\n }\n\n let a = getPoint(e1, n1)\n let b = getPoint(e2, n2)\n let c = hypot(a.x - b.x, a.y - b.y, a.z - b.z)\n let r = asin(c / 2) * 2 * R\n return Math.round(r);\n}\n\nfunction showWelcome() {\n\n let dist = getDistance(114.21416, 22.576264, ipLocation.result.location.lng, ipLocation.result.location.lat); //这里记得换成自己的经纬度\n let pos = ipLocation.result.ad_info.nation;\n let ip;\n let posdesc;\n //根据国家、省份、城市信息自定义欢迎语\n switch (ipLocation.result.ad_info.nation) {\n case \"日本\":\n posdesc = \"よろしく,一起去看樱花吗\";\n break;\n case \"美国\":\n posdesc = \"Let us live in peace!\";\n break;\n case \"英国\":\n posdesc = \"想同你一起夜乘伦敦眼\";\n break;\n case \"俄罗斯\":\n posdesc = \"干了这瓶伏特加!\";\n break;\n case \"法国\":\n posdesc = \"C'est La Vie\";\n break;\n case \"德国\":\n posdesc = \"Die Zeit verging im Fluge.\";\n break;\n case \"澳大利亚\":\n posdesc = \"一起去大堡礁吧!\";\n break;\n case \"加拿大\":\n posdesc = \"拾起一片枫叶赠予你\";\n break;\n case \"中国\":\n pos = ipLocation.result.ad_info.province + \" \" + ipLocation.result.ad_info.city + \" \" + ipLocation.result.ad_info.district;\n ip = ipLocation.result.ip;\n switch (ipLocation.result.ad_info.province) {\n case \"北京市\":\n posdesc = \"北——京——欢迎你~~~\";\n break;\n case \"天津市\":\n posdesc = \"讲段相声吧\";\n break;\n case \"河北省\":\n posdesc = \"山势巍巍成壁垒,天下雄关铁马金戈由此向,无限江山\";\n break;\n case \"山西省\":\n posdesc = \"展开坐具长三尺,已占山河五百余\";\n break;\n case \"内蒙古自治区\":\n posdesc = \"天苍苍,野茫茫,风吹草低见牛羊\";\n break;\n case \"辽宁省\":\n posdesc = \"我想吃烤鸡架!\";\n break;\n case \"吉林省\":\n posdesc = \"状元阁就是东北烧烤之王\";\n break;\n case \"黑龙江省\":\n posdesc = \"很喜欢哈尔滨大剧院\";\n break;\n case \"上海市\":\n posdesc = \"众所周知,中国只有两个城市\";\n break;\n case \"江苏省\":\n switch (ipLocation.result.ad_info.city) {\n case \"南京市\":\n posdesc = \"这是我挺想去的城市啦\";\n break;\n case \"苏州市\":\n posdesc = \"上有天堂,下有苏杭\";\n break;\n default:\n posdesc = \"散装是必须要散装的\";\n break;\n }\n break;\n case \"浙江省\":\n posdesc = \"东风渐绿西湖柳,雁已还人未南归\";\n break;\n case \"河南省\":\n switch (ipLocation.result.ad_info.city) {\n case \"郑州市\":\n posdesc = \"豫州之域,天地之中\";\n break;\n case \"南阳市\":\n posdesc = \"臣本布衣,躬耕于南阳此南阳非彼南阳!\";\n break;\n case \"驻马店市\":\n posdesc = \"峰峰有奇石,石石挟仙气嵖岈山的花很美哦!\";\n break;\n case \"开封市\":\n posdesc = \"刚正不阿包青天\";\n break;\n case \"洛阳市\":\n posdesc = \"洛阳牡丹甲天下\";\n break;\n default:\n posdesc = \"可否带我品尝河南烩面啦?\";\n break;\n }\n break;\n case \"安徽省\":\n posdesc = \"蚌埠住了,芜湖起飞\";\n break;\n case \"福建省\":\n posdesc = \"井邑白云间,岩城远带山\";\n break;\n case \"江西省\":\n posdesc = \"落霞与孤鹜齐飞,秋水共长天一色\";\n break;\n case \"山东省\":\n posdesc = \"遥望齐州九点烟,一泓海水杯中泻\";\n break;\n case \"湖北省\":\n switch (ipLocation.result.ad_info.city) {\n case \"黄冈市\":\n posdesc = \"红安将军县!辈出将才!\";\n break;\n default:\n posdesc = \"来碗热干面~\";\n break;\n }\n break;\n case \"湖南省\":\n posdesc = \"74751,长沙斯塔克\";\n break;\n case \"广东省\":\n switch (ipLocation.result.ad_info.city) {\n case \"广州市\":\n posdesc = \"看小蛮腰,喝早茶了嘛~\";\n break;\n case \"深圳市\":\n posdesc = \"今天你逛商场了嘛~\";\n break;\n case \"阳江市\":\n posdesc = \"阳春合水!博主家乡~ 欢迎来玩~\";\n break;\n default:\n posdesc = \"来两斤福建人~\";\n break;\n }\n break;\n case \"广西壮族自治区\":\n posdesc = \"桂林山水甲天下\";\n break;\n case \"海南省\":\n posdesc = \"朝观日出逐白浪,夕看云起收霞光\";\n break;\n case \"四川省\":\n posdesc = \"康康川妹子\";\n break;\n case \"贵州省\":\n posdesc = \"茅台,学生,再塞200\";\n break;\n case \"云南省\":\n posdesc = \"玉龙飞舞云缠绕,万仞冰川直耸天\";\n break;\n case \"西藏自治区\":\n posdesc = \"躺在茫茫草原上,仰望蓝天\";\n break;\n case \"陕西省\":\n posdesc = \"来份臊子面加馍\";\n break;\n case \"甘肃省\":\n posdesc = \"羌笛何须怨杨柳,春风不度玉门关\";\n break;\n case \"青海省\":\n posdesc = \"牛肉干和老酸奶都好好吃\";\n break;\n case \"宁夏回族自治区\":\n posdesc = \"大漠孤烟直,长河落日圆\";\n break;\n case \"新疆维吾尔自治区\":\n posdesc = \"驼铃古道丝绸路,胡马犹闻唐汉风\";\n break;\n case \"台湾省\":\n posdesc = \"我在这头,大陆在那头\";\n break;\n case \"香港特别行政区\":\n posdesc = \"永定贼有残留地鬼嚎,迎击光非岁玉\";\n break;\n case \"澳门特别行政区\":\n posdesc = \"性感荷官,在线发牌\";\n break;\n default:\n posdesc = \"带我去你的城市逛逛吧!\";\n break;\n }\n break;\n default:\n posdesc = \"带我去你的国家逛逛吧\";\n break;\n }\n\n //根据本地时间切换欢迎语\n let timeChange;\n let date = new Date();\n if (date.getHours() >= 5 && date.getHours() < 11) timeChange = \"<span>🌤️ 早上好,一日之计在于晨</span>\";\n else if (date.getHours() >= 11 && date.getHours() < 13) timeChange = \"<span>☀️ 中午好,记得午休喔~</span>\";\n else if (date.getHours() >= 13 && date.getHours() < 17) timeChange = \"<span>🕞 下午好,饮茶先啦!</span>\";\n else if (date.getHours() >= 17 && date.getHours() < 19) timeChange = \"<span>🚶‍♂️ 即将下班,记得按时吃饭~</span>\";\n else if (date.getHours() >= 19 && date.getHours() < 24) timeChange = \"<span>🌙 晚上好,夜生活嗨起来!</span>\";\n else timeChange = \"夜深了,早点休息,少熬夜\";\n\n// 新增ipv6显示为指定内容\n if (ip.includes(\":\")) {\n ip = \"<br>好复杂,咱看不懂~(ipv6)\";\n }\n try {\n //自定义文本和需要放的位置\n document.getElementById(\"welcome-info\").innerHTML =\n `欢迎来自 <b><span style=\"color: var(--kouseki-ip-color);font-size: var(--kouseki-gl-size)\">${pos}</span></b> 的小友💖<br>${posdesc}🍂<br>当前位置距博主约 <b><span style=\"color: var(--kouseki-ip-color)\">${dist}</span></b> 公里!<br>您的IP地址为:<b><span>${ip}</span></b><br>${timeChange} <br>`;\n } catch (err) {\n console.log(\"Pjax无法获取元素\")\n }\n}\nwindow.onload = showWelcome;\n// 如果使用了pjax在加上下面这行代码\ndocument.addEventListener('pjax:complete', showWelcome);"]}
package/maps/sw.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../sw.js","names":["importScripts","workbox","setConfig","modulePathPrefix","core","precaching","routing","strategies","expiration","cacheableResponse","backgroundSync","CacheFirst","NetworkFirst","NetworkOnly","StaleWhileRevalidate","ExpirationPlugin","CacheableResponsePlugin","cacheSuffixVersion","maxEntries","self","addEventListener","event","waitUntil","caches","keys","then","Promise","all","map","key","includes","delete","setCacheNameDetails","prefix","suffix","skipWaiting","clientsClaim","cleanupOutdatedCaches","precacheAndRoute","url","revision","registerRoute","cacheName","fetchOptions","mode","credentials","plugins","maxAgeSeconds","purgeOnQuotaError","setDefaultHandler","networkTimeoutSeconds","CACHE_NAME","cachelist","async","installEvent","open","cache","console","log","addAll","respondWith","handle","request","msg","handleerr","req","Response","headers","lfetch","urls","controller","AbortController","PauseProgress","res","arrayBuffer","status","any","promises","resolve","reject","len","Array","isArray","length","errs","AggregateError","forEach","promise","value","err","push","fetch","signal","abort","fullpath","path","split","match","generate_blog_urls","packagename","blogversion","npmmirror","i","mirror","get_newest_version","json","version","db","read","config","type","Request","encodeURIComponent","text","catch","write","put","set_newest_version","getFileType","fileName","setInterval","setTim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AGQ,MAAM,eAAgB1C,EAAIiC,QAC7B,IAWlB,SAASY,YAAYC,GAEjB,OADArF,OAAOqF,EAASvB,MAAM,KAAKuB,EAASvB,MAAM,KAAKb,OAAO,GAC3C,QAARjD,QAAwB,OAARA,OACR,YAEA,MAARA,OACQ,kBAEA,OAARA,OACQ,WAEA,OAARA,QAAuB,QAARA,OACP,aAEA,OAARA,OACQ,eAEA,OAARA,OACQ,YAEJ,YACT,CA5BFsF,aAAYnE,gBACFgE,mBAAmBd,OAAM,GAChC,KAEHkB,YAAWpE,gBACDgE,mBAAmBd,OAAM,GACjC,KAuBF,MAAM1C,OAASR,MAAMY,IACjB,MAAMyD,EAASzD,EAAI1B,IACboF,EAAS,IAAIC,IAAIF,GACjBG,EAAUF,EAAOG,SACjBC,EAASJ,EAAOK,SAGtB,OADAC,IAAI,GACU,sBAAXF,EACO3D,OAAO8B,mBAAmB,6BAA6BS,GAAGC,KAAK,iBAAmB,SAASd,SAAS+B,KAEzGpG,MAAKgD,GAAKA,EAAIC,gBACdjD,MAAKyG,GAAQ,IAAIhE,SAASgE,EAAO,CAAC/D,QAAQ,CAAC,eAAe,GAAGmD,YAAYxB,SAAS+B,GAAS7B,MAAM,KAAKF,SAAS+B,GAAS7B,MAAM,KAAKb,OAAO,GAAGa,MAAM,MAAMF,SAAS+B,GAAS7B,MAAM,KAAKF,SAAS+B,GAAS7B,MAAM,KAAKb,OAAO,GAAGa,MAAM,MAAMb,OAAO,yBAG1OQ,MAAM1B,EACjB","ignoreList":[],"sourcesContent":["importScripts('https://jsd.cdn.storisinz.site/npm/workbox-cdn@5.1.3/workbox/workbox-sw.js');\n\nworkbox.setConfig({\n modulePathPrefix: 'https://jsd.cdn.storisinz.site/npm/workbox-cdn@5.1.3/workbox/'\n});\n\nconst { core, precaching, routing, strategies, expiration, cacheableResponse, backgroundSync } = workbox;\nconst { CacheFirst, NetworkFirst, NetworkOnly, StaleWhileRevalidate } = strategies;\nconst { ExpirationPlugin } = expiration;\nconst { CacheableResponsePlugin } = cacheableResponse;\n\nconst cacheSuffixVersion = '-000010', // 缓存版本号 极端重要,修改静态文件后发布网页一定要修改缓存版本号\n maxEntries = 100;\n\nself.addEventListener('activate', (event) => {\n event.waitUntil(\n caches.keys().then((keys) => {\n return Promise.all(keys.map((key) => {\n if (!key.includes(cacheSuffixVersion)) return caches.delete(key);\n }));\n })\n );\n});\n\n\ncore.setCacheNameDetails({\n prefix: 'volantis', // 极端重要 自己拟定一个名字\n suffix: cacheSuffixVersion\n});\n\ncore.skipWaiting();\ncore.clientsClaim();\nprecaching.cleanupOutdatedCaches();\n\n/*\n * Precache\n * - Static Assets\n */\nprecaching.precacheAndRoute( // 极端重要 定义首次缓存的静态文件 如果开启CDN需要修改为CDN链接\n [\n { url: '/css/first.css', revision: null },\n { url: '/css/style.css', revision: null },\n { url: '/js/app.js', revision: null },\n ],\n);\n\n/*\n * Cache File From CDN\n *\n * Method: CacheFirst\n * cacheName: static-immutable\n * cacheTime: 30d\n */\n\n// cdn.jsdelivr.net - cors enabled\nrouting.registerRoute(\n /.*cdn\\.jsdelivr\\.net/,\n new CacheFirst({\n cacheName: 'static-immutable' + cacheSuffixVersion,\n fetchOptions: {\n mode: 'cors',\n credentials: 'omit'\n },\n plugins: [\n new ExpirationPlugin({\n maxAgeSeconds: 30 * 24 * 60 * 60,\n purgeOnQuotaError: true\n })\n ]\n })\n);\n\n// m7.music.126.net - cors enabled\nrouting.registerRoute(\n /.*m7\\.music\\.126\\.net/,\n new CacheFirst({\n cacheName: 'static-immutable' + cacheSuffixVersion,\n fetchOptions: {\n mode: 'cors',\n credentials: 'omit'\n },\n plugins: [\n new ExpirationPlugin({\n maxAgeSeconds: 30 * 24 * 60 * 60,\n purgeOnQuotaError: true\n })\n ]\n })\n);\n\n/*\n * No Cache\n *\n * Method: networkOnly\n */\nrouting.registerRoute(\n /.*baidu\\.com.*/,\n new NetworkOnly()\n);\n/*\n * Others img fonts\n * Method: staleWhileRevalidate\n */\nrouting.registerRoute(\n // Cache image fonts files\n /.*\\.(?:png|jpg|jpeg|svg|gif|webp|ico|eot|ttf|woff|woff2|mp3)/,\n new StaleWhileRevalidate()\n);\n\n/*\n * Static Assets\n * Method: staleWhileRevalidate\n */\nrouting.registerRoute(\n // Cache CSS files\n /.*\\.(css|js)/,\n // Use cache but update in the background ASAP\n new StaleWhileRevalidate()\n);\n\n/*\n * sw.js - Revalidate every time\n * staleWhileRevalidate\n */\nrouting.registerRoute(\n '/sw.js', // 本文件名\n new StaleWhileRevalidate()\n);\n\n/*\n * Default - Serve as it is\n * networkFirst\n */\nrouting.setDefaultHandler(\n new NetworkFirst({\n networkTimeoutSeconds: 3\n })\n);\n\nconst CACHE_NAME = 'CetaHouseCache'; //修改为自己的CacheName\nlet cachelist = [];\nself.addEventListener('install', async function (installEvent) {\n self.skipWaiting();\n installEvent.waitUntil(\n caches.open(CACHE_NAME)\n .then(function (cache) {\n console.log('Opened cache');\n return cache.addAll(cachelist);\n })\n );\n});\nself.addEventListener('fetch', async event => {\n try {\n event.respondWith(handle(event.request))\n } catch (msg) {\n event.respondWith(handleerr(event.request, msg))\n }\n});\nconst handleerr = async (req, msg) => {\n return new Response(`<h1>CDN分流器遇到了致命错误</h1>\n <b>${msg}</b>`, { headers: { \"content-type\": \"text/html; charset=utf-8\" } })\n}\nconst lfetch = async (urls, url) => {\n let controller = new AbortController();\n const PauseProgress = async (res) => {\n return new Response(await (res).arrayBuffer(), { status: res.status, headers: res.headers });\n };\n if (!Promise.any) {\n Promise.any = function (promises) {\n return new Promise((resolve, reject) => {\n promises = Array.isArray(promises) ? promises : []\n let len = promises.length\n let errs = []\n if (len === 0) return reject(new AggregateError('All promises were rejected'))\n promises.forEach((promise) => {\n promise.then(value => {\n resolve(value)\n }, err => {\n len--\n errs.push(err)\n if (len === 0) {\n reject(new AggregateError(errs))\n }\n })\n })\n })\n }\n }\n return Promise.any(urls.map(urls => {\n return new Promise((resolve, reject) => {\n fetch(urls, {\n signal: controller.signal\n })\n .then(PauseProgress)\n .then(res => {\n if (res.status == 200) {\n controller.abort();\n resolve(res)\n } else {\n reject(res)\n }\n })\n })\n }))\n}\nconst fullpath = (path) => {\n path = path.split('?')[0].split('#')[0]\n if (path.match(/\\/$/)) {\n path += 'index'\n }\n if (!path.match(/\\.[a-zA-Z]+$/)) {\n path += '.html'\n }\n return path\n}\nconst generate_blog_urls = (packagename, blogversion, path) => {\n const npmmirror = [\n // `https://unpkg.zhimg.com/${packagename}@${blogversion}`,\n // `https://npm.elemecdn.com/${packagename}@${blogversion}`,\n // `https://cdn1.tianli0.top/npm/${packagename}@${blogversion}`,\n // `https://cdn.afdelivr.top/npm/${packagename}@${blogversion}`,\n //`https://ariasakablog.s3.ladydaily.com`,\n `https://jsd.cdn.storisinz.site/npm/${packagename}/${blogversion}`\n ]\n for (var i in npmmirror) {\n npmmirror[i] += path\n }\n return npmmirror\n}\nconst mirror = [\n `https://registry.npmjs.org/sinzmise-cetastories/latest`,\n `https://mirrors.cloud.tencent.com/npm/sinzmise-cetastories/latest`\n]\nconst get_newest_version = async (mirror) => {\nreturn lfetch(mirror, mirror[0])\n .then(res => res.json())\n .then(res.version)\n}\nself.db = { //全局定义db,只要read和write,看不懂可以略过\n read: (key, config) => {\n if (!config) { config = { type: \"text\" } }\n return new Promise((resolve, reject) => {\n caches.open(CACHE_NAME).then(cache => {\n cache.match(new Request(`https://LOCALCACHE/${encodeURIComponent(key)}`)).then(function (res) {\n if (!res) resolve(null)\n res.text().then(text => resolve(text))\n }).catch(() => {\n resolve(null)\n })\n })\n })\n },\n write: (key, value) => {\n return new Promise((resolve, reject) => {\n caches.open(CACHE_NAME).then(function (cache) {\n cache.put(new Request(`https://LOCALCACHE/${encodeURIComponent(key)}`), new Response(value));\n resolve()\n }).catch(() => {\n reject()\n })\n })\n }\n}\n\nconst set_newest_version = async (mirror) => { //改为最新版本写入数据库\n return lfetch(mirror, mirror[0])\n .then(res => res.json()) //JSON Parse\n .then(async res => {\n await db.write('blog_version', res.version) //写入\n return;\n })\n}\n\nsetInterval(async() => {\n await set_newest_version(mirror) //定时更新,一分钟一次\n}, 60*1000);\n\nsetTimeout(async() => {\n await set_newest_version(mirror)//打开五秒后更新,避免堵塞\n},5000)\nfunction getFileType(fileName) {\n suffix=fileName.split('.')[fileName.split('.').length-1]\n if(suffix==\"html\"||suffix==\"htm\") {\n return 'text/html';\n }\n if(suffix==\"js\") {\n return 'text/javascript';\n }\n if(suffix==\"css\") {\n return 'text/css';\n }\n if(suffix==\"jpg\"||suffix==\"jpeg\") {\n return 'image/jpeg';\n }\n if(suffix==\"ico\") {\n return 'image/x-icon';\n }\n if(suffix==\"png\") {\n return 'image/png';\n }\n return 'text/plain';\n }\nconst handle = async(req)=>{\n const urlStr = req.url\n const urlObj = new URL(urlStr);\n const urlPath = urlObj.pathname;\n const domain = urlObj.hostname;\n //从这里开始\n lxs=[]\n if(domain === \"blog.sinzmise.top\"){//这里写你需要拦截的域名\n var l=lfetch(generate_blog_urls('sinzmise-cetastories',await db.read('blog_version') || 'latest',fullpath(urlPath))) //将`karunari`改为自己的npm包名\n return l\n .then(res=>res.arrayBuffer())\n .then(buffer=>new Response(buffer,{headers:{\"Content-Type\":`${getFileType(fullpath(urlPath).split(\"/\")[fullpath(urlPath).split(\"/\").length-1].split(\"\\\\\")[fullpath(urlPath).split(\"/\")[fullpath(urlPath).split(\"/\").length-1].split(\"\\\\\").length-1])};charset=utf-8`}}));//重新定义header\n }\n else{\n return fetch(req);\n }\n}"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["weichuncai/css/style.css"],"names":[],"mappings":"AAAA,WAAY,QAAQ,IAAK,MAAM,MAAM,OAAO,MAAM,SAAS,MAAM,IAAI,MAAM,KAAK,MAAM,UAAU,KAChG,kBAAmB,SAAS,SAC5B,aAAc,MAAM,MAAM,OAAO,MAAM,kBAAkB,UAAU,SAAS,SAAS,IAAI,EAAI,KAAK,EAElG,iBAAkB,MAAM,KAAK,WAAW,KAAK,MAAM,KAAK,SAA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AQ,KAC/J,OAAQ,MAAM,KAAK,MAAM,MAAM,OAAO,KACtC,OAAQ,MAAM,MAAM,MAAM,KAAK,OAAO,KAAK,UAAU,KAAK,WAAW,OAAO,OAAO,QACnF,MAAO,OAAO,KAAK,MAAM,KAAK,MAAM,MAAM,OAAO,KACjD,QAAS,MAAM,KAAK,OAAO,KAAK,MAAM,KAAK,OAAO,KAAK,WAAW,oBAAsB,OAAO","file":"../../../weichuncai/css/style.css","sourcesContent":["#smchuncai {opacity:0.85;width:160px;height:160px;position:fixed;top:400px;left:800px;font-size:12px;}\n* html #smchuncai {position:absolute;}\n#chuncaiface {width:160px;height:160px;background-repeat:no-repeat;position:absolute;top:0px;left:0px;}\n/*#chuncaimenu {width:46px;line-height:16px;float:left;font-size:12px;cursor:pointer;background-color:#666;color:#FFF;text-align:center;}*/\n#showchuncaimenu {float:left;text-align:left;width:100%;overflow:hidden;display:none;}\n/*#showchuncaimenu ul, */#tempsaying ul {margin:1px 0px 0px 0px;padding:0px 0px 0px 5px;float:left;width:100%;line-height:16px;cursor:pointer;overflow:hidden;}\n.wcc_mlist {text-align:center;width:47%;float:left;line-height:16px;margin:0;padding:0px 0px 4px 0px;cursor:pointer;overflow:hidden;}\n#tempsaying ul {width:96%;}\n#callchuncai {position:fixed;width:60px;line-height:16px;cursor:pointer;display:none;font-size:12px;border:1px solid #e87a73;background-color:#FFF;}\n* html #callchuncai {position:absolute;}\n#dialog_chat {position:absolute;top:0px;left:-205px;width:200px;line-height:23px;text-align:left;}\n#dialog_chat_loading {width:200px;height:30px;background:url(\"../imgs/loading.gif\") no-repeat center center;display:none;}\n#chat_top {float:left;width:200px;height:5px;overflow:hidden;background:url(\"../imgs/chat_top.gif\") no-repeat;}\n#dialog_chat_contents, #chuncaisaying, #getmenu, #tempsaying {float:left;margin:0;padding-left:0px;width:198px;line-height:23px;background-color:#ffffee;}\n#getmenu, #tempsaying,#chuncaisaying {padding:0px 0px 0px 2px; width:196px;}\n#dialog_chat_contents {width:198px;border-left:1px solid #e87a73;border-right:1px solid #e87a73;}\n#chat_bottom {width:200px;height:10px;float:left;background:url(\"../imgs/chat_bottom.gif\") no-repeat;}\n#chat_top, #chat_bottom {}\n#tempsaying, #hiddenfaces {display:none;}\n#getmenu {width:95%;height:16px;margin:0;padding:0;cursor:pointer;background:url(\"../imgs/menu.jpg\") no-repeat top right;}\n#addinput {width:240px;height:20px;position:absolute;top:150px;left:-260px;border:1px solid #888;background-color:#FFF;padding-top:2px;overflow:hidden;display:none;}\n#inp_l {float:left;width:220px;height:20px;}\n#inp_r {float:right;width:20px;height:20px;font-size:12px;text-align:center;cursor:pointer;}\n#talk {border:none;float:left;width:180px;height:16px;}\n#talkto {float:left;border:none;width:30px;height:16px;background:url(\"../imgs/ok.jpg\");cursor:pointer;}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"../../../weichuncai/js/common.js","names":["smjq","jQuery","_typei","weichuncai_text","getEvent","window","event","arguments","callee","caller","document","ready","getwidth","getCookie","getheight","width","height","documentElement","clientWidth","imagewidth","clientHeight","imageheight","cwidth","cheight","moveX","moveY","moveTop","moveLeft","moveable","docMouseMoveEvent","onmousemove","docMouseUpEvent","onmouseup","append","closechuncai_init","getdata","setFace","css","attr","smcc","getElementById","onmousedown","ent","clientX","clientY","obj","parseInt","style","top","left","isFirefox","navigator","userAgent","indexOf","getSelection","removeAllRanges","x","y","historywidth","historyheight","replace","setCookie","click","chuncaiMenu","closechuncai","callchuncai","closeChuncaiMenu","closeNotice","showInput","closeInput","chuncaiSay","setTimeout","location","href","_about_path","stoptime","tol","setTime","talkSelf","talktime","onmouseover","talkobj","clearTimeout","eattimes","timenum","eatfood","gettimes","closechuncai_evil","clearChuncaiSay","showNotice","stopTalkSelf","fadeOut","fadeIn","s","typeWords","innerHTML","clearInput","value","createFace","a","b","c","num","src","el","id","ajax","type","url","_weichuncai_jsonpath","cache","dataType","contentType","beforeSend","success","data","dat","eval","notice","BirthDay","Date","showlifetime","today","timeold","getTime","sectimeold","secondsold","Math","floor","msPerDay","e_daysold","daysold","e_hrsold","hrsold","e_minsold","minsold","seconds","talkcon","val","i","in_array","ques","types","ans","str","arr","foods","preg","test","eatsay","talkself","error","goal","tsi","talkself_arr","random","length","arrayShuffle","result","len","splice","p","substr","txtst","name","ex","times","cookie","toGMTString","match","RegExp","unescape"],"sources":["weichuncai/js/common.js"],"mappings":"AAAA,IAAIA,KAAOC,OACPC,OAAS,EACTC,gBAAkB,GA2JtB,SAASC,WACR,OAAOC,OAAOC,OAASC,UAAUC,OAAOC,OAAOF,UAAU,EAC1D,CA5JAP,KAAKU,UAAUC,OAAM,WACnB,IAAIC,EAAWC,UAAU,gBACrBC,EAAYD,UAAU,iBAC1B,GAAe,MAAZD,GAAiC,MAAbE,EACtB,IAAIC,EAAQH,EACRI,EAASF,OAETC,EAAQL,SAASO,gBAAgBC,YAAa,IAAMC,WACpDH,EAASN,SAASO,gBAAgBG,aAAc,IAAMC,YAG3D,IAAIC,EAASZ,SAASO,gBAAgBC,YAAY,IAC9CK,EAAUb,SAASO,gBAAgBG,aAAa,GAEhDI,EAAQ,EACRC,EAAQ,EACRC,EAAU,EACVC,EAAW,EACXC,GAAW,EACXC,EAAoBnB,SAASoB,YAC7BC,EAAkBrB,SAASsB,UAE/BhC,KAAK,QAAQiC,OAAO,8uBACpBjC,KAAK,cAAciC,OAAO,mLAC1BjC,KAAK,QAAQiC,OAAO,oCAGE,SADApB,UAAU,oBAE/BqB,oBAGDC,QAAQ,aACRC,QAAQ,GAERpC,KAAK,cAAcqC,IAAI,OAAQtB,EAAM,MACrCf,KAAK,cAAcqC,IAAI,MAAOrB,EAAO,MACrChB,KAAK,cAAcqC,IAAI,QAASlB,WAAW,MAC3CnB,KAAK,cAAcqC,IAAI,SAAUhB,YAAY,MAC7CrB,KAAK,gBAAgBsC,KAAK,QAAS,OAAOf,EAAQ,YAAYD,EAAO,0BAErEiB,KAAO7B,SAAS8B,eAAe,aAC/BD,KAAKE,YAAc,WAClB,IAAI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,KAAK,KAE3BxE,QAAU5E,OAAOkE,WAAW,YAAYQ,EAAS,IAAK,IACvD,CACA,SAASW,eACLT,SACFC,aAAaD,QAEf,CACA,SAAS4E,aAAaZ,GAGrB,IAFA,IAAIa,EAAS,GACbC,EAAMd,EAAIW,OACJG,KACLD,EAAOA,EAAOF,QAAUX,EAAIe,OAAOjC,KAAKC,MAAMD,KAAK4B,UAAUI,EAAI,IAAI,GAEtE,OAAOD,CACR,CAGA,SAAShE,YACR,IAAImE,EAAI,EACJjB,EAAM7I,gBAAgB+J,OAAO,EAAEhK,QAE7B,KADEC,gBAAgB+J,OAAOhK,OAAO,KAErC8I,GAAO7I,gBAAgB+J,OAAOhK,OAAOC,gBAAgB+J,OAAOhK,QAAQmD,QAAQ,KAAK,GACjF4G,EAAG9J,gBAAgB+J,OAAOhK,QAAQmD,QAAQ,KAAK,GAEhDnD,QAAQ+J,EACRvJ,SAAS8B,eAAe,cAAcuD,UAAYiD,EAClDmB,MAAQ5F,WAAW,cAAc,IAC7BrE,OAAQC,gBAAgByJ,SAC3B1E,aAAaiF,OACbjK,OAAS,EAEX,CAEA,SAAS2D,UAAUuG,EAAM1B,EAAK2B,GAC7B,IAAIC,EAAQ,IAAI9C,KAChB8C,EAAMzF,QAAQyF,EAAM1C,UAAYyC,GAE/B3J,SAAS6J,OADD,GAANF,EACgBD,EAAK,IAAI1B,EAAI,IAEb0B,EAAK,IAAI1B,EAAI,aAAa4B,EAAME,aAEpD,CAEA,SAAS3J,UAAUuJ,GAClB,IAAInB,EAAMvI,SAAS6J,OAAOE,MAAM,IAAIC,OAAO,QAAQN,EAAK,kBACxD,OAAU,MAAPnB,EAAoB0B,SAAS1B,EAAI,IAAY,IACjD","ignoreList":[],"sourcesContent":["var smjq = jQuery;\nvar _typei = 0;\nvar weichuncai_text = '';\nsmjq(document).ready(function(){\n\t\tvar getwidth = getCookie(\"historywidth\");\n\t\tvar getheight = getCookie(\"historyheight\");\n\t\tif(getwidth != null && getheight != null){\n\t\t\tvar width = getwidth;\n\t\t\tvar height = getheight;\n\t\t}else{\n\t\t\tvar width = document.documentElement.clientWidth- 200 - imagewidth;\n\t\t\tvar height = document.documentElement.clientHeight- 180 - imageheight;\n\t\t}\n\n\t\tvar cwidth = document.documentElement.clientWidth-100;\n\t\tvar cheight = document.documentElement.clientHeight-20;\n\t\t//var height = document.body.clientHeight-200;\n\t\tvar moveX = 0;\n\t\tvar moveY = 0;\n\t\tvar moveTop = 0;\n\t\tvar moveLeft = 0;\n\t\tvar moveable = false;\n\t\tvar docMouseMoveEvent = document.onmousemove;\n\t\tvar docMouseUpEvent = document.onmouseup;\n\n\t\tsmjq(\"body\").append('<div id=\"smchuncai\" onfocus=\"this.blur();\" style=\"color:#626262;z-index:999;\"><div id=\"chuncaiface\"></div><div id=\"dialog_chat\"><div id=\"chat_top\"></div><div id=\"dialog_chat_contents\"><div id=\"dialog_chat_loading\"></div><div id=\"tempsaying\"></div><div id=\"showchuncaimenu\"><ul class=\"wcc_mlist\" id=\"shownotice\">显示公告</ul><ul class=\"wcc_mlist\" id=\"chatTochuncai\">聊&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;天</ul><ul class=\"wcc_mlist\" id=\"foods\">吃 零 食</ul><ul class=\"wcc_mlist\" id=\"aboutmanage\">关&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;于</ul><ul class=\"wcc_mlist\" id=\"lifetimechuncai\">生存时间</ul><ul class=\"wcc_mlist\" id=\"closechuncai\">关闭春菜</ul></div><div><ul id=\"chuncaisaying\"></ul></div><div id=\"getmenu\"> </div></div><div id=\"chat_bottom\"></div></div></div>');\n\t\tsmjq(\"#smchuncai\").append('<div id=\"addinput\"><div id=\"inp_l\"><input id=\"talk\" type=\"text\" name=\"mastersay\" value=\"\" /> <input id=\"talkto\" type=\"button\" value=\" \" /></div><div id=\"inp_r\"> X </div></div>');\n\t\tsmjq(\"body\").append('<div id=\"callchuncai\">召唤春菜</div>');\n\t\t//判断春菜是否处于隐藏状态\n\t\tvar is_closechuncai = getCookie(\"is_closechuncai\");\n\t\tif(is_closechuncai == 'close'){\n\t\t\tclosechuncai_init();\n\t\t}\n\t\t//设置初始状态\n\t\tgetdata(\"getnotice\");\n\t\tsetFace(1);\n\n\t\tsmjq(\"#smchuncai\").css('left', width+'px');\n\t\tsmjq(\"#smchuncai\").css('top', height+'px');\n\t\tsmjq(\"#smchuncai\").css('width', imagewidth+'px');\n\t\tsmjq(\"#smchuncai\").css('height', imageheight+'px');\n\t\tsmjq(\"#callchuncai\").attr(\"style\", \"top:\"+cheight+\"px; left:\"+cwidth+\"px; text-align:center;\");\n\n\t\tsmcc = document.getElementById(\"smchuncai\");\n\t\tsmcc.onmousedown = function(){\n\t\t\tvar ent = getEvent();\n\t\t\tmoveable = true;\n\t\t\tmoveX = ent.clientX;\n\t\t\tmoveY = ent.clientY;\n\t\t\tvar obj = document.getElementById(\"smchuncai\");\n\t\t\tmoveTop = parseInt(obj.style.top);\n\t\t\tmoveLeft = parseInt(obj.style.left);\n\t\t\tif(isFirefox=navigator.userAgent.indexOf(\"Firefox\")>0){\n\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t}\n\t\t\tdocument.onmousemove = function(){\n\t\t\t\tif(moveable){\n\t\t\t\t\tvar ent = getEvent();\n\t\t\t\t\tvar x = moveLeft + ent.clientX - moveX;\n\t\t\t\t\tvar y = moveTop + ent.clientY - moveY;\n\t\t\t\t\tvar w = 200;\n\t\t\t\t\tvar h = 200;\t//w,h为浮层宽高\n\t\t\t\t\tobj.style.left = x + \"px\";\n\t\t\t\t\tobj.style.top = y + \"px\";\n\t\t\t\t}\n\t\t\t};\n\t\t\tdocument.onmouseup = function(){\n\t\t\t\tif(moveable){\n\t\t\t\t\tvar historywidth = obj.style.left;\n\t\t\t\t\tvar historyheight = obj.style.top;\n\t\t\t\t\thistorywidth = historywidth.replace('px', '');\n\t\t\t\t\thistoryheight = historyheight.replace('px', '');\n\t\t\t\t\tsetCookie(\"historywidth\", historywidth, 60*60*24*30*1000);\n\t\t\t\t\tsetCookie(\"historyheight\", historyheight, 60*60*24*30*1000);\n\t\t\t\t\tdocument.onmousemove = docMouseMoveEvent;\n\t\t\t\t\tdocument.onmouseup = docMouseUpEvent;\n\t\t\t\t\tmoveable = false;\n\t\t\t\t\tmoveX = 0;\n\t\t\t\t\tmoveY = 0;\n\t\t\t\t\tmoveTop = 0;\n\t\t\t\t\tmoveLeft = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tsmjq(\"#getmenu\").click(function(){\n\t\t\t\tchuncaiMenu();\n\t\t\t\tsetFace(1);\n\t\t\t\t});\n\t\tsmjq(\"#shownotice\").click(function(){\n\t\t\t\tgetdata(\"getnotice\");\n setFace(1);\n\t\t});\n\t\tsmjq(\"#closechuncai\").click(function(){\n\t\t\t\tsetFace(3);\n\t\t\t\tclosechuncai();\n\t\t\t\t});\n\t\tsmjq(\"#callchuncai\").click(function(){\n\t\t\t\tsetFace(2);\n\t\t\t\tcallchuncai();\n\t\t\t\tsetCookie(\"is_closechuncai\", '', 60*60*24*30*1000);\n\t\t\t\t});\n\t\tsmjq(\"#shownotice\").click(function(){\n\t\t\t\tsetFace(1);\n\t\t\t\tcloseChuncaiMenu();\n\t\t\t\t});\n\t\tsmjq(\"#lifetimechuncai\").click(function(){\n\t\t\t\tcloseChuncaiMenu();\n\t\t\t\tcloseNotice();\n\t\t\t\tsetFace(2);\n\t\t\t\tgetdata('showlifetime');\n\t\t\t\t});\n\t\tsmjq(\"#chatTochuncai\").click(function(){\n\t\t\t\tshowInput();\n\t\t\t\t});\n\t\tsmjq(\"#inp_r\").click(function(){\n\t\t\t\tcloseInput();\n\t\t\t\tchuncaiSay('不聊天了吗?(→_→)');\n\t\t\t\tsetFace(3);\n\t\t\t\t});\n\t\tsmjq(\"#talkto\").click(function(){\n\t\t\t\tgetdata(\"talking\");\n\t\t\t\t});\n\t\tsmjq(\"#aboutmanage\").click(function(){\n\t\t\t\tcloseChuncaiMenu();\n\t\t\t\tcloseNotice();\n\t\t\t\tsmjq(\"#getmenu\").css(\"display\", \"none\");\n\t\t\t\tchuncaiSay(\"你想了解我主人?跟我来吧~~~\");\n\t\t\t\tsetFace(2);\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\twindow.location.href = _about_path ;\n\t\t\t\t\t}, 2000);\n\t\t\t\t});\n\t\tsmjq(\"#foods\").click(function(){\n\t\t\t\tcloseChuncaiMenu();\n\t\t\t\tcloseNotice();\n\t\t\t\tgetdata(\"foods\");\n\t\t\t\t});\n/*\t\tsmjq(\"#showchuncaimenu\").hover(function(){\n\t\t\t\t},function(){\n\t\t\t\tsmjq(\"#showchuncaimenu\").slideUp('slow').show();\n\t\t\t\t});*/\n\t\tdocument.onmousemove = function(){\n\t\t\tstoptime();\n\t\t\ttol = 0;\n\t\t\tsetTime();\n\t\t\t//chuncaiSay(\"啊,野生的主人出现了! ~~~O口O\");\n\t\t}\n\t\ttalkSelf(talktime);\n\t\tdocument.getElementById(\"smchuncai\").onmouseover = function(){\n\t\t\tif(talkobj){\n\t\t\t\tclearTimeout(talkobj);\n\t\t\t}\n\t\t\ttalktime = 0;\n\t\t\ttalkSelf(talktime);\n\t\t}\n\t\t});\n\nfunction getEvent() {\n\treturn window.event || arguments.callee.caller.arguments[0];\n}\n\nvar eattimes = 0;\nfunction eatfood(obj){\n\tvar gettimes = getCookie(\"eattimes\");\n\tif(parseInt(gettimes) > parseInt(9)){\n\t\tchuncaiSay(\"主人是个大混蛋!!\");\n\t\tsetFace(3);\n\t\tclosechuncai_evil();\n\t}else if(parseInt(gettimes) > parseInt(7)){\n\t\tchuncaiSay(\".....................肚子要炸了,死也不要再吃了~~!!!TAT\");\n\t\tsetFace(3);\n\t}else if(parseInt(gettimes) == parseInt(5)){\n\t\tchuncaiSay(\"我已经吃饱了,不要再吃啦......\");\n\t\tsetFace(3);\n\t}else if(parseInt(gettimes) == parseInt(3)){\n\t\tchuncaiSay(\"多谢款待,我吃饱啦~~~ ╰( ̄▽ ̄)╭\");\n\t\tsetFace(2);\n\t}else{\n\t\tvar id = obj.replace(\"f\",'');\n\t\tgetdata('eatsay', id);\n\t}\n\teattimes++;\n\tsetCookie(\"eattimes\", eattimes, 60*10*1000);\n}\nfunction chuncaiMenu(){\n\t//smjq(\"#showchuncaimenu\").slideDown('fast').show();\n\tclearChuncaiSay();\n\tcloseInput();\n\tchuncaiSay(\"准备做什么呢?\");\n\tsmjq(\"#showchuncaimenu\").css(\"display\", \"block\");\n\tsmjq(\"#getmenu\").css(\"display\", \"none\");\n\tsmjq(\"#chuncaisaying\").css(\"display\", \"none\");\n}\nfunction closeChuncaiMenu(){\n\tclearChuncaiSay();\n\tsmjq(\"#showchuncaimenu\").css(\"display\", \"none\");\n\t//smjq(\"#chuncaisaying\").css(\"display\", \"block\");\n\tshowNotice();\n\tsmjq(\"#getmenu\").css(\"display\", \"block\");\n}\nfunction showNotice(){\n\tsmjq(\"#chuncaisaying\").css(\"display\", \"block\");\n}\nfunction closechuncai(){\n\tstopTalkSelf();\n\tchuncaiSay(\"记得再叫我出来哦...\");\n\tsmjq(\"#showchuncaimenu\").css(\"display\", \"none\");\n\tsetTimeout(function(){\n\t\t\tsmjq(\"#smchuncai\").fadeOut(1200);\n\t\t\tsmjq(\"#callchuncai\").css(\"display\", \"block\");}, 2000);\n\t//保存关闭状态的春菜\n\tsetCookie(\"is_closechuncai\", 'close', 60*60*24*30*1000);\n}\nfunction closechuncai_evil(){\n\tstopTalkSelf();\n\tsmjq(\"#showchuncaimenu\").css(\"display\", \"none\");\n\tsetTimeout(function(){\n\t\t\tsmjq(\"#smchuncai\").fadeOut(1200);\n\t\t\tsmjq(\"#callchuncai\").css(\"display\", \"block\");}, 2000);\n}\nfunction closechuncai_init(){\n\tstopTalkSelf();\n\tsmjq(\"#showchuncaimenu\").css(\"display\", \"none\");\n\tsetTimeout(function(){\n\t\t\tsmjq(\"#smchuncai\").css(\"display\", \"none\");\n\t\t\tsmjq(\"#callchuncai\").css(\"display\", \"block\");}, 30);\n}\nfunction callchuncai(){\n\ttalkSelf(talktime);\n\tsmjq(\"#smchuncai\").fadeIn('normal');\n\tsmjq(\"#callchuncai\").css(\"display\", \"none\");\n\tcloseChuncaiMenu();\n\tcloseNotice();\n\tchuncaiSay(\"我回来啦~\");\n\tsetCookie(\"is_closechuncai\", '', 60*60*24*30*1000);\n}\n\nfunction chuncaiSay(s){\n\tclearChuncaiSay();\n\tsmjq(\"#tempsaying\").append(s);\n\tsmjq(\"#tempsaying\").css(\"display\", \"block\");\n\tweichuncai_text = s;\n\ttypeWords();\n}\nfunction clearChuncaiSay(){\n\tdocument.getElementById(\"tempsaying\").innerHTML = '';\n}\nfunction closeNotice(){\n\tsmjq(\"#chuncaisaying\").css(\"display\", \"none\");\n}\nfunction showInput(){\n\tcloseChuncaiMenu();\n\tcloseNotice();\n\tchuncaiSay(\"............?\");\n\t//setFace(1);\n\tsmjq(\"#addinput\").css(\"display\", \"block\");\n}\nfunction closeInput(){\n\tsetFace(3);\n\tsmjq(\"#addinput\").css(\"display\", \"none\");\n}\nfunction clearInput(){\n\tdocument.getElementById(\"talk\").value = '';\n}\nfunction createFace(a, b, c){\n\tsmjq(\"head\").append('<div id=\"hiddenfaces\"><img id=\"hf1\" src=\"'+a+'\" /><img id=\"hf2\" src=\"'+b+'\" /><img id=\"hf3\" src=\"'+c+'\" /></div>');\n\tsetFace(1);\n}\nfunction setFace(num){\n\tobj = document.getElementById(\"hf\"+num).src;\n\tsmjq(\"#chuncaiface\").attr(\"style\", \"background:url(\"+obj+\") no-repeat scroll 50% 0% transparent; width:\"+imagewidth+\"px;height:\"+imageheight+\"px;\");\n}\nfunction getdata(el, id){\n\tsmjq.ajax({\n\t\ttype:\t'GET',\n\t\turl:\t_weichuncai_jsonpath,\n\t\tcache:\t'false',\n\t\tdataType: 'html',\n\t\tcontentType: 'application/json; charset=utf8',\n\t\tbeforeSend: function(){\n\t\t\t//smjq(\"#dialog_chat\").fadeOut(\"normal\");\n\t\t\tsmjq(\"#tempsaying\").css('display', \"none\");\n\t\t\tsmjq(\"#dialog_chat_loading\").fadeIn(\"normal\");\n\t\t},\n\t\tsuccess: function(data){\n\t\t\tsmjq(\"#dialog_chat_loading\").css('display', \"none\");\n\t\t\t//smjq(\"#dialog_chat\").fadeIn(\"normal\");\n\t\t\tsmjq(\"#tempsaying\").css('display', \"\");\n\t\t\tvar dat = eval(\"(\"+data+\")\");\n if(el == 'getnotice'){\n\t\t\t\tchuncaiSay(dat.notice);\n\t\t\t\tsetFace(1);\n\t\t\t}else if(el == 'showlifetime'){\n\t\t\t\tBirthDay=new Date(dat.showlifetime);//建站日期\n\t\t\t\ttoday=new Date();\n\t\t\t\ttimeold=(today.getTime()-BirthDay.getTime());\n\t\t\t\tsectimeold=timeold/1000\n\t\t\t\tsecondsold=Math.floor(sectimeold);\n\t\t\t\tmsPerDay=24*60*60*1000\n\t\t\t\te_daysold=timeold/msPerDay\n\t\t\t\tdaysold=Math.floor(e_daysold);\n\t\t\t\te_hrsold=(daysold-e_daysold)*-24;\n\t\t\t\thrsold=Math.floor(e_hrsold);\n\t\t\t\te_minsold=(hrsold-e_hrsold)*-60;\n\t\t\t\tminsold=Math.floor((hrsold-e_hrsold)*-60);\n\t\t\t\tseconds=Math.floor((minsold-e_minsold)*-60);\n\t\t\t\tchuncaiSay(\"我已经与主人 一起生存了 \"+daysold+\" 天 \"+hrsold+\" 小时 \"+minsold+\" 分钟 \"+seconds+\" 秒的快乐时光啦~*^_^*\");\n\t\t\t}else if(el == 'talking'){\n\t\t\t\tvar talkcon = smjq(\"#talk\").val();\n\t\t\t\tvar i = in_array(talkcon, dat.ques);\n\t\t\t\tvar types = typeof(i);\n\t\t\t\tif(types != 'boolean'){\n\t\t\t\t\tchuncaiSay(dat.ans[i]);\n\t\t\t\t\tsetFace(2);\n\t\t\t\t}else{\n\t\t\t\t\tchuncaiSay('.......................嗯?');\n\t\t\t\t\tsetFace(3);\n\t\t\t\t}\n\t\t\t\tclearInput();\n\t\t\t}else if(el == 'foods'){\n\t\t\t\tvar str='';\n\t\t\t\tvar arr = dat.foods;\n\t\t\t\tvar preg = /function/;\t\n\t\t\t\tfor(var i in arr){\n\t\t\t\t\tif(arr[i] != '' && !preg.test(arr[i]) ){\n\t\t\t\t\t\tstr +='<ul id=\"f'+i+'\" class=\"eatfood\" onclick=\"eatfood(this.id)\">'+arr[i]+'</ul>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tchuncaiSay(str);\n\t\t\t}else if(el = \"eatsay\"){\n\t\t\t\tvar str = dat.eatsay[id];\n\t\t\t\tchuncaiSay(str);\n\t\t\t\tsetFace(2);\n\t\t\t}else if(el = \"talkself\"){\n\t\t\t\tvar arr = dat.talkself;\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t},\n\t\terror: function(){\n\t\t\tchuncaiSay('好像出错了,是什么错误呢...请联系管理猿');\n\t\t}\n\t\t});\n}\n\nfunction in_array(str, arr){\n\tfor(var i in arr){\n\t\tif(arr[i] == str){\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn false;\n}\n\nvar timenum;\nvar tol=0;\n//10分钟后页面没有响应就停止活动\nvar goal = 10*60;\nfunction setTime(){\n\ttol++;\n\t//document.body.innerHTML(tol);\n\ttimenum = window.setTimeout(\"setTime('\"+tol+\"')\", 1000);\n\tif(parseInt(tol) == parseInt(goal)){\n\t\tstopTalkSelf();\n\t\tcloseChuncaiMenu();\n\t\tcloseNotice();\n\t\tcloseInput();\n\t\tchuncaiSay(\"主人跑到哪里去了呢....\");\n\t\tsetFace(3);\n\t\tstoptime();\n\t}\n}\nfunction stoptime(){\n\tif(timenum){\n\t\tclearTimeout(timenum);\n\t}\n}\nvar talktime = 0;\n//设置自言自语频率(单位:秒)\nvar talkself = 60;\nvar talkobj;\nvar tsi = 0;\nvar talkself_arr = [\n\t[\"白日依山尽,黄河入海流,欲穷千里目,更上.....一层楼?\", \"1\"],\n\t[\"我看见主人熊猫眼又加重了!\", \"3\"],\n\t[\"我是不是很厉害呀~~?\", \"2\"],\n\t[\"5555...昨天有个小孩子跟我抢棒棒糖吃.....\", \"3\"],\n\t[\"昨天我好像看见主人又在众人之前卖萌了哦~\", \"2\"]\n];\n\nfunction talkSelf(talktime){\n\ttalktime++;\n\tvar yushu = talktime%talkself;\n\tif(parseInt(yushu) == parseInt(9)){\n\t\tcloseChuncaiMenu();\n\t\tcloseNotice();\n\t\tcloseInput();\n\t\ttsi = Math.floor(Math.random() * talkself_arr.length + 1)-1;\n\t\tchuncaiSay(talkself_arr[tsi][0]);\n\t\tsetFace(talkself_arr[tsi][1]);\n\t}\n\ttalkobj = window.setTimeout(\"talkSelf(\"+talktime+\")\", 1000);\n}\nfunction stopTalkSelf(){\n\tif(talkobj){\n\t\tclearTimeout(talkobj);\n\t}\n}\nfunction arrayShuffle(arr){\n\tvar result = [],\n\tlen = arr.length;\n\twhile(len--){\n\t\tresult[result.length] = arr.splice(Math.floor(Math.random()*(len+1)),1);\n\t}\n\treturn result;\n}\n\n\nfunction typeWords() {\n\tvar p = 1;\n\tvar str = weichuncai_text.substr(0,_typei);\n\tvar w = weichuncai_text.substr(_typei,1);\n\tif(w==\"<\"){\n\t\tstr += weichuncai_text.substr(_typei,weichuncai_text.substr(_typei).indexOf(\">\")+1);\n\t\tp= weichuncai_text.substr(_typei).indexOf(\">\")+1;\n\t}\n\t_typei+=p;\n\tdocument.getElementById(\"tempsaying\").innerHTML = str;\n\ttxtst = setTimeout(\"typeWords()\",20);\n\tif (_typei> weichuncai_text.length){\n\t\tclearTimeout(txtst);\n\t\t_typei = 0;\n\t}\n}\n\nfunction setCookie(name, val, ex){\n\tvar times = new Date();\n\ttimes.setTime(times.getTime() + ex);\n\tif(ex == 0){\n\t\tdocument.cookie = name+\"=\"+val+\";\";\n\t}else{\n\t\tdocument.cookie = name+\"=\"+val+\"; expires=\"+times.toGMTString();\n\t}\n}\n\nfunction getCookie(name){\n\tvar arr = document.cookie.match(new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\")); \n\tif(arr != null) return unescape(arr[2]); return null;\n}\n\n"]}