{"version":3,"names":["window","__harmonyMigrated","setBodyPage","p","location","pathname","isParentRoutes","test","isParentLocal","isParentInterests","isParentTips","attr","indexOf","document","body","getAttribute","setAttribute","documentElement","__harmonyLockdownReady","onPrefs","root","hasAttribute","removeAttribute","localStorage","getItem","e","readyState","addEventListener","setInterval"],"sources":["theme-35-inline-common-head_tag.js"],"sourcesContent":["\n(function () {\n  'use strict';\n  window.__harmonyMigrated = true;\n\n  // Hub URLs match `/c/{slug}` OR the `/c/{slug}/{id}` canonical form the app\n  // redirects to; sub-cats (3 segments) fall through to 'subcat'. Preferences /\n  // messages must NOT classify as 'user', or the profile-hide CSS blanks them.\n  // Notifications and the message inbox each get their own attr rather than\n  // falling through to 'user-prefs': that one hands them to account.js, which\n  // paints a \"Profile basics\" header over the page and blanks it with\n  // account.scss's form chrome (CHAI-894, CHAI-893). Matched by route shape, not\n  // substring: `/u/notifications` and `/u/messages` are usernames, and\n  // `/u/{name}/preferences/notifications` is a settings page that must stay\n  // 'user-prefs' — both branches sit above the /preferences test.\n  function setBodyPage() {\n    var p = location.pathname;\n    var isParentRoutes      = /^\\/c\\/routes(\\/\\d+)?$/.test(p);\n    var isParentLocal       = /^\\/c\\/local-communities(\\/\\d+)?$/.test(p);\n    var isParentInterests   = /^\\/c\\/topics-of-interest(\\/\\d+)?$/.test(p);\n    var isParentTips        = /^\\/c\\/tips(\\/\\d+)?$/.test(p);\n    var attr =\n      p === '/' || p === '/latest' ? 'home' :\n      p === '/categories' ? 'categories' :\n      isParentRoutes    ? 'parent-routes' :\n      isParentLocal     ? 'parent-local' :\n      isParentInterests ? 'parent-interests' :\n      isParentTips      ? 'parent-tips' :\n      p.indexOf('/c/') === 0 ? 'subcat' :\n      /^\\/harmony\\/rates\\/[a-z0-9-]+\\/?$/.test(p) ? 'rate-detail' :\n      p === '/onboarding' || p === '/onboard' || /^\\/t\\/welcome-to-(harmony|remitly-harmony|communities)/.test(p) ? 'onboarding' :\n      p === '/badges' || p.indexOf('/badges') === 0 ? 'badges' :\n      /^\\/people\\/c\\/[^\\/]+\\/\\d+\\/?$/.test(p) ? 'community-people' :\n      p === '/people' || p.indexOf('/people/') === 0 ? 'people' :\n      p === '/unread' || p === '/new' || p === '/hot' || p === '/top' ||\n      p.indexOf('/tag/') === 0 || p === '/tag' ? 'topic-list' :\n      /^\\/u\\/[^\\/]+\\/notifications(?:\\/|$)/.test(p) ? 'user-notifications' :\n      /^\\/u\\/[^\\/]+\\/messages(?:\\/|$)/.test(p) ? 'user-messages' :\n      p.indexOf('/u/') === 0 && p.indexOf('/preferences') === -1 ? 'user' :\n      p.indexOf('/u/') === 0 ? 'user-prefs' :\n      p.indexOf('/t/') === 0 ? 'topic' :\n      'other';\n    if (document.body && document.body.getAttribute('data-harmony-page') !== attr) {\n      document.body.setAttribute('data-harmony-page', attr);\n    }\n    if (document.documentElement.getAttribute('data-harmony-page') !== attr) {\n      document.documentElement.setAttribute('data-harmony-page', attr);\n    }\n    // First-paint hide: flag preferences routes on <html> before Ember renders; account-lockdown.js owns the attr once ready.\n    if (!window.__harmonyLockdownReady) {\n      var onPrefs = /^\\/(?:u\\/[^\\/]+|my)\\/preferences(?:[\\/?#]|$)/.test(p);\n      var root = document.documentElement;\n      if (onPrefs) {\n        if (!root.hasAttribute('data-harmony-prefs-lock')) root.setAttribute('data-harmony-prefs-lock', '');\n      } else if (root.hasAttribute('data-harmony-prefs-lock')) {\n        root.removeAttribute('data-harmony-prefs-lock');\n      }\n    }\n  }\n  // Minimized right rail (right-rail.js, same key): applied before first paint so\n  // the page gutter is already the strip's width when the rail mounts.\n  try {\n    if (localStorage.getItem('harmony_rail_minimized') === '1') {\n      document.documentElement.setAttribute('data-harmony-rail-state', 'minimized');\n    }\n  } catch (e) { /* storage blocked */ }\n\n  if (document.readyState !== 'loading') setBodyPage();\n  document.addEventListener('DOMContentLoaded', setBodyPage);\n  setInterval(setBodyPage, 200);\n})();\n"],"mappings":"AACA,CAAC,YAAY;EACX,YAAY;;EACZA,MAAM,CAAC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