theme/thudao-footer.kho.js · Gộp lại: student-reward-core.min.js

/* KHO-GOP {"v":1,"anchor":"kho-chan-trang","shared":true,"files":[{"p":"student-reward-core.css","id":"6653216784311561367"},{"p":"student-reward-core.min.js","id":"1295908993175150382"},{"p":"minh-hong/minh-hong-footer.css","id":"562461655111861796"},{"p":"minh-hong/minh-hong-footer.min.js","id":"5263341143371118914"}]} */
/* File gộp do trang quản lý kho tạo. ĐỪNG sửa tay file này: sửa file gốc rồi bấm "Gộp lại". */
(function(){var d=document,a=d.getElementById("kho-chan-trang");function put(e){if(a&&a.parentNode)a.parentNode.insertBefore(e,a);else(d.head||d.body||d.documentElement).appendChild(e)}function css(p,t){if(d.querySelector('style[data-kho="'+p+'"]'))return;var s=d.createElement("style");s.setAttribute("data-kho",p);s.textContent=t;put(s)}function js(p,t){var s=d.createElement("script");s.setAttribute("data-kho",p);s.text=t+"\n//# sourceURL=kho/"+p;put(s)}
css("student-reward-core.css","/* =========================================================\n   STUDENT REWARD SYSTEM CORE v3.6.0\n   CSS DÙNG CHUNG TOÀN WEBSITE\n\n   v3.6.0\n   ---------------------------------------------------------\n   KHO VẬT PHẨM HỢP NHẤT:\n   - PhieuDoi\n   - Quà Hộp bí ẩn\n   - QuaTangGVCN\n\n   LINH THẠCH HỢP NHẤT:\n   - Linh thạch học tập\n   - Linh thạch đổi từ Chợ phiên\n   - Linh thạch từ Hộp bí ẩn\n   - Linh thạch GVCN tặng\n\n   TẤT CẢ CHẠY QUA CÙNG normalizeGemBalance()\n========================================================= */\n\n\n/* =========================================================\n   THUỐC ĐA NHIỆM\n========================================================= */\n\n.reward-multitask-wrap{\n    position:relative;\n    display:inline-flex;\n    align-items:center;\n    max-width:100%;\n}\n\n.reward-multitask-name{\n    position:relative;\n    color:#f59e0b !important;\n\n    animation:\n        rewardMultitaskColor 2.8s linear infinite,\n        rewardMultitaskGlow 1.6s ease-in-out infinite alternate;\n}\n\n.reward-multitask-star{\n    position:absolute;\n    z-index:30;\n    pointer-events:none;\n    user-select:none;\n    line-height:1;\n    color:#fff;\n\n    text-shadow:\n        0 0 4px rgba(255,255,255,.9),\n        0 0 8px rgba(251,191,36,.9);\n\n    animation:\n        rewardMultitaskStar 1.6s ease-in-out infinite;\n}\n\n.reward-multitask-star-left{\n    left:-17px;\n    top:-11px;\n}\n\n.reward-multitask-star-right{\n    right:-18px;\n    top:-9px;\n    animation-delay:.35s;\n}\n\n.reward-multitask-star-bottom-left{\n    left:-10px;\n    bottom:-12px;\n    animation-delay:.7s;\n}\n\n.reward-multitask-star-bottom-right{\n    right:-12px;\n    bottom:-11px;\n    animation-delay:1.05s;\n}\n\n.reward-multitask-size-small .reward-multitask-star{\n    font-size:10px;\n}\n\n.reward-multitask-size-medium .reward-multitask-star{\n    font-size:13px;\n}\n\n.reward-multitask-size-large .reward-multitask-star{\n    font-size:16px;\n}\n\n@keyframes rewardMultitaskColor{\n\n    0%{\n        color:#f59e0b;\n    }\n\n    25%{\n        color:#ec4899;\n    }\n\n    50%{\n        color:#8b5cf6;\n    }\n\n    75%{\n        color:#0ea5e9;\n    }\n\n    100%{\n        color:#f59e0b;\n    }\n}\n\n@keyframes rewardMultitaskGlow{\n\n    from{\n        text-shadow:\n            0 0 3px rgba(245,158,11,.35);\n    }\n\n    to{\n        text-shadow:\n            0 0 6px rgba(255,255,255,.85),\n            0 0 12px rgba(245,158,11,.75);\n    }\n}\n\n@keyframes rewardMultitaskStar{\n\n    0%,\n    100%{\n        opacity:.25;\n        transform:scale(.65) rotate(0deg);\n    }\n\n    50%{\n        opacity:1;\n        transform:scale(1.15) rotate(18deg);\n    }\n}\n");
js("student-reward-core.min.js","(function(){\"use strict\";if(window.StudentRewardSystem&&window.StudentRewardSystem.version){try{window.dispatchEvent(new CustomEvent(\"studentRewardCoreReady\",{detail:{version:window.StudentRewardSystem.version}}))}catch{}return}const $=\"3.6.0\",S={spreadsheetId:\"1-IkcpEkKQtIavl5DIf6Sbwx3p0aAfnSS4HjT6dn1u_E\",giftGid:\"0\",npcGid:\"1348051654\",formSheetName:\"PhieuDoi\",teacherGiftSheetName:\"QuaTangGVCN\",snapshotSheetName:\"SoDuChot\",formConfirmValue:\"T\\xF4i x\\xE1c nh\\u1EADn \\u0111\\u1ED5i m\\xF3n qu\\xE0 n\\xE0y\",studentCsv:\"https://docs.google.com/spreadsheets/d/e/2PACX-1vRP5cc8duj1XrCXMrymo6Cj7aqIkWfX6bHxGeW-lXcSewfQXhM8fZ5rzbNIQ9mBeVuB8yYr_o1aBoYA/pub?output=csv\",studentRegistryCsv:\"https://docs.google.com/spreadsheets/d/e/2PACX-1vRP5cc8duj1XrCXMrymo6Cj7aqIkWfX6bHxGeW-lXcSewfQXhM8fZ5rzbNIQ9mBeVuB8yYr_o1aBoYA/pub?gid=1603096683&single=true&output=csv\",studentRegistryStrict:!1,studentRegistryCacheTtl:15e3,timeZone:\"Asia/Ho_Chi_Minh\",marketCurrency:\"hongNgoc\",avatarGiftPrefix:\"Th\\u1EBB \\u0111\\u1ED5i Avatar\",avatarFramePrefix:\"Khung \",profileBackgroundPrefix:\"N\\u1EC1n h\\u1ED3 s\\u01A1 \",appsScriptUrl:\"https://script.google.com/macros/s/AKfycbwtMkodKNVrUgVWhpvhwMndPZKBrdWD4OF0XoR4i5poQsxRkEDLIkm56-MTxuOCVW9JXA/exec\",multitaskPotionGiftName:\"Thu\\u1ED1c \\u0111a nhi\\u1EC7m\",mysteryBoxGiftName:\"H\\u1ED9p qu\\xE0 b\\xED \\u1EA9n\",mysteryRewardColumn:\"Qu\\xE0 nh\\u1EADn \\u0111\\u01B0\\u1EE3c\",cacheTtl:15e3},Ze=1440*60*1e3,U={user:String.fromCodePoint(128100),gift:String.fromCodePoint(127873),seed:String.fromCodePoint(127793),medal:String.fromCodePoint(127941),tree:String.fromCodePoint(127795),fire:String.fromCodePoint(128293),star:String.fromCodePoint(11088),target:String.fromCodePoint(127919),rocket:String.fromCodePoint(128640),sparkles:String.fromCodePoint(10024),eagle:String.fromCodePoint(129413),crown:String.fromCodePoint(128081),box:String.fromCodePoint(128230),gem:String.fromCodePoint(128142)},te={hoangNgoc:{key:\"hoangNgoc\",displayName:\"Ho\\xE0ng Ng\\u1ECDc\",className:\"gem-hoang\",image:\"1ELG5w78c1vM2H53NjR__Wif-COFBIa4-\"},haiLamNgoc:{key:\"haiLamNgoc\",displayName:\"H\\u1EA3i Lam Ng\\u1ECDc\",className:\"gem-hailam\",image:\"1TMrH31aDPivPaSSTbZts1syEXtvJWc7N\"},thachAnhTim:{key:\"thachAnhTim\",displayName:\"Th\\u1EA1ch Anh T\\xEDm\",className:\"gem-thachanh\",image:\"1vhsBzLr3kqCDuK3kAd0ueRGJBEdjuWnd\"},lamBaoThach:{key:\"lamBaoThach\",displayName:\"Lam B\\u1EA3o Th\\u1EA1ch\",className:\"gem-lambao\",image:\"1vDrlf7846xVNJ4g8HPdkFNWhOtpTNrGu\"},lucThach:{key:\"lucThach\",displayName:\"L\\u1EE5c Th\\u1EA1ch\",className:\"gem-luc\",image:\"19FSdR0HkIbvQIyTejqw7kXlxWEARG5ZB\"},hongNgoc:{key:\"hongNgoc\",displayName:\"H\\u1ED3ng Ng\\u1ECDc\",className:\"gem-hong\",image:\"1S4DuNvJypXLIeg1LUV-IpVD5gM8tRK43\"}},z=[\"hoangNgoc\",\"haiLamNgoc\",\"thachAnhTim\",\"lamBaoThach\",\"lucThach\",\"hongNgoc\"],re={phoThong:{key:\"phoThong\",displayName:\"Ph\\u1ED5 th\\xF4ng\",gemType:\"hoangNgoc\",rank:1},trungPham:{key:\"trungPham\",displayName:\"Trung ph\\u1EA9m\",gemType:\"haiLamNgoc\",rank:2},trungThuongPham:{key:\"trungThuongPham\",displayName:\"Trung th\\u01B0\\u1EE3ng ph\\u1EA9m\",gemType:\"thachAnhTim\",rank:3},thuongPham:{key:\"thuongPham\",displayName:\"Th\\u01B0\\u1EE3ng ph\\u1EA9m\",gemType:\"lamBaoThach\",rank:4},caoCap:{key:\"caoCap\",displayName:\"Cao c\\u1EA5p\",gemType:\"lucThach\",rank:5},cucPham:{key:\"cucPham\",displayName:\"C\\u1EF1c ph\\u1EA9m\",gemType:\"hongNgoc\",rank:6}},Q=[\"phoThong\",\"trungPham\",\"trungThuongPham\",\"thuongPham\",\"caoCap\",\"cucPham\"],P={hoangNgocToLuc:5,haiLamNgocToLuc:4,thachAnhTimToLuc:3,lamBaoThachToLuc:2,lucThachToHong:3};function x(n){return String(n??\"\").trim().toLowerCase().normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g,\"\").replace(/đ/g,\"d\").replace(/\\s+/g,\" \")}function X(n){return String(n??\"\").trim().toUpperCase()}function ue(n){if(n==null||n===\"\")return 0;let e=String(n).trim().replace(/\\s+/g,\"\");e.includes(\",\")&&!e.includes(\".\")&&(e=e.replace(\",\",\".\"));const t=Number(e);return Number.isFinite(t)?t:0}function ge(n){if(n==null)return null;const e=String(n).trim();if(!e)return null;const t=ue(e);return Number.isFinite(t)?t:null}function Ie(n){const e=Number(n||0);return Number.isInteger(e)?String(e):String(Math.round(e*100)/100)}function Z(n,e){const t=(n||[]).map(x);for(let o=0;o<e.length;o++){const r=x(e[o]),c=t.indexOf(r);if(c>=0)return c}for(let o=0;o<e.length;o++){const r=x(e[o]),c=t.findIndex(function(l){return l.includes(r)});if(c>=0)return c}return-1}function fe(n){n=String(n||\"\");const e=[];let t=[],o=\"\",r=!1;for(let c=0;c<n.length;c++){const l=n[c];if(l==='\"'){r&&n[c+1]==='\"'?(o+='\"',c++):r=!r;continue}if(l===\",\"&&!r){t.push(o),o=\"\";continue}if((l===`\n`||l===\"\\r\")&&!r){l===\"\\r\"&&n[c+1]===`\n`&&c++,t.push(o),e.push(t),t=[],o=\"\";continue}o+=l}return(o.length||t.length)&&(t.push(o),e.push(t)),e.filter(function(c){return c.some(function(l){return String(l||\"\").trim()!==\"\"})})}async function Y(n,e){const t=e?null:E(n);return t&&!Ne()?j(function(){return pe(t.src,t.name).then(ct)},function(o){return Pe(n,o)},t.name,function(o,r){try{f(t.name,fe(o),fe(r))}catch{}}):(t&&(Te=\"CSV (Apps Script t\\u1EA1m t\\u1EAFt, \"+le()+\")\"),Pe(n))}const Me=\"https://docs.google.com/spreadsheets/d/e/2PACX-1vRP5cc8duj1XrCXMrymo6Cj7aqIkWfX6bHxGeW-lXcSewfQXhM8fZ5rzbNIQ9mBeVuB8yYr_o1aBoYA/pub?\",ne=\"https://docs.google.com/spreadsheets/d/1GJoTRsbq0kZfZrDdh0uCC667PwS3Bgkje2fHQnwnCKs/export?format=csv&gid=\";let be=!1;function Ee(n){if(n=String(n||\"\"),be||n.indexOf(Me)!==0)return\"\";const e=n.match(/[?&]gid=(\\d+)/);return ne+(e?e[1]:\"1837470623\")}function xe(n){const e=String(n||\"\").slice(0,200).trim().toLowerCase();return!!e&&e.indexOf(\"<!doctype\")!==0&&e.indexOf(\"<html\")!==0}async function Pe(n,e){const t=Ee(n);if(t)try{const o=await qe(t,e);if(xe(o))return o;be=!0}catch(o){if(e&&e.aborted)throw o;be=!0}return qe(n,e)}async function qe(n,e){const t=new AbortController;let o=!1;const r=setTimeout(function(){o=!0,t.abort()},oe),c=function(){t.abort()};e&&(e.aborted?t.abort():e.addEventListener(\"abort\",c,{once:!0}));try{const l=await fetch(n,{cache:\"no-store\",signal:t.signal});if(!l.ok)throw new Error(\"Kh\\xF4ng t\\u1EA3i \\u0111\\u01B0\\u1EE3c d\\u1EEF li\\u1EC7u CSV.\");return await l.text()}catch(l){throw o?new Error(\"Ngu\\u1ED3n d\\u1EEF li\\u1EC7u kh\\xF4ng ph\\u1EA3n h\\u1ED3i sau 20 gi\\xE2y.\"):l}finally{clearTimeout(r),e&&e.removeEventListener(\"abort\",c)}}let Te=\"\";const Ae={},Be={},De=2500,v=25e3,oe=2e4,Oe=18e4,ie=\"srcApiPausedUntil_v446\";let He=(function(){try{return Number(window.sessionStorage.getItem(ie))||0}catch{return 0}})();function Ne(){return Date.now()<He}function ee(){He=Date.now()+Oe;try{window.sessionStorage.setItem(ie,String(He))}catch{}}let he=!1;try{window.addEventListener(\"pagehide\",function(){he=!0}),window.addEventListener(\"beforeunload\",function(){he=!0}),window.addEventListener(\"pageshow\",function(){he=!1})}catch{}function Re(n){return!n||he?!1:n.apiCap===!0||n.name===\"TypeError\"}function le(){return new Date().toLocaleTimeString(\"vi-VN\",{timeZone:S.timeZone})}const Ke=8e3;let Ge=0,i=0;function d(n){i=Date.now(),Ge=Math.max(Ge,Date.now()+(Number(n)||6e4))}function y(){return i}const p=3e3;function C(n){const e=Date.now();return n>0&&e-n<p&&n>i&&e>=Ge}function G(){return Date.now()<Ge?Ke:De}const D=45e3;let _=null,m=0,w=null;function a(n){_=typeof n==\"function\"?n:null}function s(n){if(!Array.isArray(n))return-1;let e=0;for(let t=1;t<n.length;t++){const o=n[t];Array.isArray(o)&&o.some(function(r){return String(r??\"\").trim()!==\"\"})&&e++}return e}function u(n){if(!Array.isArray(n))return-1;let e=0;for(let t=1;t<n.length;t++){const o=n[t];Array.isArray(o)&&o.forEach(function(r){String(r??\"\").trim()!==\"\"&&e++})}return e}function f(n,e,t){const o=s(e),r=s(t);if(o<0||r<0)return;const c=u(e),l=u(t);o<=r&&c<=l||(console.info(\"[Reward Core] CSV (\"+n+\") kh\\xE1c Apps Script: \"+o+\"/\"+r+\" d\\xF2ng, \"+c+\"/\"+l+\" \\xF4 c\\xF3 d\\u1EEF li\\u1EC7u. T\\u1EF1 c\\u1EADp nh\\u1EADt l\\u1EA1i.\"),!(w||Date.now()-m<D)&&(w=setTimeout(function(){w=null,m=Date.now(),d(6e4),Ce=null,yt=0,Promise.resolve().then(function(){return _?_():wt(!0)}).then(function(){try{window.dispatchEvent(new CustomEvent(\"ocdRewardSharedChanged\",{detail:{reason:\"late-api\",label:n}}))}catch{}}).catch(function(h){console.warn(\"[Reward Core] T\\u1EF1 c\\u1EADp nh\\u1EADt l\\u1EA1i ch\\u01B0a \\u0111\\u01B0\\u1EE3c:\",h&&h.message||h)})},800)))}let b=null;function T(n){try{let e=document.getElementById(\"ocdDataFallbackNotice\");if(!n){e&&(e.style.display=\"none\");return}if(!document.body)return;e||(e=document.createElement(\"div\"),e.id=\"ocdDataFallbackNotice\",e.setAttribute(\"role\",\"status\"),e.style.cssText=\"position:fixed;left:12px;bottom:12px;z-index:99999;max-width:min(320px,calc(100vw - 24px));padding:8px 12px;border-radius:10px;background:rgba(60,45,20,.92);color:#fff;font:13px/1.4 system-ui,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.25);pointer-events:none\",e.textContent=\"\\u0110ang hi\\u1EC3n th\\u1ECB d\\u1EEF li\\u1EC7u d\\u1EF1 ph\\xF2ng, c\\xF3 th\\u1EC3 ch\\u1EADm v\\xE0i ph\\xFAt. H\\u1EC7 th\\u1ED1ng s\\u1EBD t\\u1EF1 c\\u1EADp nh\\u1EADt.\",document.body.appendChild(e)),e.style.display=\"block\",clearTimeout(b),b=setTimeout(function(){e.style.display=\"none\"},12e3)}catch{}}const I=[\"m\\xE3 h\\u1ECDc vi\\xEAn\",\"ma hoc vien\",\"m\\xE3 hv\",\"studentcode\",\"student code\"];function F(n){try{const e=typeof n==\"string\"?fe(n):n;if(!Array.isArray(e)||e.length<2||!Array.isArray(e[0]))return 0;const t=e[0].findIndex(function(r){return I.indexOf(String(r??\"\").trim().toLowerCase())>=0});if(t<0)return 0;let o=0;for(let r=1;r<e.length;r++){const c=e[r];if(!Array.isArray(c))continue;c.filter(function(h){return String(h??\"\").trim()!==\"\"}).length>=2&&String(c[t]==null?\"\":c[t]).trim()===\"\"&&o++}return o}catch{return 0}}function j(n,e,t,o){return new Promise(function(r,c){let l=null,h=null,N=!1,M=!1,H=!1,R=!1,g=null,O=null,L=null;const V=new AbortController;function k(A,B){N||(N=!0,clearTimeout(L),A?r(B):c(B))}function K(){M||N||(M=!0,Promise.resolve().then(function(){return e(V.signal)}).then(function(A){if(R=!0,N)return;const B=F(A);if(B>0){h=A,console.warn(\"[Reward Core] CSV (\"+t+\") c\\xF3 \"+B+\" d\\xF2ng tr\\u1ED1ng m\\xE3 h\\u1ECDc vi\\xEAn, ch\\u1EDD Apps Script.\"),H&&g&&(Te=\"CSV d\\u1EF1 ph\\xF2ng (\"+le()+\")\",l=A,T(!0),k(!0,A));return}Te=\"CSV d\\u1EF1 ph\\xF2ng (\"+le()+\")\",l=A,T(!0),k(!0,A)},function(A){R=!0,O=A,H&&k(!1,g||A)}))}Promise.resolve().then(n).then(function(A){if(H=!0,N){if(o&&l!==null){T(!1);try{o(A,l)}catch{}}}else{Te=\"Apps Script (\"+le()+\")\",T(!1);try{V.abort()}catch{}k(!0,A)}},function(A){if(H=!0,g=A,A&&A.locked){k(!1,A);return}if(!N&&!he&&console.warn(\"[Reward Core] Apps Script l\\u1ED7i (\"+t+\"), d\\xF9ng CSV:\",A&&A.message||A),Re(A)&&ee(),h!==null){Te=\"CSV d\\u1EF1 ph\\xF2ng (\"+le()+\")\",l=h,T(!0),k(!0,h);return}M?R&&k(!1,O||A):K()});const me=G();L=setTimeout(function(){N||M||(console.info(\"[Reward Core] Apps Script ch\\u01B0a tr\\u1EA3 l\\u1EDDi sau \"+me/1e3+\"s (\"+t+\"), t\\u1EA3i CSV song song.\"),K())},me)})}function E(n){if(!S.appsScriptUrl)return null;n=String(n||\"\");const e=\"https://docs.google.com/spreadsheets/d/\"+encodeURIComponent(S.spreadsheetId)+\"/gviz/tq?\";if(n.indexOf(e)===0){let r=n.match(/[?&]sheet=([^&]+)/);if(r)return{src:\"gift\",name:decodeURIComponent(r[1])};r=n.match(/[?&]gid=([^&]+)/);const c={0:\"QuaTang\"};return c[String(S.npcGid)]=\"NhanVat\",r&&c[decodeURIComponent(r[1])]?{src:\"gift\",name:c[decodeURIComponent(r[1])]}:null}if(n===S.studentRegistryCsv)return{src:\"students\",name:\"HocVien\"};const t=\"https://docs.google.com/spreadsheets/d/e/2PACX-1vRP5cc8duj1XrCXMrymo6Cj7aqIkWfX6bHxGeW-lXcSewfQXhM8fZ5rzbNIQ9mBeVuB8yYr_o1aBoYA/pub?\";if(n.indexOf(t)===0||n.indexOf(\"https://docs.google.com/spreadsheets/d/1GJoTRsbq0kZfZrDdh0uCC667PwS3Bgkje2fHQnwnCKs/export?\")===0){const r=n.match(/[?&]gid=(\\d+)/),c=r?r[1]:n.indexOf(t)===0?\"1837470623\":\"\",l={1837470623:\"Form Responses 1\",1326884435:\"XepHang\",521976322:\"XoaBai\",1023688821:\"TacPhamWeb\",1603096683:\"HocVien\"};if(l[c])return{src:\"students\",name:l[c]}}return null}const J=\"ocdApiMulti_v1\";let q=null;function ae(){if(q)return q;try{q=JSON.parse(window.sessionStorage.getItem(J)||\"{}\")||{}}catch{q={}}return q}function de(n,e,t){const o=ae();o[n]={h:e,sheets:t,at:Date.now()};try{Object.keys(o).sort(function(c,l){return(o[l].at||0)-(o[c].at||0)}).slice(6).forEach(function(c){delete o[c]});const r=JSON.stringify(o);r.length<3e6?window.sessionStorage.setItem(J,r):window.sessionStorage.removeItem(J)}catch{}}function pe(n,e,t){t=t?String(t):\"\";let o=Be[e]?n+\":\"+e:\"all\",r=Ae[o];r&&t&&r.code&&r.code!==t&&(o+=\"|\"+t,r=Ae[o]),r||(r=Ae[o]={names:new Set,code:\"\"},r.promise=new Promise(function(l,h){setTimeout(async function(){delete Ae[o];const N=new AbortController;let M=!1;const H=setTimeout(function(){M=!0,N.abort()},v),R=Date.now();try{const g=Array.from(r.names).sort(),O=g.join(\";\")+\"|\"+(r.code||\"\"),L=ae()[O],V=await fetch(S.appsScriptUrl+\"?multi=\"+encodeURIComponent(g.join(\";\"))+(r.code?\"&code=\"+encodeURIComponent(r.code):\"\")+\"&v=449\"+(L&&L.h&&L.sheets?\"&h=\"+encodeURIComponent(L.h):\"\")+\"&_=\"+Date.now(),{cache:\"no-store\",credentials:\"omit\",signal:N.signal}),k=JSON.parse(await V.text());if(k&&k.ok&&k.same&&L&&L.sheets){console.info(\"[Reward Core] Apps Script \"+(Date.now()-R)+\"ms (kh\\xF4ng \\u0111\\u1ED5i):\",g.join(\" ; \")),L.at=Date.now(),l(L.sheets);return}if(console.info(\"[Reward Core] Apps Script \"+(Date.now()-R)+\"ms:\",g.join(\" ; \")),k&&k.locked){const K=new Error(k.error||\"H\\u1ED3 s\\u01A1 \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c b\\u1EA3o m\\u1EADt.\");throw K.locked=!0,K.code=\"STUDENT_PROTECTED\",K}if(!k||!k.ok||!k.sheets)throw new Error(k&&k.error||\"Apps Script tr\\u1EA3 v\\u1EC1 l\\u1ED7i.\");k.h&&de(O,k.h,k.sheets),l(k.sheets)}catch(g){if(M){const O=new Error(\"Apps Script kh\\xF4ng tr\\u1EA3 l\\u1EDDi sau \"+v/1e3+\" gi\\xE2y.\");O.apiCap=!0,h(O)}else h(g)}finally{clearTimeout(H)}},0)})),t&&(r.code=t);const c=n+\":\"+e+(t?\"!\":\"\");return r.names.add(c),r.promise.then(function(l){const h=l[c];if(!Array.isArray(h)||!h.length)throw new Error(\"Apps Script thi\\u1EBFu tab \"+e+\".\");return h})}function $e(n,e){const t=X(e);return!t||!S.appsScriptUrl||Ne()?Promise.reject(new Error(\"Apps Script t\\u1EA1m t\\u1EAFt.\")):new Promise(function(o,r){const c=setTimeout(function(){r(new Error(\"Apps Script ch\\u1EADm (qu\\xE1 5 gi\\xE2y).\"))},De*2);pe(\"students\",String(n||\"\"),t).then(ct).then(function(l){clearTimeout(c),o(l)},function(l){clearTimeout(c),Re(l)&&ee(),r(l)})})}const _e=\"srcApiNoKind_v447\",mn=36e5;function fn(n){try{const e=JSON.parse(window.localStorage.getItem(_e)||\"{}\");return Date.now()<Number(e[n]||0)}catch{return!1}}function hn(n){try{const e=JSON.parse(window.localStorage.getItem(_e)||\"{}\");e[n]=Date.now()+mn,window.localStorage.setItem(_e,JSON.stringify(e))}catch{}}function gn(n){return!!n&&n.ok===!1&&/lo[aạ]i d[uữ] li[eệ]u ghi kh[oô]ng h[oợ]p l[eệ]/i.test(String(n.error||\"\"))}async function pn(n,e){if(!S.appsScriptUrl||fn(n))return\"notsent\";for(let t=0;t<3;t++){const o=new AbortController,r=setTimeout(function(){o.abort()},2e4),c=Date.now();try{const l=await fetch(S.appsScriptUrl,{method:\"POST\",body:JSON.stringify({action:\"append\",items:[{kind:n,row:e}]}),headers:{\"Content-Type\":\"text/plain;charset=utf-8\"},credentials:\"omit\",cache:\"no-store\",signal:o.signal}),h=JSON.parse(await l.text());if(console.info(\"[Reward Core] Ghi th\\u1EB3ng \"+n+\" \"+(Date.now()-c)+\"ms:\",h),h&&h.ok){const N=h.written&&h.written[n]||h.dup&&h.dup[n];return N&&d(9e4),N?\"sent\":\"notsent\"}if(gn(h))return hn(n),\"notsent\";if(h&&(h.busy||/đang bận/i.test(String(h.error||\"\")))&&t<2){await new Promise(function(N){setTimeout(N,1500)});continue}return\"notsent\"}catch(l){if(console.warn(\"[Reward Core] Ghi th\\u1EB3ng \"+n+\" l\\u1ED7i:\",l&&l.message||l),t<1){await new Promise(function(h){setTimeout(h,1200)});continue}return\"unknown\"}finally{clearTimeout(r)}}return\"notsent\"}const et=new Map;function ct(n){return n.map(function(e){return e.map(function(t){return t=t==null?\"\":String(t),/[\",\\r\\n]/.test(t)?'\"'+t.replace(/\"/g,'\"\"')+'\"':t}).join(\",\")}).join(`\n`)}function yn(n,e){const t=X(n);if(!t)return Y(S.studentCsv);const o=et.get(t);if(o&&(o.pending||!e&&Date.now()-o.at<15e3||e&&C(o.startedAt)))return o.p;const r={at:Date.now(),startedAt:Date.now(),pending:!0};return r.p=(function(){return S.appsScriptUrl&&!Ne()?j(function(){return pe(\"students\",\"Form Responses 1\",t).then(ct)},function(c){return Pe(S.studentCsv,c)},\"b\\xE0i n\\u1ED9p\"):Y(S.studentCsv,!0)})(),et.set(t,r),r.p.then(function(){r.pending=!1,r.at=Date.now()},function(){et.get(t)===r&&et.delete(t)}),r.p}async function Xe(n){const e=E(n);return e&&!Ne()?j(function(){return pe(e.src,e.name)},function(t){return Pe(n,t).then(fe)},e.name,function(t,o){f(e.name,t,o)}):(e&&(Te=\"CSV (Apps Script t\\u1EA1m t\\u1EAFt, \"+le()+\")\"),fe(await Y(n,!0)))}let Ve=null,st=0;function bt(n){const e=x(n).replace(/\\s+/g,\"-\");return{active:\"active\",\"hoat-dong\":\"active\",\"dang-hoat-dong\":\"active\",paused:\"paused\",pause:\"paused\",\"tam-dung\":\"paused\",pending:\"pending\",\"cho-kich-hoat\":\"pending\",\"chua-kich-hoat\":\"pending\",graduated:\"graduated\",\"tot-nghiep\":\"graduated\",\"da-tot-nghiep\":\"graduated\",banned:\"banned\",blocked:\"banned\",khoa:\"banned\",\"da-khoa\":\"banned\",inactive:\"paused\"}[e]||e}function ut(n){return n===\"paused\"?\"M\\xE3 h\\u1ECDc vi\\xEAn hi\\u1EC7n \\u0111ang t\\u1EA1m d\\u1EEBng.\":n===\"pending\"?\"M\\xE3 h\\u1ECDc vi\\xEAn hi\\u1EC7n ch\\u01B0a \\u0111\\u01B0\\u1EE3c k\\xEDch ho\\u1EA1t.\":n===\"graduated\"?\"M\\xE3 h\\u1ECDc vi\\xEAn \\u0111\\xE3 chuy\\u1EC3n sang tr\\u1EA1ng th\\xE1i t\\u1ED1t nghi\\u1EC7p.\":n===\"banned\"?\"M\\xE3 h\\u1ECDc vi\\xEAn hi\\u1EC7n \\u0111\\xE3 b\\u1ECB kh\\xF3a.\":n===\"not-found\"?\"Kh\\xF4ng t\\xECm th\\u1EA5y M\\xE3 h\\u1ECDc vi\\xEAn trong danh b\\u1EA1.\":\"M\\xE3 h\\u1ECDc vi\\xEAn hi\\u1EC7n kh\\xF4ng \\u1EDF tr\\u1EA1ng th\\xE1i ho\\u1EA1t \\u0111\\u1ED9ng.\"}function Tt(n){const e=n&&n.length?n[0].map(x):[];return{code:Z(e,[\"m\\xE3 h\\u1ECDc vi\\xEAn\",\"ma hoc vien\"]),name:Z(e,[\"h\\u1ECD v\\xE0 t\\xEAn\",\"ho va ten\",\"h\\u1ECD t\\xEAn\",\"ho ten\"]),group:Z(e,[\"t\\u1ED5\",\"to\"]),course:Z(e,[\"kh\\xF3a\",\"kho\\xE1\",\"khoa\"]),status:Z(e,[\"tr\\u1EA1ng th\\xE1i\",\"trang thai\",\"status\"]),activatedAt:Z(e,[\"ng\\xE0y k\\xEDch ho\\u1EA1t\",\"ngay kich hoat\"])}}function Nt(n){const e=Tt(n);if(e.code<0)throw new Error(\"Kh\\xF4ng t\\xECm th\\u1EA5y c\\u1ED9t M\\xE3 h\\u1ECDc vi\\xEAn trong HocVien.\");const t=[],o=new Map;return(n||[]).slice(1).forEach(function(r,c){const l=X(r[e.code]||\"\");if(!l)return;const h=e.status>=0?String(r[e.status]||\"\").trim():\"\",N=bt(h||\"pending\")||\"pending\",M={code:l,name:e.name>=0?String(r[e.name]||\"\").trim():\"\",group:e.group>=0?String(r[e.group]||\"\").trim():\"\",course:e.course>=0?String(r[e.course]||\"\").trim():\"\",status:N,rawStatus:h,activatedAt:e.activatedAt>=0?String(r[e.activatedAt]||\"\").trim():\"\",sourceRow:c+2};t.push(M),o.set(l,M)}),{students:t,studentMap:o,columns:e,loadedAt:Date.now()}}let ze=null,St=0;function lt(n){if(ze&&(!n||ze.force||C(ze.at)))return ze.p;if(n&&Ve&&C(St))return Promise.resolve(Ve);const e={force:!!n,at:Date.now()};e.p=wn(n),ze=e;const t=function(){ze===e&&(ze=null)};return e.p.then(function(){St=e.at,t()},t),e.p}async function wn(n){const e=Date.now();if(!n&&Ve&&e-st<S.studentRegistryCacheTtl)return Ve;const t=await Xe(S.studentRegistryCsv);return Ve=Nt(t),st=e,Ve}function dt(n,e,t){if(!!(t&&t.adminBypass))return{code:e,exists:!!n,status:n?n.status:\"admin-bypass\",canAccess:!0,canSubmit:!0,canDisplayPublicly:!0,adminBypass:!0,student:n||null,message:\"\"};if(!n){const c=S.studentRegistryStrict!==!0;return{code:e,exists:!1,status:\"not-found\",canAccess:c,canSubmit:c,canDisplayPublicly:c,adminBypass:!1,student:null,message:c?\"\":ut(\"not-found\")}}const r=n.status===\"active\";return{code:e,exists:!0,status:n.status,canAccess:r,canSubmit:r,canDisplayPublicly:r,adminBypass:!1,student:n,message:r?\"\":ut(n.status)}}async function xt(n,e){const t=X(n);if(!t)return dt(null,\"\",e);const o=await lt(!!(e&&e.forceRefresh));return dt(o.studentMap.get(t)||null,t,e)}async function bn(n,e){const t=await xt(n,e);if(!t.canAccess){const o=new Error(t.message);throw o.code=\"STUDENT_ACCESS_DENIED\",o.studentAccess=t,o}return t}async function Tn(n,e){const t=Array.isArray(n)?n:[],o=await lt(!!(e&&e.forceRefresh)),r=e&&typeof e.getCode==\"function\"?e.getCode:function(c){return c&&(c.code||c.studentCode||c.maHocVien||c[\"M\\xE3 h\\u1ECDc vi\\xEAn\"]||\"\")};return t.filter(function(c){const l=X(r(c));return dt(o.studentMap.get(l)||null,l,e).canDisplayPublicly})}function Nn(){Ve=null,st=0}function kt(n,e){const t=e||S.spreadsheetId;return\"https://docs.google.com/spreadsheets/d/\"+encodeURIComponent(t)+\"/gviz/tq?tqx=out:csv&gid=\"+encodeURIComponent(String(n))}function tt(n,e){const t=e||S.spreadsheetId;return\"https://docs.google.com/spreadsheets/d/\"+encodeURIComponent(t)+\"/gviz/tq?tqx=out:csv&sheet=\"+encodeURIComponent(n)}function Ct(n){const e=String(n||\"\").trim();if(!e)return\"\";if(/^[a-zA-Z0-9_-]{20,}$/.test(e))return e;let t=e.match(/\\/d\\/([a-zA-Z0-9_-]+)/);return t||(t=e.match(/[?&]id=([a-zA-Z0-9_-]+)/),t)?t[1]:\"\"}function nt(n,e){const t=String(n||\"\").trim();if(!t)return\"\";const o=Ct(t);if(!o)return t;const r=Math.max(96,Number(e||500));return\"https://drive.google.com/thumbnail?id=\"+encodeURIComponent(o)+\"&sz=w\"+Math.round(r)}function ye(n){if(n instanceof Date)return Number.isNaN(n.getTime())?null:n;const e=String(n||\"\").trim();if(!e)return null;let t=e.match(/^(\\d{1,2})[\\/\\-](\\d{1,2})[\\/\\-](\\d{4})(?:\\s+(\\d{1,2}):(\\d{1,2})(?::(\\d{1,2}))?)?/);if(t){const r=new Date(Number(t[3]),Number(t[2])-1,Number(t[1]),Number(t[4]||0),Number(t[5]||0),Number(t[6]||0));return Number.isNaN(r.getTime())?null:r}if(t=e.match(/^(\\d{4})[\\/\\-](\\d{1,2})[\\/\\-](\\d{1,2})(?:[T\\s]+(\\d{1,2}):(\\d{1,2})(?::(\\d{1,2}))?)?/),t){const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]||0),Number(t[5]||0),Number(t[6]||0));return Number.isNaN(r.getTime())?null:r}const o=new Date(e);return Number.isNaN(o.getTime())?null:o}function vt(n){if(!n)return\"\";const e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,\"0\"),o=String(n.getDate()).padStart(2,\"0\");return e+\"-\"+t+\"-\"+o}function Fe(){return{hoangNgoc:0,haiLamNgoc:0,thachAnhTim:0,lamBaoThach:0,lucThach:0,hongNgoc:0}}function ce(n){const e=Fe();return z.forEach(function(t){e[t]=Math.max(0,Number(n&&n[t]||0))}),e}function ke(n){const e=x(n);if(!e)return null;for(let o=0;o<z.length;o++){const r=z[o];if(x(r)===e||x(te[r].displayName)===e)return r}return{hoang:\"hoangNgoc\",\"hoang ngoc\":\"hoangNgoc\",\"hai lam\":\"haiLamNgoc\",\"hai lam ngoc\":\"haiLamNgoc\",\"thach anh\":\"thachAnhTim\",\"thach anh tim\":\"thachAnhTim\",\"lam bao\":\"lamBaoThach\",\"lam bao thach\":\"lamBaoThach\",luc:\"lucThach\",\"luc thach\":\"lucThach\",hong:\"hongNgoc\",\"hong ngoc\":\"hongNgoc\"}[e]||null}function Le(n){const e=ce(n);function t(r,c){const l=Math.floor(e[r]),h=Math.floor(l/c);h>0&&(e[r]-=h*c,e.lucThach+=h)}t(\"hoangNgoc\",P.hoangNgocToLuc),t(\"haiLamNgoc\",P.haiLamNgocToLuc),t(\"thachAnhTim\",P.thachAnhTimToLuc),t(\"lamBaoThach\",P.lamBaoThachToLuc);const o=Math.floor(e.lucThach/P.lucThachToHong);return o>0&&(e.lucThach-=o*P.lucThachToHong,e.hongNgoc+=o),z.forEach(function(r){e[r]=Math.max(0,Math.floor(Number(e[r]||0)))}),e}function ot(n,e,t){const o=ce(n),r=ke(e),c=Math.floor(Number(t||0));return!r||c<=0||(o[r]+=c),Le(o)}function It(n,e){const t=ke(n),o=Number(e||0);if(!t||o<=0)return 0;switch(t){case\"hongNgoc\":return o;case\"lucThach\":return o/3;case\"lamBaoThach\":return o/6;case\"thachAnhTim\":return o/9;case\"haiLamNgoc\":return o/12;case\"hoangNgoc\":return o/15;default:return 0}}function mt(n){const e=x(n);if(!e)return null;for(let o=0;o<Q.length;o++){const r=Q[o];if(x(r)===e||x(re[r].displayName)===e)return r}return{\"pho thong\":\"phoThong\",\"trung pham\":\"trungPham\",\"trung thuong pham\":\"trungThuongPham\",\"thuong pham\":\"thuongPham\",\"cao cap\":\"caoCap\",\"cuc pham\":\"cucPham\",\"hoang ngoc\":\"phoThong\",\"hai lam ngoc\":\"trungPham\",\"thach anh tim\":\"trungThuongPham\",\"lam bao thach\":\"thuongPham\",\"luc thach\":\"caoCap\",\"hong ngoc\":\"cucPham\"}[e]||null}function Mt(n){const e=mt(n);return e&&re[e]||null}function Sn(n){const e=Mt(n);return e&&e.gemType&&te[e.gemType]||null}function At(n){const e=String(n||\"\"),t=e.match(/\\[\\s*GEM\\s*:\\s*([^:\\]]+)\\s*:\\s*(\\d+)\\s*\\]/i);if(!t)return{isGemReward:!1,gemType:null,amount:0,marker:\"\",cleanDescription:e.trim()};const o=ke(t[1]),r=Math.max(0,Math.floor(Number(t[2]||0)));return{isGemReward:!!(o&&r>0),gemType:o,amount:r,marker:t[0],cleanDescription:e.replace(t[0],\"\").replace(/\\s{2,}/g,\" \").trim()}}function Se(n){return!!(n&&n.isGemReward&&n.rewardGemType&&Number(n.rewardGemAmount||0)>0)}function Gt(n){if(!n||!n.length)return[];const e=n[0].map(x);let t=Z(e,[\"t\\xEAn qu\\xE0\",\"ten qua\"]),o=Z(e,[\"icon\",\"h\\xECnh \\u1EA3nh\",\"hinh anh\"]),r=Z(e,[\"m\\xF4 t\\u1EA3\",\"mo ta\"]),c=Z(e,[\"\\u0111i\\u1EC3m c\\u1EA7n thi\\u1EBFt\",\"diem can thiet\",\"gi\\xE1\",\"gia\"]),l=Z(e,[\"\\u0111\\u1ED9 hi\\u1EBFm\",\"do hiem\",\"ph\\u1EA9m c\\u1EA5p\",\"pham cap\"]);return t<0&&(t=0),o<0&&(o=1),r<0&&(r=2),c<0&&(c=3),n.slice(1).map(function(h,N){const M=String(h[t]||\"\").trim(),H=String(h[o]||\"\").trim(),R=String(h[r]||\"\").trim(),g=Math.max(0,ue(h[c])),O=l>=0?String(h[l]||\"\").trim():\"\",L=mt(O),V=L?re[L]:null,k=At(R);return{index:N+1,name:M,normalizedName:x(M),image:H,rawDescription:R,description:k.cleanDescription,correctPrice:g,cost:g,rawRarity:O,rarity:L,rarityInfo:V,rarityGemType:V?V.gemType:null,gemType:S.marketCurrency,isGemReward:k.isGemReward,rewardGemType:k.gemType,rewardGemAmount:k.amount,gemReward:k.isGemReward?{gemType:k.gemType,amount:k.amount}:null,rewardMarker:k.marker}}).filter(function(h){return!!h.name})}function at(n){const e={};return(n||[]).forEach(function(t){e[x(t.name)]=t}),e}function xn(n,e){const t=Number(e||n&&n.correctPrice||0);if(!Se(n))return{isGemReward:!1,paidHong:t,rewardHongValue:0,difference:0,ratio:0,type:\"item\"};const o=It(n.rewardGemType,n.rewardGemAmount),r=o-t;let c=\"break-even\";return r>1e-6?c=\"profit\":r<-1e-6&&(c=\"loss\"),{isGemReward:!0,paidHong:t,rewardHongValue:o,difference:r,ratio:t>0?o/t:0,type:c}}function Je(n){const e=x(n),t=x(S.mysteryBoxGiftName);return e===t||e.startsWith(t+\" \")}function Qe(n){return String(n||\"\").trim().replace(/[^a-zA-Z0-9._:-]/g,\"\").slice(0,120)}function Et(n){const e=Qe(n);return e?\"[DEAL:\"+e+\"]\":\"\"}function Pt(n){const e=String(n||\"\"),t=e.match(/\\[\\s*DEAL\\s*:\\s*([a-zA-Z0-9._:-]+)\\s*\\]/i);if(!t)return{hasDeal:!1,dealId:\"\",marker:\"\",cleanValue:e.trim()};const o=Qe(t[1]);return{hasDeal:!!o,dealId:o,marker:t[0],cleanValue:e.replace(t[0],\"\").replace(/\\s{2,}/g,\" \").trim()}}function kn(n){let e=2166136261;const t=String(n||\"\");for(let o=0;o<t.length;o++)e^=t.charCodeAt(o),e=Math.imul(e,16777619);return e>>>0}function Cn(n,e,t,o){const r=x(e).replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\")||\"npc\",c=String(n||\"\")+\"|\"+r+\"|\"+String(t||0)+\"|\"+x(o),l=kn(c).toString(36);return Qe(String(n||\"\").replace(/[^0-9]/g,\"\")+\"-\"+r+\"-\"+String(t||0)+\"-\"+l)}function vn(n){const e=new Set;return(n||[]).forEach(function(t){t&&t.dealId&&t.accountingStatus===\"valid\"&&e.add(Qe(t.dealId))}),e}function In(n,e,t,o){let r=\"\";const c=ke(t);o?r=o:t&&!c&&(r=t);let l=String(n||\"\").trim()+\" - \"+Ie(e)+\" \"+te[S.marketCurrency].displayName;const h=Et(r);return h&&(l+=\" \"+h),l}function Dt(n,e){const t=String(n||\"\").trim(),o=Pt(t),r=o.cleanValue,c=e||{};if(!r)return{giftName:\"\",gift:null,price:0,gemType:null,dealId:o.dealId,hasDeal:o.hasDeal,dealMarker:o.marker,format:\"invalid\"};const l=\" - \",h=r.lastIndexOf(l);if(h>0){const M=r.slice(0,h).trim(),R=r.slice(h+l.length).trim().match(/^([0-9]+(?:[.,][0-9]+)?)\\s+(.+)$/);if(R){const g=ue(R[1]),O=ke(R[2]),L=c[x(M)]||null;if(g>0&&O)return{giftName:L?L.name:M,gift:L,price:g,gemType:O,dealId:o.dealId,hasDeal:o.hasDeal,dealMarker:o.marker,format:\"priced\"}}}const N=c[x(r)]||null;return N?{giftName:N.name,gift:N,price:Number(N.correctPrice||0),gemType:S.marketCurrency,dealId:o.dealId,hasDeal:o.hasDeal,dealMarker:o.marker,format:\"legacy\"}:{giftName:r,gift:null,price:0,gemType:null,dealId:o.dealId,hasDeal:o.hasDeal,dealMarker:o.marker,format:\"invalid\"}}function Ot(n){if(!n||!n.length)return{};const e=n[0].map(x);function t(o,r){const c=Z(e,o);return c>=0?c:r}return{timestamp:t([\"d\\u1EA5u th\\u1EDDi gian\",\"dau thoi gian\",\"timestamp\"],0),name:t([\"h\\u1ECD t\\xEAn\",\"ho ten\",\"h\\u1ECD v\\xE0 t\\xEAn\",\"ho va ten\"],1),code:t([\"m\\xE3 h\\u1ECDc vi\\xEAn\",\"ma hoc vien\"],2),gift:t([\"m\\xF3n qu\\xE0 mu\\u1ED1n \\u0111\\u1ED5i\",\"mon qua muon doi\"],3),confirm:t([\"x\\xE1c nh\\u1EADn\",\"xac nhan\"],4),isMystery:t([\"l\\xE0 h\\u1ED9p b\\xED \\u1EA9n\",\"la hop bi an\"],5),mysteryCode:t([\"m\\xE3 quay\",\"ma quay\"],6),mysteryRoll:t([\"s\\u1ED1 quay\",\"so quay\"],7),mysteryReward:t([\"qu\\xE0 nh\\u1EADn \\u0111\\u01B0\\u1EE3c\",\"qua nhan duoc\"],8),mysteryStatus:t([\"tr\\u1EA1ng th\\xE1i\",\"trang thai\"],9)}}function Ht(n,e){if(!n||n.length<2)return[];const t=at(e),o=Ot(n),r=x(S.formConfirmValue);return n.slice(1).map(function(c,l){const h=String(c[o.gift]||\"\").trim(),N=Dt(h,t),M=X(c[o.code]),H=String(c[o.confirm]||\"\").trim(),R=x(H)===r,g=x(c[o.isMystery]||\"\"),O=String(c[o.mysteryReward]||\"\").trim(),L=Je(N.giftName)||g===\"true\"||g===\"co\"||g===\"yes\",V=O&&t[x(O)]||null;return{index:l+1,rowIndex:l+2,transactionType:\"redemption\",timestamp:String(c[o.timestamp]||\"\").trim(),studentName:String(c[o.name]||\"\").trim(),code:M,confirmation:H,confirmed:R,rawGiftValue:h,giftName:N.giftName,gift:N.gift,price:Number(N.price||0),gemType:N.gemType,format:N.format,dealId:N.dealId||\"\",hasDeal:!!N.hasDeal,dealMarker:N.dealMarker||\"\",isGemReward:Se(N.gift),isMysteryBox:L,mysteryRewardName:O,mysteryRewardGift:V,mysteryCode:String(c[o.mysteryCode]||\"\").trim(),mysteryRoll:String(c[o.mysteryRoll]||\"\").trim(),mysteryStatus:String(c[o.mysteryStatus]||\"\").trim()}}).filter(function(c){return c.confirmed&&!!c.code&&!!c.giftName})}function Rt(n){if(!n||!n.length)return{};const e=n[0].map(x);function t(o,r){const c=Z(e,o);return c>=0?c:r}return{timestamp:t([\"d\\u1EA5u th\\u1EDDi gian\",\"dau thoi gian\"],0),scope:t([\"ph\\u1EA1m vi t\\u1EB7ng\",\"pham vi tang\"],1),code:t([\"m\\xE3 h\\u1ECDc vi\\xEAn\",\"ma hoc vien\"],2),group:t([\"t\\u1ED5\",\"to\"],3),rewardType:t([\"lo\\u1EA1i ph\\u1EA7n th\\u01B0\\u1EDFng\",\"loai phan thuong\"],4),giftName:t([\"t\\xEAn v\\u1EADt ph\\u1EA9m\",\"ten vat pham\"],5),gemType:t([\"lo\\u1EA1i linh th\\u1EA1ch\",\"loai linh thach\"],6),quantity:t([\"s\\u1ED1 l\\u01B0\\u1EE3ng\",\"so luong\"],7),reason:t([\"l\\xFD do t\\u1EB7ng\",\"ly do tang\"],8),giver:t([\"ng\\u01B0\\u1EDDi t\\u1EB7ng\",\"nguoi tang\"],9),status:t([\"tr\\u1EA1ng th\\xE1i\",\"trang thai\"],10),course:t([\"kh\\xF3a\",\"khoa\"],11)}}function Lt(n){const e=x(n);return e?![\"het hieu luc\",\"da huy\",\"huy\",\"khong hieu luc\",\"thu hoi\",\"da thu hoi\"].some(function(t){return e.includes(t)}):!0}function Bt(n,e,t,o){const r=x(n),c=Math.max(1,Math.floor(Number(t||1))),l=ke(e);return l&&(r.includes(\"linh thach\")||!r)?{isGemReward:!0,gemType:l,amount:c,source:\"teacher-direct-gem\"}:o&&Se(o)?{isGemReward:!0,gemType:o.rewardGemType,amount:Math.max(1,Number(o.rewardGemAmount||0))*c,source:\"teacher-gem-bag\"}:{isGemReward:!1,gemType:null,amount:0,source:\"\"}}function _t(n,e){if(!n||n.length<2)return[];const t=Rt(n),o=at(e);return n.slice(1).map(function(r,c){const l=X(r[t.code]||\"\"),h=String(r[t.giftName]||\"\").trim(),N=o[x(h)]||null,M=Math.max(1,Math.floor(ue(r[t.quantity]||1))),H=String(r[t.rewardType]||\"\").trim(),R=String(r[t.gemType]||\"\").trim(),g=String(r[t.status]||\"\").trim(),O=Bt(H,R,M,N);return{index:c+1,rowIndex:c+2,transactionType:O.isGemReward?\"teacher-gem\":\"teacher-item\",timestamp:String(r[t.timestamp]||\"\").trim(),code:l,scope:String(r[t.scope]||\"\").trim(),group:String(r[t.group]||\"\").trim(),course:String(r[t.course]||\"\").trim(),rewardType:H,giftName:N?N.name:h,gift:N,quantity:M,teacherGemType:O.gemType,teacherGemAmount:O.amount,teacherGemSource:O.source,isTeacherGemReward:O.isGemReward,reason:String(r[t.reason]||\"\").trim(),giver:String(r[t.giver]||\"\").trim(),status:g,active:Lt(g),ownershipSource:O.isGemReward?\"teacher-gem\":\"teacher-gift\"}}).filter(function(r){return!!r.code&&r.active&&(r.isTeacherGemReward||!!r.giftName)})}function Vt(n){return(n||[]).filter(function(e){return e.isTeacherGemReward&&e.teacherGemType&&Number(e.teacherGemAmount||0)>0}).map(function(e){return{index:e.index,rowIndex:e.rowIndex,transactionType:\"teacher-gem\",timestamp:e.timestamp,code:e.code,studentName:\"\",giftName:e.giftName||\"T\\u1EB7ng \"+te[e.teacherGemType].displayName,gift:e.gift||null,rewardGemType:e.teacherGemType,rewardGemAmount:Number(e.teacherGemAmount),price:0,gemType:null,dealId:\"\",accountingStatus:\"pending\",ownershipSource:\"teacher-gem\",reason:e.reason,giver:e.giver,teacherGiftRow:e}})}function zt(n){const e=[];return(n||[]).forEach(function(t){t.isTeacherGemReward||t.gift&&(Je(t.gift.name)||e.push({index:t.index,rowIndex:t.rowIndex,timestamp:t.timestamp,studentName:\"\",code:t.code,giftName:t.gift.name,gift:t.gift,image:t.gift.image||\"\",description:t.gift.description||\"\",rarity:t.gift.rarity||null,rarityInfo:t.gift.rarityInfo||null,rarityGemType:t.gift.rarityGemType||null,price:0,gemType:null,quantity:Math.max(1,Number(t.quantity||1)),format:\"teacher-gift\",ownershipSource:\"teacher-gift\",accountingStatus:\"valid\",reason:t.reason||\"\",giver:t.giver||\"GVCN\",status:t.status||\"\",group:t.group||\"\",course:t.course||\"\"}))}),e}function Ft(n){const e=new Map;return zt(n).forEach(function(t){const o=X(t.code);o&&(e.has(o)||e.set(o,[]),e.get(o).push(t))}),e}function Ut(n){const e=new Map;return Vt(n).forEach(function(t){const o=X(t.code);o&&(e.has(o)||e.set(o,[]),e.get(o).push(t))}),e}const we={code:\"M\\xE3 h\\u1ECDc vi\\xEAn\",cut:\"M\\u1ED1c ch\\u1ED1t\",version:\"M\\xE3 l\\u1EA7n ch\\u1ED1t\",raw:\"Linh th\\u1EA1ch h\\u1ECDc t\\u1EADp l\\xFAc ch\\u1ED1t\",items:\"V\\u1EADt ph\\u1EA9m\",deals:\"Giao d\\u1ECBch \\u0111\\xE3 d\\xF9ng\",reasons:\"Th\\u01B0\\u1EDFng \\u0111\\xE3 nh\\u1EADn\",sold:\"\\u0110\\xE3 b\\xE1n Minh H\\u1ED3ng\",mystery:\"H\\u1ED9p b\\xED \\u1EA9n \\u0111\\xE3 m\\u1EDF\",tickets:\"V\\xE9 PLC\",status:\"Tr\\u1EA1ng th\\xE1i\"};function We(n,e){const t=String(n??\"\").trim();if(!t)return e;try{return JSON.parse(t)}catch{return e}}function ft(n){const e=Number(String(n??\"\").replace(\",\",\".\"));return Number.isFinite(e)?e:0}function jt(n){const e=new Map;if(!n||n.length<2)return e;const t=n[0].map(x),o=function(k){return t.indexOf(x(k))},r=o(we.code),c=o(we.cut),l=o(we.items);if(r<0||c<0||l<0)return e;const h=o(we.version),N=o(we.raw),M=o(we.deals),H=o(we.reasons),R=o(we.sold),g=o(we.mystery),O=o(we.tickets),L=o(we.status),V={};return z.forEach(function(k){V[k]=o(te[k].displayName)}),n.slice(1).forEach(function(k){const K=X(k[r]);if(!K)return;if(L>=0){const ve=x(k[L]);if(ve&&ve!==\"dang hieu luc\"&&ve!==\"active\")return}const me=String(k[c]||\"\").trim(),A=ye(me);if(!A)return;const B=A.getTime(),W=e.get(K);if(W&&W.cutMs>=B)return;const se=Fe();z.forEach(function(ve){V[ve]>=0&&(se[ve]=Math.max(0,Math.floor(ft(k[V[ve]]))))});const je=N>=0?We(k[N],[]):[],ln=Fe();z.forEach(function(ve,Vn){const zn=Array.isArray(je)?je[Vn]:je&&je[ve];ln[ve]=Math.max(0,Math.floor(Number(zn||0)))});const dn=We(k[l],[]);e.set(K,{code:K,cutText:me,cutMs:B,version:h>=0?String(k[h]||\"\").trim():\"\",gems:se,raw:ln,items:Array.isArray(dn)?dn:[],deals:M>=0?We(k[M],[])||[]:[],reasons:H>=0?We(k[H],[])||[]:[],sold:R>=0?We(k[R],{})||{}:{},mystery:g>=0?Math.max(0,Math.floor(ft(k[g]))):0,tickets:O>=0?Math.floor(ft(k[O])):0})}),e}function qt(n,e){if(!n)return!0;const t=ye(e);return t?t.getTime()>n.cutMs:!0}function Mn(n){return function(e){return!n||!n.size||!e?!0:qt(n.get(X(e.code)),e.timestamp)}}function An(n){const e=[];if(!n)return e;const t=n.cutText.split(\" \")[0]||n.cutText;return z.forEach(function(o){const r=Number(n.gems[o]||0);r<=0||e.push({index:0,rowIndex:0,transactionType:\"teacher-gem\",timestamp:n.cutText,code:n.code,studentName:\"\",giftName:\"S\\u1ED1 d\\u01B0 ch\\u1ED1t s\\u1ED5 \"+t+\" \\u2013 \"+te[o].displayName,gift:null,rewardGemType:o,rewardGemAmount:r,price:0,gemType:null,dealId:\"\",accountingStatus:\"pending\",ownershipSource:\"snapshot\",isSnapshot:!0,reason:\"CHOT_SO:\"+(n.version||t),giver:\"Ch\\u1ED1t s\\u1ED5\"})}),e}function Kt(n,e){const t=[];return n&&(n.items||[]).forEach(function(o,r){const c=String(Array.isArray(o)?o[0]:o&&o.name||\"\").trim();if(!c)return;const l=Math.max(1,Math.floor(Number(Array.isArray(o)?o[1]:o&&o.quantity)||1)),h=String(Array.isArray(o)?o[2]||\"\":o&&o.timestamp||\"\")||n.cutText,N=String(Array.isArray(o)?o[3]||\"\":o&&o.source||\"\")||\"snapshot\",M=e&&e[x(c)]||{name:c,image:\"\",description:\"\"};t.push({index:0,rowIndex:0,timestamp:h,studentName:\"\",code:n.code,giftName:M.name||c,gift:M,image:M.image||\"\",description:M.description||\"\",rarity:M.rarity||null,rarityInfo:M.rarityInfo||null,rarityGemType:M.rarityGemType||null,price:0,gemType:null,quantity:l,format:\"snapshot\",ownershipSource:N,fromSnapshot:!0,accountingStatus:\"valid\",reason:\"\",giver:\"Ch\\u1ED1t s\\u1ED5\",status:\"\",group:\"\",course:\"\"})}),t}function Xt(n,e){const t=Fe();return z.forEach(function(o){t[o]=Math.max(0,Number(n&&n[o]||0)-Number(e.raw[o]||0))}),Le(t)}function rt(n){return(n||[]).slice().sort(function(e,t){const o=ye(e.timestamp),r=ye(t.timestamp),c=o?o.getTime():0,l=r?r.getTime():0;return c!==l?c-l:Number(e.rowIndex||e.index||0)-Number(t.rowIndex||t.index||0)})}function Qt(n,e,t){const o=ke(e),r=Number(t||0);return!o||r<=0?!1:Number(n&&n[o]||0)>=r}function Ye(n,e,t){const o=Le(n||Fe());let r=ce(o);const c=[],l=[],h=[],N=[],M=new Set(t||[]);rt(e).forEach(function(g){if(g.transactionType===\"teacher-gem\"){const A=ke(g.rewardGemType),B=Math.max(0,Math.floor(Number(g.rewardGemAmount||0)));if(!A||B<=0){l.push(Object.assign({},g,{accountingStatus:\"rejected-invalid-teacher-gem\",rejectionReason:\"invalid-teacher-gem\"}));return}const W=ce(r);r=ot(r,A,B);const se={index:g.index,rowIndex:g.rowIndex,timestamp:g.timestamp,code:g.code,source:\"teacher-gift\",sourceGiftName:g.giftName,giftName:g.giftName,gemType:A,amount:B,giver:g.giver||\"GVCN\"};N.push(se),c.push(Object.assign({},g,{accountingStatus:\"valid\",balanceBefore:W,balanceAfter:ce(r),grantedGemReward:se}));return}const O=Number(g.price||0),L=ke(g.gemType),V=Qe(g.dealId||\"\"),k=ce(r);if(!g.gift||!L||O<=0){l.push(Object.assign({},g,{dealId:V,accountingStatus:\"rejected-invalid\",rejectionReason:\"invalid-transaction\",balanceBefore:k,balanceAfter:ce(r)}));return}if(V&&M.has(V)){l.push(Object.assign({},g,{dealId:V,accountingStatus:\"rejected-duplicate-deal\",rejectionReason:\"duplicate-deal\",balanceBefore:k,balanceAfter:ce(r)}));return}if(!Qt(r,L,O)){l.push(Object.assign({},g,{dealId:V,accountingStatus:\"rejected-insufficient-balance\",rejectionReason:\"insufficient-balance\",balanceBefore:k,balanceAfter:ce(r)}));return}r[L]-=O;let K=null;if(g.isMysteryBox){const A=g.mysteryRewardGift;A&&Se(A)&&(K={index:g.index,timestamp:g.timestamp,code:g.code,dealId:V,source:\"mystery-box\",sourceGiftName:g.giftName,giftName:A.name,gemType:A.rewardGemType,amount:Number(A.rewardGemAmount||0)},r=ot(r,K.gemType,K.amount),N.push(K))}else Se(g.gift)&&(K={index:g.index,timestamp:g.timestamp,code:g.code,dealId:V,source:\"redemption\",sourceGiftName:g.giftName,giftName:g.giftName,gemType:g.gift.rewardGemType,amount:Number(g.gift.rewardGemAmount||0)},r=ot(r,K.gemType,K.amount),N.push(K));r=Le(r),V&&M.add(V);const me=Object.assign({},g,{dealId:V,accountingStatus:\"valid\",balanceBefore:k,balanceAfter:ce(r),grantedGemReward:K});if(c.push(me),g.isMysteryBox){const A=g.mysteryRewardGift;A&&!Je(A.name)&&!Se(A)&&h.push({index:g.index,timestamp:g.timestamp,studentName:g.studentName,code:g.code,dealId:V,giftName:A.name,gift:A,image:A.image||\"\",description:A.description||\"\",rarity:A.rarity||null,rarityInfo:A.rarityInfo||null,rarityGemType:A.rarityGemType||null,quantity:1,price:0,gemType:null,format:\"mystery-reward\",ownershipSource:\"mystery-box\",accountingStatus:\"valid\",sourceGiftName:g.giftName})}else Se(g.gift)||h.push(Object.assign({},me,{image:g.gift.image||\"\",description:g.gift.description||\"\",rarity:g.gift.rarity||null,rarityInfo:g.gift.rarityInfo||null,rarityGemType:g.gift.rarityGemType||null,quantity:1,ownershipSource:\"redemption\"}))});const R=Le(r);return{startingGems:ce(o),gems:ce(R),balance:ce(R),validTransactions:c,transactions:c,rejectedTransactions:l,ownedItems:h,redeemedItems:h,gemRewards:N,consumedDealIds:M}}function Gn(n,e){return Ye(n,e).gems}function En(n,e){return Ye(n,e)}function Pn(n,e){return Ye(n,e)}function Zt(n){const e=[];return(n||[]).forEach(function(t){if(!(t&&t.transactionType===\"teacher-gem\")&&!(!t||!t.gift)){if(t.isMysteryBox){const o=t.mysteryRewardGift;o&&!Se(o)&&!Je(o.name)&&e.push({index:t.index,timestamp:t.timestamp,studentName:t.studentName,code:t.code,dealId:t.dealId||\"\",giftName:o.name,gift:o,image:o.image||\"\",description:o.description||\"\",rarity:o.rarity||null,rarityInfo:o.rarityInfo||null,rarityGemType:o.rarityGemType||null,quantity:1,price:0,gemType:null,ownershipSource:\"mystery-box\"});return}Se(t.gift)||e.push(Object.assign({},t,{image:t.gift.image||\"\",description:t.gift.description||\"\",rarity:t.gift.rarity||null,rarityInfo:t.gift.rarityInfo||null,rarityGemType:t.gift.rarityGemType||null,quantity:Number(t.quantity||1),ownershipSource:t.ownershipSource||\"redemption\"}))}}),e}function ht(n,e){return[...n||[],...e||[]].sort(function(t,o){const r=ye(t.timestamp),c=ye(o.timestamp),l=r?r.getTime():0,h=c?c.getTime():0;return h!==l?h-l:Number(o.rowIndex||o.index||0)-Number(t.rowIndex||t.index||0)})}function Jt(n,e){const t=X(e);return n&&n.ownedItemMap&&n.ownedItemMap.get(t)||[]}function Dn(n,e){const t=x(e);return(n||[]).some(function(o){return x(o.giftName)===t})}function On(n,e){const t=x(e);return(n||[]).reduce(function(o,r){return x(r.giftName)!==t?o:o+Math.max(1,Number(r.quantity||1))},0)}const Wt=[{days:5,icon:U.seed,name:\"M\\u1EA7m c\\xE2y ch\\u0103m ch\\u1EC9\",hoangNgocValue:1},{days:7,icon:U.medal,name:\"Phi\\u1EBFu b\\xE9 ngoan\",hoangNgocValue:2},{days:14,icon:U.tree,name:\"C\\xE2y nh\\u1ECF b\\u1EC1n b\\u1EC9\",hoangNgocValue:4},{days:30,icon:U.fire,name:\"Ng\\u1ECDn l\\u1EEDa kh\\xF4ng t\\u1EAFt\",hoangNgocValue:8}],Yt=[{blockSize:3,requiredBlocks:1,icon:U.star,name:\"Ng\\xF4i sao \\u1ED5n \\u0111\\u1ECBnh\",hoangNgocValue:2},{blockSize:4,requiredBlocks:1,icon:U.target,name:\"M\\u0169i t\\xEAn t\\u1EADp trung\",hoangNgocValue:3},{blockSize:5,requiredBlocks:1,icon:U.rocket,name:\"T\\xEAn l\\u1EEDa ti\\u1EBFn b\\u1ED9\",hoangNgocValue:4},{blockSize:3,requiredBlocks:2,icon:U.sparkles,name:\"Song tinh b\\u1EC1n b\\u1EC9\",hoangNgocValue:4},{blockSize:4,requiredBlocks:2,icon:U.eagle,name:\"\\u0110\\xF4i c\\xE1nh v\\u1EEFng v\\xE0ng\",hoangNgocValue:6},{blockSize:5,requiredBlocks:2,icon:U.crown,name:\"V\\u01B0\\u01A1ng mi\\u1EC7n \\u1ED5n \\u0111\\u1ECBnh\",hoangNgocValue:8}];function $t(n){const e=new Set;(n||[]).forEach(function(c){const l=ye(c.timestamp);l&&e.add(vt(l))});const t=Array.from(e).map(function(c){const l=c.split(\"-\");return new Date(Number(l[0]),Number(l[1])-1,Number(l[2]))}).sort(function(c,l){return c.getTime()-l.getTime()});if(!t.length)return 0;let o=1,r=1;for(let c=1;c<t.length;c++)Math.round((t[c].getTime()-t[c-1].getTime())/Ze)===1?(r++,o=Math.max(o,r)):r=1;return o}function en(n){const e=(n||[]).slice().sort(function(r,c){const l=ye(r.timestamp),h=ye(c.timestamp),N=l?l.getTime():0,M=h?h.getTime():0;return N!==M?N-M:Number(r.originalIndex||0)-Number(c.originalIndex||0)}),t=[];let o=0;return e.forEach(function(r){const c=ge(r.score);if(c!==null){if(c>=6){o++;return}o>0&&(t.push(o),o=0)}}),o>0&&t.push(o),t}function tn(n){const e={score5:0,score6:0,score7:0,score89:0,score10:0};(n||[]).forEach(function(o){const r=ge(o.score);r!==null&&(r===5?e.score5++:r===6?e.score6++:r===7?e.score7++:r===8||r===9?e.score89++:r===10&&e.score10++)});const t=Fe();return t.hoangNgoc+=Math.floor(e.score5/2),t.haiLamNgoc+=Math.floor(e.score6/2),t.thachAnhTim+=Math.floor(e.score7/2),t.lamBaoThach+=Math.floor(e.score89/2),t.lucThach+=e.score10,{counts:e,gems:t}}function nn(n){const e=$t(n),t=Wt.filter(function(g){return e>=g.days}),o=t.length?t[t.length-1]:null,r=en(n),c=r.length?Math.max.apply(null,r):0,l={};[3,4,5].forEach(function(g){l[g]=r.reduce(function(O,L){return O+Math.floor(L/g)},0)});const h=Yt.filter(function(g){return Number(l[g.blockSize]||0)>=g.requiredBlocks});let N=null;h.forEach(function(g){(!N||g.hoangNgocValue>=N.hoangNgocValue)&&(N=g)});const M=tn(n),H=ce(M.gems);o&&(H.hoangNgoc+=Number(o.hoangNgocValue||0)),h.forEach(function(g){H.hoangNgoc+=Number(g.hoangNgocValue||0)});const R=Le(H);return{longestStreak:e,streakGift:o,streakUnlocked:t,highScoreRuns:r,bestHighRun:c,highScoreBlocks:l,highScoreGift:N,unlockedHighScoreGifts:h,scoreCounts:M.counts,rawGems:H,gems:R}}function Hn(n){return n=n||{},n.highScoreGift?{icon:n.highScoreGift.icon||U.star,name:n.highScoreGift.name||\"H\\u1ECDc vi\\xEAn\"}:n.streakGift?{icon:n.streakGift.icon||U.seed,name:n.streakGift.name||\"H\\u1ECDc vi\\xEAn\"}:{icon:U.seed,name:\"H\\u1ECDc vi\\xEAn m\\u1EDBi\"}}function gt(n){return(n||[]).slice().sort(function(e,t){const o=ye(e.timestamp),r=ye(t.timestamp),c=o?o.getTime():0,l=r?r.getTime():0;return l!==c?l-c:Number(t.rowIndex||t.index||0)-Number(e.rowIndex||e.index||0)})}function it(n,e){const t=x(e);return gt(n).find(function(o){return x(o.giftName).startsWith(t)})||null}function pt(n,e,t,o){try{const r=n||[],c=X(o||r[0]&&(r[0].code||r[0].studentCode)||\"\"),l=window.OCDAuth;if(!c||!l||typeof l.lookCached!=\"function\")return null;const h=l.lookCached(c),N=h&&h[t];if(!N)return null;const M=x(N);return M.startsWith(x(e))&&gt(r).find(function(H){return x(H.giftName)===M})||null}catch{return null}}function on(n,e){const t=pt(n,S.avatarGiftPrefix,\"avatar\",e)||it(n,S.avatarGiftPrefix);return t&&t.image?nt(t.image,500):\"\"}function an(n,e){const t=pt(n,S.avatarFramePrefix,\"frame\",e)||it(n,S.avatarFramePrefix);return t&&t.image?nt(t.image,700):\"\"}function rn(n,e){const t=pt(n,S.profileBackgroundPrefix,\"bg\",e)||it(n,S.profileBackgroundPrefix);return t&&t.image?nt(t.image,1600):\"\"}function cn(n){const e=x(S.multitaskPotionGiftName);return(n||[]).some(function(t){return x(t.giftName)===e})}function sn(n,e){n&&(n.classList.remove(\"reward-multitask-wrap\",\"reward-multitask-size-small\",\"reward-multitask-size-medium\",\"reward-multitask-size-large\"),n.querySelectorAll(\".reward-multitask-star\").forEach(function(t){t.remove()})),e&&e.classList.remove(\"reward-multitask-name\")}function Rn(n,e,t){if(!n||!e)return;sn(n,e);const o=t&&t.size?t.size:\"medium\";n.classList.add(\"reward-multitask-wrap\"),n.classList.add(\"reward-multitask-size-\"+o),e.classList.add(\"reward-multitask-name\");const r=String.fromCodePoint(10022),c=String.fromCodePoint(10023);[[\"reward-multitask-star-left\",r],[\"reward-multitask-star-right\",c],[\"reward-multitask-star-bottom-left\",c],[\"reward-multitask-star-bottom-right\",r]].forEach(function(l){const h=document.createElement(\"span\");h.className=\"reward-multitask-star \"+l[0],h.textContent=l[1],h.setAttribute(\"aria-hidden\",\"true\"),n.appendChild(h)})}let Ce=null,yt=0,Ue=null,un=0;function wt(n){if(Ue&&(!n||Ue.force||C(Ue.at)))return Ue.p;if(n&&Ce&&C(un))return Promise.resolve(Ce);const e={force:!!n,at:Date.now()};e.p=Ln(n),Ue=e;const t=function(){Ue===e&&(Ue=null)};return e.p.then(function(){un=e.at,t()},t),e.p}async function Ln(n){const e=Date.now();if(!n&&Ce&&e-yt<S.cacheTtl)return Ce;const t=await Promise.all([Xe(kt(S.giftGid)),Xe(tt(S.formSheetName)),Xe(tt(S.teacherGiftSheetName)),S.snapshotSheetName?Xe(tt(S.snapshotSheetName)).catch(function(B){return console.warn(\"[Reward Core] Ch\\u01B0a \\u0111\\u1ECDc \\u0111\\u01B0\\u1EE3c \"+S.snapshotSheetName+\", t\\xEDnh nh\\u01B0 ch\\u01B0a ch\\u1ED1t s\\u1ED5.\",B),[]}):Promise.resolve([])]),o=t[0],r=t[1],c=t[2],l=jt(t[3]),h=Mn(l),N=Gt(o),M=at(N),H=Ht(r,N).filter(h),R=new Map;H.forEach(function(B){R.has(B.code)||R.set(B.code,[]),R.get(B.code).push(B)});const g=_t(c,N).filter(h),O=Ft(g),L=Ut(g);l.forEach(function(B,W){const se=An(B);se.length&&L.set(W,rt(se.concat(L.get(W)||[])));const je=Kt(B,M);je.length&&O.set(W,ht(je,O.get(W)||[]))});const V=new Map,k=new Set;R.forEach(function(B,W){k.add(W)}),L.forEach(function(B,W){k.add(W)}),k.forEach(function(B){V.set(B,rt([...R.get(B)||[],...L.get(B)||[]]))});const K=new Map,me=new Set;V.forEach(function(B,W){me.add(W)}),O.forEach(function(B,W){me.add(W)}),me.forEach(function(B){const W=Zt(V.get(B)||[]),se=O.get(B)||[];K.set(B,ht(W,se))});const A=new Map;return V.forEach(function(B,W){A.set(W,B.filter(function(se){return se.transactionType===\"teacher-gem\"||se.isGemReward||se.isMysteryBox&&Se(se.mysteryRewardGift)}))}),Ce={gifts:N,giftMap:M,responses:H,marketRedemptionMap:R,redemptionMap:V,teacherGifts:g,teacherOwnedItemMap:O,teacherGemTransactionMap:L,snapshots:l,ownedItemMap:K,gemRewardMap:A,rawGiftRows:o,rawResponseRows:r,rawTeacherGiftRows:c},yt=e,Ce}async function Bn(n,e){const t=X(n),o=await wt();let r=[];if(e){const g=fe(e);if(g.length){const O=g[0].map(x),L=Z(O,[\"m\\xE3 h\\u1ECDc vi\\xEAn\",\"ma hoc vien\"]),V=Z(O,[\"d\\u1EA5u th\\u1EDDi gian\",\"dau thoi gian\",\"timestamp\"]),k=Z(O,[\"\\u0111i\\u1EC3m\",\"diem\",\"\\u0111i\\u1EC3m s\\u1ED1\",\"diem so\"]);L>=0&&(r=g.slice(1).map(function(K,me){return{code:X(K[L]),timestamp:V>=0&&K[V]||\"\",score:k>=0&&K[k]||\"\",originalIndex:me+1}}).filter(function(K){return K.code===t}))}}const c=nn(r),l=ce(c.gems),h=o.redemptionMap.get(t)||[],N=o.snapshots&&o.snapshots.get(t)||null,M=N?Xt(c.rawGems,N):l,H=Ye(M,h,N?N.deals:null),R=Jt(o,t);return{code:t,rewardData:c,earnedGems:l,ledgerStartGems:M,snapshot:N,gems:H.gems,balance:H.balance,rawTransactions:h,transactions:H.validTransactions,validTransactions:H.validTransactions,rejectedTransactions:H.rejectedTransactions,ownedItems:R,redeemedItems:R,redemptionOwnedItems:H.ownedItems,teacherOwnedItems:o.teacherOwnedItemMap.get(t)||[],teacherGemTransactions:o.teacherGemTransactionMap.get(t)||[],gemRewards:H.gemRewards,consumedDealIds:H.consumedDealIds,avatar:on(R,t),avatarFrame:an(R,t),profileBackground:rn(R,t),hasMultitaskPotion:cn(R),accounting:H}}function _n(){return console.log(\"[Reward Core] Version:\",$),console.log(\"[Reward Core] CONFIG:\",S),Ce&&console.log(\"[Reward Core] Shared:\",Ce),{version:$,config:S,cache:Ce}}window.StudentRewardSystem={version:$,CONFIG:S,ONE_DAY:Ze,ICONS:U,GEM_TYPES:te,GEM_ORDER:z,GEM_CONVERSION:P,RARITY_TYPES:re,RARITY_ORDER:Q,STREAK_RULES:Wt,HIGH_SCORE_RULES:Yt,normalizeText:x,normalizeCode:X,parseNumber:ue,parseScore:ge,formatNumber:Ie,findColumn:Z,parseCSV:fe,fetchCSV:Y,getDataSource:function(){return Te},getStudentSubmissionsCsv:yn,apiAppend:pn,markDataFresh:d,getLastWriteAt:y,isRecentLoad:C,setLateRefreshHook:a,getStudentSheetCsv:$e,fetchRows:Xe,sheetCsvUrl:kt,sheetNameCsvUrl:tt,normalizeStudentStatus:bt,getStudentAccessMessage:ut,detectStudentRegistryColumns:Tt,mapStudentRegistryRows:Nt,loadStudentRegistry:lt,getStudentAccess:xt,assertStudentActive:bn,filterActiveStudents:Tn,clearStudentRegistryCache:Nn,extractDriveFileId:Ct,convertDriveImageUrl:nt,parseVietnameseDate:ye,getCalendarDayKey:vt,createEmptyGems:Fe,cloneGems:ce,normalizeGemType:ke,normalizeGemBalance:Le,addGemReward:ot,getGemValueInHong:It,parseGemRewardMarker:At,isGemRewardGift:Se,analyzeGemOfferEconomy:xn,normalizeRarity:mt,getRarityInfo:Mt,getRarityGem:Sn,mapGiftRows:Gt,createGiftMap:at,isMysteryBoxGiftName:Je,sanitizeDealId:Qe,createDealMarker:Et,parseDealMarker:Pt,createDealId:Cn,getConsumedDealIds:vn,createFormGiftValue:In,parseFormGiftValue:Dt,detectFormColumns:Ot,mapFormResponseRows:Ht,detectTeacherGiftColumns:Rt,isTeacherGiftActive:Lt,resolveTeacherGemReward:Bt,mapTeacherGiftRows:_t,buildTeacherGemTransactions:Vt,buildTeacherOwnedItems:zt,buildTeacherOwnedItemMap:Ft,buildTeacherGemTransactionMap:Ut,sortTransactionsChronologically:rt,canAffordTransaction:Qt,processTransactions:Ye,mapSnapshotRows:jt,isAfterSnapshot:qt,buildSnapshotItems:Kt,snapshotStartGems:Xt,SNAPSHOT_HEADERS:we,applyTransactions:En,calculateGemBalance:Pn,applyRedeemedItems:Gn,buildOwnedItems:Zt,mergeOwnedItems:ht,getOwnedItemsFromShared:Jt,hasOwnedItem:Dn,getOwnedItemQuantity:On,calculateLongestStreak:$t,calculateHighScoreRuns:en,calculateScoreGems:tn,calculateStudentRewardData:nn,getProfileTitle:Hn,sortOwnedItemsNewest:gt,getLatestOwnedItemByPrefix:it,getProfileAvatar:on,getProfileAvatarFrame:an,getProfileBackground:rn,hasMultitaskPotion:cn,clearMultitaskEffect:sn,applyMultitaskEffect:Rn,loadSharedRewardData:wt,getStudentRewardProfile:Bn,debug:_n},console.log(\"[Reward Core] StudentRewardSystem v3.6.0 \\u0111\\xE3 s\\u1EB5n s\\xE0ng.\");try{window.dispatchEvent(new CustomEvent(\"studentRewardCoreReady\",{detail:{version:$}}))}catch{}})(),(function(){\"use strict\";const $=\"4.8.0\",S={minRate:.1,maxRate:.5,fixedPriceItems:[\"V\\xE9 v\\xE0o ph\\xF2ng luy\\u1EC7n c\\xF4ng\"],policySheetName:\"MinhHongThuMua\",transactionSheetName:\"MinhHongGiaoDich\",confirmValue:\"T\\xF4i x\\xE1c nh\\u1EADn b\\xE1n v\\u1EADt ph\\u1EA9m n\\xE0y.\",formResponseUrl:\"https://docs.google.com/forms/d/e/1FAIpQLSdKYU3t5LgVKKY326Arq4TkqeUOe53HR6l8ZzM0-Z50YwvgsQ/formResponse\",formEntries:{sellId:\"entry.563661764\",code:\"entry.540081212\",giftName:\"entry.256766747\",quantity:\"entry.697793477\",price:\"entry.1111443255\",gemType:\"entry.1616135319\",confirm:\"entry.256416718\"},cacheTtl:15e3,pollDelay:2200,pollAttempts:18};let Ze=null,U=null,te=0;const z=new Set,re=new Map;function Q(i){return String(i??\"\").trim()}function P(i){return new Promise(d=>setTimeout(d,i))}function x(i,d){return Math.max(0,Math.floor(d.parseNumber(i)))}function X(i,d){return Math.max(0,Number(d.parseNumber(i)||0))}function ue(i,d){try{window.dispatchEvent(new CustomEvent(i,{detail:d||{}}))}catch{}}function ge(i,d){if(!i||!i.length)return{};const y=i[0].map(d.normalizeText),p=(C,G)=>{const D=d.findColumn(y,C);return D>=0?D:G};return{giftName:p([\"t\\xEAn v\\u1EADt ph\\u1EA9m\",\"ten vat pham\"],0),price:p([\"gi\\xE1 thu mua\",\"gia thu mua\"],1),gemType:p([\"lo\\u1EA1i linh th\\u1EA1ch\",\"loai linh thach\"],2),status:p([\"tr\\u1EA1ng th\\xE1i\",\"trang thai\",\"status\"],3),dailyLimit:p([\"gi\\u1EDBi h\\u1EA1n/ng\\xE0y\",\"gioi han/ngay\",\"gi\\u1EDBi h\\u1EA1n ng\\xE0y\",\"gioi han ngay\"],4)}}function Ie(i,d){if(!i||!i.length)return{};const y=i[0].map(d.normalizeText),p=(C,G)=>{const D=d.findColumn(y,C);return D>=0?D:G};return{timestamp:p([\"d\\u1EA5u th\\u1EDDi gian\",\"dau thoi gian\",\"timestamp\"],0),sellId:p([\"sell_id\",\"sell id\",\"m\\xE3 giao d\\u1ECBch\",\"ma giao dich\"],1),code:p([\"m\\xE3 h\\u1ECDc vi\\xEAn\",\"ma hoc vien\"],2),giftName:p([\"t\\xEAn v\\u1EADt ph\\u1EA9m\",\"ten vat pham\"],3),quantity:p([\"s\\u1ED1 l\\u01B0\\u1EE3ng\",\"so luong\"],4),price:p([\"gi\\xE1 thu mua\",\"gia thu mua\"],5),gemType:p([\"lo\\u1EA1i linh th\\u1EA1ch\",\"loai linh thach\"],6),confirm:p([\"x\\xE1c nh\\u1EADn\",\"xac nhan\"],7),status:d.findColumn(y,[\"tr\\u1EA1ng th\\xE1i\",\"trang thai\",\"status\"])}}function Z(i,d){return d.normalizeText(i)===\"active\"}function fe(i,d,y){if(Q(i[d.confirm])!==S.confirmValue)return!1;if(d.status>=0){const C=y.normalizeText(i[d.status]);if([\"huy\",\"da huy\",\"h\\u1EE7y\",\"\\u0111\\xE3 h\\u1EE7y\",\"thu hoi\",\"da thu hoi\",\"het hieu luc\",\"khong hieu luc\"].includes(C)||C&&C!==\"deal\"&&C!==\"active\"&&C!==\"hoan tat\"&&C!==\"completed\")return!1}return!0}function Y(i,d,g){const y=[];if(!i||i.length<2)return y;const p=ge(i,d),R=d.mapGiftRows&&d.GEM_CONVERSION?d:window.StudentRewardSystem||d,K=new Map;try{(R.mapGiftRows(g||[])||[]).forEach(function(t){t&&t.name&&K.set(d.normalizeText(t.name),t)})}catch(t){}const V=R.GEM_CONVERSION||{},h=Number(V.hoangNgocToLuc)||5,H={hoangNgoc:1,lucThach:h,hongNgoc:h*(Number(V.lucThachToHong)||3),haiLamNgoc:h/(Number(V.haiLamNgocToLuc)||4),thachAnhTim:h/(Number(V.thachAnhTimToLuc)||3),lamBaoThach:h/(Number(V.lamBaoThachToLuc)||2)},W=new Intl.DateTimeFormat(\"en-CA\",{timeZone:R.CONFIG&&R.CONFIG.timeZone||\"Asia/Ho_Chi_Minh\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).format(new Date),F=S.fixedPriceItems.map(function(t){return d.normalizeText(t)}),O=d.normalizeGemType(\"Ho\\xE0ng Ng\\u1ECDc\")||\"hoangNgoc\";for(let C=1;C<i.length;C++){const G=i[C],D=Q(G[p.giftName]),N=d.normalizeText(D);let _=d.normalizeGemType(G[p.gemType]),m=X(G[p.price],d),B=0;if(D&&F.indexOf(N)<0){const t=K.get(N);m=0;if(t&&!t.isGemReward&&Number(t.cost)>0&&H[t.gemType]){B=Number(t.cost)*H[t.gemType];const c=Math.floor(B*S.maxRate),l=Math.max(1,Math.floor(B*S.minRate));if(c>=1&&c<B){let r=2166136261;const k=W+\"|\"+N;for(let n=0;n<k.length;n++)r^=k.charCodeAt(n),r=Math.imul(r,16777619);r^=r>>>15,r=Math.imul(r,739982445),r^=r>>>12,m=l>=c?c:l+(r>>>0)%(c-l+1),_=O}}}!D||!_||m<=0||!Z(G[p.status],d)||y.push({giftName:D,normalizedGiftName:N,price:m,gemType:_,dailyLimit:x(G[p.dailyLimit],d),dailyPrice:B>0,realValueHoang:B,priceDate:W})}return y}function Me(i,d){const y=[];if(!i||i.length<2)return y;const p=Ie(i,d),C=new Set;for(let G=1;G<i.length;G++){const D=i[G];if(!fe(D,p,d))continue;const _=Q(D[p.sellId]),m=d.normalizeCode(D[p.code]),w=Q(D[p.giftName]),a=x(D[p.quantity],d),s=X(D[p.price],d),u=d.normalizeGemType(D[p.gemType]);!_||C.has(_)||!m||!w||a<=0||s<=0||!u||(C.add(_),y.push({transactionType:\"minh-hong-sell\",transactionId:\"MH-\"+_,sellId:_,timestamp:Q(D[p.timestamp]),code:m,giftName:w,normalizedGiftName:d.normalizeText(w),quantity:a,unitPrice:s,rewardGemType:u,rewardGemAmount:a*s,rowIndex:G}))}return y.sort((G,D)=>{const _=d.parseVietnameseDate(G.timestamp),m=d.parseVietnameseDate(D.timestamp),w=_?_.getTime():0,a=m?m.getTime():0;return w-a||G.rowIndex-D.rowIndex}),y}let ne=null,be=0;function Ee(i,d){return typeof i.isRecentLoad==\"function\"&&i.isRecentLoad(d)}function xe(i,d){if(ne&&(!i||ne.force||Ee(d,ne.at)))return ne.p;if(i&&U&&Ee(d,be))return Promise.resolve(U);const y={force:!!i,at:Date.now()};y.p=Pe(i,d),ne=y;const p=function(){ne===y&&(ne=null)};return y.p.then(function(){be=y.at,p()},p),y.p}async function Pe(i,d){if(!i&&U&&Date.now()-te<S.cacheTtl)return U;const gR=d.sheetCsvUrl&&d.CONFIG?d:window.StudentRewardSystem||d,y=await Promise.all([d.fetchRows(d.sheetNameCsvUrl(S.policySheetName)),d.fetchRows(d.sheetNameCsvUrl(S.transactionSheetName)),gR.fetchRows(gR.sheetCsvUrl(gR.CONFIG.giftGid)).catch(function(){return[]})]),p=Y(y[0],d,y[2]),C=Me(y[1],d),G=new Map;return C.forEach(D=>{G.has(D.code)||G.set(D.code,[]),G.get(D.code).push(D)}),U={policies:p,sales:C,salesByCode:G,policyRows:y[0],saleRows:y[1]},te=Date.now(),U}function qe(i){return(i||[]).map(d=>Object.assign({},d))}function Te(i){return Math.max(1,Math.floor(Number(i&&i.quantity||1)))}function Ae(i,d){let y=d.normalizeText(i||\"\");return y=y.replace(/^(goi|gói)\\s+/i,\"\").replace(/\\s+/g,\" \").trim(),y}function Be(i){return Q(i&&(i.giftName||i.name||i.gift&&i.gift.name)||\"\")}function De(i,d,y){const p=qe(i),C=[],G=[];function D(m){return Ae(m,y)}function _(m){const w=D(m);let a=0;return p.forEach(s=>{D(Be(s))===w&&(a+=Math.max(0,Number(s.quantity===void 0?1:s.quantity)))}),a}return(d||[]).forEach(m=>{let w=Math.max(0,Number(m.quantity)||0);if(!w)return;if(_(m.giftName)<w){C.push(Object.assign({reason:\"INSUFFICIENT_ITEM\"},m));return}const a=D(m.giftName);for(let s=0;s<p.length&&w>0;s++){const u=p[s];if(D(Be(u))!==a)continue;const f=Math.max(0,Number(u.quantity===void 0?1:u.quantity)),b=Math.min(f,w);u.quantity=f-b,w-=b}w===0?G.push(m):C.push(Object.assign({reason:\"ITEM_DEDUCTION_INCOMPLETE\"},m))}),{items:p.filter(m=>Number(m.quantity===void 0?1:m.quantity)>0),applied:G,rejected:C}}function v(i,d){d=String(d||\"\").trim().toUpperCase();const y=\"PLC|\"+[\"PLC-TICKET\",i,d].join(\"|\")+\"|\"+d;let p=2166136261;for(let C=0;C<y.length;C++)p^=y.charCodeAt(C),p=Math.imul(p,16777619);return\"PLC-\"+d+\"-\"+(p>>>0).toString(36).toUpperCase()}function oe(i,d,y,p){const C=new Map;(d||[]).forEach(function(m){C.set(m.sellId,m)});const G=new Set,D=[],_=[];return(i||[]).forEach(function(m){const w=/PLC-REFUND\\|([^|\\s]+)\\|([A-Za-z0-9_-]+)/.exec(String(m&&m.reason||\"\"));if(w&&p.normalizeCode(w[2])===y&&Te(m)===1){const a=v(w[1],y),s=C.get(a);if(s&&!G.has(a)&&p.normalizeText(s.giftName)===p.normalizeText(Be(m))){G.add(a),_.push({sellId:a,roomId:w[1],timestamp:m.timestamp||\"\",refundTimestamp:m.timestamp||\"\",saleTimestamp:s.timestamp});return}}D.push(m)}),{n:G.size,items:D,sales:(d||[]).filter(function(m){return!G.has(m.sellId)}),cancelled:_}}function Oe(i,d,y,p){const C=(i.rawTransactions||[]).filter(function(f){return!(f&&f.isMinhHongSale)}),G=i.ledgerStartGems||i.earnedGems||y.createEmptyGems(),D=i.snapshot?i.snapshot.deals:null,_=i.teacherOwnedItems||[],m=typeof y.buildOwnedItems==\"function\"?y.buildOwnedItems.bind(y):null;let w=(d||[]).slice(),a=null,s=null,u=null;for(let f=0;f<4;f++){const b=w.map(function(E,J){return{transactionType:\"teacher-gem\",isMinhHongSale:!0,index:\"MH-\"+J,rowIndex:E.rowIndex,timestamp:E.timestamp,code:E.code,giftName:\"Minh H\\u1ED3ng thu mua \"+E.giftName,giver:\"Minh H\\u1ED3ng\",rewardGemType:E.rewardGemType,rewardGemAmount:E.rewardGemAmount,sellId:E.sellId}});a=p.processTransactions(G,C.concat(b),D);const T=m?m(a.validTransactions||[]):i.ownedItems||[],I=p.mergeOwnedItems?p.mergeOwnedItems(T,_):T.concat(_);s=De(I,d||[],y);const F=s.applied.map(function(E){return E.sellId}).join(\"|\"),j=F===w.map(function(E){return E.sellId}).join(\"|\");if(w=s.applied,j||F===u)break;u=F}return{accounting:a,itemResult:s}}function ie(i,d,y){let p=Object.assign({},i||{});return(d||[]).forEach(C=>{p=y.addGemReward(p,C.rewardGemType,C.rewardGemAmount)}),p}function He(i,d,y){const p=y.normalizeCode(i&&i.code||i&&i.studentCode||\"\"),C=i&&i.ownedItems||[],G=new Date,D=new Intl.DateTimeFormat(\"en-CA\",{timeZone:y.CONFIG.timeZone||\"Asia/Ho_Chi_Minh\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).format(G);return d.policies.map(_=>{const m=y.getOwnedItemQuantity(C,_.giftName);let w=0;(d.salesByCode.get(p)||[]).forEach(u=>{if(u.normalizedGiftName!==_.normalizedGiftName)return;const f=y.parseVietnameseDate(u.timestamp);if(!f)return;new Intl.DateTimeFormat(\"en-CA\",{timeZone:y.CONFIG.timeZone||\"Asia/Ho_Chi_Minh\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).format(f)===D&&(w+=u.quantity)});const a=_.dailyLimit>0?Math.max(0,_.dailyLimit-w):m,s=Math.max(0,Math.min(m,a));return Object.assign({},_,{ownedQuantity:m,soldToday:w,remainingToday:a,maxQuantity:s,available:s>0})}).filter(_=>_.ownedQuantity>0)}function Ne(i,d){const y=d.normalizeCode(i)||\"UNKNOWN\";let p=\"\";try{if(window.crypto&&window.crypto.getRandomValues){const G=new Uint32Array(2);window.crypto.getRandomValues(G),p=G[0].toString(36)+G[1].toString(36)}}catch{}return p||(p=Date.now().toString(36)+Math.random().toString(36).slice(2,10)),(\"MH-\"+new Intl.DateTimeFormat(\"en-CA\",{timeZone:d.CONFIG.timeZone||\"Asia/Ho_Chi_Minh\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).format(new Date).replace(/-/g,\"\")+\"-\"+y+\"-\"+p).replace(/[^a-zA-Z0-9._:-]/g,\"\").slice(0,120)}function ee(i){return new Promise(function(d){const y=document.createElement(\"iframe\");y.name=\"mhSellFrame_\"+Date.now(),y.style.display=\"none\";const p=document.createElement(\"form\");p.method=\"POST\",p.action=S.formResponseUrl,p.target=y.name,p.style.display=\"none\",Object.keys(i).forEach(C=>{const G=document.createElement(\"input\");G.type=\"hidden\",G.name=C,G.value=i[C],p.appendChild(G)}),document.body.appendChild(y),document.body.appendChild(p),p.submit(),setTimeout(()=>{try{p.remove(),y.remove()}catch{}d(!0)},700)})}function he(i,d){const y=Q(i);if(!y||typeof d!=\"function\")throw new Error(\"Asset source kh\\xF4ng h\\u1EE3p l\\u1EC7.\");return re.set(y,d),!0}function Re(i){return re.delete(Q(i))}function le(){return Array.from(re.keys())}async function Ke(i){if(i.__OCD_UNIFIED_ASSET_V4__)return i;Object.defineProperty(i,\"__OCD_UNIFIED_ASSET_V4__\",{value:!0,configurable:!1});const d={version:i.version,loadSharedRewardData:i.loadSharedRewardData.bind(i),getStudentRewardProfile:i.getStudentRewardProfile.bind(i),processTransactions:i.processTransactions.bind(i),mergeOwnedItems:i.mergeOwnedItems.bind(i)};i.CONFIG.minhHongBuybackSheetName=S.policySheetName,i.CONFIG.minhHongTransactionSheetName=S.transactionSheetName,i.CONFIG.minhHongConfirmValue=S.confirmValue,i.CONFIG.minhHongFormResponseUrl=S.formResponseUrl,i.CONFIG.minhHongFormEntries=Object.assign({},S.formEntries),i.loadMinhHongData=function(m){return xe(!!m,i)},i.getStudentSnapshot=async function(m,w){const a=await d.loadSharedRewardData(!!w);return a&&a.snapshots&&a.snapshots.get(i.normalizeCode(m))||null},i.loadSharedRewardData=async function(m){const w=await Promise.all([d.loadSharedRewardData(m),xe(!!m,i)]),a=w[0],s=w[1];return a.minhHongPolicies=s.policies,a.minhHongSales=s.sales,a.minhHongSalesByCode=s.salesByCode,a},i.prefetchStudent=function(m){const w=i.normalizeCode(m),a=[i.loadSharedRewardData(!1)];return w&&(i.getStudentAccess&&a.push(i.getStudentAccess(w)),i.getStudentSubmissionsCsv&&a.push(i.getStudentSubmissionsCsv(w))),Promise.allSettled(a)};let y=null;typeof i.setLateRefreshHook==\"function\"&&i.setLateRefreshHook(function(){return y?i.refreshStudentRewardProfile(y[0],y[1],y[2]):i.loadSharedRewardData(!0)});const p=4e3;let C=null;function G(){return typeof i.getLastWriteAt==\"function\"?i.getLastWriteAt():0}i.getStudentRewardProfile=async function(m,w,a,s){m&&(y=[m,w,s]);const u=i.normalizeCode(m);if(a&&C&&C.code===u&&Date.now()-C.at<p&&C.at>G()&&C.csv===(w||\"\"))return C.profile;const f=Date.now(),b=await D(m,w,a,s);return C={code:u,at:f,csv:w||\"\",profile:b},b};async function D(m,w,a,s){const u=d.loadSharedRewardData(!!a).catch(function(de){console.warn(\"[StudentRewardSystem v4] Ch\\u01B0a l\\xE0m m\\u1EDBi \\u0111\\u01B0\\u1EE3c d\\u1EEF li\\u1EC7u chung:\",de)}),f=xe(!!a,i);f.catch(function(){}),await i.assertStudentActive(m,s),await u;const b=await Promise.all([d.getStudentRewardProfile(m,w),f]),T=b[0],I=b[1],F=i.normalizeCode(m);let j=(I.salesByCode.get(F)||[]).filter(function(de){return i.isAfterSnapshot(T.snapshot||null,de.timestamp)});const E=oe(T.teacherOwnedItems||[],j,F,i);E.n&&(j=E.sales,T.teacherOwnedItems=E.items,T.cancelledTicketSales=E.cancelled);const J=Oe(T,j,i,d),q=J.itemResult,ae=J.accounting.gems;return T.code=T.code||F,T.gems=ae,T.balance=ae,T.transactions=J.accounting.validTransactions,T.validTransactions=J.accounting.validTransactions,T.rejectedTransactions=J.accounting.rejectedTransactions,T.gemRewards=J.accounting.gemRewards||T.gemRewards,T.consumedDealIds=J.accounting.consumedDealIds||T.consumedDealIds,T.accounting=J.accounting,T.ownedItems=q.items,T.redeemedItems=q.items,T.minhHong={sales:q.applied.slice(),rejectedSales:q.rejected.slice(),offers:[]},T.minhHong.offers=He(T,I,i),T.assets={gems:T.gems,items:T.ownedItems,transactions:q.applied.slice(),rejectedTransactions:q.rejected.slice()},T}i.refreshStudentRewardProfile=async function(m,w,a){U=null,te=0;const s=await i.getStudentRewardProfile(m,w,!0,a);return ue(\"ocdRewardProfileChanged\",{code:i.normalizeCode(m),profile:s,version:$}),s},i.getMinhHongOffers=async function(m,w,a){const s=await i.getStudentRewardProfile(m,w,a);return s.minhHong?s.minhHong.offers:[]},i.createMinhHongSaleRequest=async function(m,w,a,s){const u=await i.getStudentRewardProfile(m,s,!1),f=x(a,i);if(f<=0)throw new Error(\"S\\u1ED1 l\\u01B0\\u1EE3ng b\\xE1n kh\\xF4ng h\\u1EE3p l\\u1EC7.\");const b=(u.minhHong.offers||[]).find(T=>T.normalizedGiftName===i.normalizeText(w));if(!b||!b.available)throw new Error(\"V\\u1EADt ph\\u1EA9m n\\xE0y hi\\u1EC7n kh\\xF4ng n\\u1EB1m trong danh s\\xE1ch Minh H\\u1ED3ng thu mua.\");if(f>b.maxQuantity)throw new Error(\"S\\u1ED1 l\\u01B0\\u1EE3ng v\\u01B0\\u1EE3t qu\\xE1 s\\u1ED1 \\u0111ang s\\u1EDF h\\u1EEFu ho\\u1EB7c gi\\u1EDBi h\\u1EA1n thu mua h\\xF4m nay.\");return{sellId:Ne(m,i),code:i.normalizeCode(m),giftName:b.giftName,quantity:f,unitPrice:b.price,gemType:b.gemType,rewardAmount:f*b.price,confirm:S.confirmValue}},i.submitMinhHongSaleRequest=async function(m){const w=i.GEM_TYPES[m.gemType]?i.GEM_TYPES[m.gemType].displayName:m.gemType;if(typeof i.apiAppend==\"function\"){const u=await i.apiAppend(\"mhSale\",[\"\",m.sellId,m.code,m.giftName,String(m.quantity),String(m.unitPrice),w,S.confirmValue]);if(u===\"sent\")return U=null,te=0,z.add(Q(m.sellId)),m;if(u===\"unknown\"){U=null,te=0;try{if(((await xe(!0,i)).sales||[]).some(b=>Q(b.sellId)===Q(m.sellId)))return z.add(Q(m.sellId)),m}catch{}}}const a=S.formEntries,s={};return s[a.sellId]=m.sellId,s[a.code]=m.code,s[a.giftName]=m.giftName,s[a.quantity]=String(m.quantity),s[a.price]=String(m.unitPrice),s[a.gemType]=w,s[a.confirm]=S.confirmValue,await ee(s),m};async function _(m,w){C=null;const a=await i.getStudentRewardProfile(m,w,!1);return ue(\"ocdRewardProfileChanged\",{code:i.normalizeCode(m),profile:a,version:$}),a}return i.waitForMinhHongSale=async function(m,w){const a=Q(m),s=Math.max(1,Number(w||S.pollAttempts));for(let u=0;u<s;u++){u>0&&await P(z.has(a)?1e3:S.pollDelay),U=null,te=0;try{const b=((await xe(!0,i)).sales||[]).find(T=>Q(T.sellId)===a);if(b)return b}catch(f){console.warn(\"[MinhHongBuyback] Ch\\u01B0a \\u0111\\u1ECDc \\u0111\\u01B0\\u1EE3c giao d\\u1ECBch, s\\u1EBD th\\u1EED l\\u1EA1i.\",f)}}return null},i.confirmMinhHongSale=async function(m,w,a,s){const u=await i.waitForMinhHongSale(m,s);if(!u)return null;const f=i.normalizeCode(a||u.code||\"\"),b=f?await _(f,w):null;return{sale:u,profile:b}},i.sellItemToMinhHong=async function(m,w,a,s){const u=await i.createMinhHongSaleRequest(m,w,a,s);await i.submitMinhHongSaleRequest(u);const f=await i.waitForMinhHongSale(u.sellId);if(!f)return ue(\"ocdMinhHongSalePending\",{sellId:u.sellId,code:u.code,giftName:u.giftName,quantity:u.quantity}),{request:u,sale:null,profile:null,pending:!0,confirmed:!1};const b=await _(m,s);return ue(\"ocdMinhHongSaleConfirmed\",{sellId:u.sellId,code:u.code,sale:f,profile:b}),{request:u,sale:f,profile:b,pending:!1,confirmed:!0}},i.registerAssetSource=he,i.unregisterAssetSource=Re,i.getRegisteredAssetSources=le,i.createAssetTransaction=function(m){const w=Object.assign({},m||{});if(w.transactionId=Q(w.transactionId),w.transactionType=Q(w.transactionType||\"external\"),w.code=i.normalizeCode(w.code),w.effects=Array.isArray(w.effects)?w.effects.map(a=>Object.assign({},a)):[],!w.transactionId)throw new Error(\"transactionId l\\xE0 b\\u1EAFt bu\\u1ED9c.\");return w},i.version=d.version,i.coreVersion=$,i.legacyVersion=d.version,i.MinhHongBuyback={version:\"2.2.0-core\",config:S,loadData:i.loadMinhHongData,getOffers:i.getMinhHongOffers,createSaleRequest:i.createMinhHongSaleRequest,submitSaleRequest:i.submitMinhHongSaleRequest,waitForSale:i.waitForMinhHongSale,confirmSale:i.confirmMinhHongSale,sell:i.sellItemToMinhHong},ue(\"studentRewardCoreReady\",{version:d.version,coreVersion:$,legacyVersion:d.version,unifiedAssets:!0}),ue(\"ocdRewardCoreUpgraded\",{version:$,compatibilityVersion:d.version}),console.log(\"[StudentRewardSystem] Core v\"+$+\" ready. Compatibility API: \"+d.version),Ge(i),i}function Ge(i){try{const d=window.localStorage.getItem(\"ocd_student_session_v1\");if(!d)return;const y=JSON.parse(d)||{},p=i.normalizeCode(y.code||\"\");if(String(y.mode||\"\")!==\"student\"||!p)return;setTimeout(function(){Promise.resolve(i.prefetchStudent(p)).catch(function(){})},0)}catch{}}if(!window.StudentRewardSystem){console.error(\"[StudentRewardSystem v4] Kh\\xF4ng t\\xECm th\\u1EA5y n\\u1EC1n Core n\\u1ED9i b\\u1ED9.\");return}window.StudentRewardSystemReady=Ke(window.StudentRewardSystem).catch(function(i){throw console.error(\"[StudentRewardSystem v4]\",i),i})})(),(function(){\"use strict\";if(window.OCDAuth)return;const $=\"ocd_auth_v1\",S=\"ocd_auth_public_v1\",Ze=60*1e3,U=window.StudentRewardSystem,te=U&&U.CONFIG&&U.CONFIG.appsScriptUrl||\"https://script.google.com/macros/s/AKfycbwtMkodKNVrUgVWhpvhwMndPZKBrdWD4OF0XoR4i5poQsxRkEDLIkm56-MTxuOCVW9JXA/exec\";function z(a){return String(a??\"\").trim().toUpperCase().replace(/\\s+/g,\"\")}function re(a,s){try{if(s===void 0)return JSON.parse(localStorage.getItem(a)||\"null\");s===null?localStorage.removeItem(a):localStorage.setItem(a,JSON.stringify(s))}catch{return null}}function Q(a,s){try{window.dispatchEvent(new CustomEvent(a,{detail:s||{}}))}catch{}}let P=re($);P&&(!P.token||!P.expires||P.expires<Date.now())&&(P=null,re($,null));function x(){return P&&P.expires>Date.now()?P.token:\"\"}function X(){return x()?P.me:null}function ue(){const a=X();return a?[z(a.code),z(a.linked)].filter(Boolean):[]}function ge(a){return a=z(a),!!a&&ue().indexOf(a)>=0}function Ie(a){P={token:a.token,expires:a.expires,me:a.me,checked:Date.now()},re($,P);const s=z(a.me&&(a.me.linked||a.me.code));try{s&&window.OCDStudentSession&&window.OCDStudentSession.confirmStudent&&window.OCDStudentSession.confirmStudent(s,\"ocd-auth\")}catch{}try{sessionStorage.removeItem(S)}catch{}Q(\"ocdAuthChanged\",{loggedIn:!0,me:a.me})}function Z(a){const s=X();if(P=null,re($,null),a)try{window.OCDStudentSession&&window.OCDStudentSession.clear&&window.OCDStudentSession.clear(\"ocd-auth-logout\")}catch{}Q(\"ocdAuthChanged\",{loggedIn:!1,previous:s})}const fe=window.fetch.bind(window);window.fetch=function(a,s){try{const u=typeof a==\"string\"?a:a&&a.url||\"\",f=x();if(f&&u.indexOf(te)===0){s=s?Object.assign({},s):{};const b=String(s.method||typeof a!=\"string\"&&a.method||\"GET\").toUpperCase();if(b===\"GET\"&&typeof a==\"string\"&&!/[?&]token=/.test(a))a=a+(a.indexOf(\"?\")>=0?\"&\":\"?\")+\"token=\"+encodeURIComponent(f);else if(b===\"POST\"&&typeof s.body==\"string\")try{const T=JSON.parse(s.body);T&&typeof T==\"object\"&&!T.token&&(T.token=f,s.body=JSON.stringify(T))}catch{}}}catch{}return fe(a,s)};async function Y(a,s){const u=new AbortController,f=setTimeout(function(){u.abort()},25e3);try{const b=Object.assign({action:a,device:navigator.userAgent.slice(0,100)},s||{}),T=await fe(te,{method:\"POST\",body:JSON.stringify(b),headers:{\"Content-Type\":\"text/plain;charset=utf-8\"},credentials:\"omit\",cache:\"no-store\",signal:u.signal}),I=JSON.parse(await T.text());return I&&I.expired&&a!==\"authMe\"&&Z(!1),I||{ok:!1,error:\"M\\xE1y ch\\u1EE7 kh\\xF4ng ph\\u1EA3n h\\u1ED3i.\"}}catch{return{ok:!1,error:\"Kh\\xF4ng k\\u1EBFt n\\u1ED1i \\u0111\\u01B0\\u1EE3c m\\xE1y ch\\u1EE7. Vui l\\xF2ng th\\u1EED l\\u1EA1i.\"}}finally{clearTimeout(f)}}let Me=null,ne=null;try{ne=JSON.parse(sessionStorage.getItem(S)||\"null\")}catch{}function be(a){if(!a){try{const s=JSON.parse(sessionStorage.getItem(S)||\"null\");if(s&&Date.now()-s.at<Ze)return Promise.resolve(s)}catch{}if(Me)return Me}return Me=(async function(){try{const s=await fe(te+\"?action=authPublic&_=\"+Date.now(),{cache:\"no-store\",credentials:\"omit\"}),u=JSON.parse(await s.text());if(!u||!u.ok)throw new Error(\"authPublic\");const f={at:Date.now(),protected:(u.protected||[]).map(z),look:u.look||{}};ne=f;try{sessionStorage.setItem(S,JSON.stringify(f))}catch{}return f}catch{return{at:0,protected:[],look:{},failed:!0}}finally{setTimeout(function(){Me=null},0)}})(),Me}async function Ee(a){return(await be()).protected.indexOf(z(a))>=0}async function xe(a){return a=z(a),!a||ge(a)?!0:!await Ee(a)}async function Pe(a){return ge(a)&&P.me&&P.me.look?P.me.look:(await be()).look[z(a)]||null}function qe(a){return a=z(a),a?ge(a)&&P.me&&P.me.look?P.me.look:ne&&ne.look&&ne.look[a]||null:null}function Te(a){if(x()){P.me=Object.assign({},P.me,{look:Object.assign({},a||{})}),re($,P);try{sessionStorage.removeItem(S)}catch{}if(ne&&ne.look){const s=z(P.me.linked||P.me.code);ne.look[s]=P.me.look}Q(\"ocdAuthLookChanged\",{look:P.me.look})}}async function Ae(){if(!x())return null;if(P.checked&&Date.now()-P.checked<600*1e3)return P.me;const a=await Y(\"authMe\",{token:x()});return a.ok?(P.me=a.me,P.checked=Date.now(),re($,P),a.me):(a.expired&&Z(!1),X())}const Be=`\n.oa-back{position:fixed;inset:0;z-index:2147483600;background:rgba(30,22,16,.55);display:flex;align-items:center;justify-content:center;padding:16px;font-family:Arial,sans-serif}\n.oa-box{background:#fffaf2;color:#2c241b;border-radius:14px;max-width:400px;width:100%;max-height:92vh;overflow:auto;box-shadow:0 18px 50px rgba(0,0,0,.3);border-top:5px solid #8b3328}\n.oa-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 6px}\n.oa-title{font:bold 17px/1.4 Georgia,\"Times New Roman\",serif;color:#8b3328;margin:0}\n.oa-x{border:0;background:none;font-size:24px;line-height:1;color:#8b7b6a;cursor:pointer;padding:2px 6px}\n.oa-body{padding:6px 18px 18px}\n.oa-text{font-size:14px;line-height:1.6;margin:0 0 12px;color:#4e4436}\n.oa-label{display:block;font-size:13px;font-weight:bold;margin:10px 0 4px;color:#5a4a3a}\n.oa-field{position:relative}\n.oa-input{box-sizing:border-box;width:100%;padding:11px 12px;border:1px solid #d8ccb8;border-radius:8px;font-size:16px;background:#fff;color:#2c241b}\n.oa-input:focus{outline:2px solid #c9a45c;border-color:#c9a45c}\n.oa-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:none;cursor:pointer;font-size:16px;padding:6px;color:#8b7b6a}\n.oa-btn{display:block;width:100%;margin-top:16px;padding:12px;border:0;border-radius:8px;background:#8b3328;color:#fffaf0;font:bold 14px Arial,sans-serif;letter-spacing:.5px;cursor:pointer}\n.oa-btn[disabled]{opacity:.6;cursor:wait}\n.oa-btn.oa-ghost{background:#f1e6d3;color:#8b3328}\n.oa-links{display:flex;justify-content:space-between;gap:10px;margin-top:12px;font-size:13px}\n.oa-link{border:0;background:none;color:#8b3328;text-decoration:underline;cursor:pointer;padding:0;font-size:13px}\n.oa-msg{margin-top:12px;font-size:13px;line-height:1.5;padding:9px 11px;border-radius:7px;display:none}\n.oa-msg.err{display:block;background:#fbe9e6;color:#8b2a1f}\n.oa-msg.ok{display:block;background:#e9f4e6;color:#2f5d26}\n.oa-hint{font-size:12px;color:#8b7b6a;margin-top:6px;line-height:1.5}\n.oa-steps{font-size:12px;color:#8b7b6a;margin:0 0 8px;letter-spacing:.5px}\n.oa-badge{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:bold;color:#2f5d26}\n.oa-card{margin:10px 0;padding:12px 13px;border-radius:10px;background:#f6efe2;border:1px solid #e3d5bd;font-family:Arial,sans-serif}\n.oa-card-title{font-weight:bold;font-size:13px;letter-spacing:.5px;color:#8b3328;margin-bottom:6px}\n.oa-card-text{font-size:13px;line-height:1.55;color:#4e4436;margin:0 0 8px}\n.oa-card .oa-btn{margin-top:6px;padding:10px}\n.oa-card-row{display:flex;gap:8px;flex-wrap:wrap}\n.oa-card-row .oa-btn{flex:1;min-width:120px}\n.oa-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:2147483500;max-width:min(440px,calc(100% - 32px));background:#2c241b;color:#fffaf0;border-radius:12px;padding:14px 16px;box-shadow:0 10px 30px rgba(0,0,0,.35);font:14px/1.5 Arial,sans-serif}\n.oa-toast .oa-btn{margin-top:10px;padding:10px}\n.oa-toast-x{position:absolute;right:8px;top:4px;border:0;background:none;color:#d8ccb8;font-size:20px;cursor:pointer}\n`;function De(){if(document.getElementById(\"oa-style\"))return;const a=document.createElement(\"style\");a.id=\"oa-style\",a.textContent=Be,(document.head||document.documentElement).appendChild(a)}function v(a,s,u){const f=document.createElement(a);return s&&(f.className=s),u!==void 0&&(f.textContent=u),f}function oe(a,s,u,f){const b=v(\"div\");b.appendChild(v(\"label\",\"oa-label\",a));const T=v(\"div\",\"oa-field\"),I=v(\"input\",\"oa-input\");if(I.type=s||\"text\",I.value=u||\"\",f&&(I.placeholder=f),I.autocomplete=s===\"password\"?\"current-password\":\"off\",T.appendChild(I),s===\"password\"){const F=v(\"button\",\"oa-eye\",\"\\u{1F441}\");F.type=\"button\",F.setAttribute(\"aria-label\",\"Hi\\u1EC7n m\\u1EADt kh\\u1EA9u\"),F.onclick=function(){I.type=I.type===\"password\"?\"text\":\"password\"},T.appendChild(F)}return b.appendChild(T),b.input=I,b}let Oe=null;function ie(){Oe&&(Oe.remove(),Oe=null,document.removeEventListener(\"keydown\",He))}function He(a){a.key===\"Escape\"&&ie()}function Ne(a){De(),ie();const s=v(\"div\",\"oa-back\"),u=v(\"div\",\"oa-box\"),f=v(\"div\",\"oa-head\"),b=v(\"div\",\"oa-body\");u.setAttribute(\"role\",\"dialog\"),u.setAttribute(\"aria-modal\",\"true\"),f.appendChild(v(\"h3\",\"oa-title\",a));const T=v(\"button\",\"oa-x\",\"\\xD7\");T.type=\"button\",T.setAttribute(\"aria-label\",\"\\u0110\\xF3ng\"),T.onclick=ie,f.appendChild(T),u.append(f,b),s.appendChild(u),s.addEventListener(\"click\",function(F){F.target===s&&ie()}),document.body.appendChild(s),Oe=s,document.addEventListener(\"keydown\",He);const I=v(\"div\",\"oa-msg\");return{body:b,msg:I,say:function(F,j){I.className=\"oa-msg \"+(j?\"ok\":\"err\"),I.textContent=F},hush:function(){I.className=\"oa-msg\",I.textContent=\"\"}}}function ee(a,s,u){s?(a.dataset.t=a.textContent,a.textContent=u||\"\\u0110ANG X\\u1EEC L\\xDD...\",a.disabled=!0):(a.textContent=a.dataset.t||a.textContent,a.disabled=!1)}function he(a,s){a.forEach(function(u){u.input.addEventListener(\"keydown\",function(f){f.key===\"Enter\"&&s()})})}function Re(a,s){return a.length<6?\"M\\u1EADt kh\\u1EA9u c\\u1EA7n t\\u1ED1i thi\\u1EC3u 6 k\\xFD t\\u1EF1.\":a!==s?\"Hai l\\u1EA7n nh\\u1EADp m\\u1EADt kh\\u1EA9u ch\\u01B0a gi\\u1ED1ng nhau.\":\"\"}function le(a){a=a||{};const s=Ne(\"\\u{1F512} \\u0110\\u0103ng nh\\u1EADp t\\xE0i kho\\u1EA3n\");s.body.appendChild(v(\"p\",\"oa-text\",a.code?\"M\\xE3 \"+z(a.code)+\" \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c b\\u1EA3o m\\u1EADt. Vui l\\xF2ng nh\\u1EADp m\\u1EADt kh\\u1EA9u \\u0111\\u1EC3 ti\\u1EBFp t\\u1EE5c.\":\"\\u0110\\u0103ng nh\\u1EADp b\\u1EB1ng m\\xE3 h\\u1ECDc vi\\xEAn, m\\xE3 th\\xE0nh vi\\xEAn ho\\u1EB7c email.\"));const u=oe(\"M\\xE3 h\\u1ECDc vi\\xEAn / m\\xE3 th\\xE0nh vi\\xEAn / email\",\"text\",a.code||\"\"),f=oe(\"M\\u1EADt kh\\u1EA9u\",\"password\"),b=v(\"button\",\"oa-btn\",\"\\u0110\\u0102NG NH\\u1EACP\");b.type=\"button\";const T=v(\"div\",\"oa-links\"),I=v(\"button\",\"oa-link\",\"Qu\\xEAn m\\u1EADt kh\\u1EA9u?\"),F=v(\"button\",\"oa-link\",a.code?\"Nh\\u1EADp m\\xE3 kh\\xE1c\":\"\\u0110\\xF3ng\");I.type=F.type=\"button\",T.append(I,F),s.body.append(u,f,b,T,s.msg);async function j(){if(s.hush(),!u.input.value.trim()||!f.input.value){s.say(\"Vui l\\xF2ng nh\\u1EADp \\u0111\\u1EE7 m\\xE3 (ho\\u1EB7c email) v\\xE0 m\\u1EADt kh\\u1EA9u.\");return}ee(b,!0,\"\\u0110ANG \\u0110\\u0102NG NH\\u1EACP...\");const E=await Y(\"authLogin\",{id:u.input.value.trim(),password:f.input.value});if(ee(b,!1),!E.ok){s.say(E.error||\"\\u0110\\u0103ng nh\\u1EADp ch\\u01B0a th\\xE0nh c\\xF4ng.\"),f.input.select();return}Ie(E),ie(),a.onSuccess&&a.onSuccess(E.me)}b.onclick=j,he([u,f],j),I.onclick=function(){Ge({id:u.input.value.trim(),onSuccess:a.onSuccess})},F.onclick=function(){ie(),a.onCancel&&a.onCancel()},(a.code?f:u).input.focus()}function Ke(a){a=a||{};const s=z(a.code),u=Ne(\"\\u{1F512} N\\xE2ng c\\u1EA5p b\\u1EA3o m\\u1EADt\");u.body.appendChild(v(\"div\",\"oa-steps\",\"B\\u01AF\\u1EDAC 1/2 \\xB7 X\\xC1C MINH CH\\u1EE6 T\\xC0I KHO\\u1EA2N\")),u.body.appendChild(v(\"p\",\"oa-text\",\"M\\xE3 h\\u1ECDc vi\\xEAn \"+s+\". Nh\\u1EADp \\u0111\\xFAng s\\u1ED1 \\u0111i\\u1EC7n tho\\u1EA1i v\\xE0 email b\\u1EA1n \\u0111\\xE3 d\\xF9ng khi \\u0111\\u0103ng k\\xFD kho\\xE1 h\\u1ECDc.\"));const f=oe(\"S\\u1ED1 \\u0111i\\u1EC7n tho\\u1EA1i \\u0111\\xE3 \\u0111\\u0103ng k\\xFD\",\"tel\"),b=oe(\"Email \\u0111\\xE3 \\u0111\\u0103ng k\\xFD\",\"email\"),T=v(\"button\",\"oa-btn\",\"X\\xC1C MINH\");T.type=\"button\",u.body.append(f,b,T,u.msg);async function I(){if(u.hush(),!f.input.value.trim()||!b.input.value.trim()){u.say(\"Vui l\\xF2ng nh\\u1EADp \\u0111\\u1EE7 s\\u1ED1 \\u0111i\\u1EC7n tho\\u1EA1i v\\xE0 email.\");return}ee(T,!0,\"\\u0110ANG X\\xC1C MINH...\");const E=await Y(\"authUpgradeStart\",{code:s,phone:f.input.value,email:b.input.value});if(ee(T,!1),!E.ok){u.say(E.error||\"Ch\\u01B0a x\\xE1c minh \\u0111\\u01B0\\u1EE3c.\");return}F(E.ticket,E.name)}T.onclick=I,he([f,b],I),f.input.focus();function F(E,J){u.body.innerHTML=\"\",u.hush(),u.body.appendChild(v(\"div\",\"oa-steps\",\"B\\u01AF\\u1EDAC 2/2 \\xB7 \\u0110\\u1EB6T M\\u1EACT KH\\u1EA8U\")),u.body.appendChild(v(\"p\",\"oa-text\",\"Xin ch\\xE0o \"+(J||s)+\". H\\xE3y \\u0111\\u1EB7t m\\u1EADt kh\\u1EA9u cho t\\xE0i kho\\u1EA3n \"+s+\".\"));const q=oe(\"M\\u1EADt kh\\u1EA9u m\\u1EDBi\",\"password\"),ae=oe(\"Nh\\u1EADp l\\u1EA1i m\\u1EADt kh\\u1EA9u\",\"password\");q.input.autocomplete=ae.input.autocomplete=\"new-password\",u.body.append(q,ae,v(\"div\",\"oa-hint\",\"T\\u1ED1i thi\\u1EC3u 6 k\\xFD t\\u1EF1. Kh\\xF4ng d\\xF9ng m\\xE3 h\\u1ECDc vi\\xEAn hay s\\u1ED1 \\u0111i\\u1EC7n tho\\u1EA1i l\\xE0m m\\u1EADt kh\\u1EA9u.\"));const de=v(\"button\",\"oa-btn\",\"L\\u01AFU M\\u1EACT KH\\u1EA8U\");de.type=\"button\",u.body.append(de,u.msg);async function pe(){u.hush();const $e=Re(q.input.value,ae.input.value);if($e){u.say($e);return}ee(de,!0,\"\\u0110ANG L\\u01AFU...\");const _e=await Y(\"authUpgradeFinish\",{ticket:E,password:q.input.value});if(ee(de,!1),!_e.ok){u.say(_e.error||\"Ch\\u01B0a l\\u01B0u \\u0111\\u01B0\\u1EE3c m\\u1EADt kh\\u1EA9u.\");return}Ie(_e),j()}de.onclick=pe,he([q,ae],pe),q.input.focus()}function j(){u.body.innerHTML=\"\",u.body.appendChild(v(\"p\",\"oa-text\",\"\\u2705 T\\xE0i kho\\u1EA3n \"+s+\" \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c b\\u1EA3o m\\u1EADt. T\\u1EEB nay ng\\u01B0\\u1EDDi kh\\xE1c kh\\xF4ng th\\u1EC3 tra c\\u1EE9u h\\u1ED3 s\\u01A1 c\\u1EE7a b\\u1EA1n. B\\u1EA1n \\u0111ang \\u0111\\u0103ng nh\\u1EADp tr\\xEAn thi\\u1EBFt b\\u1ECB n\\xE0y (30 ng\\xE0y).\"));const E=v(\"button\",\"oa-btn\",\"HO\\xC0N T\\u1EA4T\");E.type=\"button\",E.onclick=function(){ie(),a.onSuccess&&a.onSuccess(X())},u.body.appendChild(E)}}function Ge(a){a=a||{};const s=Ne(\"Qu\\xEAn m\\u1EADt kh\\u1EA9u\");s.body.appendChild(v(\"p\",\"oa-text\",\"Nh\\u1EADp m\\xE3 h\\u1ECDc vi\\xEAn, m\\xE3 th\\xE0nh vi\\xEAn ho\\u1EB7c email. Minh H\\u1ED3ng s\\u1EBD g\\u1EEDi m\\xE3 x\\xE1c nh\\u1EADn 6 s\\u1ED1 t\\u1EDBi email \\u0111\\xE3 \\u0111\\u0103ng k\\xFD c\\u1EE7a t\\xE0i kho\\u1EA3n.\"));const u=oe(\"M\\xE3 / email\",\"text\",a.id||\"\"),f=v(\"button\",\"oa-btn\",\"G\\u1EECI M\\xC3 X\\xC1C NH\\u1EACN\");f.type=\"button\",s.body.append(u,f,s.msg);async function b(){if(s.hush(),!u.input.value.trim()){s.say(\"Vui l\\xF2ng nh\\u1EADp m\\xE3 ho\\u1EB7c email.\");return}ee(f,!0,\"\\u0110ANG G\\u1EECI...\");const I=await Y(\"authForgot\",{id:u.input.value.trim()});if(ee(f,!1),!I.ok){s.say(I.error||\"Ch\\u01B0a g\\u1EEDi \\u0111\\u01B0\\u1EE3c m\\xE3.\");return}if(!I.sentTo){s.say(\"Kh\\xF4ng t\\xECm th\\u1EA5y t\\xE0i kho\\u1EA3n \\u0111\\xE3 b\\u1EA3o m\\u1EADt v\\u1EDBi th\\xF4ng tin n\\xE0y, ho\\u1EB7c t\\xE0i kho\\u1EA3n ch\\u01B0a c\\xF3 email. Vui l\\xF2ng li\\xEAn h\\u1EC7 gi\\xE1o vi\\xEAn.\");return}T(u.input.value.trim(),I.sentTo)}f.onclick=b,he([u],b),u.input.focus();function T(I,F){s.body.innerHTML=\"\",s.hush(),s.body.appendChild(v(\"p\",\"oa-text\",\"\\u0110\\xE3 g\\u1EEDi m\\xE3 x\\xE1c nh\\u1EADn t\\u1EDBi \"+F+\" (c\\xF3 hi\\u1EC7u l\\u1EF1c 15 ph\\xFAt). Ki\\u1EC3m tra c\\u1EA3 th\\u01B0 m\\u1EE5c Spam/Qu\\u1EA3ng c\\xE1o.\"));const j=oe(\"M\\xE3 x\\xE1c nh\\u1EADn 6 s\\u1ED1\",\"text\",\"\",\"______\"),E=oe(\"M\\u1EADt kh\\u1EA9u m\\u1EDBi\",\"password\"),J=oe(\"Nh\\u1EADp l\\u1EA1i m\\u1EADt kh\\u1EA9u\",\"password\");j.input.inputMode=\"numeric\",E.input.autocomplete=J.input.autocomplete=\"new-password\";const q=v(\"button\",\"oa-btn\",\"\\u0110\\u1EB6T L\\u1EA0I M\\u1EACT KH\\u1EA8U\");q.type=\"button\",s.body.append(j,E,J,q,s.msg);async function ae(){s.hush();const de=Re(E.input.value,J.input.value);if(de){s.say(de);return}ee(q,!0,\"\\u0110ANG \\u0110\\u1EB6T L\\u1EA0I...\");const pe=await Y(\"authReset\",{id:I,otp:j.input.value.trim(),password:E.input.value});if(ee(q,!1),!pe.ok){s.say(pe.error||\"Ch\\u01B0a \\u0111\\u1EB7t l\\u1EA1i \\u0111\\u01B0\\u1EE3c m\\u1EADt kh\\u1EA9u.\");return}Ie(pe),ie(),a.onSuccess&&a.onSuccess(pe.me)}q.onclick=ae,he([j,E,J],ae),j.input.focus()}}function i(a){a=a||{};const s=X();if(!s){le(a);return}const u=Ne(\"T\\xE0i kho\\u1EA3n c\\u1EE7a b\\u1EA1n\");u.body.appendChild(v(\"div\",\"oa-badge\",\"\\u{1F512} \"+(s.name||\"\")+\" \\xB7 \"+(s.linked||s.code))),u.body.appendChild(v(\"p\",\"oa-hint\",\"Email: \"+(s.email||\"\\u2013\")+\" \\xB7 \\u0110\\u0103ng nh\\u1EADp tr\\xEAn thi\\u1EBFt b\\u1ECB n\\xE0y \\u0111\\u1EBFn \"+new Date(P.expires).toLocaleDateString(\"vi-VN\")));const f=v(\"button\",\"oa-btn oa-ghost\",\"\\u0110\\u1ED4I M\\u1EACT KH\\u1EA8U\"),b=v(\"button\",\"oa-btn\",\"\\u0110\\u0102NG XU\\u1EA4T\"),T=v(\"button\",\"oa-btn oa-ghost\",\"\\u0110\\u0102NG XU\\u1EA4T KH\\u1ECEI M\\u1ECCI THI\\u1EBET B\\u1ECA\");[f,b,T].forEach(function(I){I.type=\"button\"}),u.body.append(f,b,T,u.msg),b.onclick=async function(){ee(b,!0),await Y(\"authLogout\",{token:x()}),Z(!0),ie(),a.onLogout&&a.onLogout()},T.onclick=async function(){confirm(\"\\u0110\\u0103ng xu\\u1EA5t t\\xE0i kho\\u1EA3n tr\\xEAn t\\u1EA5t c\\u1EA3 thi\\u1EBFt b\\u1ECB?\")&&(ee(T,!0),await Y(\"authLogout\",{token:x(),all:!0}),Z(!0),ie(),a.onLogout&&a.onLogout())},f.onclick=function(){u.body.innerHTML=\"\",u.hush();const I=oe(\"M\\u1EADt kh\\u1EA9u hi\\u1EC7n t\\u1EA1i\",\"password\"),F=oe(\"M\\u1EADt kh\\u1EA9u m\\u1EDBi\",\"password\"),j=oe(\"Nh\\u1EADp l\\u1EA1i m\\u1EADt kh\\u1EA9u m\\u1EDBi\",\"password\");F.input.autocomplete=j.input.autocomplete=\"new-password\";const E=v(\"button\",\"oa-btn\",\"L\\u01AFU M\\u1EACT KH\\u1EA8U M\\u1EDAI\");E.type=\"button\",u.body.append(I,F,j,v(\"div\",\"oa-hint\",\"Sau khi \\u0111\\u1ED5i, c\\xE1c thi\\u1EBFt b\\u1ECB kh\\xE1c s\\u1EBD ph\\u1EA3i \\u0111\\u0103ng nh\\u1EADp l\\u1EA1i.\"),E,u.msg),E.onclick=async function(){u.hush();const J=Re(F.input.value,j.input.value);if(J){u.say(J);return}ee(E,!0);const q=await Y(\"authChangePw\",{token:x(),oldPassword:I.input.value,password:F.input.value});if(ee(E,!1),!q.ok){u.say(q.error||\"Ch\\u01B0a \\u0111\\u1ED5i \\u0111\\u01B0\\u1EE3c m\\u1EADt kh\\u1EA9u.\");return}P.token=q.token,P.expires=q.expires,re($,P),u.body.innerHTML=\"\",u.body.appendChild(v(\"p\",\"oa-text\",\"\\u2705 \\u0110\\xE3 \\u0111\\u1ED5i m\\u1EADt kh\\u1EA9u.\"));const ae=v(\"button\",\"oa-btn\",\"\\u0110\\xD3NG\");ae.type=\"button\",ae.onclick=ie,u.body.appendChild(ae)},I.input.focus()}}let d=null;function y(a,s){De(),d&&d.remove(),d=v(\"div\",\"oa-toast\"),d.setAttribute(\"role\",\"alert\");const u=v(\"button\",\"oa-toast-x\",\"\\xD7\");u.type=\"button\",u.onclick=function(){d.remove(),d=null},d.append(u,v(\"div\",\"\",\"\\u{1F512} H\\u1ED3 s\\u01A1 \"+z(a)+\" \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c ch\\u1EE7 t\\xE0i kho\\u1EA3n b\\u1EA3o m\\u1EADt.\"));const f=v(\"button\",\"oa-btn\",\"\\u0110\\xC2Y L\\xC0 T\\xD4I \\u2013 \\u0110\\u0102NG NH\\u1EACP\");f.type=\"button\",f.onclick=function(){d.remove(),d=null,le({code:a,onSuccess:s||function(){location.reload()}})},d.appendChild(f),document.body.appendChild(d)}async function p(a,s){if(a=z(a),!a)return!1;if(ge(a))return!0;let u=null;try{u=await Y(\"authStatus\",{code:a})}catch{}return!u||!u.ok?!await Ee(a):u.protected?(le(Object.assign({},s||{},{code:a})),!1):!0}function C(a,s){De(),a=z(a);const u=v(\"div\",\"oa-card\");u.appendChild(v(\"div\",\"oa-card-text\",\"\\u0110ang ki\\u1EC3m tra b\\u1EA3o m\\u1EADt t\\xE0i kho\\u1EA3n\\u2026\"));const f=function(){s&&s()};return(async function(){if(ge(a)){const I=X();u.innerHTML=\"\",u.appendChild(v(\"div\",\"oa-badge\",\"\\u{1F512} \"+(I.name||\"\")+\" \\xB7 \\u0110\\xE3 b\\u1EA3o m\\u1EADt\"));const F=v(\"div\",\"oa-card-row\"),j=v(\"button\",\"oa-btn oa-ghost\",\"T\\xC0I KHO\\u1EA2N\");j.type=\"button\",j.onclick=function(){i({onLogout:f})},F.appendChild(j),u.appendChild(F);return}let b=null;try{b=await Y(\"authStatus\",{code:a})}catch{}if(u.innerHTML=\"\",!b||!b.ok){u.appendChild(v(\"div\",\"oa-card-text\",\"Ch\\u01B0a ki\\u1EC3m tra \\u0111\\u01B0\\u1EE3c tr\\u1EA1ng th\\xE1i b\\u1EA3o m\\u1EADt. Vui l\\xF2ng th\\u1EED l\\u1EA1i sau.\"));return}if(b.protected){u.appendChild(v(\"div\",\"oa-card-title\",\"\\u{1F512} M\\xC3 \\u0110\\xC3 \\u0110\\u01AF\\u1EE2C B\\u1EA2O M\\u1EACT\")),u.appendChild(v(\"p\",\"oa-card-text\",\"M\\xE3 \"+a+\" \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c b\\u1EA3o m\\u1EADt. \\u0110\\u0103ng nh\\u1EADp \\u0111\\u1EC3 xem h\\u1ED3 s\\u01A1 v\\xE0 s\\u1EED d\\u1EE5ng c\\xE1c ch\\u1EE9c n\\u0103ng h\\u1ECDc t\\u1EADp.\"));const I=v(\"button\",\"oa-btn\",\"\\u0110\\u0102NG NH\\u1EACP\");I.type=\"button\",I.onclick=function(){le({code:a,onSuccess:f})},u.appendChild(I);return}u.appendChild(v(\"div\",\"oa-card-title\",\"\\u{1F512} B\\u1EA2O M\\u1EACT T\\xC0I KHO\\u1EA2N\")),u.appendChild(v(\"p\",\"oa-card-text\",\"Hi\\u1EC7n ai bi\\u1EBFt m\\xE3 \"+a+\" c\\u0169ng xem \\u0111\\u01B0\\u1EE3c h\\u1ED3 s\\u01A1 v\\xE0 d\\xF9ng m\\xE3 n\\xE0y tr\\xEAn c\\xE1c trang. N\\xE2ng c\\u1EA5p \\u0111\\u1EC3 ch\\u1EC9 b\\u1EA1n xem v\\xE0 d\\xF9ng \\u0111\\u01B0\\u1EE3c.\"));const T=v(\"button\",\"oa-btn\",\"N\\xC2NG C\\u1EA4P B\\u1EA2O M\\u1EACT\");T.type=\"button\",T.onclick=function(){Ke({code:a,onSuccess:f})},u.appendChild(T)})(),u}function G(a){return a&&(a.publicList||a.ocdAuthBulk)||window.OCD_AUTH_PUBLIC_LIST===!0?!0:!!document.getElementById(\"rankingContent\")}const D={};function _(){try{const a=window.OCDStudentSession;return z(a&&a.getCode?a.getCode():\"\")}catch{return\"\"}}function m(a){const s=new Error(\"\\u{1F512} H\\u1ED3 s\\u01A1 \"+z(a)+\" \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c ch\\u1EE7 t\\xE0i kho\\u1EA3n b\\u1EA3o m\\u1EADt. N\\u1EBFu \\u0111\\xE2y l\\xE0 b\\u1EA1n, h\\xE3y \\u0111\\u0103ng nh\\u1EADp t\\u1EA1i icon Minh H\\u1ED3ng.\");return s.code=\"STUDENT_PROTECTED\",s.studentCode=z(a),s}function w(a){if(!a||a.__ocdAuthGuard||typeof a.assertStudentActive!=\"function\")return;a.__ocdAuthGuard=!0;const s=a.assertStudentActive.bind(a);a.assertStudentActive=async function(u,f){if(!G(f)&&!await xe(u)){const b=z(u);throw(b===_()||f&&f.interactive)&&!D[b]&&(D[b]=1,y(u)),Q(\"ocdProfileLocked\",{code:b,silent:b!==_()}),m(u)}return s(u,f)},a.auth=window.OCDAuth}window.OCDAuth={version:\"1.1.1\",acceptSession:function(a){a&&a.token&&a.expires&&Ie(a)},setLook:Te,lookCached:qe,token:x,me:X,isMe:ge,refreshMe:Ae,publicInfo:be,isProtected:Ee,canView:xe,lookOf:Pe,post:Y,ensureAccess:p,securityCard:C,lockedToast:y,openLogin:le,openUpgrade:Ke,openForgot:Ge,openAccount:i,close:ie,logout:async function(a){x()&&await Y(\"authLogout\",{token:x(),all:!!a}),Z(!0)},lockedError:m},w(U),window.StudentRewardSystemReady&&window.StudentRewardSystemReady.then&&window.StudentRewardSystemReady.then(function(a){w(a||window.StudentRewardSystem)}).catch(function(){}),x()&&setTimeout(Ae,1500),setTimeout(function(){be().catch(function(){})},600)})();\n");
css("minh-hong/minh-hong-footer.css","#ocdMinhHongRoot{\n    position:fixed;\n    right:18px;\n    bottom:96px;\n    z-index:2147483000;\n \n    font-family:\n        Arial,\n        Helvetica,\n        sans-serif;\n}\n \n \n/* =========================================================\n   LAUNCHER\n========================================================= */\n \n.mh-launcher{\n    position:relative;\n \n    width:68px;\n    height:68px;\n \n    padding:0;\n \n    border:\n        3px solid\n        rgba(255,255,255,.98);\n \n    border-radius:50%;\n \n    background:#fff;\n \n    box-shadow:\n        0 10px 30px\n        rgba(51,34,22,.25);\n \n    cursor:pointer;\n \n    overflow:visible;\n \n    transition:\n        transform .2s ease,\n        box-shadow .2s ease;\n}\n \n \n.mh-launcher:hover{\n    transform:translateY(-2px);\n \n    box-shadow:\n        0 14px 36px\n        rgba(51,34,22,.30);\n}\n \n \n.mh-launcher-image-wrap{\n    width:100%;\n    height:100%;\n \n    box-sizing:border-box;\n    overflow:hidden;\n \n    border-radius:50%;\n \n    background:#f4e6d4;\n \n    display:flex;\n    align-items:center;\n    justify-content:center;\n}\n \n \n.mh-launcher-image{\n    width:100%;\n    height:100%;\n \n    display:block;\n \n    object-fit:cover;\n    object-position:center;\n}\n \n \n.mh-avatar-fallback{\n    color:#704729;\n \n    font-family:\n        Georgia,\n        serif;\n \n    font-size:20px;\n    font-weight:800;\n}\n \n \n.mh-online-dot{\n    position:absolute;\n \n    right:1px;\n    bottom:2px;\n \n    width:14px;\n    height:14px;\n \n    box-sizing:border-box;\n \n    border:2px solid #fff;\n    border-radius:50%;\n \n    background:#22c55e;\n}\n \n \n/* =========================================================\n   NOTIFICATION\n========================================================= */\n \n.mh-notification{\n    position:absolute;\n \n    right:4px;\n    bottom:82px;\n \n    width:365px;\n \n    max-width:\n        calc(100vw - 32px);\n \n    box-sizing:border-box;\n \n    display:flex;\n    align-items:flex-start;\n \n    gap:11px;\n \n    padding:\n        13px\n        36px\n        14px\n        13px;\n \n    background:\n        rgba(255,255,255,.985);\n \n    border:\n        1px solid #e7ded3;\n \n    border-radius:16px;\n \n    box-shadow:\n        0 16px 42px\n        rgba(0,0,0,.17);\n \n    opacity:0;\n    visibility:hidden;\n    pointer-events:none;\n \n    transform:\n        translateY(12px)\n        scale(.98);\n \n    transition:\n        opacity .3s ease,\n        visibility .3s ease,\n        transform .3s ease;\n}\n \n \n.mh-notification.mh-show{\n    opacity:1;\n    visibility:visible;\n    pointer-events:auto;\n \n    transform:\n        translateY(0)\n        scale(1);\n}\n \n \n.mh-notification:after{\n    content:\"\";\n \n    position:absolute;\n \n    right:24px;\n    bottom:-9px;\n \n    width:18px;\n    height:18px;\n \n    background:#fff;\n \n    border-right:\n        1px solid #e7ded3;\n \n    border-bottom:\n        1px solid #e7ded3;\n \n    transform:\n        rotate(45deg);\n}\n \n \n.mh-notification-icon{\n    width:43px;\n    height:43px;\n \n    flex:\n        0 0 43px;\n \n    display:flex;\n    align-items:center;\n    justify-content:center;\n \n    border-radius:50%;\n \n    background:#fff5df;\n \n    font-size:21px;\n}\n \n \n.mh-notification.mh-upload\n.mh-notification-icon{\n    background:#eaf3ff;\n}\n \n \n.mh-notification.mh-comment\n.mh-notification-icon{\n    background:#f5efff;\n}\n \n \n.mh-notification.mh-personal\n.mh-notification-icon{\n    background:#fff4dd;\n}\n \n \n.mh-notification-content{\n    flex:1;\n    min-width:0;\n}\n \n \n.mh-notification-label{\n    margin-bottom:3px;\n \n    color:#a16207;\n \n    font-size:9px;\n    font-weight:900;\n \n    letter-spacing:.55px;\n}\n \n \n.mh-notification-title{\n    color:#28211c;\n \n    font-size:13px;\n    font-weight:900;\n \n    line-height:1.45;\n}\n \n \n.mh-notification-text{\n    margin-top:2px;\n \n    color:#554b43;\n \n    font-size:12px;\n    line-height:1.55;\n \n    word-break:break-word;\n}\n \n \n.mh-notification-time{\n    margin-top:5px;\n \n    color:#9a9189;\n \n    font-size:10px;\n}\n \n \n.mh-notification-close{\n    position:absolute;\n \n    right:7px;\n    top:5px;\n \n    width:27px;\n    height:27px;\n \n    padding:0;\n \n    border:0;\n \n    background:transparent;\n \n    color:#a0978e;\n \n    font-size:20px;\n \n    cursor:pointer;\n}\n \n \n.mh-notification-progress{\n    position:absolute;\n \n    left:12px;\n    right:12px;\n    bottom:0;\n \n    height:3px;\n \n    overflow:hidden;\n}\n \n \n.mh-notification-progress-bar{\n    width:0;\n    height:100%;\n \n    background:#d7962f;\n}\n \n \n.mh-notification.mh-upload\n.mh-notification-progress-bar{\n    background:#3b82f6;\n}\n \n \n.mh-notification.mh-comment\n.mh-notification-progress-bar{\n    background:#8b5cf6;\n}\n \n \n.mh-notification.mh-show\n.mh-notification-progress-bar{\n    animation:\n        mhNotificationProgress\n        6500ms\n        linear\n        forwards;\n}\n \n \n@keyframes mhNotificationProgress{\n \n    from{\n        width:0;\n    }\n \n    to{\n        width:100%;\n    }\n \n}\n \n \n/* =========================================================\n   PANEL v1.3.1\n \n   Khoảng 50% màn hình.\n \n   50vh:\n   fallback cho trình duyệt cũ.\n \n   50dvh:\n   phù hợp hơn Safari/iPhone khi thanh trình duyệt thay đổi.\n========================================================= */\n \n.mh-panel{\n    position:absolute;\n \n    right:0;\n    bottom:83px;\n \n    width:385px;\n \n    max-width:\n        calc(100vw - 28px);\n \n    height:50vh;\n    height:50dvh;\n \n    min-height:300px;\n \n    max-height:50vh;\n    max-height:50dvh;\n \n    box-sizing:border-box;\n \n    overflow:hidden;\n \n    display:flex;\n    flex-direction:column;\n \n    background:#fffdf8;\n \n    border:\n        1px solid #dfd1bd;\n \n    border-radius:21px;\n \n    box-shadow:\n        0 22px 58px\n        rgba(0,0,0,.22);\n \n    opacity:0;\n    visibility:hidden;\n    pointer-events:none;\n \n    transform:\n        translateY(15px)\n        scale(.98);\n \n    transition:\n        opacity .25s ease,\n        visibility .25s ease,\n        transform .25s ease;\n}\n \n \n#ocdMinhHongRoot.mh-panel-open\n.mh-panel{\n    opacity:1;\n    visibility:visible;\n    pointer-events:auto;\n \n    transform:\n        translateY(0)\n        scale(1);\n}\n \n \n/* =========================================================\n   HEADER\n========================================================= */\n \n.mh-panel-header{\n    position:relative;\n \n    flex:\n        0 0 auto;\n \n    display:flex;\n    align-items:center;\n \n    gap:11px;\n \n    padding:\n        12px\n        88px\n        11px\n        13px;\n \n    background:\n        radial-gradient(\n            circle at top left,\n            rgba(218,164,91,.17),\n            transparent 48%\n        ),\n        linear-gradient(\n            135deg,\n            #fff8e9,\n            #f6ecdd\n        );\n \n    border-bottom:\n        1px solid #e7dac8;\n}\n \n \n.mh-panel-avatar{\n    width:44px;\n    height:44px;\n \n    flex:\n        0 0 44px;\n \n    overflow:hidden;\n \n    border-radius:50%;\n \n    border:\n        2px solid #fff;\n \n    background:#f3e4d2;\n \n    display:flex;\n    align-items:center;\n    justify-content:center;\n}\n \n \n.mh-panel-avatar img{\n    width:100%;\n    height:100%;\n \n    display:block;\n \n    object-fit:cover;\n}\n \n \n.mh-panel-name{\n    color:#513927;\n \n    font-size:14px;\n    font-weight:900;\n}\n \n \n.mh-panel-role{\n    margin-top:2px;\n \n    color:#8c725d;\n \n    font-size:10px;\n    line-height:1.35;\n}\n \n \n.mh-header-actions{\n    position:absolute;\n \n    right:9px;\n    top:9px;\n \n    display:flex;\n    gap:3px;\n}\n \n \n.mh-header-button{\n    width:29px;\n    height:29px;\n \n    padding:0;\n \n    border:0;\n    border-radius:50%;\n \n    background:\n        rgba(255,255,255,.65);\n \n    color:#88725f;\n \n    font-size:15px;\n \n    cursor:pointer;\n}\n \n \n/* =========================================================\n   SCROLL AREA\n========================================================= */\n \n.mh-panel-scroll{\n    flex:\n        1 1 auto;\n \n    min-height:0;\n \n    overflow-y:auto;\n    overflow-x:hidden;\n \n    overscroll-behavior:contain;\n \n    -webkit-overflow-scrolling:touch;\n}\n \n \n.mh-panel-body{\n    padding:\n        12px\n        14px\n        16px;\n}\n \n \n/* =========================================================\n   FOOTER\n========================================================= */\n \n.mh-panel-footer{\n    flex:\n        0 0 auto;\n \n    padding:\n        7px\n        12px;\n \n    border-top:\n        1px solid #ebe0d1;\n \n    background:#faf6ef;\n \n    color:#a09285;\n \n    font-size:9px;\n \n    text-align:center;\n}\n \n \n/* =========================================================\n   COMMON CONTENT\n========================================================= */\n \n.mh-status{\n    display:inline-flex;\n    align-items:center;\n \n    gap:5px;\n \n    margin-bottom:8px;\n \n    padding:\n        4px\n        8px;\n \n    border-radius:999px;\n \n    background:#f4ede4;\n \n    color:#765943;\n \n    font-size:9.5px;\n    font-weight:900;\n}\n \n \n.mh-intro-title{\n    color:#3f3026;\n \n    font-family:\n        Georgia,\n        serif;\n \n    font-size:16px;\n    font-weight:700;\n \n    line-height:1.35;\n}\n \n \n.mh-intro-text{\n    margin-top:5px;\n \n    color:#645950;\n \n    font-size:11.5px;\n    line-height:1.55;\n}\n \n \n.mh-section{\n    margin-top:13px;\n}\n \n \n.mh-section-title{\n    display:flex;\n    align-items:center;\n \n    gap:6px;\n \n    margin-bottom:7px;\n \n    color:#5a3d29;\n \n    font-size:10px;\n    font-weight:900;\n \n    text-transform:uppercase;\n \n    letter-spacing:.35px;\n}\n \n \n.mh-actions{\n    display:grid;\n    gap:7px;\n}\n \n \n.mh-action-button{\n    width:100%;\n \n    min-height:38px;\n \n    box-sizing:border-box;\n \n    display:flex;\n    align-items:center;\n    justify-content:space-between;\n \n    gap:10px;\n \n    padding:\n        8px\n        11px;\n \n    border:\n        1px solid #ddccb7;\n \n    border-radius:10px;\n \n    background:#fff;\n \n    color:#654831;\n \n    font-size:11.5px;\n    font-weight:700;\n \n    text-align:left;\n \n    cursor:pointer;\n}\n \n \n.mh-action-button:hover{\n    background:#fff8ed;\n}\n \n \n.mh-action-button-primary{\n    border-color:#86552e;\n \n    background:#86552e;\n \n    color:#fff;\n}\n \n \n.mh-action-back{\n    margin-bottom:10px;\n \n    padding:0;\n \n    border:0;\n \n    background:transparent;\n \n    color:#805a3d;\n \n    font-size:10.5px;\n    font-weight:700;\n \n    cursor:pointer;\n}\n \n \n.mh-inline-box{\n    margin-top:8px;\n \n    padding:10px;\n \n    border:\n        1px solid #eadbc7;\n \n    border-radius:11px;\n \n    background:#fffaf2;\n}\n \n \n.mh-code-input{\n    width:100%;\n    height:38px;\n \n    box-sizing:border-box;\n \n    padding:\n        0\n        10px;\n \n    border:\n        1px solid #d8c2a6;\n \n    border-radius:8px;\n \n    outline:0;\n \n    background:#fff;\n \n    color:#332b25;\n \n    font-size:12px;\n \n    text-transform:uppercase;\n}\n \n \n.mh-code-input:focus{\n    border-color:#9c6a3e;\n \n    box-shadow:\n        0 0 0 3px\n        rgba(156,106,62,.09);\n}\n \n \n.mh-code-submit{\n    width:100%;\n    height:37px;\n \n    margin-top:7px;\n \n    border:0;\n    border-radius:8px;\n \n    background:#81522f;\n \n    color:#fff;\n \n    font-size:11px;\n    font-weight:900;\n \n    cursor:pointer;\n}\n \n \n.mh-small-note{\n    margin-top:6px;\n \n    color:#88796d;\n \n    font-size:9.5px;\n    line-height:1.45;\n}\n \n \n.mh-guide-card{\n    margin-top:7px;\n \n    padding:\n        9px\n        10px;\n \n    border:\n        1px solid #e8ddce;\n \n    border-radius:10px;\n \n    background:#fff;\n}\n \n \n.mh-guide-title{\n    color:#543a29;\n \n    font-size:11px;\n    font-weight:900;\n}\n \n \n.mh-guide-text{\n    margin-top:3px;\n \n    color:#74675e;\n \n    font-size:10.5px;\n    line-height:1.5;\n}\n \n \n/* =========================================================\n   COMMUNITY\n========================================================= */\n \n.mh-activity-list{\n    display:grid;\n    gap:6px;\n}\n \n \n.mh-activity-item{\n    display:flex;\n \n    gap:8px;\n \n    padding:\n        8px\n        9px;\n \n    border:\n        1px solid #ece4d9;\n \n    border-radius:10px;\n \n    background:\n        rgba(255,255,255,.8);\n}\n \n \n.mh-activity-icon{\n    width:29px;\n    height:29px;\n \n    flex:\n        0 0 29px;\n \n    display:flex;\n    align-items:center;\n    justify-content:center;\n \n    border-radius:50%;\n \n    background:#fff4dd;\n \n    font-size:14px;\n}\n \n \n.mh-activity-item.mh-upload\n.mh-activity-icon{\n    background:#eaf3ff;\n}\n \n \n.mh-activity-item.mh-comment\n.mh-activity-icon{\n    background:#f4efff;\n}\n \n \n.mh-activity-content{\n    flex:1;\n    min-width:0;\n}\n \n \n.mh-activity-main{\n    color:#4d433c;\n \n    font-size:10.5px;\n    line-height:1.45;\n \n    word-break:break-word;\n}\n \n \n.mh-activity-main strong{\n    color:#322a25;\n}\n \n \n.mh-activity-time{\n    margin-top:2px;\n \n    color:#aaa098;\n \n    font-size:9px;\n}\n \n \n.mh-empty{\n    padding:\n        9px\n        10px;\n \n    border:\n        1px dashed #dfd5ca;\n \n    border-radius:9px;\n \n    color:#8a7c70;\n \n    font-size:10px;\n    line-height:1.45;\n \n    text-align:center;\n}\n \n \n/* =========================================================\n   PERSONAL INSIGHT\n========================================================= */\n \n.mh-insight-wrap{\n    margin-top:14px;\n}\n \n \n.mh-insight-head{\n    display:flex;\n    align-items:center;\n \n    gap:6px;\n \n    margin-bottom:8px;\n \n    color:#5a3d29;\n \n    font-size:10px;\n    font-weight:900;\n \n    text-transform:uppercase;\n \n    letter-spacing:.35px;\n}\n \n \n.mh-insight-summary{\n    display:grid;\n \n    grid-template-columns:\n        repeat(\n            3,\n            minmax(0,1fr)\n        );\n \n    gap:6px;\n \n    margin-bottom:8px;\n}\n \n \n.mh-insight-stat{\n    min-width:0;\n \n    padding:\n        9px\n        5px;\n \n    border:\n        1px solid #e9dfd2;\n \n    border-radius:9px;\n \n    background:#fffdf9;\n \n    text-align:center;\n}\n \n \n.mh-insight-stat-value{\n    display:block;\n \n    overflow:hidden;\n \n    color:#624026;\n \n    font-size:13px;\n    font-weight:900;\n \n    white-space:nowrap;\n    text-overflow:ellipsis;\n}\n \n \n.mh-insight-stat-label{\n    display:block;\n \n    margin-top:3px;\n \n    color:#91857a;\n \n    font-size:8px;\n    line-height:1.3;\n \n    text-transform:uppercase;\n}\n \n \n.mh-insight-trend{\n    display:flex;\n    align-items:flex-start;\n \n    gap:8px;\n \n    padding:\n        9px\n        10px;\n \n    border:\n        1px solid #e8dfd4;\n \n    border-radius:10px;\n \n    background:#fff;\n \n    color:#5b5149;\n \n    font-size:10px;\n    line-height:1.5;\n}\n \n \n.mh-insight-trend-icon{\n    flex:0 0 auto;\n \n    font-size:17px;\n}\n \n \n.mh-insight-advice-list{\n    display:grid;\n \n    gap:6px;\n \n    margin-top:8px;\n}\n \n \n.mh-insight-advice{\n    display:grid;\n \n    grid-template-columns:\n        21px\n        minmax(0,1fr);\n \n    gap:7px;\n \n    padding:\n        9px\n        10px;\n \n    border:\n        1px solid #e8dfd4;\n \n    border-radius:10px;\n \n    background:#fff;\n \n    color:#5e554e;\n \n    font-size:10.5px;\n    line-height:1.55;\n}\n \n \n.mh-insight-advice.good{\n    border-color:#cae5d1;\n \n    background:#f6fff8;\n}\n \n \n.mh-insight-advice.warning{\n    border-color:#ecd59c;\n \n    background:#fffcf3;\n}\n \n \n.mh-insight-advice.danger{\n    border-color:#efc7c7;\n \n    background:#fff7f7;\n}\n \n \n.mh-insight-advice-icon{\n    text-align:center;\n}\n \n \n.mh-insight-goal{\n    margin-top:8px;\n \n    padding:10px;\n \n    border:\n        1px solid #eadfce;\n \n    border-radius:10px;\n \n    background:#fffaf2;\n}\n \n \n.mh-insight-goal-title{\n    color:#543a29;\n \n    font-size:10.5px;\n    font-weight:900;\n}\n \n \n.mh-insight-goal-text{\n    margin-top:4px;\n \n    color:#776a61;\n \n    font-size:10px;\n    line-height:1.5;\n}\n \n \n.mh-insight-gift{\n    display:grid;\n \n    grid-template-columns:\n        62px\n        minmax(0,1fr);\n \n    gap:10px;\n \n    margin-top:8px;\n \n    padding:10px;\n \n    border:\n        1px solid #e7c8cf;\n \n    border-radius:11px;\n \n    background:#fff9fa;\n}\n \n \n.mh-insight-gift-image{\n    width:62px;\n    height:62px;\n \n    display:flex;\n    align-items:center;\n    justify-content:center;\n \n    overflow:hidden;\n \n    border:\n        1px solid #ead8dc;\n \n    border-radius:10px;\n \n    background:#fff;\n \n    font-size:24px;\n}\n \n \n.mh-insight-gift-image img{\n    width:56px;\n    height:56px;\n \n    object-fit:contain;\n}\n \n \n.mh-insight-gift-name{\n    color:#5d342f;\n \n    font-size:11px;\n    font-weight:900;\n \n    line-height:1.4;\n}\n \n \n.mh-insight-gift-desc{\n    margin-top:4px;\n \n    color:#776b65;\n \n    font-size:9.5px;\n    line-height:1.5;\n}\n \n \n.mh-insight-gift-status{\n    margin-top:5px;\n \n    color:#92400e;\n \n    font-size:9.5px;\n    line-height:1.5;\n \n    font-weight:800;\n}\n \n \n.mh-insight-gift-status.ready{\n    color:#166534;\n}\n \n \n.mh-insight-note{\n    margin-top:8px;\n \n    color:#93887e;\n \n    font-size:8.5px;\n    line-height:1.45;\n}\n \n \n/* =========================================================\n   MOBILE\n \n   Panel cũng khoảng 50% màn hình.\n========================================================= */\n \n@media(max-width:600px){\n \n    #ocdMinhHongRoot{\n        right:11px;\n        bottom:105px;\n    }\n \n \n    .mh-launcher{\n        width:60px;\n        height:60px;\n    }\n \n \n    .mh-notification{\n        position:fixed;\n \n        left:10px;\n        right:10px;\n        bottom:180px;\n \n        width:auto;\n        max-width:none;\n    }\n \n \n    .mh-notification:after{\n        right:23px;\n    }\n \n \n    .mh-panel{\n        position:fixed;\n \n        left:9px;\n        right:9px;\n \n        bottom:178px;\n \n        width:auto;\n        max-width:none;\n \n        height:50vh;\n        height:50dvh;\n \n        min-height:300px;\n \n        max-height:50vh;\n        max-height:50dvh;\n    }\n \n \n    .mh-insight-summary{\n        grid-template-columns:\n            repeat(\n                3,\n                minmax(0,1fr)\n            );\n    }\n \n}\n");
js("minh-hong/minh-hong-footer.min.js","(function(){\"use strict\";if(window.__OCD_MINH_HONG_FOOTER_V1574__)return;window.__OCD_MINH_HONG_FOOTER_V1574__=!0;const x={version:\"1.6.2\",enabled:!0,avatarUrl:\"https://drive.google.com/thumbnail?id=1mHxTCbL1vxiveuALFl6cdY-Ajwew2vpJ&sz=w400\",csvUrl:\"https://docs.google.com/spreadsheets/d/e/2PACX-1vRP5cc8duj1XrCXMrymo6Cj7aqIkWfX6bHxGeW-lXcSewfQXhM8fZ5rzbNIQ9mBeVuB8yYr_o1aBoYA/pub?output=csv\",studentSpreadsheetId:\"1GJoTRsbq0kZfZrDdh0uCC667PwS3Bgkje2fHQnwnCKs\",studentSheetName:\"HocVien\",teacherName:\"Th\\u1EA7y Thanh Phong\",communityCacheKey:\"ocd_minh_hong_community_cache_v1\",communityCacheTime:600*1e3,sessionKey:\"ocd_student_session_v1\",preferenceKey:\"ocd_minh_hong_preferences_v1\",insightStorageKey:\"ocd_minh_hong_student_insight_v1\",insightMaxAge:1440*60*1e3,contentSpreadsheetId:\"1-J6sXAbiepK6C3Bx0JQ3916Y7JNfBIyGrxvQuJYqx74\",contentCachePrefix:\"ocd_minh_hong_content_v155_\",contentCacheTime:1200*1e3,guestJourneyKey:\"ocd_minh_hong_guest_journey_v1\",guestJourneyMaxSeen:120,speechCooldownKey:\"ocd_minh_hong_speech_cooldown_v1\",speechCooldownTime:720*60*1e3,speechMaxHistory:160,gemEventLimit:15,uploadEventLimit:5,commentEventLimit:5,eventWindow:1440*60*1e3,initializeDelay:3500,firstNotificationDelay:1500,personalFirstDelay:1800,visibleTime:6500,gapTime:5e3,personalGapTime:5500,maxPersonalNotifications:5,oneDay:1440*60*1e3};if(!x.enabled)return;const le={quoteOpen:String.fromCodePoint(8220),quoteClose:String.fromCodePoint(8221),close:String.fromCodePoint(215),arrow:String.fromCodePoint(8594),check:String.fromCodePoint(10003),bullet:String.fromCodePoint(8226),dot:String.fromCodePoint(183)},U={gem:String.fromCodePoint(128142),crown:String.fromCodePoint(128081),upload:String.fromCodePoint(128228),teacher:String.fromCodePoint(129489,8205,127979),success:String.fromCodePoint(9989),bell:String.fromCodePoint(128276),mute:String.fromCodePoint(128277),user:String.fromCodePoint(128100),home:String.fromCodePoint(127968),book:String.fromCodePoint(128214),info:String.fromCodePoint(8505),community:String.fromCodePoint(128226),activity:String.fromCodePoint(9889),logout:String.fromCodePoint(8618),back:String.fromCodePoint(8592),key:String.fromCodePoint(128273),brain:String.fromCodePoint(129504),chart:String.fromCodePoint(128202),up:String.fromCodePoint(8599),down:String.fromCodePoint(8600),stable:String.fromCodePoint(8594),target:String.fromCodePoint(127919),gift:String.fromCodePoint(127873),warning:String.fromCodePoint(9888),tip:String.fromCodePoint(128161),fire:String.fromCodePoint(128293)},sn=[{id:1,type:\"streak\",value:5,hoangNgocValue:1},{id:2,type:\"streak\",value:7,hoangNgocValue:2},{id:3,type:\"streak\",value:14,hoangNgocValue:4},{id:4,type:\"streak\",value:30,hoangNgocValue:8},{id:5,type:\"highBlock\",block:3,count:1,hoangNgocValue:2},{id:6,type:\"highBlock\",block:4,count:1,hoangNgocValue:3},{id:7,type:\"highBlock\",block:5,count:1,hoangNgocValue:4},{id:8,type:\"highBlock\",block:3,count:2,hoangNgocValue:4},{id:9,type:\"highBlock\",block:4,count:2,hoangNgocValue:6},{id:10,type:\"highBlock\",block:5,count:2,hoangNgocValue:8}],At=2e4;function Pe(r,l){const m=new AbortController;let d=!1;const w=setTimeout(function(){d=!0,m.abort()},At);return fetch(r,Object.assign({},l||{},{signal:m.signal})).catch(function(A){throw d?new Error(\"Ngu\\u1ED3n d\\u1EEF li\\u1EC7u kh\\xF4ng ph\\u1EA3n h\\u1ED3i sau 20 gi\\xE2y.\"):A}).finally(function(){clearTimeout(w)})}function j(r){return String(r??\"\").replace(/\\uFEFF/g,\"\").trim()}function re(r){return j(r).toUpperCase().replace(/\\s+/g,\"\")}function Et(r){return j(r).toLowerCase()}function cn(r){const l=j(r).replace(\",\",\".\");if(!l)return null;const m=Number(l);return Number.isNaN(m)?null:m}function xe(){let r=String(window.location.pathname||\"/\");return r.length>1&&(r=r.replace(/\\/+$/,\"\")),r===\"/\"||r===\"/index.html\"||r===\"/index.htm\"}function at(r){const l=j(r).toLowerCase();return l===\"community\"||l===\"personal\"||l===\"class-pulse\"||l===\"silent\"?l:\"\"}function ue(){if(xe())return\"community\";const r=at(window.OCDMinhHongPageContext);return r||(document.getElementById(\"ocd4-student-work-page\")?\"class-pulse\":(document.getElementById(\"rewardExchangeApp\"),\"personal\"))}function he(){return ue()===\"community\"}function Ke(){return ue()===\"personal\"}function Oe(){return ue()===\"class-pulse\"}function ze(){return ue()===\"silent\"}function ve(r){const l=j(r).toLowerCase();return[\"Guest\",\"TrangChu\",\"TraCuu\",\"TacPham\",\"LamMo\",\"ThuVien\",\"GiangDuong\",\"ThiTotNghiep\",\"FAQ\"].find(function(d){return d.toLowerCase()===l})||\"\"}function me(){const r=ve(window.OCDMinhHongContentTab);if(r)return r;if(xe())return\"TrangChu\";if(document.getElementById(\"ocd4-student-work-page\"))return\"TacPham\";if(document.getElementById(\"rewardExchangeApp\"))return\"TraCuu\";if(document.getElementById(\"lectureHallPage\"))return\"GiangDuong\";if(document.getElementById(\"ocdGraduationExamPage\"))return\"ThiTotNghiep\";const l=String(window.location.pathname||\"\").toLowerCase(),m=String(document.title||\"\").toLowerCase(),d=l+\" \"+m;return/tra[-_ ]?cuu|ch[oợ][- _]?phi[eê]n/.test(d)?\"TraCuu\":/tac[-_ ]?pham|student[-_ ]?work|n[oộ]p[-_ ]?b[aà]i/.test(d)?\"TacPham\":/lam[-_ ]?mo|l[aâ]m[-_ ]?m[oô]/.test(d)?\"LamMo\":/giang[-_ ]?duong|gi[aả]ng[-_ ]?[dđ][uư][oơ]ng|lecture[-_ ]?hall/.test(d)?\"GiangDuong\":/thi[-_ ]?tot[-_ ]?nghiep|t[oố]t[-_ ]?nghi[eệ]p|graduation/.test(d)?\"ThiTotNghiep\":/faq|hoi[-_ ]?dap|h[oỏ]i[-_ ]?[dđ][aá]p/.test(d)?\"FAQ\":/thu[-_ ]?vien|th[uư][-_ ]?vi[eệ]n|library/.test(d)?\"ThuVien\":\"Guest\"}function Se(r){try{return localStorage.getItem(r)}catch{return null}}function Ne(r,l){try{return localStorage.setItem(r,l),!0}catch{return!1}}function Pt(r){try{localStorage.removeItem(r)}catch{}}const W=(function(){const r={mode:\"guest\",code:\"\",verified:!1,updatedAt:0};let l=Object.assign({},r);function m(M){if(!M||typeof M!=\"object\")return Object.assign({},r);let v=j(M.mode).toLowerCase();const a=re(M.code);return v!==\"guest\"&&v!==\"student\"&&(v=\"guest\"),a||(v=\"guest\"),{mode:v,code:v===\"guest\"?\"\":a,verified:v===\"guest\"?!1:!!M.verified,updatedAt:Number(M.updatedAt||0)}}function d(){const M=Se(x.sessionKey);if(!M)return Object.assign({},l);try{l=m(JSON.parse(M))}catch{l=Object.assign({},r)}return Object.assign({},l)}function w(M){return l=m(M),Ne(x.sessionKey,JSON.stringify(l)),Object.assign({},l)}function A(M,v,a){try{window.dispatchEvent(new CustomEvent(\"ocdStudentSessionChanged\",{detail:{previous:Object.assign({},M),current:Object.assign({},v),source:a||\"unknown\"}}))}catch{}}function L(M,v){const a=d(),h=w(M);return A(a,h,v),h}function V(){return d()}function f(){return d().code}function c(){return d().mode===\"guest\"}function g(){return d().mode===\"student\"}function i(){const M=d();return!!(M.mode===\"student\"&&M.code&&M.verified===!0)}function p(M,v){const a=re(M);return a?L({mode:\"student\",code:a,verified:!1,updatedAt:Date.now()},v||\"rememberStudent\"):V()}function k(M,v){const a=re(M);return a?L({mode:\"student\",code:a,verified:!0,updatedAt:Date.now()},v||\"confirmStudent\"):V()}function ee(M){const v=d();return Pt(x.sessionKey),l=Object.assign({},r),A(v,l,M||\"clear\"),Object.assign({},l)}return window.addEventListener(\"storage\",function(M){if(M.key!==x.sessionKey)return;const v=Object.assign({},l),a=d();A(v,a,\"storage\")}),{version:x.version,getState:V,getCode:f,isGuest:c,isStudent:g,isVerified:i,rememberStudent:p,confirmStudent:k,clear:ee,normalizeCode:re}})();window.OCDStudentSession=W;function Ue(r){return\"T\\xE0i kho\\u1EA3n h\\u1ECDc vi\\xEAn \"+r+` \\u0111\\xE3 d\\u1EEBng ho\\u1EA1t \\u0111\\u1ED9ng.\n\nVui l\\xF2ng t\\u1EA1o l\\u1EA1i t\\xE0i kho\\u1EA3n m\\u1EDBi ho\\u1EB7c li\\xEAn h\\u1EC7 GVCN \\u0111\\u1EC3 xin m\\u1EDF l\\u1EA1i t\\xE0i kho\\u1EA3n.`}async function Je(r,l){try{if(!r)return!1;window.StudentRewardSystemReady&&await window.StudentRewardSystemReady;const m=window.StudentRewardSystem;if(!m||typeof m.getStudentAccess!=\"function\")return!1;const d=await m.getStudentAccess(r,{forceRefresh:!!l});return!!(d&&d.exists&&d.status===\"paused\")}catch{return!1}}const lt=(function(){const r={notificationsMuted:!1};function l(){const d=Se(x.preferenceKey);if(!d)return Object.assign({},r);try{return{notificationsMuted:!!JSON.parse(d).notificationsMuted}}catch{return Object.assign({},r)}}function m(d){const w=Object.assign({},l(),d||{});return Ne(x.preferenceKey,JSON.stringify(w)),w}return{get:l,set:m}})(),Qe=(function(){return{save:function(){return null},read:function(){return null},getForCurrentStudent:function(){return null},clearMemory:function(){}}})(),Ce=(function(){const r={firstSeenAt:0,lastSeenAt:0,visitCount:0,pageVisits:{},seenItems:{}};let l=!1;function m(i){return i=i&&typeof i==\"object\"?i:{},{firstSeenAt:Number(i.firstSeenAt||0),lastSeenAt:Number(i.lastSeenAt||0),visitCount:Math.max(0,Number(i.visitCount||0)),pageVisits:i.pageVisits&&typeof i.pageVisits==\"object\"?i.pageVisits:{},seenItems:i.seenItems&&typeof i.seenItems==\"object\"?i.seenItems:{}}}function d(){const i=Se(x.guestJourneyKey);if(!i)return m(r);try{return m(JSON.parse(i))}catch{return m(r)}}function w(i){return i=m(i),Ne(x.guestJourneyKey,JSON.stringify(i)),i}function A(i){if(l)return d();l=!0,i=ve(i)||\"Guest\";const p=d(),k=Date.now();return p.firstSeenAt||(p.firstSeenAt=k),p.lastSeenAt=k,p.visitCount+=1,p.pageVisits[i]=Math.max(0,Number(p.pageVisits[i]||0))+1,w(p)}function L(i){i=ve(i)||\"Guest\";const p=d(),k=Math.max(0,Number(p.visitCount||0)),ee=Math.max(0,Number(p.pageVisits[i]||0));return{firstVisit:k<=1,returningGuest:k>1,pageFirstVisit:ee<=1,pageReturning:ee>1,visitCount:k,pageVisitCount:ee}}function V(i,p){i=ve(i)||\"Guest\";const k=j(p&&p.id);return i+\":\"+(k||j(p&&p.title)||\"item\")}function f(i,p){return!!d().seenItems[V(i,p)]}function c(i,p){if(!Array.isArray(p)||!p.length)return;const k=d(),ee=Date.now();p.forEach(function(v){k.seenItems[V(i,v)]=ee}),Object.keys(k.seenItems).sort(function(v,a){return Number(k.seenItems[a]||0)-Number(k.seenItems[v]||0)}).slice(x.guestJourneyMaxSeen).forEach(function(v){delete k.seenItems[v]}),w(k)}function g(i,p){if(!Array.isArray(p)||!p.length)return[];const k=p.filter(function(ee){return!f(i,ee)});return k.length?k:p.slice()}return{version:\"1.5.4\",registerVisit:A,getContext:L,isSeen:f,markSeen:c,preferUnseen:g}})();window.OCDMinhHongGuestJourney=Ce;const _e=(function(){let r={page:\"\",studentCode:\"\",data:{},conditions:{},updatedAt:0,source:\"\"};function l(c){return c&&typeof c==\"object\"&&!Array.isArray(c)?c:{}}function m(c){try{return JSON.parse(JSON.stringify(c))}catch{return c}}function d(c,g){try{window.dispatchEvent(new CustomEvent(\"ocdMinhHongContextChanged\",{detail:{previous:m(c),current:m(g)}}))}catch{}}function w(c,g){c=l(c);const i=m(r);return r={page:j(c.page),studentCode:W.normalizeCode(c.studentCode),data:Object.assign({},l(c.data)),conditions:Object.assign({},l(c.conditions)),updatedAt:Date.now(),source:j(g||c.source||\"page\")},d(i,r),m(r)}function A(c,g){return c=l(c),w({page:c.page!==void 0?c.page:r.page,studentCode:c.studentCode!==void 0?c.studentCode:r.studentCode,data:Object.assign({},r.data,l(c.data)),conditions:Object.assign({},r.conditions,l(c.conditions))},g||c.source||r.source||\"page\")}function L(c){const g=m(r);return r={page:\"\",studentCode:\"\",data:{},conditions:{},updatedAt:Date.now(),source:j(c||\"clear\")},d(g,r),m(r)}function V(){return m(r)}function f(c){const g=W.normalizeCode(c),i=W.normalizeCode(r.studentCode);return g&&i&&g!==i?{page:\"\",studentCode:g,data:{},conditions:{},updatedAt:0,source:\"\"}:m(r)}return{version:\"1.5.4\",set:w,patch:A,clear:L,getState:V,getForStudent:f}})();window.OCDMinhHongContext=_e;const oe=(function(){const r=Object.create(null),l=Object.create(null),m=[\"Guest\",\"TrangChu\",\"TraCuu\",\"TacPham\",\"LamMo\",\"ThuVien\",\"GiangDuong\",\"ThiTotNghiep\",\"FAQ\"];function d(a){const h=j(a);return m.find(function(u){return u.toLowerCase()===h.toLowerCase()})||\"\"}function w(a){return x.contentCachePrefix+a.toLowerCase()}function A(a){const h=[];let I=[],u=\"\",y=!1;for(let t=0;t<a.length;t++){const E=a[t],se=a[t+1];E==='\"'&&y&&se==='\"'?(u+='\"',t++):E==='\"'?y=!y:E===\",\"&&!y?(I.push(u),u=\"\"):(E===`\n`||E===\"\\r\")&&!y?(E===\"\\r\"&&se===`\n`&&t++,I.push(u),I.some(function(te){return j(te)!==\"\"})&&h.push(I),I=[],u=\"\"):u+=E}return(u!==\"\"||I.length)&&(I.push(u),I.some(function(t){return j(t)!==\"\"})&&h.push(I)),h}function L(a){return j(a).toLowerCase().normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g,\"\").replace(/đ/g,\"d\").replace(/[^a-z0-9]+/g,\"\")}function V(a,h){const I=j(a);if(!I)return null;let u=I.match(/^(\\d{1,2})[\\/\\-.](\\d{1,2})[\\/\\-.](\\d{4})(?:\\s+(\\d{1,2}):(\\d{2})(?::(\\d{2}))?)?/);if(u){const t=u[4]!==void 0,E=t?Number(u[4]):h?23:0,se=t?Number(u[5]||0):h?59:0,te=t?Number(u[6]||0):h?59:0;return Date.UTC(Number(u[3]),Number(u[2])-1,Number(u[1]),E-7,se,te)}const y=new Date(I);return Number.isNaN(y.getTime())?null:y.getTime()}function f(a){const h=A(a);if(h.length<2)return[];const I=h[0].map(L);function u(E){return I.indexOf(L(E))}const y={id:u(\"ID\"),status:u(\"Tr\\u1EA1ng th\\xE1i\"),audience:u(\"\\u0110\\u1ED1i t\\u01B0\\u1EE3ng\"),condition:u(\"\\u0110i\\u1EC1u ki\\u1EC7n\"),title:u(\"Ti\\xEAu \\u0111\\u1EC1\"),content:u(\"N\\u1ED9i dung\"),button:u(\"N\\xFAt\"),link:u(\"Link\"),priority:u(\"\\u01AFu ti\\xEAn\"),start:u(\"Ng\\xE0y b\\u1EAFt \\u0111\\u1EA7u\"),end:u(\"Ng\\xE0y k\\u1EBFt th\\xFAc\"),display:u(\"Hi\\u1EC3n th\\u1ECB\")},t=Date.now();return h.slice(1).map(function(E,se){function te(De){return De>=0?j(E[De]):\"\"}const Le=V(te(y.start),!1),Xe=V(te(y.end),!0);return{id:te(y.id)||\"ROW\"+(se+2),status:te(y.status).toUpperCase(),audience:te(y.audience).toLowerCase(),condition:te(y.condition).toLowerCase()||\"always\",title:te(y.title),content:te(y.content),button:te(y.button),link:te(y.link),priority:Number(te(y.priority))||0,startAt:Le,endAt:Xe,display:te(y.display).toLowerCase()||\"panel\"}}).filter(function(E){return E.status&&E.status!==\"ON\"||E.startAt!==null&&t<E.startAt||E.endAt!==null&&t>E.endAt?!1:!!(E.title||E.content)}).sort(function(E,se){return se.priority-E.priority})}function c(a,h){const I=Se(w(a));if(!I)return null;try{const u=JSON.parse(I);return!u||!Array.isArray(u.items)||!u.savedAt||!h&&Date.now()-Number(u.savedAt)>x.contentCacheTime?null:u.items}catch{return null}}function g(a,h){Ne(w(a),JSON.stringify({savedAt:Date.now(),items:h}))}function i(a){return\"https://docs.google.com/spreadsheets/d/\"+encodeURIComponent(x.contentSpreadsheetId)+\"/gviz/tq?tqx=out:csv&sheet=\"+encodeURIComponent(a)+\"&_=\"+Date.now()}function p(a,h){if(a=d(a),h=h||{},!a)return Promise.resolve([]);if(r[a]&&!h.force)return Promise.resolve(r[a].slice());const I=c(a,!1);return I&&!h.force?(r[a]=I,Promise.resolve(I.slice())):(l[a]||(l[a]=Pe(i(a),{cache:\"no-store\",credentials:\"omit\"}).then(function(u){if(!u.ok)throw new Error(\"HTTP \"+u.status);return u.text()}).then(function(u){const y=f(u);return r[a]=y,g(a,y),y.slice()}).catch(function(u){console.warn(\"[Minh H\\u1ED3ng] Content \"+a+\":\",u);const y=c(a,!0)||[];return y.length&&(r[a]=y),y.slice()}).finally(function(){l[a]=null})),l[a])}function k(a){return a=d(a),a?r[a]?r[a].slice():(c(a,!1)||[]).slice():[]}function ee(a,h){h=h||{};const I=j(h.mode).toLowerCase()||\"guest\",u=j(a.audience).toLowerCase();if(I===\"student\"){if(u&&u!==\"all\"&&u!==\"student\")return!1}else if(u&&u!==\"all\"&&u!==\"guest\")return!1;const y=j(a.condition).toLowerCase();return!y||y===\"always\"?!0:I===\"student\"?y===\"verified_student\"?!!h.verified:h.conditions&&Object.prototype.hasOwnProperty.call(h.conditions,y)?!!h.conditions[y]:!1:y===\"first_visit\"?!!h.firstVisit:y===\"returning_guest\"?!!h.returningGuest:!1}function M(a,h){return h=Object.assign({},h||{},{mode:\"guest\"}),k(a).filter(function(I){return ee(I,h)})}function v(a,h){return h=Object.assign({},h||{},{mode:\"student\",verified:!!(h&&h.verified)}),h.verified?k(a).filter(function(I){return ee(I,h)}):[]}return{version:\"1.5.5\",load:p,get:k,getForGuest:M,getForStudent:v,tabs:m.slice()}})();window.OCDMinhHongContent=oe;const ke=(function(){function r(d){const w=[];let A=[],L=\"\",V=!1;for(let f=0;f<d.length;f++){const c=d[f],g=d[f+1];c==='\"'&&V&&g==='\"'?(L+='\"',f++):c==='\"'?V=!V:c===\",\"&&!V?(A.push(L),L=\"\"):(c===`\n`||c===\"\\r\")&&!V?(c===\"\\r\"&&g===`\n`&&f++,A.push(L),w.push(A),A=[],L=\"\"):L+=c}return(L!==\"\"||A.length)&&(A.push(L),w.push(A)),w}function l(d){const w=d[0].map(Et),A=w.findIndex(function(i){return i.includes(\"m\\xE3 h\\u1ECDc vi\\xEAn\")}),L=w.findIndex(function(i){return i.includes(\"h\\u1ECD v\\xE0 t\\xEAn\")}),V=w.findIndex(function(i){return i.includes(\"d\\u1EA5u th\\u1EDDi gian\")||i.includes(\"th\\u1EDDi gian\")||i.includes(\"timestamp\")}),f=w.findIndex(function(i){return i===\"\\u0111i\\u1EC3m\"||i.includes(\"\\u0111i\\u1EC3m s\\u1ED1\")}),c=w.findIndex(function(i){return i.includes(\"t\\u1EA3i b\\xE0i\")||i.includes(\"b\\xE0i t\\u1EADp\")||i.includes(\"t\\u1EC7p\")||i.includes(\"file\")});let g=w.findIndex(function(i){return i.includes(\"nh\\u1EADn x\\xE9t\")});return g===-1&&(g=8),{codeIndex:A,nameIndex:L,timeIndex:V,scoreIndex:f,fileIndex:c,commentIndex:g}}async function m(d){const w=re(d);if(!w)return{ok:!1,code:\"\",name:\"\",reason:\"empty\"};function A(c,g){if(!c||c.length<2)return null;const i=l(c);if(i.codeIndex<0)return null;for(let p=1;p<c.length;p++){const k=c[p]||[];if(re(k[i.codeIndex])===w)return{ok:!0,code:w,name:i.nameIndex>=0?j(k[i.nameIndex]):\"\",reason:\"found\",source:g}}return null}async function L(){const c=window.StudentRewardSystem;if(c&&typeof c.getStudentSubmissionsCsv==\"function\")try{return window.StudentRewardSystemReady&&await window.StudentRewardSystemReady,r(await c.getStudentSubmissionsCsv(w))}catch(k){console.warn(\"[Minh H\\u1ED3ng] Reward Core ch\\u01B0a \\u0111\\u1ECDc \\u0111\\u01B0\\u1EE3c b\\xE0i n\\u1ED9p, d\\xF9ng CSV:\",k&&k.message||k)}const g=x.csvUrl.indexOf(\"?\")>=0?\"&\":\"?\",i=await Pe(x.csvUrl+g+\"mh_verify=\"+Date.now(),{cache:\"no-store\",credentials:\"omit\"});if(!i.ok)throw new Error(\"Kh\\xF4ng th\\u1EC3 t\\u1EA3i ngu\\u1ED3n x\\xE1c minh h\\u1ECDc vi\\xEAn hi\\u1EC7n t\\u1EA1i.\");const p=await i.text();return r(p)}async function V(){const c=\"https://docs.google.com/spreadsheets/d/\"+x.studentSpreadsheetId+\"/gviz/tq?tqx=out:csv&sheet=\"+encodeURIComponent(x.studentSheetName)+\"&mh_verify=\"+Date.now(),g=await Pe(c,{cache:\"no-store\",credentials:\"omit\"});if(!g.ok)throw new Error(\"Kh\\xF4ng th\\u1EC3 t\\u1EA3i tab HocVien.\");const i=await g.text();return r(i)}const f=await Promise.allSettled([L(),V()]);if(f[0].status===\"fulfilled\"){const c=A(f[0].value,\"community\");if(c)return c}if(f[1].status===\"fulfilled\"){const c=A(f[1].value,\"HocVien\");if(c)return c}if(f[0].status===\"rejected\"&&f[1].status===\"rejected\")throw console.warn(\"[Minh H\\u1ED3ng] C\\u1EA3 hai ngu\\u1ED3n x\\xE1c minh h\\u1ECDc vi\\xEAn \\u0111\\u1EC1u l\\u1ED7i.\",f[0].reason,f[1].reason),new Error(\"Kh\\xF4ng th\\u1EC3 t\\u1EA3i d\\u1EEF li\\u1EC7u x\\xE1c minh h\\u1ECDc vi\\xEAn.\");return f[0].status===\"rejected\"&&console.warn(\"[Minh H\\u1ED3ng] Ngu\\u1ED3n x\\xE1c minh hi\\u1EC7n t\\u1EA1i t\\u1EA1m l\\u1ED7i:\",f[0].reason),f[1].status===\"rejected\"&&console.warn(\"[Minh H\\u1ED3ng] Tab HocVien t\\u1EA1m l\\u1ED7i:\",f[1].reason),{ok:!1,code:w,name:\"\",reason:\"not-found\"}}return{load:function(){return Promise.resolve([])},getEvents:function(){return[]},verifyStudentCode:m,isReady:function(){return!0}}})();window.OCDCommunityActivity=ke;const Ot=(function(){let r=null,l=null,m=null,d=null,w=null,A=null,L=null,V=null,f=null,c=null,g=!1,i=\"home\",p=lt.get().notificationsMuted,k=[],ee=[],M=[],v=[],a=null,h=0,I=null,u=null,y=null;function t(e,n,o){const s=document.createElement(e);return n&&(s.className=n),o!==void 0&&(s.textContent=o),s}function E(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}function se(e){const n=Date.now()-Number(e),o=Math.floor(n/6e4);if(o<1)return\"V\\u1EEBa xong\";if(o<60)return o+\" ph\\xFAt tr\\u01B0\\u1EDBc\";const s=Math.floor(o/60);return s<24?s+\" gi\\u1EDD tr\\u01B0\\u1EDBc\":Math.floor(s/24)+\" ng\\xE0y tr\\u01B0\\u1EDBc\"}function te(){}function Le(e,n){const o=document.createElement(\"img\");o.className=n||\"\",o.src=x.avatarUrl,o.alt=\"Minh H\\u1ED3ng\",o.referrerPolicy=\"no-referrer\",o.onerror=function(){o.remove(),!e.querySelector(\".mh-avatar-fallback\")&&e.appendChild(t(\"span\",\"mh-avatar-fallback\",\"MH\"))},e.appendChild(o)}function Xe(){if(r)return;r=t(\"div\"),r.id=\"ocdMinhHongRoot\",m=t(\"div\",\"mh-notification\"),V=t(\"div\",\"mh-notification-icon\");const e=t(\"div\",\"mh-notification-content\");d=t(\"div\",\"mh-notification-label\",\"MINH H\\u1ED2NG TH\\xD4NG B\\xC1O\"),w=t(\"div\",\"mh-notification-title\"),A=t(\"div\",\"mh-notification-text\"),L=t(\"div\",\"mh-notification-time\"),e.appendChild(d),e.appendChild(w),e.appendChild(A),e.appendChild(L);const n=t(\"button\",\"mh-notification-close\",le.close);n.type=\"button\";const o=t(\"div\",\"mh-notification-progress\");o.appendChild(t(\"div\",\"mh-notification-progress-bar\")),m.appendChild(V),m.appendChild(e),m.appendChild(n),m.appendChild(o);const s=t(\"div\",\"mh-panel\"),b=t(\"div\",\"mh-panel-header\"),D=t(\"div\",\"mh-panel-avatar\");Le(D,\"\");const S=t(\"div\");S.appendChild(t(\"div\",\"mh-panel-name\",\"Minh H\\u1ED3ng\")),S.appendChild(t(\"div\",\"mh-panel-role\",\"Tr\\u1EE3 gi\\u1EA3ng Online \"+le.dot+\" H\\u01B0\\u1EDBng d\\u1EABn v\\xE0 th\\xF4ng b\\xE1o\"));const B=t(\"div\",\"mh-header-actions\");c=t(\"button\",\"mh-header-button\"),c.type=\"button\";const K=t(\"button\",\"mh-header-button\",le.close);K.type=\"button\",B.appendChild(K),b.appendChild(D),b.appendChild(S),b.appendChild(B);const _=t(\"div\",\"mh-panel-scroll\");f=t(\"div\",\"mh-panel-body\"),_.appendChild(f),s.appendChild(b),s.appendChild(_),s.appendChild(t(\"div\",\"mh-panel-footer\",\"Minh H\\u1ED3ng \"+le.dot+\" Tr\\u1EE3 gi\\u1EA3ng Online\")),l=t(\"button\",\"mh-launcher\"),l.type=\"button\",l.setAttribute(\"aria-label\",\"M\\u1EDF Minh H\\u1ED3ng\");const Y=t(\"div\",\"mh-launcher-image-wrap\");Le(Y,\"mh-launcher-image\"),l.appendChild(Y),l.appendChild(t(\"span\",\"mh-online-dot\")),r.appendChild(s),r.appendChild(l),document.body.appendChild(r),l.addEventListener(\"click\",mt),K.addEventListener(\"click\",$e),ce()}function De(e){return e.type===\"upload\"?U.upload:e.type===\"comment\"?U.teacher:Array.isArray(e.items)&&e.items.some(function(o){return o.type===\"hong\"})?U.crown:U.gem}function _t(e){return e.type===\"upload\"?\"mh-upload\":e.type===\"comment\"?\"mh-comment\":\"mh-gem\"}function Lt(e){return e.type===\"upload\"?\"v\\u1EEBa t\\u1EA3i th\\xE0nh c\\xF4ng m\\u1ED9t b\\xE0i t\\u1EADp l\\xEAn h\\u1EC7 th\\u1ED1ng.\":e.type===\"comment\"?x.teacherName+\" v\\u1EEBa nh\\u1EADn x\\xE9t: \"+le.quoteOpen+j(e.comment)+le.quoteClose:\"v\\u1EEBa \\u0111\\u1ED5i th\\xE0nh c\\xF4ng \"+j(e.outcome)+\".\"+(e.reason?\" Do \"+e.reason+\".\":\"\")}function Dt(){return[]}function ut(e){const n=j(e&&e.display).toLowerCase();return n===\"speech\"||n===\"both\"?n:\"panel\"}function Gt(e){let n=2166136261;const o=String(e||\"\");for(let s=0;s<o.length;s++)n^=o.charCodeAt(s),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function dt(){const e=Se(x.speechCooldownKey);if(!e)return{};try{const n=JSON.parse(e);return n&&typeof n==\"object\"?n:{}}catch{return{}}}function Vt(e){const n=Object.keys(e||{}).map(function(s){return[s,Number(e[s])||0]}).sort(function(s,b){return b[1]-s[1]}).slice(0,x.speechMaxHistory),o={};n.forEach(function(s){o[s[0]]=s[1]}),Ne(x.speechCooldownKey,JSON.stringify(o))}function jt(e,n,o,s,b){return[re(e.code),n,j(o.id),Gt(s+\"|\"+b)].join(\"|\")}function Bt(e){const n=me(),o=_e.getForStudent(e.code),s=ve(o&&o.page),b=!s||s===n;return{mode:\"student\",verified:!0,code:e.code,page:n,data:b?Object.assign({},o.data||{}):{},conditions:b?Object.assign({},o.conditions||{}):{}}}function Ge(e){e=e||{};const n=W.getState();if(ze())return v=[],Promise.resolve([]);const o=me(),s=!!(n&&n.mode===\"student\"&&n.verified&&n.code),b=s?Bt(n):Object.assign({mode:\"guest\",verified:!1,code:\"\",page:o,data:{},conditions:{}},Ce.getContext(o)||{});function D(){const S=Object.assign({studentCode:s&&n.code||\"\",page:o},b.data||{}),B=(s?oe.getForStudent(o,b):oe.getForGuest(o,b)).filter(function(Q){const N=ut(Q);return N===\"speech\"||N===\"both\"}),K=dt(),_=Date.now(),Y=[];return B.forEach(function(Q){const N=be(Q.title||(s?\"L\\u1EDDi khuy\\xEAn d\\xE0nh cho b\\u1EA1n\":\"Minh H\\u1ED3ng ch\\xE0o b\\u1EA1n\"),S),G=be(Q.content||\"\",S),P=jt(s?n:{code:\"GUEST\"},o,Q,N,G),O=Number(K[P])||0;_-O<x.speechCooldownTime||Y.push({personal:!0,guestSpeech:!s,contextSpeech:!0,type:s?\"context-speech\":\"guest-speech\",icon:s?U.tip:U.user,title:N,text:G,contentId:Q.id,priority:Q.priority||0,speechKey:P})}),v=Y,h=0,!g&&!p&&v.length&&Te(),v.slice()}return e.cachedOnly?Promise.resolve(D()):oe.load(o).then(D)}function Ye(){const e=ue();return e===\"community\"?W.isVerified()?k:v.concat(k.slice(0,x.maxPersonalNotifications)):e===\"personal\"?v.concat(ee.slice(0,x.maxPersonalNotifications)):e===\"class-pulse\"?v.concat(M.slice(0,x.maxPersonalNotifications)):[]}function Ft(){return he()?x.firstNotificationDelay:x.personalFirstDelay}function Rt(){return he()?x.gapTime:x.personalGapTime}function qt(e){if(e&&e.classPulse){m.className=\"mh-notification mh-personal\",d.textContent=\"NH\\u1ECAP L\\u1EDAP H\\u1ECCC\",V.textContent=e.icon||U.activity,w.textContent=e.title||\"Ho\\u1EA1t \\u0111\\u1ED9ng l\\u1EDBp h\\u1ECDc\",A.textContent=e.text||e.message||\"\",L.textContent=\"20 b\\xE0i n\\u1ED9p m\\u1EDBi nh\\u1EA5t\";return}if(e&&e.guestSpeech){m.className=\"mh-notification mh-personal\",d.textContent=\"MINH H\\u1ED2NG CH\\xC0O B\\u1EA0N\",V.textContent=e.icon||U.user,w.textContent=e.title||\"Th\\xF4ng tin d\\xE0nh cho b\\u1EA1n\",A.textContent=e.text||\"\",L.textContent=\"D\\xE0nh cho kh\\xE1ch\";return}if(e.personal){m.className=\"mh-notification mh-personal\",d.textContent=\"MINH H\\u1ED2NG G\\u1EE2I \\xDD\",V.textContent=e.icon||U.tip,w.textContent=e.title||\"L\\u1EDDi khuy\\xEAn d\\xE0nh cho b\\u1EA1n\",A.textContent=e.text||\"\",L.textContent=\"D\\xE0nh ri\\xEAng cho b\\u1EA1n\";return}m.className=\"mh-notification \"+_t(e),d.textContent=\"MINH H\\u1ED2NG TH\\xD4NG B\\xC1O\",V.textContent=De(e),e.type===\"comment\"?w.textContent=x.teacherName+\" v\\u1EEBa nh\\u1EADn x\\xE9t b\\xE0i c\\u1EE7a \"+e.name:w.textContent=e.name,A.textContent=Lt(e),L.textContent=se(e.time)}function Kt(e){g||p||!e||(qt(e),m.classList.remove(\"mh-show\"),m.offsetWidth,m.classList.add(\"mh-show\"),clearTimeout(y),y=setTimeout(ht,x.visibleTime))}function ht(){m&&(m.classList.remove(\"mh-show\"),clearTimeout(y),y=null)}function We(){clearTimeout(I),clearTimeout(u),clearTimeout(y),I=null,u=null,y=null,ht()}function Ze(e){clearTimeout(u),u=null;const n=Ye();g||p||!n.length||(u=setTimeout(ft,e))}function zt(e){if(!e||!e.contextSpeech||!e.speechKey)return;const n=dt();n[e.speechKey]=Date.now(),Vt(n),v=v.filter(function(o){return o.speechKey!==e.speechKey})}function ft(){const e=Ye();if(g||p||!e.length)return;h>=e.length&&(h=0);const n=e[h];Kt(n),n&&n.contextSpeech?(zt(n),h=0):h++,Ze(x.visibleTime+Rt())}function Te(){We();const e=Ye();p||g||!e.length||(h=0,I=setTimeout(ft,Ft()))}function Ut(){c&&(c.textContent=p?U.mute:U.bell)}function an(){p=!p,lt.set({notificationsMuted:p}),Ut(),p?We():g||Ze(500)}function pt(){g=!0,r.classList.add(\"mh-panel-open\"),We(),ce()}function $e(){g=!1,r.classList.remove(\"mh-panel-open\"),p||Ze(800)}function mt(){g?$e():pt()}function de(e,n,o){const s=t(\"button\",n?\"mh-action-button mh-action-button-primary\":\"mh-action-button\");return s.type=\"button\",s.appendChild(t(\"span\",\"\",e)),s.appendChild(t(\"span\",\"\",le.arrow)),s.addEventListener(\"click\",o),s}function ln(){}function gt(){return null}function un(){return[]}function et(){a=null,M=[]}function dn(){}function hn(){}function Jt(){f.appendChild(t(\"div\",\"mh-status\",U.user+\" KH\\xC1CH M\\u1EDAI\")),f.appendChild(t(\"div\",\"mh-intro-title\",\"Ch\\xE0o b\\u1EA1n, m\\xECnh l\\xE0 Minh H\\u1ED3ng.\")),f.appendChild(t(\"div\",\"mh-intro-text\",\"M\\xECnh l\\xE0 tr\\u1EE3 gi\\u1EA3ng Online c\\u1EE7a website. N\\u1EBFu b\\u1EA1n \\u0111\\xE3 c\\xF3 m\\xE3 h\\u1ECDc vi\\xEAn, h\\xE3y nh\\u1EADp m\\xE3 \\u0111\\u1EC3 c\\xE1c trang h\\u1ECDc t\\u1EADp c\\xF3 th\\u1EC3 d\\xF9ng l\\u1EA1i th\\xF4ng tin n\\xE0y.\"));const e=t(\"div\",\"mh-section\");e.appendChild(t(\"div\",\"mh-section-title\",U.activity+\" B\\u1EAET \\u0110\\u1EA6U\"));const n=t(\"div\",\"mh-actions\"),o=t(\"div\",\"mh-inline-box\");o.style.display=\"none\";const s=t(\"input\",\"mh-code-input\");s.type=\"text\",s.placeholder=\"Nh\\u1EADp m\\xE3 h\\u1ECDc vi\\xEAn\",s.autocomplete=\"off\";const b=t(\"button\",\"mh-code-submit\",\"TRA C\\u1EE8U M\\xC3 H\\u1ECCC VI\\xCAN\");b.type=\"button\";async function D(){const S=re(s.value);if(!S){s.focus();return}if(b.disabled)return;const B=b.textContent;b.disabled=!0,b.textContent=\"\\u0110ANG X\\xC1C MINH...\";try{const K=await ke.verifyStudentCode(S);if(!K.ok){alert(\"Kh\\xF4ng t\\xECm th\\u1EA5y m\\xE3 h\\u1ECDc vi\\xEAn \"+S+\". Vui l\\xF2ng ki\\u1EC3m tra l\\u1EA1i m\\xE3 \\u0111\\xE3 nh\\u1EADp.\"),s.focus(),s.select();return}if(await Je(K.code,!0)){alert(Ue(K.code));return}if(window.OCDAuth&&!await window.OCDAuth.ensureAccess(K.code,{onSuccess:function(){i=\"home\",ie()}}))return;W.confirmStudent(K.code,\"minh-hong-lookup\"),i=\"home\",ie()}catch(K){console.warn(\"[Minh H\\u1ED3ng] X\\xE1c minh m\\xE3 h\\u1ECDc vi\\xEAn:\",K),alert(\"Minh H\\u1ED3ng ch\\u01B0a th\\u1EC3 ki\\u1EC3m tra m\\xE3 h\\u1ECDc vi\\xEAn l\\xFAc n\\xE0y. Vui l\\xF2ng ki\\u1EC3m tra k\\u1EBFt n\\u1ED1i m\\u1EA1ng v\\xE0 th\\u1EED l\\u1EA1i.\")}finally{b.disabled=!1,b.textContent=B}}b.addEventListener(\"click\",D),s.addEventListener(\"keydown\",function(S){S.key===\"Enter\"&&D()}),o.appendChild(s),o.appendChild(b),o.appendChild(t(\"div\",\"mh-small-note\",\"Minh H\\u1ED3ng s\\u1EBD ki\\u1EC3m tra m\\xE3 tr\\u1EF1c ti\\u1EBFp. Khi m\\xE3 h\\u1EE3p l\\u1EC7, phi\\xEAn h\\u1ECDc vi\\xEAn \\u0111\\u01B0\\u1EE3c x\\xE1c minh ngay c\\u1EA3 tr\\xEAn thi\\u1EBFt b\\u1ECB m\\u1EDBi ho\\u1EB7c tab \\u1EA9n danh.\")),n.appendChild(de(\"T\\xF4i \\u0111\\xE3 c\\xF3 m\\xE3 h\\u1ECDc vi\\xEAn\",!0,function(){o.style.display=o.style.display===\"none\"?\"block\":\"none\",o.style.display===\"block\"&&s.focus()})),window.OCDAuth&&(n.appendChild(de(\"\\u0110\\u0103ng nh\\u1EADp t\\xE0i kho\\u1EA3n\",!1,function(){window.OCDAuth.openLogin({onSuccess:function(){i=\"home\",ie()}})})),n.appendChild(de(\"T\\u1EA1o t\\xE0i kho\\u1EA3n m\\u1EDBi\",!1,function(){window.location.href=\"https://www.thudao.com/p/dang-ky-hoc.html\"}))),n.appendChild(de(\"T\\xF4i l\\xE0 ng\\u01B0\\u1EDDi m\\u1EDBi\",!1,function(){i=\"newcomer\",ce()})),e.appendChild(n),e.appendChild(o),f.appendChild(e)}function Qt(){const e=t(\"button\",\"mh-action-back\",U.back+\" Quay l\\u1EA1i\");e.type=\"button\",e.addEventListener(\"click\",function(){i=\"home\",ce()}),f.appendChild(e),f.appendChild(t(\"div\",\"mh-status\",U.book+\" D\\xC0NH CHO NG\\u01AF\\u1EDCI M\\u1EDAI\")),f.appendChild(t(\"div\",\"mh-intro-title\",\"L\\xE0m quen v\\u1EDBi Thanh Phong Th\\u01B0 M\\xF4n\")),f.appendChild(t(\"div\",\"mh-intro-text\",\"Minh H\\u1ED3ng s\\u1EBD gi\\u1EDBi thi\\u1EC7u nh\\u1EEFng th\\xF4ng tin c\\u01A1 b\\u1EA3n \\u0111\\u1EC3 b\\u1EA1n hi\\u1EC3u website, kh\\xF3a h\\u1ECDc v\\xE0 c\\xE1c ch\\u1EE9c n\\u0103ng d\\xE0nh cho h\\u1ECDc vi\\xEAn.\"));const n=t(\"div\",\"mh-section\");n.appendChild(t(\"div\",\"mh-section-title\",U.book+\" TH\\xD4NG TIN D\\xC0NH CHO NG\\u01AF\\u1EDCI M\\u1EDAI\"));const o=t(\"div\",\"mh-guide-card\");o.appendChild(t(\"div\",\"mh-guide-text\",\"\\u0110ang t\\u1EA3i n\\u1ED9i dung d\\xE0nh cho ng\\u01B0\\u1EDDi m\\u1EDBi...\")),n.appendChild(o),f.appendChild(n);function s(N){E(n),n.appendChild(t(\"div\",\"mh-section-title\",U.book+\" TH\\xD4NG TIN D\\xC0NH CHO NG\\u01AF\\u1EDCI M\\u1EDAI\")),(!N||!N.length)&&(N=[{title:\"1. Gi\\u1EDBi thi\\u1EC7u website\",content:\"\\u0110\\xE2y l\\xE0 trang chia s\\u1EBB th\\xF4ng tin, ki\\u1EBFn th\\u1EE9c, ho\\u1EA1t \\u0111\\u1ED9ng c\\u1EE7a Thanh Phong Th\\u01B0 M\\xF4n. B\\u1EA1n c\\xF3 th\\u1EC3 \\u0111\\u0103ng k\\xFD kh\\xF3a h\\u1ECDc th\\u01B0 ph\\xE1p Online t\\u1EA1i Trang ch\\u1EE7.\",button:\"Kh\\xE1m ph\\xE1 website\",link:\"/\"},{title:\"2. Kh\\xF3a h\\u1ECDc th\\u01B0 ph\\xE1p Online\",content:\"Kh\\xF3a h\\u1ECDc th\\u01B0 ph\\xE1p Online d\\xE0nh cho ng\\u01B0\\u1EDDi mu\\u1ED1n h\\u1ECDc th\\u01B0 ph\\xE1p theo l\\u1ED9 tr\\xECnh c\\xF3 h\\u01B0\\u1EDBng d\\u1EABn.\",button:\"T\\xECm hi\\u1EC3u kh\\xF3a h\\u1ECDc\",link:\"/\"},{title:\"3. N\\u1ED9i dung c\\xF4ng khai\",content:\"B\\u1EA1n c\\xF3 th\\u1EC3 kh\\xE1m ph\\xE1 c\\xE1c n\\u1ED9i dung c\\xF4ng khai tr\\xEAn website tr\\u01B0\\u1EDBc khi \\u0111\\u0103ng k\\xFD kh\\xF3a h\\u1ECDc.\",button:\"B\\u1EAFt \\u0111\\u1EA7u kh\\xE1m ph\\xE1\",link:\"/\"},{title:\"4. Khi tr\\u1EDF th\\xE0nh h\\u1ECDc vi\\xEAn\",content:\"Sau khi c\\xF3 m\\xE3 h\\u1ECDc vi\\xEAn, Minh H\\u1ED3ng c\\xF3 th\\u1EC3 h\\u1ED7 tr\\u1EE3 b\\u1EA1n tr\\xEAn c\\xE1c trang \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c k\\u1EBFt n\\u1ED1i.\",button:\"T\\xF4i \\u0111\\xE3 c\\xF3 m\\xE3 h\\u1ECDc vi\\xEAn\",link:\"\"}]),N.forEach(function(G,C){const P=t(\"div\",\"mh-guide-card\");if(P.appendChild(t(\"div\",\"mh-guide-title\",G.title||\"Th\\xF4ng tin \"+(C+1))),P.appendChild(t(\"div\",\"mh-guide-text\",G.content||\"\")),G.button){const O=de(G.button,!1,function(){const H=j(G.link);H&&H!==\"#\"?window.location.href=H:G.id===\"G004\"&&(i=\"home\",ce(),setTimeout(function(){const J=f.querySelector(\".mh-code-input\"),R=J?J.closest(\".mh-inline-box\"):null;R&&(R.style.display=\"block\"),J&&J.focus()},0))});P.appendChild(O)}n.appendChild(P)})}const b=me(),D=Ce.getContext(b);function S(N){const G=oe.getForGuest(N,D);return Ce.preferUnseen(N,G)}function B(N,G){s(G),G&&G.length&&Ce.markSeen(N,G)}function K(){const N=S(b);return N.length?{tab:b,items:N}:{tab:\"Guest\",items:S(\"Guest\")}}const _=K();_.items.length&&B(_.tab,_.items),oe.load(b).then(function(){if(!g||i!==\"newcomer\")return;const N=S(b);if(N.length){B(b,N);return}if(b===\"Guest\"){s([]);return}oe.load(\"Guest\").then(function(){if(!g||i!==\"newcomer\")return;const G=S(\"Guest\");B(\"Guest\",G)})});const Y=t(\"div\",\"mh-section\"),Q=t(\"div\",\"mh-actions\");Q.appendChild(de(\"T\\xF4i \\u0111\\xE3 c\\xF3 m\\xE3 h\\u1ECDc vi\\xEAn\",!0,function(){i=\"home\",ce(),setTimeout(function(){const N=f.querySelector(\".mh-code-input\"),G=N?N.closest(\".mh-inline-box\"):null;G&&(G.style.display=\"block\"),N&&N.focus()},0)})),Y.appendChild(Q),f.appendChild(Y)}function be(e,n){const o=String(e??\"\");return n=n&&typeof n==\"object\"?n:{},o.replace(/\\{\\{\\s*([A-Za-z0-9_.-]+)\\s*\\}\\}/g,function(s,b){const D=b.split(\".\");let S=n;for(let B=0;B<D.length;B++){if(S==null||typeof S!=\"object\"||!Object.prototype.hasOwnProperty.call(S,D[B]))return s;S=S[D[B]]}return S==null?\"\":typeof S==\"object\"?s:String(S)})}function Xt(e){if(!e||!e.verified)return;const n=me(),o=t(\"div\",\"mh-section\");o.style.display=\"none\";function s(){const _=_e.getForStudent(e.code);return{verified:!0,code:e.code||\"\",pageTab:n,data:Object.assign({},_.data||{}),conditions:Object.assign({},_.conditions||{})}}function b(_,Y){if(E(o),_=(_||[]).filter(function(N){const G=ut(N);return G===\"panel\"||G===\"both\"}),!_.length){o.style.display=\"none\";return}o.style.display=\"\",o.appendChild(t(\"div\",\"mh-section-title\",U.book+\" G\\u1EE2I \\xDD TR\\xCAN TRANG N\\xC0Y\"));const Q=Object.assign({studentCode:e.code||\"\",page:n},Y&&Y.data?Y.data:{});_.forEach(function(N,G){const C=t(\"div\",\"mh-guide-card\");if(C.appendChild(t(\"div\",\"mh-guide-title\",be(N.title||\"G\\u1EE3i \\xFD \"+(G+1),Q))),N.content&&C.appendChild(t(\"div\",\"mh-guide-text\",be(N.content,Q))),N.button){const P=de(be(N.button,Q),!1,function(){const O=be(j(N.link),Q);O&&O!==\"#\"&&(window.location.href=O)});C.appendChild(P)}o.appendChild(C)})}function D(){if(!g)return;const _=W.getState();if(!_.verified||_.code!==e.code)return;const Y=s();b(oe.getForStudent(n,Y),Y)}f.appendChild(o);const S=s(),B=oe.getForStudent(n,S);B.length&&b(B,S),oe.load(n).then(D);const K=function(){if(!g||!document.body.contains(o)){window.removeEventListener(\"ocdMinhHongContextChanged\",K);return}D()};window.addEventListener(\"ocdMinhHongContextChanged\",K)}const Yt=(function(){let e=null,n=!1,o=null;function s(){return window.StudentRewardSystem||null}function b(){const C=s();return!!(C&&typeof C.getStudentRewardProfile==\"function\"&&typeof C.getMinhHongOffers==\"function\"&&typeof C.createMinhHongSaleRequest==\"function\"&&typeof C.submitMinhHongSaleRequest==\"function\"&&typeof C.confirmMinhHongSale==\"function\")}function D(C){return C=Math.max(1e3,Number(C||12e3)),new Promise(function(P,O){const H=Date.now();(function J(){if(b())return P(s());if(Date.now()-H>=C)return O(new Error(\"Reward Core v4.2.2+ ch\\u01B0a s\\u1EB5n s\\xE0ng.\"));setTimeout(J,100)})()})}let S=\"\";function B(){const C=x.csvUrl.indexOf(\"?\")>=0?\"&\":\"?\",P=x.csvUrl+C+\"_mh_sell=\"+Date.now();return Pe(P,{cache:\"no-store\",credentials:\"omit\"}).then(function(O){if(!O.ok)throw new Error(\"Kh\\xF4ng th\\u1EC3 t\\u1EA3i d\\u1EEF li\\u1EC7u h\\u1ECDc vi\\xEAn.\");return O.text()})}function K(C,P){const O=re(P);if(e&&!C&&S===O)return e;const H=s();S=O;const R=(O&&H&&typeof H.getStudentSubmissionsCsv==\"function\"?H.getStudentSubmissionsCsv(O,!!C).catch(function(Z){return console.warn(\"[Minh H\\u1ED3ng] Reward Core ch\\u01B0a \\u0111\\u1ECDc \\u0111\\u01B0\\u1EE3c b\\xE0i n\\u1ED9p, d\\xF9ng CSV:\",Z&&Z.message||Z),B()}):B()).catch(function(Z){throw e===R&&(e=null),Z});return e=R,R}function _(C,P,O,H){function J($){try{return C.normalizeText(String($||\"\"))}catch{return String($||\"\").trim().toLowerCase()}}function R($){return $&&($.image||$.icon)||\"\"}let Z=\"\";if(P){const $=J(O);Z=R(P[$])||R(P[$.replace(/^goi\\s+/,\"\")])||R(P[\"goi \"+$])}if(!Z&&H&&(Z=H.image||H.gift&&H.gift.image||\"\"),!Z)return\"\";try{return typeof C.convertDriveImageUrl==\"function\"?C.convertDriveImageUrl(Z,160):Z}catch{return Z}}function Y(C,P,O){const H=C.GEM_TYPES&&C.GEM_TYPES[P],J=Q(C,P);if(H&&H.image&&typeof C.convertDriveImageUrl==\"function\"){const R=document.createElement(\"img\");return R.className=\"mh-sell-gem\"+(O?\" \"+O:\"\"),R.src=C.convertDriveImageUrl(H.image,96),R.alt=J,R.title=J,R.loading=\"lazy\",R.decoding=\"async\",R.onerror=function(){const Z=t(\"span\",\"\",J);R.parentNode&&R.parentNode.replaceChild(Z,R)},R}return t(\"span\",\"\",J)}function Q(C,P){const O=C.GEM_TYPES&&C.GEM_TYPES[P];return O&&O.displayName?O.displayName:P}function N(){if(document.getElementById(\"mhSellStyle1582\"))return;const C=document.createElement(\"style\");C.id=\"mhSellStyle1582\",C.textContent=`\n                .mh-sell-wrap{margin-top:10px}\n                .mh-sell-toggle{width:100%;border:1px solid rgba(121,83,55,.25);border-radius:12px;padding:11px 12px;background:#fffaf1;color:#5d4030;font-weight:700;cursor:pointer;text-align:left}\n                .mh-sell-box{margin-top:9px;border:1px solid rgba(121,83,55,.18);border-radius:12px;padding:10px;background:rgba(255,252,246,.82)}\n                .mh-sell-note{font-size:12px;line-height:1.55;opacity:.78;margin-bottom:8px}\n                .mh-sell-status{font-size:12px;line-height:1.55;padding:8px 9px;border-radius:9px;background:rgba(121,83,55,.07);margin-bottom:8px}\n                .mh-sell-item{padding:10px 0;border-top:1px solid rgba(121,83,55,.13)}\n                .mh-sell-item:first-of-type{border-top:0}\n                .mh-sell-name{display:flex;align-items:center;gap:8px;font-weight:700;margin-bottom:4px}\n                .mh-sell-item-icon{width:30px;height:30px;flex:0 0 30px;border-radius:8px;object-fit:contain;background:rgba(255,255,255,.75);border:1px solid rgba(121,83,55,.13)}\n                .mh-sell-item-icon-fallback{width:30px;height:30px;flex:0 0 30px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:rgba(121,83,55,.07);font-size:17px}\n                .mh-sell-meta{font-size:12px;line-height:1.5;opacity:.78}\n                .mh-sell-actions{display:flex;gap:7px;align-items:center;margin-top:8px}\n                .mh-sell-qty{width:72px;min-width:72px;border:1px solid rgba(121,83,55,.25);border-radius:9px;padding:8px;background:#fff}\n                .mh-sell-btn{flex:1;border:0;border-radius:9px;padding:9px 10px;background:#765344;color:#fff;font-weight:700;cursor:pointer}\n                .mh-sell-btn:disabled,.mh-sell-qty:disabled{opacity:.5;cursor:not-allowed}\n                /* v1.5.8.2: th\\u1EBB v\\u1EADt ph\\u1EA9m */\n                .mh-sell-item.mh-sell-card{padding:10px;margin-top:8px;border:1px solid rgba(121,83,55,.16);border-top:1px solid rgba(121,83,55,.16);border-radius:12px;background:#fff}\n                .mh-sell-item.mh-sell-card:first-of-type{border-top:1px solid rgba(121,83,55,.16)}\n                .mh-sell-head{display:flex;align-items:center;gap:10px}\n                .mh-sell-thumb{width:48px;height:48px;flex:0 0 48px;border-radius:10px;object-fit:contain;background:#fffaf1;border:1px solid rgba(121,83,55,.14)}\n                .mh-sell-thumb-fallback{width:48px;height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#fffaf1;border:1px solid rgba(121,83,55,.14);font-size:22px}\n                .mh-sell-info{flex:1;min-width:0}\n                .mh-sell-title{font-weight:700;color:#4c3326;line-height:1.3;overflow-wrap:anywhere}\n                .mh-sell-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}\n                .mh-sell-chip{font-size:11px;line-height:1;padding:4px 7px;border-radius:999px;background:rgba(121,83,55,.08);color:#6a4a3a;white-space:nowrap}\n                .mh-sell-chip b{font-weight:800;color:#4c3326}\n                .mh-sell-price{flex:0 0 auto;text-align:right;line-height:1.1}\n                .mh-sell-price-main{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:20px;font-weight:800;color:#765344}\n                .mh-sell-price-unit{font-size:10px;opacity:.6;margin-top:2px}\n                .mh-sell-gem{width:20px;height:20px;object-fit:contain;vertical-align:middle;flex:0 0 auto}\n                .mh-sell-gem-sm{width:17px;height:17px}\n                .mh-sell-actions{display:flex;gap:8px;align-items:center;margin-top:10px;padding-top:10px;border-top:1px dashed rgba(121,83,55,.18)}\n                .mh-sell-stepper{display:flex;align-items:center;border:1px solid rgba(121,83,55,.25);border-radius:10px;overflow:hidden;background:#fffaf1;flex:0 0 auto}\n                .mh-sell-step{width:34px;height:36px;border:0;background:transparent;color:#765344;font-size:18px;font-weight:800;cursor:pointer;padding:0}\n                .mh-sell-step:disabled{opacity:.35;cursor:not-allowed}\n                .mh-sell-stepper .mh-sell-qty{width:40px;min-width:40px;height:36px;border:0;border-left:1px solid rgba(121,83,55,.15);border-right:1px solid rgba(121,83,55,.15);border-radius:0;padding:0;text-align:center;font-weight:700;background:#fff;-moz-appearance:textfield;appearance:textfield}\n                .mh-sell-stepper .mh-sell-qty::-webkit-outer-spin-button,.mh-sell-stepper .mh-sell-qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n                .mh-sell-btn{display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px;border-radius:10px}\n                .mh-sell-btn .mh-sell-gem{width:18px;height:18px}\n            `,document.head.appendChild(C)}function G(C){if(!C||!C.verified)return;N();const P=t(\"div\",\"mh-section mh-sell-wrap\"),O=t(\"button\",\"mh-sell-toggle\",\"Rao b\\xE1n v\\u1EADt ph\\u1EA9m cho Minh H\\u1ED3ng\");O.type=\"button\";const H=t(\"div\",\"mh-sell-box\");H.style.display=\"none\",P.appendChild(O),P.appendChild(H),f.appendChild(P);let J=!1,R=!1,Z=!1,$=null;function nt(pe){E(H),H.appendChild(t(\"div\",\"mh-sell-status\",pe))}function fe(){return!Z&&document.body.contains(P)}async function Ve(pe){if(!n){nt(\"\\u0110ang t\\u1EA3i v\\u1EADt ph\\u1EA9m v\\xE0 ch\\xEDnh s\\xE1ch thu mua...\");try{const X=await D(12e3),xt=await K(!1,C.code),ge=await X.getStudentRewardProfile(C.code,xt,!!pe),en=ge&&ge.minhHong&&Array.isArray(ge.minhHong.offers)?ge.minhHong.offers:await X.getMinhHongOffers(C.code,xt,!!pe);if(!fe())return;E(H);const vt=(en||[]).filter(function(F){return F&&F.available&&Number(F.maxQuantity||0)>0});if(!vt.length){H.appendChild(t(\"div\",\"mh-sell-status\",\"Hi\\u1EC7n ch\\u01B0a c\\xF3 v\\u1EADt ph\\u1EA9m ph\\xF9 h\\u1EE3p \\u0111\\u1EC3 rao b\\xE1n, ho\\u1EB7c b\\u1EA1n \\u0111\\xE3 \\u0111\\u1EA1t gi\\u1EDBi h\\u1EA1n thu mua h\\xF4m nay.\")),R=!0;return}let St=null;try{const F=await X.loadSharedRewardData(!1);St=F&&F.giftMap||null}catch{}if(!fe())return;vt.forEach(function(F){const it=t(\"div\",\"mh-sell-item mh-sell-card\"),tn=ge&&Array.isArray(ge.ownedItems)?ge.ownedItems:[],Nt=String(F.giftName||\"\").trim().toLowerCase(),nn=tn.find(function(T){const ye=String(T&&(T.giftName||T.name||T.gift&&T.gift.name)||\"\").trim().toLowerCase();return ye===Nt||ye.replace(/^gói\\s+/i,\"\")===Nt.replace(/^gói\\s+/i,\"\")}),kt=_(X,St,F.giftName,nn),on=Number(F.ownedQuantity||F.quantity||0),Me=Math.max(1,Math.floor(Number(F.maxQuantity||1))),je=Number(F.price||0),Ie=t(\"div\",\"mh-sell-head\");if(kt){const T=document.createElement(\"img\");T.className=\"mh-sell-thumb\",T.src=kt,T.alt=F.giftName||\"V\\u1EADt ph\\u1EA9m\",T.loading=\"lazy\",T.decoding=\"async\",T.onerror=function(){const ye=t(\"span\",\"mh-sell-thumb-fallback\",U.gift);T.parentNode&&T.parentNode.replaceChild(ye,T)},Ie.appendChild(T)}else Ie.appendChild(t(\"span\",\"mh-sell-thumb-fallback\",U.gift));const ot=t(\"div\",\"mh-sell-info\");ot.appendChild(t(\"div\",\"mh-sell-title\",F.giftName||\"V\\u1EADt ph\\u1EA9m\"));const rt=t(\"div\",\"mh-sell-chips\"),Tt=t(\"span\",\"mh-sell-chip\",\"\\u0110ang c\\xF3 \");Tt.appendChild(t(\"b\",\"\",String(on)));const Mt=t(\"span\",\"mh-sell-chip\",\"B\\xE1n \\u0111\\u01B0\\u1EE3c \");Mt.appendChild(t(\"b\",\"\",String(Number(F.maxQuantity||0)))),rt.appendChild(Tt),rt.appendChild(Mt),ot.appendChild(rt),Ie.appendChild(ot);const Be=t(\"div\",\"mh-sell-price\"),It=t(\"div\",\"mh-sell-price-main\",String(je));It.appendChild(Y(X,F.gemType,\"\")),Be.appendChild(It),Be.appendChild(t(\"div\",\"mh-sell-price-unit\",\"/ c\\xE1i\")),Be.title=je+\" \"+Q(X,F.gemType)+\" / v\\u1EADt ph\\u1EA9m\",Ie.appendChild(Be),it.appendChild(Ie);const st=t(\"div\",\"mh-sell-actions\"),q=document.createElement(\"input\");q.type=\"number\",q.className=\"mh-sell-qty\",q.min=\"1\",q.max=String(Me),q.step=\"1\",q.value=\"1\",q.setAttribute(\"aria-label\",\"S\\u1ED1 l\\u01B0\\u1EE3ng b\\xE1n\"),q.inputMode=\"numeric\";const z=t(\"button\",\"mh-sell-btn\",\"B\\xC1N V\\u1EACT PH\\u1EA8M\");z.type=\"button\";const He=t(\"button\",\"mh-sell-step\",\"\\u2212\");He.type=\"button\",He.setAttribute(\"aria-label\",\"Gi\\u1EA3m s\\u1ED1 l\\u01B0\\u1EE3ng\");const Ae=t(\"button\",\"mh-sell-step\",\"+\");Ae.type=\"button\",Ae.setAttribute(\"aria-label\",\"T\\u0103ng s\\u1ED1 l\\u01B0\\u1EE3ng\");const Fe=t(\"div\",\"mh-sell-stepper\");Fe.appendChild(He),Fe.appendChild(q),Fe.appendChild(Ae);function Ee(){const T=Math.floor(Number(q.value||0));return Number.isFinite(T)?T:0}function Re(){const T=Math.min(Me,Math.max(1,Ee()||1));E(z),z.appendChild(document.createTextNode(\"B\\xC1N \\xB7 nh\\u1EADn \"+T*je)),z.appendChild(Y(X,F.gemType,\"\")),z.setAttribute(\"aria-label\",\"B\\xE1n \"+T+\" \"+(F.giftName||\"v\\u1EADt ph\\u1EA9m\")+\", nh\\u1EADn \"+T*je+\" \"+Q(X,F.gemType))}function qe(){const T=Ee();He.disabled=q.disabled||T<=1,Ae.disabled=q.disabled||T>=Me}function Ht(T){q.disabled||(q.value=String(Math.min(Me,Math.max(1,(Ee()||1)+T))),qe(),!z.disabled&&!$&&Re())}He.addEventListener(\"click\",function(){Ht(-1)}),Ae.addEventListener(\"click\",function(){Ht(1)}),q.addEventListener(\"input\",function(){qe(),!z.disabled&&!$&&Ee()>=1&&Ee()<=Me&&Re()});try{new MutationObserver(qe).observe(q,{attributes:!0,attributeFilter:[\"disabled\"]})}catch{}Re(),qe(),z.addEventListener(\"click\",async function(){if(n||o)return;if($){const ne=$;o={request:ne.request,csv:ne.csv},z.disabled=!0,q.disabled=!0,z.textContent=\"\\u0110ANG KI\\u1EC2M TRA...\";try{const ae=await X.confirmMinhHongSale(ne.request.sellId,ne.csv,C.code);o=null,ae&&ae.sale?($=null,await Ve(!0)):(z.disabled=!1,q.disabled=!1,z.textContent=\"KI\\u1EC2M TRA L\\u1EA0I\")}catch{o=null,z.disabled=!1,q.disabled=!1,z.textContent=\"KI\\u1EC2M TRA L\\u1EA0I\"}return}const T=Math.floor(Number(q.value||0)),ye=Math.floor(Number(F.maxQuantity||0));if(!Number.isFinite(T)||T<1||T>ye){q.focus();return}const rn=T*Number(F.price||0);if(window.confirm(\"X\\xE1c nh\\u1EADn b\\xE1n \"+T+\" \\xD7 \"+F.giftName+\" cho Minh H\\u1ED3ng \\u0111\\u1EC3 nh\\u1EADn \"+rn+\" \"+Q(X,F.gemType)+\"?\")){n=!0,z.disabled=!0,q.disabled=!0,z.textContent=\"\\u0110ANG G\\u1EECI...\";try{const ne=await K(!1,C.code),ae=await X.createMinhHongSaleRequest(C.code,F.giftName,T,ne);if(await X.submitMinhHongSaleRequest(ae),o={request:ae,csv:ne},n=!1,z.textContent=\"\\u0110ANG CH\\u1EDC X\\xC1C NH\\u1EACN...\",fe()){const we=t(\"div\",\"mh-sell-status\",\"\\u0110\\xE3 g\\u1EEDi giao d\\u1ECBch \"+ae.sellId+\". \\u0110ang ch\\u1EDD Google Sheet \\u0111\\u1ED3ng b\\u1ED9; kh\\xF4ng c\\u1EA7n b\\u1EA5m b\\xE1n l\\u1EA1i.\");H.insertBefore(we,H.firstChild)}X.confirmMinhHongSale(ae.sellId,ne,C.code).then(async function(we){if(!(!o||o.request.sellId!==ae.sellId)){if(o=null,!we||!we.sale){if(fe()){$={request:ae,csv:ne},z.disabled=!1,q.disabled=!1,z.textContent=\"KI\\u1EC2M TRA L\\u1EA0I\";const ct=t(\"div\",\"mh-sell-status\",\"Giao d\\u1ECBch \\u0111\\xE3 g\\u1EEDi nh\\u01B0ng Sheet ch\\u01B0a \\u0111\\u1ED3ng b\\u1ED9 k\\u1ECBp. B\\u1EA5m KI\\u1EC2M TRA L\\u1EA0I \\u0111\\u1EC3 x\\xE1c nh\\u1EADn \\u0111\\xFAng SELL_ID n\\xE0y; n\\xFAt n\\xE0y kh\\xF4ng t\\u1EA1o giao d\\u1ECBch m\\u1EDBi.\");H.insertBefore(ct,H.firstChild)}return}if(fe()&&(await Ve(!0),fe())){const ct=t(\"div\",\"mh-sell-status\",\"\\u0110\\xE3 x\\xE1c nh\\u1EADn giao d\\u1ECBch. Reward Core \\u0111\\xE3 \\u0111\\u1ED3ng b\\u1ED9 l\\u1EA1i h\\xE0nh trang v\\xE0 Linh Th\\u1EA1ch.\");H.insertBefore(ct,H.firstChild)}}}).catch(function(we){o=null,console.warn(\"[Minh H\\u1ED3ng] X\\xE1c nh\\u1EADn giao d\\u1ECBch:\",we),fe()&&(z.disabled=!1,q.disabled=!1,z.textContent=\"KI\\u1EC2M TRA L\\u1EA0I\")})}catch(ne){n=!1,o=null,z.disabled=!1,q.disabled=!1,Re(),window.alert(ne&&ne.message?ne.message:\"Kh\\xF4ng th\\u1EC3 g\\u1EEDi giao d\\u1ECBch. Vui l\\xF2ng th\\u1EED l\\u1EA1i.\")}}}),st.appendChild(Fe),st.appendChild(z),it.appendChild(st),H.appendChild(it)}),R=!0}catch(X){nt(X&&X.message?X.message:\"Kh\\xF4ng th\\u1EC3 t\\u1EA3i h\\u1EC7 th\\u1ED1ng thu mua.\")}}}O.addEventListener(\"click\",function(){J=!J,H.style.display=J?\"\":\"none\",O.textContent=J?\"\\u0110\\xF3ng rao b\\xE1n v\\u1EADt ph\\u1EA9m\":\"Rao b\\xE1n v\\u1EADt ph\\u1EA9m cho Minh H\\u1ED3ng\",J&&!R&&Ve(!1)});const wt=function(pe){if(!fe()){Z=!0,window.removeEventListener(\"ocdRewardProfileChanged\",wt);return}if(!J||n||o)return;const X=pe&&pe.detail?pe.detail:{};(!X.code||String(X.code).toUpperCase()===String(C.code).toUpperCase())&&Ve(!0)};window.addEventListener(\"ocdRewardProfileChanged\",wt)}return{append:G}})();function Wt(e){f.appendChild(t(\"div\",\"mh-status\",e.verified?le.check+\" H\\u1ECCC VI\\xCAN \"+e.code:U.user+\" \"+e.code+\" \"+le.dot+\" CH\\u1EDC X\\xC1C MINH\")),f.appendChild(t(\"div\",\"mh-intro-title\",e.verified?\"Ch\\xE0o m\\u1EEBng b\\u1EA1n quay l\\u1EA1i.\":\"Minh H\\u1ED3ng \\u0111\\xE3 ghi nh\\u1EDB m\\xE3 c\\u1EE7a b\\u1EA1n.\")),f.appendChild(t(\"div\",\"mh-intro-text\",e.verified?he()?\"M\\xE3 h\\u1ECDc vi\\xEAn \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c x\\xE1c minh. Minh H\\u1ED3ng s\\u1EBD \\u0111\\u1ED3ng h\\xE0nh c\\xF9ng b\\u1EA1n tr\\xEAn c\\xE1c trang c\\u1EE7a Th\\u01B0 M\\xF4n.\":Ke()||Oe()?\"M\\xE3 h\\u1ECDc vi\\xEAn \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c x\\xE1c minh. Minh H\\u1ED3ng s\\u1EBD \\u01B0u ti\\xEAn nh\\u1EEFng l\\u1EDDi khuy\\xEAn h\\u1ECDc t\\u1EADp li\\xEAn quan tr\\u1EF1c ti\\u1EBFp \\u0111\\u1EBFn b\\u1EA1n.\":\"M\\xE3 h\\u1ECDc vi\\xEAn \\u0111\\xE3 \\u0111\\u01B0\\u1EE3c x\\xE1c minh. Trang n\\xE0y kh\\xF4ng ph\\xE1t th\\xF4ng b\\xE1o t\\u1EF1 \\u0111\\u1ED9ng.\":\"M\\xE3 hi\\u1EC7n \\u0111ang \\u0111\\u01B0\\u1EE3c ghi nh\\u1EDB nh\\u01B0ng ch\\u01B0a \\u0111\\u01B0\\u1EE3c m\\u1ED9t trang h\\u1ECDc vi\\xEAn x\\xE1c minh.\")),window.OCDAuth&&e.code&&f.appendChild(window.OCDAuth.securityCard(e.code,function(){ie()})),Xt(e),Yt.append(e),he()?void 0:Ke()?void 0:Oe()&&void 0;const n=t(\"div\",\"mh-section\");n.appendChild(t(\"div\",\"mh-section-title\",U.key+\" M\\xC3 H\\u1ECCC VI\\xCAN\"));const o=t(\"div\",\"mh-actions\"),s=t(\"div\",\"mh-inline-box\");s.style.display=\"none\";const b=t(\"input\",\"mh-code-input\");b.type=\"text\",b.placeholder=\"Nh\\u1EADp m\\xE3 h\\u1ECDc vi\\xEAn m\\u1EDBi\";const D=t(\"button\",\"mh-code-submit\",\"X\\xC1C MINH M\\xC3 M\\u1EDAI\");D.type=\"button\";async function S(){const B=re(b.value);if(!B){b.focus();return}if(D.disabled)return;const K=D.textContent;D.disabled=!0,D.textContent=\"\\u0110ANG X\\xC1C MINH...\";try{const _=await ke.verifyStudentCode(B);if(!_.ok){alert(\"Kh\\xF4ng t\\xECm th\\u1EA5y m\\xE3 h\\u1ECDc vi\\xEAn \"+B+\". Vui l\\xF2ng ki\\u1EC3m tra l\\u1EA1i m\\xE3 \\u0111\\xE3 nh\\u1EADp.\"),b.focus(),b.select();return}if(await Je(_.code,!0)){alert(Ue(_.code));return}if(window.OCDAuth&&!await window.OCDAuth.ensureAccess(_.code,{onSuccess:function(){i=\"home\",ie()}}))return;W.confirmStudent(_.code,\"minh-hong-change-code\"),ie()}catch(_){console.warn(\"[Minh H\\u1ED3ng] \\u0110\\u1ED5i m\\xE3 h\\u1ECDc vi\\xEAn:\",_),alert(\"Minh H\\u1ED3ng ch\\u01B0a th\\u1EC3 ki\\u1EC3m tra m\\xE3 h\\u1ECDc vi\\xEAn l\\xFAc n\\xE0y. Vui l\\xF2ng ki\\u1EC3m tra k\\u1EBFt n\\u1ED1i m\\u1EA1ng v\\xE0 th\\u1EED l\\u1EA1i.\")}finally{D.disabled=!1,D.textContent=K}}D.addEventListener(\"click\",S),b.addEventListener(\"keydown\",function(B){B.key===\"Enter\"&&S()}),s.appendChild(b),s.appendChild(D),s.appendChild(t(\"div\",\"mh-small-note\",\"M\\xE3 m\\u1EDBi s\\u1EBD \\u1EDF tr\\u1EA1ng th\\xE1i ch\\u1EDD x\\xE1c minh cho t\\u1EDBi khi m\\u1ED9t trang h\\u1ECDc vi\\xEAn ki\\u1EC3m tra th\\xE0nh c\\xF4ng.\")),o.appendChild(de(\"\\u0110\\u1ED5i m\\xE3 h\\u1ECDc vi\\xEAn\",!1,function(){s.style.display=s.style.display===\"none\"?\"block\":\"none\",s.style.display===\"block\"&&b.focus()})),o.appendChild(de(\"Tho\\xE1t phi\\xEAn h\\u1ECDc vi\\xEAn\",!1,function(){window.OCDAuth&&window.OCDAuth.token()&&window.OCDAuth.logout(!1),W.clear(\"minh-hong-logout\"),i=\"home\",ie()})),n.appendChild(o),n.appendChild(s),f.appendChild(n)}function ce(){if(!f||!g)return;E(f);const e=W.getState();if(e.mode===\"student\"&&e.code&&e.verified===!0){Wt(e);return}i===\"newcomer\"?Qt():Jt()}function tt(){ee=Ke()?Dt():[]}function ie(){tt(),Ge(),ce(),!g&&!p&&Te()}function Ct(e){k=Array.isArray(e)?e:[],he()&&(ce(),!g&&!p&&Te())}function Zt(){}function bt(){xe()&&setTimeout(function(){\"requestIdleCallback\"in window?window.requestIdleCallback(Zt,{timeout:2e3}):void 0},x.initializeDelay)}window.addEventListener(\"ocdStudentInsightReady\",function(e){const n=e.detail;!n||!n.code||(Qe.save(n),ie())}),window.addEventListener(\"ocdMinhHongContextChanged\",function(){Ge(),g&&ce()}),window.addEventListener(\"ocdStudentSessionChanged\",function(){i=\"home\",ie()}),window.addEventListener(\"ocdCommunityActivityReady\",function(e){if(!he())return;const n=e.detail||{};Ct(n.events||[])}),window.addEventListener(\"ocdClassPulseReady\",function(e){const n=e.detail||null;et(n)}),window.addEventListener(\"ocdMinhHongPageContextReady\",function(e){const n=e.detail||{},o=at(n.context);o&&(window.OCDMinhHongPageContext=o),tt(),Ge(),Oe()?et(gt()):(ce(),!g&&!p&&Te())}),window.addEventListener(\"storage\",function(e){e.key===x.insightStorageKey&&(Qe.clearMemory(),ie())});async function $t(){try{if(!W.isVerified())return;const e=W.normalizeCode(W.getCode());if(!e||e===\"ADMIN\"||!await Je(e,!1))return;W.clear(\"paused\");try{ie()}catch{}const n=\"ocd_mh_paused_notice_\"+e;let o=!1;try{o=sessionStorage.getItem(n)===\"1\",sessionStorage.setItem(n,\"1\")}catch{}o||alert(Ue(e))}catch{}}function yt(){Xe(),setTimeout($t,1200),tt(),ze()||Ge(),Oe()&&et(gt()),document.readyState===\"complete\"?bt():window.addEventListener(\"load\",bt,{once:!0}),!he()&&!ze()&&!p&&Te();try{window.dispatchEvent(new CustomEvent(\"ocdMinhHongReady\",{detail:{version:x.version,home:xe(),pageContext:ue(),session:W.getState()}}))}catch{}}return document.readyState===\"loading\"?document.addEventListener(\"DOMContentLoaded\",yt,{once:!0}):yt(),W.isVerified()||(Ce.registerVisit(me()),setTimeout(function(){oe.load(me())},1200)),{version:x.version,open:pt,close:$e,toggle:mt,refresh:ie,getState:function(){return{panelOpen:g,notificationsMuted:p,home:xe(),pageContext:ue(),contentTab:me(),context:_e.getState(),notificationMode:ue(),student:W.getState(),communityActivityCount:ke.getEvents().length,personalSuggestionCount:ee.length,contextSpeechCount:v.length,classPulseEventCount:M.length,hasInsight:!!Qe.getForCurrentStudent()}}}})();window.MinhHongAssistant=Ot,console.info(\"[Minh H\\u1ED3ng] Footer v\"+x.version+\" ready | mode:\",ue())})();\n");
})();

Nhận xét

Bài đăng phổ biến từ blog này

theme/thudao-footer.kho.js · Gộp Reward Core (css v4.2.2 + js f827add) + Minh Hồng footer (css v1.5.7.4 + js 4bff33d) cho chân trang thudao.com

trang/thudao/dang-ky-hoc.html · Bản trước khi chuyển sang kho (tải từ GitHub/jsDelivr)

trang/thudao/bai-viet/benh-cua-thu-dan-duong-dai-the-trien-lam-xu-thu-va-nguy-menh-de-vuot-co-nhan.html · Bản trước khi chuyển sang kho (có video, tải từ GitHub/jsDelivr)