{"version":3,"file":"main.Cl28kG.js","sources":["theme-17/virtual:theme","theme-17/discourse/components/footer-bottom.gjs","theme-17/discourse/components/footer-top.gjs","theme-17/discourse/components/versatile-showcase.gjs","theme-17/discourse/components/topic-lists.gjs","theme-17/discourse/components/welcome-banner-customization.gjs","theme-17/discourse/connectors/before-create-topic-button/guest-button.gjs","theme-17/discourse/connectors/below-discovery-categories/insert.gjs","theme-17/discourse/connectors/below-footer/footer.gjs","theme-17/discourse/initializers/category-colors.js","theme-17/discourse/initializers/custom-icons.js","theme-17/discourse/initializers/welcome-banner-connector.gjs","theme-17/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(17);\n\nexport function themePrefix(key) {\n  return `theme_translations.17.${key}`;\n}\n","/* eslint-disable ember/no-classic-components, ember/require-tagless-components */\nimport Component from \"@ember/component\";\nimport { i18n } from \"discourse-i18n\";\n\nexport default class FooterBottom extends Component {\n  get footerBottom() {\n    return JSON.parse(settings.footer_bottom);\n  }\n\n  <template>\n    <div class=\"footer__bottom\">\n      <span class=\"footer__copyright\">\n        {{i18n (themePrefix \"footer.copyright\")}}\n      </span>\n\n      <ul>\n        {{#each this.footerBottom as |link|}}\n          <li>\n            <a href={{link.url}}>\n              {{link.title}}\n            </a>\n          </li>\n        {{/each}}\n      </ul>\n    </div>\n  </template>\n}\n","/* eslint-disable ember/no-classic-components, ember/require-tagless-components */\nimport Component from \"@ember/component\";\n\nexport default class FooterTop extends Component {\n  tagName = \"nav\";\n\n  get footerTop() {\n    let links = JSON.parse(settings.footer_links);\n    return links;\n  }\n\n  <template>\n    {{#if settings.footer_logo}}\n      <div class=\"footer__logo\">\n        <a href=\"/\">\n          <img src={{settings.footer_logo}} />\n        </a>\n      </div>\n    {{/if}}\n\n    {{#each this.footerTop as |column|}}\n      <div class=\"footer__column\">\n        <h3>\n          {{column.title}}\n        </h3>\n        <ul>\n          {{#each column.params as |link|}}\n            <li>\n              <a href={{link.url}}>\n                {{link.title}}\n              </a>\n            </li>\n          {{/each}}\n        </ul>\n      </div>\n    {{/each}}\n  </template>\n}\n","/* eslint-disable ember/no-classic-components, ember/require-tagless-components */\nimport Component from \"@ember/component\";\nimport ConditionalLoadingSpinner from \"discourse/components/conditional-loading-spinner\";\nimport TopicList from \"discourse/components/topic-list/list\";\nimport icon from \"discourse/helpers/d-icon\";\nimport { i18n } from \"discourse-i18n\";\n\nexport default class VersatileShowcase extends Component {\n  init() {\n    super.init(...arguments);\n    let params = {};\n\n    if (this.data.category) {\n      params.category = this.data.category.id;\n    }\n\n    if (this.data.tag) {\n      params.tags = this.data.tag;\n    }\n\n    if (this.data.solved === \"true\") {\n      params.solved = \"yes\";\n    } else if (this.data.solved === \"false\") {\n      params.solved = \"no\";\n    }\n\n    const filter = {\n      filter: this.data.filter,\n      params,\n    };\n\n    this.set(\"isLoading\", true);\n\n    this.store.findFiltered(\"topicList\", filter).then((topicList) => {\n      this.set(\"topicList\", topicList.topics.slice(0, this.data.length));\n\n      this.set(\"isLoading\", false);\n    });\n  }\n\n  <template>\n    <ConditionalLoadingSpinner @condition={{this.isLoading}}>\n      <TopicList @topics={{this.topicList}} @showPosters={{true}} />\n    </ConditionalLoadingSpinner>\n\n    <a href=\"/latest\" class=\"feed-link\">\n      <span>\n        {{i18n (themePrefix \"see_all_topics\")}}\n      </span>\n      {{icon \"wix-arrow-right\"}}\n    </a>\n  </template>\n}\n","/* eslint-disable ember/no-classic-components */\nimport Component from \"@ember/component\";\nimport { computed } from \"@ember/object\";\nimport { and } from \"@ember/object/computed\";\nimport { service } from \"@ember/service\";\nimport { tagName } from \"@ember-decorators/component\";\nimport { defaultHomepage } from \"discourse/lib/utilities\";\nimport Category from \"discourse/models/category\";\nimport VersatileShowcase from \"./versatile-showcase\";\n\n@tagName(\"\")\nexport default class TopicLists extends Component {\n  @service router;\n\n  @and(\"shouldShow\", \"list.length\") showTopicLists;\n\n  get categoriesLoaded() {\n    return Category.list().length !== 0;\n  }\n\n  get list() {\n    if (settings.feed_list <= 0) {\n      return [];\n    }\n\n    const list_data = settings.feed_list.split(\"|\").map((item, index) => {\n      const classes = [\"col\", `col-${index}`];\n      const length = settings.feed_list.split(\"|\").length;\n\n      if (length % 2 !== 0 && index === length - 1) {\n        classes.push(\"last\");\n      }\n\n      const data = item.split(\",\");\n\n      return {\n        title: data[0].trim(),\n        length: data[1].trim(),\n        filter: data[2].trim(),\n        tag: data[3].trim(),\n        category: Category.findById(data[4].trim()),\n        link: data[5].trim(),\n        solved: data.length > 6 ? data[6].trim() : null,\n        classes: classes.join(\" \"),\n      };\n    });\n\n    return list_data;\n  }\n\n  @computed(\"router.currentRouteName\")\n  get shouldShow() {\n    return this.router?.currentRouteName === `discovery.${defaultHomepage()}`;\n  }\n\n  <template>\n    {{#if this.showTopicLists}}\n      <div class=\"custom-homepage-columns\">\n        {{#each this.list as |item|}}\n          <VersatileShowcase @data={{item}} @classNames={{item.classes}} />\n        {{/each}}\n      </div>\n    {{/if}}\n  </template>\n}\n","import Component from \"@glimmer/component\";\nimport { tracked } from \"@glimmer/tracking\";\nimport didInsert from \"@ember/render-modifiers/modifiers/did-insert\";\nimport { service } from \"@ember/service\";\nimport { trustHTML } from \"@ember/template\";\nimport Category from \"discourse/models/category\";\n\nexport default class WelcomeBannerCustomization extends Component {\n  @service router;\n\n  @tracked category;\n\n  getCategoryName = () => {\n    const slug = this.router.currentRoute.params.category_slug_path_with_id;\n    if (!slug) {\n      this.category = null;\n      return;\n    }\n\n    this.category = Category.findBySlugPathWithID(slug);\n  };\n\n  setupComponent = () => {\n    this.getCategoryName();\n    this.router.on(\"routeDidChange\", this.getCategoryName);\n  };\n\n  willDestroy() {\n    super.willDestroy(...arguments);\n    this.router.off(\"routeDidChange\", this.getCategoryName);\n  }\n\n  <template>\n    <div\n      class=\"welcome-banner-customization-container\"\n      {{didInsert this.setupComponent}}\n    >\n      {{#if this.category}}\n        <div\n          class=\"custom-search-banner-category-title\"\n        >{{this.category.name}}</div>\n\n        <p class=\"custom-search-banner-category-content\">\n          {{trustHTML this.category.description}}\n        </p>\n      {{/if}}\n    </div>\n  </template>\n}\n","import Component from \"@glimmer/component\";\nimport { on } from \"@ember/modifier\";\nimport { action } from \"@ember/object\";\nimport { i18n } from \"discourse-i18n\";\n\nexport default class GuestButton extends Component {\n  // For some reason, the standard <a> link was not redirecting back\n  // to /new-topic after the Wix login process.\n  @action\n  handleLinkClick(event) {\n    event.preventDefault();\n    window.location.href = event.target.href;\n  }\n\n  <template>\n    <a\n      href=\"/new-topic\"\n      {{on \"click\" this.handleLinkClick}}\n      class=\"guest-create-topic\"\n    >\n      {{i18n (themePrefix \"new_topic\")}}</a>\n  </template>\n}\n","/* eslint-disable ember/no-classic-components, ember/require-tagless-components */\nimport Component from \"@ember/component\";\nimport { classNames } from \"@ember-decorators/component\";\nimport TopicLists from \"../../components/topic-lists\";\n\n@classNames(\"below-discovery-categories-outlet\", \"insert\")\nexport default class InsertConnector extends Component {\n  <template><TopicLists /></template>\n}\n","/* eslint-disable ember/no-classic-components, ember/require-tagless-components */\nimport Component from \"@ember/component\";\nimport { classNames } from \"@ember-decorators/component\";\nimport FooterBottom from \"../../components/footer-bottom\";\nimport FooterTop from \"../../components/footer-top\";\n\n@classNames(\"below-footer-outlet\", \"footer\")\nexport default class FooterConnector extends Component {\n  <template>\n    <div class=\"wrap\">\n      <FooterTop />\n      <FooterBottom />\n    </div>\n  </template>\n}\n","import { apiInitializer } from \"discourse/lib/api\";\n\nexport default apiInitializer((api) => {\n  api.onPageChange(() => {\n    const router = api.container.lookup(\"service:router\");\n\n    if (router?.currentRoute?.attributes?.category?.color) {\n      let styleElement = document.querySelector(\"style#category-color\");\n\n      if (!styleElement) {\n        styleElement = document.createElement(\"style\");\n        styleElement.id = \"category-color\";\n        document.head.appendChild(styleElement);\n      }\n\n      styleElement.textContent = `\n      :root {\n        --current-category-color: #${router.currentRoute.attributes.category.color};\n      }\n      `;\n    }\n  });\n});\n","import { withPluginApi } from \"discourse/lib/plugin-api\";\n\nfunction initIcons(api) {\n  api.replaceIcon(\"bars\", \"wix-hamburger\");\n  api.replaceIcon(\"d-chat\", \"wix-chat\");\n  api.replaceIcon(\"layer-group\", \"wix-pages\");\n  api.replaceIcon(\"user\", \"wix-person\");\n  api.replaceIcon(\"list\", \"wix-bullets\");\n  api.replaceIcon(\"tag\", \"wix-tag\");\n  api.replaceIcon(\"inbox\", \"wix-mail\");\n  api.replaceIcon(\"ellipsis-vertical\", \"wix-more\");\n  api.replaceIcon(\"lock\", \"wix-lock\");\n  api.replaceIcon(\"magnifying-glass\", \"wix-search\");\n}\n\nexport default {\n  name: \"custom-icons\",\n  initialize() {\n    withPluginApi(initIcons);\n  },\n};\n","import { apiInitializer } from \"discourse/lib/api\";\nimport WelcomeBannerCustomization from \"../components/welcome-banner-customization\";\n\nexport default apiInitializer((api) => {\n  api.renderInOutlet(\n    \"welcome-banner-below-headline\",\n    WelcomeBannerCustomization\n  );\n});\n","import * as Mod1 from \"./discourse/components/footer-bottom\";\nimport * as Mod2 from \"./discourse/components/footer-top\";\nimport * as Mod3 from \"./discourse/components/topic-lists\";\nimport * as Mod4 from \"./discourse/components/versatile-showcase\";\nimport * as Mod5 from \"./discourse/components/welcome-banner-customization\";\nimport * as Mod6 from \"./discourse/connectors/before-create-topic-button/guest-button.gjs\";\nimport * as Mod7 from \"./discourse/connectors/below-discovery-categories/insert.gjs\";\nimport * as Mod8 from \"./discourse/connectors/below-footer/footer.gjs\";\nimport * as Mod9 from \"./discourse/initializers/category-colors\";\nimport * as Mod10 from \"./discourse/initializers/custom-icons\";\nimport * as Mod11 from \"./discourse/initializers/welcome-banner-connector\";\nconst compatModules = {\n  \"discourse/components/footer-bottom\": Mod1,\n  \"discourse/components/footer-top\": Mod2,\n  \"discourse/components/topic-lists\": Mod3,\n  \"discourse/components/versatile-showcase\": Mod4,\n  \"discourse/components/welcome-banner-customization\": Mod5,\n  \"discourse/connectors/before-create-topic-button/guest-button\": Mod6,\n  \"discourse/connectors/below-discovery-categories/insert\": Mod7,\n  \"discourse/connectors/below-footer/footer\": Mod8,\n  \"discourse/initializers/category-colors\": Mod9,\n  \"discourse/initializers/custom-icons\": Mod10,\n  \"discourse/initializers/welcome-banner-connector\": Mod11,\n};\nexport { compatModules };\nexport default compatModules;\n"],"names":["settings","getObjectForTheme","themePrefix","key","FooterBottom","Component","footerBottom","JSON","parse","footer_bottom","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","i18n","isStrictMode","this","FooterTop","tagName","footerTop","footer_links","VersatileShowcase","init","super","arguments","params","data","category","tag","tags","solved","filter","set","store","findFiltered","then","topicList","topics","slice","length","ConditionalLoadingSpinner","TopicList","icon","TopicLists","dt7948","c","g","prototype","service","router","i","and","showTopicLists","categoriesLoaded","Category","list","feed_list","split","map","item","index","classes","push","title","trim","findById","link","join","shouldShow","currentRouteName","defaultHomepage","n","computed","WelcomeBannerCustomization","tracked","getCategoryName","slug","currentRoute","category_slug_path_with_id","findBySlugPathWithID","setupComponent","on","willDestroy","off","didInsert","trustHTML","GuestButton","handleLinkClick","event","preventDefault","window","location","href","target","action","InsertConnector","classNames","FooterConnector","categoryColors","apiInitializer","api","onPageChange","container","lookup","attributes","color","styleElement","document","querySelector","createElement","head","appendChild","textContent","initIcons","replaceIcon","customIcons","name","initialize","withPluginApi","welcomeBannerConnector","renderInOutlet","compatModules","Mod1","Mod2","Mod3","Mod4","Mod5","Mod6","Mod7","Mod8","Mod9","Mod10"],"mappings":"wgDAEaA,EAAWC,EAAkB;AAEnC,SAASC,EAAYC,GAC1B,MAAO,yBAAyBA,GAClC,CCFe,MAAMC,UAAqBC,EACxC,gBAAIC,GACF,OAAOC,KAAKC,MAAMR,EAASS,cAC7B,QAEAC,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,miBAAAC,WAAA,4BAAAC,MAAAA,KAAAA,CAAAC,OAAAd,gBAAAe,cAAA,IAgBAC,KAAU;;ACtBG,MAAMC,UAAkBd,EACr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