Ember.TEMPLATES["javascripts/discourse/connectors/category-custom-settings/category-lock"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"section",true],[10,"class","field"],[8],[0,"\\n  "],[7,"h3",true],[8],[0,"\\n    "],[1,[28,"i18n",["category.category_lock.title"],null],false],[0,"\\n  "],[9],[0,"\\n  "],[7,"label",true],[8],[0,"\\n    "],[1,[28,"input",null,[["type","checked"],["checkbox",[24,["category","custom_fields","category_lock"]]]]],false],[0,"\\n    "],[1,[28,"i18n",["category.category_lock.label"],null],false],[0,"\\n  "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"javascripts/discourse/connectors/category-custom-settings/category-lock"}}),define("discourse/plugins/discourse-category-lock/initializers/category-lock",["exports","discourse/lib/plugin-api","discourse-common/utils/decorators"],(function(e,t,o){"use strict";function r(e,t,o,r,i){var s={};return Object.keys(r).forEach((function(e){s[e]=r[e]})),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=o.slice().reverse().reduce((function(o,r){return r(e,t,o)||o}),s),i&&void 0!==s.initializer&&(s.value=s.initializer?s.initializer.call(i):void 0,s.initializer=void 0),void 0===s.initializer&&(Object.defineProperty(e,t,s),s=null),s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"category-lock",initialize:function(){(0,t.withPluginApi)("0.8.31",(function(e){var t,i,s=e.container.lookup("site-settings:main");function a(t){var o=e.getCurrentUser();return o&&t&&t.category&&t.category.category_lock&&t.user_id===o.id&&o.trust_level<=s.category_lock_max_trust_level}s.category_lock_enabled&&(e.modifyClass("controller:topic",(r(t={showCategoryChooser:function(){return!a(this.model)&&this._super()}},"showCategoryChooser",[(0,o.default)("model.isPrivateMessage")],Object.getOwnPropertyDescriptor(t,"showCategoryChooser"),t),t)),e.modifyClass("model:composer",(r(i={showCategoryChooser:function(e,t){return!a(this.topic)&&this._super(e,t)}},"showCategoryChooser",[(0,o.default)("privateMessage","archetype.hasOptions")],Object.getOwnPropertyDescriptor(i,"showCategoryChooser"),i),i)))}))}};e.default=i}));
//# sourceMappingURL=https://doy2mn9upadnk.cloudfront.net/assets/plugins/discourse-category-lock-60a6d7c1580e212ea69ab6207e85e685364980fb61d8d2d96bee5f9ce153e3c8.js.map