define("discourse/plugins/automation/admin/adapters/discourse-automation-adapter",["exports","discourse/adapters/rest"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class o extends t.default{basePath(){return"/admin/plugins/automation/"}pathFor(){return super.pathFor(...arguments).replace("_","-")+".json"}}e.default=o})),define("discourse/plugins/automation/admin/adapters/discourse-automation-automation",["exports","discourse/plugins/automation/admin/adapters/discourse-automation-adapter"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class o extends t.default{jsonMode=!0
apiNameFor(){return"automation"}}e.default=o})),define("discourse/plugins/automation/admin/adapters/discourse-automation-scriptable",["exports","discourse/plugins/automation/admin/adapters/discourse-automation-adapter"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class o extends t.default{jsonMode=!0
apiNameFor(){return"scriptable"}}e.default=o})),define("discourse/plugins/automation/admin/adapters/discourse-automation-triggerable",["exports","discourse/plugins/automation/admin/adapters/discourse-automation-adapter"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class o extends t.default{jsonMode=!0
apiNameFor(){return"triggerable"}}e.default=o})),define("discourse/plugins/automation/admin/components/automation-field",["exports","@glimmer/component","discourse-i18n","discourse/plugins/automation/admin/components/fields/da-boolean-field","discourse/plugins/automation/admin/components/fields/da-categories-field","discourse/plugins/automation/admin/components/fields/da-category-field","discourse/plugins/automation/admin/components/fields/da-category-notification-level-field","discourse/plugins/automation/admin/components/fields/da-choices-field","discourse/plugins/automation/admin/components/fields/da-custom-field","discourse/plugins/automation/admin/components/fields/da-custom-fields","discourse/plugins/automation/admin/components/fields/da-date-time-field","discourse/plugins/automation/admin/components/fields/da-email-group-user-field","discourse/plugins/automation/admin/components/fields/da-group-field","discourse/plugins/automation/admin/components/fields/da-groups-field","discourse/plugins/automation/admin/components/fields/da-key-value-field","discourse/plugins/automation/admin/components/fields/da-message-field","discourse/plugins/automation/admin/components/fields/da-period-field","discourse/plugins/automation/admin/components/fields/da-pms-field","discourse/plugins/automation/admin/components/fields/da-post-field","discourse/plugins/automation/admin/components/fields/da-tags-field","discourse/plugins/automation/admin/components/fields/da-text-field","discourse/plugins/automation/admin/components/fields/da-text-list-field","discourse/plugins/automation/admin/components/fields/da-trust-levels-field","discourse/plugins/automation/admin/components/fields/da-user-field","discourse/plugins/automation/admin/components/fields/da-user-profile-field","discourse/plugins/automation/admin/components/fields/da-users-field","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u,c,m,p,f,g,b,h,_,y,v,w,x,j,T,k,P,C){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const F={period:b.default,date_time:u.default,text_list:w.default,pms:h.default,text:v.default,message:g.default,categories:n.default,user:j.default,users:k.default,user_profile:T.default,post:_.default,tags:y.default,"key-value":f.default,boolean:i.default,"trust-levels":x.default,category:a.default,group:m.default,groups:p.default,choices:l.default,category_notification_level:s.default,email_group_user:c.default,custom_field:d.default,custom_fields:r.default}
class M extends t.default{static#e=(()=>(0,P.setComponentTemplate)((0,C.createTemplateFactory)({id:"X2NXnxNn",block:'[[[1,"\\n"],[41,[30,0,["displayField"]],[[[1," "],[8,[30,0,["component"]],null,[["@field","@placeholders","@label","@description","@saveAutomation"],[[30,1],[30,2,["placeholders"]],[30,0,["label"]],[30,0,["description"]],[30,3]]],null],[1,"\\n"]],[]],null],[1," "]],["@field","@automation","@saveAutomation"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/automation-field.js",isStrictMode:!0}),this))()
get component(){return F[this.args.field.component]}get label(){return(0,o.i18n)(`discourse_automation${this.target}fields.${this.args.field.name}.label`)}get displayField(){const e=this.args.automation?.trigger?.id,t=this.args.field?.triggerable
return e&&(!t||t===e)}get placeholdersString(){return this.args.field.placeholders.join(", ")}get target(){return"script"===this.args.field.targetType?`.scriptables.${this.args.automation.script.id.replace(/-/g,"_")}.`:`.triggerables.${this.args.automation.trigger.id.replace(/-/g,"_")}.`}get translationKey(){return`discourse_automation${this.target}fields.${this.args.field.name}.description`}get description(){return o.default.lookup(this.translationKey)}}e.default=M})),define("discourse/plugins/automation/admin/components/automation-list",["exports","@glimmer/component","@ember/helper","@ember/modifier","@ember/object","@ember/routing","@ember/service","discourse/components/d-button","discourse/components/d-page-subheader","discourse/components/d-toggle-switch","discourse/helpers/avatar","discourse/helpers/format-date","discourse/lib/ajax-error","discourse/lib/utilities","discourse-i18n","admin/components/admin-config-area-empty-list","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u,c,m,p,f,g,b,h){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class _ extends t.default{static#e=(()=>dt7948.g(this.prototype,"dialog",[s.service]))()
#t=(()=>{dt7948.i(this,"dialog")})()
static#o=(()=>dt7948.g(this.prototype,"router",[s.service]))()
#i=(()=>{dt7948.i(this,"router")})()
async destroyAutomation(e){e.set("isDeleting",!0)
try{await this.dialog.deleteConfirm({message:(0,f.i18n)("discourse_automation.destroy_automation.confirm",{name:(0,p.escapeExpression)(e.name)}),didConfirm:()=>{try{e.destroyRecord(),this.args.model.removeObject(e),e=null}catch(t){(0,m.popupAjaxError)(t)}}})}finally{e?.set("isDeleting",!1)}}static#n=(()=>dt7948.n(this.prototype,"destroyAutomation",[n.action]))()
async toggleEnabled(e){e.set("enabled",!e.enabled)
try{await e.save({enabled:e.enabled})}catch(t){(0,m.popupAjaxError)(t),e.set("enabled",!e.enabled)}}static#a=(()=>dt7948.n(this.prototype,"toggleEnabled",[n.action]))()
statsText(e){return e&&e.last_month&&0!==e.last_month.total_runs?e.last_day?.total_runs>10?(0,f.i18n)("discourse_automation.models.automation.runs_today",{count:e.last_day.total_runs}):e.last_week?.total_runs>10?(0,f.i18n)("discourse_automation.models.automation.runs_this_week",{count:e.last_week.total_runs}):(0,f.i18n)("discourse_automation.models.automation.runs_this_month",{count:e.last_month.total_runs}):"-"}static#s=(()=>(0,b.setComponentTemplate)((0,h.createTemplateFactory)({id:"A4dgVdrd",block:'[[[1,"\\n "],[10,"section"],[14,0,"discourse-automations-table"],[12],[1,"\\n "],[8,[32,0],null,[["@titleLabel"],[[28,[32,1],["discourse_automation.table_title"],null]]],[["actions"],[[[[1,"\\n "],[8,[30,1,["Primary"]],[[24,0,"discourse-automation__create-btn"]],[["@label","@route","@icon"],["discourse_automation.create","adminPlugins.show.automation.new","plus"]],null],[1,"\\n "]],[1]]]]],[1,"\\n\\n"],[41,[30,2,["length"]],[[[1," "],[10,"table"],[14,0,"d-admin-table automations"],[12],[1,"\\n "],[10,"thead"],[12],[1,"\\n "],[10,"tr"],[12],[1,"\\n "],[10,"th"],[12],[1,[28,[32,1],["discourse_automation.models.automation.name.label"],null]],[13],[1,"\\n "],[10,"th"],[12],[1,[28,[32,1],["discourse_automation.models.automation.last_updated_by.label"],null]],[13],[1,"\\n "],[10,"th"],[12],[1,[28,[32,1],["discourse_automation.models.automation.runs.label"],null]],[13],[1,"\\n "],[10,"th"],[12],[1,[28,[32,1],["discourse_automation.models.automation.last_run.label"],null]],[13],[1,"\\n "],[10,"th"],[12],[1,[28,[32,1],["discourse_automation.models.automation.enabled.label"],null]],[13],[1,"\\n "],[10,"th"],[12],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,"tbody"],[12],[1,"\\n"],[42,[28,[31,2],[[28,[31,2],[[30,2]],null]],null],null,[[[1," "],[10,"tr"],[14,0,"d-admin-row__content"],[12],[1,"\\n"],[41,[30,3,["script","not_found"]],[[[1," "],[10,"td"],[14,"colspan","5"],[14,0,"d-admin-row__detail alert alert-danger"],[12],[1,"\\n "],[10,0],[14,0,"d-admin-row__mobile-label"],[12],[1,"\\n "],[1,[28,[32,1],["discourse_automation.models.automation.status.label"],null]],[1,"\\n "],[13],[1,"\\n "],[1,[28,[32,1],["discourse_automation.scriptables.not_found"],[["script","automation"],[[30,3,["script","id"]],[30,3,["name"]]]]]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,3,["trigger","not_found"]],[[[1," "],[10,"td"],[14,"colspan","5"],[14,0,"d-admin-row__detail alert alert-danger"],[12],[1,"\\n "],[10,0],[14,0,"d-admin-row__mobile-label"],[12],[1,"\\n "],[1,[28,[32,1],["discourse_automation.models.automation.status.label"],null]],[1,"\\n "],[13],[1,"\\n "],[1,[28,[32,1],["discourse_automation.triggerables.not_found"],[["trigger","automation"],[[30,3,["trigger","id"]],[30,3,["name"]]]]]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[10,"td"],[14,0,"d-admin-row__overview automations__name"],[12],[1,"\\n "],[1,[52,[30,3,["name"]],[30,3,["name"]],[28,[32,1],["discourse_automation.unnamed_automation"],null]]],[1,"\\n "],[13],[1,"\\n "],[10,"td"],[14,0,"d-admin-row__detail automations__updated-by"],[12],[1,"\\n "],[10,0],[14,0,"d-admin-row__mobile-label"],[12],[1,"\\n "],[1,[28,[32,1],["discourse_automation.models.automation.last_updated_by.label"],null]],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"automations__user-timestamp"],[12],[1,"\\n "],[10,3],[15,6,[30,3,["last_updated_by","userPath"]]],[15,"data-user-card",[30,3,["last_updated_by","username"]]],[12],[1,"\\n "],[1,[28,[32,2],[[30,3,["last_updated_by"]]],[["imageSize"],["small"]]]],[1,"\\n "],[13],[1,"\\n "],[1,[28,[32,3],[[30,3,["updated_at"]]],[["leaveAgo"],["true"]]]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,"td"],[14,0,"d-admin-row__detail automations__runs"],[12],[1,"\\n "],[10,0],[14,0,"d-admin-row__mobile-label"],[12],[1,"\\n "],[1,[28,[32,1],["discourse_automation.models.automation.runs.label"],null]],[1,"\\n "],[13],[1,"\\n "],[10,1],[14,0,"automations__stats"],[12],[1,"\\n "],[1,[28,[30,0,["statsText"]],[[30,3,["stats"]]],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,"td"],[14,0,"d-admin-row__detail automations__last-run"],[12],[1,"\\n "],[10,0],[14,0,"d-admin-row__mobile-label"],[12],[1,"\\n "],[1,[28,[32,1],["discourse_automation.models.automation.last_run.label"],null]],[1,"\\n "],[13],[1,"\\n"],[41,[30,3,["stats","last_run_at"]],[[[1," "],[1,[28,[32,3],[[30,3,["stats","last_run_at"]]],[["leaveAgo"],["true"]]]],[1,"\\n"]],[]],[[[1," -\\n"]],[]]],[1," "],[13],[1,"\\n "],[10,"td"],[14,0,"d-admin-row__detail automations__enabled"],[12],[1,"\\n "],[10,0],[14,0,"d-admin-row__mobile-label"],[12],[1,"\\n "],[1,[28,[32,1],["discourse_automation.models.automation.enabled.label"],null]],[1,"\\n "],[13],[1,"\\n "],[8,[32,4],[[4,[32,5],["click",[28,[32,6],[[30,0,["toggleEnabled"]],[30,3]],null]],null]],[["@state"],[[30,3,["enabled"]]]],null],[1,"\\n "],[13],[1,"\\n "]],[]]]],[]]],[1,"\\n "],[10,"td"],[14,0,"d-admin-row__controls automations__controls"],[12],[1,"\\n "],[8,[32,7],[[24,0,"btn btn-default btn-text btn-small"]],[["@route","@model"],["adminPlugins.show.automation.edit",[30,3,["id"]]]],[["default"],[[[[1,"\\n "],[1,[28,[32,1],["discourse_automation.edit"],null]],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[32,8],[[24,0,"btn-small btn-danger automations__delete"],[4,[32,5],["click",[28,[32,6],[[30,0,["destroyAutomation"]],[30,3]],null]],null]],[["@icon","@disabled"],["trash-can",[30,3,["isDeleting"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[3]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[8,[32,9],null,[["@ctaLabel","@ctaRoute","@ctaClass","@emptyLabel"],["discourse_automation.create","adminPlugins.show.automation.new","discourse-automation__create-btn","discourse_automation.no_automation_yet"]],null],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],["actions","@model","automation"],false,["if","each","-track-array"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/automation-list.js",scope:()=>[d.default,f.i18n,u.default,c.default,r.default,i.on,o.fn,a.LinkTo,l.default,g.default],isStrictMode:!0}),this))()}e.default=_})),define("discourse/plugins/automation/admin/components/fields/da-base-field",["exports","@glimmer/component","@ember/object"],(function(e,t,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class i extends t.default{get displayPlaceholders(){return this.args.placeholders?.length&&this.args.field?.acceptsPlaceholders}mutValue(e){this.args.field.metadata.value=e}static#e=(()=>dt7948.n(this.prototype,"mutValue",[o.action]))()}e.default=i})),define("discourse/plugins/automation/admin/components/fields/da-boolean-field",["exports","@ember/component","@ember/modifier","@ember/object","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends n.default{static#e=(()=>(0,t.setComponentTemplate)((0,l.createTemplateFactory)({id:"g0qbp3Go",block:'[[[1,"\\n "],[10,"section"],[14,0,"field boolean-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],[[16,"disabled",[30,2,["isDisabled"]]],[4,[32,2],["input",[30,0,["onInput"]]],null]],[["@type","@checked"],["checkbox",[30,2,["metadata","value"]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-boolean-field.js",scope:()=>[s.default,t.Input,o.on,a.default],isStrictMode:!0}),this))()
onInput(e){this.mutValue(e.target.checked)}static#o=(()=>dt7948.n(this.prototype,"onInput",[i.action]))()}e.default=d})),define("discourse/plugins/automation/admin/components/fields/da-categories-field",["exports","@ember/helper","@ember/object","discourse/models/category","select-kit/components/category-selector","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class u extends a.default{static#e=(()=>(0,d.setComponentTemplate)((0,r.createTemplateFactory)({id:"3OpS3fT0",block:'[[[1,"\\n"],[1," "],[10,"section"],[14,0,"field categories-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@categories","@onChange","@options"],[[30,0,["categories"]],[28,[32,2],[[30,0,["onChangeCategories"]]],null],[28,[32,3],null,[["clearable","disabled"],[true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,4],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-categories-field.js",scope:()=>[l.default,n.default,t.fn,t.hash,s.default],isStrictMode:!0}),this))()
get categories(){return(this.args.field?.metadata?.value||[]).map((e=>i.default.findById(e))).filter(Boolean)}onChangeCategories(e){this.mutValue(e.mapBy("id"))}static#o=(()=>dt7948.n(this.prototype,"onChangeCategories",[o.action]))()}e.default=u})),define("discourse/plugins/automation/admin/components/fields/da-category-field",["exports","@ember/helper","select-kit/components/category-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends i.default{static#e=(()=>(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"sHu+LmQA",block:'[[[1,"\\n "],[10,"section"],[14,0,"field category-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@onChange","@options"],[[30,2,["metadata","value"]],[30,0,["mutValue"]],[28,[32,2],null,[["clearable","disabled"],[true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-category-field.js",scope:()=>[a.default,o.default,t.hash,n.default],isStrictMode:!0}),this))()}e.default=d})),define("discourse/plugins/automation/admin/components/fields/da-category-notification-level-field",["exports","discourse/components/category-notifications-tracking","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class l extends o.default{static#e=(()=>(0,a.setComponentTemplate)((0,s.createTemplateFactory)({id:"EuP8Wj1c",block:'[[[1,"\\n "],[10,"section"],[14,0,"field category-notification-level-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@levelId","@onChange"],[[30,2,["metadata","value"]],[30,0,["mutValue"]]]],null],[1,"\\n\\n "],[8,[32,2],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-category-notification-level-field.js",scope:()=>[n.default,t.default,i.default],isStrictMode:!0}),this))()}e.default=l})),define("discourse/plugins/automation/admin/components/fields/da-choices-field",["exports","@ember/helper","discourse-i18n","select-kit/components/combo-box","select-kit/components/multi-select","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class u extends a.default{static#e=(()=>(0,d.setComponentTemplate)((0,r.createTemplateFactory)({id:"503XLkEH",block:'[[[1,"\\n "],[10,0],[14,0,"field control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n"],[41,[30,0,["multiselect"]],[[[1," "],[8,[32,1],null,[["@value","@content","@onChange","@options"],[[30,2,["metadata","value"]],[30,0,["replacedContent"]],[30,0,["mutValue"]],[28,[32,2],null,[["allowAny","clearable","disabled"],[false,true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n"]],[]],[[[1," "],[8,[32,3],null,[["@value","@content","@onChange","@options"],[[30,2,["metadata","value"]],[30,0,["replacedContent"]],[30,0,["mutValue"]],[28,[32,2],null,[["allowAny","clearable","disabled"],[false,true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n"]],[]]],[1,"\\n "],[8,[32,4],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-choices-field.js",scope:()=>[l.default,n.default,t.hash,i.default,s.default],isStrictMode:!0}),this))()
get multiselect(){return!!this.args.field.extra.multiselect}get replacedContent(){return(this.args.field.extra.content||[]).map((e=>({id:e.id,name:e.translated_name||(0,o.i18n)(e.name)})))}}e.default=u})),define("discourse/plugins/automation/admin/components/fields/da-custom-field",["exports","@glimmer/tracking","@ember/render-modifiers/modifiers/did-insert","@ember/service","discourse/lib/decorators","select-kit/components/combo-box","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class c extends s.default{static#e=(()=>dt7948.g(this.prototype,"store",[i.service]))()
#l=(()=>{dt7948.i(this,"store")})()
static#o=(()=>dt7948.g(this.prototype,"allCustomFields",[t.tracked],(function(){return[]})))()
#d=(()=>{dt7948.i(this,"allCustomFields")})()
static#n=(()=>(0,r.setComponentTemplate)((0,u.createTemplateFactory)({id:"WVh1zE2d",block:'[[[1,"\\n "],[11,"section"],[24,0,"field group-field"],[4,[32,0],[[30,0,["loadUserFields"]]],null],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,1],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,2],null,[["@content","@value","@onChange"],[[30,0,["allCustomFields"]],[30,2,["metadata","value"]],[30,0,["mutValue"]]]],null],[1,"\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-custom-field.js",scope:()=>[o.default,d.default,a.default,l.default],isStrictMode:!0}),this))()
loadUserFields(){this.store.findAll("user-field").then((e=>{this.allCustomFields=e.content}))}static#a=(()=>dt7948.n(this.prototype,"loadUserFields",[n.bind]))()}e.default=c})),define("discourse/plugins/automation/admin/components/fields/da-custom-fields",["exports","@glimmer/tracking","@ember/helper","@ember/render-modifiers/modifiers/did-insert","@ember/service","discourse/lib/decorators","select-kit/components/multi-select","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u,c){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class m extends l.default{static#e=(()=>dt7948.g(this.prototype,"store",[n.service]))()
#l=(()=>{dt7948.i(this,"store")})()
static#o=(()=>dt7948.g(this.prototype,"allCustomFields",[t.tracked],(function(){return[]})))()
#d=(()=>{dt7948.i(this,"allCustomFields")})()
static#n=(()=>(0,u.setComponentTemplate)((0,c.createTemplateFactory)({id:"NMWTfQ7/",block:'[[[1,"\\n "],[11,"section"],[24,0,"field group-field"],[4,[32,0],[[30,0,["loadUserFields"]]],null],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,1],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,2],null,[["@value","@content","@onChange","@nameProperty","@valueProperty","@options"],[[30,2,["metadata","value"]],[30,0,["allCustomFields"]],[30,0,["mutValue"]],null,null,[28,[32,3],null,[["allowAny","disabled"],[false,[30,2,["isDisabled"]]]]]]],null],[1,"\\n "],[8,[32,4],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-custom-fields.js",scope:()=>[i.default,r.default,s.default,o.hash,d.default],isStrictMode:!0}),this))()
loadUserFields(){this.store.findAll("user-field").then((e=>{this.allCustomFields=e.content.map((e=>e.name))}))}static#a=(()=>dt7948.n(this.prototype,"loadUserFields",[a.bind]))()}e.default=m})),define("discourse/plugins/automation/admin/components/fields/da-date-time-field",["exports","@ember/component","@ember/modifier","@ember/object","discourse/components/d-button","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class r extends a.default{static#e=(()=>(0,t.setComponentTemplate)((0,d.createTemplateFactory)({id:"RQD6Q6VM",block:'[[[1,"\\n "],[10,"section"],[14,0,"field date-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"controls-row"],[12],[1,"\\n "],[8,[32,1],[[16,"disabled",[30,2,["isDisabled"]]],[4,[32,2],["input",[30,0,["convertToUniversalTime"]]],null]],[["@type","@value"],["datetime-local",[28,[31,0],[[30,0,["localTime"]]],null]]],null],[1,"\\n\\n"],[41,[30,2,["metadata","value"]],[[[1," "],[8,[32,3],null,[["@icon","@action","@disabled"],["trash-can",[30,0,["reset"]],[30,2,["isDisabled"]]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n\\n "],[8,[32,4],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,["readonly","if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-date-time-field.js",scope:()=>[l.default,t.Input,o.on,n.default,s.default],isStrictMode:!0}),this))()
convertToUniversalTime(e){const t=e.target.value
t&&this.mutValue(moment(t).utc().format())}static#o=(()=>dt7948.n(this.prototype,"convertToUniversalTime",[i.action]))()
reset(){this.mutValue(null)}static#n=(()=>dt7948.n(this.prototype,"reset",[i.action]))()
get localTime(){return this.args.field.metadata.value&&moment(this.args.field.metadata.value).local().format(moment.HTML5_FMT.DATETIME_LOCAL)}}e.default=r})),define("discourse/plugins/automation/admin/components/fields/da-email-group-user-field",["exports","@glimmer/tracking","@ember/helper","@ember/object","select-kit/components/email-group-user-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class u extends a.default{static#e=(()=>dt7948.g(this.prototype,"recipients",[t.tracked]))()
#r=(()=>{dt7948.i(this,"recipients")})()
static#o=(()=>dt7948.g(this.prototype,"groups",[t.tracked],(function(){return[]})))()
#u=(()=>{dt7948.i(this,"groups")})()
static#n=(()=>(0,d.setComponentTemplate)((0,r.createTemplateFactory)({id:"TGAHAnZg",block:'[[[1,"\\n "],[10,"section"],[14,0,"field email-group-user-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@onChange","@options"],[[30,2,["metadata","value"]],[30,0,["mutValue"]],[28,[32,2],null,[["includeGroups","includeMessageableGroups","allowEmails","autoWrap","disabled"],[true,true,true,true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-email-group-user-field.js",scope:()=>[l.default,n.default,o.hash,s.default],isStrictMode:!0}),this))()
updateRecipients(e,t){const o=t.filterBy("isGroup").mapBy("id")
this._updateGroups(e,o),this.recipients=e.join(",")}static#a=(()=>dt7948.n(this.prototype,"updateRecipients",[i.action]))()
_updateGroups(e,t){const o=[]
this.groups.forEach((t=>{e.includes(t)&&o.addObject(t)})),t.forEach((e=>{o.includes(e)||o.addObject(e)})),this.groups=o}}e.default=u})),define("discourse/plugins/automation/admin/components/fields/da-field-description",["exports","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,o,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const n=(0,t.setComponentTemplate)((0,o.createTemplateFactory)({id:"MCmTtvU2",block:'[[[1,"\\n"],[41,[30,1],[[[1," "],[10,2],[14,0,"control-description"],[12],[1,"\\n "],[1,[30,1]],[1,"\\n "],[13],[1,"\\n"]],[]],null]],["@description"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-field-description.js",isStrictMode:!0}),(0,i.default)(void 0,"da-field-description:FieldDescription"))
e.default=n})),define("discourse/plugins/automation/admin/components/fields/da-field-label",["exports","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,o,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const n=(0,t.setComponentTemplate)((0,o.createTemplateFactory)({id:"7yJyfbuN",block:'[[[1,"\\n"],[41,[30,1],[[[1," "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[10,1],[12],[1,"\\n "],[1,[30,1]],[1,"\\n"],[41,[30,2,["isRequired"]],[[[1," *\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null]],["@label","@field"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-field-label.js",isStrictMode:!0}),(0,i.default)(void 0,"da-field-label:FieldLabel"))
e.default=n})),define("discourse/plugins/automation/admin/components/fields/da-group-field",["exports","@glimmer/tracking","@ember/helper","@ember/object","discourse/models/group","select-kit/components/group-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class c extends s.default{static#e=(()=>dt7948.g(this.prototype,"allGroups",[t.tracked],(function(){return[]})))()
#c=(()=>{dt7948.i(this,"allGroups")})()
static#o=(()=>(0,r.setComponentTemplate)((0,u.createTemplateFactory)({id:"FGrKqI4k",block:'[[[1,"\\n "],[10,"section"],[14,0,"field group-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@content","@value","@labelProperty","@onChange","@options"],[[30,0,["allGroups"]],[30,2,["metadata","value"]],"name",[30,0,["setGroupField"]],[28,[32,2],null,[["maximum","disabled"],[1,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-group-field.js",scope:()=>[d.default,a.default,o.hash,l.default],isStrictMode:!0}),this))()
constructor(){super(...arguments),n.default.findAll({ignore_automatic:this.args.field.extra.ignore_automatic??!1}).then((e=>{this.isDestroying||this.isDestroyed||(this.allGroups=e)}))}setGroupField(e){this.mutValue(e?.firstObject)}static#n=(()=>dt7948.n(this.prototype,"setGroupField",[i.action]))()}e.default=c})),define("discourse/plugins/automation/admin/components/fields/da-groups-field",["exports","@glimmer/tracking","@ember/helper","@ember/object","discourse/models/group","select-kit/components/group-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class c extends s.default{static#e=(()=>dt7948.g(this.prototype,"allGroups",[t.tracked],(function(){return[]})))()
#c=(()=>{dt7948.i(this,"allGroups")})()
constructor(){super(...arguments),n.default.findAll({ignore_automatic:this.args.field.extra.ignore_automatic??!1}).then((e=>{this.isDestroying||this.isDestroyed||(this.allGroups=e)}))}get maximum(){return this.args.field.extra.maximum??10}setGroupField(e){this.mutValue(e)}static#o=(()=>dt7948.n(this.prototype,"setGroupField",[i.action]))()
static#n=(()=>(0,r.setComponentTemplate)((0,u.createTemplateFactory)({id:"8PIvbsBy",block:'[[[1,"\\n "],[10,"section"],[14,0,"field group-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@content","@value","@labelProperty","@onChange","@options"],[[30,0,["allGroups"]],[30,2,["metadata","value"]],"name",[30,0,["setGroupField"]],[28,[32,2],null,[["maximum","disabled"],[[30,0,["maximum"]],[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-groups-field.js",scope:()=>[d.default,a.default,o.hash,l.default],isStrictMode:!0}),this))()}e.default=c})),define("discourse/plugins/automation/admin/components/fields/da-key-value-field",["exports","@glimmer/tracking","@ember/helper","@ember/object","discourse/components/d-button","discourse/components/modal/json-schema-editor","discourse-i18n","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u,c){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class m extends l.default{static#e=(()=>dt7948.g(this.prototype,"showJsonEditorModal",[t.tracked],(function(){return!1})))()
#m=(()=>{dt7948.i(this,"showJsonEditorModal")})()
jsonSchema={type:"array",uniqueItems:!0,items:{type:"object",title:"group",properties:{key:{type:"string"},value:{type:"string",format:"textarea"}}}}
static#o=(()=>(0,u.setComponentTemplate)((0,c.createTemplateFactory)({id:"WU6hREdJ",block:'[[[1,"\\n "],[10,"section"],[14,0,"field key-value-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],[[24,0,"configure-btn"]],[["@action"],[[30,0,["openModal"]]]],[["default"],[[[[1,"\\n "],[1,[30,0,["showJsonModalLabel"]]],[1,"\\n "]],[]]]]],[1,"\\n\\n"],[41,[30,0,["showJsonEditorModal"]],[[[1," "],[8,[32,2],null,[["@model","@closeModal"],[[28,[32,3],null,[["value","updateValue","settingName","jsonSchema"],[[30,0,["value"]],[30,0,["handleValueChange"]],[30,1],[30,0,["jsonSchema"]]]]],[30,0,["closeModal"]]]],null],[1,"\\n"]],[]],null],[1,"\\n "],[8,[32,4],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-key-value-field.js",scope:()=>[r.default,n.default,a.default,o.hash,d.default],isStrictMode:!0}),this))()
get value(){return this.args.field.metadata.value||'[{"key":"example","value":"You posted {{key}}"}]'}get keyCount(){return this.args.field.metadata.value?JSON.parse(this.value).length:0}get showJsonModalLabel(){return 0===this.keyCount?(0,s.i18n)("discourse_automation.fields.key_value.label_without_count"):(0,s.i18n)("discourse_automation.fields.key_value.label_with_count",{count:this.keyCount})}handleValueChange(e){e!==this.args.field.metadata.value&&(this.mutValue(e),this.args.saveAutomation())}static#n=(()=>dt7948.n(this.prototype,"handleValueChange",[i.action]))()
openModal(){this.showJsonEditorModal=!0}static#a=(()=>dt7948.n(this.prototype,"openModal",[i.action]))()
closeModal(){this.showJsonEditorModal=!1}static#s=(()=>dt7948.n(this.prototype,"closeModal",[i.action]))()}e.default=m})),define("discourse/plugins/automation/admin/components/fields/da-message-field",["exports","@ember/legacy-built-in-components","@ember/object","discourse/plugins/automation/admin/components/placeholders-list","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class r extends n.default{static#e=(()=>(0,l.setComponentTemplate)((0,d.createTemplateFactory)({id:"/V7ZxEcC",block:'[[[1,"\\n "],[10,"section"],[14,0,"field message-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"field-wrapper"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@input","@disabled"],[[30,2,["metadata","value"]],[30,0,["updateValue"]],[30,2,["isDisabled"]]]],null],[1,"\\n "],[8,[32,2],null,[["@description"],[[30,3]]],null],[1,"\\n\\n"],[41,[30,0,["displayPlaceholders"]],[[[1," "],[8,[32,3],null,[["@currentValue","@placeholders","@onCopy"],[[30,2,["metadata","value"]],[30,4],[30,0,["mutValue"]]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description","@placeholders"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-message-field.js",scope:()=>[s.default,t.TextArea,a.default,i.default],isStrictMode:!0}),this))()
updateValue(e){this.mutValue(e.target.value)}static#o=(()=>dt7948.n(this.prototype,"updateValue",[o.action]))()}e.default=r})),define("discourse/plugins/automation/admin/components/fields/da-period-field",["exports","@glimmer/tracking","@ember/component","@ember/helper","@ember/modifier","@ember/object","@ember/runloop","@ember-compat/tracked-built-ins","discourse-i18n","select-kit/components/combo-box","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u,c,m,p){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class f extends u.default{static#e=(()=>dt7948.g(this.prototype,"interval",[t.tracked],(function(){return 1})))()
#p=(()=>{dt7948.i(this,"interval")})()
static#o=(()=>dt7948.g(this.prototype,"frequency",[t.tracked],(function(){return null})))()
#f=(()=>{dt7948.i(this,"frequency")})()
constructor(){super(...arguments),(0,s.next)((()=>{this.args.field.metadata.value||(this.args.field.metadata.value=new l.TrackedObject({interval:1,frequency:null})),this.interval=this.args.field.metadata.value.interval,this.frequency=this.args.field.metadata.value.frequency}))}get recurringLabel(){return(0,d.i18n)("discourse_automation.triggerables.recurring.every")}get replacedContent(){return(this.args.field?.extra?.content||[]).map((e=>({id:e.id,name:(0,d.i18n)(e.name)})))}mutInterval(e){this.args.field.metadata.value.interval=e.target.value}static#n=(()=>dt7948.n(this.prototype,"mutInterval",[a.action]))()
mutFrequency(e){this.args.field.metadata.value.frequency=e,this.frequency=e}static#a=(()=>dt7948.n(this.prototype,"mutFrequency",[a.action]))()
static#s=(()=>(0,o.setComponentTemplate)((0,p.createTemplateFactory)({id:"57RHrhW/",block:'[[[1,"\\n "],[10,0],[14,0,"field period-field control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[1,[30,0,["recurringLabel"]]],[1,"\\n\\n "],[8,[32,1],[[24,"defaultValue","1"],[16,"disabled",[30,2,["isDisabled"]]],[16,"required",[30,2,["isRequired"]]],[4,[32,2],["input",[30,0,["mutInterval"]]],null]],[["@type","@value"],["number",[30,0,["interval"]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@value","@content","@onChange","@options","@required"],[[30,0,["frequency"]],[30,0,["replacedContent"]],[30,0,["mutFrequency"]],[28,[32,4],null,[["allowAny","disabled"],[false,[30,2,["isDisabled"]]]]],[30,2,["isRequired"]]]],null],[1,"\\n\\n "],[8,[32,5],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-period-field.js",scope:()=>[m.default,o.Input,n.on,r.default,i.hash,c.default],isStrictMode:!0}),this))()}e.default=f})),define("discourse/plugins/automation/admin/components/fields/da-pms-field",["exports","@ember/component","@ember/helper","@ember/modifier","@ember/object","@ember/runloop","@ember/service","@ember-compat/tracked-built-ins","discourse/components/d-button","discourse/components/d-editor","discourse-i18n","discourse/plugins/automation/admin/components/placeholders-list","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r,u,c,m,p,f){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class g extends m.default{static#e=(()=>dt7948.g(this.prototype,"dialog",[s.service]))()
#t=(()=>{dt7948.i(this,"dialog")})()
noPmCreatedLabel=(()=>(0,u.i18n)("discourse_automation.fields.pms.no_pm_created"))()
prefersEncryptLabel=(()=>(0,u.i18n)("discourse_automation.fields.pms.prefers_encrypt.label"))()
delayLabel=(()=>(0,u.i18n)("discourse_automation.fields.pms.delay.label"))()
pmTitleLabel=(()=>(0,u.i18n)("discourse_automation.fields.pms.title.label"))()
rawLabel=(()=>(0,u.i18n)("discourse_automation.fields.pms.raw.label"))()
static#o=(()=>(0,t.setComponentTemplate)((0,f.createTemplateFactory)({id:"D8SZe/P8",block:'[[[1,"\\n "],[10,"section"],[14,0,"field pms-field"],[12],[1,"\\n"],[41,[30,1,["metadata","value","length"]],[[[1," "],[10,"section"],[14,0,"actions header"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,2],[30,1]]],null],[1,"\\n "],[8,[32,1],[[24,0,"btn-primary insert-pm"]],[["@icon","@action"],["plus",[30,0,["insertPM"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[42,[28,[31,2],[[28,[31,2],[[30,1,["metadata","value"]]],null]],null],null,[[[1," "],[10,0],[14,0,"pm-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,0,["pmTitleLabel"]],[30,1]]],null],[1,"\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"field-wrapper"],[12],[1,"\\n "],[8,[32,2],[[16,1,[28,[32,3],[[30,1,["targetType"]],[30,1,["name"]],"title"],null]],[24,0,"pm-input pm-title"],[16,"disabled",[30,1,["isDisabled"]]],[16,3,[30,1,["name"]]],[4,[32,4],["input",[28,[32,5],[[30,0,["mutPmTitle"]],[30,3]],null]],null]],[["@value"],[[30,3,["title"]]]],null],[1,"\\n\\n"],[41,[30,0,["displayPlaceholders"]],[[[1," "],[8,[32,6],null,[["@currentValue","@placeholders","@onCopy"],[[30,3,["title"]],[30,4],[28,[32,5],[[30,0,["updatePmTitle"]],[30,3]],null]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,0,["rawLabel"]],[30,1]]],null],[1,"\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"field-wrapper"],[12],[1,"\\n "],[8,[32,7],null,[["@value"],[[30,3,["raw"]]]],null],[1,"\\n\\n"],[41,[30,0,["displayPlaceholders"]],[[[1," "],[8,[32,6],null,[["@currentValue","@placeholders","@onCopy"],[[30,3,["raw"]],[30,4],[28,[32,5],[[30,0,["updatePmRaw"]],[30,3]],null]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[1,[30,0,["delayLabel"]]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,2],[[24,0,"input-large pm-input pm-delay"],[16,"disabled",[30,1,["isDisabled"]]],[4,[32,4],["input",[28,[32,5],[[30,0,["mutPmDelay"]],[30,3]],null]],null]],[["@value"],[[30,3,["delay"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[1,[30,0,["prefersEncryptLabel"]]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,2],[[24,0,"pm-prefers-encrypt"],[16,"disabled",[30,1,["isDisabled"]]],[4,[32,4],["click",[28,[32,5],[[30,0,["prefersEncrypt"]],[30,3]],null]],null]],[["@type","@checked"],["checkbox",[30,3,["prefers_encrypt"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,"section"],[14,0,"actions"],[12],[1,"\\n "],[8,[32,1],[[24,0,"btn-danger"]],[["@icon","@action","@disabled"],["trash-can",[28,[32,5],[[30,0,["removePM"]],[30,3]],null],[30,1,["isDisabled"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[3]],[[[1," "],[10,0],[14,0,"no-pm"],[12],[1,"\\n "],[10,2],[12],[1,[30,0,["noPmCreatedLabel"]]],[13],[1,"\\n "],[8,[32,1],[[24,0,"btn-primary insert-pm"]],[["@icon","@label","@action","@disabled"],["plus","discourse_automation.fields.pms.add_pm",[30,0,["insertPM"]],[30,1,["isDisabled"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],["@field","@label","pm","@placeholders"],false,["if","each","-track-array"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-pms-field.js",scope:()=>[p.default,d.default,t.Input,o.concat,i.on,o.fn,c.default,r.default],isStrictMode:!0}),this))()
constructor(){super(...arguments),(0,a.next)((()=>{this.args.field.metadata.value=new l.TrackedArray((this.args.field.metadata.value||[]).map((e=>new l.TrackedObject(e))))}))}removePM(e){this.dialog.yesNoConfirm({message:(0,u.i18n)("discourse_automation.fields.pms.confirm_remove_pm"),didConfirm:()=>this.args.field.metadata.value.removeObject(e)})}static#n=(()=>dt7948.n(this.prototype,"removePM",[n.action]))()
insertPM(){this.args.field.metadata.value.pushObject(new l.TrackedObject({title:"",raw:"",delay:0,prefers_encrypt:!0}))}static#a=(()=>dt7948.n(this.prototype,"insertPM",[n.action]))()
prefersEncrypt(e,t){e.prefers_encrypt=t.target.checked}static#s=(()=>dt7948.n(this.prototype,"prefersEncrypt",[n.action]))()
mutPmTitle(e,t){e.title=t.target.value}static#g=(()=>dt7948.n(this.prototype,"mutPmTitle",[n.action]))()
mutPmDelay(e,t){e.delay=t.target.value}static#b=(()=>dt7948.n(this.prototype,"mutPmDelay",[n.action]))()
updatePmRaw(e,t){e.raw=t}static#h=(()=>dt7948.n(this.prototype,"updatePmRaw",[n.action]))()
updatePmTitle(e,t){e.title=t}static#_=(()=>dt7948.n(this.prototype,"updatePmTitle",[n.action]))()}e.default=g})),define("discourse/plugins/automation/admin/components/fields/da-post-field",["exports","discourse/components/d-editor","discourse/plugins/automation/admin/components/placeholders-list","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends i.default{static#e=(()=>(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"ydr9jWFs",block:'[[[1,"\\n "],[10,"section"],[14,0,"field post-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"field-wrapper"],[12],[1,"\\n "],[8,[32,1],null,[["@value"],[[30,2,["metadata","value"]]]],null],[1,"\\n\\n "],[8,[32,2],null,[["@description"],[[30,3]]],null],[1,"\\n\\n"],[41,[30,0,["displayPlaceholders"]],[[[1," "],[8,[32,3],null,[["@currentValue","@placeholders","@onCopy"],[[30,2,["metadata","value"]],[30,4],[30,0,["mutValue"]]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description","@placeholders"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-post-field.js",scope:()=>[a.default,t.default,n.default,o.default],isStrictMode:!0}),this))()}e.default=d})),define("discourse/plugins/automation/admin/components/fields/da-tags-field",["exports","@ember/helper","select-kit/components/tag-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends i.default{static#e=(()=>(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"OUWf5PBk",block:'[[[1,"\\n "],[10,"section"],[14,0,"field tags-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@tags","@options"],[[30,2,["metadata","value"]],[28,[32,2],null,[["allowAny","disabled"],[false,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-tags-field.js",scope:()=>[a.default,o.default,t.hash,n.default],isStrictMode:!0}),this))()}e.default=d})),define("discourse/plugins/automation/admin/components/fields/da-text-field",["exports","@ember/component","@ember/modifier","@ember/object","discourse/plugins/automation/admin/components/placeholders-list","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class r extends a.default{static#e=(()=>(0,t.setComponentTemplate)((0,d.createTemplateFactory)({id:"4jkM1WOw",block:'[[[1,"\\n "],[10,"section"],[14,0,"field text-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"field-wrapper"],[12],[1,"\\n "],[8,[32,1],[[16,"disabled",[30,2,["isDisabled"]]],[16,3,[30,2,["name"]]],[4,[32,2],["input",[30,0,["mutText"]]],null]],[["@value"],[[30,2,["metadata","value"]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n\\n"],[41,[30,0,["displayPlaceholders"]],[[[1," "],[8,[32,4],null,[["@currentValue","@placeholders","@onCopy"],[[30,2,["metadata","value"]],[30,4],[30,0,["mutValue"]]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description","@placeholders"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-text-field.js",scope:()=>[l.default,t.Input,o.on,s.default,n.default],isStrictMode:!0}),this))()
mutText(e){this.mutValue(e.target.value)}static#o=(()=>dt7948.n(this.prototype,"mutText",[i.action]))()}e.default=r})),define("discourse/plugins/automation/admin/components/fields/da-text-list-field",["exports","@ember/helper","select-kit/components/multi-select","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends i.default{static#e=(()=>(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"rnBvEpbY",block:'[[[1,"\\n "],[10,"section"],[14,0,"field text-list-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@content","@onChange","@nameProperty","@valueProperty","@options"],[[30,2,["metadata","value"]],[30,2,["metadata","value"]],[30,0,["mutValue"]],null,null,[28,[32,2],null,[["allowAny","disabled"],[true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-text-list-field.js",scope:()=>[a.default,o.default,t.hash,n.default],isStrictMode:!0}),this))()}e.default=d})),define("discourse/plugins/automation/admin/components/fields/da-trust-levels-field",["exports","@ember/service","select-kit/components/multi-select","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends i.default{static#e=(()=>dt7948.g(this.prototype,"site",[t.service]))()
#y=(()=>{dt7948.i(this,"site")})()
static#o=(()=>(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"LcXDWUhl",block:'[[[1,"\\n "],[10,"section"],[14,0,"field category-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@content","@onChange"],[[30,2,["metadata","value"]],[30,0,["site","trustLevels"]],[30,0,["mutValue"]]]],null],[1,"\\n\\n "],[8,[32,2],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-trust-levels-field.js",scope:()=>[a.default,o.default,n.default],isStrictMode:!0}),this))()}e.default=d})),define("discourse/plugins/automation/admin/components/fields/da-user-field",["exports","@ember/helper","@ember/object","discourse-i18n","select-kit/components/user-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d,r){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class u extends a.default{onChangeUsername(e){this.mutValue(e[0])}static#e=(()=>dt7948.n(this.prototype,"onChangeUsername",[o.action]))()
modifyContent(e,t){return t=e.acceptedContexts.map((t=>({name:(0,i.i18n)(`discourse_automation.scriptables.${e.targetName}.fields.${e.name}.${t}_context`),username:t}))).concat(t)}static#o=(()=>dt7948.n(this.prototype,"modifyContent",[o.action]))()
static#n=(()=>(0,d.setComponentTemplate)((0,r.createTemplateFactory)({id:"T7RLxSRc",block:'[[[1,"\\n "],[10,"section"],[14,0,"field user-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@onChange","@modifyContent","@options"],[[30,2,["metadata","value"]],[30,0,["onChangeUsername"]],[28,[32,2],[[30,0,["modifyContent"]],[30,2]],null],[28,[32,3],null,[["maximum","excludeCurrentUser","disabled"],[1,false,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,4],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-user-field.js",scope:()=>[l.default,n.default,t.fn,t.hash,s.default],isStrictMode:!0}),this))()}e.default=u}))
define("discourse/plugins/automation/admin/components/fields/da-user-profile-field",["exports","@glimmer/tracking","@ember/helper","select-kit/components/multi-select","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class r extends n.default{static#e=(()=>dt7948.g(this.prototype,"allProfileFields",[t.tracked],(function(){return[]})))()
#v=(()=>{dt7948.i(this,"allProfileFields")})()
userProfileFields=["bio_raw","website","location","date_of_birth","timezone"]
static#o=(()=>(0,l.setComponentTemplate)((0,d.createTemplateFactory)({id:"wcpH/QIT",block:'[[[1,"\\n "],[10,"section"],[14,0,"field group-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@content","@onChange","@nameProperty","@valueProperty","@options"],[[30,2,["metadata","value"]],[30,0,["userProfileFields"]],[30,0,["mutValue"]],null,null,[28,[32,2],null,[["allowAny","disabled"],[true,[30,2,["isDisabled"]]]]]]],null],[1,"\\n\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-user-profile-field.js",scope:()=>[s.default,i.default,o.hash,a.default],isStrictMode:!0}),this))()}e.default=r})),define("discourse/plugins/automation/admin/components/fields/da-users-field",["exports","@ember/helper","select-kit/components/user-chooser","discourse/plugins/automation/admin/components/fields/da-base-field","discourse/plugins/automation/admin/components/fields/da-field-description","discourse/plugins/automation/admin/components/fields/da-field-label","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s,l){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class d extends i.default{static#e=(()=>(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"H4iZkYKs",block:'[[[1,"\\n "],[10,"section"],[14,0,"field users-field"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[32,0],null,[["@label","@field"],[[30,1],[30,2]]],null],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[32,1],null,[["@value","@onChange","@options"],[[30,2,["metadata","value"]],[30,0,["mutValue"]],[28,[32,2],null,[["excludeCurrentUser","disabled","allowEmails"],[false,[30,2,["isDisabled"]],true]]]]],null],[1,"\\n\\n"],[41,[30,2,["metadata","allowsAutomation"]],[[[1," "],[10,1],[14,0,"help-inline error"],[12],[1,[30,2,["metadata","error"]]],[13],[1,"\\n"]],[]],null],[1,"\\n "],[8,[32,3],null,[["@description"],[[30,3]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@label","@field","@description"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/fields/da-users-field.js",scope:()=>[a.default,o.default,t.hash,n.default],isStrictMode:!0}),this))()}e.default=d})),define("discourse/plugins/automation/admin/components/placeholders-list",["exports","@glimmer/component","@ember/helper","@ember/object","discourse/components/d-button","@ember/component","@ember/template-factory"],(function(e,t,o,i,n,a,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class l extends t.default{static#e=(()=>(0,a.setComponentTemplate)((0,s.createTemplateFactory)({id:"nlyIXRZV",block:'[[[1,"\\n "],[10,0],[14,0,"placeholders-list"],[12],[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,1]],null]],null],null,[[[1," "],[8,[32,0],[[24,0,"placeholder-item"]],[["@translatedLabel","@action"],[[30,2],[28,[32,1],[[30,0,["copyPlaceholder"]],[30,2]],null]]],null],[1,"\\n"]],[2]],null],[1," "],[13],[1,"\\n "]],["@placeholders","placeholder"],false,["each","-track-array"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/automation/admin/components/placeholders-list.js",scope:()=>[n.default,o.fn],isStrictMode:!0}),this))()
copyPlaceholder(e){this.args.onCopy(`${this.args.currentValue||""}{{${e}}}`)}static#o=(()=>dt7948.n(this.prototype,"copyPlaceholder",[i.action]))()}e.default=l})),define("discourse/plugins/automation/admin/initializers/discourse-automation",["exports","discourse/lib/ajax","discourse/lib/ajax-error","discourse/lib/helpers","discourse/lib/plugin-api"],(function(e,t,o,i,n){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
let a={}
function s(e){(0,t.ajax)(`/append-last-checked-by/${e.currentTarget.postId}`,{type:"PUT"}).catch(o.popupAjaxError)}function l(){Object.values(a||{}).forEach((e=>{e.removeEventListener("click",s)})),a={}}function d(e){(function(e){const n=e.getCurrentUser();(0,i.makeArray)(n?.global_notices).forEach((i=>{e.addGlobalNotice("",i.identifier,{html:i.notice,level:i.level,dismissable:!0,dismissDuration:moment.duration(1,"week"),onDismiss(){(0,t.ajax)(`/user-global-notices/${i.id}.json`,{type:"DELETE"}).catch(o.popupAjaxError)}})}))})(e),e.getCurrentUser()&&(e.decorateCookedElement(r,{id:"discourse-automation"}),e.cleanupStream(l))}function r(e,t){if(!t)return
const o=e.querySelectorAll(".btn-checked"),i=t.getModel()
Array.from(o).forEach((e=>{const t=i.id
e.postId=t,a[t]&&(a[t].removeEventListener("click",s,!1),delete a[t]),a[t]=e,e.addEventListener("click",s,!1)}))}e.default={name:"discourse-automation",initialize(){(0,n.withPluginApi)("0.8.24",d)}}})),define("discourse/plugins/automation/admin/lib/fabricators",["exports","@ember/application/instance","@ember/owner","discourse/lib/fabricators","discourse/plugins/automation/admin/models/discourse-automation-automation","discourse/plugins/automation/admin/models/discourse-automation-field"],(function(e,t,o,i,n,a){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=class{constructor(e){if(e&&!(e instanceof t.default))throw new Error("First argument of AutomationFabricators constructor must be the owning ApplicationInstance");(0,o.setOwner)(this,e)}field(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const t=e.template||{}
return t.accepts_placeholders=e.accepts_placeholders??!0,t.accepted_contexts=e.accepted_contexts??[],t.name=e.name??"name",t.component=e.component??"boolean",t.value=e.value??!1,t.is_required=e.is_required??!1,t.extra=e.extra??{},a.default.create(t,{type:e.target??"script",name:"script_name"})}automation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const t=new n.default
return t.id=e.id||(0,i.incrementSequence)(),t.trigger={id:(0,i.incrementSequence)().toString()},t.script={id:(0,i.incrementSequence)().toString()},t}}})),define("discourse/plugins/automation/admin/models/discourse-automation-automation",["exports","discourse/models/rest"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const o=["name","script","fields","trigger","id"]
class i extends t.default{updateProperties(){return{id:this.id,name:this.name,fields:this.fields,script:this.script.id,trigger:{id:this.trigger.id,name:this.trigger.name,metadata:this.trigger.metadata}}}createProperties(){return this.getProperties(o)}}e.default=i})),define("discourse/plugins/automation/admin/models/discourse-automation-field",["exports","@glimmer/tracking","@ember-compat/tracked-built-ins"],(function(e,t,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class i{static create(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
const a=new i
return a.acceptsPlaceholders=e.accepts_placeholders,a.acceptedContexts=e.accepted_contexts,a.targetName=t.name,a.targetType=t.type,a.name=e.name,a.component=e.component,a.isDisabled=e.read_only,a.isDisabled?a.metadata.value=e.default_value||e.value||n?.metadata?.value:a.metadata.value=e.value||n?.metadata?.value||e.default_value,null===a.metadata.value&&(a.metadata.value=void 0),a.isRequired=e.is_required,a.extra=new o.TrackedObject(e.extra),a}static#e=(()=>dt7948.g(this.prototype,"acceptsPlaceholders",[t.tracked],(function(){return!1})))()
#w=(()=>{dt7948.i(this,"acceptsPlaceholders")})()
static#o=(()=>dt7948.g(this.prototype,"component",[t.tracked]))()
#x=(()=>{dt7948.i(this,"component")})()
static#n=(()=>dt7948.g(this.prototype,"extra",[t.tracked],(function(){return new o.TrackedObject})))()
#j=(()=>{dt7948.i(this,"extra")})()
static#a=(()=>dt7948.g(this.prototype,"isDisabled",[t.tracked],(function(){return!1})))()
#T=(()=>{dt7948.i(this,"isDisabled")})()
static#s=(()=>dt7948.g(this.prototype,"isRequired",[t.tracked],(function(){return!1})))()
#k=(()=>{dt7948.i(this,"isRequired")})()
static#g=(()=>dt7948.g(this.prototype,"metadata",[t.tracked],(function(){return new o.TrackedObject})))()
#P=(()=>{dt7948.i(this,"metadata")})()
static#b=(()=>dt7948.g(this.prototype,"name",[t.tracked]))()
#C=(()=>{dt7948.i(this,"name")})()
static#h=(()=>dt7948.g(this.prototype,"targetType",[t.tracked]))()
#F=(()=>{dt7948.i(this,"targetType")})()
static#_=(()=>dt7948.g(this.prototype,"targetName",[t.tracked]))()
#M=(()=>{dt7948.i(this,"targetName")})()
toJSON(){return{name:this.name,target:this.targetType,component:this.component,metadata:this.metadata}}}e.default=i})),define("discourse/plugins/automation/admin/models/discourse-automation-script",["exports","discourse/models/rest"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class o extends t.default{}e.default=o})),define("discourse/plugins/automation/admin/templates/components/form-error",["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:"8KZ4LFW2",block:'[[[41,[30,1],[[[1," "],[10,0],[14,0,"alert alert-error form-errors"],[12],[1,"\\n "],[1,[28,[35,2],[[30,1]],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null]],["@error"],false,["if","div","html-safe"]]',moduleName:"discourse/plugins/automation/admin/templates/components/form-error.hbs",isStrictMode:!1})})),define("discourse/plugins/automation/admin/templates/components/topic-trigger",["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:"TRQYq+jN",block:'[[[10,0],[14,0,"control-group"],[12],[1,"\\n "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[1,[28,[35,2],["discourse_automation.triggerables.topic.topic_id.label"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[39,3],[[4,[38,4],["input",[28,[37,5],[[30,0],[28,[37,6],[[30,0,["metadata","topic_id"]]],null]],[["value"],["target.value"]]]],null]],[["@value"],[[30,0,["metadata","topic_id"]]]],null],[1,"\\n "],[13],[1,"\\n"],[13]],[],false,["div","label","i18n","input","on","action","mut"]]',moduleName:"discourse/plugins/automation/admin/templates/components/topic-trigger.hbs",isStrictMode:!1})})),define("discourse/plugins/automation/discourse/controllers/admin-plugins/show/automation/edit",["exports","@ember/controller","@ember/object","@ember/object/computed","@ember/runloop","@ember/service","discourse/lib/ajax","discourse/lib/ajax-error","discourse-i18n"],(function(e,t,o,i,n,a,s,l,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class r extends t.default{static#e=(()=>dt7948.g(this.prototype,"dialog",[a.service]))()
#t=(()=>{dt7948.i(this,"dialog")})()
static#o=(()=>dt7948.g(this.prototype,"router",[a.service]))()
#i=(()=>{dt7948.i(this,"router")})()
error=null
isUpdatingAutomation=!1
isTriggeringAutomation=!1
static#n=(()=>dt7948.g(this.prototype,"automation",[(0,i.reads)("model.automation")]))()
#A=(()=>{dt7948.i(this,"automation")})()
static#a=(()=>dt7948.g(this.prototype,"scriptFields",[(0,i.filterBy)("automationForm.fields","targetType","script")]))()
#O=(()=>{dt7948.i(this,"scriptFields")})()
static#s=(()=>dt7948.g(this.prototype,"triggerFields",[(0,i.filterBy)("automationForm.fields","targetType","trigger")]))()
#S=(()=>{dt7948.i(this,"triggerFields")})()
get nextPendingAutomationAtFormatted(){const e=this.model?.automation?.next_pending_automation_at
if(e)return moment(e).format("LLLL")}static#g=(()=>dt7948.n(this.prototype,"nextPendingAutomationAtFormatted",[(0,o.computed)("model.automation.next_pending_automation_at")]))()
saveAutomation(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
return this.setProperties({error:null,isUpdatingAutomation:!0}),(0,s.ajax)(`/admin/plugins/automation/automations/${this.model.automation.id}.json`,{type:"PUT",data:JSON.stringify({automation:this.automationForm}),dataType:"json",contentType:"application/json"}).then((()=>{this.send("refreshRoute"),e&&this.router.transitionTo("adminPlugins.show.automation.index")})).catch((e=>this._showError(e))).finally((()=>{this.set("isUpdatingAutomation",!1)}))}static#b=(()=>dt7948.n(this.prototype,"saveAutomation",[o.action]))()
onChangeTrigger(e){this.automationForm.trigger&&this.automationForm.trigger!==e?this._confirmReset((()=>{(0,o.set)(this.automationForm,"trigger",e),this.saveAutomation()})):this.automationForm.trigger||((0,o.set)(this.automationForm,"trigger",e),this.saveAutomation())}static#h=(()=>dt7948.n(this.prototype,"onChangeTrigger",[o.action]))()
onManualAutomationTrigger(e){this._confirmTrigger((()=>(this.set("isTriggeringAutomation",!0),(0,s.ajax)(`/automations/${e}/trigger.json`,{type:"post"}).catch((e=>this.set("error",(0,l.extractError)(e)))).finally((()=>{this.set("isTriggeringAutomation",!1)})))))}static#_=(()=>dt7948.n(this.prototype,"onManualAutomationTrigger",[o.action]))()
onChangeScript(e){this.automationForm.script!==e&&this._confirmReset((()=>{(0,o.set)(this.automationForm,"script",e),this.saveAutomation()}))}static#N=(()=>dt7948.n(this.prototype,"onChangeScript",[o.action]))()
_confirmReset(e){this.dialog.yesNoConfirm({message:(0,d.i18n)("discourse_automation.confirm_automation_reset"),didConfirm:()=>e&&e()})}_confirmTrigger(e){this.dialog.yesNoConfirm({message:(0,d.i18n)("discourse_automation.confirm_automation_trigger"),didConfirm:()=>e&&e()})}_showError(e){this.set("error",(0,l.extractError)(e)),(0,n.schedule)("afterRender",(()=>{window.scrollTo(0,0)}))}}e.default=r})),define("discourse/plugins/automation/discourse/controllers/admin-plugins/show/automation/index",["exports","@ember/controller","@ember/object","@ember/service","discourse/lib/ajax-error","discourse/lib/escape","discourse-i18n"],(function(e,t,o,i,n,a,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class l extends t.default{static#e=(()=>dt7948.g(this.prototype,"dialog",[i.service]))()
#t=(()=>{dt7948.i(this,"dialog")})()
static#o=(()=>dt7948.g(this.prototype,"router",[i.service]))()
#i=(()=>{dt7948.i(this,"router")})()
editAutomation(e){this.router.transitionTo("adminPlugins.show.automation.edit",e.id)}static#n=(()=>dt7948.n(this.prototype,"editAutomation",[o.action]))()
newAutomation(){this.router.transitionTo("adminPlugins.show.automation.new")}static#a=(()=>dt7948.n(this.prototype,"newAutomation",[o.action]))()
destroyAutomation(e){this.dialog.deleteConfirm({message:(0,s.i18n)("discourse_automation.destroy_automation.confirm",{name:(0,a.default)(e.name)}),didConfirm:()=>e.destroyRecord().then((()=>this.send("triggerRefresh"))).catch(n.popupAjaxError)})}static#s=(()=>dt7948.n(this.prototype,"destroyAutomation",[o.action]))()}e.default=l})),define("discourse/plugins/automation/discourse/controllers/admin-plugins/show/automation/new",["exports","@glimmer/tracking","@ember/controller","@ember/object","@ember/service"],(function(e,t,o,i,n){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class a extends o.default{static#e=(()=>dt7948.g(this.prototype,"router",[n.service]))()
#i=(()=>{dt7948.i(this,"router")})()
static#o=(()=>dt7948.g(this.prototype,"filterText",[t.tracked],(function(){return""})))()
#E=(()=>{dt7948.i(this,"filterText")})()
updateFilterText(e){this.filterText=e.target.value}static#n=(()=>dt7948.n(this.prototype,"updateFilterText",[i.action]))()
resetFilterText(){this.filterText=""}static#a=(()=>dt7948.n(this.prototype,"resetFilterText",[i.action]))()
get scriptableContent(){let e=this.model.scriptables.content,t=this.filterText.toLowerCase()
return t?e.filter((e=>{const o=e.name?e.name.toLowerCase():"",i=e.description?e.description.toLowerCase():""
return o.includes(t)||i.includes(t)})):e}selectScriptToEdit(e){this.model.automation.save({script:e.id}).then((()=>{this.router.transitionTo("adminPlugins.show.automation.edit",this.model.automation.id)}))}static#s=(()=>dt7948.n(this.prototype,"selectScriptToEdit",[i.action]))()}e.default=a})),define("discourse/plugins/automation/discourse/routes/admin-plugins/show/automation/edit",["exports","@ember/object","rsvp","discourse/lib/ajax","discourse/routes/discourse","discourse/plugins/automation/admin/models/discourse-automation-field"],(function(e,t,o,i,n,a){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class s extends n.default{model(e){return(0,o.hash)({scriptables:this.store.findAll("discourse-automation-scriptable").then((e=>e.content)),triggerables:(0,i.ajax)(`/admin/plugins/automation/triggerables.json?automation_id=${e.id}`).then((e=>e?e.triggerables:[])),automation:this.store.find("discourse-automation-automation",e.id)})}_fieldsForTarget(e,t){return(e[t].templates||[]).map((o=>{const i=e[t].fields.find((e=>e.name===o.name&&e.component===o.component))
return a.default.create(o,{name:e[t].id,type:t},i)}))}setupController(e,t){const o=t.automation
e.setProperties({model:t,error:null,automationForm:{name:o.name,enabled:o.enabled,trigger:o.trigger?.id,script:o.script?.id,fields:this._fieldsForTarget(o,"script").concat(this._fieldsForTarget(o,"trigger"))}})}refreshRoute(){return this.refresh()}static#e=(()=>dt7948.n(this.prototype,"refreshRoute",[t.action]))()}e.default=s})),define("discourse/plugins/automation/discourse/routes/admin-plugins/show/automation/index",["exports","@ember/object","@ember/service","discourse/routes/discourse"],(function(e,t,o,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class n extends i.default{static#e=(()=>dt7948.g(this.prototype,"router",[o.service]))()
#i=(()=>{dt7948.i(this,"router")})()
model(){return this.store.findAll("discourse-automation-automation")}triggerRefresh(){this.refresh()}static#o=(()=>dt7948.n(this.prototype,"triggerRefresh",[t.action]))()}e.default=n})),define("discourse/plugins/automation/discourse/routes/admin-plugins/show/automation/new",["exports","rsvp","discourse/routes/discourse"],(function(e,t,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
class i extends o.default{model(){return(0,t.hash)({scripts:this.store.findAll("discourse-automation-automation"),scriptables:this.store.findAll("discourse-automation-scriptable"),automation:this.store.createRecord("discourse-automation-automation")})}}e.default=i})),define("discourse/plugins/automation/discourse/templates/admin-plugins/show/automation/edit",["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:"wf/KkOgp",block:'[[[10,0],[14,0,"admin-detail discourse-automation-edit discourse-automation-form"],[12],[1,"\\n "],[8,[39,1],[[24,0,"discourse-automation-back"]],[["@label","@route"],["discourse_automation.back","adminPlugins.show.automation.index"]],null],[1,"\\n "],[8,[39,2],null,[["@heading"],["discourse_automation.select_script"]],[["content"],[[[[1,"\\n "],[10,"form"],[14,0,"form-horizontal"],[12],[1,"\\n "],[8,[39,5],null,[["@error"],[[30,0,["error"]]]],null],[1,"\\n\\n "],[10,"section"],[14,0,"form-section edit"],[12],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.models.automation.name.label"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[39,9],[[24,0,"input-large"]],[["@value","@type","@autofocus","@name","@input"],[[30,0,["automationForm","name"]],"text",true,"automation-name",[28,[37,10],[[28,[37,11],[[28,[37,12],[[30,0,["automationForm","name"]]],null]],null]],null]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.models.script.name.label"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[39,13],[[24,0,"scriptables"]],[["@value","@content","@onChange","@options"],[[30,0,["automationForm","script"]],[30,0,["model","scriptables"]],[30,0,["onChangeScript"]],[28,[37,14],null,[["filterable"],[true]]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,"section"],[14,0,"trigger-section form-section edit"],[12],[1,"\\n "],[10,"h2"],[14,0,"title"],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.edit_automation.trigger_section.title"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n"],[41,[30,0,["model","automation","script","forced_triggerable"]],[[[1," "],[10,0],[14,0,"alert alert-warning"],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.edit_automation.trigger_section.forced"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[10,"label"],[14,0,"control-label"],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.models.trigger.name.label"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[39,13],[[24,0,"triggerables"]],[["@value","@content","@onChange","@options"],[[30,0,["automationForm","trigger"]],[30,0,["model","triggerables"]],[30,0,["onChangeTrigger"]],[28,[37,14],null,[["filterable","none","disabled"],[true,"discourse_automation.select_trigger",[30,0,["model","automation","script","forced_triggerable"]]]]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n"],[41,[30,0,["automationForm","trigger"]],[[[41,[30,0,["model","automation","trigger","doc"]],[[[1," "],[10,0],[14,0,"alert alert-info"],[12],[1,"\\n "],[10,2],[12],[1,[30,0,["model","automation","trigger","doc"]]],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[41,[28,[37,18],[[30,0,["model","automation","enabled"]],[30,0,["model","automation","trigger","settings","manual_trigger"]]],null],[[[1," "],[10,0],[14,0,"alert alert-info next-trigger"],[12],[1,"\\n\\n"],[41,[30,0,["nextPendingAutomationAtFormatted"]],[[[1," "],[10,2],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.edit_automation.trigger_section.next_pending_automation"],[["date"],[[30,0,["nextPendingAutomationAtFormatted"]]]]]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[8,[39,19],[[24,0,"btn-primary trigger-now-btn"]],[["@label","@isLoading","@action"],["discourse_automation.edit_automation.trigger_section.trigger_now",[30,0,["isTriggeringAutomation"]],[28,[37,11],[[30,0,["onManualAutomationTrigger"]],[30,0,["model","automation","id"]]],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[42,[28,[37,21],[[28,[37,21],[[30,0,["triggerFields"]]],null]],null],null,[[[1," "],[8,[39,22],null,[["@automation","@field","@saveAutomation"],[[30,0,["automation"]],[30,1],[28,[37,11],[[30,0,["saveAutomation"]],[30,0,["automation"]]],null]]],null],[1,"\\n"]],[1]],null]],[]],null],[1," "],[13],[1,"\\n\\n"],[41,[30,0,["automationForm","trigger"]],[[[41,[30,0,["scriptFields"]],[[[1," "],[10,"section"],[14,0,"fields-section form-section edit"],[12],[1,"\\n "],[10,"h2"],[14,0,"title"],[12],[1,"\\n "],[1,[28,[35,8],["discourse_automation.edit_automation.fields_section.title"],null]],[1,"\\n "],[13],[1,"\\n\\n"],[41,[30,0,["model","automation","script","with_trigger_doc"]],[[[1," "],[10,0],[14,0,"alert alert-info"],[12],[1,"\\n "],[10,2],[12],[1,[30,0,["model","automation","script","with_trigger_doc"]]],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n"],[42,[28,[37,21],[[28,[37,21],[[30,0,["scriptFields"]]],null]],null],null,[[[1," "],[8,[39,22],null,[["@automation","@field","@saveAutomation"],[[30,0,["automation"]],[30,2],[28,[37,11],[[30,0,["saveAutomation"]],[30,0,["automation"]]],null]]],null],[1,"\\n"]],[2]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[41,[30,0,["automationForm","trigger"]],[[[1," "],[10,0],[15,0,[29,["control-group automation-enabled alert\\n ",[52,[30,0,["automationForm","enabled"]],"alert-info","alert-warning"]]]],[12],[1,"\\n "],[10,1],[12],[1,[28,[35,8],["discourse_automation.models.automation.enabled.label"],null]],[13],[1,"\\n "],[8,[39,24],[[4,[38,25],["click",[28,[37,26],[[30,0],[28,[37,12],[[30,0,["automationForm","enabled"]]],null]],[["value"],["target.checked"]]]],null]],[["@type","@checked"],["checkbox",[30,0,["automationForm","enabled"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[10,0],[14,0,"control-group"],[12],[1,"\\n "],[8,[39,19],[[24,0,"btn-primary update-automation"]],[["@isLoading","@label","@type","@action"],[[30,0,["isUpdatingAutomation"]],"discourse_automation.update","submit",[28,[37,11],[[30,0,["saveAutomation"]],[30,0,["automation"]],true],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "]],[]]]]],[1,"\\n"],[13]],["field","field"],false,["div","back-button","admin-config-area-card",":content","form","form-error","section","label","i18n","text-field","with-event-value","fn","mut","combo-box","hash","h2","if","p","and","d-button","each","-track-array","automation-field","span","input","on","action"]]',moduleName:"discourse/plugins/automation/discourse/templates/admin-plugins/show/automation/edit.hbs",isStrictMode:!1})})),define("discourse/plugins/automation/discourse/templates/admin-plugins/show/automation/index",["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:"fMa79ev2",block:'[[[8,[39,0],null,[["@model"],[[30,0,["model"]]]],null]],[],false,["automation-list"]]',moduleName:"discourse/plugins/automation/discourse/templates/admin-plugins/show/automation/index.hbs",isStrictMode:!1})})),define("discourse/plugins/automation/discourse/templates/admin-plugins/show/automation/new",["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:"RmfOtwPz",block:'[[[10,0],[14,0,"admin-detail discourse-automation-new discourse-automation-form"],[12],[1,"\\n "],[8,[39,1],[[24,0,"discourse-automation-back"]],[["@label","@route"],["discourse_automation.back","adminPlugins.show.automation.index"]],null],[1,"\\n "],[8,[39,2],null,[["@heading"],["discourse_automation.select_script"]],[["content"],[[[[1,"\\n "],[11,"input"],[16,"placeholder",[28,[37,5],["discourse_automation.filter_placeholder"],null]],[24,0,"admin-section-landing__header-filter"],[24,4,"text"],[4,[38,6],["input",[30,0,["updateFilterText"]]],null],[12],[13],[1,"\\n\\n "],[10,0],[14,0,"admin-section-landing__wrapper"],[12],[1,"\\n"],[42,[28,[37,8],[[28,[37,8],[[30,0,["scriptableContent"]]],null]],null],null,[[[1," "],[8,[39,9],[[4,[38,6],["click",[28,[37,10],[[30,0,["selectScriptToEdit"]],[30,1]],null]],null]],[["@titleLabelTranslated","@descriptionLabelTranslated"],[[30,1,["name"]],[30,1,["description"]]]],null],[1,"\\n"]],[1]],null],[1," "],[13],[1,"\\n "]],[]]]]],[1,"\\n"],[13]],["script"],false,["div","back-button","admin-config-area-card",":content","input","i18n","on","each","-track-array","admin-section-landing-item","fn"]]',moduleName:"discourse/plugins/automation/discourse/templates/admin-plugins/show/automation/new.hbs",isStrictMode:!1})}))
//# sourceMappingURL=automation_admin-fc24dd11bdbc38cad27fc5c592e0185d3477a1340d3be65a1837f880a881ca93.map
//!
;
Flash Sale Popup