PageSourceSearch

https://tudienjp.com/js/chunk-58f0d2c4.de5c64e5.js

js tudienjp.com collected 2026-09-24 13:06:13 UTC 15,919 bytes, 1 lines download raw bytes

1(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58f0d2c4"],{3108:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"col-left"},[a("div",{staticClass:"card mb-2 shadow-sm"},[a("div",{staticClass:"my-2 text-center"},[a("span",{staticClass:"fw-bold"},[a("router-link",{staticClass:"text-decoration-none",attrs:{to:"/word"}},[t._v(t._s(t.$t("word")))]),t._v(" > "+t._s(t.$t("word"))+" N"+t._s(t.level)),t.day?a("span",[t._v(" "+t._s(t.$t("day"))+" "+t._s(t.day))]):t._e(),t._v(" "),t.isLoading?a("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}}):t._e()],1)])]),a("div",{staticClass:"p-3 bg-white border rounded shadow-sm"},[a("div",[a("div",[t.cards.length>0?a("div",{staticClass:"star float-end d-none",on:{click:t.markAll}},[t.isStarAll?a("font-awesome-icon",{staticClass:"cpt",attrs:{icon:t.faStarS,title:t.$t("removeAllStars")}}):a("font-awesome-icon",{staticClass:"cpt",attrs:{icon:t.faStarR,title:t.$t("markAllStars")}})],1):t._e(),a("div",{staticClass:"form-check form-switch"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.isHideMeaning,expression:"isHideMeaning"}],staticClass:"form-check-input",attrs:{type:"checkbox",id:"showMeaning"},domProps:{checked:Array.isArray(t.isHideMeaning)?t._i(t.isHideMeaning,null)>-1:t.isHideMeaning},on:{change:[function(e){var a=t.isHideMeaning,n=e.target,s=!!n.checked;if(Array.isArray(a)){var r=null,i=t._i(a,r);n.checked?i<0&&(t.isHideMeaning=a.concat([r])):i>-1&&(t.isHideMeaning=a.slice(0,i).concat(a.slice(i+1)))}else t.isHideMeaning=s},t.resetHide]}}),a("label",{staticClass:"form-check-label",attrs:{for:"showMeaning"}},[t._v(t._s(t.$t("hideMeaning")))])])]),a("button",{staticClass:"btn btn-secondary w-100 mt-2",attrs:{disabled:0==t.flashCards.length,type:"button","data-bs-toggle":"modal","data-bs-target":"#cardModal"}},[t._v(" "+t._s(t.$t("flashCards"))+" "),a("br"),0==t.flashCards.length?a("span",[t._v(" ("+t._s(t.$t("needStar"))+")")]):a("span",[t._v(" ("+t._s(t.$tc("card",t.flashCards.length,{length:t.flashCards.length}))+")")])])]),t._l(t.showCards,(function(e,n){return a("div",{key:n},[a("div",{staticClass:"border rounded shadow-sm p-2 mt-3"},[a("div",{staticClass:"star float-end"},[e.star?a("font-awesome-icon",{staticClass:"cpt",attrs:{icon:t.faStarS},on:{click:function(a){return t.setStar(e,!1)}}}):a("font-awesome-icon",{staticClass:"cpt",attrs:{icon:t.faStarR},on:{click:function(a){return t.setStar(e,!0)}}})],1),a("div",{staticClass:"row card-content cpt",on:{click:function(a){return t.cardClick(e)}}},[a("div",{staticClass:"right col-sm-12 col-md-4"},[a("div",[a("div",[a("span",{staticClass:"cpt",on:{click:function(e){return e.stopPropagation(),t.speakThis(e)}}},[t._v(t._s(e.k))])]),a("div",[a("span",{staticClass:"cpt",on:{click:function(e){return e.stopPropagation(),t.speakThis(e)}}},[t._v(t._s(e.w))])])])]),a("div",{staticClass:"col-sm-12 col-md-8",class:{"hide-meaning":!(!t.isHideMeaning||e.clicked)&&e.hide,hideTransition:!(!t.isHideMeaning||!e.clicked)&&e.hide}},[a("div",[t._v(t._s(e.value[t.lang]))])])])])])}))],2),a("div",{staticClass:"d-flex justify-content-between mt-2"},[t.day?a("button",{staticClass:"btn btn-outline-success",attrs:{disabled:1==t.day,type:"button"},on:{click:function(e){return t.nextDay(-1)}}},[a("font-awesome-icon",{attrs:{icon:t.faChevronCircleLeft}}),t._v(" "+t._s(t.$t("prev")))],1):t._e(),t.day?a("button",{staticClass:"btn btn-outline-success",attrs:{disabled:t.day==t.maxDay,type:"button"},on:{click:function(e){return t.nextDay(1)}}},[t._v(t._s(t.$t("next"))+" "),a("font-awesome-icon",{attrs:{icon:t.faChevronCircleRight}})],1):t._e()])]),a("div",{staticClass:"modal fade",attrs:{id:"cardModal",tabindex:"-1","aria-hidden":"true"}},[a("div",{staticClass:"modal-dialog modal-xl"},[a("div",{staticClass:"modal-content",on:{mouseup:function(e){return t.stopPopPropagation(e)}}},[a("div",{staticClass:"modal-header"},[a("h5",{staticClass:"modal-title"},[t._v(t._s(t.$t("flashCards")))]),a("button",{staticClass:"btn-close",attrs:{type:"button","data-bs-dismiss":"modal"},on:{click:function(e){t.currentCardIndex=0}}})]),a("div",{staticClass:"modal-body bg-light",staticStyle:{overflow:"hidden"}},[a("div",{staticClass:"w-100",staticStyle:{height:"60vh"}},[a("div",{staticClass:"flash-card-view cpt",class:{flip:t.flip},attrs:{id:"cardViewer"},on:{click:t.flipCard}},[t.flashCards.length>0&&null!=t.currentCardIndex?a("div",{staticClass:"flash-card"},[a("div",{staticClass:"flash-card-front"},[a("div",{staticClass:"position-absolute top-0 end-0 fs-5 star me-3 mt-2",on:{click:function(e){return t.removeStar(e,t.flashCards[t.currentCardIndex])},touchend:function(e){return t.removeStar(e,t.flashCards[t.currentCardIndex])}}},[a("font-awesome-icon",{staticClass:"cpt",attrs:{icon:t.faStarS}}
1)],1),a("div",{staticClass:"card-content position-absolute top-50 start-50 translate-middle",class:{opacityNone:t.opacityNone}},[a("div",{staticClass:"fs-2 text-center"},[a("span",{on:{click:function(e){return e.stopPropagation(),t.speakThis(e)}}},[t._v(t._s(t.flashCards[t.currentCardIndex].k))])]),a("div",{staticClass:"fs-2 text-center"},[a("span",{on:{click:function(e){return e.stopPropagation(),t.speakThis(e)}}},[t._v(t._s(t.flashCards[t.currentCardIndex].w))])])])]),a("div",{staticClass:"flash-card-back"},[a("div",{staticClass:"position-absolute top-0 end-0 fs-5 star me-3 mt-2",on:{click:function(e){return t.removeStar(e,t.flashCards[t.currentCardIndex])},touchend:function(e){return t.removeStar(e,t.flashCards[t.currentCardIndex])}}},[a("font-awesome-icon",{staticClass:"cpt",attrs:{icon:t.faStarS}})],1),a("div",{staticClass:"card-content position-absolute top-50 start-50 translate-middle",class:{opacityNone:t.opacityNone}},[a("p",{staticClass:"fs-3 text-center"},[t._v(t._s(t.flashCards[t.currentCardIndex].value[t.lang]))])])])]):t._e()]),0==t.flashCards.length?a("div",{staticClass:"position-absolute top-50 start-50 translate-middle"},[a("center",[a("p",{staticClass:"fs-1"},[t._v(t._s(t.$t("noFlashcards")))]),a("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-bs-dismiss":"modal"},on:{click:function(e){t.currentCardIndex=0}}},[t._v(t._s(t.$t("close")))])])],1):t._e()]),t.flashCards.length>0?a("div",{staticClass:"mt-3"},[a("div",{staticClass:"d-flex justify-content-center m-2"},[a("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:t.prevCard}},[a("font-awesome-icon",{attrs:{icon:t.faBackward}})],1),a("div",{staticClass:"mx-3 fs-4 text-center"},[t._v(" "+t._s(t.currentCardIndex+1)+" / "+t._s(t.flashCards.length))]),a("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:t.nextCard}},[a("font-awesome-icon",{attrs:{icon:t.faForward}})],1)]),a("div",{staticClass:"d-flex justify-content-center m-2"},[a("div",{staticClass:"form-check"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.answerFirst,expression:"answerFirst"}],staticClass:"form-check-input",attrs:{type:"checkbox",id:"cardBacksFirst"},domProps:{checked:Array.isArray(t.answerFirst)?t._i(t.answerFirst,null)>-1:t.answerFirst},on:{change:function(e){var a=t.answerFirst,n=e.target,s=!!n.checked;if(Array.isArray(a)){var r=null,i=t._i(a,r);n.checked?i<0&&(t.answerFirst=a.concat([r])):i>-1&&(t.answerFirst=a.slice(0,i).concat(a.slice(i+1)))}else t.answerFirst=s}}}),a("label",{staticClass:"form-check-label",attrs:{for:"cardBacksFirst"}},[t._v(" "+t._s(t.$t("showAnswerFirst"))+" ")])])])]):t._e()])])])]),a("div",{staticClass:"col-right"},[a("ad-col-right")],1)])},s=[],r=a("1da1"),i=(a("96cf"),a("d3b7"),a("3ca3"),a("ddb0"),a("4de4"),a("ac1f"),a("5319"),a("d81d"),a("498a"),a("fb6a"),a("99af"),a("159b"),a("6fb9")),c=a("bc3a"),o=a.n(c),d=a("2fec"),l=a("ad3d"),u=a("c074"),h=a("b702"),f=Object(i["b"])("s","d"),p=function(){return a.e("chunk-2d0c22d8").then(a.t.bind(null,"48ca",3))},v=function(){return a.e("chunk-2d20ec4f").then(a.t.bind(null,"b17a",3))},m=function(){return a.e("chunk-2d0e449d").then(a.t.bind(null,"901a",3))},C=function(){return a.e("chunk-2d0e8dd1").then(a.t.bind(null,"8aa3",3))},w=function(){return a.e("chunk-2d213e69").then(a.t.bind(null,"af3a",3))},g={name:"List",components:{AdColRight:function(){return a.e("chunk-356588a8").then(a.bind(null,"9d16"))},FontAwesomeIcon:l["a"]},computed:{lang:{get:function(){return this.$root.$i18n.locale}},showCards:function(){return this.cards},flashCards:function(){return this.cards.filter((function(t){return 1==t.star}))}},data:function(){return{isLoading:!0,level:5,day:0,perDay:10,allData:[],maxDay:1,isHideMeaning:!1,cards:[],isStarAll:!1,currentCardIndex:null,answerFirst:!1,flip:!1,initialX:null,opacityNone:!1,faChevronCircleLeft:u["j"],faChevronCircleRight:u["k"],faStarS:u["hb"],faBackward:u["e"],faForward:u["F"],faStarR:h["n"]}},mounted:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.level=t.$route.query.jlpt,t.day=t.$route.query.day,t.perDay=t.$route.query.perday,5==t.level?p().then((function(e){t.load(e.default)})):4==t.level?v().then((function(e){t.load(e.default)})):3==t.level?m().then((function(e){t.load(e.default)})):2==t.level?C().then((function(e){t.load(e.default)})):1==t.level?w().then((function(e){t.load(e.default)})):t.$router.replace("/not-found");case 4:case"end":return e.stop()}}),e)})))()},destroyed:function(){window.removeEventListener("beforeunload",this.beforeunload,!1),window.removeEventListener("scroll",this.onkeyup,!1);var t=document.getElementById("cardViewer");t.removeEventListener("touchstart",this.handleTouchStart,!1),t.removeEventListener("touchend",this.handleTouchEnd,!1)},watch:{answerFirst:function(){this.flip=this.answerFirst}},methods:{cardClick:function(t){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!e.isHideMeaning){a.next=5;break}t.clicked=!0,t.hide=!t.hide,a.next=9;break;case 5:return a.next=7,e.$store.dispatch("getSearchData",{type:"wd",data:t.id});case 7:n=a.sent,!1===n?e.$store.commit("setAlert",{title:e.$t("error"),content:e.$t("notConnect")}):e.$parent.showModalCurrent("word",n);case 9:case"end":return a.stop()}}),a)})))()},speakThis:function(t){this.$parent.speak(t,t.target.innerText)},load:function(t){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.allData=t.map((function(t){return{key:(t.k+"\n"+t.w).trim(),id:t.id,k:t.k,w:t.w,value:{en:t.en,vi:t.vi},star:!1,clicked:!1,hide:!0}}
1)),e.maxDay=Math.ceil(e.allData.length/e.perDay),a.next=4,e.loadData();case 4:window.addEventListener("beforeunload",e.beforeunload,!1),document.body.addEventListener("keyup",e.onkeyup,!1),n=document.getElementById("cardViewer"),n.addEventListener("touchstart",e.handleTouchStart,!1),n.addEventListener("touchend",e.handleTouchEnd,!1);case 9:case"end":return a.stop()}}),a)})))()},loadData:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a,n,s,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,t.day&&t.perDay?(t.day=parseInt(t.day),t.perDay=parseInt(t.perDay),t.cards=t.allData.slice((t.day-1)*t.perDay,t.day*t.perDay)):t.cards=t.allData,a="".concat(t.$t("word")," N").concat(t.level),t.day&&(a+=" ".concat(t.$t("day")," ").concat(t.day)),setTimeout((function(){document.title=a}),100),n=!1,e.next=8,Object(i["g"])(t.cards.map((function(t){return"sw".concat(t.key.trim())})),f);case 8:for(s=e.sent,r=0;r<t.cards.length;r++)void 0!=s[r]?t.cards[r].star=!0:n=!0;t.isStarAll=!n,t.currentCardIndex=0,t.isLoading=!1;case 13:case"end":return e.stop()}}),e)})))()},nextDay:function(t){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.day+=t,a.next=3,e.loadData();case 3:e.$router.replace({query:{type:"word",jlpt:e.level,perday:e.perDay,day:e.day}}).catch((function(){})),n=localStorage.getItem("wCurr"),n&&(n=JSON.parse(n),n[parseInt(e.level)-1]=e.day*e.perDay,localStorage.setItem("wCurr",JSON.stringify(n)));case 6:case"end":return a.stop()}}),a)})))()},setStar:function(t,e){t.star=e;var a=t.key;if(a="sw".concat(a.trim()),e){var n=t.value[this.lang];n="".concat(Math.floor(Date.now()/1e3),"|").concat(n,"|").concat(t.id).trim(),Object(i["h"])(a,n,f),localStorage.setItem("localTimestamp",(new Date).getTime())}else Object(i["c"])(a,f),localStorage.setItem("localTimestamp",(new Date).getTime())},getData:function(t){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var n,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n="/assets/list/"+t+".json",a.prev=1,a.next=4,o.a.get(n);case 4:return s=a.sent,a.abrupt("return",s.data);case 8:return a.prev=8,a.t0=a["catch"](1),e.$router.replace("/not-found"),a.abrupt("return",[]);case 12:case"end":return a.stop()}}),a,null,[[1,8]])})))()},prevCard:function(){var t=this;this.opacityNone=!0,this.flip=this.answerFirst,this.currentCardIndex>0?this.currentCardIndex--:this.currentCardIndex=this.flashCards.length-1,setTimeout((function(){t.opacityNone=!1}),200)},nextCard:function(){var t=this;this.opacityNone=!0,this.flip=this.answerFirst,this.currentCardIndex<this.flashCards.length-1?this.currentCardIndex++:this.currentCardIndex=0,setTimeout((function(){t.opacityNone=!1}),200)},flipCard:function(){this.flip=!this.flip},onkeyup:function(t){switch(t.key){case"ArrowDown":case"ArrowUp":case" ":this.flipCard();break;case"ArrowLeft":this.prevCard();break;case"ArrowRight":this.nextCard();break}},handleTouchStart:function(t){this.initialX=t.touches[0].clientX,t.preventDefault()},handleTouchEnd:function(t){if(null!==this.initialX){var e=t.changedTouches[0].clientX,a=e-this.initialX,n=document.getElementById("cardViewer"),s=n.offsetWidth,r=a/s;Math.abs(r)>=.1?r>=.1?(n.style.transform=null,this.prevCard(),t.preventDefault()):r<=-.1&&(n.style.transform=null,this.nextCard(),t.preventDefault()):this.flipCard(),this.initialX=null}},resetHide:function(){for(var t=this.cards.length,e=0;e<t;e++)this.cards[e].clicked=!1,this.cards[e].hide=!0},markAll:function(){var t=this;this.isStarAll=!this.isStarAll,this.cards.forEach((function(e,a,n){n[a].star=t.isStarAll})),this.cards.forEach((function(e){t.setStar(e,t.isStarAll)}))},removeStar:function(t,e){var a=this;this.opacityNone=!0,this.currentCardIndex==this.flashCards.length-1&&this.currentCardIndex>0&&this.currentCardIndex--,this.setStar(e,!1),this.flip=this.answerFirst,setTimeout((function(){a.opacityNone=!1}),200),t.stopPropagation()},stopPopPropagation:function(t){t.stopPropagation()}},i18n:{messages:{vi:{day:"ngày",hideMeaning:"Ẩn nghĩa (Click để hiển thị)",removeAllStars:"Bỏ chọn tất cả sao",markAllStars:"Đánh sao cho tất cả",removeItem:"Xóa {count} thẻ đã bỏ sao",flashCards:"Thẻ ghi nhớ",showAnswerFirst:"Hiển thị trả lời trước",noFlashcards:"Đã học hết các thẻ!",needStar:"Cần đánh sao ít nhất 1 thẻ",card:"{length} thẻ",next:"Tiếp",prev:"Trước"},en:{day:"day",hideMeaning:"Hide meaning (Click to show)",removeAllStars:"Mark all as unstarred",markAllStars:"Mark all as starred",removeItem:"Remove {count} unstarred card | Remove {count} unstarred cards",flashCards:"Flashcards",showAnswerFirst:"Show answer first",noFlashcards:"Learned all flashcards!",needStar:"Need to star at least 1 card",card:"{length} card | {length} cards",next:"Next",prev:"Prev"}},sharedMessages:d["a"]}},y=g,b=(a("43ff"),a("2877")),k=Object(b["a"])(y,n,s,!1,null,"2e19294f",null);e["default"]=k.exports},"43ff":function(t,e,a){"use strict";a("da74")},da74:function(t,e,a){}}]);

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.