{"version":3,"sources":["settings.js","_html/desktop/body_tag_1.js"],"names":["window","require","registerSettings","first_categories_header","first_categories","second_categories_header","second_categories","third_categories_header","third_categories","fourth_categories_header","fourth_categories","fifth_categories_header","fifth_categories","hasAnalyticsConsent","otConsentCookie","decodeURIComponent","document","cookie","match","indexOf","pushEvent","eventData","adobeDataLayer","push","getText","el","textContent","trim","trackView","addEventListener","e","item","target","closest","event","eventInfo","action","label","detail","querySelector","location","pathname","footerLink","href"],"mappings":"AACM,YAAaA,QACfC,QAAQ,sCAAsCC,iBAAiB,GAAI,CAACC,wBAA0B,0BAA0BC,iBAAmB,GAAGC,yBAA2B,2BAA2BC,kBAAoB,GAAGC,wBAA0B,0BAA0BC,iBAAmB,GAAGC,yBAA2B,2BAA2BC,kBAAoB,GAAGC,wBAA0B,0BAA0BC,iBAAmB,KCD7b,WAOE,SAASC,IACP,MAAMC,EANCC,oBACJC,SAASC,OAAOC,MAAM,qDAAuD,CAAC,CAAE,OAAO;AAM1F,OAA0B,MAAnBJ,GACLA,EAAgBK,QAAQ,YAAc,GACtCL,EAAgBK,QAAQ,aAAe,CAC3C,CAIA,SAASC,EAAUC,GACZR,KACLb,OAAOsB,eAAeC,KAAKF,EAC7B,CAEA,SAASG,EAAQC,GACf,OAAOA,GAAIC,aAAaC,QAAU,EACpC,CATA3B,OAAOsB,eAAiBtB,OAAOsB,gBAAkB,GAWjB,mBAArBtB,OAAO4B,WAChB5B,OAAO4B,YAGTZ,SAASa,iBAAiB,SAAS,SAASC,GAC1C,MAAMC,EAAOD,EAAEE,OAAOC,QAAQ;AAC9B,IAAKF,EAAM;AAIXX,EAAU,CACRc,MAAO,aACPC,UAAW,CACTC,OAAQ,QACRC,MAAO,aACPC,OAPed,EAAQO,EAAKQ,cAAc,mBAQ1CC,SAAUxC,OAAOwC,SAASC,WAGhC,IAEAzB,SAASa,iBAAiB,SAAS,SAASC,GAC1BA,EAAEE,OAAOC,QAAQ,iBAGjCb,EAAU,CACRc,MAAO,cACPC,UAAW,CACTC,OAAQ,QACRC,MAAO,OACPC,OAAQ,YACRE,SAAUxC,OAAOwC,SAASC,WAGhC,IAEAzB,SAASa,iBAAiB,SAAS,SAASC,GAC1C,MAAMY,EAAaZ,EAAEE,OAAOC,QAAQ;AACpC,GAAIS,EAUF,YATAtB,EAAU,CACRc,MAAO,SACPC,UAAW,CACTC,OAAQ,QACRC,MAAO,SACPC,OAAQd,EAAQkB,GAChBF,SAAUE,EAAWC,MAAQ3C,OAAOwC,SAASG;AAMjCb,EAAEE,OAAOC,QAAQ,6DAEjCb,EAAU,CACRc,MAAO,SACPC,UAAW,CACTC,OAAQ,QACRC,MAAO,SACPC,OAAQ,kBACRE,SAAUxC,OAAOwC,SAASG,OAIlC,GACD,CAzFD","sourceRoot":"theme-58/","sourcesContent":["(function() {\n  if ('require' in window) {\n    require(\"discourse/lib/theme-settings-store\").registerSettings(58, {\"first_categories_header\":\"First Categories Header\",\"first_categories\":\"\",\"second_categories_header\":\"Second Categories Header\",\"second_categories\":\"\",\"third_categories_header\":\"Third Categories Header\",\"third_categories\":\"\",\"fourth_categories_header\":\"Fourth Categories Header\",\"fourth_categories\":\"\",\"fifth_categories_header\":\"Fifth Categories Header\",\"fifth_categories\":\"\"});\n  }\n})();\n","\n(function() {\n  function getConsentCookie() {\n    return decodeURIComponent(\n      (document.cookie.match(/^(?:.*;)?\\s*OptanonConsent\\s*=\\s*([^;]+)(?:.*)?$/) || [, null])[1]\n    );\n  }\n\n  function hasAnalyticsConsent() {\n    const otConsentCookie = getConsentCookie();\n    return otConsentCookie != null &&\n      otConsentCookie.indexOf(\"groups=\") > -1 &&\n      otConsentCookie.indexOf(\",C0002:1\") > -1;\n  }\n\n  window.adobeDataLayer = window.adobeDataLayer || [];\n\n  function pushEvent(eventData) {\n    if (!hasAnalyticsConsent()) return;\n    window.adobeDataLayer.push(eventData);\n  }\n\n  function getText(el) {\n    return el?.textContent?.trim() || \"\";\n  }\n\n  if (typeof window.trackView === \"function\") {\n    window.trackView();\n  }\n\n  document.addEventListener(\"click\", function(e) {\n    const item = e.target.closest(\".topic-list-item\");\n    if (!item) return;\n\n    const topicTitle = getText(item.querySelector(\".link-top-line\"));\n\n    pushEvent({\n      event: \"topicClick\",\n      eventInfo: {\n        action: \"click\",\n        label: \"Topic View\",\n        detail: topicTitle,\n        location: window.location.pathname\n      }\n    });\n  });\n\n  document.addEventListener(\"click\", function(e) {\n    const likeBtn = e.target.closest(\".toggle-like\");\n    if (!likeBtn) return;\n\n    pushEvent({\n      event: \"interaction\",\n      eventInfo: {\n        action: \"click\",\n        label: \"Like\",\n        detail: \"Post Like\",\n        location: window.location.pathname\n      }\n    });\n  });\n\n  document.addEventListener(\"click\", function(e) {\n    const footerLink = e.target.closest(\".adobe-analytics-footer-compliance .footer-link\");\n    if (footerLink) {\n      pushEvent({\n        event: \"footer\",\n        eventInfo: {\n          action: \"click\",\n          label: \"footer\",\n          detail: getText(footerLink),\n          location: footerLink.href || window.location.href\n        }\n      });\n      return;\n    }\n\n    const cookieBtn = e.target.closest(\".adobe-analytics-footer-compliance .ot-sdk-show-settings\");\n    if (cookieBtn) {\n      pushEvent({\n        event: \"footer\",\n        eventInfo: {\n          action: \"click\",\n          label: \"footer\",\n          detail: \"Cookie Settings\",\n          location: window.location.href\n        }\n      });\n    }\n  });\n})();\n\n"]}