define("discourse/plugins/discourse-adplugin/discourse/components/ad-component",["exports","@ember/component","@ember/object/computed","@ember/service","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/helpers/slot-position"],(function(e,t,s,i,o,a){"use strict"
var l,r,n,d,p
function u(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=t.default.extend((l=(0,o.default)("router.currentRoute.attributes.__type","router.currentRoute.attributes.id"),r=(0,o.default)("router.currentRoute.parent.attributes.archetype"),n=(0,o.default)("currentUser.groups"),d=(0,o.default)("currentCategoryId","topicTagsDisableAds","topicListTag","isPersonalMessage","isRestrictedCategory"),u(p={router:(0,i.inject)(),currentCategoryId:(0,s.or)("router.currentRoute.attributes.category.id","router.currentRoute.parent.attributes.category_id"),currentCategorySlug:(0,s.or)("router.currentRoute.attributes.category.slug","router.currentRoute.parent.attributes.category.slug"),topicTagsDisableAds:(0,s.alias)("router.currentRoute.parent.attributes.tags_disable_ads"),isRestrictedCategory:(0,s.or)("router.currentRoute.attributes.category.read_restricted","router.currentRoute.parent.attributes.category.read_restricted"),topicListTag(e,t){if("tag"===e&&t)return t},isPersonalMessage:e=>"private_message"===e,showToGroups(e){if(!this.currentUser||!e||!this.siteSettings.no_ads_for_groups||0===this.siteSettings.no_ads_for_groups.length)return!0
let t=this.siteSettings.no_ads_for_groups.split("|").filter(Boolean)
return!e.map((e=>e.id.toString())).any((e=>t.includes(e)))},showOnCurrentPage(e,t,s,i,o){return!(t||e&&this.siteSettings.no_ads_for_categories&&this.siteSettings.no_ads_for_categories.split("|").includes(e.toString())||s&&this.siteSettings.no_ads_for_tags&&this.siteSettings.no_ads_for_tags.split("|").includes(s)||i&&this.siteSettings.no_ads_for_personal_messages||o&&this.siteSettings.no_ads_for_restricted_categories)},isNthPost(e){return(0,a.isNthPost)(e,this.get("postNumber"))},isNthTopicListItem(e){return(0,a.isNthTopicListItem)(e,this.get("indexNumber"))}},"topicListTag",[l],Object.getOwnPropertyDescriptor(p,"topicListTag"),p),u(p,"isPersonalMessage",[r],Object.getOwnPropertyDescriptor(p,"isPersonalMessage"),p),u(p,"showToGroups",[n],Object.getOwnPropertyDescriptor(p,"showToGroups"),p),u(p,"showOnCurrentPage",[d],Object.getOwnPropertyDescriptor(p,"showOnCurrentPage"),p),p))})),define("discourse/plugins/discourse-adplugin/discourse/components/ad-slot",["exports","@ember/component","@ember/object","@ember/service","@ember/utils","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","discourse/plugins/discourse-adplugin/discourse/helpers/slot-position","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d){"use strict"
var p,u,c
function h(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.slotContenders=g
const b=(0,d.createTemplateFactory)({id:"huhN6Lo/",block:'[[[42,[28,[37,1],[[28,[37,1],[[30,0,["adComponents"]]],null]],null],null,[[[42,[28,[37,1],[[28,[37,1],[[28,[37,2],[[30,0,["router","currentRoute"]]],null]],null]],null],null,[[[1,"    "],[46,[30,1],null,[["placement","category","postNumber","indexNumber","tagName"],[[30,0,["placement"]],[30,0,["category"]],[30,0,["postNumber"]],[30,0,["indexNumber"]],[30,0,["childTagName"]]]],null],[1,"\\n"]],[]],null]],[1]],null],[1,[28,[32,0],["[[\\"The `adComponents` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adComponents}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `placement` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.placement}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `category` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.category}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `postNumber` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.postNumber}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `indexNumber` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.indexNumber}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `childTagName` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.childTagName}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["adComponent"],false,["each","-track-array","array","component"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs",scope:()=>[n.default],isStrictMode:!1}),m=s.default.create({"google-adsense":{settingPrefix:"adsense",enabledSetting:"adsense_publisher_code",nthPost:"adsense_nth_post_code"},"google-dfp-ad":{settingPrefix:"dfp",enabledSetting:"dfp_publisher_id",nthPost:"dfp_nth_post_code"},"amazon-product-links":{settingPrefix:"amazon",enabledSetting:!1,nthPost:"amazon_nth_post_code",desktop:{"topic-list-top":"amazon_topic_list_top_src_code","post-bottom":"amazon_post_bottom_src_code","topic-above-post-stream":"amazon_topic_above_post_stream_src_code","topic-above-suggested":"amazon_topic_above_suggested_src_code"},mobile:{"topic-list-top":"amazon_mobile_topic_list_top_src_code","post-bottom":"amazon_mobile_post_bottom_src_code","topic-above-post-stream":"amazon_mobile_topic_above_post_stream_src_code","topic-above-suggested":"amazon_mobile_topic_above_suggested_src_code"}},"carbonads-ad":{settingPrefix:"carbonads",enabledSetting:"carbonads_serve_id",desktop:{"topic-list-top":"carbonads_topic_list_top_enabled","post-bottom":!1,"topic-above-post-stream":"carbonads_above_post_stream_enabled","topic-above-suggested":!1}},"adbutler-ad":{settingPrefix:"adbutler",enabledSetting:"adbutler_publisher_id",desktop:{"topic-list-top":"adbutler_topic_list_top_zone_id","post-bottom":"adbutler_post_bottom_zone_id","topic-above-post-stream":"adbutler_topic_above_post_stream_zone_id","topic-above-suggested":"adbutler_topic_above_suggested_zone_id"},mobile:{"topic-list-top":"adbutler_mobile_topic_list_top_zone_id","post-bottom":"adbutler_mobile_post_bottom_zone_id","topic-above-post-stream":"adbutler_mobile_topic_above_post_stream_zone_id","topic-above-suggested":"adbutler_mobile_topic_above_suggested_zone_id"}}}),_={houseAds:0,allAds:0}
function g(e,t,s,i,a){let l=[]
const n=e.get("house_creatives"),d=s.replace(/-/g,"_")
if(n&&n.settings){const e=n.settings[d],t=Object.keys(n.creatives).length>0&&!(0,o.isBlank)(e),s=!a&&!i,p="topic_list_between"===d&&(0,r.isNthTopicListItem)(parseInt(n.settings.after_nth_topic,10),i)
t&&(s||p||(0,r.isNthPost)(parseInt(n.settings.after_nth_post,10),a))&&l.push("house-ad")}return Object.keys(m).forEach((i=>{const n=m[i]
let p,u=null;(function(e,t){return!1===t||t&&!(0,o.isBlank)(e[t])})(t,n.enabledSetting)&&function(e,t,s){return!t||!s||(0,r.isNthPost)(parseInt(e[s],10),t)}(t,a,n.nthPost)&&(u=e.mobileView&&n.mobile||n.desktop,u&&(p=u[s]),void 0===p&&(p=`${n.settingPrefix}_${e.mobileView?"mobile_":""}${d}_code`),!1===p||!1===t[p]||(0,o.isBlank)(t[p])||l.push(i))})),l}e.default=(0,t.setComponentTemplate)(b,l.default.extend((p=(0,a.default)("placement","postNumber","indexNumber"),u=(0,a.default)("placement","availableAdTypes","router.currentRoute"),h(c={router:(0,i.inject)(),tagName:"",availableAdTypes(e,t,s){return g(this.site,this.siteSettings,e,s,t)},adComponents(e,t){if(!t.includes("house-ad")||1===t.length)return t
const s=this.site.get("house_creatives")
let i=!1
if(100===s.settings.house_ads_frequency)return["house-ad"]
if(s.settings.house_ads_frequency>0){if(0===_.allAds||100*_.houseAds/_.allAds<s.settings.house_ads_frequency)return _.houseAds+=1,_.allAds+=1,["house-ad"]
i=!0}const o=t.filter((e=>"house-ad"!==e))
return i&&(_.allAds+=o.length),o}},"availableAdTypes",[p],Object.getOwnPropertyDescriptor(c,"availableAdTypes"),c),h(c,"adComponents",[u],Object.getOwnPropertyDescriptor(c,"adComponents"),c),c)))})),define("discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad",["exports","@ember/component","@ember/runloop","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d,p,u){"use strict"
var c,h,b,m
function _(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const g=(0,u.createTemplateFactory)({id:"Iu0U8n25",block:'[[[41,[30,0,["showAd"]],[[[1,"  "],[44,[[28,[37,2],null,[["divId","className"],[[28,[32,0],["divId"],null],[28,[32,0],["className"],null]]]]],[[[10,0],[15,1,[52,[30,1,["divId"]],[28,[30,1,["divId"]],null,null],[28,[32,1],[[30,0],"divId","[\\"The `divId` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.divId}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,0,[52,[30,1,["className"]],[28,[30,1,["className"]],null,null],[28,[32,1],[[30,0],"className","[\\"The `className` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.className}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[13]],[1]]],[1,"\\n"]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers"],false,["if","let","hash"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs",scope:()=>[d.default,n.default,p.default],isStrictMode:!1})
let f=!1,v=null,y=0
e.default=(0,t.setComponentTemplate)(g,r.default.extend((c=(0,l.default)("currentUser.trust_level"),h=(0,l.default)("publisherId","showToTrustLevel","showToGroups","showAfterPost","showOnCurrentPage"),b=(0,l.default)("postNumber"),_(m={divs:null,publisherId:null,init(){let e=[728,90],t="adbutler_",s="adbutler-",i="adbutler-ad"
this.set("divs",[]),this.site.mobileView&&(e=[320,50],t+="mobile_",s+="mobile-",i="adbutler-mobile-ad"),t+=this.get("placement").replace(/-/g,"_")+"_zone_id",this.set("configKey",t),s+=this.get("placement"),this.set("className",s+" "+i)
let o=this.siteSettings[t]
this.set("zoneId",o)
let a="placement-"+o+"-"+y
this.set("divId",a)
let l=this.siteSettings.adbutler_publisher_id
this.set("publisherId",l),y++,this.divs.push({divId:a,publisherId:l,zoneId:o,dimensions:e}),this._super()},_triggerAds(){if((0,a.isTesting)())return
const e=this.siteSettings.adbutler_adserver_hostname;(function(e){return f?i.default.resolve():v||(v=(0,o.default)("https://"+e+"/app.js",{scriptTag:!0}).then((function(){f=!0})),v)})(e).then(function(){if(this.divs.length>0){let t=window.abkw||""
window.AdButler.ads.push({handler:function(e){window.AdButler.register(e.place.publisherId,e.place.zoneId,e.place.dimensions,e.place.divId,e)},opt:{place:this.divs.pop(),keywords:t,domain:e,click:"CLICK_MACRO_PLACEHOLDER"}})}}.bind(this))},didInsertElement(){this._super(),(0,s.scheduleOnce)("afterRender",this,this._triggerAds)},showToTrustLevel(e){return!(e&&e>this.siteSettings.adbutler_through_trust_level)},showAd:(e,t,s,i,o)=>e&&t&&s&&i&&o,showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.adbutler_nth_post,10))}},"showToTrustLevel",[c],Object.getOwnPropertyDescriptor(m,"showToTrustLevel"),m),_(m,"showAd",[h],Object.getOwnPropertyDescriptor(m,"showAd"),m),_(m,"showAfterPost",[b],Object.getOwnPropertyDescriptor(m,"showAfterPost"),m),m)))})),define("discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links",["exports","@ember/component","@ember/object/computed","@ember/template","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d){"use strict"
var p,u,c,h,b,m,_,g
function f(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const v=(0,d.createTemplateFactory)({id:"Ta+ntc/7",block:'[[[41,[30,0,["showAd"]],[[[41,[30,0,["site","mobileView"]],[[[1,"    "],[44,[[28,[37,2],null,[["adTitleStyleMobile"],[[28,[32,0],["adTitleStyleMobile"],null]]]]],[[[10,0],[14,0,"amazon-product-links-label"],[15,5,[52,[30,1,["adTitleStyleMobile"]],[28,[30,1,["adTitleStyleMobile"]],null,null],[28,[32,1],[[30,0],"adTitleStyleMobile","[\\"The `adTitleStyleMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adTitleStyleMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13]],[1]]],[1,"\\n    "],[44,[[28,[37,2],null,[["adWrapperStyleMobile","userInputMobile"],[[28,[32,0],["adWrapperStyleMobile"],null],[28,[32,0],["userInputMobile"],null]]]]],[[[10,"iframe"],[15,5,[52,[30,2,["adWrapperStyleMobile"]],[28,[30,2,["adWrapperStyleMobile"]],null,null],[28,[32,1],[[30,0],"adWrapperStyleMobile","[\\"The `adWrapperStyleMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyleMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,"marginwidth","0"],[14,"marginheight","0"],[14,"scrolling","no"],[14,"frameborder","0"],[15,"src",[52,[30,2,["userInputMobile"]],[28,[30,2,["userInputMobile"]],null,null],[28,[32,1],[[30,0],"userInputMobile","[\\"The `userInputMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.userInputMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"title",[28,[37,3],["adplugin.advertisement_label"],null]],[12],[1,"\\n    "],[13]],[2]]],[1,"\\n"]],[]],[[[1,"    "],[10,0],[14,0,"amazon-product-links-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n    "],[10,0],[14,0,"container"],[14,"align","center"],[12],[1,"\\n      "],[44,[[28,[37,2],null,[["adWrapperStyle","userInput"],[[28,[32,0],["adWrapperStyle"],null],[28,[32,0],["userInput"],null]]]]],[[[10,"iframe"],[15,5,[52,[30,3,["adWrapperStyle"]],[28,[30,3,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,"marginwidth","0"],[14,"marginheight","0"],[14,"scrolling","no"],[14,"frameborder","0"],[15,"src",[52,[30,3,["userInput"]],[28,[30,3,["userInput"]],null,null],[28,[32,1],[[30,0],"userInput","[\\"The `userInput` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.userInput}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"title",[28,[37,3],["adplugin.advertisement_label"],null]],[12],[1,"\\n      "],[13]],[3]]],[1,"\\n    "],[13],[1,"\\n"]],[]]]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `site` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.site}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers","maybeHelpers"],false,["if","let","hash","i18n"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs",scope:()=>[r.default,l.default,n.default],isStrictMode:!1})
e.default=(0,t.setComponentTemplate)(v,a.default.extend((p=(0,o.default)("amazon_width","amazon_height"),u=(0,o.default)("mobile_amazon_width","mobile_amazon_height"),c=(0,o.default)("mobile_amazon_width"),h=(0,o.default)("user_input"),b=(0,o.default)("user_input_mobile"),m=(0,o.default)("currentUser.trust_level"),_=(0,o.default)("postNumber"),f(g={classNames:["amazon-product-links"],showAd:(0,s.and)("showToTrustLevel","showToGroups","showAfterPost","showOnCurrentPage"),init(){const e={"topic-list-top":{},"topic-above-post-stream":{},"topic-above-suggested":{},"post-bottom":{}},t=this.site.get("mobileView"),s=this.get("placement")
!t&&this.siteSettings.amazon_topic_list_top_src_code&&(e["topic-list-top"].user_input=this.siteSettings.amazon_topic_list_top_src_code,e["topic-list-top"].amazon_width=parseInt(this.siteSettings.amazon_topic_list_top_ad_width_code,10),e["topic-list-top"].amazon_height=parseInt(this.siteSettings.amazon_topic_list_top_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_topic_list_top_src_code&&(e["topic-list-top"].user_input_mobile=this.siteSettings.amazon_mobile_topic_list_top_src_code,e["topic-list-top"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_list_top_ad_width_code,10),e["topic-list-top"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_list_top_ad_height_code,10)),!t&&this.siteSettings.amazon_topic_above_post_stream_src_code&&(e["topic-above-post-stream"].user_input=this.siteSettings.amazon_topic_above_post_stream_src_code,e["topic-above-post-stream"].amazon_width=parseInt(this.siteSettings.amazon_topic_above_post_stream_ad_width_code,10),e["topic-above-post-stream"].amazon_height=parseInt(this.siteSettings.amazon_topic_above_post_stream_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_topic_above_post_stream_src_code&&(e["topic-above-post-stream"].user_input_mobile=this.siteSettings.amazon_mobile_topic_above_post_stream_src_code,e["topic-above-post-stream"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_above_post_stream_ad_width_code,10),e["topic-above-post-stream"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_above_post_stream_ad_height_code,10)),!t&&this.siteSettings.amazon_topic_above_suggested_src_code&&(e["topic-above-suggested"].user_input=this.siteSettings.amazon_topic_above_suggested_src_code,e["topic-above-suggested"].amazon_width=parseInt(this.siteSettings.amazon_topic_above_suggested_ad_width_code,10),e["topic-above-suggested"].amazon_height=parseInt(this.siteSettings.amazon_topic_above_suggested_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_topic_above_suggested_src_code&&(e["topic-above-suggested"].user_input_mobile=this.siteSettings.amazon_mobile_topic_above_suggested_src_code,e["topic-above-suggested"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_above_suggested_ad_width_code,10),e["topic-above-suggested"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_above_suggested_ad_height_code,10)),!t&&this.siteSettings.amazon_post_bottom_src_code&&(e["post-bottom"].user_input=this.siteSettings.amazon_post_bottom_src_code,e["post-bottom"].amazon_width=parseInt(this.siteSettings.amazon_post_bottom_ad_width_code,10),e["post-bottom"].amazon_height=parseInt(this.siteSettings.amazon_post_bottom_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_post_bottom_src_code&&(e["post-bottom"].user_input_mobile=this.siteSettings.amazon_mobile_post_bottom_src_code,e["post-bottom"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_post_bottom_ad_width_code,10),e["post-bottom"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_post_bottom_ad_height_code,10)),this.set("user_input",e[s].user_input),this.set("amazon_width",e[s].amazon_width),this.set("amazon_height",e[s].amazon_height),this.set("user_input_mobile",e[s].user_input_mobile),this.set("mobile_amazon_height",e[s].mobile_amazon_height),this.set("mobile_amazon_width",e[s].mobile_amazon_width),this._super()},adWrapperStyle:(e,t)=>(0,i.htmlSafe)(`width: ${e}px; height: ${t}px;`),adWrapperStyleMobile:(e,t)=>(0,i.htmlSafe)(`width: ${e}px; height: ${t}px;`),adTitleStyleMobile:e=>(0,i.htmlSafe)(`width: ${e}px;`),userInput:e=>(0,i.htmlSafe)(`${e}`),userInputMobile:e=>(0,i.htmlSafe)(`${e}`),showToTrustLevel(e){return!(e&&e>this.siteSettings.amazon_through_trust_level)},showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.amazon_nth_post_code,10))}},"adWrapperStyle",[p],Object.getOwnPropertyDescriptor(g,"adWrapperStyle"),g),f(g,"adWrapperStyleMobile",[u],Object.getOwnPropertyDescriptor(g,"adWrapperStyleMobile"),g),f(g,"adTitleStyleMobile",[c],Object.getOwnPropertyDescriptor(g,"adTitleStyleMobile"),g),f(g,"userInput",[h],Object.getOwnPropertyDescriptor(g,"userInput"),g),f(g,"userInputMobile",[b],Object.getOwnPropertyDescriptor(g,"userInputMobile"),g),f(g,"showToTrustLevel",[m],Object.getOwnPropertyDescriptor(g,"showToTrustLevel"),g),f(g,"showAfterPost",[_],Object.getOwnPropertyDescriptor(g,"showAfterPost"),g),g)))})),define("discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad",["exports","@ember/component","@ember/template","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n){"use strict"
var d,p,u,c
function h(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const b=(0,n.createTemplateFactory)({id:"+Uo79OGY",block:'[[[41,[30,0,["showAd"]],[[[1,"  "],[44,[[28,[37,2],null,[["url"],[[28,[32,0],["url"],null]]]]],[[[10,"script"],[15,"src",[52,[30,1,["url"]],[28,[30,1,["url"]],null,null],[28,[32,1],[[30,0],"url","[\\"The `url` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.url}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,1,"_carbonads_js"],[14,"async",""],[14,4,"text/javascript"],[12],[1,"\\n  "],[13]],[1]]],[1,"\\n"]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers"],false,["if","let","hash"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs",scope:()=>[l.default,a.default,r.default],isStrictMode:!1})
e.default=(0,t.setComponentTemplate)(b,o.default.extend((d=(0,i.default)("serve_id","placement"),p=(0,i.default)("currentUser.trust_level"),u=(0,i.default)("placement","serve_id","showToTrustLevel","showToGroups","showOnCurrentPage"),h(c={serve_id:null,placement:null,init(){this.set("serve_id",this.siteSettings.carbonads_serve_id),this.set("placement",this.siteSettings.carbonads_placement),this._super()},url:(e,t)=>(0,s.htmlSafe)(`//cdn.carbonads.com/carbon.js?serve=${e}&placement=${t}`),showToTrustLevel(e){return!(e&&e>this.siteSettings.carbonads_through_trust_level)},showAd:(e,t,s,i,o)=>e&&t&&s&&i&&o},"url",[d],Object.getOwnPropertyDescriptor(c,"url"),c),h(c,"showToTrustLevel",[p],Object.getOwnPropertyDescriptor(c,"showToTrustLevel"),c),h(c,"showAd",[u],Object.getOwnPropertyDescriptor(c,"showAd"),c),c)))})),define("discourse/plugins/discourse-adplugin/discourse/components/google-adsense",["exports","@ember/component","@ember/runloop","@ember/template","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d,p,u,c){"use strict"
var h,b,m,_,g,f,v,y,w,k
function T(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const z=(0,c.createTemplateFactory)({id:"5dCIkGFf",block:'[[[41,[30,0,["showAd"]],[[[1,"  "],[10,0],[14,0,"google-adsense-label"],[12],[10,"h2"],[12],[1,[28,[35,1],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n  "],[44,[[28,[37,3],null,[["adWrapperStyle"],[[28,[32,0],["adWrapperStyle"],null]]]]],[[[10,0],[14,0,"google-adsense-content"],[15,1,[52,[30,0,["isResponsive"]],"google-adsense__responsive"]],[15,5,[52,[30,1,["adWrapperStyle"]],[28,[30,1,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[1,"\\n    "],[44,[[28,[37,3],null,[["adInsStyle","publisher_id","ad_code","autoAdFormat"],[[28,[32,0],["adInsStyle"],null],[28,[32,0],["publisher_id"],null],[28,[32,0],["ad_code"],null],[28,[32,0],["autoAdFormat"],null]]]]],[[[10,"ins"],[14,0,"adsbygoogle"],[15,5,[52,[30,2,["adInsStyle"]],[28,[30,2,["adInsStyle"]],null,null],[28,[32,1],[[30,0],"adInsStyle","[\\"The `adInsStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adInsStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"data-ad-client",[29,["ca-pub-",[52,[30,2,["publisher_id"]],[28,[30,2,["publisher_id"]],null,null],[28,[32,1],[[30,0],"publisher_id","[\\"The `publisher_id` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.publisher_id}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]]]],[15,"data-ad-slot",[52,[30,2,["ad_code"]],[28,[30,2,["ad_code"]],null,null],[28,[32,1],[[30,0],"ad_code","[\\"The `ad_code` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.ad_code}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"data-ad-format",[52,[30,2,["autoAdFormat"]],[28,[30,2,["autoAdFormat"]],null,null],[28,[32,1],[[30,0],"autoAdFormat","[\\"The `autoAdFormat` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.autoAdFormat}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[1,"\\n    "],[13]],[2]]],[1,"\\n  "],[13]],[1]]],[1,"\\n"]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `isResponsive` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.isResponsive}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers0"],false,["if","i18n","let","hash"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs",scope:()=>[p.default,d.default,u.default],isStrictMode:!1})
let S=!1,O=null,j={}
const P={"topic-list-top":{code:"adsense_topic_list_top_code",sizes:"adsense_topic_list_top_ad_sizes"},"topic-above-post-stream":{code:"adsense_topic_above_post_stream_code",sizes:"adsense_topic_above_post_stream_ad_sizes"},"topic-above-suggested":{code:"adsense_topic_above_suggested_code",sizes:"adsense_topic_above_suggested_ad_sizes"},"post-bottom":{code:"adsense_post_bottom_code",sizes:"adsense_post_bottom_ad_sizes"}},I={"topic-list-top":{code:"adsense_mobile_topic_list_top_code",sizes:"adsense_mobile_topic_list_top_ad_size"},"topic-above-post-stream":{code:"adsense_mobile_topic_above_post_stream_code",sizes:"adsense_mobile_topic_above_post_stream_ad_size"},"topic-above-suggested":{code:"adsense_mobile_topic_above_suggested_code",sizes:"adsense_mobile_topic_above_suggested_ad_size"},"post-bottom":{code:"adsense_mobile_post_bottom_code",sizes:"adsense_mobile_post_bottom_ad_size"}}
e.default=(0,t.setComponentTemplate)(z,n.default.extend((h=(0,r.default)("ad_width"),b=(0,r.default)("ad_width"),m=(0,r.default)("placement","showAd"),_=(0,r.default)("isResponsive","isFluid"),g=(0,r.default)("ad_width","ad_height","isResponsive"),f=(0,r.default)("adWrapperStyle","isResponsive"),v=(0,r.default)("currentUser.trust_level"),y=(0,r.default)("publisher_id","showToTrustLevel","showToGroups","showAfterPost","showOnCurrentPage"),w=(0,r.default)("postNumber"),T(k={classNameBindings:[":google-adsense","classForSlot","isResponsive:adsense-responsive"],loadedGoogletag:!1,publisher_id:null,ad_width:null,ad_height:null,adRequested:!1,init(){let e,t
const s=this.get("placement")
e=this.site.mobileView?I[s]:P[s],j[s]||(j[s]=0)
const i=(this.siteSettings[e.sizes]||"").split("|")
1===i.length?t=i[0]:(t=i[j[s]%i.length],j[s]+=1),this.set("ad_width",function(e){if("responsive"===e)return"auto"
if(e.startsWith("fluid"))return"fluid"
const t=parseInt(e.substring(0,3).trim(),10)
return isNaN(t)?"auto":`${t}px`}(t)),this.set("ad_height",function(e){if("responsive"===e)return"auto"
if(e.startsWith("fluid"))return"fluid"
const t=parseInt(e.substring(4,7).trim(),10)
return isNaN(t)?"auto":`${t}px`}(t)),this.set("ad_code",this.siteSettings[e.code]),this.set("publisher_id",this.siteSettings.adsense_publisher_code),this._super()},async _triggerAds(){if(!(0,l.isTesting)()&&(this.set("adRequested",!0),await function(){if(S)return o.default.resolve()
if(O)return O
const e=("https:"===document.location.protocol?"https:":"http:")+"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
return O=(0,a.default)(e,{scriptTag:!0}).then((function(){S=!0})),O}(),!this.isDestroyed&&!this.isDestroying))try{(window.adsbygoogle||=[]).push({})}catch(e){console.error("Adsense error:",e)}},didInsertElement(){this._super(),this.get("showAd")&&(0,s.scheduleOnce)("afterRender",this,this._triggerAds)},isResponsive:e=>["auto","fluid"].includes(e),isFluid:e=>"fluid"===e,classForSlot:(e,t)=>t?(0,i.htmlSafe)(`adsense-${e}`):"",autoAdFormat:(e,t)=>!!e&&(0,i.htmlSafe)(t?"fluid":"auto"),adWrapperStyle:(e,t,s)=>(0,i.htmlSafe)(s?"":`width: ${e}; height: ${t};`),adInsStyle:(e,t)=>(0,i.htmlSafe)(`display: ${t?"block":"inline-block"}; ${e}`),showToTrustLevel(e){return!(e&&e>this.siteSettings.adsense_through_trust_level)},showAd:(e,t,s,i,o)=>e&&t&&s&&i&&o,showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.adsense_nth_post_code,10))}},"isResponsive",[h],Object.getOwnPropertyDescriptor(k,"isResponsive"),k),T(k,"isFluid",[b],Object.getOwnPropertyDescriptor(k,"isFluid"),k),T(k,"classForSlot",[m],Object.getOwnPropertyDescriptor(k,"classForSlot"),k),T(k,"autoAdFormat",[_],Object.getOwnPropertyDescriptor(k,"autoAdFormat"),k),T(k,"adWrapperStyle",[g],Object.getOwnPropertyDescriptor(k,"adWrapperStyle"),k),T(k,"adInsStyle",[f],Object.getOwnPropertyDescriptor(k,"adInsStyle"),k),T(k,"showToTrustLevel",[v],Object.getOwnPropertyDescriptor(k,"showToTrustLevel"),k),T(k,"showAd",[y],Object.getOwnPropertyDescriptor(k,"showAd"),k),T(k,"showAfterPost",[w],Object.getOwnPropertyDescriptor(k,"showAfterPost"),k),k)))})),define("discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad",["exports","@ember/component","@ember/object/computed","@ember/template","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d,p,u,c){"use strict"
var h,b,m,_,g,f,v,y,w,k,T,z
function S(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const O=(0,c.createTemplateFactory)({id:"OG/8nj/j",block:'[[[41,[30,0,["showAd"]],[[[41,[30,0,["site","mobileView"]],[[[1,"    "],[44,[[28,[37,2],null,[["adTitleStyleMobile"],[[28,[32,0],["adTitleStyleMobile"],null]]]]],[[[10,0],[14,0,"google-dfp-ad-label"],[15,5,[52,[30,1,["adTitleStyleMobile"]],[28,[30,1,["adTitleStyleMobile"]],null,null],[28,[32,1],[[30,0],"adTitleStyleMobile","[\\"The `adTitleStyleMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adTitleStyleMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13]],[1]]],[1,"\\n    "],[44,[[28,[37,2],null,[["divId","adWrapperStyle"],[[28,[32,0],["divId"],null],[28,[32,0],["adWrapperStyle"],null]]]]],[[[10,0],[15,1,[52,[30,2,["divId"]],[28,[30,2,["divId"]],null,null],[28,[32,1],[[30,0],"divId","[\\"The `divId` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.divId}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,5,[52,[30,2,["adWrapperStyle"]],[28,[30,2,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,0,"dfp-ad-unit"],[14,"align","center"],[12],[13]],[2]]],[1,"\\n"]],[]],[[[1,"    "],[10,0],[14,0,"google-dfp-ad-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n    "],[44,[[28,[37,2],null,[["divId","adWrapperStyle"],[[28,[32,0],["divId"],null],[28,[32,0],["adWrapperStyle"],null]]]]],[[[10,0],[15,1,[52,[30,3,["divId"]],[28,[30,3,["divId"]],null,null],[28,[32,1],[[30,0],"divId","[\\"The `divId` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.divId}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,5,[52,[30,3,["adWrapperStyle"]],[28,[30,3,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,0,"dfp-ad-unit"],[14,"align","center"],[12],[13]],[3]]],[1,"\\n"]],[]]]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `site` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.site}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers","maybeHelpers"],false,["if","let","hash","i18n"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs",scope:()=>[p.default,d.default,u.default],isStrictMode:!1})
let j=!1,P=null,I={},A=1,x={}
function N(e){return e.substring(4,7).trim()}function M(e){let t=e.replace(/ /g,"")
return t=t.replace(/['"]+/g,""),t=t.split(","),t}function D(e){let t=e
return t=t.replace(/['"]+/g,""),t=t.split("\n"),t}const W={"topic-list-top":{code:"dfp_topic_list_top_code",sizes:"dfp_topic_list_top_ad_sizes",targeting_keys:"dfp_target_topic_list_top_key_code",targeting_values:"dfp_target_topic_list_top_value_code"},"topic-above-post-stream":{code:"dfp_topic_above_post_stream_code",sizes:"dfp_topic_above_post_stream_ad_sizes",targeting_keys:"dfp_target_topic_above_post_stream_key_code",targeting_values:"dfp_target_topic_above_post_stream_value_code"},"topic-above-suggested":{code:"dfp_topic_above_suggested_code",sizes:"dfp_topic_above_suggested_ad_sizes",targeting_keys:"dfp_target_topic_above_suggested_key_code",targeting_values:"dfp_target_topic_above_suggested_value_code"},"post-bottom":{code:"dfp_post_bottom_code",sizes:"dfp_post_bottom_ad_sizes",targeting_keys:"dfp_target_post_bottom_key_code",targeting_values:"dfp_target_post_bottom_value_code"}},C={"topic-list-top":{code:"dfp_mobile_topic_list_top_code",sizes:"dfp_mobile_topic_list_top_ad_sizes",targeting_keys:"dfp_target_topic_list_top_key_code",targeting_values:"dfp_target_topic_list_top_value_code"},"topic-above-post-stream":{code:"dfp_mobile_topic_above_post_stream_code",sizes:"dfp_mobile_topic_above_post_stream_ad_sizes",targeting_keys:"dfp_target_topic_above_post_stream_key_code",targeting_values:"dfp_target_topic_above_post_stream_value_code"},"topic-above-suggested":{code:"dfp_mobile_topic_above_suggested_code",sizes:"dfp_mobile_topic_above_suggested_ad_sizes",targeting_keys:"dfp_target_topic_above_suggested_key_code",targeting_values:"dfp_target_topic_above_suggested_value_code"},"post-bottom":{code:"dfp_mobile_post_bottom_code",sizes:"dfp_mobile_post_bottom_ad_sizes",targeting_keys:"dfp_target_post_bottom_key_code",targeting_values:"dfp_target_post_bottom_value_code"}}
function F(e,t,s,i,o,a,l){if(!s.dfp_publisher_id)return
if(I[e])return I[e]
let r,n,d
return i?(d=s.dfp_publisher_id_mobile||s.dfp_publisher_id,n=C[t]):(d=s.dfp_publisher_id,n=W[t]),r=window.googletag.defineSlot("/"+d+"/"+s[n.code],[o,a],e),function(e,t,s){for(let i=0;i<e.length;i++)e[i]&&s.setTargeting(e[i],M(t[i]))}(D(s[n.targeting_keys]),D(s[n.targeting_values]),r),l&&r.setTargeting("discourse-category",l),r.addService(window.googletag.pubads()),I[e]={ad:r,width:o,height:a},I[e]}e.default=(0,t.setComponentTemplate)(O,n.default.extend((h=(0,r.default)("siteSettings.dfp_publisher_id","siteSettings.dfp_publisher_id_mobile","site.mobileView"),b=(0,r.default)("placement","postNumber"),m=(0,r.default)("placement","showAd"),_=(0,r.default)("width","height"),g=(0,r.default)("width"),f=(0,r.default)("publisherId","showToTrustLevel","showToGroups","showAfterPost","showOnCurrentPage","size"),v=(0,r.default)("currentUser.trust_level"),y=(0,r.default)("postNumber"),w=(0,r.on)("didUpdate"),k=(0,r.on)("didInsertElement"),T=(0,r.on)("willDestroyElement"),z={classNameBindings:["adUnitClass"],classNames:["google-dfp-ad"],loadedGoogletag:!1,lastAdRefresh:null,width:(0,s.alias)("size.width"),height:(0,s.alias)("size.height"),size(){return function(e,t,s){let i,o
i=s?C[e]:W[e],x[e]||(x[e]=0)
const a=(t[i.sizes]||"").split("|")
if(1===a.length?o=a[0]:(o=a[x[e]%a.length],x[e]+=1),"fluid"===o)return{width:"fluid",height:"fluid"}
const l={width:parseInt((r=o,r.substring(0,3).trim()),10),height:parseInt(N(o),10)}
var r
return isNaN(l.width)||isNaN(l.height)?void 0:l}(this.get("placement"),this.siteSettings,this.site.mobileView)},publisherId:(e,t,s)=>s&&t||e,divId(e,t){let s=A++
return t?`div-gpt-ad-${s}-${e}-${t}`:`div-gpt-ad-${s}-${e}`},adUnitClass:(e,t)=>t?`dfp-ad-${e}`:"",adWrapperStyle(e,t){if("fluid"!==e)return(0,i.htmlSafe)(`width: ${e}px; height: ${t}px;`)},adTitleStyleMobile(e){if("fluid"!==e)return(0,i.htmlSafe)(`width: ${e}px;`)},showAd:(e,t,s,i,o,a)=>e&&t&&s&&i&&o&&a,showToTrustLevel(e){return!(e&&e>this.siteSettings.dfp_through_trust_level)},showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.dfp_nth_post_code,10))},shouldRefreshAd(){const e=this.get("lastAdRefresh")
return!e||new Date-e>3e3},updated(){if(!this.shouldRefreshAd())return
let e=I[this.get("divId")]
if(!e||!e.ad)return
let t=e.ad,s=this.get("currentCategorySlug")
this.get("loadedGoogletag")&&(this.set("lastAdRefresh",new Date),window.googletag.cmd.push((()=>{t.setTargeting("discourse-category",s||"0"),window.googletag.pubads().refresh([t])})))},_initGoogleDFP(){(0,l.isTesting)()||this.get("showAd")&&function(){if(j)return o.default.resolve()
if(P)return P
let e=("https:"===document.location.protocol?"https:":"http:")+"//securepubads.g.doubleclick.net/tag/js/gpt.js"
return P=(0,a.default)(e,{scriptTag:!0}).then((function(){j=!0,void 0===window.googletag&&console.log("googletag is undefined!"),window.googletag.cmd.push((function(){window.googletag.pubads().enableSingleRequest(),window.googletag.pubads().disableInitialLoad(),window.googletag.enableServices()}))})),window.googletag=window.googletag||{cmd:[]},P}().then((()=>{this.set("loadedGoogletag",!0),this.set("lastAdRefresh",new Date),window.googletag.cmd.push((()=>{let e=F(this.get("divId"),this.get("placement"),this.siteSettings,this.site.mobileView,this.get("width"),this.get("height"),this.get("currentCategorySlug")||"0")
e&&e.ad&&(window.googletag.display(this.get("divId")),window.googletag.pubads().refresh([e.ad]))}))}))},willRender(){this._super(...arguments),this.get("showAd")},cleanup(){var e
e=this.get("divId"),I[e]&&window.googletag&&(window.googletag.destroySlots([I[e].ad]),delete I[e])}},S(z,"size",[r.default],Object.getOwnPropertyDescriptor(z,"size"),z),S(z,"publisherId",[h],Object.getOwnPropertyDescriptor(z,"publisherId"),z),S(z,"divId",[b],Object.getOwnPropertyDescriptor(z,"divId"),z),S(z,"adUnitClass",[m],Object.getOwnPropertyDescriptor(z,"adUnitClass"),z),S(z,"adWrapperStyle",[_],Object.getOwnPropertyDescriptor(z,"adWrapperStyle"),z),S(z,"adTitleStyleMobile",[g],Object.getOwnPropertyDescriptor(z,"adTitleStyleMobile"),z),S(z,"showAd",[f],Object.getOwnPropertyDescriptor(z,"showAd"),z),S(z,"showToTrustLevel",[v],Object.getOwnPropertyDescriptor(z,"showToTrustLevel"),z),S(z,"showAfterPost",[y],Object.getOwnPropertyDescriptor(z,"showAfterPost"),z),S(z,"updated",[w],Object.getOwnPropertyDescriptor(z,"updated"),z),S(z,"_initGoogleDFP",[k],Object.getOwnPropertyDescriptor(z,"_initGoogleDFP"),z),S(z,"cleanup",[T],Object.getOwnPropertyDescriptor(z,"cleanup"),z),z)))})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ad",["exports","@ember/component","@ember/utils","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l){"use strict"
var r,n,d,p,u
function c(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const h=(0,l.createTemplateFactory)({id:"r15k8uuj",block:'[[[41,[30,0,["showAd"]],[[[1,"  "],[1,[28,[35,1],[[30,0,["adHtml"]]],null]],[1,"\\n"]],[]],null],[1,[28,[32,0],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adHtml` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adHtml}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["if","html-safe"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs",scope:()=>[a.default],isStrictMode:!1}),b={topic_list_top:null,topic_above_post_stream:null,topic_above_suggested:null,post_bottom:null,topic_list_between:null}
e.default=(0,t.setComponentTemplate)(h,o.default.extend((r=(0,i.default)("placement","showAd"),n=(0,i.default)("showToGroups","showAfterPost","showAfterTopicListItem","showOnCurrentPage"),d=(0,i.default)("postNumber","placement"),p=(0,i.default)("placement"),u={classNames:["house-creative"],classNameBindings:["adUnitClass"],attributeBindings:["colspanAttribute:colspan"],adHtml:"",colspanAttribute(){return"td"===this.tagName?"5":null},adUnitClass:(e,t)=>t?`house-${e}`:"",showAd:(e,t,s,i)=>e&&(t||s)&&i,showAfterPost(e,t){return!e&&"topic-list-between"!==t||this.isNthPost(parseInt(this.site.get("house_creatives.settings.after_nth_post"),10))},showAfterTopicListItem(e){return"topic-list-between"!==e||this.isNthTopicListItem(parseInt(this.site.get("house_creatives.settings.after_nth_topic"),10))},chooseAdHtml(){const e=this.site.get("house_creatives"),t=this.get("placement").replace(/-/g,"_"),s=this.adsNamesForSlot(t)
if(s.length>0){b[t]||(b[t]=0)
let i=e.creatives[s[b[t]]]||""
return b[t]=(b[t]+1)%s.length,i}return""},adsNamesForSlot(e){const t=this.site.get("house_creatives")
if(!t||!t.settings)return[]
const i=t.settings[e]
return Object.keys(t.creatives).length>0&&!(0,s.isBlank)(i)?i.split("|"):[]},refreshAd(){this.set("adHtml",this.chooseAdHtml())},didInsertElement(){this._super(...arguments),this.get("showAd")&&(null===b.topic_list_top&&Object.keys(b).forEach((e=>{const t=this.adsNamesForSlot(e)
b[e]=Math.floor(Math.random()*t.length)})),this.refreshAd())}},c(u,"colspanAttribute",[i.default],Object.getOwnPropertyDescriptor(u,"colspanAttribute"),u),c(u,"adUnitClass",[r],Object.getOwnPropertyDescriptor(u,"adUnitClass"),u),c(u,"showAd",[n],Object.getOwnPropertyDescriptor(u,"showAd"),u),c(u,"showAfterPost",[d],Object.getOwnPropertyDescriptor(u,"showAfterPost"),u),c(u,"showAfterTopicListItem",[p],Object.getOwnPropertyDescriptor(u,"showAfterTopicListItem"),u),u)))})),define("discourse/plugins/discourse-adplugin/discourse/components/post-bottom-ad",["exports","@ember/component","@ember/component/template-only","@ember/template-factory"],(function(e,t,s,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const o=(0,i.createTemplateFactory)({id:"EFDIMueB",block:'[[[1,[28,[35,0],null,[["placement","category","postNumber"],["post-bottom",[30,1,["topic","category","slug"]],[30,1,["post_number"]]]]]]],["@model"],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/post-bottom-ad.hbs",isStrictMode:!1})
e.default=(0,t.setComponentTemplate)(o,(0,s.default)())})),define("discourse/plugins/discourse-adplugin/discourse/connectors/after-topic-list-item/discourse-adplugin",["exports","discourse/plugins/discourse-adplugin/discourse/components/ad-slot"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default={shouldRender:(e,s)=>e.index&&(0,t.slotContenders)(s.site,s.siteSettings,"topic-list-between",e.index).length>0}})),define("discourse/plugins/discourse-adplugin/discourse/helpers/slot-position",["exports"],(function(e){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.isNthPost=function(e,t){return!!(e&&e>0)&&t%e==0},e.isNthTopicListItem=function(e,t){return!!(e&&e>0&&t>0)&&(t+1)%e==0}})),define("discourse/plugins/discourse-adplugin/discourse/initializers/initialize-ad-plugin",["exports","discourse/lib/plugin-api","discourse/models/site","discourse/widgets/render-glimmer","@ember/template-factory"],(function(e,t,s,i,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default={name:"initialize-ad-plugin",initialize(e){(0,i.registerWidgetShim)("after-post-ad","div.widget-connector",(0,o.createTemplateFactory)({id:"adpJSmtH",block:'[[[8,[39,0],null,[["@model"],[[30,1]]],null]],["@data"],false,["post-bottom-ad"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-adplugin/discourse/initializers/initialize-ad-plugin.js",isStrictMode:!1})),(0,t.withPluginApi)("0.1",(e=>{e.decorateWidget("post:after",(e=>e.attach("after-post-ad",e.attrs)))}))
const a=e.lookup("service:message-bus"),l=e.lookup("service:current-user")?"/site/house-creatives/logged-in":"/site/house-creatives/anonymous"
a.subscribe(l,(function(e){s.default.currentProp("house_creatives",e)}))}}})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"ku28n4FV",block:'[[[1,[28,[35,0],null,[["placement","category","indexNumber","childTagName"],["topic-list-between",[30,0,["category","slug"]],[30,0,["index"]],"td"]]]],[1,[28,[32,0],["[[\\"The `category` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.category}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `index` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.index}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"gIz8Oh1y",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-list-top",[30,0,["category","slug"]]]]]],[1,[28,[32,0],["[[\\"The `category` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.category}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/post-bottom/discourse-adplugin",["exports","@ember/template-factory"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,t.createTemplateFactory)({id:"ZR5bfOi1",block:'[[[1,[28,[35,0],null,[["model"],[[30,0]]]]]],[],false,["post-bottom-ad"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/post-bottom/discourse-adplugin.hbs",isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"RH6fRoTc",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-above-post-stream",[30,0,["model","category","slug"]]]]]],[1,[28,[32,0],["[[\\"The `model` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.model}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"K9wxjVFU",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-above-suggested",[30,0,["model","category","slug"]]]]]],[1,[28,[32,0],["[[\\"The `model` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.model}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})}))

//# sourceMappingURL=discourse-adplugin-4c477776222765b5d2c6060e72ca37ba2ccef3c7e6a284cb4072f1130f653623.map
//!

;
