{"version":3,"file":"main.D6Nu5m.js","sources":["theme-35/virtual:theme","theme-35/discourse/components/first-reply-statement.gjs","theme-35/discourse/initializers/below-op.gjs","theme-35/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(35);\n\nexport function themePrefix(key) {\n  return `theme_translations.35.${key}`;\n}\n","import Component from \"@glimmer/component\";\nimport { tracked } from \"@glimmer/tracking\";\nimport { htmlSafe } from \"@ember/template\";\nimport { eq } from \"truth-helpers\";\nimport replaceEmoji from \"discourse/helpers/replace-emoji\";\nimport dIcon from \"discourse-common/helpers/d-icon\";\nimport I18n from \"discourse-i18n\";\n\nexport default class FirstReplyStatement extends Component {\n  @tracked belowOP = this.args.belowOP;\n\n  get title() {\n    return I18n.t(themePrefix(\"first_replier.title\"));\n  }\n\n  get description() {\n    return I18n.t(themePrefix(\"first_replier.description\"));\n  }\n\n  <template>\n    <div class=\"first-reply-statement\">\n      <div class=\"first-replier --image\">\n        {{#if (eq settings.image_type \"icon\")}}\n          {{dIcon settings.icon}}\n        {{else if (eq settings.image_type \"image\")}}\n          <img src={{settings.image}} />\n        {{/if}}\n      </div>\n      <div class=\"first-replier --description\">\n        <span>{{replaceEmoji (htmlSafe this.title)}}</span>\n        <span>{{replaceEmoji (htmlSafe this.description)}}</span>\n      </div>\n    </div>\n  </template>\n}\n","import Component from \"@glimmer/component\";\nimport { withPluginApi } from \"discourse/lib/plugin-api\";\nimport FirstReplyStatement from \"../components/first-reply-statement\";\n\nfunction firstReplyPost(api) {\n  api.renderAfterWrapperOutlet(\n    \"post-article\",\n    class extends Component {\n      static shouldRender(args) {\n        const topic = args.post?.topic;\n        \n        // Private message check\n        if (topic?.archetype === \"private_message\") {\n          return false;\n        }\n        \n        // Only appear after the first post\n        if (args.post?.post_number !== 1) {\n          return false;\n        }\n        \n        // Disabled categories check\n        if (settings.disabled_categories) {\n          const categoriesId = settings.disabled_categories\n            .split(\"|\")\n            .map((id) => parseInt(id, 10));\n          if (categoriesId.includes(topic?.category_id)) {\n            return false;\n          }\n        }\n        \n        // Only show if this is the only post and can be replied to\n        if (topic?.posts_count !== 1) {\n          return false;\n        }\n        \n        if (!topic?.details?.can_create_post) {\n          return false;\n        }\n        \n        return true;\n      }\n      \n      <template>\n        <div class=\"first-reply-statement-wrapper\">\n          <FirstReplyStatement \n            @model={{@args.post.topic}} \n            @belowOP={{true}} \n          />\n        </div>\n      </template>\n    }\n  );\n}\n\nexport default {\n  name: \"first-reply-statement\",\n  initialize() {\n    withPluginApi((api) => {\n      firstReplyPost(api);\n    });\n  }\n};\n","import * as Mod1 from \"./discourse/components/first-reply-statement\";\nimport * as Mod2 from \"./discourse/initializers/below-op\";\nconst compatModules = {\n  \"discourse/components/first-reply-statement\": Mod1,\n  \"discourse/initializers/below-op\": Mod2,\n};\nexport { compatModules };\nexport default compatModules;\n"],"names":["settings","getObjectForTheme","themePrefix","key","FirstReplyStatement","Component","dt7948","g","this","prototype","tracked","args","belowOP","i","title","I18n","t","description","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","eq","dIcon","replaceEmoji","htmlSafe","isStrictMode","belowOp","name","initialize","withPluginApi","api","renderAfterWrapperOutlet","shouldRender","topic","post","archetype","post_number","disabled_categories","split","map","parseInt","includes","category_id","posts_count","details","can_create_post","firstReplyPost","compatModules","Mod1"],"mappings":"86BAEaA,EAAWC,EAAkB;AAEnC,SAASC,EAAYC,GAC1B,MAAO,yBAAyBA,GAClC,CCEe,MAAMC,UAA4BC,SAAAC,OAAAC,EAAAC,KAAAC,qBAC9CC,GAAA,WAAA,OAAkBF,KAAKG,KAAKC,OAAO,EAAA,CAAAA,QAAAN,OAAAO,EAAAL,KAAA;AAEpC,SAAIM,GACF,OAAOC,EAAKC,EAAEd,EAAY,uBAC5B,CAEA,eAAIe,GACF,OAAOF,EAAKC,EAAEd,EAAY,6BAC5B,QAEAgB,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,grBAAAC,WAAA,4BAAAC,MAAAA,KAAAA,CAAAC,KAAAxB,WAAAyB,QAAAC,eAAAC,aAAAC,cAAA,IAcApB,KAAU;;;ACsBZ,IAAAqB,EAAe,CACbC,KAAM,wBACNC,UAAAA;8BACEC,CAAeC,KAtDnB,SAAwBA,GACtBA,EAAIC,yBACF,eACA,cAAc7B,EACZ,mBAAO8B,CAAaxB,GAClB,MAAMyB,EAAQzB,EAAK0B,MAAMD;AAGzB,MAAyB,oBAArBA,GAAOE,YAKoB,IAA3B3B,EAAK0B,MAAME,gBAKXvC,EAASwC,sBACUxC,EAASwC,oBAC3BC,MAAM,KACNC,IAAKtB,GAAOuB,SAASvB,EAAI,KACXwB,SAASR,GAAOS,gBAMR,IAAvBT,GAAOU,eAINV,GAAOW,SAASC,kBAKvB,QAEA9B,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,6KAAAC,WAAA,4BAAAC,MAAAA,KAAAA,CAAAnB,wBAAAwB,cAAA,IAOApB,KAAU,GAGhB,EAMMyC,CAAehB,IAEnB;AC3DG,MAACiB,EAAgB,CACpB,6CAA8CC,EAC9C;"}