{"id":54,"date":"2026-08-18T18:12:05","date_gmt":"2026-08-18T18:12:05","guid":{"rendered":"https:\/\/darkseagreen-antelope-561225.hostingersite.com\/?page_id=54"},"modified":"2026-10-30T15:51:39","modified_gmt":"2026-10-30T15:51:39","slug":"correctional-facilities","status":"publish","type":"page","link":"https:\/\/sendbookstotexasprison.com\/?page_id=54","title":{"rendered":"Correctional Facilities"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"54\" class=\"elementor elementor-54\">\n\t\t\t\t<div class=\"elementor-element elementor-element-436db9e e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-column-slider-no wpr-equal-height-no e-con e-parent\" data-id=\"436db9e\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-345ddd7 elementor-widget elementor-widget-heading\" data-id=\"345ddd7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Texas Facilities Directory<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1d9be73 elementor-widget__width-initial elementor-widget elementor-widget-text-editor\" data-id=\"1d9be73\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Find and verify specific mailroom policies and delivery guidelines for institutions across the state.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1570c4c e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-column-slider-no wpr-equal-height-no e-con e-parent\" data-id=\"1570c4c\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2811287 elementor-widget elementor-widget-html\" data-id=\"2811287\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t\r\n<!-- TEXAS FACILITY & SHERIFF DIRECTORY -->\r\n<!-- COMPLETE ELEMENTOR HTML WIDGET -->\r\n\r\n<div id=\"tx-directory\" class=\"tx-directory\">\r\n\r\n  <div class=\"tx-tabs\" role=\"tablist\" aria-label=\"Texas directory type\">\r\n    <button\r\n      class=\"tx-tab is-active\"\r\n      type=\"button\"\r\n      role=\"tab\"\r\n      aria-selected=\"true\"\r\n      aria-controls=\"tx-card-grid\"\r\n      data-tab=\"facilities\">\r\n      Facility Directory\r\n    <\/button>\r\n\r\n    <button\r\n      class=\"tx-tab\"\r\n      type=\"button\"\r\n      role=\"tab\"\r\n      aria-selected=\"false\"\r\n      aria-controls=\"tx-card-grid\"\r\n      data-tab=\"sheriffs\">\r\n      Sheriff's Office\r\n    <\/button>\r\n  <\/div>\r\n\r\n  <div class=\"tx-search-wrap\">\r\n    <label class=\"tx-sr-only\" for=\"tx-directory-search\">\r\n      Search the active directory\r\n    <\/label>\r\n\r\n    <span class=\"tx-search-icon\" aria-hidden=\"true\">\u2315<\/span>\r\n\r\n    <input\r\n      id=\"tx-directory-search\"\r\n      type=\"search\"\r\n      autocomplete=\"off\"\r\n      placeholder=\"Search facilities by name, city, address, or phone...\">\r\n\r\n    <button\r\n      id=\"tx-clear-search\"\r\n      type=\"button\"\r\n      aria-label=\"Clear search\"\r\n      hidden>\u00d7<\/button>\r\n  <\/div>\r\n\r\n  <div\r\n    id=\"tx-result-count\"\r\n    class=\"tx-result-count\"\r\n    aria-live=\"polite\"><\/div>\r\n\r\n  <div\r\n    id=\"tx-card-grid\"\r\n    class=\"tx-card-grid\"\r\n    role=\"tabpanel\"><\/div>\r\n\r\n  <div\r\n    id=\"tx-empty-state\"\r\n    class=\"tx-empty-state\"\r\n    hidden>\r\n    <strong>No matches found.<\/strong>\r\n    <span>Try a facility name, county, city, address, or phone number.<\/span>\r\n  <\/div>\r\n\r\n  <div id=\"tx-pagination\" class=\"tx-pagination\" hidden>\r\n    <button\r\n      id=\"tx-toggle-more\"\r\n      type=\"button\"\r\n      aria-controls=\"tx-card-grid\"\r\n      aria-expanded=\"false\">\r\n      View More\r\n    <\/button>\r\n  <\/div>\r\n\r\n<\/div>\r\n\r\n<style>\r\n\r\n\/* =========================\r\n   GENERAL\r\n   ========================= *\/\r\n\r\n#tx-directory,\r\n#tx-directory * {\r\n  box-sizing: border-box;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory {\r\n  --tx-blue: #111111;\r\n  --tx-blue-dark: #000000;\r\n  --tx-green: #F8AA3C;\r\n  --tx-green-dark: #E99822;\r\n  --tx-bg: #f1f2f3;\r\n  --tx-ink: #000000;\r\n  --tx-muted: #000000;\r\n\r\n  display: block !important;\r\n  width: 100% !important;\r\n  max-width: 1180px !important;\r\n  margin: 0 auto !important;\r\n  padding: 38px 24px 52px !important;\r\n\r\n  color: var(--tx-ink) !important;\r\n  font-family: inherit !important;\r\n  font-size: 16px !important;\r\n  font-style: normal !important;\r\n  font-weight: 400 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.65 !important;\r\n  text-align: left !important;\r\n  text-transform: none !important;\r\n}\r\n\r\n\/* =========================\r\n   TABS\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory .tx-tabs {\r\n  display: flex !important;\r\n  visibility: visible !important;\r\n  justify-content: center !important;\r\n  align-items: stretch !important;\r\n  gap: 12px !important;\r\n  width: 100% !important;\r\n  height: auto !important;\r\n  margin: 0 0 22px !important;\r\n  padding: 0 !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory button.tx-tab {\r\n  display: inline-flex !important;\r\n  visibility: visible !important;\r\n  position: static !important;\r\n  justify-content: center !important;\r\n  align-items: center !important;\r\n\r\n  min-width: 180px !important;\r\n  min-height: 52px !important;\r\n  width: auto !important;\r\n  height: auto !important;\r\n\r\n  margin: 0 !important;\r\n  padding: 13px 24px !important;\r\n\r\n  border: 1px solid #e2e5e9 !important;\r\n  border-radius: 9px !important;\r\n\r\n  background: #fff !important;\r\n  box-shadow: none !important;\r\n  color: var(--tx-blue) !important;\r\n\r\n  font-family: inherit !important;\r\n  font-size: 16px !important;\r\n  font-style: normal !important;\r\n  font-weight: 600 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.45 !important;\r\n  text-align: center !important;\r\n  text-decoration: none !important;\r\n  text-transform: none !important;\r\n  opacity: 1 !important;\r\n\r\n  cursor: pointer;\r\n\r\n  transition:\r\n    transform .18s ease,\r\n    background .18s ease,\r\n    color .18s ease,\r\n    box-shadow .18s ease;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory button.tx-tab:hover {\r\n  transform: translateY(-1px);\r\n  box-shadow: 0 8px 22px rgba(16,47,103,.10) !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory button.tx-tab.is-active {\r\n  border-color: var(--tx-green) !important;\r\n  background: var(--tx-green) !important;\r\n  box-shadow: 0 8px 18px rgba(66,189,93,.20) !important;\r\n  color: #fff !important;\r\n}\r\n\r\n\/* =========================\r\n   SEARCH\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory .tx-search-wrap {\r\n  display: block !important;\r\n  position: relative !important;\r\n  width: min(100%,720px) !important;\r\n  margin: 0 auto 9px !important;\r\n  padding: 0 !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory #tx-directory-search {\r\n  display: block !important;\r\n  width: 100% !important;\r\n  height: 52px !important;\r\n  min-height: 52px !important;\r\n  margin: 0 !important;\r\n  padding: 0 50px 0 48px !important;\r\n\r\n  border: 1px solid #d8dee7 !important;\r\n  border-radius: 9px !important;\r\n\r\n  background: #fff !important;\r\n  box-shadow: 0 5px 18px rgba(23,63,131,.06) !important;\r\n  color: var(--tx-ink) !important;\r\n\r\n  font-family: inherit !important;\r\n  font-size: 16px !important;\r\n  font-style: normal !important;\r\n  font-weight: 400 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.5 !important;\r\n  text-align: left !important;\r\n  text-transform: none !important;\r\n}\r\n\r\n#tx-directory #tx-directory-search:focus {\r\n  border-color: #111111 !important;\r\n  outline: 3px solid rgba(23,63,131,.12);\r\n}\r\n\r\n#tx-directory .tx-search-icon {\r\n  position: absolute;\r\n  left: 18px;\r\n  top: 50%;\r\n  transform: translateY(-52%);\r\n  color: var(--tx-blue);\r\n  font-size: 27px;\r\n  line-height: 1;\r\n  pointer-events: none;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory #tx-clear-search {\r\n  position: absolute !important;\r\n  right: 10px !important;\r\n  top: 50% !important;\r\n  transform: translateY(-50%) !important;\r\n\r\n  width: 34px !important;\r\n  height: 34px !important;\r\n  min-height: 34px !important;\r\n  padding: 0 !important;\r\n  margin: 0 !important;\r\n\r\n  border: 0 !important;\r\n  border-radius: 50% !important;\r\n\r\n  background: #eef2f7 !important;\r\n  color: var(--tx-blue) !important;\r\n  font-size: 24px !important;\r\n  line-height: 31px !important;\r\n  cursor: pointer;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory .tx-result-count {\r\n  display: block !important;\r\n  min-height: 28px !important;\r\n  margin: 0 auto 19px !important;\r\n  padding: 0 0 3px !important;\r\n\r\n  color: var(--tx-muted) !important;\r\n  font-family: inherit !important;\r\n  font-size: 14px !important;\r\n  font-style: normal !important;\r\n  font-weight: 400 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.7 !important;\r\n  text-align: center !important;\r\n  text-transform: none !important;\r\n}\r\n\r\n\/* =========================\r\n   CARD GRID\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory .tx-card-grid {\r\n  display: grid !important;\r\n  grid-template-columns: repeat(3,minmax(0,1fr)) !important;\r\n  gap: 26px !important;\r\n  width: 100% !important;\r\n  margin: 0 !important;\r\n  padding: 0 !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory article.tx-card {\r\n  display: flex !important;\r\n  position: relative !important;\r\n  min-width: 0 !important;\r\n  width: 100% !important;\r\n  height: auto !important;\r\n  margin: 0 !important;\r\n  padding: 0 !important;\r\n  flex-direction: column !important;\r\n  overflow: hidden !important;\r\n\r\n  border: 1px solid #e7e9ed !important;\r\n  border-radius: 14px !important;\r\n  background: #fff !important;\r\n  box-shadow: 0 10px 26px rgba(20,42,76,.09) !important;\r\n\r\n  transition:\r\n    transform .2s ease,\r\n    box-shadow .2s ease;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory article.tx-card:hover {\r\n  transform: translateY(-4px);\r\n  box-shadow: 0 16px 34px rgba(20,42,76,.14) !important;\r\n}\r\n\r\n\/* =========================\r\n   FACILITY PHOTO\r\n   SAME SIZE + COVER CENTER CENTER\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory .tx-thumb.tx-facility-photo {\r\n  display: block !important;\r\n  position: relative !important;\r\n  width: 100% !important;\r\n  height: 190px !important;\r\n  min-height: 190px !important;\r\n  margin: 0 !important;\r\n  padding: 0 !important;\r\n  overflow: hidden !important;\r\n  background: linear-gradient(\r\n    135deg,\r\n    #eef3f9 0%,\r\n    #dce5ef 100%\r\n  ) !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory .tx-thumb.tx-facility-photo img {\r\n  display: block !important;\r\n  width: 100% !important;\r\n  max-width: 100% !important;\r\n  height: 100% !important;\r\n  max-height: none !important;\r\n  margin: 0 !important;\r\n  padding: 0 !important;\r\n  border: 0 !important;\r\n  border-radius: 0 !important;\r\n  box-shadow: none !important;\r\n\r\n  object-fit: cover !important;\r\n  object-position: center center !important;\r\n}\r\n\r\n\/* =========================\r\n   SHERIFF'S OFFICE LOGO\r\n   NEW TEXAS IMAGE, NO CROPPING\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory .tx-thumb.tx-sheriff-logo {\r\n  display: grid !important;\r\n  width: 100% !important;\r\n  height: 190px !important;\r\n  min-height: 190px !important;\r\n  margin: 0 !important;\r\n  padding: 22px !important;\r\n  place-items: center !important;\r\n\r\n  background: linear-gradient(\r\n    135deg,\r\n    #eef3f9 0%,\r\n    #dce5ef 100%\r\n  ) !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory .tx-thumb.tx-sheriff-logo img {\r\n  display: block !important;\r\n  width: 140px !important;\r\n  max-width: 72% !important;\r\n  height: auto !important;\r\n  max-height: 145px !important;\r\n  margin: 0 auto !important;\r\n  padding: 0 !important;\r\n  border: 0 !important;\r\n  border-radius: 0 !important;\r\n  box-shadow: none !important;\r\n\r\n  object-fit: contain !important;\r\n  object-position: center center !important;\r\n}\r\n\r\n\/* =========================\r\n   MISSING FACILITY IMAGE\r\n   ========================= *\/\r\n\r\n#tx-directory .tx-no-image {\r\n  display: flex;\r\n  align-items: center;\r\n  justify-content: center;\r\n  width: 100%;\r\n  height: 100%;\r\n  padding: 15px;\r\n  background: linear-gradient(135deg,#eef3f9,#dce5ef);\r\n  color: #53657b;\r\n  font-size: 13px;\r\n  text-align: center;\r\n}\r\n\r\n\/* =========================\r\n   CARD CONTENT\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory .tx-card-body {\r\n  display: flex !important;\r\n  flex: 1 1 auto !important;\r\n  width: 100% !important;\r\n  margin: 0 !important;\r\n  padding: 21px 20px 18px !important;\r\n  flex-direction: column !important;\r\n  background: #fff !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory .tx-card h3 {\r\n  display: block !important;\r\n  min-height: 56px !important;\r\n  margin: 0 0 15px !important;\r\n  padding: 0 !important;\r\n  color: #000000 !important;\r\n  font-family: inherit !important;\r\n  font-size: 25px !important;\r\n  font-style: normal !important;\r\n  font-weight: 600 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.3 !important;\r\n  text-align: left !important;\r\n  text-decoration: none !important;\r\n  text-transform: none !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory p.tx-detail {\r\n  display: grid !important;\r\n  grid-template-columns: 18px minmax(0,1fr) !important;\r\n  gap: 9px !important;\r\n  align-items: start !important;\r\n  width: 100% !important;\r\n  margin: 0 0 10px !important;\r\n  padding: 0 !important;\r\n\r\n  color: var(--tx-muted) !important;\r\n  font-family: inherit !important;\r\n  font-size: 13px !important;\r\n  font-style: normal !important;\r\n  font-weight: 400 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.7 !important;\r\n  text-align: left !important;\r\n  text-transform: none !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory p.tx-detail span,\r\nhtml body #tx-directory.tx-directory p.tx-detail a {\r\n  display: inline !important;\r\n  margin: 0 !important;\r\n  padding: 0 !important;\r\n\r\n  color: var(--tx-muted) !important;\r\n  font-family: inherit !important;\r\n  font-size: 13px !important;\r\n  font-weight: 400 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.7 !important;\r\n  text-align: left !important;\r\n  text-decoration: none !important;\r\n  text-transform: none !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory p.tx-detail a:hover {\r\n  color: var(--tx-blue) !important;\r\n  text-decoration: underline !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory .tx-detail svg {\r\n  display: block !important;\r\n  width: 16px !important;\r\n  height: 16px !important;\r\n  margin: 1px 0 0 !important;\r\n  padding: 0 !important;\r\n  color: var(--tx-blue) !important;\r\n  fill: currentColor !important;\r\n}\r\n\r\n\/* =========================\r\n   POLICY BUTTONS\r\n   ========================= *\/\r\n\r\nhtml body #tx-directory.tx-directory a.tx-policy-button {\r\n  display: block !important;\r\n  width: 100% !important;\r\n  min-height: 43px !important;\r\n  height: auto !important;\r\n  margin: auto 0 0 !important;\r\n  padding: 12px 15px !important;\r\n\r\n  border: 0 !important;\r\n  border-radius: 5px !important;\r\n  background: #F8AA3C !important;\r\n  box-shadow: none !important;\r\n  color: #fff !important;\r\n\r\n  font-family: inherit !important;\r\n  font-size: 13px !important;\r\n  font-style: normal !important;\r\n  font-weight: 600 !important;\r\n  letter-spacing: normal !important;\r\n  line-height: 1.45 !important;\r\n  text-align: center !important;\r\n  text-decoration: none !important;\r\n  text-transform: none !important;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory a.tx-policy-button:hover {\r\n  background: #E99822 !important;\r\n  color: #fff !important;\r\n}\r\n\r\n\/* =========================\r\n   VIEW MORE \/ VIEW LESS\r\n   BOTH TABS\r\n   ========================= *\/\r\n\r\n#tx-directory .tx-pagination {\r\n  display: flex;\r\n  justify-content: center;\r\n  align-items: center;\r\n  width: 100%;\r\n  margin: 30px auto 0;\r\n  padding: 0;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory #tx-toggle-more {\r\n  display: inline-flex !important;\r\n  align-items: center !important;\r\n  justify-content: center !important;\r\n  min-width: 170px !important;\r\n  min-height: 48px !important;\r\n  margin: 0 !important;\r\n  padding: 13px 34px !important;\r\n\r\n  border: 0 !important;\r\n  border-radius: 8px !important;\r\n  background: #F8AA3C !important;\r\n  color: #fff !important;\r\n\r\n  font-family: inherit !important;\r\n  font-size: 15px !important;\r\n  font-weight: 600 !important;\r\n  text-align: center !important;\r\n  text-transform: none !important;\r\n  cursor: pointer;\r\n}\r\n\r\nhtml body #tx-directory.tx-directory #tx-toggle-more:hover {\r\n  background: #E99822 !important;\r\n  color: #fff !important;\r\n}\r\n\r\n\/* =========================\r\n   EMPTY STATE\r\n   ========================= *\/\r\n\r\n#tx-directory .tx-empty-state {\r\n  margin: 22px auto 0;\r\n  padding: 38px 20px;\r\n  border: 1px dashed #cbd4df;\r\n  border-radius: 12px;\r\n  background: #fff;\r\n  color: var(--tx-muted);\r\n  text-align: center;\r\n}\r\n\r\n#tx-directory .tx-empty-state strong,\r\n#tx-directory .tx-empty-state span {\r\n  display: block;\r\n}\r\n\r\n#tx-directory .tx-empty-state strong {\r\n  margin-bottom: 5px;\r\n  color: var(--tx-blue);\r\n  font-size: 20px;\r\n}\r\n\r\n#tx-directory .tx-sr-only {\r\n  position: absolute !important;\r\n  width: 1px;\r\n  height: 1px;\r\n  overflow: hidden;\r\n  clip: rect(0,0,0,0);\r\n  white-space: nowrap;\r\n  border: 0;\r\n}\r\n\r\n#tx-directory [hidden] {\r\n  display: none !important;\r\n}\r\n\r\n\/* =========================\r\n   RESPONSIVE\r\n   ========================= *\/\r\n\r\n@media(max-width:900px) {\r\n  html body #tx-directory.tx-directory .tx-card-grid {\r\n    grid-template-columns: repeat(2,minmax(0,1fr)) !important;\r\n  }\r\n}\r\n\r\n@media(max-width:600px) {\r\n\r\n  html body #tx-directory.tx-directory {\r\n    padding: 26px 12px 38px !important;\r\n  }\r\n\r\n  html body #tx-directory.tx-directory .tx-tabs {\r\n    gap: 8px !important;\r\n  }\r\n\r\n  html body #tx-directory.tx-directory button.tx-tab {\r\n    min-width: 0 !important;\r\n    padding: 11px 10px !important;\r\n    flex: 1 1 0 !important;\r\n    font-size: 14px !important;\r\n  }\r\n\r\n  html body #tx-directory.tx-directory .tx-card-grid {\r\n    grid-template-columns: 1fr !important;\r\n    gap: 18px !important;\r\n  }\r\n\r\n  html body #tx-directory.tx-directory .tx-thumb.tx-facility-photo,\r\n  html body #tx-directory.tx-directory .tx-thumb.tx-sheriff-logo {\r\n    height: 165px !important;\r\n    min-height: 165px !important;\r\n  }\r\n\r\n  html body #tx-directory.tx-directory .tx-card h3 {\r\n    min-height: 0 !important;\r\n    font-size: 22px !important;\r\n  }\r\n}\r\n\r\n<\/style>\r\n\r\n<script>\r\n(function () {\r\n  \"use strict\";\r\n\r\n  const root = document.getElementById(\"tx-directory\");\r\n  if (!root || root.dataset.ready === \"true\") return;\r\n  root.dataset.ready = \"true\";\r\n\r\n  \/* =========================\r\n     TEXAS FACILITY IMAGE FOLDER\r\n     ========================= *\/\r\n\r\n  const IMAGE_BASE =\r\n    \"https:\/\/sendbookstotexasprison.com\/wp-content\/uploads\/2026\/10\/\";\r\n\r\n  \/* =========================\r\n     NEW TEXAS SHERIFF LOGO\r\n     ========================= *\/\r\n\r\n  const SHERIFF_LOGO =\r\n    \"https:\/\/sendbookstotexasprison.com\/wp-content\/uploads\/2026\/10\/Texas-sherrif-logo.png\";\r\n\r\n  const POLICY_BASE =\r\n    \"https:\/\/prisonbookpolicies.com\/\";\r\n\r\n  \/* =========================\r\n     FACILITY DIRECTORY\r\n     ORIGINAL LISTINGS\r\n     ========================= *\/\r\n\r\n  const facilities = [\r\n    [\"Linda Woodman State Jail\",\"1210 Coryell City Road, Gatesville, TX 76528\",\"(254)-865-9398\",\"linda-woodman-state-jail\"],\r\n    [\"Wynne Unit\",\"810 FM 2821, Huntsville, TX 77349\",\"(936)-295-9126\",\"wynne-unit\"],\r\n    [\"Young Medical Facility\",\"5509 Attwater Ave., Dickinson, TX 77539\",\"(409)-948-0001\",\"young-medical-facility\"],\r\n    [\"Formby State Jail\",\"998 County Road AA, Plainview, TX 79072\",\"(806)-296-2448\",\"formby-state-jail-2\"],\r\n    [\"Larry Gist State Jail\",\"3295 FM 3514, Beaumont, TX 77705\",\"(409)-727-8400\",\"larry-gist-state-jail\"],\r\n    [\"Choice Moore Unit\",\"1700 North FM 87, Bonham, TX 75418\",\"(903) 583-4464\",\"choice-moore-unit\"],\r\n    [\"Mountainview Unit\",\"2305 Ransom Rd, Gatesville, TX 76528\",\"(254) 865-7226\",\"mountainview-unit\"],\r\n    [\"Rudd Transfer Facility\",\"2004 Lamesa Highway, Brownfield, TX 79316\",\"(806)-637-4470\",\"rudd-transfer-facility\"],\r\n    [\"Roach Unit\",\"15845 FM 164, Childress, TX 79201\",\"(940)-937-6364\",\"roach-unit\"],\r\n    [\"Robertson Unit\",\"12071 FM 3522, Abilene, TX 79601\",\"(325)-548-9035\",\"robertson-unit\"],\r\n    [\"Sanchez State Jail\",\"3901 State Jail Road, El Paso, TX 79938-8456\",\"(915)-856-0046\",\"sanchez-state-jail\"],\r\n    [\"San Saba Transfer Facility\",\"206 South Wallace Creek Road, San Saba, TX 76877\",\"(325)-372-4255\",\"san-saba-transfer-facility\"],\r\n    [\"Sayle Unit\",\"4176 FM 1800, Breckenridge, TX 76424-7301\",\"(254)-559-1581\",\"sayle-unit\"],\r\n    [\"Scott Unit\",\"6999 Retrieve, Angleton, TX 77515\",\"(979)-849-9306\",\"scott-unit\"],\r\n    [\"Segovia Unit\",\"1201 E. El Cibolo Road, Edinburg, TX 78542\",\"(956)-316-2400\",\"segovia-unit\"],\r\n    [\"Skyview Unit\",\"379 FM 2972 West, Rusk, TX 75785-3666\",\"(903)-683-5781\",\"skyview-unit\"],\r\n    [\"Smith Unit\",\"1313 County Road 19, Lamesa, TX 79331\",\"(806)-872-6741\",\"smith-unit\"],\r\n    [\"Smith Unit\",\"1525 FM 766, Cuero, TX 77954\",\"(361)-275-2075\",\"smith-unit-2\"],\r\n    [\"Stiles Unit\",\"3060 FM 3514, Beaumont, TX 77705\",\"(409)-722-5255\",\"stiles-unit\"],\r\n    [\"Stringfellow Unit\",\"1200 FM 655, Rosharon, TX 77583\",\"(281)-595-3413\",\"stringfellow-unit\"],\r\n    [\"Telford Unit\",\"3899 Highway 98, New Boston, TX 75570\",\"(903)-628-3171\",\"telford-unit\"],\r\n    [\"Terrell Unit\",\"1300 FM 655, Rosharon, TX 77583\",\"(281)-595-3481\",\"terrell-unit\"],\r\n    [\"Torres Unit\",\"125 Private Road 4303, Hondo, TX 78861\",\"(830)-426-5325\",\"torres-unit\"],\r\n    [\"Thomas R. Mechler Unit\",\"4000 Highway 86 West, Tulia, TX 79088\",\"(806)-995-4109\",\"thomas-r-mechler-unit\"],\r\n    [\"Vance Unit\",\"2 Jester Road, Richmond, TX 77406\",\"(281)-277-3030\",\"vance-unit\"],\r\n    [\"Wallace Unit\",\"1675 South FM 3525, Colorado City, TX 79512\",\"(325)-728-2162\",\"wallace-unit\"],\r\n    [\"Ware Transfer Facility\",\"1681 South FM 3525, Colorado City, TX 79512\",\"(325)-728-2162\",\"ware-transfer-facility\"],\r\n    [\"Wheeler State Jail\",\"986 County Road AA, Plainview, TX 79072\",\"(806)-293-1081\",\"wheeler-state-jail\"],\r\n    [\"Lopez State Jail\",\"1203 El Cibolo Road, Edinburg, TX 78542\",\"(956)-316-3810\",\"lopez-state-jail\"],\r\n    [\"Luther Unit\",\"1800 Luther Drive, Navasota, TX 77868\",\"(936)-825-7547\",\"luther-unit\"],\r\n    [\"Pam Lychner Unit\",\"2350 Atascocita Road, Humble, TX 77396\",\"(281)-454-5036\",\"pam-lychner-unit\"],\r\n    [\"Lynaugh Unit\",\"1098 South Highway 2037, Fort Stockton, TX 79735\",\"(432)-395-2938\",\"lynaugh-unit\"],\r\n    [\"Marlin Transfer Facility\",\"2893 State Hwy 6, Marlin, TX 76661-6588\",\"(254)-883-3858\",\"marlin-transfer-facility\"],\r\n    [\"McConnell Unit\",\"3001 South Emily Drive, Beeville, TX 78102\",\"(361)-362-2300\",\"mcconnell-unit\"],\r\n    [\"Michael Unit\",\"2664 Farm to Market Road 2054, Tennessee Colony, TX 75886\",\"(903)-928-2311\",\"michael-unit\"],\r\n    [\"Middleton Unit Transfer Facility\",\"13055 Farm to Market Road 3522, Abilene, TX 79601\",\"(325)-548-9075\",\"middleton-unit-transfer-facility\"],\r\n    [\"Montford Unit\",\"8602 Peach Street, Lubbock, TX 79404\",\"(806)-745-1021\",\"montford-unit\"],\r\n    [\"Billy Moore Correctional Center\",\"8500 North FM 3053, Overton, TX 75684\",\"(903)-834-6186\",\"billy-moore-correctional-center\"],\r\n    [\"Moore, C. Transfer Facility\",\"1700 North FM 87, Bonham, TX 75418\",\"(903)-583-4464\",\"moore-c-transfer-facility\"],\r\n    [\"Patrick L. O\u2019Daniel Unit\",\"2305 Ransom Road, Gatesville, TX 76528\",\"(254)-865-7226\",\"patrick-l-odaniel-unit\"],\r\n    [\"Murray Unit\",\"1916 North Highway 36 Bypass, Gatesville, TX 76596\",\"(254)-865-2000\",\"murray-unit\"],\r\n    [\"Neal Unit\",\"9055 Spur 591, Amarillo, TX 79107-9696\",\"(806)-383-1175\",\"neal-unit\"],\r\n    [\"Ney State Jail\",\"114 Private Road 4303, Hondo, TX 78861-3812\",\"(830)-426-8030\",\"ney-state-jail\"],\r\n    [\"Wallace Pack Unit\",\"2400 Wallace Pack Road, Navasota, TX 77868\",\"(936)-825-3728\",\"wallace-pack-unit\"],\r\n    [\"Lucile Plane State Jail\",\"904 FM 686, Dayton, TX 77535\",\"(936)-258-2476\",\"lucile-plane-state-jail\"],\r\n    [\"Polunsky Unit\",\"3872 FM 350 South, Livingston, TX 77351\",\"(936)-967-8082\",\"polunsky-unit\"],\r\n    [\"Powledge Unit\",\"1400 FM 3452, Palestine, TX 75803\",\"(903)-723-5074\",\"powledge-unit\"],\r\n    [\"Ramsey Unit\",\"1100 FM 655, Rosharon, TX 77583\",\"(281)-595-3491\",\"ramsey-unit\"],\r\n    [\"Dempsie Henley Unit\",\"902 FM 686, Dayton, TX 77535\",\"(936)-258-8013\",\"dempsie-henley-unit\"],\r\n    [\"Hilltop Unit\",\"1500 State School Road, Gatesville, TX 76598-2996\",\"(254)-865-8901\",\"hilltop-unit\"],\r\n    [\"Hobby Unit\",\"742 FM 712, Marlin, TX 76661\",\"(254)-883-5561\",\"hobby-unit\"],\r\n    [\"Hodge Unit\",\"379 FM 2972 West, Rusk, TX 75785-3666\",\"(903)-683-5781\",\"hodge-unit\"],\r\n    [\"Holliday Unit Transfer Facility\",\"295 IH-45 North, Huntsville, TX 77320-8443\",\"(936)-295-8200\",\"holliday-unit-transfer-facility\"],\r\n    [\"Hospital Galveston\",\"701 Harborside Drive, Galveston, TX 77555\",\"(409)-772-2875\",\"hospital-galveston\"],\r\n    [\"Hughes Unit\",\"3201 FM 929, Gatesville, TX 76597\",\"\",\"hughes-unit\"],\r\n    [\"Hutchins State Jail\",\"1500 East Langdon Road, Dallas, TX 75241\",\"(972)-225-1304\",\"hutchins-state-jail\"],\r\n    [\"Jester I Substance Abuse Felony Punishment Facility\",\"1 Jester Road, Richmond, TX 77406\",\"(281)-277-3030 (281)-277-3030\",\"jester-i-substance-abuse-felony-punishment-facility\"],\r\n    [\"Jester III Prison Unit\",\"3 Jester Road, Richmond, TX 77406\",\"(281)-277-7000\",\"jester-iii-prison-unit\"],\r\n    [\"Jester IV Psychiatric Unit\",\"4 Jester Road, Richmond, TX 77406\",\"(281)-277-3700\",\"jester-iv-psychiatric-unit\"],\r\n    [\"Johnston Unit\",\"703 Airport Road, Winnsboro, TX 75494\",\"(903)-342-6166\",\"johnston-unit\"],\r\n    [\"Jordan Unit\",\"1992 Helton Road, Pampa, TX 79065\",\"(806)-665-7070\",\"jordan-unit\"],\r\n    [\"Baten Transfer Facility\",\"1995 Helton Road, Pampa, TX 79065\",\"(806)-665-7070\",\"baten-transfer-facility\"],\r\n    [\"Kegans State Jail\",\"707 Top Street, Houston, TX 77002\",\"(713)-224-6584\",\"kegans-state-jail\"],\r\n    [\"Kyle Correctional Center\",\"23001 Interstate 35, Kyle, TX 78640\",\"(512)-268-0079\",\"kyle-correctional-center\"],\r\n    [\"LeBlanc Unit\",\"3695 FM 3514, Beaumont, TX 77705\",\"(409)-724-1515\",\"leblanc-unit\"],\r\n    [\"Lewis Unit\",\"777 FM 3497, Woodville, TX 75990\",\"(409)-283-8181\",\"lewis-unit\"],\r\n    [\"Lindsey State Jail\",\"1620 FM 3344, Jacksboro, TX 76458\",\"(940)-567-2272\",\"lindsey-state-jail\"],\r\n    [\"Gregory S. Coleman Unit\",\"1400 Industrial Boulevard, Lockhart, TX 78644\",\"(512)-398-3480\",\"gregory-s-coleman-unit\"],\r\n    [\"Dominguez State Jail\",\"6535 Cagnon Road, San Antonio, TX 78252-2202\",\"(210)-675-6620\",\"dominguez-state-jail\"],\r\n    [\"Duncan Unit\",\"1502 South First Street, Diboll, TX 75941\",\"(936)-829-2616\",\"duncan-unit\"],\r\n    [\"East Texas Treatment Facility\",\"900 Industrial Drive, Henderson, TX 75652\",\"(903)-655-3300\",\"east-texas-treatment-facility\"],\r\n    [\"J. Dale Wainwright Unit\",\"2665 Prison Road #1, Lovelady, TX 75851\",\"(936)-636-7321\",\"j-dale-wainwright-unit\"],\r\n    [\"Ellis Unit\",\"1697 FM 980, Huntsville, TX 77343\",\"(936)-295-5756\",\"ellis-unit\"],\r\n    [\"Estelle Unit\",\"264 FM 3478, Huntsville, TX 77320-3320\",\"(936)-291-4200\",\"estelle-unit\"],\r\n    [\"Estes Unit\",\"1100 Hwy 1807, Venus, TX 76084\",\"(972)-366-3334\",\"estes-unit\"],\r\n    [\"Ferguson Unit\",\"12120 Savage Drive, Midway, TX 75852\",\"(936)-348-3751\",\"ferguson-unit\"],\r\n    [\"Formby State Jail\",\"998 County Road AA, Plainview, TX 79072\",\"(806)-296-2448\",\"formby-state-jail\"],\r\n    [\"Fort Stockton Transfer Facility\",\"1536 IH-10 East, Fort Stockton, TX 79735\",\"(432)-336-7676\",\"fort-stockton-transfer-facility\"],\r\n    [\"Garza East\",\"4304 Highway 202, Beeville, TX 78102\",\"(361)-358-9880\",\"garza-east\"],\r\n    [\"Gist State Jail\",\"3295 FM 3514, Beaumont, TX 77705\",\"(409)-727-8400\",\"gist-state-jail\"],\r\n    [\"Glossbrenner Unit\",\"5100 South FM 1329, San Diego, TX 78384\",\"(361)-279-2705\",\"glossbrenner-unit\"],\r\n    [\"Goodman Unit\/Transfer Facility\",\"349 Private Road 8430, Jasper, TX 75951\",\"(409)-383-0012\",\"goodman-unit-transfer-facility\"],\r\n    [\"Goree Unit\",\"7405 Hwy 75 South, Huntsville, TX 77344\",\"(936)-295-6331\",\"goree-unit\"],\r\n    [\"Gurney Transfer Facility\",\"1385 FM 3328, Palestine, TX 75803\",\"(903)-928-3118\",\"gurney-transfer-facility\"],\r\n    [\"Halbert Unit\",\"800 Ellen Halbert Drive, Burnet, TX 78611\",\"(512)-756-6171\",\"halbert-unit\"],\r\n    [\"Hamilton Unit\",\"200 Lee Morrison Lane, Bryan, TX 77807\",\"(979)-779-1633\",\"hamilton-unit\"],\r\n    [\"Havins Unit\",\"500 FM 45 East, Brownwood, TX 76801\",\"(325)-643-5575\",\"havins-unit\"],\r\n    [\"Henley State Jail\",\"7581 Hwy 321, Dayton, TX 77535\",\"(936)-258-2476\",\"henley-state-jail\"],\r\n    [\"Allred Unit\",\"2101 FM 369 North, Iowa Park, TX 76367\",\"(940) 855-7477\",\"allred-unit\"],\r\n    [\"Bartlett State Jail\",\"1018 Arnold Drive, Bartlett, TX 76511\",\"(254)-527-3300\",\"bartlett-state-jail\"],\r\n    [\"Beto Unit\",\"1391 FM 3328, Tennessee Colony, TX 75880\",\"(903)-928-2217\",\"beto-unit\"],\r\n    [\"Boyd Unit\",\"200 Spur 113, Teague, TX 75860-2007\",\"(254)-739-5555\",\"boyd-unit\"],\r\n    [\"James Bradshaw State Jail\",\"3900 West Loop 571 North, Henderson, TX 75653\",\"(903)-655-0880\",\"james-bradshaw-state-jail\"],\r\n    [\"Bridgeport Correctional Center Texas\",\"4000 North Tenth Street, Bridgeport, TX 76426\",\"(940)-683-3010\",\"bridgeport-correctional-center-texas\"],\r\n    [\"Briscoe Unit\",\"1459 West Highway 85, Dilley, TX 78017\",\"(830)-965-4444\",\"briscoe-unit\"],\r\n    [\"Byrd Unit\",\"21 FM 247, Huntsville, TX 77320\",\"(936)-295-5768\",\"byrd-unit\"],\r\n    [\"Clemens Unit\",\"11034 Hwy 36, Brazoria, TX 77422\",\"(979)-798-2188\",\"clemens-unit\"],\r\n    [\"Clements Unit\",\"9601 Spur 591, Amarillo, TX 79107-9606\",\"(806)-381-7080\",\"clements-unit\"],\r\n    [\"Oliver J. Bell Unit\",\"901 East Fifth Street, Cleveland, TX 77328\",\"(281)-592-9559\",\"oliver-j-bell-unit\"],\r\n    [\"Coffield Unit\",\"2661 FM 2054, Tennessee Colony, TX 75884\",\"(903)-928-2211\",\"coffield-unit\"],\r\n    [\"Cole Unit\",\"3801 Silo Road, Bonham, TX 75418\",\"(903)-583-1100\",\"cole-unit\"],\r\n    [\"Connally Unit\",\"899 FM 632, Kenedy, TX 78119\",\"(830)-583-4003\",\"connally-unit\"],\r\n    [\"Cotulla Unit\",\"610 FM 624, Cotulla, TX 78014\",\"(830)-879-3077\",\"cotulla-unit\"],\r\n    [\"Crain Unit\",\"1401 State School Road, Gatesville, TX 76599-2999\",\"(254)-865-8431\",\"crain-unit\"],\r\n    [\"Dalhart Unit\",\"11950 FM 998, Dalhart, TX 79022\",\"(806)-249-8655\",\"dalhart-unit\"],\r\n    [\"Daniel Unit\",\"938 South FM 1673, Snyder, TX 79549\",\"(325)-573-1114\",\"daniel-unit\"],\r\n    [\"Memorial Unit\",\"59 Darrington Road, Rosharon, TX 77583\",\"(281)-595-3465\",\"memorial-unit\"],\r\n    [\"Diboll Unit\",\"1604 South First Street, Diboll, TX 75941\",\"(936)-829-2295\",\"diboll-unit\"]\r\n  ];\r\n\r\n  \/* =========================\r\n     SHERIFF'S OFFICE DIRECTORY\r\n     ORIGINAL LISTINGS\r\n     ========================= *\/\r\n\r\n  const sheriffs = [\r\n    [\"Brown County Sheriff Department York County\",\"1050 West Commerce Brownwood, TX 76801\",\"325-646-5510\",\"https:\/\/prisonbookpolicies.com\/brown-county-sheriff-department-york-county\"],\r\n    [\"Delta County Sheriff's Office\",\"200 W Bonham Ave, Cooper, TX 75432\",\"(903) 395-2146\",\"https:\/\/prisonbookpolicies.com\/delta-county-sheriffs-office\"],\r\n    [\"Travis County Sheriff's Office\",\"5555 Airport Blvd,Austin,TX 78751\",\"(512)854-9770\",\"https:\/\/prisonbookpolicies.com\/travis-county-sheriffs-office\"],\r\n    [\"Hall County Sheriff's Office\",\"512 Main St #7, Memphis, TX 79245\",\"(806) 259-2151\",\"hall-county-sheriffs-office\"],\r\n    [\"El Paso County Sheriff's Office\",\"3850 Justice St,El Paso,TX 79938\",\"(915)538-2292\",\"el-paso-county-sheriffs-office-2\"],\r\n    [\"La Salle County Jail\",\"703 N Main St, Cotulla, TX 78014\",\"(830) 879-3041\",\"https:\/\/prisonbookpolicies.com\/la-salle-county-jail\"],\r\n    [\"Tom Green County Jail\",\"4382 N US Hwy 277, San Angelo, TX 76905\",\"(325) 659-6597\",\"tom-green-county-jail\"],\r\n    [\"Panola County Sheriff's Office\",\"314 W Wellington St, Carthage, TX 75633\",\"(903) 693-0333\",\"https:\/\/prisonbookpolicies.com\/panola-county-sheriffs-office\"],\r\n    [\"Nacogdoches County Sheriff's Office\",\"2306 Douglass Rd, Nacogdoches, TX 75964\",\"(936) 560-7777\",\"https:\/\/prisonbookpolicies.com\/nacogdoches-county-sheriffs-office\"],\r\n    [\"Jackson County Jail\",\"115 W Main St, Edna, TX 77957\",\"(361) 782-5407\",\"jackson-county-jail-2\"],\r\n    [\"Lee County Sheriff's Office\",\"2122 FM448, Giddings, TX 78942\",\"(979) 542-2800\",\"lee-county-sheriffs-office-4\"],\r\n    [\"Tarrant County Sheriff's Office\",\"6651 Lake Worth Blvd, Fort Worth, TX 76135\",\"(817) 884-3099\",\"https:\/\/prisonbookpolicies.com\/tarrant-county-sheriffs-office\"],\r\n    [\"Denton County Jail\",\"127 N Woodrow Ln # 300, Denton, TX 76205\",\"(972) 434-5502\",\"denton-county-sheriffs-office\"],\r\n    [\"Calhoun County Jail\",\"302 W Live Oak St, Port Lavaca, TX 77979\",\"(361) 553-4475\",\"calhoun-county-sheriffs-office-3\"],\r\n    [\"Hidalgo County Sheriff's Office\",\"711 E El Cibolo Rd, Edinburg, TX 78541\",\"(956) 383-8114\",\"hidalgo-county-sheriff\"],\r\n    [\"Red River County Jail\",\"500 N Cedar St. Clarksville, TX 75426\",\"903-427-3838\",\"https:\/\/prisonbookpolicies.com\/red-river-county-jail\"],\r\n    [\"Rockwall County Jail\",\"950 T L Townsend Dr, Rockwall, TX 75087\",\"(972) 204-7108\",\"https:\/\/prisonbookpolicies.com\/rockwall-county-jail\"],\r\n    [\"Jones County Sheriff's Office\",\"402 2nd St,Anson,TX 79501\",\"325-823-3201\",\"jones-county-sheriff-2\"],\r\n    [\"Ellis County Sheriff's Office\",\"300 S. Jackson Street Waxahachie, TX 75165\",\"972-825-4901\",\"https:\/\/prisonbookpolicies.com\/ellis-county-sheriffs-office\"],\r\n    [\"Bexar County Sheriff\",\"200 N Comal St, San Antonio, TX 78207\",\"(210) 335-6000\",\"https:\/\/prisonbookpolicies.com\/bexar-county-sheriff\"],\r\n    [\"Caldwell County Sheriff Texas\",\"1204 Reed Drive Lockhart, Texas 78644\",\"512-398-6777\",\"caldwell-county-sheriffs-office\"],\r\n    [\"Brazos County Sheriff's Office\",\"1835 Sandy Point Rd Bryan TX 77807\",\"(979) 361-4900\",\"https:\/\/prisonbookpolicies.com\/brazos-county-sheriffs-office\"],\r\n    [\"Cameron County Detention Center\",\"1145 E Harrison St, Brownsville, TX 78520\",\"(956) 544-0836\",\"cameron-county-sheriffs-office-2\"],\r\n    [\"Eastland County Sheriff's Office\",\"201 W White StEastland, TX 76448\",\"(254) 629-1774\",\"https:\/\/prisonbookpolicies.com\/eastland-county-sheriffs-office\"],\r\n    [\"Howard County Sheriff\",\"3613 W. Hwy. 80 Big Spring, TX. 79720\",\"432-264-2231\",\"howard-county-sheriffs-office-2\"],\r\n    [\"Harris County Sheriff's Office\",\"1200 Baker StHouston, TX 77002\",\"(713) 221-6000\",\"https:\/\/prisonbookpolicies.com\/harris-county-sheriffs-office\"],\r\n    [\"Menard County Sheriff\",\"208 Tipton Menard,TX 76859\",\"325-396-4705\",\"menard-county-sheriffs-office\"],\r\n    [\"Armstrong County Jail\",\"110 1st St, Claude, TX 79019\",\"(806) 226-3711\",\"armstrong-county-sheriff\"],\r\n    [\"Stephens County Jail\",\"210 East Dyer Breckenridge, TX 76424\",\"254-559-2481\",\"https:\/\/prisonbookpolicies.com\/stephens-county-jail\"],\r\n    [\"Orange County Sheriff Office\",\"205 S Border st. Orange, TX 77630\",\"(409) 883-2612\",\"https:\/\/prisonbookpolicies.com\/orange-county-sheriff-office\"],\r\n    [\"Starr County Sheriff\",\"102 E. 6th Street Rio Grande City, TX 78582\",\"956-487-5571\",\"https:\/\/prisonbookpolicies.com\/starr-county-sheriff\"],\r\n    [\"Sherman County Sheriff Office\",\"701 N 3rd St Stratford, TX 79084\",\"(806) 366-5551\",\"https:\/\/prisonbookpolicies.com\/sherman-county-sheriff-office\"],\r\n    [\"Galveston County Sheriff\",\"601 54th Street, Galveston, Tx 77551\",\"(409)766-2300\",\"https:\/\/prisonbookpolicies.com\/galveston-county-sheriff\"],\r\n    [\"Hood County Sheriff\",\"400 Deputy Larry Miller Dr\u00e2\u20ac\u00a2Granbury, TX 76048\",\"817-579-3316\",\"hood-county-sheriffs-office\"],\r\n    [\"Uvalde County Jail\",\"339 King Fisher Ln, Uvalde, TX 78801\",\"830-278-4111\",\"https:\/\/prisonbookpolicies.com\/uvalde-county-jail\"],\r\n    [\"Henderson County Sheriff Office\",\"206 N Murchison St, Athens, TX 75751\",\"903-675-5128\",\"henderson-county-sheriffs-office-2\"],\r\n    [\"Wheeler County Sheriff's Office\",\"7944 US-83, Wheeler, TX 79096\",\"(806) 826-5537\",\"https:\/\/prisonbookpolicies.com\/wheeler-county-sheriffs-office\"],\r\n    [\"Kendall County Sheriff's Office\",\"6 Staudt St., Boerne, Texas 78006\",\"830-249-9721\",\"kendall-county-sheriffs-office-2\"],\r\n    [\"Dewitt County Sheriff's Office\",\"208 East Live Oak Street Cuero, TX 77954\",\"(361) 275-0899\",\"https:\/\/prisonbookpolicies.com\/dewitt-county-sheriffs-office\"],\r\n    [\"Hale County Sheriff\",\"1900 S. Columbia Street Plainview, Texas 79072\",\"(806) 296-2724\",\"https:\/\/prisonbookpolicies.com\/hale-county-sheriff\"],\r\n    [\"Liberty County Sheriff's Office\",\"5345 N Main St. Liberty, TX 77575\",\"936-336-4500\",\"https:\/\/prisonbookpolicies.com\/liberty-county-sheriffs-office-2\"],\r\n    [\"Jack County Sheriff\",\"1432 FM 3344 Jacksboro TX 76458\",\"(940)567-2161\",\"https:\/\/prisonbookpolicies.com\/jack-county-sheriff\"],\r\n    [\"Winkler County Sheriff\",\"1300 South Bellaire Street Kermit, TX 79745\",\"432-586-3461\",\"https:\/\/prisonbookpolicies.com\/winkler-county-sheriff\"],\r\n    [\"Reeves County Sheriff\",\"500 South Oak Street Pecos, Texas 79772\",\"(432) 445-4901\",\"https:\/\/prisonbookpolicies.com\/reeves-county-sheriff\"],\r\n    [\"Ector County Correctional Center\",\"301 N Texas AveOdessa, TX 79761\",\"(432) 498-4355\",\"ector-county-sheriffs-office\"],\r\n    [\"Garza County Jail\",\"412 E 15th St, Post, TX 79356\",\"(806) 495-3595\",\"garza-county-sheriffs-office\"],\r\n    [\"Gregg County Sheriff's Office\",\"101 E Methvin St #559, Longview, TX 75601\",\"(903) 236-8400\",\"gregg-county-sheriff\"],\r\n    [\"Nolan County Sheriff's Office & Jail\",\"211 Avenger Field Road, Sweetwater, TX 79556\",\"(325) 235-5471\",\"https:\/\/prisonbookpolicies.com\/nolan-county-sheriffs-office-jail\"],\r\n    [\"Culberson County Sheriff Department\",\"300 La Caverna St, Van Horn, TX 79855\",\"(432) 283-2060\",\"https:\/\/prisonbookpolicies.com\/culberson-county-sheriff-department\"],\r\n    [\"Montgomery County Sheriff's Office\",\"1 Criminal Justice Dr, Conroe, TX 77301\",\"(936) 760-5800\",\"montgomery-county-sheriffs-office-7\"],\r\n    [\"Hutchinson County Sheriff\",\"1400 Veta Borger, Texas 79007\",\"806-274-6343\",\"https:\/\/prisonbookpolicies.com\/hutchinson-county-sheriff\"],\r\n    [\"Mills County Sheriff's Office\",\"2111 Priddy Rd, Goldthwaite, TX 76844\",\"(325) 648-2245\",\"mills-county-sheriffsheriffs-department\"],\r\n    [\"Bailey County Sheriff's Office\",\"405 W 2nd St, Muleshoe, TX 79347\",\"(806) 272-4268\",\"#\"],\r\n    [\"Travis County Correctional Complex\",\"3614 Bill Price Rd Del Valle TX 78617\",\"\",\"#\"],\r\n    [\"Hill County Sheriff's Office\",\"406 Hall Street Hillsboro, Texas 76645\",\"254-582-5313\",\"hill-county-jail\"],\r\n    [\"Garza County Sheriff\",\"412 East 15th Street Post, Texas 79356\",\"806-990-9974\",\"garza-county-sheriffs-office\"],\r\n    [\"Victoria County Sheriff's Office\",\"101 N. Glass St. Victoria, Texas 77901\",\"361-575-0651\",\"victoria-county-sheriffs-office-2\"],\r\n    [\"Collin County Sheriff's Office\",\"4300 Community Ave, McKinney, TX 75071\",\"(972) 547-5100\",\"collin-county-sheriffs-office\"],\r\n    [\"Brazoria County Sheriff's Office\",\"3602 County Road 45 Angleton, TX 77515\",\"(979)864-2200\",\"https:\/\/prisonbookpolicies.com\/brazoria-county-sheriffs-office\"],\r\n    [\"Cameron County Sheriff's Office\",\"3302 Wilson Rd,Harlingen,TX 78552\",\"(956)427-8060\",\"cameron-county-sheriffs-office-2\"],\r\n    [\"Runnels County Sheriff\",\"612 Strong Avenue Ballinger, TX 76821\",\"325-365-2121\",\"https:\/\/prisonbookpolicies.com\/runnels-county-sheriff\"],\r\n    [\"Smith County Sheriff's Office\",\"227 N. Spring Avenue Tyler, Texas 75702\",\"(903) 590-2661\",\"smith-county-sheriffs-office-2\"],\r\n    [\"Kleberg County Sheriff's Office\",\"1500 E King Ave, Kingsville, TX 78363\",\"361-595-8500\",\"kleberg-county-jail\"],\r\n    [\"San Patricio County Sheriff\",\"300 North Rachal Sinton, TX 78387\",\"361-364-9600\",\"https:\/\/prisonbookpolicies.com\/san-patricio-county-sheriff\"],\r\n    [\"Baylor County Sheriff\",\"101 S Washington Seymour, TX 76380\",\"(940) 889-3333\",\"https:\/\/prisonbookpolicies.com\/baylor-county-sheriff\"],\r\n    [\"Bowie County Sheriff\",\"100 North Stateline Ave Texarkana, TX 75501\",\"(903)798-3149\",\"bowie-county-sheriffs-office\"],\r\n    [\"Denton County Sheriff\",\"127 N Woodrow Lane Denton, TX 76205\",\"940-349-1600\",\"denton-county-sheriffs-office\"],\r\n    [\"Loving County Sheriff's Office\",\"114 West Collins St. Mentone, Texas 79754\",\"432.377.2411\",\"https:\/\/prisonbookpolicies.com\/loving-county-sheriffs-office\"],\r\n    [\"Gillespie County Sheriff\",\"1601 East Main Street Fredericksburg, TX 78624\",\"830-997-7585\",\"https:\/\/prisonbookpolicies.com\/gillespie-county-sheriff\"],\r\n    [\"Waller County Sheriff's Office\",\"100 Sheriff R. Glenn Smith Drive, Hempstead, TX 77445\",\"(979) 826-8282\",\"https:\/\/prisonbookpolicies.com\/waller-county-sheriffs-office\"],\r\n    [\"Zapata County Sheriff's Office\",\"200 7th Ave Suite 415, Zapata, TX 78076\",\"(956) 765-9960\",\"https:\/\/prisonbookpolicies.com\/zapata-county-sheriffs-office\"],\r\n    [\"Angelina County Sheriff\",\"2311 E. Lufkin Ave. Lufkin, Texas 75902\",\"(936) 634-3331\",\"https:\/\/prisonbookpolicies.com\/angelina-county-sheriff\"],\r\n    [\"Webb County Sheriff\",\"902 Victoria St,Laredo,TX 78040\",\"956-523-4500\",\"webb-county-sheriffs-office\"],\r\n    [\"Terrell County Sheriff\",\"105 E Hackberry St Sanderson, TX 79848\",\"432-345-2525\",\"terrell-county-sheriffs-office\"],\r\n    [\"Collin County Sheriff\",\"4300 Community Ave, McKinney, TX 75071\",\"(972) 547-5100\",\"collin-county-sheriffs-office\"],\r\n    [\"Lampasas County Sheriff\",\"1210 Barnes Street Lampasas, Texas 76550\",\"512-556-8255\",\"https:\/\/prisonbookpolicies.com\/lampasas-county-sheriff\"],\r\n    [\"Erath County Sheriff's Office\",\"1043 Glen Rose Highway Stephenville, TX 76401\",\"254-965-3338\",\"erath-county-jail\"],\r\n    [\"Kinney County Sheriff\",\"109 North Street Brackettville, TX 78832\",\"830-563-2788\",\"https:\/\/prisonbookpolicies.com\/kinney-county-sheriff\"],\r\n    [\"Maverick County Sheriff\",\"1051 Balboa Jones Memorial Dr Eagle Pass, TX 78852\",\"(830) 773-2321\",\"https:\/\/prisonbookpolicies.com\/maverick-county-sheriff-department\"],\r\n    [\"Hill County Sheriff Office\",\"406 Hall Street Hillsboro, TX 76645\",\"254-582-5313\",\"hill-county-jail\"],\r\n    [\"Coleman County Sheriff's Office\",\"965 North U.S. 283 Coleman, Tx 76834\",\"325-625-3506\",\"https:\/\/prisonbookpolicies.com\/coleman-county-sheriffs-office\"],\r\n    [\"Jefferson County Sheriff's Office\",\"1001 Pearl St #103, Beaumont, TX 77701\",\"409-835-8411\",\"jefferson-county-sheriffs-office-6\"],\r\n    [\"Guadalupe County Sheriff Office\",\"2617 N. Guadalupe Street Seguin, Texas 78155\",\"(830) 379-1224\",\"https:\/\/prisonbookpolicies.com\/guadalupe-county-sheriff-office\"],\r\n    [\"San Saba County Sheriff\",\"500 E Wallace St, San Saba, TX 76877\",\"(325) 372-5551\",\"https:\/\/prisonbookpolicies.com\/san-saba-county-sheriff\"],\r\n    [\"Jim Wells County Sheriff's Department\",\"300 N Cameron St, Alice, TX 78332\",\"(361) 668-0341\",\"#\"],\r\n    [\"Mclennan County Sheriff\",\"901 Washington Avenue Waco, TX 76701\",\"254-757-5095\",\"https:\/\/prisonbookpolicies.com\/mclennan-county-sheriff\"],\r\n    [\"Gage County Sheriff\",\"301 Jackson St Richmond, TX 77469\",\"281-342-3411\",\"https:\/\/prisonbookpolicies.com\/gage-county-sheriff-2\"],\r\n    [\"Bell County Sheriff's Office\",\"104 S. Main St. Belton, TX. 76513\",\"254-933-5400\",\"https:\/\/prisonbookpolicies.com\/bell-county-sheriffs-office\"],\r\n    [\"Van Zandt County Sheriff\",\"1220 West Dallas Street Canton TX, 75103\",\"903-567-4133\",\"van-zandt-county-sheriff\"],\r\n    [\"Maverick County Sheriff Department\",\"1051 Balboa Jones Memorial, Eagle Pass, TX 78852\",\"(830) 773-2321\",\"https:\/\/prisonbookpolicies.com\/maverick-county-sheriff-department\"],\r\n    [\"Callahan County Sheriff's Office\",\"432 Market St, Baird, TX 79504\",\"(325) 854-1444\",\"callahan-county-sheriffs-office\"],\r\n    [\"Swisher County Sheriff\",\"136 East Broadway Tulia, TX 79088\",\"806-995-3326\",\"swisher-county-sheriffs-office\"],\r\n    [\"Johnson County Sheriff's Office\",\"1102 E Kilpatrick St, Cleburne, TX 76031\",\"(817) 556-6001\",\"johnson-county-sheriffs-office-5\"],\r\n    [\"Midland County Sheriff\",\"400 S Main Street Midland, TX 79701\",\"(432) 688-4600\",\"midland-county-sheriff\"],\r\n    [\"Falls County Sheriff's Office\",\"2847 Hwy 6, Marlin, TX 76661\",\"(254) 803-2912\",\"falls-county-sheriffs-office\"],\r\n    [\"Walker County Sheriff\",\"717 FM 2821 Rd W Huntsville, TX 77320\",\"(936) 435-2400\",\"walker-county-sheriff\"],\r\n    [\"Hemphill County Sheriff's Office\",\"401 E Purcell Ave, Canadian, TX 79014\",\"(806) 323-5324\",\"hemphill-county-sheriffs-office\"],\r\n    [\"Gregg County Sheriff\",\"101 E. Methvin St., Suite 559 Longview, Texas 75601\",\"(903) 236-8400\",\"gregg-county-sheriff\"],\r\n    [\"Grimes County Sheriff's Office\",\"382 FM 149 West Anderson, Texas 77830\",\"(936) 873-2151\",\"grimes-county-sheriffs-office\"],\r\n    [\"Smith County Sheriff\",\"227 N Spring Avenue Tyler, TX 75702\",\"903-590-2661\",\"smith-county-sheriffs-office-2\"],\r\n    [\"McCulloch County Sheriff's Office\",\"900 E Main St, Brady, TX 76825\",\"(325) 597-2290\",\"mcculloch-county-sheriffs-office\"],\r\n    [\"Ochiltree County Sheriff\",\"511 S. Ash Perryton, TX 79070\",\"806-435-8000\",\"ochiltree-county-sheriff\"],\r\n    [\"Bowie County Sheriff's Office\",\"710 James Bowie Dr, New Boston, TX 75570\",\"(903) 628-6815\",\"bowie-county-sheriffs-office\"],\r\n    [\"Leon County Sheriff\",\"606 E. St. Mary's Street Centerville, TX 75833\",\"903-536-2749\",\"leon-county-sheriff\"],\r\n    [\"Trinity County Sheriff's Office\",\"214 W 1st St, Groveton, TX 75845\",\"(936) 642-1424\",\"trinity-county-sheriffs-office\"],\r\n    [\"Kleberg County Jail\",\"1500 E King Ave, Kingsville, TX 78363\",\"(361) 592-0128\",\"kleberg-county-jail\"],\r\n    [\"Camp County Sheriff's Office\",\"203 Tapp St, Pittsburg, TX 75686\",\"(903) 856-6651\",\"camp-county-sheriffs-office\"],\r\n    [\"Coke County Sheriff\",\"13 East 7th Street Robert Lee, TX 76945\",\"325-453-2717\",\"coke-county-sheriff\"],\r\n    [\"Comal County Sheriff\",\"3005 W San Antonio Street New Braunfels, TX 78130\",\"830-620-3400\",\"comal-county-sheriff\"],\r\n    [\"Swisher County Sheriff's Office\",\"136 E Broadway Ave, Tulia, TX 79088\",\"(806) 995-3326\",\"swisher-county-sheriffs-office\"],\r\n    [\"Lamar County Sheriff's Office\",\"125 Brown Ave, Paris, TX 75460\",\"(903) 737-2400\",\"lamar-county-sheriffs-office-2\"],\r\n    [\"Cochran County Sheriff's Office\",\"100 N Main St #B-7, Morton, TX 79346\",\"(806) 266-5211\",\"cochran-county-sheriffs-office\"],\r\n    [\"Parker County Sheriff's Office\",\"129 Hogle St, Weatherford, TX 76086\",\"(817) 594-8845\",\"parker-county-sheriffs-office\"],\r\n    [\"Gregg County Jail\",\"101 W Whaley St, Longview, TX 75601\",\"(903) 758-6181\",\"gregg-county-jail\"],\r\n    [\"Aransas County Sheriff\",\"714 E Concho St. Rockport, TX 78382\",\"(361) 729-2222\",\"aransas-county-sheriff\"],\r\n    [\"Carson County Sheriff's Office\",\"1392-1398 US-60, Panhandle, TX 79068\",\"(806) 537-3511\",\"carson-county-sheriffs-office\"],\r\n    [\"Shackelford County Sheriff's Office\",\"791 US-180, Albany, TX 76430\",\"(325) 762-9555\",\"shackelford-county-sheriffs-office\"],\r\n    [\"Erath County Jail\",\"1043 Glen Rose Rd, Stephenville, TX 76401\",\"(254) 965-3221\",\"erath-county-jail\"],\r\n    [\"Hunt County Sheriff's Department\",\"2801 Stuart St, Greenville, TX 75401\",\"(903) 453-6800\",\"hunt-county-sheriffs-department\"],\r\n    [\"Webb County Sheriff's Office\",\"902 Victoria St, Laredo, TX 78040\",\"(956) 523-4500\",\"webb-county-sheriffs-office\"],\r\n    [\"Potter County Sheriff's Office\",\"13103 NE 29th Ave, Amarillo, TX 79111\",\"(806) 379-2900\",\"potter-county-sheriff\"],\r\n    [\"Wichita County Sheriff's Office\",\"2815 Central Freeway East Wichita Falls, TX 76302\",\"(940) 766-8170\",\"wichita-county-sheriff\"],\r\n    [\"Gonzales County Sheriff\",\"1713 E Sarah DeWitt Dr, Gonzales, TX 78629\",\"(830) 672-6362\",\"gonzales-county-sheriff\"],\r\n    [\"Mitchell County Detention Center\",\"321-399 Pine St, Colorado City, TX 79512\",\"(325) 728-5261\",\"mitchell-county-detention-center\"],\r\n    [\"Washington County Jail\",\"1206 Old Independence Rd, Brenham, TX 77833\",\"(979) 277-6255\",\"washington-county-sheriffs-office-headquarters-jail\"],\r\n    [\"Archer County Sheriff's Office\",\"100 Law Enforcement Wy, Archer City, TX 76351\",\"(940) 574-2571\",\"archer-county-sheriffs-office\"],\r\n    [\"Grimes County Jail\",\"382 FM 149, Anderson, TX 77830\",\"(936) 873-6439\",\"grimes-county-jail\"],\r\n    [\"Lubbock County Sheriff's Office\",\"712 Broadway St, Lubbock, TX 79401\",\"(806) 775-1400\",\"lubbock-county-sheriffs-office\"],\r\n    [\"Denton County Sheriff's Office\",\"127 N Woodrow Ln, Denton, TX 76205\",\"(940) 349-1600\",\"denton-county-sheriffs-office\"],\r\n    [\"Cooke County Sheriff's Office\",\"300 Co Rd 451, Gainesville, TX 76240\",\"(940) 665-3471\",\"cooke-county-sheriffs-office\"],\r\n    [\"Palo Pinto County Sheriff's Office\",\"420 Cedar St, Palo Pinto, TX 76484\",\"(940) 659-2085\",\"palo-pinto-county-sheriffs-office-2\"],\r\n    [\"Brazos County Detention Center\",\"1835 Sandy Point Rd Bryan TX 77807\",\"(979) 361-4800\",\"#\"],\r\n    [\"McLennan County Jail\",\"3201 E State Highway 6 Waco TX 76705\",\"254-237-5602\",\"#\"],\r\n    [\"Tarrant County Corrections Center \/ Tarrant County Jail\",\"100 N Lamar St Fort Worth TX 76196\",\"\",\"#\"],\r\n    [\"Williamson County Jail\",\"PO Box 2119 Georgetown, TX. 78627\",\"\",\"williamson-county-sheriffs-office\"],\r\n    [\"Kaufman County Sheriff\",\"1900 E US Highway 175 Kaufman TX 75142\",\"\",\"#\"]\r\n  ];\r\n\r\n  \/* =========================\r\n     ELEMENT REFERENCES\r\n     ========================= *\/\r\n\r\n  const tabs = Array.from(\r\n    root.querySelectorAll(\".tx-tab\")\r\n  );\r\n\r\n  const input = root.querySelector(\r\n    \"#tx-directory-search\"\r\n  );\r\n\r\n  const clear = root.querySelector(\r\n    \"#tx-clear-search\"\r\n  );\r\n\r\n  const grid = root.querySelector(\r\n    \"#tx-card-grid\"\r\n  );\r\n\r\n  const count = root.querySelector(\r\n    \"#tx-result-count\"\r\n  );\r\n\r\n  const empty = root.querySelector(\r\n    \"#tx-empty-state\"\r\n  );\r\n\r\n  const pagination = root.querySelector(\r\n    \"#tx-pagination\"\r\n  );\r\n\r\n  const toggle = root.querySelector(\r\n    \"#tx-toggle-more\"\r\n  );\r\n\r\n  let active = \"facilities\";\r\n  let expanded = false;\r\n\r\n  \/* =========================\r\n     HELPERS\r\n     ========================= *\/\r\n\r\n  function escapeHTML(value) {\r\n    return String(value == null ? \"\" : value)\r\n      .replace(\/[&<>'\"]\/g, char => ({\r\n        \"&\": \"&amp;\",\r\n        \"<\": \"&lt;\",\r\n        \">\": \"&gt;\",\r\n        \"'\": \"&#39;\",\r\n        '\"': \"&quot;\"\r\n      }[char]));\r\n  }\r\n\r\n  function normalize(value) {\r\n    return String(value || \"\")\r\n      .normalize(\"NFKD\")\r\n      .replace(\/[\\u0300-\\u036f]\/g, \"\")\r\n      .toLowerCase()\r\n      .replace(\/['\u2019]\/g, \"\")\r\n      .replace(\/&\/g, \"and\")\r\n      .replace(\/[^a-z0-9]+\/g, \" \")\r\n      .trim();\r\n  }\r\n\r\n  function filenameFromName(name) {\r\n    return String(name)\r\n      .normalize(\"NFKD\")\r\n      .replace(\/[\\u0300-\\u036f]\/g, \"\")\r\n      .replace(\/['\u2019]\/g, \"\")\r\n      .replace(\/&\/g, \"and\")\r\n      .replace(\/[^a-zA-Z0-9]+\/g, \"-\")\r\n      .replace(\/^-|-$\/g, \"\");\r\n  }\r\n\r\n  function tel(phone) {\r\n    return String(phone).replace(\/[^+\\d]\/g, \"\");\r\n  }\r\n\r\n  const icons = {\r\n    pin:\r\n      '<svg aria-hidden=\"true\" viewBox=\"0 0 24 24\">' +\r\n      '<path d=\"M12 2a8 8 0 0 0-8 8c0 5.6 8 12 8 12s8-6.4 8-12a8 8 0 0 0-8-8Zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z\"\/>' +\r\n      '<\/svg>',\r\n\r\n    phone:\r\n      '<svg aria-hidden=\"true\" viewBox=\"0 0 24 24\">' +\r\n      '<path d=\"m6.6 10.8 2.5-2.5-3-6.3H2.3C1.6 2 1 2.6 1 3.3A19.7 19.7 0 0 0 20.7 23c.7 0 1.3-.6 1.3-1.3v-3.8l-6.3-3-2.5 2.5a15 15 0 0 1-6.6-6.6Z\"\/>' +\r\n      '<\/svg>'\r\n  };\r\n\r\n  \/* =========================\r\n     FACILITY IMAGE LOADER\r\n     ========================= *\/\r\n\r\n  const imageCache = new Map();\r\n\r\n  const lookupQueue = [];\r\n\r\n  let activeLookups = 0;\r\n\r\n  const MAX_LOOKUPS = 3;\r\n\r\n  function imageCandidates(name) {\r\n    const base = filenameFromName(name);\r\n    const lower = base.toLowerCase();\r\n\r\n    return [...new Set([\r\n      IMAGE_BASE + encodeURIComponent(base + \".png\"),\r\n      IMAGE_BASE + encodeURIComponent(base + \".jpg\"),\r\n      IMAGE_BASE + encodeURIComponent(base + \".jpeg\"),\r\n      IMAGE_BASE + encodeURIComponent(base + \".webp\"),\r\n      IMAGE_BASE + encodeURIComponent(lower + \".png\"),\r\n      IMAGE_BASE + encodeURIComponent(lower + \".jpg\"),\r\n      IMAGE_BASE + encodeURIComponent(lower + \".webp\")\r\n    ])];\r\n  }\r\n\r\n  function checkImageURL(url) {\r\n    return new Promise(resolve => {\r\n      const test = new Image();\r\n\r\n      test.onload = function() {\r\n        resolve(url);\r\n      };\r\n\r\n      test.onerror = function() {\r\n        resolve(null);\r\n      };\r\n\r\n      test.src = url;\r\n    });\r\n  }\r\n\r\n  function imageFileName(url) {\r\n    try {\r\n      return decodeURIComponent(\r\n        new URL(url).pathname.split(\"\/\").pop()\r\n      )\r\n        .replace(\/\\.[^.]+$\/, \"\")\r\n        .replace(\/-\\d+x\\d+$\/, \"\");\r\n    } catch (error) {\r\n      return \"\";\r\n    }\r\n  }\r\n\r\n  function decodeHTML(value) {\r\n    const element = document.createElement(\"textarea\");\r\n    element.innerHTML = String(value || \"\");\r\n    return element.value;\r\n  }\r\n\r\n  function mediaScore(media, name) {\r\n    const wanted = normalize(name);\r\n\r\n    const values = [\r\n      decodeHTML(media.title && media.title.rendered),\r\n      media.slug,\r\n      media.alt_text,\r\n      imageFileName(media.source_url || \"\")\r\n    ].map(normalize).filter(Boolean);\r\n\r\n    for (const value of values) {\r\n      if (value === wanted) return 100;\r\n    }\r\n\r\n    for (const value of values) {\r\n      if (\r\n        value.startsWith(wanted + \" \") ||\r\n        value.endsWith(\" \" + wanted)\r\n      ) {\r\n        return 90;\r\n      }\r\n    }\r\n\r\n    return 0;\r\n  }\r\n\r\n  async function searchMedia(name) {\r\n    try {\r\n      const url = new URL(\r\n        \"https:\/\/sendbookstotexasprison.com\/wp-json\/wp\/v2\/media\"\r\n      );\r\n\r\n      url.searchParams.set(\"search\", name);\r\n      url.searchParams.set(\"media_type\", \"image\");\r\n      url.searchParams.set(\"per_page\", \"30\");\r\n      url.searchParams.set(\r\n        \"_fields\",\r\n        \"id,title,slug,alt_text,source_url,media_details\"\r\n      );\r\n\r\n      const response = await fetch(url.toString(), {\r\n        headers: {\r\n          \"Accept\": \"application\/json\"\r\n        }\r\n      });\r\n\r\n      if (!response.ok) return null;\r\n\r\n      const media = await response.json();\r\n\r\n      if (!Array.isArray(media)) return null;\r\n\r\n      let best = null;\r\n      let bestScore = 0;\r\n\r\n      media.forEach(item => {\r\n        const score = mediaScore(item, name);\r\n\r\n        if (score > bestScore) {\r\n          best = item;\r\n          bestScore = score;\r\n        }\r\n      });\r\n\r\n      if (!best || bestScore < 90) return null;\r\n\r\n      const sizes = best.media_details &&\r\n        best.media_details.sizes\r\n        ? best.media_details.sizes\r\n        : {};\r\n\r\n      return (\r\n        (sizes.medium_large && sizes.medium_large.source_url) ||\r\n        (sizes.medium && sizes.medium.source_url) ||\r\n        best.source_url ||\r\n        null\r\n      );\r\n\r\n    } catch (error) {\r\n      return null;\r\n    }\r\n  }\r\n\r\n  async function findFacilityImage(name) {\r\n    const candidates = imageCandidates(name);\r\n\r\n    for (const candidate of candidates) {\r\n      const found = await checkImageURL(candidate);\r\n      if (found) return found;\r\n    }\r\n\r\n    return await searchMedia(name);\r\n  }\r\n\r\n  function processImageQueue() {\r\n    while (\r\n      activeLookups < MAX_LOOKUPS &&\r\n      lookupQueue.length > 0\r\n    ) {\r\n      const task = lookupQueue.shift();\r\n      activeLookups++;\r\n\r\n      findFacilityImage(task.name)\r\n        .then(task.resolve)\r\n        .catch(() => task.resolve(null))\r\n        .finally(() => {\r\n          activeLookups--;\r\n          processImageQueue();\r\n        });\r\n    }\r\n  }\r\n\r\n  function getFacilityImage(name) {\r\n    const key = normalize(name);\r\n\r\n    if (imageCache.has(key)) {\r\n      return imageCache.get(key);\r\n    }\r\n\r\n    const promise = new Promise(resolve => {\r\n      lookupQueue.push({ name, resolve });\r\n      processImageQueue();\r\n    });\r\n\r\n    imageCache.set(key, promise);\r\n\r\n    return promise;\r\n  }\r\n\r\n  async function loadFacilityImage(img) {\r\n    if (\r\n      !img.isConnected ||\r\n      img.dataset.loading === \"true\"\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    img.dataset.loading = \"true\";\r\n\r\n    const name = img.dataset.facility;\r\n    const foundURL = await getFacilityImage(name);\r\n\r\n    if (!img.isConnected) return;\r\n\r\n    if (foundURL) {\r\n      img.onerror = function() {\r\n        this.onerror = null;\r\n\r\n        const placeholder = document.createElement(\"div\");\r\n        placeholder.className = \"tx-no-image\";\r\n        placeholder.textContent = \"Image unavailable\";\r\n\r\n        this.replaceWith(placeholder);\r\n      };\r\n\r\n      img.src = foundURL;\r\n\r\n    } else {\r\n      const placeholder = document.createElement(\"div\");\r\n      placeholder.className = \"tx-no-image\";\r\n      placeholder.textContent = \"Image unavailable\";\r\n\r\n      img.replaceWith(placeholder);\r\n    }\r\n  }\r\n\r\n  const imageObserver =\r\n    \"IntersectionObserver\" in window\r\n      ? new IntersectionObserver(entries => {\r\n          entries.forEach(entry => {\r\n            if (!entry.isIntersecting) return;\r\n\r\n            imageObserver.unobserve(entry.target);\r\n            loadFacilityImage(entry.target);\r\n          });\r\n        }, {\r\n          rootMargin: \"250px 0px\"\r\n        })\r\n      : null;\r\n\r\n  function initializeImages() {\r\n    if (imageObserver) {\r\n      imageObserver.disconnect();\r\n    }\r\n\r\n    grid.querySelectorAll(\r\n      \".tx-facility-photo img[data-facility]\"\r\n    ).forEach(img => {\r\n      if (imageObserver) {\r\n        imageObserver.observe(img);\r\n      } else {\r\n        loadFacilityImage(img);\r\n      }\r\n    });\r\n  }\r\n\r\n  \/* =========================\r\n     BUILD CARDS\r\n     ========================= *\/\r\n\r\n  function card(item) {\r\n    const name = escapeHTML(item[0]);\r\n    const address = escapeHTML(item[1]);\r\n    const phone = escapeHTML(item[2]);\r\n\r\n    const slug = item[3];\r\n\r\n    const url = slug === \"#\"\r\n      ? \"#\"\r\n      : POLICY_BASE + slug;\r\n\r\n    const safeURL = escapeHTML(url);\r\n\r\n    const linkAttributes = slug === \"#\"\r\n      ? ' aria-disabled=\"true\"'\r\n      : ' target=\"_blank\" rel=\"noopener noreferrer\"';\r\n\r\n    const phoneHTML = item[2]\r\n      ? '<p class=\"tx-detail\">' +\r\n          icons.phone +\r\n          '<a href=\"tel:' + tel(item[2]) + '\">' +\r\n            phone +\r\n          '<\/a>' +\r\n        '<\/p>'\r\n      : \"\";\r\n\r\n    let imageHTML = \"\";\r\n\r\n    \/* Facility Directory = photographs *\/\r\n    if (active === \"facilities\") {\r\n      imageHTML =\r\n        '<div class=\"tx-thumb tx-facility-photo\">' +\r\n          '<img ' +\r\n            'data-facility=\"' + name + '\" ' +\r\n            'alt=\"' + name + '\" ' +\r\n            'loading=\"lazy\" ' +\r\n            'decoding=\"async\">' +\r\n        '<\/div>';\r\n\r\n    \/* Sheriff's Office = new Texas sheriff logo *\/\r\n    } else {\r\n      imageHTML =\r\n        '<div class=\"tx-thumb tx-sheriff-logo\">' +\r\n          '<img ' +\r\n            'src=\"' + escapeHTML(SHERIFF_LOGO) + '\" ' +\r\n            'alt=\"\" ' +\r\n            'loading=\"lazy\" ' +\r\n            'decoding=\"async\">' +\r\n        '<\/div>';\r\n    }\r\n\r\n    return (\r\n      '<article class=\"tx-card\">' +\r\n\r\n        imageHTML +\r\n\r\n        '<div class=\"tx-card-body\">' +\r\n\r\n          '<h3>' + name + '<\/h3>' +\r\n\r\n          '<p class=\"tx-detail\">' +\r\n            icons.pin +\r\n            '<span>' + address + '<\/span>' +\r\n          '<\/p>' +\r\n\r\n          phoneHTML +\r\n\r\n          '<a class=\"tx-policy-button\" ' +\r\n            'href=\"' + safeURL + '\"' +\r\n            linkAttributes + '>' +\r\n            'Review facility policies' +\r\n          '<\/a>' +\r\n\r\n        '<\/div>' +\r\n\r\n      '<\/article>'\r\n    );\r\n  }\r\n\r\n  \/* =========================\r\n     TWO ROWS ON BOTH TABS\r\n     ========================= *\/\r\n\r\n  function initialLimit() {\r\n    if (window.innerWidth <= 600) return 2;\r\n    if (window.innerWidth <= 900) return 4;\r\n    return 6;\r\n  }\r\n\r\n  \/* =========================\r\n     RENDER\r\n     ========================= *\/\r\n\r\n  function render() {\r\n\r\n    const source = active === \"facilities\"\r\n      ? facilities\r\n      : sheriffs;\r\n\r\n    const query = normalize(input.value.trim());\r\n    const searching = query.length > 0;\r\n\r\n    \/* Search all entries, including hidden cards *\/\r\n    const matches = source.filter(item =>\r\n      normalize(item.slice(0,3).join(\" \")).includes(query)\r\n    );\r\n\r\n    const limit = initialLimit();\r\n\r\n    const visible = searching || expanded\r\n      ? matches\r\n      : matches.slice(0, limit);\r\n\r\n    if (imageObserver) {\r\n      imageObserver.disconnect();\r\n    }\r\n\r\n    grid.innerHTML = visible.map(card).join(\"\");\r\n\r\n    grid.hidden = matches.length === 0;\r\n    empty.hidden = matches.length !== 0;\r\n\r\n    \/* Works for Facility AND Sheriff's Office *\/\r\n    pagination.hidden =\r\n      searching || matches.length <= limit;\r\n\r\n    toggle.textContent =\r\n      expanded ? \"View Less\" : \"View More\";\r\n\r\n    toggle.setAttribute(\r\n      \"aria-expanded\",\r\n      String(expanded)\r\n    );\r\n\r\n    clear.hidden = !searching;\r\n\r\n    if (searching) {\r\n      count.textContent =\r\n        matches.length +\r\n        (matches.length === 1\r\n          ? \" result found\"\r\n          : \" results found\");\r\n    } else {\r\n      count.textContent =\r\n        \"Showing \" + visible.length +\r\n        \" of \" + source.length + \" listings\";\r\n    }\r\n\r\n    \/* Individual photographs only on facility tab *\/\r\n    if (active === \"facilities\") {\r\n      initializeImages();\r\n    }\r\n  }\r\n\r\n  \/* =========================\r\n     TAB SWITCHING\r\n     ========================= *\/\r\n\r\n  tabs.forEach(tab => {\r\n    tab.addEventListener(\"click\", function() {\r\n\r\n      active = this.dataset.tab;\r\n\r\n      \/* Every tab initially shows its first two rows *\/\r\n      expanded = false;\r\n      input.value = \"\";\r\n\r\n      tabs.forEach(button => {\r\n        const selected = button === this;\r\n\r\n        button.classList.toggle(\r\n          \"is-active\",\r\n          selected\r\n        );\r\n\r\n        button.setAttribute(\r\n          \"aria-selected\",\r\n          String(selected)\r\n        );\r\n      });\r\n\r\n      input.placeholder = active === \"facilities\"\r\n        ? \"Search facilities by name, city, address, or phone...\"\r\n        : \"Search sheriff offices by county, city, address, or phone...\";\r\n\r\n      render();\r\n    });\r\n  });\r\n\r\n  \/* =========================\r\n     LIVE SEARCH\r\n     ========================= *\/\r\n\r\n  input.addEventListener(\"input\", function() {\r\n    expanded = false;\r\n    render();\r\n  });\r\n\r\n  \/* =========================\r\n     CLEAR SEARCH\r\n     ========================= *\/\r\n\r\n  clear.addEventListener(\"click\", function() {\r\n    input.value = \"\";\r\n    expanded = false;\r\n    input.focus();\r\n    render();\r\n  });\r\n\r\n  \/* =========================\r\n     VIEW MORE \/ VIEW LESS\r\n     BOTH TABS\r\n     ========================= *\/\r\n\r\n  toggle.addEventListener(\"click\", function() {\r\n\r\n    expanded = !expanded;\r\n\r\n    render();\r\n\r\n    if (!expanded) {\r\n      root.scrollIntoView({\r\n        behavior: \"smooth\",\r\n        block: \"start\"\r\n      });\r\n    }\r\n  });\r\n\r\n  \/* =========================\r\n     RESPONSIVE ROW COUNT\r\n     ========================= *\/\r\n\r\n  let previousLimit = initialLimit();\r\n\r\n  window.addEventListener(\"resize\", function() {\r\n    const currentLimit = initialLimit();\r\n\r\n    if (currentLimit !== previousLimit) {\r\n      previousLimit = currentLimit;\r\n      render();\r\n    }\r\n  });\r\n\r\n  \/* =========================\r\n     DISABLE EMPTY POLICY LINKS\r\n     ========================= *\/\r\n\r\n  root.addEventListener(\"click\", function(event) {\r\n\r\n    const link = event.target.closest(\r\n      'a.tx-policy-button[href=\"#\"]'\r\n    );\r\n\r\n    if (link) {\r\n      event.preventDefault();\r\n    }\r\n  });\r\n\r\n  \/* =========================\r\n     INITIAL DISPLAY\r\n     ========================= *\/\r\n\r\n  render();\r\n\r\n})();\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Texas Facilities Directory Find and verify specific mailroom policies and delivery guidelines for institutions across the state. Facility Directory Sheriff&#8217;s Office Search the active directory \u2315 \u00d7 No matches found. Try a facility name, county, city, address, or phone number. View More<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-54","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=\/wp\/v2\/pages\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":253,"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=\/wp\/v2\/pages\/54\/revisions"}],"predecessor-version":[{"id":1670,"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=\/wp\/v2\/pages\/54\/revisions\/1670"}],"wp:attachment":[{"href":"https:\/\/sendbookstotexasprison.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}