1"use strict";(self.tcthemejsonpFunction=self.tcthemejsonpFunction||[]).push([[1761],{5657(e,t,i){var a=i(1919),r=i.n(a),n=i(8972),s=i(8373),l=i(4692);const{QJ:c,_k:h}=n.iW;r().templateSettings=h;class o{constructor(){this.$container=l(".m-archive"),this.$options=this.$container.find(".m-archive--listItem a"),this.direction="undefined"==typeof archiveDirection||null===archiveDirection||""===archiveDirection?"ascending":archiveDirection,this.noDate="no-date",l.getJSON(archiveJSONFile).done(e=>{this.initialize(e)}).fail(()=>{this.error("news archive json file error")})}error(e){console.log(e)}initialize(e){const t=this.getMonthYearList(e);this.render(t),this.bindEvents()}getMonthYearList(e){return"ascending"===this.direction?this.arrayObj(this.createMonthYearObject(e)):this.arrayReverseObj(this.createMonthYearObject(e))}createMonthYearObject(e){let t={};return e.forEach(e=>{if(e.date.length){let i=(0,n.w$)(e.date,"DD/MM/YYYY"),a=i.format("YYYY"),r=i.format("MM"),s=i.format("MMMM"),l=a+r,c=e.year+"-"+e.month_name;t[l]={month:s,year:a,key:c}}else t[this.noDate]={month:archiveNoDate,year:"",key:this.noDate}}),t}arrayObj(e){return Object.keys(e).sort().map(t=>({k:t,v:e[t]}))}arrayReverseObj(e){return Object.keys(e).sort().reverse().map(t=>({k:t,v:e[t]}))}render(e){const t={archiveFilterBy};let i,a=window.location.href;a=a.substring(0,a.lastIndexOf("/")),i=l("body").hasClass("g_blog-detail")?`<ul class="m-archive--list">\n [%~it.${archivePage.name} :${archivePage.list}%]\n <li class="m-archive--listItem">\n <a class="" \n href="${a}" \n role="button" \n aria-pressed="false"\n aria-label="[%= it.locales.archiveFilterBy%] [%= ${archivePage.list}.v.month%] [%= ${archivePage.list}.v.year%]"\n data-key="[%=${archivePage.list}.v.key%]" \n >\n [%= ${archivePage.list}.v.month%] [%= ${archivePage.list}.v.year%]\n </a>\n </li>\n [%~%]\n </ul>`:`<ul class="m-archive--list">\n [%~it.${archivePage.name} :${archivePage.list}%]\n <li class="m-archive--listItem">\n <a class="" \n href="#" \n role="button" \n aria-pressed="false"\n aria-label="[%= it.locales.archiveFilterBy%] [%= ${archivePage.list}.v.month%] [%= ${archivePage.list}.v.year%]"\n data-key="[%=${archivePage.list}.v.key%]" \n >\n [%= ${archivePage.list}.v.month%] [%= ${archivePage.list}.v.year%]\n </a>\n </li>\n [%~%]\n </ul>`;let n=r().template(i);l(".m-archive").append(n({[archivePage.name]:e,locales:t})),null!==localStorage.getItem("archive")&&this.detailArchiveFilter()}bindEvents(){const e=this.getOptions();l(e,this.$container).on("click keydown",e=>{l("body").hasClass("g_blog-detail")?(localStorage.setItem("archive",e.target.dataset.key),this.detailArchiveFilter()):this.filter(e)})}getOptions(){return this.$container.find(".m-archive--listItem a")}detailArchiveFilter(){l.getJSON(archiveJSONFile).catch(()=>{this.error("news archive fetch data")}).then(e=>{let t=localStorage.getItem("archive"),i=l(".js-filter-container"),a=this.getEntriesTemplate(i),r=i.find(".js-filter-results"),n=this.filterEntries(e,t);r.html((0,s.H)(a({items:n}))),this.scrollMovement(r),localStorage.removeItem("archive")})}filter(e){c.checkClick(e)&&(e.preventDefault(),l.getJSON(archiveJSONFile).catch(()=>{this.error("news archive fetch data")}).then(t=>{this.getOptions().attr("aria-pressed","false");const i=l(e.target);i.attr("aria-pressed","true");let a=i.data("key"),r=l(".js-filter-container"),n=this.getEntriesTemplate(r),c=r.find(".js-filter-results"),h=this.filterEntries(t,a);c.html((0,s.H)(n({items:h}))),this.scrollMovement(c)}))}filterEntries(e,t){return e.filter(e=>{let i=""!==e.date.trim()?e.year+"-"+e.month_name:this.noDate;return t===i})}getEntriesTemplate(e){return e.find(".js-filter-template").length?r().template(e.find(".js-filter-template").html()):""}scrollMovement(e){let t=document.documentElement.scrollTop||document.body.scrollTop,i=e.offset().top-130;Math.abs(i-t)>300&&l("html, body").animate({scrollTop:i},300)}}const v={init:function(){new o}};i.d(t,["default",0,v])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.