sinzmise-cetastories 2.0.0-1731114112124 → 2.0.0-1731116663626
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +1 -4033
- package/about/index.html +1 -4041
- package/album/index.html +1 -4050
- package/archives/2021/12/index.html +1 -3917
- package/archives/2021/index.html +1 -3917
- package/archives/2022/12/index.html +1 -3917
- package/archives/2022/index.html +1 -3917
- package/archives/2023/01/index.html +1 -4072
- package/archives/2023/02/index.html +1 -3917
- package/archives/2023/03/index.html +1 -4063
- package/archives/2023/04/index.html +1 -3992
- package/archives/2023/07/index.html +1 -4217
- package/archives/2023/08/index.html +1 -4067
- package/archives/2023/09/index.html +1 -3917
- package/archives/2023/10/index.html +1 -3917
- package/archives/2023/11/index.html +1 -3917
- package/archives/2023/12/index.html +1 -3918
- package/archives/2023/index.html +1 -4591
- package/archives/2023/page/2/index.html +1 -4572
- package/archives/2023/page/3/index.html +1 -3930
- package/archives/2024/01/index.html +1 -4142
- package/archives/2024/02/index.html +1 -3922
- package/archives/2024/03/index.html +1 -3916
- package/archives/2024/04/index.html +1 -3997
- package/archives/2024/05/index.html +1 -4065
- package/archives/2024/06/index.html +1 -3917
- package/archives/2024/07/index.html +1 -3917
- package/archives/2024/08/index.html +1 -3992
- package/archives/2024/09/index.html +1 -3917
- package/archives/2024/10/index.html +1 -3984
- package/archives/2024/index.html +1 -4576
- package/archives/2024/page/2/index.html +1 -4433
- package/archives/index.html +1 -4560
- package/archives/page/2/index.html +1 -4560
- package/archives/page/3/index.html +1 -4560
- package/archives/page/4/index.html +1 -4560
- package/archives/page/5/index.html +1 -4560
- package/assets/algolia/algoliasearch.js +3 -7182
- package/assets/algolia/algoliasearchLite.js +3 -4445
- package/atom.xml +31 -31
- package/bbs/bbs.html +1 -4012
- package/bbs/bbs.js +2 -12
- package/bbs/index.html +1 -4031
- package/categories/index.html +1 -4050
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -4570
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -4485
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -3920
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -4148
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -4610
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -4148
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -4072
- package/charts/index.html +1 -4039
- package/comments/index.html +1 -4052
- package/css/custom2.css +2 -3
- package/css/first.css +2 -1868
- package/css/pace/big-counter.css +2 -39
- package/css/pace/corner-indicator.css +2 -72
- package/css/pace/flash.css +2 -76
- package/css/pace/mac-osx.css +2 -86
- package/css/pace/pace.css +2 -50
- package/css/plane.css +2 -59
- package/css/style.css +2 -8585
- package/css/tags.css +2 -3516
- package/essay/index.html +1 -4050
- package/fcircle/index.html +1 -4075
- package/games +2 -2
- package/index.html +1 -4717
- package/js/app.js +2 -1341
- package/js/autoload.js +2 -62
- package/js/ceta/fancybox.css +2 -2
- package/js/ceta/fancybox.umd.js +2 -2
- package/js/ceta/iconfontInkss.js +2 -1
- package/js/ceta/message.css +2 -6
- package/js/ceta/message.js +2 -6
- package/js/clock.js +2 -1
- package/js/kslink.js +2 -38
- package/js/newyear.js +2 -76
- package/js/plane.js +2 -2200
- package/js/plugins/aplayer.js +2 -186
- package/js/plugins/parallax.js +2 -191
- package/js/plugins/rightMenus.js +2 -623
- package/js/plugins/tags/contributors.js +2 -92
- package/js/plugins/tags/friends.js +2 -93
- package/js/plugins/tags/sites.js +2 -96
- package/js/search/algolia.js +2 -239
- package/js/search/hexo.js +2 -195
- package/js/search/meilisearch.js +2 -220
- package/js/txmap.js +2 -248
- package/link/index.html +1 -6180
- package/load.html +1 -294
- package/maps/assets/algolia/algoliasearch.js.map +1 -0
- package/maps/assets/algolia/algoliasearchLite.js.map +1 -0
- package/maps/bbs/bbs.js.map +1 -0
- package/maps/css/custom2.css.map +1 -0
- package/maps/css/first.css.map +1 -0
- package/maps/css/pace/big-counter.css.map +1 -0
- package/maps/css/pace/corner-indicator.css.map +1 -0
- package/maps/css/pace/flash.css.map +1 -0
- package/maps/css/pace/mac-osx.css.map +1 -0
- package/maps/css/pace/pace.css.map +1 -0
- package/maps/css/plane.css.map +1 -0
- package/maps/css/style.css.map +1 -0
- package/maps/css/tags.css.map +1 -0
- package/maps/js/app.js.map +1 -0
- package/maps/js/autoload.js.map +1 -0
- package/maps/js/ceta/fancybox.css.map +1 -0
- package/maps/js/ceta/fancybox.umd.js.map +1 -0
- package/maps/js/ceta/iconfontInkss.js.map +1 -0
- package/maps/js/ceta/message.css.map +1 -0
- package/maps/js/ceta/message.js.map +1 -0
- package/maps/js/clock.js.map +1 -0
- package/maps/js/kslink.js.map +1 -0
- package/maps/js/newyear.js.map +1 -0
- package/maps/js/plane.js.map +1 -0
- package/maps/js/plugins/aplayer.js.map +1 -0
- package/maps/js/plugins/parallax.js.map +1 -0
- package/maps/js/plugins/rightMenus.js.map +1 -0
- package/maps/js/plugins/tags/contributors.js.map +1 -0
- package/maps/js/plugins/tags/friends.js.map +1 -0
- package/maps/js/plugins/tags/sites.js.map +1 -0
- package/maps/js/search/algolia.js.map +1 -0
- package/maps/js/search/hexo.js.map +1 -0
- package/maps/js/search/meilisearch.js.map +1 -0
- package/maps/js/txmap.js.map +1 -0
- package/maps/sw.js.map +1 -0
- package/maps/weichuncai/css/style.css.map +1 -0
- package/maps/weichuncai/js/common.js.map +1 -0
- package/maps/weichuncai/js/jquery.js.map +1 -0
- package/maps/weichuncai/wcc-config.js.map +1 -0
- package/music/index.html +1 -4033
- package/package.json +1 -1
- package/page/2/index.html +1 -4578
- package/page/3/index.html +1 -4575
- package/page/4/index.html +1 -4572
- package/page/5/index.html +1 -3924
- package/posts/10021/index.html +5 -4130
- package/posts/10045/index.html +1 -4224
- package/posts/10733/index.html +1 -4125
- package/posts/10996/index.html +5 -4127
- package/posts/12779/index.html +1 -4134
- package/posts/13624/index.html +1 -4179
- package/posts/15688/index.html +1 -4133
- package/posts/15748/index.html +5 -4121
- package/posts/15799/index.html +1 -4130
- package/posts/15842/index.html +5 -4121
- package/posts/16107/index.html +1 -4111
- package/posts/18063/index.html +1 -4124
- package/posts/20412/index.html +1 -4134
- package/posts/21375/index.html +1 -4124
- package/posts/22945/index.html +4 -4169
- package/posts/23021/index.html +1 -4104
- package/posts/27531/index.html +5 -4121
- package/posts/28536/index.html +1 -4116
- package/posts/28733/index.html +1 -4168
- package/posts/29196/index.html +1 -4106
- package/posts/38917/index.html +1 -4144
- package/posts/38964/index.html +1 -4208
- package/posts/42487/index.html +1 -4135
- package/posts/42580/index.html +1 -4128
- package/posts/45875/index.html +1 -4118
- package/posts/46640/index.html +1 -4147
- package/posts/48762/index.html +1 -4109
- package/posts/50710/index.html +1 -4114
- package/posts/52677/index.html +1 -4125
- package/posts/53662/index.html +1 -4123
- package/posts/54386/index.html +1 -4116
- package/posts/54481/index.html +1 -4133
- package/posts/54787/index.html +5 -4124
- package/posts/56467/index.html +1 -4121
- package/posts/57692/index.html +1 -4143
- package/posts/58203/index.html +1 -4116
- package/posts/61417/index.html +1 -4117
- package/posts/61712/index.html +1 -4113
- package/posts/646/index.html +1 -4106
- package/posts/64856/index.html +1 -4120
- package/posts/64935/index.html +1 -4120
- package/search.xml +70 -70
- package/seas/index.html +1 -4050
- package/sw.js +2 -798
- package/tags/Flash/347/233/270/345/205/263/index.html +1 -3924
- package/tags/Steam/346/270/270/346/210/217/index.html +1 -3924
- package/tags/Windows/350/275/257/344/273/266/index.html +1 -3997
- package/tags/index.html +1 -4033
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -4570
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -4485
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -4073
- package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +1 -3924
- 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 -3925
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -3920
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -4148
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -3924
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -4610
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -4148
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -4224
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -4075
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -4072
- package/update/index.html +1 -4112
- package/weichuncai/css/style.css +2 -25
- package/weichuncai/js/common.js +2 -449
- package/weichuncai/js/jquery.js +2 -139
- package/weichuncai/wcc-config.js +2 -17
@@ -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,GA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IE,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,K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AAOC,KAAKE,QAAQxF,SAASyF,eAAe,gBAAe,GAC5D,EAGHjG,EAAGkG,aAAe9F,IAChBJ,EAAGI,UAAYA,EACVH,GACHD,EAAGM,OAELL,GAAQkG,WAAW,CACjB,CAACjG,EAAQe,WAAY,CACnBsB,MAAOnC,IAEV,EAGHJ,EAAGC,OAAS,KACVO,SAASY,cAAc,aAAaC,MAAM+E,QAAU,QACpD5F,SAASgB,iBAAiB,WAAWN,IAChB,WAAfA,EAAMmF,MACRrG,EAAGyB,OACL,GACC,CAAE6E,MAAM,GAAM,EAGnBtG,EAAG6B,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,KAAU,KACR,IAAIC,EAAMC,SAASC,cAAc,OACjCF,EAAIG,WAAaJ,EAAGK,SACpBH,SAASI,KAAKC,OAAON,GACrBC,SAASM,iBAAiB,kBAAkBC,SAASC,IACnDA,EAAEC,iBAAiB,SAAUX,EAAGY,UAAU,EAAM,IAE1BV,SAASW,cAAc,yBAC7BF,iBAAiB,QAASX,EAAGY,UAC/CV,SACGW,cAAc,uBACdF,iBAAiB,QAASX,EAAGc,OAAO,GACvCZ,SACGW,cAAc,kBACdF,iBAAiB,QAASX,EAAGc,OAAO,EAAM,EAE/Cd,SAAee,IACbA,EAAMC,iBACN,IAAIC,EAAQF,EAAMG,OAAOL,cAAc,mBAErCb,EAAGmB,UADDF,EACaA,EAAMG,MAENL,EAAMG,OAAOE,MAG1BpB,EAAGmB,WACLnB,EAAGqB,QACL,EAEFrB,OAAYsB,UACVpB,SAASM,iBAAiB,mBAAmBC,SAASC,IACpDA,EAAEU,MAAQpB,EAAGmB,SAAS,IAExBjB,SAASW,cAAc,aAAaU,MAAMC,QAAU,QAC/CxB,EAAGyB,OACNzB,EAAGyB,WAAazB,EAAG0B,aAErB,IAAIC,EAAU,GACdA,GAAW3B,EAAG4B,gBAAgB5B,EAAGyB,KAAKI,OACtCF,GAAW3B,EAAG4B,gBAAgB5B,EAAGyB,KAAKK,OACtB,KAAZH,IACFA,EAAU,sEAAsEI,SAASC,cAA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DpF,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,SACpBG,SAASG,KAAKC,OAAOL,GAErBL,EAAcW,SAASC,cAAcb,OACjCC,EAAYa,OAASb,EAAYc,QAAUd,EAAYe,WACzDjB,EAAGkB,QACHlB,EAAGmB,eAEHX,SAASY,cAAc,6BAA6BV,UAAY,8BAChEF,SAASY,cAAc,6BAA6BC,MAAMC,UAAY,SACtEd,SAASY,cAAc,oBAAoBC,MAAME,UAAY,QAC/D,EAGFvB,EAAGkB,MAAQ,KACTV,SACGY,cAAc,uBACdI,iBAAiB,QAASxB,EAAGyB,OAAO,GACvCjB,SACGY,cAAc,kBACdI,iBAAiB,QAASxB,EAAGyB,OAAO,GACvCjB,SAASkB,iBAAiB,kBAAkBC,SAASC,IACnDA,EAAEJ,iBAAiB,SAAUxB,EAAG6B,UAAU,EAAM,IAElDrB,SAASY,cAAc,6BAA6BI,iBAAiB,SAASN,IAC5E,IAAIY,EAAQZ,EAAMa,OAAOX,cAAc,wBAErCpB,EAAGI,UADD0B,EACaA,EAAME,MAENd,EAAMa,OAAOC,KAC9B,GACD,EAGHhC,EAAGmB,WAAa,KACdlB,EAASgC,cAAc,CACrBhB,UAAWf,EAAYe,UACvBiB,aAAcC,mBAAmBjC,EAAYa,MAAOb,EAAYc,QAChE,cAAAoB,CAAeC,GACbA,EAAOC,MAAMC,OAASF,EAAOpC,QAC/B,IAGgBgC,cAAcO,QAAQC,UA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AQqF,WAAW,CACjB,CAACpF,EAAYe,WAAY,CACvBsB,MAAOnC,IAEV,EAGHJ,EAAGC,OAAS,KACVO,SAASY,cAAc,aAAaC,MAAMkE,QAAU,QACpD/E,SAASgB,iBAAiB,WAAWN,IAChB,WAAfA,EAAMsE,MACRxF,EAAGyB,OACL,GACC,CAAEgE,MAAM,GAAM,EAGnBzF,EAAG6B,SAAYX,IACbA,EAAMwE,iBACN,IAAI5D,EAAQZ,EAAMa,OAAOX,cAAc,mBACvCpB,EAAGqF,aAAavD,GAAOE,MAAQF,EAAME,MAAQd,EAAMa,OAAOC,OAC1DhC,EAAGC,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,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AAS,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":["prefix","cacheSuffixVersion","CACHE_NAME","PreCachlist","NPMMirror","NPMPackage","NPMPackageVersion","debug","handleFetch","async","event","url","request","test","NetworkOnly","CacheFirst","CacheAlways","cdn","gh","jsdelivr","fastly","gcore","testingcf","test1","storisinz","webcache","combine","npm","unpkg","eleme","cdnjs","baomitu","bytedance","sustech","cdn_match_list","type","key","push","_console","console","color","black","red","green","yellow","blue","magenta","cyan","white","add","arr","fi","length","first","other","concat","createlog","util","args","log","apply","creategroup","groupCollapsed","colorUtils","bold","str","colorHash","wait","error","warn","ready","info","createChalk","name","firstToUpperCase","strArr","createChalkBg","createChalkGroup","chalk","group","end","groupEnd","bg","Object","keys","forEach","toLowerCase","replace","L","toUpperCase","i","self","logger","generate_uuid","c","r","Math","random","toString","db","read","config","Promise","resolve","reject","caches","open","then","cache","match","Request","encodeURIComponent","res","text","catch","write","value","put","Response","compareVersion","a","b","v1","split","v2","len","max","num1","parseInt","num2","mirrors","getLocalVersion","mirror_time","setNewestVersion","f","fetch","FetchEngine","json","version","stack","setInterval","setTimeout","installFunction","index","response","addEventListener","skipWaiting","waitUntil","all","map","includes","delete","clients","claim","respondWith","URL","pathname","resp","CacheRuntime","matchCache","matchCDN","method","protocol","clone","req","nav","navigator","saveData","effectiveType","connection","mozConnection","webkitConnection","urls","pathType","pathTestRes","RegExp","location","origin","fullPath","item","exec","ext","pop","contentType","getContentType","arrayBuffer","buffer","headers","endsWith","list","indexOf","progress","status","createPromiseAny","any","promises","Array","isArray","errs","AggregateError","p","err","fetchAny","reqs","controller","AbortController","signal","abort","fetchParallel","abortEvent","Event","eventTarget","EventTarget","tagged","dispatchEvent","e"],"sources":["sw.js"],"mappings":"AACA,MAAMA,OAAS,uBACTC,mBAAqB,8BACrBC,WAAaF,OAAS,KAAOC,mBAC7BE,YAAc,CAClB,iBACA,aACA,sBAEF,IAAIC,WAAY,EAChB,MAAMC,WAAa,uBACnB,IAAIC,kBAAoB,SACpBC,OAAQ,EAEZ,MAAMC,YAAcC,MAAOC,IACzB,MAAMC,EAAMD,EAAME,QAAQD,IAC1B,MAAI,UAAUE,KAAKF,GACVG,YAAYJ,GACV,UAAUG,KAAKF,GACjBI,WAAWL,GACT,yBAAyBG,KAAKF,IAE9B,kBAAkBE,KAAKF,IAEvB,mBAAmBE,KAAKF,IAExB,gBAAgBE,KAAKF,IAErB,qBAAqBE,KAAKF,IAE1B,aAAaE,KAAKF,IAElB,gEAAgE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,QACE,MAAO,aAjET,IAAK,MACH,MAAO,kBACT,IAAK,MACH,MAAO,aACT,IAAK,MACH,MAAO,cACT,IAAK,MACH,MAAO,YACT,IAAK,MACH,MAAO,YACT,IAAK,MACH,MAAO,cACT,IAAK,MACH,MAAO,kBACT,IAAK,MACH,MAAO,kBACT,IAAK,MACH,MAAO,iBACT,IAAK,MACH,MAAO,cACT,IAAK,MACH,MAAO,gCACT,IAAK,MAEL,IAAK,OAEL,IAAK,MAEL,IAAK,MAEL,IAAK,MACH,MAAO,aACT,IAAK,MACH,MAAO,YACT,IAAK,MACH,MAAO,YACT,IAAK,MACH,MAAO,kBACT,IAAK,OACH,MAAO,gCACT,IAAK,MACH,MAAO,gBACT,IAAK,MACH,MAAO,oBACT,IAAK,MACH,MAAO,iBACT,IAAK,OACH,MAAO,aACT,IAAK,MAEL,IAAK,OAEL,IAAK,OACH,MAAO,eACT,IAAK,KAEL,IAAK,MACH,MAAO,cACT,IAAK,MAEL,IAAK,OAEL,IAAK,MACH,MAAO,aAGX","ignoreList":[],"sourcesContent":["// 全站打包上传 npm,sw 并发请求 cdn\nconst prefix = 'sinzmise-cetastories';\nconst cacheSuffixVersion = '00000018-0.6915162664059634';\nconst CACHE_NAME = prefix + '-v' + cacheSuffixVersion;\nconst PreCachlist = [\n \"/css/style.css\",\n \"/js/app.js\",\n \"/js/search/hexo.js\",\n];\nlet NPMMirror = true;\nconst NPMPackage = \"sinzmise-cetastories\";\nlet NPMPackageVersion = \"latest\";\nlet debug = true;\n// location.hostname == 'localhost' && (debug = true) && (NPMMirror = false);\nconst handleFetch = async (event) => {\n const url = event.request.url;\n if (/nocache/.test(url)) {\n return NetworkOnly(event)\n } else if (/@latest/.test(url)) {\n return CacheFirst(event)\n } else if (/cdnjs\\.cloudflare\\.com/.test(url)) {\n return CacheAlways(event)\n } else if (/music\\.126\\.net/.test(url)) {\n return CacheAlways(event)\n } else if (/qqmusic\\.qq\\.com/.test(url)) {\n return CacheAlways(event)\n } else if (/jsdelivr\\.net/.test(url)) {\n return CacheAlways(event)\n } else if (/npm\\.elemecdn\\.com/.test(url)) {\n return CacheAlways(event)\n } else if (/unpkg\\.com/.test(url)) {\n return CacheAlways(event)\n } else if (/.*\\.(?:png|jpg|jpeg|svg|gif|webp|ico|eot|ttf|woff|woff2|mp3)$/.test(url)) {\n return CacheAlways(event)\n } else if (/.*\\.(css|js)$/.test(url)) {\n return CacheAlways(event)\n } else {\n return CacheFirst(event)\n }\n}\nconst cdn = {\n gh: {\n jsdelivr: 'https://cdn.jsdelivr.net/gh',\n fastly: 'https://fastly.jsdelivr.net/gh',\n gcore: 'https://gcore.jsdelivr.net/gh',\n testingcf: 'https://testingcf.jsdelivr.net/gh',\n test1: 'https://test1.jsdelivr.net/gh',\n storisinz: 'https://jsd.cdn.storisinz.site/gh',\n webcache: 'https://code.webcache.cn/gh',\n },\n combine: {\n jsdelivr: 'https://cdn.jsdelivr.net/combine',\n fastly: 'https://fastly.jsdelivr.net/combine',\n gcore: 'https://gcore.jsdelivr.net/combine',\n testingcf: 'https://testingcf.jsdelivr.net/combine',\n test1: 'https://test1.jsdelivr.net/combine',\n storisinz: 'https://jsd.cdn.storisinz.site/combine',\n },\n npm: {\n jsdelivr: 'https://cdn.jsdelivr.net/npm',\n fastly: 'https://fastly.jsdelivr.net/npm',\n gcore: 'https://gcore.jsdelivr.net/npm',\n testingcf: 'https://testingcf.jsdelivr.net/npm',\n test1: 'https://test1.jsdelivr.net/npm',\n unpkg: 'https://unpkg.com',\n eleme: 'https://npm.elemecdn.com',\n storisinz: 'https://jsd.cdn.storisinz.site/npm',\n webcache: 'https://npm.webcache.cn',\n },\n cdnjs: {\n cdnjs: 'https://cdnjs.cloudflare.com/ajax/libs',\n baomitu: 'https://lib.baomitu.com',\n bytedance: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M',\n sustech: 'https://mirrors.sustech.edu.cn/cdnjs/ajax/libs',\n webcache: 'https://cdnjs.webstatic.cn/ajax/libs',\n }\n}\nconst cdn_match_list = []\nfor (const type in cdn) {\n for (const key in cdn[type]) {\n cdn_match_list.push({ type: type, key: cdn[type][key] })\n }\n}\nconst _console = console;\nconst color = {\n black: '#000000',\n red: '#FF0000',\n green: '#008000',\n yellow: '#FFFF00',\n blue: '#0000FF',\n magenta: '#FF00FF',\n cyan: '#00FFFF',\n white: '#FFFFFF',\n};\nconst add = (...arr) => {\n let fi = [\n []\n ];\n for (let key = 0; key < arr.length; key++) {\n const [first, ...other] = arr[key];\n fi[0] += first;\n fi = fi.concat(other);\n }\n return fi;\n};\nconst createlog = (util) => (...args) => {\n // const fun = _console[util] ? _console[util] : _console.log;\n const fun = util == \"error\" ? _console[util] : _console.log;\n fun.apply(void 0, args);\n};\nconst creategroup = (util) => (...args) => {\n const fun = _console.groupCollapsed;\n fun.apply(void 0, args);\n};\nconst colorUtils = {\n bold: (str) => {\n if (typeof str === 'string' || typeof str === 'number') {\n return `${str};font-weight: bold;`;\n }\n for (let key = 1; key < str.length; key++) {\n str[key] += `;font-weight: bold;`;\n }\n return str;\n }\n};\nconst colorHash = {\n log: 'black',\n wait: 'cyan',\n error: 'red',\n warn: 'yellow',\n ready: 'green',\n info: 'blue',\n event: 'magenta',\n};\nconst createChalk = (name) => (...str) => {\n if (typeof str[0] === 'object') {\n createlog(name)(...add(colorUtils.bold(colorUtils[colorHash[name]](`[${firstToUpperCase(name)}] `)), ...str));\n return;\n }\n let strArr = str;\n if (typeof str === 'string' || typeof str === 'number') {\n strArr = colorUtils[colorHash[name]](str);\n }\n createlog(name)(...add(colorUtils.bold(colorUtils[colorHash[name]](`[${firstToUpperCase(name)}] `)), strArr));\n};\nconst createChalkBg = (name) => (...str) => {\n if (typeof str[0] === 'object') {\n createlog(name)(...add(colorUtils.bold(colorUtils[`bg${firstToUpperCase(colorHash[name])}`](`[${firstToUpperCase(name)}] `)), ...str));\n return;\n }\n let strArr = str;\n if (typeof str === 'string' || typeof str === 'number') {\n strArr = colorUtils[colorHash[name]](str);\n }\n createlog(name)(...add(colorUtils.bold(colorUtils[`bg${firstToUpperCase(colorHash[name])}`](`[${firstToUpperCase(name)}] `)), strArr));\n};\nconst createChalkGroup = (name) => (...str) => {\n if (typeof str[0] === 'object') {\n creategroup(name)(...add(colorUtils.bold(colorUtils[colorHash[name]](`[${firstToUpperCase(name)}] `)), ...str));\n return;\n }\n let strArr = str;\n if (typeof str === 'string' || typeof str === 'number') {\n strArr = colorUtils[colorHash[name]](str);\n }\n creategroup(name)(...add(colorUtils.bold(colorUtils[colorHash[name]](`[${firstToUpperCase(name)}] `)), strArr));\n};\nconst chalk = {\n group: {\n end: _console.groupEnd\n },\n bg: {}\n};\nObject.keys(colorHash).forEach(key => {\n chalk[key] = createChalk(key);\n chalk.group[key] = createChalkGroup(key);\n chalk.bg[key] = createChalkBg(key);\n});\nconst firstToUpperCase = (str) => str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase());\nObject.keys(color).forEach(key => {\n colorUtils[key] = (str) => {\n if (typeof str === 'string' || typeof str === 'number') {\n return [`%c${str}`, `color:${color[key]}`];\n }\n for (let i = 1; i < str.length; i++) {\n str[i] += `;color:${color[key]}`;\n }\n return str;\n };\n colorUtils[`bg${firstToUpperCase(key)}`] = (str) => {\n if (typeof str === 'string' || typeof str === 'number') {\n return [`%c${str}`, `padding: 2px 4px; border-radius: 3px; color: ${key === 'white' ? '#000' : '#fff'}; font-weight: bold; background:${color[key]};`];\n }\n for (let i = 1; i < str.length; i++) {\n str[i] += `;padding: 2px 4px; border-radius: 3px; font-weight: bold; background:${color[key]};`;\n }\n return str;\n };\n});\nself.logger = {\n add,\n ...chalk,\n ...colorUtils,\n};\n\nif (!debug) {\n logger = {\n log: () => { },\n wait: () => { },\n error: () => { },\n warn: () => { },\n ready: () => { },\n info: () => { },\n event: () => { },\n group: {\n log: () => { },\n wait: () => { },\n error: () => { },\n warn: () => { },\n ready: () => { },\n info: () => { },\n event: () => { },\n end: () => { },\n },\n bg: {\n log: () => { },\n wait: () => { },\n error: () => { },\n warn: () => { },\n ready: () => { },\n info: () => { },\n event: () => { },\n }\n };\n console.log = () => { };\n}\n\nconst generate_uuid = () => {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nself.db = {\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}\nconst compareVersion = (a, b) => {\n let v1 = a.split('.');\n let v2 = b.split('.');\n const len = Math.max(v1.length, v2.length);\n while (v1.length < len) {\n v1.push('0');\n }\n while (v2.length < len) {\n v2.push('0');\n }\n for (let i = 0; i < len; i++) {\n const num1 = parseInt(v1[i]);\n const num2 = parseInt(v2[i]);\n if (num1 > num2) {\n return a;\n } else if (num1 < num2) {\n return b;\n }\n }\n return a;\n}\n\nconst mirrors = [\n `https://registry.npmjs.org/${NPMPackage}/latest`,\n `https://registry.npmmirror.com/${NPMPackage}/latest`,\n `https://mirrors.cloud.tencent.com/npm/${NPMPackage}/latest`\n]\nconst getLocalVersion = async () => {\n NPMPackageVersion = await db.read('blog_version') || NPMPackageVersion\n logger.bg.info(`Local Version: ${NPMPackage}@${NPMPackageVersion}`)\n}\nlet mirror_time = 0;\nconst setNewestVersion = async () => {\n if (!NPMMirror) {\n return\n }\n let f = null;\n if (!(mirror_time % (mirrors.length + 1))) {\n f = FetchEngine(mirrors);\n } else {\n f = fetch(mirrors[(mirror_time % (mirrors.length + 1)) - 1]);\n }\n mirror_time++;\n return f\n .then(res => res.json())\n .then(async res => {\n if (!res.version) throw ('No Version Found!')\n NPMPackageVersion = compareVersion(res.version, await db.read('blog_version') || NPMPackageVersion)\n logger.bg.ready(`${NPMPackage}@${NPMPackageVersion}`)\n await db.write('blog_version', NPMPackageVersion)\n })\n .catch(error => {\n logger.error('[Set Newest Version] ' + (error.stack || error))\n })\n}\nsetInterval(async () => {\n await setNewestVersion()\n}, 60 * 1000);\nsetTimeout(async () => {\n await setNewestVersion()\n}, 5000)\nconst installFunction = async () => {\n await getLocalVersion();\n return caches.open(CACHE_NAME + \"-precache\")\n .then(async function (cache) {\n if (!await db.read('uuid')) {\n await db.write('uuid', generate_uuid())\n }\n if (PreCachlist.length) {\n logger.group.event(`Precaching ${PreCachlist.length} files.`);\n let index = 0;\n PreCachlist.forEach(function (url) {\n cache.match(new Request(url)).then(function (response) {\n if (response) {\n logger.ready(`Precaching ${url}`);\n } else {\n logger.wait(`Precaching ${url}`);\n cache.add(new Request(url));\n }\n index++;\n if (index === PreCachlist.length) {\n logger.ready(`Precached ${PreCachlist.length} files.`);\n logger.group.end();\n }\n })\n })\n }\n }).catch((error) => {\n logger.error('[install] ' + (error.stack || error));\n })\n}\nself.addEventListener('install', async function (event) {\n logger.bg.event(\"service worker install event listening\");\n try {\n self.skipWaiting();\n event.waitUntil(installFunction());\n logger.bg.ready('service worker install sucess!');\n } catch (error) {\n logger.error('[install] ' + (error.stack || error));\n }\n});\nself.addEventListener('activate', async event => {\n logger.bg.event(\"service worker activate event listening\");\n try {\n event.waitUntil(\n caches.keys().then((keys) => {\n return Promise.all(keys.map((key) => {\n if (!key.includes(cacheSuffixVersion)) {\n caches.delete(key);\n logger.bg.ready('Deleted Outdated Cache: ' + key);\n }\n }));\n }).catch((error) => {\n logger.error('[activate] ' + (error.stack || error));\n })\n );\n await self.clients.claim()\n logger.bg.ready('service worker activate sucess!');\n } catch (error) {\n logger.error('[activate] ' + (error.stack || error));\n }\n})\nself.addEventListener('fetch', async event => {\n event.respondWith(\n handleFetch(event).catch((error) => {\n logger.error('[fetch] ' + event.request.url + '\\n[error] ' + (error.stack || error));\n })\n )\n});\n\n\nconst NetworkOnly = async (event) => {\n logger.group.info('NetworkOnly: ' + new URL(event.request.url).pathname);\n logger.wait('service worker fetch: ' + event.request.url)\n logger.group.end();\n return fetch(event.request)\n}\nconst CacheFirst = async (event) => {\n return caches.match(event.request).then(function (resp) {\n logger.group.info('CacheFirst: ' + new URL(event.request.url).pathname);\n logger.wait('service worker fetch: ' + event.request.url)\n if (resp) {\n logger.group.ready(`Cache Hit`);\n console.log(resp)\n logger.group.end();\n logger.group.end();\n event.waitUntil(CacheRuntime(event.request))\n return resp;\n } else {\n logger.warn(`Cache Miss`);\n logger.group.end();\n return CacheRuntime(event.request)\n }\n })\n}\nconst CacheAlways = async (event) => {\n return caches.match(event.request).then(function (resp) {\n logger.group.info('CacheAlways: ' + new URL(event.request.url).pathname);\n logger.wait('service worker fetch: ' + event.request.url)\n if (resp) {\n logger.group.ready(`Cache Hit`);\n console.log(resp)\n logger.group.end();\n logger.group.end();\n return resp;\n } else {\n logger.warn(`Cache Miss`);\n logger.group.end();\n return CacheRuntime(event.request)\n }\n })\n}\n\nconst matchCache = async (event) => {\n return caches.match(event.request).then(function (resp) {\n logger.group.info('service worker fetch: ' + event.request.url)\n if (resp) {\n logger.group.ready(`Cache Hit`);\n console.log(resp)\n logger.group.end();\n logger.group.end();\n return resp;\n } else {\n logger.warn(`Cache Miss`);\n logger.group.end();\n return CacheRuntime(event.request)\n }\n })\n}\nasync function CacheRuntime(request) {\n const url = new URL(request.url);\n let response = await matchCDN(request);\n if (!response) {\n response = await fetch(request).catch(() => null)\n }\n logger.group.event(`Cache Runtime ${url.pathname}`);\n logger.wait(`Caching url: ${request.url}`);\n console.log(response);\n\n if (request.method === \"GET\" && (url.protocol == \"https:\")) {\n const cache = await caches.open(CACHE_NAME + \"-runtime\");\n cache.put(request, response.clone()).catch(error => {\n logger.error('[Cache Runtime] ' + (error.stack || error));\n if (error.name === 'QuotaExceededError') {\n caches.delete(CACHE_NAME + \"-runtime\");\n logger.ready(\"deleted cache\")\n }\n })\n logger.ready(`Cached url: ${request.url}`);\n } else {\n logger.warn(`Not Cached url: ${request.url}`);\n }\n logger.group.end();\n return response;\n}\n\nconst matchCDN = async (req) => {\n const nav = navigator\n const { saveData, effectiveType } = nav.connection || nav.mozConnection || nav.webkitConnection || {}\n if (saveData || /2g/.test(effectiveType)) {\n logger.warn(\"Slow Network: Transparent Proxy\");\n return fetch(req);\n }\n const urls = []\n let urlObj = new URL(req.url)\n let pathType = urlObj.pathname.split('/')[1]\n let pathTestRes = \"\";\n\n if (NPMMirror && new RegExp(location.origin).test(req.url)) {\n logger.group.ready(`Match NPM Mirror: ` + req.url);\n for (const key in cdn.npm) {\n let url = cdn.npm[key] + \"/\" + NPMPackage + \"@\" + NPMPackageVersion + req.url.replace(location.origin, '')\n url = fullPath(fullPath(url))\n console.log(url);\n urls.push(url)\n }\n logger.group.end()\n }\n if (!urls.length) {\n for (const item of cdn_match_list) {\n if (new RegExp(item.key).test(req.url)) {\n pathType = item.type\n pathTestRes = new RegExp(item.key).exec(req.url)[0]\n break;\n }\n }\n for (const type in cdn) {\n if (type === pathType) {\n logger.group.ready(`Match CDN ${pathType}: ` + req.url);\n for (const key in cdn[type]) {\n const url = cdn[type][key] + req.url.replace(pathTestRes, '')\n console.log(url);\n urls.push(url)\n }\n logger.group.end()\n }\n }\n }\n\n let res;\n if (urls.length)\n res = FetchEngine(urls)\n else\n res = fetch(req)\n if (res && NPMMirror && new RegExp(location.origin).test(req.url)) {\n const ext = fullPath(fullPath(req.url)).split('.').pop()\n const contentType = getContentType(ext)\n res = res\n .then(res => res.arrayBuffer())\n .then(buffer => new Response(buffer, {\n headers: {\n \"Content-Type\": contentType\n }\n }))\n .catch(() => null)\n }\n return res\n}\n\nconst fullPath = (url) => {\n url = url.split('?')[0].split('#')[0]\n if (url.endsWith('/')) {\n url += 'index.html'\n } else {\n const list = url.split('/')\n const last = list[list.length - 1]\n if (last.indexOf('.') === -1) {\n url += '.html'\n }\n }\n return url\n}\nasync function progress(res) {\n return new Response(await res.arrayBuffer(), {\n status: res.status,\n headers: res.headers\n })\n}\n\nfunction createPromiseAny() {\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((p) => {\n if (p instanceof Promise) {\n p.then(\n (res) => resolve(res),\n (err) => {\n len--\n errs.push(err)\n if (len === 0) reject(new AggregateError(errs))\n }\n )\n } else {\n reject(p)\n }\n })\n })\n }\n}\n\nfunction fetchAny(reqs) {\n const controller = new AbortController()\n\n return reqs.map(req => {\n return new Promise((resolve, reject) => {\n fetch(req, {\n signal: controller.signal\n })\n .then(progress)\n .then(res => {\n controller.abort()\n if (res.status !== 200)\n reject(null)\n else\n resolve(res)\n })\n .catch(() => reject(null))\n })\n })\n}\n\nfunction fetchParallel(reqs) {\n const abortEvent = new Event(\"abortOtherInstance\")\n const eventTarget = new EventTarget();\n\n return reqs.map(async req => {\n const controller = new AbortController();\n let tagged = false;\n eventTarget.addEventListener(abortEvent.type, () => {\n if (!tagged) controller.abort();\n })\n return new Promise((resolve, reject) => {\n fetch(req, {\n signal: controller.signal,\n }).then(res => {\n tagged = true;\n eventTarget.dispatchEvent(abortEvent)\n if (res.status !== 200)\n reject(null)\n else\n resolve(res)\n }).catch(() => reject(null))\n })\n });\n}\n\nconst FetchEngine = (reqs) => {\n if (!Promise.any) createPromiseAny();\n return Promise.any(fetchParallel(reqs)).then(res => res)\n .catch((e) => {\n if (e == \"AggregateError: All promises were rejected\") {\n return Promise.any(fetchAny(reqs))\n .then((res) => res)\n .catch(() => null);\n }\n return null;\n });\n};\n\nconst getContentType = (ext) => {\n switch (ext) {\n case 'js':\n return 'text/javascript'\n case 'html':\n return 'text/html'\n case 'css':\n return 'text/css'\n case 'json':\n return 'application/json'\n case 'webp':\n return 'image/webp'\n case 'jpg':\n return 'image/jpg'\n case 'jpeg':\n return 'image/jpeg'\n case 'png':\n return 'image/png'\n case 'gif':\n return 'image/gif'\n case 'xml':\n return 'text/xml'\n case 'xsl':\n return 'text/xml'\n case 'webmanifest':\n return 'text/webmanifest'\n case 'map':\n return 'application/json'\n case 'bcmap':\n return 'image/vnd.wap.wbmp'\n case 'wbmp':\n return 'image/vnd.wap.wbmp'\n case 'bmp':\n return 'image/bmp'\n case 'ico':\n return 'image/vnd.microsoft.icon'\n case 'tiff':\n return 'image/tiff'\n case 'tif':\n return 'image/tiff'\n case 'svg':\n return 'image/svg+xml'\n case 'svgz':\n return 'image/svg+xml'\n case 'woff':\n return 'application/font-woff'\n case 'woff2':\n return 'application/font-woff2'\n case 'ttf':\n return 'application/font-ttf'\n case 'otf':\n return 'application/font-otf'\n case 'eot':\n return 'application/vnd.ms-fontobject'\n case 'zip':\n return 'application/zip'\n case 'tar':\n return 'application/x-tar'\n case 'gz':\n return 'application/gzip'\n case 'bz2':\n return 'application/x-bzip2'\n case 'rar':\n return 'application/x-rar-compressed'\n case '7z':\n return 'application/x-7z-compressed'\n case 'doc':\n return 'application/msword'\n case 'docx':\n return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n case 'xls':\n return 'application/vnd.ms-excel'\n case 'xlsx':\n return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n case 'ppt':\n return 'application/vnd.ms-powerpoint'\n case 'pptx':\n return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'\n case 'pdf':\n return 'application/pdf'\n case 'txt':\n return 'text/plain'\n case 'rtf':\n return 'application/rtf'\n case 'mp3':\n return 'audio/mpeg'\n case 'wav':\n return 'audio/x-wav'\n case 'ogg':\n return 'audio/ogg'\n case 'mp4':\n return 'video/mp4'\n case 'm4v':\n return 'video/x-m4v'\n case 'mov':\n return 'video/quicktime'\n case 'avi':\n return 'video/x-msvideo'\n case 'wmv':\n return 'video/x-ms-wmv'\n case 'flv':\n return 'video/x-flv'\n case 'swf':\n return 'application/x-shockwave-flash'\n case 'mpg':\n return 'video/mpeg'\n case 'mpeg':\n return 'video/mpeg'\n case 'mpe':\n return 'video/mpeg'\n case 'mpv':\n return 'video/mpeg'\n case 'm2v':\n return 'video/mpeg'\n case 'm4a':\n return 'audio/mp4'\n case 'aac':\n return 'audio/aac'\n case 'm3u':\n return 'audio/x-mpegurl'\n case 'm3u8':\n return 'application/vnd.apple.mpegurl'\n case 'pls':\n return 'audio/x-scpls'\n case 'cue':\n return 'application/x-cue'\n case 'wma':\n return 'audio/x-ms-wma'\n case 'flac':\n return 'audio/flac'\n case 'aif':\n return 'audio/x-aiff'\n case 'aiff':\n return 'audio/x-aiff'\n case 'aifc':\n return 'audio/x-aiff'\n case 'au':\n return 'audio/basic'\n case 'snd':\n return 'audio/basic'\n case 'mid':\n return 'audio/midi'\n case 'midi':\n return 'audio/midi'\n case 'kar':\n return 'audio/midi'\n default:\n return 'text/plain'\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,SAAS,OAAO,QAAQ,KACvD,eAAgB,OAAO,IAAI,EAAI,EAAI,EAAI,QAAQ,EAAI,EAAI,EAAI,IAAI,MAAM,KAAK,MAAM,KAAK,YAAY,KAAK,OAAO,QAAQ,SAAS,OACvJ,WAAY,WAAW,OAAO,MAAM,IAAI,MAAM,KAAK,YAAY,KAAK,OAAO,EAAE,QAAQ,EAAI,E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AO,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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KC,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\">聊 天</ul><ul class=\"wcc_mlist\" id=\"foods\">吃 零 食</ul><ul class=\"wcc_mlist\" id=\"aboutmanage\">关 于</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"]}
|