{"version":3,"sources":["settings.js","discourse/components/discourse-category-banners.js","discourse/templates/connectors/above-site-header/category-header-banner.js","discourse/templates/connectors/below-site-header/category-header-banner.js"],"names":["window","require","registerSettings","show_description","show_mobile","show_subcategory","hide_if_no_description","exceptions","categories","show_above_site_header","show_below_site_header","show_category_icon","override_category_icon_color","define","_exports","_component","_templateFactory","_category","_component2","_tracking","_object","_service","_template","_application","_class","_descriptor","_descriptor2","_descriptor3","_descriptor4","_parseCategories","_parseExceptions","_checkTargetCategory","_initializerDefineProperty","target","property","descriptor","context","Object","defineProperty","enumerable","configurable","writable","value","initializer","call","_classPrivateMethodInitSpec","obj","privateSet","privateCollection","has","TypeError","_checkPrivateRedeclaration","add","_classPrivateMethodGet","receiver","fn","_applyDecoratedDescriptor","decorators","desc","keys","forEach","key","slice","reverse","reduce","decorator","undefined","default","settings","getObjectForTheme","__COLOCATED_TEMPLATE__","createTemplateFactory","id","block","moduleName","isStrictMode","DiscourseCategoryBanners","WeakSet","constructor","super","arguments","this","hasIconComponent","getOwner","hasRegistration","consoleWarn","console","warn","isVisible","categorySlugPathWithID","keepDuringLoadingRoute","router","currentRoute","name","includes","params","category_slug_path_with_id","shouldRender","document","body","classList","remove","safeStyle","htmlSafe","category","color","text_color","getCategory","findBySlugPathWithID","_parseCategories2","isException","_parseExceptions2","toLowerCase","isTarget","_checkTargetCategory2","hideMobile","site","mobileView","isSubCategory","parentCategory","hasNoCategoryDescription","description_text","prototype","inject","tracked","action","getOwnPropertyDescriptor","categoriesStr","split","item","exceptionsStr","filter","Boolean","map","currentCategoryName","parentCategoryName","length","setComponentTemplate","_default"],"mappings":"AACM,YAAaA,QACfC,QAAQ,sCAAsCC,iBAAiB,GAAI,CAACC,kBAAmB,EAAKC,aAAc,EAAMC,kBAAmB,EAAMC,wBAAyB,EAAMC,WAAa,GAAGC,WAAa,GAAGC,wBAAyB,EAAMC,wBAAyB,EAAKC,oBAAqB,EAAMC,8BAA+B,ICF/T,WAAYZ,QAChBa,OAAO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uBAMpC,CACEC,GAAM,KACNC,MAAS,gLACTC,WAAc,6FACdC,cAAgB;AAElB7D,EAASqD,QAAUuE,CACrB","sourceRoot":"theme-24/","sourcesContent":["(function() {\n  if ('require' in window) {\n    require(\"discourse/lib/theme-settings-store\").registerSettings(24, {\"show_description\":true,\"show_mobile\":false,\"show_subcategory\":false,\"hide_if_no_description\":false,\"exceptions\":\"\",\"categories\":\"\",\"show_above_site_header\":false,\"show_below_site_header\":true,\"show_category_icon\":false,\"override_category_icon_color\":false});\n  }\n})();\n","if ('define' in window) {\ndefine(\"discourse/theme-24/components/discourse-category-banners\", [\"exports\", \"@ember/component\", \"@ember/template-factory\", \"discourse/models/category\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/service\", \"@ember/template\", \"@ember/application\"], function (_exports, _component, _templateFactory, _category, _component2, _tracking, _object, _service, _template, _application) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _parseCategories, _parseExceptions, _checkTargetCategory;\n  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\n  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n  function _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\n  function _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n  const settings = require(\"discourse/lib/theme-settings-store\").getObjectForTheme(24);\n  const themePrefix = key => `theme_translations.24.${key}`;\n  const __COLOCATED_TEMPLATE__ = (0, _templateFactory.createTemplateFactory)(\n  /*\n    {{#if this.shouldRender}}\n    <div\n      {{did-insert this.getCategory}}\n      {{did-update this.getCategory this.isVisible}}\n      class=\"category-title-header\n        {{if this.category (concat 'category-banner-' this.category.slug)}}\"\n      style={{if this.category this.safeStyle}}\n    >\n  \n      <div class=\"category-title-contents\">\n        <h1 class=\"category-title\">\n          {{#if (and (theme-setting \"show_category_icon\") this.category)}}\n            {{#if this.hasIconComponent}}\n              {{! For compatibility with https://meta.discourse.org/t/category-icons/104683}}\n              <CategoryIcon @category={{this.category}} />\n            {{else}}\n              {{this.consoleWarn}}\n            {{/if}}\n          {{/if}}\n          {{#if this.category.read_restricted}}\n            {{d-icon \"lock\"}}\n          {{/if}}\n          {{this.category.name}}\n        </h1>\n  \n        {{#if (theme-setting \"show_description\")}}\n          <div class=\"category-title-description\">\n            <div class=\"cooked\" innerHTML={{this.category.description}}></div>\n          </div>\n        {{/if}}\n      </div>\n    </div>\n  {{/if}}\n  */\n  {\n    \"id\": null,\n    \"block\": \"[[[41,[30,0,[\\\"shouldRender\\\"]],[[[1,\\\"  \\\"],[11,0],[16,0,[29,[\\\"category-title-header\\\\n      \\\",[52,[30,0,[\\\"category\\\"]],[28,[37,1],[\\\"category-banner-\\\",[30,0,[\\\"category\\\",\\\"slug\\\"]]],null]]]]],[16,5,[52,[30,0,[\\\"category\\\"]],[30,0,[\\\"safeStyle\\\"]]]],[4,[38,2],[[30,0,[\\\"getCategory\\\"]]],null],[4,[38,3],[[30,0,[\\\"getCategory\\\"]],[30,0,[\\\"isVisible\\\"]]],null],[12],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"category-title-contents\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"h1\\\"],[14,0,\\\"category-title\\\"],[12],[1,\\\"\\\\n\\\"],[41,[28,[37,4],[[28,[37,5],[24,\\\"show_category_icon\\\"],null],[30,0,[\\\"category\\\"]]],null],[[[41,[30,0,[\\\"hasIconComponent\\\"]],[[[1,\\\"            \\\"],[8,[39,6],null,[[\\\"@category\\\"],[[30,0,[\\\"category\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"            \\\"],[1,[30,0,[\\\"consoleWarn\\\"]]],[1,\\\"\\\\n\\\"]],[]]]],[]],null],[41,[30,0,[\\\"category\\\",\\\"read_restricted\\\"]],[[[1,\\\"          \\\"],[1,[28,[35,7],[\\\"lock\\\"],null]],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"        \\\"],[1,[30,0,[\\\"category\\\",\\\"name\\\"]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[28,[37,5],[24,\\\"show_description\\\"],null],[[[1,\\\"        \\\"],[10,0],[14,0,\\\"category-title-description\\\"],[12],[1,\\\"\\\\n          \\\"],[10,0],[14,0,\\\"cooked\\\"],[15,\\\"innerHTML\\\",[30,0,[\\\"category\\\",\\\"description\\\"]]],[12],[13],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[],false,[\\\"if\\\",\\\"concat\\\",\\\"did-insert\\\",\\\"did-update\\\",\\\"and\\\",\\\"theme-setting\\\",\\\"category-icon\\\",\\\"d-icon\\\"]]\",\n    \"moduleName\": \"discourse/components/discourse-category-banners.hbs\",\n    \"isStrictMode\": false\n  });\n  let DiscourseCategoryBanners = (_class = (_parseCategories = /*#__PURE__*/new WeakSet(), _parseExceptions = /*#__PURE__*/new WeakSet(), _checkTargetCategory = /*#__PURE__*/new WeakSet(), class DiscourseCategoryBanners extends _component2.default {\n    constructor() {\n      super(...arguments);\n      _classPrivateMethodInitSpec(this, _checkTargetCategory);\n      _classPrivateMethodInitSpec(this, _parseExceptions);\n      _classPrivateMethodInitSpec(this, _parseCategories);\n      _initializerDefineProperty(this, \"router\", _descriptor, this);\n      _initializerDefineProperty(this, \"site\", _descriptor2, this);\n      _initializerDefineProperty(this, \"category\", _descriptor3, this);\n      _initializerDefineProperty(this, \"keepDuringLoadingRoute\", _descriptor4, this);\n    }\n    get hasIconComponent() {\n      return (0, _application.getOwner)(this).hasRegistration(\"component:category-icon\");\n    }\n    get consoleWarn() {\n      // eslint-disable-next-line no-console\n      return console.warn(\"The category banners component is trying to use the category icons component, but it is not available. https://meta.discourse.org/t/category-icons/104683\");\n    }\n    get isVisible() {\n      if (this.categorySlugPathWithID) {\n        this.keepDuringLoadingRoute = true;\n        return true;\n      } else {\n        if (this.router.currentRoute.name.includes(\"loading\")) {\n          return this.keepDuringLoadingRoute;\n        } else {\n          this.keepDuringLoadingRoute = false;\n          return false;\n        }\n      }\n    }\n    get categorySlugPathWithID() {\n      return this.router?.currentRoute?.params?.category_slug_path_with_id;\n    }\n    get shouldRender() {\n      if (this.isVisible && this.keepDuringLoadingRoute) {\n        return true;\n      } else {\n        document.body.classList.remove(\"category-header\");\n        return false;\n      }\n    }\n    get safeStyle() {\n      return (0, _template.htmlSafe)(`background-color: #${this.category.color}; color: #${this.category.text_color};`);\n    }\n    getCategory() {\n      if (!this.isVisible) {\n        return;\n      }\n      if (this.categorySlugPathWithID) {\n        this.category = _category.default.findBySlugPathWithID(this.categorySlugPathWithID);\n      }\n      const categories = _classPrivateMethodGet(this, _parseCategories, _parseCategories2).call(this, settings.categories);\n      const exceptions = _classPrivateMethodGet(this, _parseExceptions, _parseExceptions2).call(this, settings.exceptions);\n      const isException = exceptions.includes(this.category.name.toLowerCase());\n      const isTarget = _classPrivateMethodGet(this, _checkTargetCategory, _checkTargetCategory2).call(this, categories);\n      const hideMobile = !settings.show_mobile && this.site.mobileView;\n      const isSubCategory = !settings.show_subcategory && this.category.parentCategory;\n      const hasNoCategoryDescription = settings.hide_if_no_description && !this.category.description_text;\n      if (isTarget && !isException && !hasNoCategoryDescription && !isSubCategory && !hideMobile) {\n        document.body.classList.add(\"category-header\");\n      } else {\n        document.body.classList.remove(\"category-header\");\n      }\n    }\n  }), (_descriptor = _applyDecoratedDescriptor(_class.prototype, \"router\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, \"site\", [_service.inject], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, \"category\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return null;\n    }\n  }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, \"keepDuringLoadingRoute\", [_tracking.tracked], {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: function () {\n      return false;\n    }\n  }), _applyDecoratedDescriptor(_class.prototype, \"getCategory\", [_object.action], Object.getOwnPropertyDescriptor(_class.prototype, \"getCategory\"), _class.prototype)), _class);\n  _exports.default = DiscourseCategoryBanners;\n  function _parseCategories2(categoriesStr) {\n    const categories = {};\n    categoriesStr.split(\"|\").forEach(item => {\n      item = item.split(\":\");\n      if (item[0]) {\n        categories[item[0].toLowerCase()] = item[1] ? item[1].toLowerCase() : \"all\";\n      }\n    });\n    return categories;\n  }\n  function _parseExceptions2(exceptionsStr) {\n    return exceptionsStr.split(\"|\").filter(Boolean).map(value => value.toLowerCase());\n  }\n  function _checkTargetCategory2(categories) {\n    const currentCategoryName = this.category.name.toLowerCase();\n    const parentCategoryName = this.category.parentCategory ? this.category.parentCategory.name.toLowerCase() : null;\n    return Object.keys(categories).length === 0 || categories[currentCategoryName] === \"all\" || categories[currentCategoryName] === \"no_sub\" || this.category.parentCategory && (categories[parentCategoryName] === \"all\" || categories[parentCategoryName] === \"only_sub\");\n  }\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, DiscourseCategoryBanners);\n});\n}\n","if ('define' in window) {\ndefine(\"discourse/theme-24/discourse/templates/connectors/above-site-header/category-header-banner\", [\"exports\", \"@ember/template-factory\"], function (_exports, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    {{#if (theme-setting \"show_above_site_header\")}}\n    <DiscourseCategoryBanners />\n  {{/if}}\n  */\n  {\n    \"id\": null,\n    \"block\": \"[[[41,[28,[37,1],[24,\\\"show_above_site_header\\\"],null],[[[1,\\\"  \\\"],[8,[39,2],null,null,null],[1,\\\"\\\\n\\\"]],[]],null]],[],false,[\\\"if\\\",\\\"theme-setting\\\",\\\"discourse-category-banners\\\"]]\",\n    \"moduleName\": \"discourse/theme-24/discourse/templates/connectors/above-site-header/category-header-banner\",\n    \"isStrictMode\": false\n  });\n  _exports.default = _default;\n});\n}\n","if ('define' in window) {\ndefine(\"discourse/theme-24/discourse/templates/connectors/below-site-header/category-header-banner\", [\"exports\", \"@ember/template-factory\"], function (_exports, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    {{#if (theme-setting \"show_below_site_header\")}}\n    <DiscourseCategoryBanners />\n  {{/if}}\n  */\n  {\n    \"id\": null,\n    \"block\": \"[[[41,[28,[37,1],[24,\\\"show_below_site_header\\\"],null],[[[1,\\\"  \\\"],[8,[39,2],null,null,null],[1,\\\"\\\\n\\\"]],[]],null]],[],false,[\\\"if\\\",\\\"theme-setting\\\",\\\"discourse-category-banners\\\"]]\",\n    \"moduleName\": \"discourse/theme-24/discourse/templates/connectors/below-site-header/category-header-banner\",\n    \"isStrictMode\": false\n  });\n  _exports.default = _default;\n});\n}\n"]}