{"id":12557,"date":"2025-11-19T13:49:19","date_gmt":"2025-11-19T06:49:19","guid":{"rendered":"http:\/\/admin.ntwo.moph.go.th\/?page_id=12557"},"modified":"2026-05-11T14:39:23","modified_gmt":"2026-05-11T07:39:23","slug":"12557-2","status":"publish","type":"page","link":"https:\/\/ntwo.moph.go.th\/moph-nwt\/","title":{"rendered":"Home"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"padding-top:0;padding-bottom:0;flex-basis:100%\"><\/div>\n<\/div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<style>\n.gcal-wrap {\n  font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;\n  max-width: 900px;\n  margin: 0 auto;\n  padding: 8px 0 32px;\n}\n\n\/* Nav bar *\/\n.gcal-nav {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 16px;\n  gap: 12px;\n}\n.gcal-nav-center {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n.gcal-month-label {\n  font-size: 18px;\n  font-weight: 600;\n  color: #1a4f8a;\n  min-width: 180px;\n  text-align: center;\n}\n.gcal-btn {\n  background: #fff;\n  border: 1.5px solid #c5d5e8;\n  border-radius: 8px;\n  padding: 6px 14px;\n  font-size: 13px;\n  font-weight: 500;\n  color: #1a4f8a;\n  cursor: pointer;\n  transition: background .15s, border-color .15s;\n  font-family: inherit;\n}\n.gcal-btn:hover { background: #e8f0fb; border-color: #1a4f8a; }\n.gcal-btn.today { background: #1a4f8a; color: #fff; border-color: #1a4f8a; }\n.gcal-btn.today:hover { background: #1560a8; }\n.gcal-icon-btn {\n  background: #fff;\n  border: 1.5px solid #c5d5e8;\n  border-radius: 8px;\n  width: 34px; height: 34px;\n  display: flex; align-items: center; justify-content: center;\n  cursor: pointer;\n  font-size: 16px;\n  color: #1a4f8a;\n  transition: background .15s;\n}\n.gcal-icon-btn:hover { background: #e8f0fb; }\n\n\/* Loading *\/\n.gcal-loading {\n  text-align: center;\n  padding: 40px;\n  color: #5a7fa8;\n  font-size: 14px;\n}\n\n\/* Grid header *\/\n.gcal-grid { width: 100%; border-collapse: collapse; }\n.gcal-grid th {\n  font-size: 11px;\n  font-weight: 600;\n  color: #5a7fa8;\n  text-align: center;\n  padding: 8px 4px;\n  text-transform: uppercase;\n  letter-spacing: .5px;\n}\n.gcal-grid th:first-child { color: #e05a5a; }\n\n\/* Day cells *\/\n.gcal-grid td {\n  border: 0.5px solid #e0eaf6;\n  vertical-align: top;\n  width: calc(100% \/ 7);\n  height: 100px;\n  max-height: 100px;\n  padding: 6px;\n  position: relative;\n  background: #fff;\n  overflow: hidden;\n}\n.gcal-grid td.other-month { background: #f8fafc; }\n.gcal-grid td.today-cell { background: #f0f6ff; }\n.gcal-grid td.today-cell .day-num {\n  background: #1a4f8a;\n  color: #fff;\n  border-radius: 50%;\n  width: 24px; height: 24px;\n  display: flex; align-items: center; justify-content: center;\n}\n\n.day-num {\n  font-size: 12px;\n  font-weight: 500;\n  color: #1a2e4a;\n  margin-bottom: 4px;\n  width: 24px; height: 24px;\n  display: flex; align-items: center; justify-content: center;\n}\n.day-num.sunday { color: #e05a5a; }\n.other-month .day-num { color: #b0c4d8; }\n\n\/* Event pills *\/\n.gcal-event {\n  font-size: 10px;\n  font-weight: 500;\n  background: #1a4f8a;\n  color: #fff;\n  border-radius: 3px;\n  padding: 2px 5px;\n  margin-bottom: 2px;\n  white-space: normal;\n  overflow: hidden;\n  word-break: break-word;\n  cursor: pointer;\n  display: block;\n  transition: background .12s;\n  line-height: 1.3;\n  max-height: 3.9em;\n}\n.gcal-event:hover { background: #1560a8; }\n.gcal-event.multiday { background: #2a6db5; border-radius: 0; }\n.gcal-event.allday { background: #0f6e56; }\n.gcal-more {\n  font-size: 9px;\n  color: #1a4f8a;\n  cursor: pointer;\n  font-weight: 600;\n  padding: 1px 2px;\n}\n.gcal-more:hover { text-decoration: underline; }\n\n\/* Event detail popup *\/\n.gcal-popup {\n  display: none;\n  position: fixed;\n  top: 50%; left: 50%;\n  transform: translate(-50%, -50%);\n  background: #fff;\n  border: 1.5px solid #1a4f8a;\n  border-radius: 12px;\n  padding: 20px 24px;\n  z-index: 9999;\n  min-width: 280px;\n  max-width: 380px;\n  box-shadow: 0 8px 32px rgba(26,79,138,.15);\n}\n.gcal-popup.active { display: block; }\n.gcal-popup-overlay {\n  display: none;\n  position: fixed;\n  inset: 0;\n  background: rgba(0,0,0,.3);\n  z-index: 9998;\n}\n.gcal-popup-overlay.active { display: block; }\n.gcal-popup-title {\n  font-size: 15px;\n  font-weight: 600;\n  color: #1a2e4a;\n  margin-bottom: 10px;\n  padding-right: 24px;\n}\n.gcal-popup-row {\n  font-size: 12px;\n  color: #5a7fa8;\n  margin-bottom: 6px;\n  display: flex;\n  gap: 8px;\n}\n.gcal-popup-close {\n  position: absolute;\n  top: 12px; right: 14px;\n  font-size: 18px;\n  color: #aaa;\n  cursor: pointer;\n  line-height: 1;\n  background: none;\n  border: none;\n}\n.gcal-popup-close:hover { color: #1a4f8a; }\n\n\/* Event list below calendar *\/\n.gcal-upcoming {\n  margin-top: 20px;\n  background: #fff;\n  border: 0.5px solid #c5d5e8;\n  border-radius: 10px;\n  overflow: hidden;\n}\n.gcal-upcoming-header {\n  background: #1a4f8a;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 600;\n  padding: 10px 16px;\n}\n.gcal-upcoming-item {\n  display: flex;\n  gap: 14px;\n  padding: 10px 16px;\n  border-bottom: 0.5px solid #e0eaf6;\n  align-items: flex-start;\n}\n.gcal-upcoming-item:last-child { border-bottom: none; }\n.gcal-upcoming-date {\n  min-width: 44px;\n  text-align: center;\n  background: #e8f0fb;\n  border-radius: 6px;\n  padding: 4px 6px;\n}\n.gcal-upcoming-date .dd {\n  font-size: 18px;\n  font-weight: 700;\n  color: #1a4f8a;\n  line-height: 1;\n}\n.gcal-upcoming-date .mm {\n  font-size: 9px;\n  color: #5a7fa8;\n  text-transform: uppercase;\n}\n.gcal-upcoming-info .ev-title {\n  font-size: 13px;\n  font-weight: 600;\n  color: #1a2e4a;\n}\n.gcal-upcoming-info .ev-time {\n  font-size: 11px;\n  color: #5a7fa8;\n  margin-top: 2px;\n}\n.gcal-empty {\n  padding: 20px 16px;\n  color: #5a7fa8;\n  font-size: 13px;\n  text-align: center;\n}\n<\/style>\n\n<div class=\"gcal-wrap\">\n  <div class=\"gcal-nav\">\n    <button class=\"gcal-btn today\" onclick=\"gcalGoToday()\">\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49<\/button>\n    <div class=\"gcal-nav-center\">\n      <button class=\"gcal-icon-btn\" onclick=\"gcalPrev()\">&#8249;<\/button>\n      <div class=\"gcal-month-label\" id=\"gcal-label\">\u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14&#8230;<\/div>\n      <button class=\"gcal-icon-btn\" onclick=\"gcalNext()\">&#8250;<\/button>\n    <\/div>\n    <div style=\"width:60px\"><\/div>\n  <\/div>\n  <div id=\"gcal-loading\" class=\"gcal-loading\">\u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19&#8230;<\/div>\n  <table class=\"gcal-grid\" id=\"gcal-table\" style=\"display:none\">\n    <thead>\n      <tr>\n        <th>\u0e2d\u0e32<\/th><th>\u0e08<\/th><th>\u0e2d<\/th><th>\u0e1e<\/th><th>\u0e1e\u0e24<\/th><th>\u0e28<\/th><th>\u0e2a<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody id=\"gcal-body\"><\/tbody>\n  <\/table>\n  <div class=\"gcal-upcoming\" id=\"gcal-upcoming\" style=\"display:none\">\n    <div class=\"gcal-upcoming-header\">\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e17\u0e35\u0e48\u0e08\u0e30\u0e16\u0e36\u0e07\u0e40\u0e23\u0e47\u0e27\u0e46\u0e19\u0e35\u0e49<\/div>\n    <div id=\"gcal-upcoming-list\"><\/div>\n  <\/div>\n<\/div>\n\n<div class=\"gcal-popup-overlay\" id=\"gcal-overlay\" onclick=\"gcalClosePopup()\"><\/div>\n<div class=\"gcal-popup\" id=\"gcal-popup\">\n  <button class=\"gcal-popup-close\" onclick=\"gcalClosePopup()\">\u2715<\/button>\n  <div class=\"gcal-popup-title\" id=\"popup-title\"><\/div>\n  <div class=\"gcal-popup-row\" id=\"popup-date\"><\/div>\n  <div class=\"gcal-popup-row\" id=\"popup-time\"><\/div>\n  <div class=\"gcal-popup-row\" id=\"popup-loc\" style=\"display:none\"><\/div>\n  <div class=\"gcal-popup-row\" id=\"popup-desc\" style=\"display:none\"><\/div>\n<\/div>\n\n<script>\nconst GCAL_API_KEY = 'AIzaSyBxh-J5XWkS8NpB23ar0Wr4VlVrPRegHdo';\nconst GCAL_ID = 'ict.nara.moph@gmail.com';\nconst THAI_MONTHS = ['\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21','\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c','\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21','\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19','\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21','\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19','\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21','\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21','\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19','\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21','\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19','\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21'];\nconst THAI_MONTHS_SHORT = ['\u0e21.\u0e04.','\u0e01.\u0e1e.','\u0e21\u0e35.\u0e04.','\u0e40\u0e21.\u0e22.','\u0e1e.\u0e04.','\u0e21\u0e34.\u0e22.','\u0e01.\u0e04.','\u0e2a.\u0e04.','\u0e01.\u0e22.','\u0e15.\u0e04.','\u0e1e.\u0e22.','\u0e18.\u0e04.'];\n\nlet gcalYear, gcalMonth, gcalEvents = [], gcalLoaded = {};\n\nfunction gcalInit() {\n  const now = new Date();\n  gcalYear = now.getFullYear();\n  gcalMonth = now.getMonth();\n  gcalFetch();\n}\n\nfunction gcalFetch() {\n  const key = gcalYear + '-' + gcalMonth;\n  if (gcalLoaded[key]) { gcalRender(); return; }\n\n  document.getElementById('gcal-loading').style.display = 'block';\n  document.getElementById('gcal-table').style.display = 'none';\n  document.getElementById('gcal-upcoming').style.display = 'none';\n\n  const firstDay = new Date(gcalYear, gcalMonth, 1);\n  const lastDay  = new Date(gcalYear, gcalMonth + 1, 0);\n  const tMin = new Date(firstDay.getFullYear(), firstDay.getMonth() - 0, 1).toISOString();\n  const tMax = new Date(lastDay.getFullYear(), lastDay.getMonth() + 1, 1).toISOString();\n\n  const url = `https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/${encodeURIComponent(GCAL_ID)}\/events?key=${GCAL_API_KEY}&timeMin=${tMin}&timeMax=${tMax}&singleEvents=true&orderBy=startTime&maxResults=100`;\n\n  fetch(url)\n    .then(r => r.json())\n    .then(data => {\n      if (data.items) {\n        gcalEvents = gcalEvents.filter(e => {\n          const d = new Date(e.start.dateTime || e.start.date);\n          return !(d.getFullYear() === gcalYear && d.getMonth() === gcalMonth);\n        });\n        gcalEvents = gcalEvents.concat(data.items);\n        gcalLoaded[key] = true;\n      }\n      gcalRender();\n    })\n    .catch(() => {\n      document.getElementById('gcal-loading').innerHTML = '\u26a0\ufe0f \u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e42\u0e2b\u0e25\u0e14\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e14\u0e49 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a API Key \u0e41\u0e25\u0e30\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 Calendar';\n    });\n}\n\nfunction gcalRender() {\n  document.getElementById('gcal-label').textContent = THAI_MONTHS[gcalMonth] + ' ' + (gcalYear + 543);\n  document.getElementById('gcal-loading').style.display = 'none';\n  document.getElementById('gcal-table').style.display = 'table';\n  document.getElementById('gcal-upcoming').style.display = 'block';\n\n  const today = new Date();\n  const firstDay = new Date(gcalYear, gcalMonth, 1);\n  const lastDay  = new Date(gcalYear, gcalMonth + 1, 0);\n  const startDow = firstDay.getDay();\n\n  \/\/ Filter events for this month\n  const monthEvents = gcalEvents.filter(e => {\n    const d = new Date(e.start.dateTime || e.start.date);\n    return d.getFullYear() === gcalYear && d.getMonth() === gcalMonth;\n  });\n\n  \/\/ Build cells\n  let cells = [];\n  \/\/ Prev month padding\n  for (let i = 0; i < startDow; i++) {\n    const d = new Date(gcalYear, gcalMonth, 1 - (startDow - i));\n    cells.push({ date: d, curMonth: false });\n  }\n  for (let d = 1; d <= lastDay.getDate(); d++) {\n    cells.push({ date: new Date(gcalYear, gcalMonth, d), curMonth: true });\n  }\n  \/\/ Next month padding\n  let extra = 7 - (cells.length % 7);\n  if (extra === 7) extra = 0;\n  for (let i = 1; i <= extra; i++) {\n    cells.push({ date: new Date(gcalYear, gcalMonth + 1, i), curMonth: false });\n  }\n\n  \/\/ Render rows\n  let html = '';\n  for (let r = 0; r < cells.length \/ 7; r++) {\n    html += '<tr>';\n    for (let c = 0; c < 7; c++) {\n      const cell = cells[r * 7 + c];\n      const d = cell.date;\n      const isToday = d.toDateString() === today.toDateString();\n      const cls = (!cell.curMonth ? ' other-month' : '') + (isToday ? ' today-cell' : '');\n      const numCls = c === 0 ? ' sunday' : '';\n\n      \/\/ Events on this day\n      const dayEvs = gcalEvents.filter(e => {\n        const es = new Date(e.start.dateTime || e.start.date);\n        return es.getFullYear() === d.getFullYear() && es.getMonth() === d.getMonth() && es.getDate() === d.getDate();\n      });\n\n      let evHtml = '';\n      const maxShow = 2;\n      dayEvs.slice(0, maxShow).forEach(ev => {\n        const title = ev.summary || '(\u0e44\u0e21\u0e48\u0e21\u0e35\u0e0a\u0e37\u0e48\u0e2d)';\n        const isAllDay = !ev.start.dateTime;\n        const cls2 = isAllDay ? ' allday' : '';\n        evHtml += `<span class=\"gcal-event${cls2}\" onclick=\"gcalShowPopup('${ev.id}')\" title=\"${title}\">${title}<\/span>`;\n      });\n      if (dayEvs.length > maxShow) {\n        evHtml += `<span class=\"gcal-more\">+${dayEvs.length - maxShow} \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21<\/span>`;\n      }\n\n      html += `<td class=\"${cls}\"><div class=\"day-num${numCls}\">${d.getDate()}<\/div>${evHtml}<\/td>`;\n    }\n    html += '<\/tr>';\n  }\n  document.getElementById('gcal-body').innerHTML = html;\n\n  \/\/ Upcoming list \u2014 \u0e41\u0e2a\u0e14\u0e07\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e19\u0e35\u0e49 + \u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e2b\u0e19\u0e49\u0e32\n  const todayStart = new Date();\n  todayStart.setHours(0, 0, 0, 0);\n  \/\/ \u0e2b\u0e32\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e15\u0e49\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e19\u0e35\u0e49\n  const dayOfWeek = todayStart.getDay(); \/\/ 0=\u0e2d\u0e32, 1=\u0e08, ...\n  const diffToMonday = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;\n  const weekStart = new Date(todayStart);\n  weekStart.setDate(todayStart.getDate() + diffToMonday);\n  \/\/ \u0e2a\u0e34\u0e49\u0e19\u0e2a\u0e38\u0e14\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e2b\u0e19\u0e49\u0e32 (\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c + 1 = \u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e16\u0e31\u0e14\u0e44\u0e1b)\n  const weekEnd = new Date(weekStart);\n  weekEnd.setDate(weekStart.getDate() + 14); \/\/ 2 \u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\n\n  const sorted = [...gcalEvents]\n    .filter(ev => {\n      const evDate = new Date(ev.start.dateTime || ev.start.date);\n      return evDate >= todayStart && evDate < weekEnd;\n    })\n    .sort((a, b) => new Date(a.start.dateTime || a.start.date) - new Date(b.start.dateTime || b.start.date));\n  const SHOW_LIMIT = 5;\n  let upHtml = '';\n  if (sorted.length === 0) {\n    upHtml = '<div class=\"gcal-empty\">\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e43\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e19\u0e35\u0e49\u0e41\u0e25\u0e30\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e2b\u0e19\u0e49\u0e32<\/div>';\n  } else {\n    const renderItems = (list) => list.map(ev => {\n      const start = new Date(ev.start.dateTime || ev.start.date);\n      const isAllDay = !ev.start.dateTime;\n      const dd = start.getDate();\n      const mm = THAI_MONTHS_SHORT[start.getMonth()];\n      const timeStr = isAllDay ? '\u0e17\u0e31\u0e49\u0e07\u0e27\u0e31\u0e19' : start.toLocaleTimeString('th-TH', { hour: '2-digit', minute: '2-digit' });\n      return `<div class=\"gcal-upcoming-item\">\n        <div class=\"gcal-upcoming-date\"><div class=\"dd\">${dd}<\/div><div class=\"mm\">${mm}<\/div><\/div>\n        <div class=\"gcal-upcoming-info\">\n          <div class=\"ev-title\">${ev.summary || '(\u0e44\u0e21\u0e48\u0e21\u0e35\u0e0a\u0e37\u0e48\u0e2d)'}<\/div>\n          <div class=\"ev-time\">\ud83d\udd50 ${timeStr}${ev.location ? ' &nbsp;\ud83d\udccd ' + ev.location : ''}<\/div>\n        <\/div>\n      <\/div>`;\n    }).join('');\n\n    upHtml += renderItems(sorted.slice(0, SHOW_LIMIT));\n\n    if (sorted.length > SHOW_LIMIT) {\n      upHtml += `\n        <div id=\"gcal-hidden-items\" style=\"display:none\">${renderItems(sorted.slice(SHOW_LIMIT))}<\/div>\n        <div style=\"text-align:center;padding:12px 0;\">\n          <button class=\"gcal-btn\" id=\"gcal-show-all-btn\" onclick=\"gcalToggleAll()\">\n            \u0e14\u0e39\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 (${sorted.length} \u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21) \u25be\n          <\/button>\n        <\/div>`;\n    }\n  }\n  document.getElementById('gcal-upcoming-list').innerHTML = upHtml;\n}\n\nfunction gcalShowPopup(id) {\n  const ev = gcalEvents.find(e => e.id === id);\n  if (!ev) return;\n  const isAllDay = !ev.start.dateTime;\n  const start = new Date(ev.start.dateTime || ev.start.date);\n  const end   = ev.end ? new Date(ev.end.dateTime || ev.end.date) : null;\n\n  document.getElementById('popup-title').textContent = ev.summary || '(\u0e44\u0e21\u0e48\u0e21\u0e35\u0e0a\u0e37\u0e48\u0e2d)';\n  document.getElementById('popup-date').innerHTML = '\ud83d\udcc5 ' + start.toLocaleDateString('th-TH', { weekday:'long', year:'numeric', month:'long', day:'numeric' });\n\n  if (isAllDay) {\n    document.getElementById('popup-time').innerHTML = '\ud83d\udd50 \u0e17\u0e31\u0e49\u0e07\u0e27\u0e31\u0e19';\n  } else {\n    const ts = start.toLocaleTimeString('th-TH', { hour:'2-digit', minute:'2-digit' });\n    const te = end ? end.toLocaleTimeString('th-TH', { hour:'2-digit', minute:'2-digit' }) : '';\n    document.getElementById('popup-time').innerHTML = `\ud83d\udd50 ${ts}${te ? ' \u2013 ' + te : ''}`;\n  }\n\n  const locEl = document.getElementById('popup-loc');\n  if (ev.location) { locEl.innerHTML = '\ud83d\udccd ' + ev.location; locEl.style.display = 'flex'; }\n  else locEl.style.display = 'none';\n\n  const descEl = document.getElementById('popup-desc');\n  if (ev.description) { descEl.innerHTML = '\ud83d\udcdd ' + ev.description.replace(\/<[^>]+>\/g,''); descEl.style.display = 'flex'; }\n  else descEl.style.display = 'none';\n\n  document.getElementById('gcal-popup').classList.add('active');\n  document.getElementById('gcal-overlay').classList.add('active');\n}\n\nfunction gcalClosePopup() {\n  document.getElementById('gcal-popup').classList.remove('active');\n  document.getElementById('gcal-overlay').classList.remove('active');\n}\n\nfunction gcalPrev() { gcalMonth--; if (gcalMonth < 0) { gcalMonth = 11; gcalYear--; } gcalFetch(); }\nfunction gcalNext() { gcalMonth++; if (gcalMonth > 11) { gcalMonth = 0; gcalYear++; } gcalFetch(); }\nfunction gcalGoToday() { const n = new Date(); gcalYear = n.getFullYear(); gcalMonth = n.getMonth(); gcalFetch(); }\n\nfunction gcalToggleAll() {\n  const hidden = document.getElementById('gcal-hidden-items');\n  const btn = document.getElementById('gcal-show-all-btn');\n  if (!hidden) return;\n  if (hidden.style.display === 'none') {\n    hidden.style.display = 'block';\n    btn.textContent = '\u0e22\u0e48\u0e2d\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23 \u25b4';\n  } else {\n    hidden.style.display = 'none';\n    const total = document.querySelectorAll('.gcal-upcoming-item').length;\n    btn.textContent = '\u0e14\u0e39\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 (' + total + ' \u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21) \u25be';\n  }\n}\n\ngcalInit();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 &#8249; \u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14&#8230; &#8250; \u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19&#8230; \u0e2d\u0e32 \u0e08 \u0e2d \u0e1e \u0e1e\u0e24 \u0e28 \u0e2a \u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e17\u0e35\u0e48\u0e08\u0e30\u0e16\u0e36\u0e07\u0e40\u0e23\u0e47\u0e27\u0e46\u0e19\u0e35\u0e49 \u2715<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"unboxed","site-sidebar-style":"boxed","ast-global-header-display":"disabled","ast-banner-title-visibility":"disabled","ast-main-header-display":"disabled","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"disabled","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-12557","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/pages\/12557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/comments?post=12557"}],"version-history":[{"count":48,"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/pages\/12557\/revisions"}],"predecessor-version":[{"id":13246,"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/pages\/12557\/revisions\/13246"}],"wp:attachment":[{"href":"https:\/\/ntwo.moph.go.th\/moph-nwt\/wp-json\/wp\/v2\/media?parent=12557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}