define("truth-helpers/helpers/and",["exports","@ember/component/helper","../utils/truth-convert"],(function(e,t,n){"use strict";function i(e){for(var t=0,i=e.length;te.length)&&(t=e.length);for(var n=0,i=new Array(t);na}Object.defineProperty(e,"__esModule",{value:!0}),e.gt=r,e.default=void 0;var a=t.default.helper(r);e.default=a})),define("truth-helpers/helpers/gte",["exports","@ember/component/helper"],(function(e,t){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=a}Object.defineProperty(e,"__esModule",{value:!0}),e.gte=r,e.default=void 0;var a=t.default.helper(r);e.default=a})),define("truth-helpers/helpers/lt",["exports","@ember/component/helper"],(function(e,t){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1?t.substr(i+1):t;e.removeAttributeNS(this.namespace,r)}},t.prototype.type="AttributeHook";var n=t;e.default=n})),define("discourse-common/lib/debounce",["exports","@ember/runloop","discourse-common/config/environment"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return(0,n.isTesting)()?i.apply(void 0,arguments):t.debounce.apply(void 0,arguments)};var i=(0,n.isLegacyEmber)()?t.run:t.next})),define("discourse-common/lib/deprecated",["exports"],(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=["Deprecation notice:",e],t.since&&e.push("(deprecated since Discourse ".concat(t.since,")"));t.dropFrom&&e.push("(removal in Discourse ".concat(t.dropFrom,")"));if(e=e.join(" "),t.raiseError)throw e;console.warn(e)}})),define("discourse-common/lib/escape",["exports"],(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){if(null===e)return"";if(!e)return e+"";if(e=""+e,!i.test(e))return e;return e.replace(n,r)};var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},n=/[&<>"'`]/g,i=/[&<>"'`]/;function r(e){return t[e]}})),define("discourse-common/lib/get-owner",["exports","@ember/application","discourse-common/lib/deprecated"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOwner=r,e.setDefaultOwner=function(e){(0,t.setOwner)(i,e)},e.getRegister=function(e){var t=r(e),i={lookup:function(){return t.lookup.apply(t,arguments)},lookupFactory:function(){return t.factoryFor?t.factoryFor.apply(t,arguments):t._lookupFactory?t._lookupFactory.apply(t,arguments):void 0},deprecateContainer:function(e){Object.defineProperty(e,"container",{get:function(){return(0,n.default)("Use `this.register` or `getOwner` instead of `this.container`"),i}})}};return i};var i={};function r(e){return t.getOwner?(0,t.getOwner)(e||i)||(0,t.getOwner)(i):e.container}})),define("discourse-common/lib/get-url",["exports"],(function(e){"use strict";var t,n,i,r,a,s;function o(e){return void 0===i&&l($('meta[name="discourse-base-uri"]').attr("content")||""),e?"/"===e||/^\/[^\/]/.test(e)?r.test(e)?e:("/"!==e[0]&&(e="/"+e),i+e):e:"/"===i?"":i}function l(e){i=e,r=new RegExp("^".concat(i,"(/|$)"))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o,e.getURLWithCDN=function(e){e=o(e),t&&/^\/[^\/]/.test(e)?e=t+e:s&&(e=e.replace(a,s));return e},e.getAbsoluteURL=function(e){return n+e},e.isAbsoluteURL=function(e){return e.startsWith(n)},e.withoutPrefix=function(e){return i?e.replace(r,"$1"):e},e.setPrefix=l,e.setupURL=function(e,i,r){t=e,n=i,l(r)},e.setupS3CDN=function(e,t){a=e,s=t}})),define("discourse-common/lib/helpers",["exports","@ember/component/helper","discourse-common/lib/raw-handlebars","@ember/object","@ember/template"],(function(e,t,n,i,r){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?n[0].concat({hash:n[n.length-1]}):n,(0,r.htmlSafe)(e.apply(this,n)||"")}))},e.registerHelper=function(e,n){o[e]=t.default.helper(n)},e.findHelper=function(e){return o[e]||o[e.dasherize()]},e.registerHelpers=function(e){Object.keys(o).forEach((function(t){e.register("helper:".concat(t),o[t],{singleton:!1})}))},e.createHelperContext=function(e){s=e},e.helperContext=function(){return s},e.registerUnbound=function(e,i){o[e]=t.default.extend({compute:function(e,t){return i.apply(void 0,(n=e,function(e){if(Array.isArray(e))return a(e)}(n)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([t]));var n}}),n.default.registerHelper(e,(function(){for(var e=arguments.length,t=new Array(e),n=0;n-1?e.replacementId:e.id,i="fa d-icon d-icon-".concat(n," svg-icon");return t&&t.class&&(i+=" "+t.class),i}function f(e){return s&&s.indexOf(e)>=0}function h(e){var t=e.replacementId||e.id||"";return function(e){u&&(0,r.isDevelopment)()&&!f(e)&&console.warn('The icon "'.concat(e,'" is missing from the SVG subset.'))}(t=t.replace(" unpinned","")),t}p({name:"font-awesome",string:function(e,n){var i=(0,a.default)(h(e)),r="'),n.label&&(r+="".concat((0,a.default)(n.label),"")),n.title&&(r='").concat(r,"")),n.translatedtitle&&(r='").concat(r,"")),r},node:function(e,t){var r=h(e),s=m(e,t)+" svg-node",l=(0,i.h)("svg",{attributes:{class:s,"aria-hidden":!0},namespace:o},[(0,i.h)("use",{"xlink:href":(0,n.default)("http://www.w3.org/1999/xlink","#".concat((0,a.default)(r))),namespace:o})]);return t.title?(0,i.h)("span",{title:t.title,attributes:{class:"svg-icon-title"}},[l]):l}})})),define("discourse-common/lib/object",["exports"],(function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){return e&&"object"===t(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.deepMerge=function(){function e(t,i){return Object.keys(i).forEach((function(r){var a=t[r],s=i[r];Array.isArray(a)&&Array.isArray(s)?t[r]=a.concat(s):n(a)&&n(s)?t[r]=e(Object.assign({},a),s):t[r]=s})),t}for(var t=arguments.length,i=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};if(i.core&&n[e])return;n[e]=t},e.removeRawTemplate=function(e){delete n[e]},e.findRawTemplate=function(e){if((0,t.getResolverOption)("mobileView"))return n["javascripts/mobile/".concat(e)]||n["javascripts/".concat(e)]||n["mobile/".concat(e)]||n[e];return n["javascripts/".concat(e)]||n[e]},e.buildRawConnectorCache=function(e){var t={};return e(n,(function(e,i){t[e]=t[e]||[],t[e].push({template:n[i]})})),t},e.__DISCOURSE_RAW_TEMPLATES=void 0;var n={};e.__DISCOURSE_RAW_TEMPLATES=n})),define("discourse-common/resolver",["exports","@ember/string","discourse-common/lib/deprecated","discourse-common/lib/helpers","@ember/object"],(function(e,t,n,i,r){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1){var m="".concat(e,"/").concat(p[0],"s/"),f="admin/"+p[0]+"s/";p[1]=p[1].replace(".templates","").replace("/templates","");var h=(0,t.dasherize)(p[1].replace(/\./g,"/"));if(requirejs.entries[m+h]||requirejs.entries[f+h])return p[0]+":"+h;if(h=(0,t.dasherize)(p[1].replace(/\./g,"-")),requirejs.entries[m+h]||requirejs.entries[f+h])return p[0]+":"+h}return this._super(i)},customResolve:function(e){var n,i=e.type+"s/"+e.fullNameWithoutType,r=(0,t.dasherize)(i),a=Object.keys(requirejs.entries).find((function(e){return-1===e.indexOf("/templates/")&&(-1!==e.indexOf(i,e.length-i.length)||-1!==e.indexOf(r,e.length-r.length))}));return a&&(n=requirejs(a,null,null,!0))&&n.default&&(n=n.default),n},resolveWidget:function(e){return this.customResolve(e)||this._super(e)},resolveAdapter:function(e){return this.customResolve(e)||this._super(e)},resolveModel:function(e){return this.customResolve(e)||this._super(e)},resolveView:function(e){return this.customResolve(e)||this._super(e)},resolveHelper:function(e){return(0,i.findHelper)(e.fullNameWithoutType)||this.customResolve(e)||this._super(e)},resolveController:function(e){return this.customResolve(e)||this._super(e)},resolveComponent:function(e){return this.customResolve(e)||this._super(e)},resolveService:function(e){return this.customResolve(e)||this._super(e)},resolveRoute:function(e){return"basic"===e.fullNameWithoutType?requirejs("discourse/routes/discourse",null,null,!0).default:this.customResolve(e)||this._super(e)},findLoadingTemplate:function(e){if(e.fullNameWithoutType.match(/loading$/))return Ember.TEMPLATES.loading},findConnectorTemplate:function(e){var t=e.fullNameWithoutType.replace("components/","");if(0===t.indexOf("connectors"))return Ember.TEMPLATES["javascripts/".concat(t)]},resolveTemplate:function(e){return this.findPluginMobileTemplate(e)||this.findPluginTemplate(e)||this.findMobileTemplate(e)||this.findTemplate(e)||this.findLoadingTemplate(e)||this.findConnectorTemplate(e)||Ember.TEMPLATES.not_found},findPluginTemplate:function(e){var t=this.parseName(e.fullName.replace("template:","template:javascripts/"));return this.findTemplate(t)},findPluginMobileTemplate:function(e){if(s.mobileView){var t=this.parseName(e.fullName.replace("template:","template:javascripts/mobile/"));return this.findTemplate(t)}},findMobileTemplate:function(e){if(s.mobileView){var t=this.parseName(e.fullName.replace("template:","template:mobile/"));return this.findTemplate(t)}},findTemplate:function(t){var n=t.fullNameWithoutType,i=n.replace(/\./g,"/"),r=n.decamelize(),a=r.replace(/\./g,"-").replace(/\_/g,"-"),s=Ember.TEMPLATES;return this._super(t)||s[i]||s[n]||s[n.replace(/\.raw$/,"")]||s[a]||s[r.replace(/\./,"/")]||s[r.replace(/\_/,"/")]||s["".concat(e,"/templates/").concat(n)]||this.findAdminTemplate(t)||this.findUnderscoredTemplate(t)},findUnderscoredTemplate:function(e){var t=e.fullNameWithoutType.decamelize().replace(/\-/g,"_");return Ember.TEMPLATES[t]},findAdminTemplate:function(e){var t=e.fullNameWithoutType.decamelize();if(0===t.indexOf("components")){var n="admin/templates/".concat(t),i=Ember.TEMPLATES["javascripts/".concat(n)]||Ember.TEMPLATES[n];if(i)return i}if("javascripts/admin"===t)return Ember.TEMPLATES["admin/templates/admin"];if(0===t.indexOf("admin")||0===t.indexOf("javascripts/admin")){var r=(t=(t=(t=t.replace(/^admin\_/,"admin/templates/")).replace(/^admin\./,"admin/templates/")).replace(/\./g,"_")).replace(/_/g,"-");return Ember.TEMPLATES[t]||Ember.TEMPLATES[r]||Ember.TEMPLATES[r.replace("admin-","admin/")]}}})};var s={};function o(e){var n=e.split(":"),i=n[0],a=n[1];return{fullName:e,type:i,fullNameWithoutType:a,name:a,root:(0,r.get)(this,"namespace"),resolveMethodName:"resolve"+(0,t.classify)(i)}}})),define("discourse-common/utils/decorator-alias",["exports","discourse-common/utils/extract-value"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n){return function(){for(var i=arguments.length,r=new Array(i),a=0;a3&&void 0!==arguments[3]?arguments[3]:[];return{enumerable:o.enumerable,configurable:o.configurable,writeable:o.writeable,initializer:function(){var e;if(!o.writable)throw new Error("ember-computed-decorators does not support using getters and setters");var r=(0,n.default)(o);if("object"===i(r)){var u={};r.get&&(u.get=a(l,r.get)),r.set&&(u.set=s(l,r.set)),e=u}else e=a(l,r);return t.computed.apply(null,l.concat(e))}}}})),define("discourse-common/utils/is-descriptor",["exports"],(function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e&&"object"===t(e)&&"writable"in e&&"enumerable"in e&&"configurable"in e}})),define("discourse-common/utils/macro-alias",["exports","discourse-common/utils/is-descriptor"],(function(e,t){"use strict";function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n4&&void 0!==arguments[4]?arguments[4]:[];return{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,initializer:function(){return r.apply(void 0,n(a))}}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return function(){for(var n=arguments.length,i=new Array(n),a=0;a>=0,t=String(void 0!==t?t:" "),this.length>=e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,i=new Array(n);n--;)i[n]=[t[n],e[t[n]]];return i}),Object.values||(Object.values=function(e){for(var t=Object.keys(e),n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,i=this.fixedCategoryPositionsOnCreate?n.default.list():n.default.listByActivity();if(t){var r=n.default.findById(t);t=r.parent_category_id||r.id}var a=this.selectKit.options.excludeCategoryId;return i.filter((function(n){var i=e.getValue(n);if(t&&i!==t&&n.parent_category_id!==t)return!1;if(!1===e.selectKit.options.allowSubCategories&&n.parentCategory)return!1;if(!1===e.selectKit.options.allowUncategorized&&n.isUncategorizedCategory||a===i)return!1;var r=e.selectKit.options.permissionType;return!(r&&!e.allowRestrictedCategories)||r===n.permission}))},_matchCategory:function(e,t){return this._normalize(t).indexOf(e)>-1}});e.default=u})),define("select-kit/components/category-drop",["exports","discourse/models/category","select-kit/components/combo-box","discourse/lib/url","I18n","discourse/helpers/category-link","@ember/object","@ember/object/computed"],(function(e,t,n,i,r,a,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ALL_CATEGORIES_ID=e.NO_CATEGORIES_ID=void 0;var l="no-categories";e.NO_CATEGORIES_ID=l;var u="all-categories";e.ALL_CATEGORIES_ID=u;var c=n.default.extend({pluginApiIdentifiers:["category-drop"],classNameBindings:["categoryStyle"],classNames:["category-drop"],value:(0,o.readOnly)("category.id"),content:(0,o.readOnly)("categoriesWithShortcuts.[]"),tagName:"li",categoryStyle:(0,o.readOnly)("siteSettings.category_style"),noCategoriesLabel:r.default.t("categories.no_subcategory"),selectKitOptions:{filterable:!0,none:"category.all",caretDownIcon:"caret-right",caretUpIcon:"caret-down",fullWidthOnMobile:!0,noSubcategories:!1,subCategory:!1,clearable:!1,hideParentCategory:"hideParentCategory",countSubcategories:!1,autoInsertNoneItem:!1,displayCategoryDescription:"displayCategoryDescription",headerComponent:"category-drop/category-drop-header"},modifyComponentForRow:function(){return"category-row"},displayCategoryDescription:(0,s.computed)((function(){return!(this.get("currentUser.staff")||this.get("currentUser.trust_level")>0)})),hideParentCategory:(0,s.computed)((function(){return this.options.subCategory||!1})),categoriesWithShortcuts:(0,s.computed)("categories.[]","value","selectKit.options.{subCategory,noSubcategories}",(function(){var e=[];(this.value||this.selectKit.options.noSubcategories&&this.selectKit.options.subCategory)&&e.push({id:u,name:this.allCategoriesLabel}),!this.selectKit.options.subCategory||!this.value&&this.selectKit.options.noSubcategories||e.push({id:l,name:this.noCategoriesLabel});var t=this._filterUncategorized(this.categories||[]);return e.concat(t)})),modifyNoSelection:function(){return this.selectKit.options.noSubcategories?this.defaultItem(l,this.noCategoriesLabel):this.defaultItem(u,this.allCategoriesLabel)},modifySelection:function(e){if(this.value){var n=t.default.findById(this.value);e.title=n.title,e.label=(0,a.categoryBadgeHTML)(n,{link:!1,allowUncategorized:!0,hideParent:!0}).htmlSafe()}return e},parentCategoryName:(0,o.readOnly)("selectKit.options.parentCategory.name"),allCategoriesLabel:(0,s.computed)("parentCategoryName","selectKit.options.subCategory",(function(){return this.selectKit.options.subCategory?r.default.t("categories.all_subcategories",{categoryName:this.parentCategoryName}):r.default.t("categories.all")})),search:function(e){if(e){var n=t.default.search(e);return n=this._filterUncategorized(n).sort((function(e,t){return e.parent_category_id&&!t.parent_category_id?1:!e.parent_category_id&&t.parent_category_id?-1:0}))}return this._filterUncategorized(this.content)},actions:{onChange:function(e){var n=e===u||e===l?this.selectKit.options.parentCategory:t.default.findById(parseInt(e,10));i.default.routeToUrl((0,i.getCategoryAndTagUrl)(n,e!==l,this.tagId))}},_filterUncategorized:function(e){var t=this;return this.siteSettings.allow_uncategorized_topics||(e=e.filter((function(e){return e.id!==t.site.uncategorized_category_id}))),e}});e.default=c})),define("select-kit/components/category-drop/category-drop-header",["exports","select-kit/components/combo-box/combo-box-header","discourse-common/utils/decorators","select-kit/templates/components/category-drop/category-drop-header","@ember/object/computed","@ember/runloop"],(function(e,t,n,i,r,a){"use strict";var s,o,l,u;function c(e,t,n,i,r){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=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):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;var d=t.default.extend((s=(0,n.default)("selectedContent.color"),o=(0,n.default)("selectedContent.text_color"),l=(0,n.default)("selectedContent","categoryBackgroundColor","categoryTextColor"),u={layout:i.default,classNames:["category-drop-header"],classNameBindings:["categoryStyleClass"],categoryStyleClass:(0,r.readOnly)("site.category_style"),categoryBackgroundColor:function(e){return e||"#e9e9e9"},categoryTextColor:function(e){return e||"#333"},categoryStyle:function(e,t,n){var i=this.siteSettings.category_style;if("bullet"!==i&&e&&(t||n)){var r="";return t&&"box"===i&&(r+="border-color: #".concat(t,"; background-color: #").concat(t,";"),n&&(r+="color: #".concat(n,";"))),r.htmlSafe()}},didInsertElement:function(){var e=this;this._super.apply(this,arguments),(0,a.schedule)("afterRender",(function(){e.categoryStyle&&(e.element.setAttribute("style",e.categoryStyle),e.element.querySelector(".caret-icon").setAttribute("style",e.categoryStyle))}))}},c(u,"categoryBackgroundColor",[s],Object.getOwnPropertyDescriptor(u,"categoryBackgroundColor"),u),c(u,"categoryTextColor",[o],Object.getOwnPropertyDescriptor(u,"categoryTextColor"),u),c(u,"categoryStyle",[l],Object.getOwnPropertyDescriptor(u,"categoryStyle"),u),u));e.default=d})),define("select-kit/components/category-notifications-button",["exports","select-kit/components/notifications-button","@ember/object/computed"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({pluginApiIdentifiers:["category-notifications-button"],classNames:["category-notifications-button"],isHidden:(0,n.or)("category.deleted"),selectKitOptions:{i18nPrefix:"category.notifications",showFullTitle:!1}});e.default=i})),define("select-kit/components/category-row",["exports","@ember/object/computed","@ember/utils","discourse/models/category","select-kit/components/select-kit/select-kit-row","discourse/helpers/category-link","@ember/object","select-kit/templates/components/category-row","discourse/lib/computed"],(function(e,t,n,i,r,a,s,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=r.default.extend({layout:o.default,classNames:["category-row"],hideParentCategory:(0,t.bool)("selectKit.options.hideParentCategory"),allowUncategorized:(0,t.bool)("selectKit.options.allowUncategorized"),categoryLink:(0,t.bool)("selectKit.options.categoryLink"),countSubcategories:(0,t.bool)("selectKit.options.countSubcategories"),allowUncategorizedTopics:(0,l.setting)("allow_uncategorized_topics"),displayCategoryDescription:(0,s.computed)("selectKit.options.displayCategoryDescription",(function(){var e=this.selectKit.options.displayCategoryDescription;return!!(0,n.isNone)(e)||e})),title:(0,s.computed)("descriptionText","description","categoryName",(function(){if(this.category)return e=this.descriptionText||this.description||this.categoryName,(t=document.createElement("textarea")).innerHTML=e,t.value;var e,t})),categoryName:(0,t.reads)("category.name"),categoryDescription:(0,t.reads)("category.description"),categoryDescriptionText:(0,t.reads)("category.description_text"),category:(0,s.computed)("rowValue","rowName",(function(){if(!(0,n.isEmpty)(this.rowValue))return i.default.findById(parseInt(this.rowValue,10));var e=i.default.findUncategorized();return e&&e.name===this.rowName?e:void 0})),badgeForCategory:(0,s.computed)("category","parentCategory",(function(){return(0,a.categoryBadgeHTML)(this.category,{link:this.categoryLink,allowUncategorized:this.allowUncategorizedTopics||this.allowUncategorized,hideParent:!!this.parentCategory,topicCount:this.topicCount}).htmlSafe()})),badgeForParentCategory:(0,s.computed)("parentCategory",(function(){return(0,a.categoryBadgeHTML)(this.parentCategory,{link:this.categoryLink,allowUncategorized:this.allowUncategorizedTopics||this.allowUncategorized,recursive:!0}).htmlSafe()})),parentCategory:(0,s.computed)("parentCategoryId",(function(){return i.default.findById(this.parentCategoryId)})),hasParentCategory:(0,t.bool)("parentCategoryId"),parentCategoryId:(0,t.reads)("category.parent_category_id"),categoryTotalTopicCount:(0,t.reads)("category.totalTopicCount"),categoryTopicCount:(0,t.reads)("category.topic_count"),topicCount:(0,s.computed)("categoryTotalTopicCount","categoryTopicCount","countSubcategories",(function(){return this.countSubcategories?this.categoryTotalTopicCount:this.categoryTopicCount})),shouldDisplayDescription:(0,s.computed)("displayCategoryDescription","categoryDescription",(function(){return this.displayCategoryDescription&&this.categoryDescription&&"null"!==this.categoryDescription})),descriptionText:(0,s.computed)("categoryDescriptionText",(function(){if(this.categoryDescriptionText)return this._formatDescription(this.categoryDescriptionText)})),description:(0,s.computed)("categoryDescription",(function(){if(this.categoryDescription)return this._formatDescription(this.categoryDescription)})),_formatDescription:function(e){return"".concat(e.substr(0,200)).concat(e.length>200?"…":"")}});e.default=u})),define("select-kit/components/category-selector",["exports","@ember/object","discourse/models/category","I18n","select-kit/components/multi-select","discourse/helpers/category-link","discourse-common/lib/helpers","@ember/object/computed"],(function(e,t,n,i,r,a,s,o){"use strict";function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1&&r.push(t.default.create({multicategory:l(e),category:r[0],title:i.default.t("category_row.plus_subcategories_title",{name:r[0].name,count:e.size-1}),label:(0,a.categoryBadgeHTML)(r[0],{link:!1,recursive:!0,plusSubcategories:e.size-1}).htmlSafe()}))}(),r},select:function(e,t){if(t.multicategory){var i=t.multicategory.map((function(e){return n.default.findById(parseInt(e,10))})),r=(0,s.makeArray)(this.value).concat(i.map((function(e){return e.id}))),a=(0,s.makeArray)(this.selectedContent).concat(i);this.selectKit.change(r,a)}else this._super(e,t)},actions:{onChange:function(e){return this.attrs.onChange(e.map((function(e){return n.default.findById(e)})).filter(Boolean)),!1}}});e.default=c})),define("select-kit/components/color-palettes",["exports","select-kit/components/combo-box","I18n"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({pluginApiIdentifiers:["color-palettes"],classNames:["color-palettes"],modifyComponentForRow:function(){return"color-palettes/color-palettes-row"},selectKitOptions:{translatedNone:n.default.t("admin.customize.theme.default_light_scheme")}});e.default=i})),define("select-kit/components/color-palettes/color-palettes-row",["exports","select-kit/components/select-kit/select-kit-row","@ember/object","discourse/lib/utilities","select-kit/templates/components/color-palettes/color-palettes-row"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({classNames:["color-palettes-row"],layout:r.default,palettes:(0,n.computed)("item.colors.[]",(function(){return(this.item.colors||[]).filter((function(e){return"secondary"!==e.name})).map((function(e){return"#".concat((0,i.escapeExpression)(e.hex))})).map((function(e){return'')})).join("").htmlSafe()})),backgroundColor:(0,n.computed)("item.colors.[]",(function(){var e=(this.item.colors||[]).findBy("name","secondary");return e&&e.hex?"background-color:#".concat((0,i.escapeExpression)(e.hex)).htmlSafe():""}))});e.default=a})),define("select-kit/components/combo-box",["exports","select-kit/components/single-select","@ember/object"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({pluginApiIdentifiers:["combo-box"],classNames:["combobox","combo-box"],selectKitOptions:{caretUpIcon:"caret-up",caretDownIcon:"caret-down",autoFilterable:"autoFilterable",clearable:!1,headerComponent:"combo-box/combo-box-header"},autoFilterable:n.computed.gte("content.length",10)});e.default=i})),define("select-kit/components/combo-box/combo-box-header",["exports","@ember/object/computed","select-kit/components/select-kit/single-select-header","@ember/object","select-kit/templates/components/combo-box/combo-box-header"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n.default.extend({layout:r.default,classNames:["combo-box-header"],clearable:(0,t.reads)("selectKit.options.clearable"),caretUpIcon:(0,t.reads)("selectKit.options.caretUpIcon"),caretDownIcon:(0,t.reads)("selectKit.options.caretDownIcon"),shouldDisplayClearableButton:(0,t.and)("clearable","value"),caretIcon:(0,i.computed)("selectKit.isExpanded","caretUpIcon","caretDownIcon",(function(){return this.selectKit.isExpanded?this.caretUpIcon:this.caretDownIcon}))});e.default=a})),define("select-kit/components/composer-actions",["exports","discourse/models/composer","discourse-common/utils/decorators","discourse/models/draft","select-kit/components/dropdown-select-box","I18n","bootbox","@ember/string","@ember/object/computed","@ember/utils"],(function(e,t,n,i,r,a,s,o,l,u){"use strict";var c,d,p;function m(e,t,n,i,r){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=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):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._clearSnapshots=function(){f=null,h=null,g=null},e.default=void 0;var f=null,h=null,g=null;var b=r.default.extend((c=(0,n.default)("isEditing","action","whisper","noBump","isInSlowMode"),d=(0,n.default)("seq"),p={seq:0,pluginApiIdentifiers:["composer-actions"],classNames:["composer-actions"],isEditing:(0,l.equal)("action",t.EDIT),isInSlowMode:(0,l.gt)("topic.slow_mode_seconds",0),selectKitOptions:{icon:"iconForComposerAction",filterable:!1,showFullTitle:!1,preventHeaderFocus:!0},iconForComposerAction:function(e,n,i,r,a){return n===t.CREATE_TOPIC?"plus":n===t.PRIVATE_MESSAGE?"envelope":n===t.CREATE_SHARED_DRAFT?"far-clipboard":i?"far-eye-slash":r?"anchor":a?"hourglass-start":e?"pencil-alt":"share"},contentChanged:function(){this.set("seq",this.seq+1)},didReceiveAttrs:function(){this._super.apply(this,arguments);var e=!1;!this.topic||f&&this.topic.id===f.id||(f=this.topic,h=this.post,e=!0),!this.post||h&&this.post.id===h.id||(h=this.post,e=!0),this.action!==g&&(g=this.action,e=!0),e&&this.contentChanged(),this.set("selectKit.isHidden",(0,u.isEmpty)(this.content))},modifySelection:function(){return{}},content:function(){var e=[];this.action===t.REPLY&&this.topic&&this.topic.isPrivateMessage&&this.topic.details&&(this.topic.details.allowed_users.length>1||this.topic.details.allowed_groups.length>0)&&!this.isEditing&&f&&e.push({name:a.default.t("composer.composer_actions.reply_as_new_group_message.label"),description:a.default.t("composer.composer_actions.reply_as_new_group_message.desc"),icon:"plus",id:"reply_as_new_group_message"}),this.action===t.CREATE_TOPIC||this.action===t.CREATE_SHARED_DRAFT||this.action===t.REPLY&&this.topic&&this.topic.isPrivateMessage||this.isEditing||!f||e.push({name:a.default.t("composer.composer_actions.reply_as_new_topic.label"),description:a.default.t("composer.composer_actions.reply_as_new_topic.desc"),icon:"plus",id:"reply_as_new_topic"}),(this.action!==t.REPLY&&h||this.action===t.REPLY&&h&&(!this.replyOptions.userAvatar||!this.replyOptions.userLink))&&e.push({name:a.default.t("composer.composer_actions.reply_to_post.label",{postUsername:h.username}),description:a.default.t("composer.composer_actions.reply_to_post.desc"),icon:"share",id:"reply_to_post"}),this.siteSettings.enable_personal_messages&&this.action!==t.PRIVATE_MESSAGE&&!this.isEditing&&e.push({name:a.default.t("composer.composer_actions.reply_as_private_message.label"),description:a.default.t("composer.composer_actions.reply_as_private_message.desc"),icon:"envelope",id:"reply_as_private_message"}),!this.isEditing&&(this.action!==t.REPLY&&f||this.action===t.REPLY&&f&&this.replyOptions.userAvatar&&this.replyOptions.userLink&&this.replyOptions.topicLink)&&e.push({name:a.default.t("composer.composer_actions.reply_to_topic.label"),description:a.default.t("composer.composer_actions.reply_to_topic.desc"),icon:"share",id:"reply_to_topic"}),!this.canWhisper||h&&h.post_type===this.site.post_types.whisper||e.push({name:a.default.t("composer.composer_actions.toggle_whisper.label"),description:a.default.t("composer.composer_actions.toggle_whisper.desc"),icon:"far-eye-slash",id:"toggle_whisper"});var n=!1;this.action===t.CREATE_SHARED_DRAFT&&(n=!0),this.action===t.CREATE_TOPIC&&(this.site.shared_drafts_category_id&&e.push({name:a.default.t("composer.composer_actions.shared_draft.label"),description:a.default.t("composer.composer_actions.shared_draft.desc"),icon:"far-clipboard",id:"shared_draft"}),0===e.length&&(n=!0)),n&&e.push({name:a.default.t("composer.composer_actions.create_topic.label"),description:a.default.t("composer.composer_actions.reply_as_new_topic.desc"),icon:"share",id:"create_topic"});var i=this.get("currentUser.staff")||4===this.get("currentUser.trust_level");return this.action===t.REPLY&&i&&e.push({name:a.default.t("composer.composer_actions.toggle_topic_bump.label"),description:a.default.t("composer.composer_actions.toggle_topic_bump.desc"),icon:"anchor",id:"toggle_topic_bump"}),e},_replyFromExisting:function(e,t,n){this.closeComposer(),this.openComposer(e,t,n)},_openComposer:function(e){this.closeComposer(),this.openComposer(e)},toggleWhisperSelected:function(e,t){t.toggleProperty("whisper")},toggleTopicBumpSelected:function(e,t){t.toggleProperty("noBump")},replyAsNewGroupMessageSelected:function(e){var n=[],i=this.topic.details;i.allowed_users.forEach((function(e){return n.push(e.username)})),i.allowed_groups.forEach((function(e){return n.push(e.name)})),e.action=t.PRIVATE_MESSAGE,e.recipients=n.join(","),e.archetypeId="private_message",e.skipDraftCheck=!0,this._replyFromExisting(e,h,f)},replyToTopicSelected:function(e){e.action=t.REPLY,e.topic=f,e.skipDraftCheck=!0,this._openComposer(e)},replyToPostSelected:function(e){e.action=t.REPLY,e.post=h,e.skipDraftCheck=!0,this._openComposer(e)},replyAsNewTopicSelected:function(e){var t=this;i.default.get("new_topic").then((function(n){n.draft?s.default.confirm(a.default.t("composer.composer_actions.reply_as_new_topic.confirm"),(function(n){n&&t._replyAsNewTopicSelect(e)})):t._replyAsNewTopicSelect(e)}))},_replyAsNewTopicSelect:function(e){e.action=t.CREATE_TOPIC,e.categoryId=this.get("composerModel.topic.category.id"),e.disableScopedCategory=!0,e.skipDraftCheck=!0,this._replyFromExisting(e,h,f)},replyAsPrivateMessageSelected:function(e){var n;if(h&&!h.get("yours")){var i=h.get("username");i&&(n=i)}else if(this.get("composerModel.topic")){var r=this.get("composerModel.topic.postStream");if(r.get("firstPostPresent")){var a=r.get("posts.firstObject");a&&!a.get("yours")&&a.get("username")&&(n=a.get("username"))}}e.action=t.PRIVATE_MESSAGE,e.recipients=n,e.archetypeId="private_message",e.skipDraftCheck=!0,this._replyFromExisting(e,h,f)},_switchCreate:function(e,t){e.action=t,e.categoryId=this.get("composerModel.categoryId"),e.topicTitle=this.get("composerModel.title"),e.tags=this.get("composerModel.tags"),e.skipDraftCheck=!0,this._openComposer(e)},createTopicSelected:function(e){this._switchCreate(e,t.CREATE_TOPIC)},sharedDraftSelected:function(e){this._switchCreate(e,t.CREATE_SHARED_DRAFT)},actions:{onChange:function(e){var t="".concat((0,o.camelize)(e),"Selected");this[t]?(this[t](this.composerModel.getProperties("draftKey","draftSequence","title","reply","disableScopedCategory"),this.composerModel),this.contentChanged()):console.error("No method '".concat(t,"' found"))}}},m(p,"iconForComposerAction",[c],Object.getOwnPropertyDescriptor(p,"iconForComposerAction"),p),m(p,"content",[d],Object.getOwnPropertyDescriptor(p,"content"),p),p));e.default=b})),define("select-kit/components/create-color-row",["exports","select-kit/components/select-kit/select-kit-row","discourse/lib/utilities","select-kit/templates/components/create-color-row","@ember/runloop"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({layout:i.default,classNames:["create-color-row"],didReceiveAttrs:function(){var e=this;this._super.apply(this,arguments),(0,r.schedule)("afterRender",(function(){var t=(0,n.escapeExpression)(e.rowValue);e.element.style.borderLeftColor="#".concat(t)}))}});e.default=a})),define("select-kit/components/dropdown-select-box",["exports","select-kit/components/single-select"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["dropdown-select-box"],classNames:["dropdown-select-box"],selectKitOptions:{autoFilterable:!1,filterable:!1,showFullTitle:!0,headerComponent:"dropdown-select-box/dropdown-select-box-header",caretUpIcon:"caret-up",caretDownIcon:"caret-down",showCaret:!1},modifyComponentForRow:function(){return"dropdown-select-box/dropdown-select-box-row"}});e.default=n})),define("select-kit/components/dropdown-select-box/dropdown-select-box-header",["exports","select-kit/components/select-kit/single-select-header","@ember/object","select-kit/templates/components/dropdown-select-box/dropdown-select-box-header","@ember/object/computed"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({layout:i.default,classNames:["btn-default","dropdown-select-box-header"],tagName:"button",classNameBindings:["btnClassName"],showFullTitle:(0,r.readOnly)("selectKit.options.showFullTitle"),attributeBindings:["buttonType:type"],buttonType:"button",btnClassName:(0,n.computed)("showFullTitle",(function(){return"btn ".concat(this.showFullTitle?"btn-icon-text":"no-text btn-icon")})),caretUpIcon:(0,r.readOnly)("selectKit.options.caretUpIcon"),caretDownIcon:(0,r.readOnly)("selectKit.options.caretDownIcon"),caretIcon:(0,n.computed)("selectKit.isExpanded","caretUpIcon","caretDownIcon",(function(){return this.selectKit.isExpanded?this.caretUpIcon:this.caretDownIcon}))});e.default=a})),define("select-kit/components/dropdown-select-box/dropdown-select-box-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/dropdown-select-box/dropdown-select-box-row","@ember/object/computed"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t.default.extend({layout:n.default,classNames:["dropdown-select-box-row"],description:(0,i.readOnly)("item.description")});e.default=r})),define("select-kit/components/email-group-user-chooser-filter",["exports","select-kit/components/multi-select/multi-select-filter","@ember/object"],(function(e,t,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,a,s,o,l,u,c=t.default.extend((r=i={classNames:["email-group-user-chooser-filter"],onPaste:function(e){var t=e.originalEvent.clipboardData;if(t){var n=[];return t.getData("text").split(/[, \n]+/).forEach((function(e){(e=e.replace(/^@+/,"").trim()).length>0&&n.push(e)})),n.length>0?(e.stopPropagation(),e.preventDefault(),this.selectKit.append(n),!1):void 0}}},a="onPaste",s=[n.action],o=Object.getOwnPropertyDescriptor(i,"onPaste"),l=i,u={},Object.keys(o).forEach((function(e){u[e]=o[e]})),u.enumerable=!!u.enumerable,u.configurable=!!u.configurable,("value"in u||u.initializer)&&(u.writable=!0),u=s.slice().reverse().reduce((function(e,t){return t(r,a,e)||e}),u),l&&void 0!==u.initializer&&(u.value=u.initializer?u.initializer.call(l):void 0,u.initializer=void 0),void 0===u.initializer&&(Object.defineProperty(r,a,u),u=null),i));e.default=c})),define("select-kit/components/email-group-user-chooser-header",["exports","select-kit/components/multi-select/multi-select-header","@ember/object","@ember/object/computed","discourse-common/config/environment","select-kit/templates/components/email-group-user-chooser-header"],(function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=t.default.extend({layout:a.default,classNames:["email-group-user-chooser-header"],hasHiddenItems:(0,i.gt)("hiddenItemsCount",0),shownItems:(0,n.computed)("hiddenItemsCount",(function(){return this.selectKit.noneItem===this.selectedContent||0===this.hiddenItemsCount?this.selectedContent:this.selectedContent.slice(0,this.selectedContent.length-this.hiddenItemsCount)})),hiddenItemsCount:(0,n.computed)("selectedContent.[]","selectKit.options.autoWrap","selectKit.isExpanded",(function(){if(!this.selectKit.options.autoWrap||this.selectKit.isExpanded||this.selectedContent===this.selectKit.noneItem||this.selectedContent.length<=1||(0,r.isTesting)())return 0;var e=this.element.offsetWidth,t=this.element.querySelectorAll(".selected-name.choice"),n=this.element.querySelector(".filter-input"),i=this.element.querySelector(".x-more-item");if(i){var a=parseInt(i.getAttribute("data-hidden-count"),10);return a+(this.selectedContent.length-(t.length+a))}if(0===t.length&&this.selectedContent.length>0)return 0;for(var s=t[0].offsetWidth+n.offsetWidth,o=1,l=!1,u=1;u=.95){l=!0;break}o++,s+=c}return l?t.length-o:0}))});e.default=s})),define("select-kit/components/email-group-user-chooser-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/email-group-user-chooser-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:["email-group-user-chooser-row"]});e.default=i})),define("select-kit/components/email-group-user-chooser",["exports","select-kit/components/user-chooser"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["email-group-user-chooser"],classNames:["email-group-user-chooser"],classNameBindings:["selectKit.options.fullWidthWrap:full-width-wrap"],valueProperty:"id",nameProperty:"name",modifyComponentForRow:function(){return"email-group-user-chooser-row"},selectKitOptions:{headerComponent:"email-group-user-chooser-header",filterComponent:"email-group-user-chooser-filter",fullWidthWrap:!1,autoWrap:!1},search:function(){var e=this._super.apply(this,arguments);if(e)return e.then((function(e){if(e&&0!==e.length)return e.map((function(e){var t={};return e.username?(t.id=e.username,e.username.includes("@")?t.isEmail=!0:(t.isUser=!0,t.name=e.name)):e.name&&(t.id=e.name,t.name=e.full_name,t.isGroup=!0),Object.assign({},e,t)}))}))}});e.default=n})),define("select-kit/components/future-date-input-selector",["exports","select-kit/components/combo-box","select-kit/components/future-date-input-selector/mixin","I18n","@ember/object","@ember/object/computed","@ember/utils"],(function(e,t,n,i,r,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.timeframeDetails=function(e){c||(c={},u.forEach((function(e){return c[e.id]=e})));return c[e]},e.default=e.FORMAT=e.TIMEFRAMES=void 0;var o={enabled:function(){return!0},when:function(){return null},icon:"briefcase",displayWhen:!0};function l(e){return jQuery.extend({},o,e)}var u=[l({id:"now",format:"h:mm a",enabled:function(e){return e.canScheduleNow},when:function(e){return e.add(1,"minute")},icon:"magic"}),l({id:"later_today",format:"h a",enabled:function(e){return e.canScheduleToday},when:function(e){return e.hour(18).minute(0)},icon:"far-moon"}),l({id:"tomorrow",format:"ddd, h a",when:function(e,t){return e.add(1,"day").hour(t).minute(0)},icon:"far-sun"}),l({id:"later_this_week",format:"ddd, h a",enabled:function(e){return!e.canScheduleToday&&e.day<4},when:function(e,t){return e.add(2,"day").hour(t).minute(0)}}),l({id:"this_weekend",format:"ddd, h a",enabled:function(e){return e.day<5&&e.includeWeekend},when:function(e,t){return e.day(6).hour(t).minute(0)},icon:"bed"}),l({id:"next_week",format:"ddd, h a",enabled:function(e){return 0!==e.day},when:function(e,t){return e.add(1,"week").day(1).hour(t).minute(0)},icon:"briefcase"}),l({id:"two_weeks",format:"MMM D",when:function(e,t){return e.add(2,"week").hour(t).minute(0)},icon:"briefcase"}),l({id:"next_month",format:"MMM D",enabled:function(e){return e.now.date()!==moment().endOf("month").date()},when:function(e,t){return e.add(1,"month").startOf("month").hour(t).minute(0)},icon:"briefcase"}),l({id:"two_months",format:"MMM D",enabled:function(e){return e.includeMidFuture},when:function(e,t){return e.add(2,"month").startOf("month").hour(t).minute(0)},icon:"briefcase"}),l({id:"three_months",format:"MMM D",enabled:function(e){return e.includeMidFuture},when:function(e,t){return e.add(3,"month").startOf("month").hour(t).minute(0)},icon:"briefcase"}),l({id:"four_months",format:"MMM D",enabled:function(e){return e.includeMidFuture},when:function(e,t){return e.add(4,"month").startOf("month").hour(t).minute(0)},icon:"briefcase"}),l({id:"six_months",format:"MMM D",enabled:function(e){return e.includeMidFuture},when:function(e,t){return e.add(6,"month").startOf("month").hour(t).minute(0)},icon:"briefcase"}),l({id:"one_year",format:"MMM D",enabled:function(e){return e.includeFarFuture},when:function(e,t){return e.add(1,"year").startOf("day").hour(t).minute(0)},icon:"briefcase"}),l({id:"forever",enabled:function(e){return e.includeFarFuture},when:function(e,t){return e.add(1e3,"year").hour(t).minute(0)},icon:"gavel",displayWhen:!1}),l({id:"pick_date_and_time",enabled:function(e){return e.includeDateTime},icon:"far-calendar-plus"})];e.TIMEFRAMES=u;var c=null;var d="YYYY-MM-DD HH:mmZ";e.FORMAT=d;var p=t.default.extend(n.default,{pluginApiIdentifiers:["future-date-input-selector"],classNames:["future-date-input-selector"],isCustom:(0,a.equal)("value","pick_date_and_time"),selectKitOptions:{autoInsertNoneItem:!1,headerComponent:"future-date-input-selector/future-date-input-selector-header"},modifyComponentForRow:function(){return"future-date-input-selector/future-date-input-selector-row"},content:(0,r.computed)("statusType",(function(){var e=this,t=moment(),n={now:t,day:t.day(),includeWeekend:this.includeWeekend,includeMidFuture:this.includeMidFuture||!0,includeFarFuture:this.includeFarFuture,includeDateTime:this.includeDateTime,canScheduleNow:this.includeNow||!1,canScheduleToday:24-t.hour()>6};return u.filter((function(e){return e.enabled(n)})).map((function(t){return{id:t.id,name:i.default.t("topic.auto_update_input.".concat(t.id)),datetime:e._computeDatetimeForValue(t.id),icons:e._computeIconsForValue(t.id)}}))})),actions:{onChange:function(e){if("pick_date_and_time"!==e){var t=this._updateAt(e).time;t&&!(0,s.isEmpty)(e)&&this.attrs.onChangeInput&&this.attrs.onChangeInput(t.locale("en").format(d))}this.attrs.onChange&&this.attrs.onChange(e)}}});e.default=p})),define("select-kit/components/future-date-input-selector/future-date-input-selector-header",["exports","select-kit/components/combo-box/combo-box-header","select-kit/templates/components/future-date-input-selector/future-date-input-selector-header"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:"future-date-input-selector-header"});e.default=i})),define("select-kit/components/future-date-input-selector/future-date-input-selector-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/future-date-input-selector/future-date-input-selector-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:["future-date-input-selector-row"]});e.default=i})),define("select-kit/components/future-date-input-selector/mixin",["exports","discourse/controllers/edit-topic-timer","@ember/object/mixin","@ember/utils","select-kit/components/future-date-input-selector"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n.default.create({_computeIconsForValue:function(e){var t=this._updateAt(e).icon;return t?t.split(","):[]},_computeDatetimeForValue:function(e){if((0,i.isNone)(e))return null;var t=this._updateAt(e).time;if(t){var n=(0,r.timeframeDetails)(e);if(n.displayWhen||(t=null),t&&n.format)return t.format(n.format)}return t},_updateAt:function(e){var n=(0,r.timeframeDetails)(e);return n?{time:n.when(moment(),this.statusType!==t.CLOSE_STATUS_TYPE?8:18),icon:n.icon}:{time:moment()}}});e.default=a})),define("select-kit/components/group-chooser",["exports","select-kit/components/multi-select"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["group-chooser"],classNames:["group-chooser"],selectKitOptions:{allowAny:!1}});e.default=n})),define("select-kit/components/group-dropdown",["exports","@ember/object/computed","select-kit/components/combo-box","discourse/lib/url","I18n","@ember/object","discourse/lib/computed"],(function(e,t,n,i,r,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n.default.extend({pluginApiIdentifiers:["group-dropdown"],classNames:["group-dropdown"],content:(0,t.reads)("groupsWithShortcut"),tagName:"li",valueProperty:null,nameProperty:null,hasManyGroups:(0,t.gte)("content.length",10),enableGroupDirectory:(0,s.setting)("enable_group_directory"),selectKitOptions:{caretDownIcon:"caret-right",caretUpIcon:"caret-down",filterable:"hasManyGroups"},groupsWithShortcut:(0,a.computed)("groups.[]",(function(){var e=[];return(this.enableGroupDirectory||this.get("currentUser.staff"))&&e.push(r.default.t("groups.index.all").toLowerCase()),e.concat(this.groups)})),actions:{onChange:function(e){(this.groups||[]).includes(e)?i.default.routeToUrl("/g/".concat(e)):i.default.routeToUrl("/g")}}});e.default=o})),define("select-kit/components/group-notifications-button",["exports","select-kit/components/notifications-button"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["group-notifications-button"],classNames:["group-notifications-button"],selectKitOptions:{i18nPrefix:"groups.notifications"}});e.default=n})),define("select-kit/components/icon-picker",["exports","discourse-common/lib/icon-library","select-kit/components/multi-select","discourse/lib/ajax","@ember/object","discourse-common/config/environment","discourse-common/lib/helpers"],(function(e,t,n,i,r,a,s){"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n.default.extend({pluginApiIdentifiers:["icon-picker"],classNames:["icon-picker"],init:function(){this._super.apply(this,arguments),this._cachedIconsList=null,(0,a.isDevelopment)()&&(0,t.disableMissingIconWarning)()},content:(0,r.computed)("value.[]",(function(){return(0,s.makeArray)(this.value).map(this._processIcon)})),search:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return""===t&&this._cachedIconsList&&this._cachedIconsList.length?this._cachedIconsList:(0,i.ajax)("/svg-sprite/picker-search",{data:{filter:t}}).then((function(n){return n=n.map(e._processIcon),""===t&&(e._cachedIconsList=n),n}))},_processIcon:function(e){var n="object"===o(e)?e.id:e,i=(0,t.convertIconClass)(n),r="#svg-sprites",a="ajax-icon-holder";return"object"===o(e)&&(0===$("".concat(r," .").concat(a)).length&&$(r).append('")),$("".concat(r," symbol#").concat(i)).length||$("".concat(r," .").concat(a)).append("".concat(e.symbol,""))),{id:n,name:n,icon:i}},willDestroyElement:function(){$("#svg-sprites .ajax-icon-holder").remove(),this._super.apply(this,arguments),this._cachedIconsList=null,(0,a.isDevelopment)()&&(0,t.enableMissingIconWarning)()},actions:{onChange:function(e,t){1===this.selectKit.options.maximum&&(e=e.length?e[0]:null,t=t.length?t[0]:null),this.attrs.onChange&&this.attrs.onChange(e,t)}}});e.default=l})),define("select-kit/components/list-setting",["exports","select-kit/components/select-kit","select-kit/components/multi-select","@ember/object","discourse-common/lib/helpers","@ember/object/computed"],(function(e,t,n,i,r,a){"use strict";function s(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1)return"create-color-row"},selectedNameComponent:(0,i.computed)("settingName",(function(){return this.settingName&&this.settingName.indexOf("color")>-1?"selected-color":"selected-name"})),deselect:function(e){this.onChangeChoices&&this.onChangeChoices(s(new Set([e].concat(s((0,r.makeArray)(this.choices)))))),this._super.apply(this,arguments)}});e.default=l})),define("select-kit/components/mini-tag-chooser",["exports","@ember/object/computed","select-kit/components/combo-box","select-kit/components/select-kit","I18n","select-kit/mixins/tags","@ember/object","discourse-common/lib/helpers","discourse/lib/computed"],(function(e,t,n,i,r,a,s,o,l){"use strict";function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0)return this.defaultItem(null,r.default.t("select_kit.min_content_not_reached",{count:e}))}return this._super.apply(this,arguments)},init:function(){this._super.apply(this,arguments),this.insertAfterCollection(i.ERRORS_COLLECTION,d)},caretIcon:(0,s.computed)("value.[]",(function(){var e=this.selectKit.options.maximum;return e&&(0,o.makeArray)(this.value).length>=parseInt(e,10)?null:"plus"})),modifySelection:function(e){var t=this.selectKit.options.minimum;if(t&&(0,o.makeArray)(this.value).length32&&(e.label="".concat(e.label.slice(0,32),"..."));return e},search:function(e){var t={q:e||"",limit:this.maxTagSearchResults,categoryId:this.selectKit.options.categoryId};return this.value&&(t.selected_tags=this.value.slice(0,100)),this.selectKit.options.everyTag||(t.filterForInput=!0),this.searchTags("/tags/filter/search",t,this._transformJson)},_transformJson:function(e,t){var n=t.results;return e.setProperties({termMatchesForbidden:!!t.forbidden,termMatchErrorMessage:t.forbidden_message}),e.get("siteSettings.tags_sort_alphabetically")&&(n=n.sort((function(e,t){return e.text.localeCompare(t.text)}))),n=n.filter((function(t){return!(0,o.makeArray)(e.tags).includes(t.id)})).map((function(e){return{id:e.text,name:e.text,count:e.count}}))},select:function(e){if(this._reset(),this.validateSelect(e)){var t=u(new Set((0,o.makeArray)(this.value).concat(e)));this.selectKit.change(t,t)}},deselect:function(e){this._reset();var t=u(new Set((0,o.makeArray)(this.value).removeObject(e)));this.selectKit.change(t,t)},_reset:function(){this.clearErrors(),this.set("highlightedTag",null)},_onKeydown:function(e){var t=(0,o.makeArray)(this.value);if(8===e.keyCode)this.selectKit.filter||this._onBackspace(this.value,this.highlightedTag);else if(37===e.keyCode)if(this.highlightedTag){var n=t.indexOf(this.highlightedTag),i=t[n-1]?t[n-1]:t.lastObject;this.set("highlightedTag",i)}else this.set("highlightedTag",t.lastObject);else if(39===e.keyCode)if(this.highlightedTag){var r=t.indexOf(this.highlightedTag),a=t[r+1]?t[r+1]:t.firstObject;this.set("highlightedTag",a)}else this.set("highlightedTag",t.firstObject);else this.set("highlightedTag",null);return!0},_onBackspace:function(e,t){e&&e.length&&(t?this.deselect(t):this.set("highlightedTag",e.lastObject))}});e.default=p})),define("select-kit/components/mini-tag-chooser/mini-tag-chooser-header",["exports","select-kit/components/combo-box/combo-box-header","select-kit/templates/components/mini-tag-chooser/mini-tag-chooser-header"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:["mini-tag-chooser-header"]});e.default=i})),define("select-kit/components/mini-tag-chooser/selected-collection",["exports","@ember/object/computed","@ember/component","@ember/object","select-kit/templates/components/mini-tag-chooser/selected-collection"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n.default.extend({layout:r.default,classNames:["mini-tag-chooser-selected-collection","selected-tags","shouldHide:hidden"],shouldHide:(0,t.empty)("selectedTags.[]"),selectedTags:(0,t.reads)("collection.content.selectedTags.[]"),highlightedTag:(0,t.reads)("collection.content.highlightedTag"),tags:(0,i.computed)("selectedTags.[]","highlightedTag","selectKit.filter",(function(){var e=this;if(!this.selectedTags)return[];var t=this.selectedTags;return t.length>=20&&this.selectKit.filter?t=t.filter((function(t){return t.indexOf(e.selectKit.filter)>=0})):t.length>=20&&(t=t.slice(0,20)),t=t.map((function(t){var n=["selected-tag"];return t===e.highlightedTag&&n.push("is-highlighted"),{value:t,classNames:n.join(" ")}}))})),actions:{deselectTag:function(e){return this.selectKit.deselect(e)}}});e.default=a})),define("select-kit/components/multi-select",["exports","select-kit/components/select-kit","@ember/object","discourse-common/lib/deprecated","@ember/utils","select-kit/templates/components/multi-select","discourse-common/lib/helpers"],(function(e,t,n,i,r,a,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t.default.extend({pluginApiIdentifiers:["multi-select"],layout:a.default,classNames:["multi-select"],multiSelect:!0,selectKitOptions:{none:"select_kit.default_header_text",clearable:!0,filterable:!0,filterIcon:null,clearOnClick:!0,closeOnChange:!1,autoInsertNoneItem:!1,headerComponent:"multi-select/multi-select-header",filterComponent:"multi-select/multi-select-filter"},search:function(e){var t=this;return this._super(e).filter((function(e){return!(0,s.makeArray)(t.selectedContent).includes(e)}))},append:function(e){var t=this,n=e.map((function(e){var n=t.defaultItem(e,e),i=t.findValue(t.mainCollection,n)||t.findName(t.mainCollection,n);if(i){if(t.validateSelect(i))return t.getValue(i)}else if(t.validateCreate(e,t.content))return e})).filter(Boolean),i=(0,s.makeArray)(this.value).concat(n),r=(0,s.makeArray)(this.selectedContent).concat((0,s.makeArray)(n));this.selectKit.change(i,r)},deselect:function(e){var t=this;this.clearErrors();var n=this.selectedContent.filter((function(n){return t.getValue(e)!==t.getValue(n)}));this.selectKit.change(this.valueProperty?n.mapBy(this.valueProperty):n,n)},select:function(e,t){if((0,r.isPresent)(e)){if(this.findValue(this.mainCollection,this.selectKit.valueProperty?t:e)&&!this.validateSelect(t))return;var n=(0,s.makeArray)(this.value).concat((0,s.makeArray)(e)),i=(0,s.makeArray)(this.selectedContent).concat((0,s.makeArray)(t));this.selectKit.change(n,i.length?i:(0,s.makeArray)(this.defaultItem(e,e)))}else{if(!this.validateSelect(this.selectKit.highlighted))return;this.selectKit.change((0,s.makeArray)(this.value).concat((0,s.makeArray)(this.getValue(this.selectKit.highlighted))),(0,s.makeArray)(this.selectedContent).concat((0,s.makeArray)(this.selectKit.highlighted)))}},selectedContent:(0,n.computed)("value.[]","content.[]",(function(){var e=this,t=(0,s.makeArray)(this.value).map((function(t){return e.selectKit.options.castInteger&&e._isNumeric(t)?Number(t):t}));if(t.length){var n=[];return t.forEach((function(t){if(e.selectKit.valueProperty){var i=(0,s.makeArray)(e.content).findBy(e.selectKit.valueProperty,t);i&&n.push(i)}else(0,s.makeArray)(e.content).includes(t)&&n.push(t)})),this.selectKit.modifySelection(n)}return this.selectKit.noneItem})),_onKeydown:function(e){if("Enter"===e.code&&e.target.classList.contains("selected-name"))return e.stopPropagation(),this.selectKit.deselectByValue(e.target.dataset.value),!1;if("Backspace"===e.code){e.stopPropagation();var t=this.getFilterInput();if(t&&0===t.value.length){var n=this.element.querySelectorAll(".select-kit-header .choice.select-kit-selected-name");if(n.length){var i=n[n.length-1];i&&(i===document.activeElement?this.deselect(this.selectedContent.lastObject):i.focus())}}}return!0},handleDeprecations:function(){this._super.apply(this,arguments),this._deprecateValues()},_deprecateValues:function(){this.values&&!this.value&&((0,i.default)("The `values` property is deprecated for multi-select. Use `value` instead",{since:"v2.4.0"}),this.set("value",this.values))}});e.default=o})),define("select-kit/components/multi-select/multi-select-filter",["exports","I18n","select-kit/components/select-kit/select-kit-filter","discourse-common/utils/decorators","select-kit/templates/components/select-kit/select-kit-filter"],(function(e,t,n,i,r){"use strict";var a,s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,l,u,c,d,p,m=Ember.isEmpty,f=n.default.extend((a=(0,i.default)("placeholder","selectKit.hasSelection"),s={layout:r.default,classNames:["multi-select-filter"],computedPlaceholder:function(e,n){return n||m(e)?"":t.default.t(e)},actions:{onPaste:function(e){var t=e.originalEvent.clipboardData;if(t){var n=t.getData("text").split("|").filter(Boolean);return n.length>1?(e.stopPropagation(),e.preventDefault(),this.selectKit.append(n),!1):void 0}}}},o=s,l="computedPlaceholder",u=[a],c=Object.getOwnPropertyDescriptor(s,"computedPlaceholder"),d=s,p={},Object.keys(c).forEach((function(e){p[e]=c[e]})),p.enumerable=!!p.enumerable,p.configurable=!!p.configurable,("value"in p||p.initializer)&&(p.writable=!0),p=u.slice().reverse().reduce((function(e,t){return t(o,l,e)||e}),p),d&&void 0!==p.initializer&&(p.value=p.initializer?p.initializer.call(d):void 0,p.initializer=void 0),void 0===p.initializer&&(Object.defineProperty(o,l,p),p=null),s));e.default=f})),define("select-kit/components/multi-select/multi-select-header",["exports","select-kit/components/select-kit/select-kit-header","@ember/object","select-kit/templates/components/multi-select/multi-select-header","discourse-common/lib/helpers"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({classNames:["multi-select-header"],layout:i.default,selectedNames:(0,n.computed)("selectedContent",(function(){var e=this;return(0,r.makeArray)(this.selectedContent).map((function(t){return e.getName(t)}))})),hasReachedMaximumSelection:(0,n.computed)("selectedValue",(function(){return!!this.selectKit.options.maximum&&this.selectedValue.length>=this.selectKit.options.maximum})),selectedValue:(0,n.computed)("selectedContent",(function(){var e=this;return(0,r.makeArray)(this.selectedContent).map((function(t){return e.getName(t)!==e.getName(e.selectKit.noneItem)?e.getValue(t):null})).filter(Boolean)}))});e.default=a})),define("select-kit/components/multi-select/selected-category",["exports","select-kit/components/selected-name","discourse/helpers/category-link","@ember/object","select-kit/templates/components/multi-select/selected-category"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({classNames:["selected-category"],layout:r.default,badge:(0,i.computed)("item",(function(){return(0,n.categoryBadgeHTML)(this.item,{allowUncategorized:!0,link:!1}).htmlSafe()}))});e.default=a})),define("select-kit/components/multi-select/selected-color",["exports","select-kit/components/selected-name","discourse-common/utils/decorators"],(function(e,t,n){"use strict";var i,r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a,s,o,l,u,c,d=t.default.extend((i=(0,n.default)("name"),a=r={classNames:["select-kit-selected-color"],footerContent:function(e){return'').htmlSafe()}},s="footerContent",o=[i],l=Object.getOwnPropertyDescriptor(r,"footerContent"),u=r,c={},Object.keys(l).forEach((function(e){c[e]=l[e]})),c.enumerable=!!c.enumerable,c.configurable=!!c.configurable,("value"in c||c.initializer)&&(c.writable=!0),c=o.slice().reverse().reduce((function(e,t){return t(a,s,e)||e}),c),u&&void 0!==c.initializer&&(c.value=c.initializer?c.initializer.call(u):void 0,c.initializer=void 0),void 0===c.initializer&&(Object.defineProperty(a,s,c),c=null),r));e.default=d})),define("select-kit/components/none-category-row",["exports","select-kit/components/category-row","discourse/helpers/category-link","discourse-common/utils/decorators","select-kit/templates/components/category-row"],(function(e,t,n,i,r){"use strict";var a,s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,l,u,c,d,p,m=t.default.extend((a=(0,i.default)("category"),s={layout:r.default,classNames:"none category-row",badgeForCategory:function(e){return(0,n.categoryBadgeHTML)(e,{link:this.categoryLink,allowUncategorized:!0,hideParent:!0}).htmlSafe()}},o=s,l="badgeForCategory",u=[a],c=Object.getOwnPropertyDescriptor(s,"badgeForCategory"),d=s,p={},Object.keys(c).forEach((function(e){p[e]=c[e]})),p.enumerable=!!p.enumerable,p.configurable=!!p.configurable,("value"in p||p.initializer)&&(p.writable=!0),p=u.slice().reverse().reduce((function(e,t){return t(o,l,e)||e}),p),d&&void 0!==p.initializer&&(p.value=p.initializer?p.initializer.call(d):void 0,p.initializer=void 0),void 0===p.initializer&&(Object.defineProperty(o,l,p),p=null),s));e.default=m})),define("select-kit/components/notifications-button",["exports","discourse/lib/notification-levels","@ember/object","select-kit/components/dropdown-select-box","I18n"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i.default.extend({pluginApiIdentifiers:["notifications-button"],classNames:["notifications-button"],content:t.allLevels,nameProperty:"key",selectKitOptions:{autoFilterable:!1,filterable:!1,i18nPrefix:"",i18nPostfix:""},modifyComponentForRow:function(){return"notifications-button/notifications-button-row"},modifySelection:function(e){e=e||{};var t=this.selectKit.options,i=t.i18nPrefix,a=t.i18nPostfix,s=r.default.t("".concat(i,".").concat(this.buttonForValue.key).concat(a,".title"));return(0,n.setProperties)(e,{title:s,label:s,icon:this.buttonForValue.icon}),e},buttonForValue:(0,n.computed)("value",(function(){return(0,t.buttonDetails)(this.value)}))});e.default=a})),define("select-kit/components/notifications-button/notifications-button-row",["exports","select-kit/components/dropdown-select-box/dropdown-select-box-row","I18n","@ember/object","discourse/lib/utilities","@ember/object/computed"],(function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=t.default.extend({classNames:["notifications-button-row"],i18nPrefix:(0,a.readOnly)("selectKit.options.i18nPrefix"),i18nPostfix:(0,a.readOnly)("selectKit.options.i18nPostfix"),label:(0,i.computed)("_start",(function(){return(0,r.escapeExpression)(n.default.t("".concat(this._start,".title")))})),title:(0,a.readOnly)("label"),icons:(0,i.computed)("title","item.icon",(function(){return[(0,r.escapeExpression)(this.item.icon)]})),description:(0,i.computed)("_start",(function(){return this.site&&this.site.mobileView?null:(0,r.escapeExpression)(n.default.t("".concat(this._start,".description")))})),_start:(0,i.computed)("i18nPrefix","i18nPostfix","rowName",(function(){return"".concat(this.i18nPrefix,".").concat(this.rowName).concat(this.i18nPostfix)}))});e.default=s})),define("select-kit/components/notifications-filter",["exports","select-kit/components/dropdown-select-box","I18n","@ember/object"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t.default.extend({classNames:["notifications-filter"],content:(0,i.computed)((function(){return[{id:"all",label:n.default.t("user.user_notifications.filters.all")},{id:"read",label:n.default.t("user.user_notifications.filters.read")},{id:"unread",label:n.default.t("user.user_notifications.filters.unread")}]})),selectKitOptions:{headerComponent:"notifications-filter/notifications-filter-header"}});e.default=r})),define("select-kit/components/notifications-filter/notifications-filter-header",["exports","select-kit/components/dropdown-select-box/dropdown-select-box-header","discourse-common/utils/decorators","discourse/lib/computed","select-kit/templates/components/notifications-filter/notifications-filter-header"],(function(e,t,n,i,r){"use strict";var a,s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,l,u,c,d,p,m=t.default.extend((a=(0,n.default)("selectKit.isExpanded"),s={layout:r.default,classNames:["notifications-filter-header"],label:(0,i.fmt)("value","user.user_notifications.filters.%@"),caretIcon:function(e){return e?"caret-up":"caret-down"}},o=s,l="caretIcon",u=[a],c=Object.getOwnPropertyDescriptor(s,"caretIcon"),d=s,p={},Object.keys(c).forEach((function(e){p[e]=c[e]})),p.enumerable=!!p.enumerable,p.configurable=!!p.configurable,("value"in p||p.initializer)&&(p.writable=!0),p=u.slice().reverse().reduce((function(e,t){return t(o,l,e)||e}),p),d&&void 0!==p.initializer&&(p.value=p.initializer?p.initializer.call(d):void 0,p.initializer=void 0),void 0===p.initializer&&(Object.defineProperty(o,l,p),p=null),s));e.default=m})),define("select-kit/components/period-chooser",["exports","@ember/object/computed","select-kit/components/dropdown-select-box"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n.default.extend({classNames:["period-chooser"],classNameBindings:["showPeriods::hidden"],content:(0,t.oneWay)("site.periods"),value:(0,t.readOnly)("period"),valueProperty:null,nameProperty:null,showPeriods:!0,modifyComponentForRow:function(){return"period-chooser/period-chooser-row"},selectKitOptions:{filterable:!1,autoFilterable:!1,fullDay:"fullDay",headerComponent:"period-chooser/period-chooser-header"},actions:{onChange:function(e){this.action?this.action(e):this.attrs.onChange&&this.attrs.onChange(e)}}});e.default=i})),define("select-kit/components/period-chooser/period-chooser-header",["exports","select-kit/components/dropdown-select-box/dropdown-select-box-header","discourse-common/utils/decorators","select-kit/templates/components/period-chooser/period-chooser-header"],(function(e,t,n,i){"use strict";var r,a;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s,o,l,u,c,d,p=t.default.extend((r=(0,n.default)("selectKit.isExpanded"),a={layout:i.default,classNames:["period-chooser-header"],caretIcon:function(e){return e?"caret-up":"caret-down"}},s=a,o="caretIcon",l=[r],u=Object.getOwnPropertyDescriptor(a,"caretIcon"),c=a,d={},Object.keys(u).forEach((function(e){d[e]=u[e]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(e,t){return t(s,o,e)||e}),d),c&&void 0!==d.initializer&&(d.value=d.initializer?d.initializer.call(c):void 0,d.initializer=void 0),void 0===d.initializer&&(Object.defineProperty(s,o,d),d=null),a));e.default=p})),define("select-kit/components/period-chooser/period-chooser-row",["exports","select-kit/components/dropdown-select-box/dropdown-select-box-row","I18n","discourse-common/utils/decorators","select-kit/templates/components/period-chooser/period-chooser-row"],(function(e,t,n,i,r){"use strict";var a,s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,l,u,c,d,p,m=t.default.extend((a=(0,i.default)("rowName"),s={layout:r.default,classNames:["period-chooser-row"],title:function(e){return n.default.t("filters.top.".concat(e||"this_week")).title}},o=s,l="title",u=[a],c=Object.getOwnPropertyDescriptor(s,"title"),d=s,p={},Object.keys(c).forEach((function(e){p[e]=c[e]})),p.enumerable=!!p.enumerable,p.configurable=!!p.configurable,("value"in p||p.initializer)&&(p.writable=!0),p=u.slice().reverse().reduce((function(e,t){return t(o,l,e)||e}),p),d&&void 0!==p.initializer&&(p.value=p.initializer?p.initializer.call(d):void 0,p.initializer=void 0),void 0===p.initializer&&(Object.defineProperty(o,l,p),p=null),s));e.default=m})),define("select-kit/components/pinned-button",["exports","@ember/component","I18n","discourse-common/utils/decorators","select-kit/templates/components/pinned-button"],(function(e,t,n,i,r){"use strict";var a,s,o;function l(e,t,n,i,r){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=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):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;var u=t.default.extend((a=(0,i.default)("topic.pinned_globally","pinned"),s=(0,i.default)("pinned","topic.deleted","topic.unpinned"),l(o={pluginApiIdentifiers:["pinned-button"],descriptionKey:"help",classNames:"pinned-button",classNameBindings:["isHidden"],layout:r.default,reasonText:function(e,t){var i=t?"pinned".concat(e?"_globally":""):"unpinned",r="topic_statuses.".concat(i,".help");return n.default.t(r)},isHidden:function(e,t,n){return t||!e&&!n}},"reasonText",[a],Object.getOwnPropertyDescriptor(o,"reasonText"),o),l(o,"isHidden",[s],Object.getOwnPropertyDescriptor(o,"isHidden"),o),o));e.default=u})),define("select-kit/components/pinned-options",["exports","@ember/object","select-kit/components/dropdown-select-box","I18n"],(function(e,t,n,i){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a,s,o,l,u,c,d="unpinned",p=n.default.extend((r={pluginApiIdentifiers:["pinned-options"],classNames:["pinned-options"],selectKitOptions:{showCaret:!0},modifySelection:function(e){var t=this.get("topic.pinned_globally"),n=this.value?"pinned".concat(t?"_globally":""):d,r=i.default.t("topic_statuses.".concat(n,".title"));return e.label="".concat(r,"").htmlSafe(),e.title=r,e.name=n,e.icon="thumbtack".concat(n===d?" unpinned":""),e},content:(0,t.computed)((function(){var e=this.topic.pinned_globally?"_globally":"";return[{id:"pinned",name:i.default.t("topic_statuses.pinned".concat(e,".title")),description:this.site.mobileView?null:i.default.t("topic_statuses.pinned".concat(e,".help")),icon:"thumbtack"},{id:d,name:i.default.t("topic_statuses.unpinned.title"),icon:"thumbtack unpinned",description:this.site.mobileView?null:i.default.t("topic_statuses.unpinned.help")}]})),onChange:function(e){var t=this.topic;return e===d?t.clearPin():t.rePin()}},a=r,s="onChange",o=[t.action],l=Object.getOwnPropertyDescriptor(r,"onChange"),u=r,c={},Object.keys(l).forEach((function(e){c[e]=l[e]})),c.enumerable=!!c.enumerable,c.configurable=!!c.configurable,("value"in c||c.initializer)&&(c.writable=!0),c=o.slice().reverse().reduce((function(e,t){return t(a,s,e)||e}),c),u&&void 0!==c.initializer&&(c.value=c.initializer?c.initializer.call(u):void 0,c.initializer=void 0),void 0===c.initializer&&(Object.defineProperty(a,s,c),c=null),r));e.default=p})),define("select-kit/components/search-advanced-category-chooser",["exports","select-kit/components/category-chooser"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["search-advanced-category-chooser"],classNames:["search-advanced-category-chooser"],selectKitOptions:{allowUncategorized:!0,clearable:!0,none:"category.all",displayCategoryDescription:!1,permissionType:null}});e.default=n})),define("select-kit/components/select-kit",["exports","@ember/object","select-kit/mixins/plugin-api","@ember/runloop","@ember/utils","@ember/component","I18n","@ember/object/mixin","rsvp","select-kit/mixins/utils","@popperjs/core","discourse-common/lib/deprecated","discourse-common/lib/debounce","@ember/object/internals","discourse-common/lib/helpers"],(function(e,t,n,i,r,a,s,o,l,u,c,d,p,m,f){"use strict";function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ERRORS_COLLECTION=e.MAIN_COLLECTION=void 0;var g="MAIN_COLLECTION";e.MAIN_COLLECTION=g;var b="ERRORS_COLLECTION";e.ERRORS_COLLECTION=b;var v=Object.freeze({}),y=o.default.create({mergedProperties:["selectKitOptions"],selectKitOptions:v});function _(){return"rtl"===window.getComputedStyle(document.querySelector("html")).direction}var w=a.default.extend(y,n.default,u.default,{pluginApiIdentifiers:["select-kit"],classNames:["select-kit"],classNameBindings:["selectKit.isLoading:is-loading","selectKit.isExpanded:is-expanded","selectKit.options.disabled:is-disabled","selectKit.isHidden:is-hidden","selectKit.hasSelection:has-selection"],tabindex:0,content:null,value:null,selectKit:null,mainCollection:null,errorsCollection:null,options:null,valueProperty:"id",nameProperty:"name",singleSelect:!1,multiSelect:!1,labelProperty:null,titleProperty:null,langProperty:null,init:function(){this._super.apply(this,arguments),this._searchPromise=null,this.set("errorsCollection",[]),this._collections=[b,g],!this.options&&this.set("options",t.default.create({})),this.handleDeprecations(),this.set("selectKit",t.default.create({uniqueID:(0,m.guidFor)(this),valueProperty:this.valueProperty,nameProperty:this.nameProperty,labelProperty:this.labelProperty,titleProperty:this.titleProperty,langProperty:this.langProperty,options:t.default.create(),isLoading:!1,isHidden:!1,isExpanded:!1,isFilterExpanded:!1,enterDisabled:!1,hasSelection:!1,hasNoContent:!0,highlighted:null,noneItem:null,newItem:null,filter:null,modifyContent:(0,i.bind)(this,this._modifyContentWrapper),modifySelection:(0,i.bind)(this,this._modifySelectionWrapper),modifyComponentForRow:(0,i.bind)(this,this._modifyComponentForRowWrapper),modifyContentForCollection:(0,i.bind)(this,this._modifyContentForCollectionWrapper),modifyComponentForCollection:(0,i.bind)(this,this._modifyComponentForCollectionWrapper),toggle:(0,i.bind)(this,this._toggle),close:(0,i.bind)(this,this._close),open:(0,i.bind)(this,this._open),highlightNext:(0,i.bind)(this,this._highlightNext),highlightPrevious:(0,i.bind)(this,this._highlightPrevious),change:(0,i.bind)(this,this._onChangeWrapper),select:(0,i.bind)(this,this.select),deselect:(0,i.bind)(this,this.deselect),deselectByValue:(0,i.bind)(this,this.deselectByValue),append:(0,i.bind)(this,this.append),onOpen:(0,i.bind)(this,this._onOpenWrapper),onClose:(0,i.bind)(this,this._onCloseWrapper),onInput:(0,i.bind)(this,this._onInput),onClearSelection:(0,i.bind)(this,this._onClearSelection),onHover:(0,i.bind)(this,this._onHover),onKeydown:(0,i.bind)(this,this._onKeydownWrapper)}))},click:function(e){this.selectKit.options.preventsClickPropagation&&e.stopPropagation()},_modifyComponentForRowWrapper:function(e,t){return this.modifyComponentForRow(e,t)||"select-kit/select-kit-row"},modifyComponentForRow:function(){},_modifyContentForCollectionWrapper:function(e){var t=this.modifyContentForCollection(e);if(!t)if(e===b)t=this.errorsCollection;else t=this.mainCollection;return t},modifyContentForCollection:function(){},_modifyComponentForCollectionWrapper:function(e){var t=this.modifyComponentForCollection(e);if(!t)if(e===b)t="select-kit/errors-collection";else t="select-kit/select-kit-collection";return t},modifyComponentForCollection:function(){},didUpdateAttrs:function(){this._super.apply(this,arguments),this.handleDeprecations()},willDestroyElement:function(){this._super.apply(this,arguments),this._searchPromise&&(0,i.cancel)(this._searchPromise),this.popper&&(this.popper.destroy(),this.popper=null)},didReceiveAttrs:function(){var e=this;this._super.apply(this,arguments);var n={};Object.keys(this.selectKitOptions).forEach((function(r){var a=e.selectKitOptions[r];if("componentForRow"!==r&&"contentForCollection"!==r&&"componentForCollection"!==r){if("string"==typeof a&&a.indexOf(".")<0&&a in e)if("function"!=typeof(0,t.get)(e,a))return void(n[r]=(0,t.get)(e,a));n[r]=a}else n[r]="string"==typeof a?function(){return a}:(0,i.bind)(e,a)})),this.selectKit.options.setProperties(Object.assign(n,this.options||{})),this.selectKit.setProperties({hasSelection:!(0,r.isEmpty)(this.value),noneItem:this._modifyNoSelectionWrapper(),newItem:null}),this.selectKit.isExpanded&&this.triggerSearch(),this.computeContent&&(this._deprecated("The `computeContent()` function is deprecated pass a `content` attribute or define a `content` computed property in your component."),this.set("content",this.computeContent()))},selectKitOptions:{showFullTitle:!0,none:null,translatedNone:null,filterable:!1,autoFilterable:"autoFilterable",filterIcon:"search",filterPlaceholder:"filterPlaceholder",translatedFilterPlaceholder:null,icon:null,icons:null,maximum:null,maximumLabel:null,minimum:null,minimumLabel:null,autoInsertNoneItem:!0,clearOnClick:!1,closeOnChange:!0,limitMatches:null,placement:_()?"bottom-end":"bottom-start",placementStrategy:null,filterComponent:"select-kit/select-kit-filter",selectedNameComponent:"selected-name",castInteger:!1,preventsClickPropagation:!1,focusAfterOnChange:!0,triggerOnChangeOnTab:!0,autofocus:!1},autoFilterable:(0,t.computed)("content.[]","selectKit.filter",(function(){return this.selectKit.filter&&this.options.autoFilterable&&this.content.length>15})),filterPlaceholder:(0,t.computed)("options.allowAny",(function(){return this.options.allowAny?"select_kit.filter_placeholder_with_any":"select_kit.filter_placeholder"})),collections:(0,t.computed)("selectedContent.[]","mainCollection.[]","errorsCollection.[]",(function(){var e=this;return this._collections.map((function(t){return{identifier:t,content:e.selectKit.modifyContentForCollection(t)}}))})),createContentFromInput:function(e){return e},validateCreate:function(e,t){var n=this;return this.clearErrors(),e.length>0&&t&&!t.map((function(e){return n.getValue(e)})).includes(e)&&!(0,f.makeArray)(this.value).includes(e)},validateSelect:function(){this.clearErrors();var e=(0,f.makeArray)(this.value),t=this.selectKit.options.maximum;if(t&&e.length>=t){var n=this.selectKit.options.maximumLabel||"select_kit.max_content_reached";return this.addError(s.default.t(n,{count:t})),!1}return!0},addError:function(e){var t=this;this.errorsCollection.pushObject(e),this._safeAfterRender((function(){return t.popper&&t.popper.update()}))},clearErrors:function(){!this.element||this.isDestroyed||this.isDestroying||this.set("errorsCollection",[])},prependCollection:function(e){this._collections.unshift(e)},appendCollection:function(e){this._collections.push(e)},insertCollectionAtIndex:function(e,t){this._collections.insertAt(t,e)},insertBeforeCollection:function(e,t){var n=this._collections.indexOf(e);this.insertCollectionAtIndex(t,n-1)},insertAfterCollection:function(e,t){var n=this._collections.indexOf(e);this.insertCollectionAtIndex(t,n+1)},_onInput:function(e){this.popper&&this.popper.update(),this._searchPromise&&(0,i.cancel)(this._searchPromise),(0,p.default)(this,this._debouncedInput,e.target.value,200)},_debouncedInput:function(e){this.selectKit.setProperties({filter:e,isLoading:!0}),this.triggerSearch(e)},_onChangeWrapper:function(e,t){var i=this;return this.selectKit.set("filter",null),new l.Promise((function(a){i.selectKit.valueProperty||i.selectKit.noneItem!==e||(e=null,t=[]),e=(0,f.makeArray)(e),t=(0,f.makeArray)(t),i.multiSelect&&(t=t.filter((function(e){return e!==i.newItem&&e!==i.noneItem&&null!==i.getValue(e)})),1===i.selectKit.options.maximum&&(e=e.slice(0,1),t=t.slice(0,1))),i.singleSelect&&(e=(0,r.isPresent)(e.firstObject)?e.firstObject:null,t=(0,r.isPresent)(t.firstObject)?t.firstObject:null),i._boundaryActionHandler("onChange",e,t),(0,n.applyOnChangePluginApiCallbacks)(e,t,i),a(t)})).finally((function(){i.isDestroying||i.isDestroyed||(i.selectKit.options.closeOnChange&&i.selectKit.close(),i.selectKit.options.focusAfterOnChange&&i._safeAfterRender((function(){i._focusFilter(),i.popper&&i.popper.update()})))}))},_modifyContentWrapper:function(e){return e=this.modifyContent(e),(0,n.applyContentPluginApiCallbacks)(e,this)},modifyContent:function(e){return e},_modifyNoSelectionWrapper:function(){return this.modifyNoSelection()},modifyNoSelection:function(){if(this.selectKit.options.translatedNone)return this.defaultItem(null,this.selectKit.options.translatedNone);var e,t=this.selectKit.options.none;if((0,r.isNone)(t)&&!this.selectKit.options.allowAny)return null;if((0,r.isNone)(t)&&this.selectKit.options.allowAny&&!this.selectKit.isExpanded)return null;if("string"===h(t))e=this.defaultItem(null,s.default.t(t));else e=t;return e},_modifySelectionWrapper:function(e){return this.modifySelection(e)},modifySelection:function(e){return e},_onKeydownWrapper:function(e){return this._boundaryActionHandler("onKeydown",e)},_onHover:function(e,t){(0,i.throttle)(this,this._highlight,t,25,!0)},_highlight:function(e){this.selectKit.set("highlighted",e)},_boundaryActionHandler:function(e){if(this.element&&!this.isDestroying&&!this.isDestroyed){for(var n=!0,i="_".concat(e),r=(0,t.get)(this,i),a=arguments.length,s=new Array(a>1?a-1:0),o=1;o-1}))),n},triggerSearch:function(e){this._searchPromise&&(0,i.cancel)(this._searchPromise),this._searchPromise=this._searchWrapper(e||this.selectKit.filter)},_searchWrapper:function(e){var t=this;this.clearErrors(),this.setProperties({mainCollection:[],"selectKit.isLoading":!0,"selectKit.enterDisabled":!0}),this._safeAfterRender((function(){return t.popper&&t.popper.update()}));var n=[];return l.Promise.resolve(this.search(e)).then((function(i){n=n.concat((0,f.makeArray)(i)),n=t.selectKit.modifyContent(n).filter(Boolean),n=t.selectKit.valueProperty?n.uniqBy(t.selectKit.valueProperty):n.uniq(),t.selectKit.options.limitMatches&&(n=n.slice(0,t.selectKit.options.limitMatches));var a=t.selectKit.noneItem;t.selectKit.options.allowAny&&e&&t.getName(a)!==e&&(e=t.createContentFromInput(e),t.validateCreate(e,n)&&(t.selectKit.set("newItem",t.defaultItem(e,e)),n.unshift(t.selectKit.newItem)));var s=(0,r.isEmpty)(n);t.selectKit.hasSelection&&a&&t.selectKit.options.autoInsertNoneItem&&n.unshift(a),t.set("mainCollection",n),t.selectKit.setProperties({highlighted:t.singleSelect&&t.value?t.itemForValue(t.value,t.mainCollection):t.mainCollection.firstObject,isLoading:!1,hasNoContent:s}),t._safeAfterRender((function(){t.popper&&t.popper.update(),t._focusFilter()}))})).finally((function(){t.isDestroyed||t.isDestroying||t.set("selectKit.enterDisabled",!1)}))},_safeAfterRender:function(e){var t=this;(0,i.next)((function(){(0,i.schedule)("afterRender",(function(){!t.element||t.isDestroyed||t.isDestroying||e()}))}))},_scrollToRow:function(e){var t=this.getValue(e),n=this.element.querySelector('.select-kit-row[data-value="'.concat(t,'"]'));if(n){var i=n.parentNode;i.scrollTop=n.offsetTop-i.offsetTop}},_highlightNext:function(){var e=this.mainCollection.indexOf(this.selectKit.highlighted);e0?e-=1:e=t-1;var n=this.mainCollection.objectAt(e);n&&(this._scrollToRow(n),this.set("selectKit.highlighted",n))},select:function(e,t){if((0,r.isPresent)(e)){if(this.findValue(this.mainCollection,t)&&!this.validateSelect(t))return;this.selectKit.change(e,t||this.defaultItem(e,e))}else{if(!this.validateSelect(this.selectKit.highlighted))return;this.selectKit.change(this.getValue(this.selectKit.highlighted),this.selectKit.highlighted)}},_onClearSelection:function(){this.selectKit.change(null,null)},_onOpenWrapper:function(){return this._boundaryActionHandler("onOpen")},_onCloseWrapper:function(){return this.set("selectKit.highlighted",null),this._boundaryActionHandler("onClose")},_toggle:function(e){this.selectKit.isExpanded?this._close(e):this._open(e)},_close:function(e){this.selectKit.isExpanded&&(this.clearErrors(),this.selectKit.onClose(e),this.selectKit.setProperties({isExpanded:!1,filter:null}))},_open:function(e){var t=this;if(!this.selectKit.isExpanded){if(this.clearErrors(),this.selectKit.onOpen(e),!this.popper){var n=document.querySelector("#".concat(this.selectKit.uniqueID,"-header")),i=document.querySelector("#".concat(this.selectKit.uniqueID,"-body")),r=$(this.element).parents("#discourse-modal").length,a=this.selectKit.options.placementStrategy;a||(a=r?"fixed":"absolute");this.popper=(0,c.createPopper)(n,i,{eventsEnabled:!1,strategy:a,placement:this.selectKit.options.placement,modifiers:[{name:"offset",options:{offset:[0,3]}},{name:"applySmallScreenOffset",enabled:window.innerWidth<=450,phase:"main",fn:function(e){var t=e.state;if(!r){var n=t.elements.reference.getBoundingClientRect().x;t.modifiersData.popperOffsets.x=10-n}}},{name:"applySmallScreenMaxWidth",enabled:window.innerWidth<=450,phase:"beforeWrite",fn:function(e){var n=e.state;if(r){var i=document.querySelector("#discourse-modal div.modal-inner-container");i&&(t.multiSelect?n.styles.popper.width="".concat(t.element.offsetWidth,"px"):n.styles.popper.width="".concat(i.clientWidth-20,"px"))}else n.styles.popper.width="".concat(window.innerWidth-20,"px")}},{name:"sameWidth",enabled:window.innerWidth>450,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.minWidth="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state;t.elements.popper.style.minWidth="".concat(t.elements.reference.offsetWidth,"px")}},{name:"positionWrapper",phase:"afterWrite",enabled:!0,fn:function(e){var n=t.element.querySelector(".select-kit-wrapper");if(n){var i=t.element.offsetHeight+3,r=t.element.querySelector(".select-kit-body");r&&(i+=r.offsetHeight);var s=e.state.elements.popper,o=s&&s.getAttribute("data-popper-placement").startsWith("top-");if(o?(t.element.classList.remove("is-under"),t.element.classList.add("is-above")):(t.element.classList.remove("is-above"),t.element.classList.add("is-under")),n.style.width="".concat(t.element.offsetWidth,"px"),n.style.height="".concat(i,"px"),"fixed"===a){var l=t.element.getClientRects()[0];if(l){var u=r&&r.getClientRects()[0];n.style.position="fixed",n.style.left="".concat(l.left,"px"),n.style.top="".concat(o&&u?l.top-u.height:l.top,"px"),_()&&(n.style.right="unset")}}}}}]})}this.selectKit.setProperties({isExpanded:!0,isFilterExpanded:this.selectKit.options.filterable||this.selectKit.options.allowAny}),this.triggerSearch(),this._safeAfterRender((function(){t._focusFilter(),t._scrollToCurrent(),t.popper&&t.popper.update()}))}},_scrollToCurrent:function(){if(this.value&&this.mainCollection){var e;if(this.valueProperty)e=this.mainCollection.findBy(this.valueProperty,this.value);else{var t=this.mainCollection.indexOf(this.value);e=this.mainCollection.objectAt(t)}e&&(this._scrollToRow(e),this.set("selectKit.highlighted",e))}},_focusFilter:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._safeAfterRender((function(){var n=e.getFilterInput();if(!t&&n)n.focus({preventScroll:!0});else if(!e.selectKit.options.preventHeaderFocus){var i=e.getHeader();i&&i.focus({preventScroll:!0})}}))},getFilterInput:function(){return document.querySelector("#".concat(this.selectKit.uniqueID,"-filter input"))},getHeader:function(){return document.querySelector("#".concat(this.selectKit.uniqueID,"-header"))},handleDeprecations:function(){this._deprecateValueAttribute(),this._deprecateMutations(),this._deprecateOptions()},_deprecated:function(e){var t=document.getElementById("data-discourse-setup");t&&"development"===t.getAttribute("data-environment")&&(0,d.default)(e,{since:"v2.4.0"})},_deprecateValueAttribute:function(){(this.valueAttribute||null===this.valueAttribute)&&(this._deprecated("The `valueAttribute` is deprecated. Use `valueProperty` instead"),this.set("valueProperty",this.valueAttribute))},_deprecateMutations:function(){var e=this;this.actions=this.actions||{},this.attrs=this.attrs||{},this.attrs.onChange||this.actions.onChange||(this._deprecated("Implicit mutation has been deprecated, please use `onChange` handler"),this.actions.onChange=this.attrs.onSelect||this.actions.onSelect||function(t){return e.set("value",t)})},_deprecateOptions:function(){var e=this,t={headerIcon:"icon",onExpand:"onOpen",onCollapse:"onClose",allowAny:"options.allowAny",allowCreate:"options.allowAny",filterable:"options.filterable",excludeCategoryId:"options.excludeCategoryId",scopedCategoryId:"options.scopedCategoryId",allowUncategorized:"options.allowUncategorized",none:"options.none",rootNone:"options.none",disabled:"options.disabled",rootNoneLabel:"options.none",showFullTitle:"options.showFullTitle",title:"options.translatedNone",maximum:"options.maximum",minimum:"options.minimum",i18nPostfix:"options.i18nPostfix",i18nPrefix:"options.i18nPrefix",castInteger:"options.castInteger"};Object.keys(t).forEach((function(n){var i=t[n];e.get(n)&&!e.get(i)&&(e._deprecated("The `".concat(n,"` attribute is deprecated. Use `").concat(i,"` instead")),e.set(i,e.get(n)))}))}});e.default=w})),define("select-kit/components/select-kit/errors-collection",["exports","@ember/component","@ember/object/computed","select-kit/templates/components/select-kit/errors-collection"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t.default.extend({layout:i.default,classNames:["select-kit-errors-collection"],classNameBindings:["shouldHide:hidden"],tagName:"ul",shouldHide:(0,n.empty)("collection.content")});e.default=r})),define("select-kit/components/select-kit/select-kit-body",["exports","@ember/component","@ember/runloop","@ember/object","select-kit/templates/components/select-kit/select-kit-body"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({layout:r.default,classNames:["select-kit-body"],attributeBindings:["role"],classNameBindings:["emptyBody:empty-body"],emptyBody:(0,i.computed)("selectKit.{filter,hasNoContent}",(function(){return!this.selectKit.filter&&this.selectKit.hasNoContent})),rootEventType:"click",role:"listbox",init:function(){this._super.apply(this,arguments),this.handleRootMouseDownHandler=(0,n.bind)(this,this.handleRootMouseDown)},didInsertElement:function(){this._super.apply(this,arguments),document.addEventListener(this.rootEventType,this.handleRootMouseDownHandler,!0)},willDestroyElement:function(){this._super.apply(this,arguments),document.removeEventListener(this.rootEventType,this.handleRootMouseDownHandler,!0)},handleRootMouseDown:function(e){if(this.selectKit.isExpanded){var t=document.querySelector("#".concat(this.selectKit.uniqueID,"-header"));t&&t.contains(e.target)||this.element.contains(e.target)||this.selectKit.close(e)}}});e.default=a})),define("select-kit/components/select-kit/select-kit-collection",["exports","@ember/component","@ember/object/computed","select-kit/templates/components/select-kit/select-kit-collection"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t.default.extend({layout:i.default,classNames:["select-kit-collection"],classNameBindings:["shouldHide:hidden"],tagName:"ul",shouldHide:(0,n.empty)("collection")});e.default=r})),define("select-kit/components/select-kit/select-kit-create-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/select-kit/select-kit-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:"create"});e.default=i})),define("select-kit/components/select-kit/select-kit-filter",["exports","@ember/component","I18n","select-kit/mixins/utils","@ember/object","discourse-common/utils/decorators","@ember/utils","select-kit/templates/components/select-kit/select-kit-filter","@ember/object/computed"],(function(e,t,n,i,r,a,s,o,l){"use strict";var u,c;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var d,p,m,f,h,g,b=t.default.extend(i.default,(u=(0,a.default)("selectKit.options.filterPlaceholder","selectKit.options.translatedFilterPlaceholder"),c={layout:o.default,classNames:["select-kit-filter"],classNameBindings:["isExpanded:is-expanded"],attributeBindings:["role"],role:"searchbox",isHidden:(0,r.computed)("selectKit.options.{filterable,allowAny,autoFilterable}","content.[]",(function(){return!this.selectKit.options.filterable&&!this.selectKit.options.allowAny&&!this.selectKit.options.autoFilterable})),isExpanded:(0,l.not)("isHidden"),placeholder:function(e,t){return(0,s.isPresent)(t)?t:(0,s.isPresent)(e)?n.default.t(e):""},actions:{onPaste:function(){},onInput:function(e){return this.selectKit.onInput(e),!0},onKeyup:function(e){return 13!==e.keyCode||!this.selectKit.enterDisabled||(this.element.querySelector("input").focus(),e.preventDefault(),e.stopPropagation(),!1)},onKeydown:function(e){return!!this.selectKit.onKeydown(e)&&(37===e.keyCode||39===e.keyCode||(38===e.keyCode?(this.selectKit.highlightPrevious(),!1):40===e.keyCode?(this.selectKit.highlightNext(),!1):27===e.keyCode?(this.selectKit.close(e),!1):13===e.keyCode&&this.selectKit.highlighted?(this.selectKit.select(this.getValue(this.selectKit.highlighted),this.selectKit.highlighted),!1):13!==e.keyCode||this.selectKit.highlighted&&!this.selectKit.enterDisabled?9===e.keyCode?(this.selectKit.highlighted&&this.selectKit.isExpanded&&this.selectKit.select(this.getValue(this.selectKit.highlighted),this.selectKit.highlighted),void this.selectKit.close(e)):void this.selectKit.set("highlighted",null):(this.element.querySelector("input").focus(),this.selectKit.enterDisabled&&(e.preventDefault(),e.stopPropagation()),!1)))}}},d=c,p="placeholder",m=[u],f=Object.getOwnPropertyDescriptor(c,"placeholder"),h=c,g={},Object.keys(f).forEach((function(e){g[e]=f[e]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=m.slice().reverse().reduce((function(e,t){return t(d,p,e)||e}),g),h&&void 0!==g.initializer&&(g.value=g.initializer?g.initializer.call(h):void 0,g.initializer=void 0),void 0===g.initializer&&(Object.defineProperty(d,p,g),g=null),c));e.default=b})),define("select-kit/components/select-kit/select-kit-header",["exports","@ember/component","select-kit/mixins/utils","@ember/object","discourse-common/lib/helpers","@ember/runloop"],(function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=t.default.extend(n.default,{eventType:"click",click:function(e){"undefined"!=typeof document&&(this.isDestroyed||!this.selectKit||this.selectKit.isDisabled||"click"===this.eventType&&0===e.button&&(this.selectKit.toggle(e),e.preventDefault()))},classNames:["select-kit-header"],classNameBindings:["isFocused"],attributeBindings:["tabindex","ariaOwns:aria-owns","ariaHasPopup:aria-haspopup","ariaIsExpanded:aria-expanded","headerRole:role","selectedValue:data-value","selectedNames:data-name","buttonTitle:title"],selectedValue:(0,i.computed)("value",(function(){return this.value===this.getValue(this.selectKit.noneItem)?null:(0,r.makeArray)(this.value).join(",")})),selectedNames:(0,i.computed)("selectedContent.[]",(function(){var e=this;return(0,r.makeArray)(this.selectedContent).map((function(t){return e.getName(t)})).join(",")})),buttonTitle:(0,i.computed)("value","selectKit.noneItem",(function(){if(!this.value&&this.selectKit.noneItem&&!this.selectKit.options.showFullTitle)return this.selectKit.noneItem.title||this.selectKit.noneItem.name})),icons:(0,i.computed)("selectKit.options.{icon,icons}",(function(){var e=(0,r.makeArray)(this.selectKit.options.icon),t=(0,r.makeArray)(this.selectKit.options.icons);return e.concat(t).filter(Boolean)})),ariaIsExpanded:(0,i.computed)("selectKit.isExpanded",(function(){return this.selectKit.isExpanded?"true":"false"})),ariaHasPopup:"menu",ariaOwns:(0,i.computed)("selectKit.uniqueID",(function(){return"".concat(this.selectKit.uniqueID,"-body")})),headerRole:"listbox",tabindex:0,didInsertElement:function(){this._super.apply(this,arguments),this.selectKit.options.autofocus&&this.set("isFocused",!0)},keyUp:function(e){32===e.keyCode&&e.preventDefault()},keyDown:function(e){var t=this;if(!this.selectKit.isDisabled){if(!this.selectKit.onKeydown(e))return!1;var n=e.shiftKey&&16===e.keyCode;if(!e.metaKey&&!n)if(13===e.keyCode)if(this.selectKit.isExpanded){if(this.selectKit.highlighted)return this.selectKit.select(this.getValue(this.selectKit.highlighted),this.selectKit.highlighted),!1}else this.selectKit.close(e);else{if(38===e.keyCode)return this.selectKit.isExpanded?this.selectKit.highlightPrevious():this.selectKit.open(e),!1;if(40===e.keyCode)return this.selectKit.isExpanded?this.selectKit.highlightNext():this.selectKit.open(e),!1;if(37===e.keyCode||39===e.keyCode)return!0;if(32===e.keyCode)e.preventDefault(),this.selectKit.toggle(e);else if(27===e.keyCode)this.selectKit.close(e);else if(8===e.keyCode)this._focusFilterInput();else if(9===e.keyCode)this.selectKit.highlighted&&this.selectKit.isExpanded&&this.selectKit.options.triggerOnChangeOnTab&&this.selectKit.select(this.getValue(this.selectKit.highlighted),this.selectKit.highlighted),this.selectKit.close(e);else{if(!(this.selectKit.options.filterable||this.selectKit.options.autoFilterable||this.selectKit.options.allowAny))return!this.selectKit.isExpanded;this.selectKit.isExpanded?this._focusFilterInput():(this.selectKit.open(e),(0,a.schedule)("afterRender",(function(){return t._focusFilterInput()})))}}}},_focusFilterInput:function(){var e=document.querySelector("#".concat(this.selectKit.uniqueID,"-filter"));if(e){e.style.display="flex";var t=e.querySelector(".filter-input");t&&t.focus()}}});e.default=s})),define("select-kit/components/select-kit/select-kit-none-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/select-kit/select-kit-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:"none"});e.default=i})),define("select-kit/components/select-kit/select-kit-row",["exports","@ember/object","@ember/component","I18n","select-kit/mixins/utils","@ember/object/internals","select-kit/templates/components/select-kit/select-kit-row","discourse-common/lib/helpers","@ember/object/computed"],(function(e,t,n,i,r,a,s,o,l){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c,d,p,m,f,h,g=n.default.extend(r.default,(u={layout:s.default,classNames:["select-kit-row"],tagName:"li",tabIndex:-1,attributeBindings:["tabIndex","title","rowValue:data-value","rowName:data-name","ariaLabel:aria-label","ariaSelected:aria-selected","guid:data-guid","rowLang:lang","role"],classNameBindings:["isHighlighted","isSelected","isNone","isNone:none","item.classNames"],didInsertElement:function(){this._super.apply(this,arguments),this.element.addEventListener("mouseenter",this.handleMouseEnter)},willDestroyElement:function(){this._super.apply(this,arguments),this.element&&this.element.removeEventListener("mouseenter",this.handleMouseEnter)},isNone:(0,t.computed)("rowValue",(function(){return this.rowValue===this.getValue(this.selectKit.noneItem)})),role:"option",guid:(0,t.computed)("item",(function(){return(0,a.guidFor)(this.item)})),lang:(0,l.reads)("item.lang"),ariaLabel:(0,t.computed)("item.ariaLabel","title",(function(){return this.getProperty(this.item,"ariaLabel")||this.title})),ariaSelected:(0,t.computed)("isSelected",(function(){return this.isSelected?"true":"false"})),title:(0,t.computed)("rowTitle","item.title","rowName",(function(){return this.rowTitle||this.getProperty(this.item,"title")||this.rowName})),label:(0,t.computed)("rowLabel","item.label","title","rowName",(function(){var e=this.rowLabel||this.getProperty(this.item,"label")||this.title||this.rowName;return this.selectKit.options.allowAny&&this.rowValue===this.selectKit.filter&&this.getName(this.selectKit.noneItem)!==this.rowName&&this.getName(this.selectKit.newItem)===this.rowName?i.default.t("select_kit.create",{content:e}):e})),didReceiveAttrs:function(){this._super.apply(this,arguments),this.setProperties({rowName:this.getName(this.item),rowValue:this.getValue(this.item),rowLabel:this.getProperty(this.item,"labelProperty"),rowTitle:this.getProperty(this.item,"titleProperty"),rowLang:this.getProperty(this.item,"langProperty")})},icons:(0,t.computed)("item.{icon,icons}",(function(){var e=(0,o.makeArray)(this.getProperty(this.item,"icon")),t=(0,o.makeArray)(this.getProperty(this.item,"icons"));return e.concat(t).filter(Boolean)})),highlightedValue:(0,t.computed)("selectKit.highlighted",(function(){return this.getValue(this.selectKit.highlighted)})),isHighlighted:(0,t.computed)("rowValue","highlightedValue",(function(){return this.rowValue===this.highlightedValue})),isSelected:(0,t.computed)("rowValue","value",(function(){return this.rowValue===this.value})),handleMouseEnter:function(){return this.isDestroying&&this.isDestroyed||this.selectKit.onHover(this.rowValue,this.item),!1},click:function(){return this.selectKit.select(this.rowValue,this.item),!1},mouseDown:function(e){this.selectKit.options.preventHeaderFocus&&e.preventDefault()}},c=u,d="handleMouseEnter",p=[t.action],m=Object.getOwnPropertyDescriptor(u,"handleMouseEnter"),f=u,h={},Object.keys(m).forEach((function(e){h[e]=m[e]})),h.enumerable=!!h.enumerable,h.configurable=!!h.configurable,("value"in h||h.initializer)&&(h.writable=!0),h=p.slice().reverse().reduce((function(e,t){return t(c,d,e)||e}),h),f&&void 0!==h.initializer&&(h.value=h.initializer?h.initializer.call(f):void 0,h.initializer=void 0),void 0===h.initializer&&(Object.defineProperty(c,d,h),h=null),u));e.default=g})),define("select-kit/components/select-kit/single-select-header",["exports","@ember/object","select-kit/components/select-kit/select-kit-header","select-kit/mixins/utils","select-kit/templates/components/select-kit/single-select-header","I18n"],(function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n.default.extend(i.default,{layout:r.default,classNames:["single-select-header"],attributeBindings:["role","name"],role:"combobox",name:(0,t.computed)("selectedContent.name",(function(){return this.selectedContent?a.default.t("select_kit.filter_by",{name:this.selectedContent.name}):a.default.t("select_kit.select_to_filter")})),mouseDown:function(e){this.selectKit.options.preventHeaderFocus&&e.preventDefault()}});e.default=s})),define("select-kit/components/selected-color",["exports","select-kit/components/selected-name","discourse/lib/utilities","@ember/runloop"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t.default.extend({classNames:["select-kit-selected-color"],didInsertElement:function(){var e=this;this._super.apply(this,arguments),(0,i.schedule)("afterRender",(function(){var t=(0,n.escapeExpression)(e.name),i=document.querySelector('[data-value="'.concat(t,'"]'));i&&(i.style.borderBottom="2px solid transparent",i.style.borderBottomColor="#".concat(t))}))}});e.default=r})),define("select-kit/components/selected-name",["exports","@ember/object","@ember/component","select-kit/mixins/utils","select-kit/templates/components/selected-name","discourse-common/lib/helpers","@ember/object/computed"],(function(e,t,n,i,r,a,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l,u,c,d,p,m,f=n.default.extend(i.default,(o={tagName:"",layout:r.default,name:null,value:null,headerTitle:null,headerLang:null,headerLabel:null,onSelectedNameClick:function(){if(this.selectKit.options.clearOnClick)return this.selectKit.deselect(this.item),!1},didReceiveAttrs:function(){this._super.apply(this,arguments),this.setProperties({headerLabel:this.getProperty(this.item,"labelProperty"),headerTitle:this.getProperty(this.item,"titleProperty"),headerLang:this.getProperty(this.item,"langProperty"),name:this.getName(this.item),value:this.item===this.selectKit.noneItem?null:this.getValue(this.item)})},lang:(0,s.reads)("headerLang"),ariaLabel:(0,t.computed)("item","sanitizedTitle",(function(){return this._safeProperty("ariaLabel",this.item)||this.sanitizedTitle})),sanitizedTitle:(0,t.computed)("title",(function(){return String(this.title).replace("…","")})),title:(0,t.computed)("headerTitle","item",(function(){return this.headerTitle||this._safeProperty("title",this.item)||this.name||""})),label:(0,t.computed)("headerLabel","title","name",(function(){return this.headerLabel||this._safeProperty("label",this.item)||this.title||this.name})),icons:(0,t.computed)("item.{icon,icons}",(function(){var e=(0,a.makeArray)(this._safeProperty("icon",this.item)),t=(0,a.makeArray)(this._safeProperty("icons",this.item));return e.concat(t).filter(Boolean)})),_safeProperty:function(e,n){return n?(0,t.get)(n,e):null}},l=o,u="onSelectedNameClick",c=[t.action],d=Object.getOwnPropertyDescriptor(o,"onSelectedNameClick"),p=o,m={},Object.keys(d).forEach((function(e){m[e]=d[e]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=c.slice().reverse().reduce((function(e,t){return t(l,u,e)||e}),m),p&&void 0!==m.initializer&&(m.value=m.initializer?m.initializer.call(p):void 0,m.initializer=void 0),void 0===m.initializer&&(Object.defineProperty(l,u,m),m=null),o));e.default=f})),define("select-kit/components/single-select",["exports","select-kit/components/select-kit","@ember/object","@ember/utils","select-kit/templates/components/single-select"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend({pluginApiIdentifiers:["single-select"],layout:r.default,classNames:["single-select"],singleSelect:!0,selectKitOptions:{headerComponent:"select-kit/single-select-header"},selectedContent:(0,n.computed)("value","content.[]","selectKit.noneItem",(function(){if((0,i.isEmpty)(this.value))return this.selectKit.noneItem;var e,t=this.selectKit.options.castInteger&&this._isNumeric(this.value)?Number(this.value):this.value;return this.selectKit.valueProperty?(e=(this.content||[]).findBy(this.selectKit.valueProperty,t),this.selectKit.modifySelection(e||this.defaultItem(t,t))):this.selectKit.modifySelection((this.content||[]).filter((function(e){return e===t})))}))});e.default=a})),define("select-kit/components/tag-chooser-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/tag-chooser-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:["tag-chooser-row"]});e.default=i})),define("select-kit/components/tag-chooser",["exports","select-kit/components/multi-select","select-kit/mixins/tags","@ember/object","discourse-common/lib/helpers"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend(n.default,{pluginApiIdentifiers:["tag-chooser"],classNames:["tag-chooser"],selectKitOptions:{filterable:!0,filterPlaceholder:"tagging.choose_for_topic",limit:null,allowAny:"canCreateTag",maximum:"maximumTagCount"},modifyComponentForRow:function(){return"tag-chooser-row"},blockedTags:null,attributeBindings:["categoryId"],excludeSynonyms:!1,excludeHasSynonyms:!1,canCreateTag:(0,i.computed)("site.can_create_tag","allowCreate",(function(){return this.allowCreate&&this.site.can_create_tag})),maximumTagCount:(0,i.computed)("siteSettings.max_tags_per_topic","unlimitedTagCount",(function(){return this.unlimitedTagCount?null:parseInt(this.options.limit||this.options.maximum||this.get("siteSettings.max_tags_per_topic"),10)})),init:function(){this._super.apply(this,arguments),this.setProperties({blockedTags:this.blockedTags||[],termMatchesForbidden:!1,termMatchErrorMessage:null})},value:(0,i.computed)("tags.[]",(function(){return(0,r.makeArray)(this.tags).uniq()})),content:(0,i.computed)("tags.[]",(function(){var e=this;return(0,r.makeArray)(this.tags).uniq().map((function(t){return e.defaultItem(t,t)}))})),actions:{onChange:function(e,t){this.attrs.onChange?this.attrs.onChange(e,t):this.set("tags",e)}},search:function(e){var t=(0,r.makeArray)(this.tags).filter(Boolean),n={q:e,limit:this.get("siteSettings.max_tag_search_results"),categoryId:this.categoryId};return(t.length||this.blockedTags.length)&&(n.selected_tags=t.concat(this.blockedTags).uniq().slice(0,100)),this.everyTag||(n.filterForInput=!0),this.excludeSynonyms&&(n.excludeSynonyms=!0),this.excludeHasSynonyms&&(n.excludeHasSynonyms=!0),this.searchTags("/tags/filter/search",n,this._transformJson)},_transformJson:function(e,t){var n=t.results;return e.setProperties({termMatchesForbidden:!!t.forbidden,termMatchErrorMessage:t.forbidden_message}),e.blockedTags&&(n=n.filter((function(t){return!e.blockedTags.includes(t.id)}))),e.get("siteSettings.tags_sort_alphabetically")&&(n=n.sort((function(e,t){return e.id>t.id}))),n.uniqBy("text").map((function(e){return{id:e.text,name:e.text,count:e.count}}))}});e.default=a})),define("select-kit/components/tag-drop",["exports","@ember/object/computed","discourse/lib/computed","select-kit/components/combo-box","discourse/lib/url","select-kit/mixins/tags","@ember/object","discourse-common/lib/helpers","select-kit/components/select-kit"],(function(e,t,n,i,r,a,s,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.NONE_TAG_ID=e.ALL_TAGS_ID=e.NO_TAG_ID=void 0;var u="no-tags";e.NO_TAG_ID=u;var c="all-tags";e.ALL_TAGS_ID=c;var d="none";e.NONE_TAG_ID=d;var p="MORE_TAGS_COLLECTION",m=i.default.extend(a.default,{pluginApiIdentifiers:["tag-drop"],classNameBindings:["categoryStyle","tagClass"],classNames:["tag-drop"],value:(0,t.readOnly)("tagId"),tagName:"li",categoryStyle:(0,n.setting)("category_style"),maxTagSearchResults:(0,n.setting)("max_tag_search_results"),sortTagsAlphabetically:(0,n.setting)("tags_sort_alphabetically"),maxTagsInFilterList:(0,n.setting)("max_tags_in_filter_list"),shouldShowMoreTags:(0,s.computed)("maxTagsInFilterList","topTags.[]",(function(){return this.topTags.length>this.maxTagsInFilterList})),selectKitOptions:{allowAny:!1,caretDownIcon:"caret-right",caretUpIcon:"caret-down",fullWidthOnMobile:!0,filterable:!0,headerComponent:"tag-drop/tag-drop-header",autoInsertNoneItem:!1},noTagsSelected:(0,t.equal)("tagId",d),filterable:(0,t.gte)("content.length",15),init:function(){this._super.apply(this,arguments),this.insertAfterCollection(l.MAIN_COLLECTION,p)},modifyComponentForCollection:function(e){if(e===p)return"tag-drop/more-tags-collection"},modifyContentForCollection:function(e){if(e===p)return{shouldShowMoreTags:this.shouldShowMoreTags}},modifyNoSelection:function(){return this.noTagsSelected?this.defaultItem(u,this.noTagsLabel):this.defaultItem(c,this.allTagsLabel)},modifySelection:function(e){return this.tagId&&(e=this.noTagsSelected?this.defaultItem(u,this.noTagsLabel):this.defaultItem(this.tagId,this.tagId)),e},tagClass:(0,s.computed)("tagId",(function(){return this.tagId?"tag-".concat(this.tagId):"tag_all"})),allTagsLabel:(0,n.i18n)("tagging.selector_all_tags"),noTagsLabel:(0,n.i18n)("tagging.selector_no_tags"),modifyComponentForRow:function(){return"tag-row"},shortcuts:(0,s.computed)("tagId",(function(){var e=[];return this.tagId!==d&&e.push({id:u,name:this.noTagsLabel}),this.tagId&&e.push({id:c,name:this.allTagsLabel}),e})),topTags:(0,s.computed)("currentCategory","site.category_top_tags.[]","site.top_tags.[]",(function(){return this.currentCategory&&this.site.category_top_tags?this.site.category_top_tags||[]:this.site.top_tags||[]})),content:(0,s.computed)("topTags.[]","shortcuts.[]",(function(){var e=this.topTags.slice(0,this.maxTagsInFilterList);return this.sortTagsAlphabetically&&e?this.shortcuts.concat(e.sort()):this.shortcuts.concat((0,o.makeArray)(e))})),search:function(e){var t=this;if(e){var n={q:e,limit:this.maxTagSearchResults};return this.searchTags("/tags/filter/search",n,this._transformJson)}return(this.content||[]).map((function(e){return e.id&&e.name?e:t.defaultItem(e,e)}))},_transformJson:function(e,t){return t.results.sort((function(e,t){return e.id>t.id})).map((function(t){var n=e.defaultItem(t.id,t.text);return n.targetTagId=t.target_tag||t.id,n.count=t.count,n.pmCount=t.pm_count,n}))},actions:{onChange:function(e,t){e===u?e=d:e===c?e=null:t&&t.targetTagId&&(e=t.targetTagId),r.default.routeToUrl((0,r.getCategoryAndTagUrl)(this.currentCategory,!this.noSubcategories,e))}}});e.default=m})),define("select-kit/components/tag-drop/more-tags-collection",["exports","@ember/component","select-kit/templates/components/tag-drop/more-tags-collection"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({tagName:"",layout:n.default,collection:null});e.default=i})),define("select-kit/components/tag-drop/tag-drop-header",["exports","select-kit/components/combo-box/combo-box-header","select-kit/templates/components/tag-drop/tag-drop-header"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:"tag-drop-header"});e.default=i})),define("select-kit/components/tag-group-chooser",["exports","select-kit/components/multi-select","select-kit/mixins/tags","@ember/object","discourse-common/lib/helpers"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t.default.extend(n.default,{pluginApiIdentifiers:["tag-group-chooser"],classNames:["tag-group-chooser","tag-chooser"],selectKitOptions:{allowAny:!1,filterable:!0,filterPlaceholder:"category.tag_groups_placeholder",limit:null},modifyComponentForRow:function(){return"tag-chooser-row"},value:(0,i.computed)("tagGroups.[]",(function(){return(0,r.makeArray)(this.tagGroups).uniq()})),content:(0,i.computed)("tagGroups.[]",(function(){var e=this;return(0,r.makeArray)(this.tagGroups).uniq().map((function(t){return e.defaultItem(t,t)}))})),actions:{onChange:function(e){this.set("tagGroups",e)}},search:function(e){var t=this,n={q:e,limit:this.get("siteSettings.max_tag_search_results")};return this.searchTags("/tag_groups/filter/search",n,this._transformJson).then((function(e){if(e&&e.length)return e.filter((function(e){return!(0,r.makeArray)(t.tagGroups).includes(t.getValue(e))}))}))},_transformJson:function(e,t){return t.results.sort((function(e,t){return e.name>t.name})).map((function(e){return{id:e.name,name:e.name,count:e.count}}))}});e.default=a})),define("select-kit/components/tag-notifications-button",["exports","select-kit/components/notifications-button"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["tag-notifications-button"],classNames:["tag-notifications-button"],selectKitOptions:{showFullTitle:!1,i18nPrefix:"tagging.notifications"}});e.default=n})),define("select-kit/components/tag-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/tag-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:["tag-row"]});e.default=i})),define("select-kit/components/tags-intersection-chooser",["exports","discourse/lib/url","select-kit/components/mini-tag-chooser","discourse-common/lib/helpers","@ember/object"],(function(e,t,n,i,r){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s,o,l,u,c,d,p=n.default.extend((a={pluginApiIdentifiers:["tags-intersection-chooser"],attributeBindings:["selectKit.options.categoryId:category-id"],classNames:["tags-intersection-chooser"],mainTag:null,additionalTags:null,didReceiveAttrs:function(){this._super.apply(this,arguments),this.set("value",(0,i.makeArray)(this.mainTag).concat((0,i.makeArray)(this.additionalTags)))},onChange:function(e){var n=this;if(e.includes(this.mainTag)){var i=e.filter((function(e){return e!==n.mainTag}));i.length>=1?t.default.routeTo("/tags/intersection/".concat(this.mainTag,"/").concat(i.join("/"))):t.default.routeTo("/tags")}else e.length>=2?t.default.routeTo("/tags/intersection/".concat(e.join("/"))):t.default.routeTo("/tags")}},s=a,o="onChange",l=[r.action],u=Object.getOwnPropertyDescriptor(a,"onChange"),c=a,d={},Object.keys(u).forEach((function(e){d[e]=u[e]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(e,t){return t(s,o,e)||e}),d),c&&void 0!==d.initializer&&(d.value=d.initializer?d.initializer.call(c):void 0,d.initializer=void 0),void 0===d.initializer&&(Object.defineProperty(s,o,d),d=null),a));e.default=p})),define("select-kit/components/timezone-input",["exports","select-kit/components/combo-box","@ember/object"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({pluginApiIdentifiers:["timezone-input"],classNames:["timezone-input"],nameProperty:null,valueProperty:null,selectKitOptions:{filterable:!0,allowAny:!1},content:(0,n.computed)((function(){return"en"!==moment.locale()&&"function"==typeof moment.tz.localizedNames?moment.tz.localizedNames().mapBy("value"):moment.tz.names()}))});e.default=i})),define("select-kit/components/toolbar-popup-menu-options",["exports","select-kit/components/dropdown-select-box","I18n"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({pluginApiIdentifiers:["toolbar-popup-menu-options"],classNames:["toolbar-popup-menu-options"],selectKitOptions:{showFullTitle:!1,filterable:!1,autoFilterable:!1,preventHeaderFocus:!0},modifyContent:function(e){return e.map((function(e){if(e.condition)return{icon:e.icon,name:n.default.t(e.label),id:e.action}})).filter(Boolean)}});e.default=i})),define("select-kit/components/topic-footer-mobile-dropdown",["exports","select-kit/components/combo-box"],(function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t.default.extend({pluginApiIdentifiers:["topic-footer-mobile-dropdown"],classNames:["topic-footer-mobile-dropdown"],selectKitOptions:{none:"topic.controls",filterable:!1,autoFilterable:!1},actions:{onChange:function(e,t){t.action&&t.action()}}});e.default=n})),define("select-kit/components/topic-notifications-button",["exports","@ember/object","I18n","@ember/utils","discourse/lib/notification-levels","discourse-common/utils/decorators","discourse-common/lib/get-url","@ember/component","select-kit/templates/components/topic-notifications-button"],(function(e,t,n,i,r,a,s,o,l){"use strict";var u,c;function d(e,t,n,i,r){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=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):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;var p=o.default.extend((u=(0,a.default)("topic","topic.details"),d(c={layout:l.default,classNames:["topic-notifications-button"],classNameBindings:["isLoading"],appendReason:!0,showFullTitle:!0,notificationLevel:null,topic:null,showCaret:!0,isLoading:!1,icon:(0,t.computed)("isLoading",(function(){return this.isLoading?"spinner":null})),changeTopicNotificationLevel:function(e){var t=this;e!==this.notificationLevel&&(this.set("isLoading",!0),this.topic.details.updateNotifications(e).finally((function(){return t.set("isLoading",!1)})))},notificationReasonText:function(e,t){var i=t.notification_level,a=t.notifications_reason_id;"number"!=typeof i&&(i=1);var o="topic.notifications.reasons.".concat(i);if("number"==typeof a){var l=o+"_"+a;this._notificationReasonStale(i,a,e,this.currentUser)&&(l+="_stale"),n.default.lookup(l,{locale:"en"})&&(o=l)}return this.currentUser&&this.currentUser.mailing_list_mode&&i>r.NotificationLevels.MUTED?n.default.t("topic.notifications.reasons.mailing_list_mode"):n.default.t(o,{username:this.currentUser&&this.currentUser.username_lower,basePath:(0,s.default)("")})},_notificationReasonStale:function(e,t,n,r){if(r){var a=n.category_id,s=n.tags,o=r.watched_category_ids||[],l=r.tracked_category_ids||[],u=r.watched_tags||[];if(a){if(2===e&&8===t){if(!l.includes(a))return!0}else if(3===e&&6===t&&!o.includes(a))return!0}else if(!(0,i.isEmpty)(s)&&3===e&&10===t&&!s.some((function(e){return u.includes(e)})))return!0;return!1}}},"changeTopicNotificationLevel",[t.action],Object.getOwnPropertyDescriptor(c,"changeTopicNotificationLevel"),c),d(c,"notificationReasonText",[u],Object.getOwnPropertyDescriptor(c,"notificationReasonText"),c),c));e.default=p})),define("select-kit/components/topic-notifications-options",["exports","select-kit/components/notifications-button","@ember/object","discourse/lib/notification-levels"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t.default.extend({pluginApiIdentifiers:["topic-notifications-options"],classNames:["topic-notifications-options"],content:i.topicLevels,selectKitOptions:{i18nPrefix:"topic.notifications",i18nPostfix:"i18nPostfix",showCaret:!0},i18nPostfix:(0,n.computed)("topic.archetype",(function(){return"private_message"===this.topic.archetype?"_pm":""}))});e.default=r})),define("select-kit/components/user-chooser",["exports","discourse/lib/user-search","select-kit/components/multi-select","@ember/object","discourse-common/lib/helpers"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n.default.extend({pluginApiIdentifiers:["user-chooser"],classNames:["user-chooser"],valueProperty:"username",modifyComponentForRow:function(){return"user-chooser/user-row"},selectKitOptions:{topicId:void 0,categoryId:void 0,includeGroups:!1,allowedUsers:!1,includeMentionableGroups:!1,includeMessageableGroups:!1,allowEmails:!1,groupMembersOf:void 0,excludeCurrentUser:!1},content:(0,i.computed)("value.[]",(function(){var e=this;return(0,r.makeArray)(this.value).map((function(t){return e.defaultItem(t,t)}))})),excludedUsers:(0,i.computed)("value","currentUser","selectKit.options.{excludeCurrentUser,excludedUsernames}",{get:function(){var e=this.selectKit.options,t=(0,r.makeArray)(this.value);return this.currentUser&&e.excludeCurrentUser&&(t=t.concat([this.currentUser.username])),t.concat(e.excludedUsernames||[])}}),search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=(e=e||"").replace(/^@/,"");var n=this.selectKit.options,i=(0,t.skipSearch)(e,n.allowEmails),r=(0,t.eagerCompleteSearch)(e,n.topicId||n.categoryId);if(!i&&(""!==e||r))return(0,t.default)({term:e,topicId:n.topicId,categoryId:n.categoryId,exclude:this.excludedUsers,includeGroups:n.includeGroups,allowedUsers:n.allowedUsers,includeMentionableGroups:n.includeMentionableGroups,includeMessageableGroups:n.includeMessageableGroups,groupMembersOf:n.groupMembersOf,allowEmails:n.allowEmails}).then((function(e){if("string"!=typeof e)return e}))}});e.default=a})),define("select-kit/components/user-chooser/user-row",["exports","select-kit/components/select-kit/select-kit-row","select-kit/templates/components/user-chooser/user-row"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.extend({layout:n.default,classNames:["user-row"]});e.default=i})),define("select-kit/components/user-notifications-dropdown",["exports","select-kit/components/dropdown-select-box","I18n","@ember/object","discourse/lib/ajax-error","discourse/lib/show-modal"],(function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=t.default.extend({classNames:["user-notifications","user-notifications-dropdown"],selectKitOptions:{headerIcon:"userNotificationicon",showCaret:!0},userNotificationicon:(0,i.computed)("mainCollection.[]","value",(function(){var e=this;return this.mainCollection&&this.mainCollection.find((function(t){return t.id===e.value})).icon})),content:(0,i.computed)((function(){var e=[];return e.push({icon:"user",id:"changeToNormal",description:n.default.t("user.user_notifications.normal_option_title"),name:n.default.t("user.user_notifications.normal_option")}),e.push({icon:"times-circle",id:"changeToMuted",description:n.default.t("user.user_notifications.mute_option_title"),name:n.default.t("user.user_notifications.mute_option")}),this.get("user.can_ignore_user")&&e.push({icon:"far-eye-slash",id:"changeToIgnored",description:n.default.t("user.user_notifications.ignore_option_title"),name:n.default.t("user.user_notifications.ignore_option")}),e})),changeToNormal:function(){this.updateNotificationLevel("normal").catch(r.popupAjaxError)},changeToMuted:function(){this.updateNotificationLevel("mute").catch(r.popupAjaxError)},changeToIgnored:function(){(0,a.default)("ignore-duration",{model:this.user})},actions:{onChange:function(e){this[e](),this.set("value",e)}}});e.default=s})),define("select-kit/mixins/plugin-api",["exports","@ember/object/mixin","@ember/utils","discourse-common/lib/helpers"],(function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyContentPluginApiCallbacks=function(e,t){return(0,i.makeArray)(t.pluginApiIdentifiers).forEach((function(n){(a[n]||[]).forEach((function(n){var r=n(t,e);r&&(e=(0,i.makeArray)(r).concat(e))})),(r[n]||[]).forEach((function(n){var r=n(t,e);r&&(e=e.concat((0,i.makeArray)(r)))}))})),e},e.applyOnChangePluginApiCallbacks=function(e,t,n){(0,i.makeArray)(n.pluginApiIdentifiers).forEach((function(i){(s[i]||[]).forEach((function(i){return i(n,e,t)}))}))},e.modifySelectKit=function e(t){return{appendContent:function(i){return function(e,t){(0,n.isNone)(r[e])&&(r[e]=[]);r[e].push(t)}(t,i),e(t)},prependContent:function(i){return function(e,t){(0,n.isNone)(a[e])&&(a[e]=[]);a[e].push(t)}(t,i),e(t)},onChange:function(i){return function(e,t){(0,n.isNone)(s[e])&&(s[e]=[]);s[e].push(t)}(t,i),e(t)}}},e.clearCallbacks=function(){r={},a={},s={}},e.default=void 0;var r={};var a={};var s={};var o=Object.freeze([]),l=t.default.create({concatenatedProperties:["pluginApiIdentifiers"],pluginApiIdentifiers:o});e.default=l})),define("select-kit/mixins/tags",["exports","I18n","@ember/object/mixin","discourse/lib/ajax","discourse-common/lib/get-url","@ember/utils","discourse-common/lib/helpers","discourse/lib/ajax-error","@ember/object/computed"],(function(e,t,n,i,r,a,s,o,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=n.default.create({searchTags:function(e,t,n){var a=this;return(0,i.ajax)((0,r.default)(e),{quietMillis:200,cache:!0,dataType:"json",data:t}).then((function(e){return n(a,e)})).catch(o.popupAjaxError)},selectKitOptions:{allowAny:"allowAnyTag"},allowAnyTag:(0,l.reads)("site.can_create_tag"),validateCreate:function(e,n){var i=this,r=this.selectKit.options.maximum;if(r&&(0,s.makeArray)(this.value).length>=parseInt(r,10))return this.addError(t.default.t("select_kit.max_content_reached",{count:this.selectKit.limit})),!1;var o=new RegExp(this.site.tags_filter_regexp,"g");if(e=e.replace(o,"").trim().toLowerCase(),this.termMatchesForbidden)return!1;if(!e.length||this.get("siteSettings.max_tag_length")]+/g,"").substring(0,this.siteSettings.max_tag_length),this.siteSettings.force_lowercase_tags&&(e=e.toLowerCase()),e}});e.default=u})),define("select-kit/mixins/utils",["exports","@ember/object/mixin","@ember/object"],(function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t.default.create({defaultItem:function(e,t){if(this.selectKit.valueProperty){var n={};return n[this.selectKit.valueProperty]=e,n[this.selectKit.nameProperty]=t,n}return t||e},itemForValue:function(e,t){return this.selectKit.valueProperty?t.findBy(this.selectKit.valueProperty,e):e},getProperty:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{definedOnly:!0},r=i.definedOnly;if(e&&"string"==typeof t){var a=(0,n.get)(e,t);if(a)return a}return t=(0,n.get)(this.selectKit,t),e?!t&&r?null:t?"string"==typeof t?(0,n.get)(e,t):t(e):e:null},getValue:function(e){return this.getProperty(e,"valueProperty",{definedOnly:!1})},getName:function(e){return this.getProperty(e,"nameProperty",{definedOnly:!1})},findValue:function(e,t){return this._findInContent(e,t,"valueProperty","getValue")},findName:function(e,t){return this._findInContent(e,t,"nameProperty","getName")},_findInContent:function(e,t,i,r){var a=this,s=(0,n.get)(this.selectKit,i);if(s){if("string"==typeof s)return e.findBy(s,this[r](t));var o=this[r](t);return e.find((function(e){return a[r](e)===o}))}if(e.indexOf(t)>-1)return t},_isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},_normalize:function(e){return e&&"function"==typeof(e=e.toLowerCase()).normalize&&(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),e}});e.default=i})),Ember.TEMPLATES["select-kit/templates/components/category-drop/category-drop-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit","shouldDisplayClearableButton"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]],[24,["shouldDisplayClearableButton"]]]]],false],[0,"\\n\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/category-drop/category-drop-header"}}),Ember.TEMPLATES["select-kit/templates/components/category-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[4,"if",[[24,["category"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","category-status"],[8],[0,"\\n"],[4,"if",[[24,["hasParentCategory"]]],null,{"statements":[[4,"unless",[[24,["hideParentCategory"]]],null,{"statements":[[0," "],[1,[22,"badgeForParentCategory"],false],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null],[0," "],[1,[22,"badgeForCategory"],false],[0,"\\n "],[9],[0,"\\n\\n"],[4,"if",[[24,["shouldDisplayDescription"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","category-desc"],[8],[1,[28,"dir-span",[[24,["description"]]],null],false],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0," "],[1,[28,"html-safe",[[24,["label"]]],null],false],[0,"\\n"]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/category-row"}}),Ember.TEMPLATES["select-kit/templates/components/color-palettes/color-palettes-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"span",true],[10,"class","name"],[8],[0,"\\n "],[1,[22,"label"],false],[0,"\\n"],[9],[0,"\\n\\n"],[4,"if",[[24,["item","colors"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","palettes"],[11,"style",[22,"backgroundColor"]],[8],[0,"\\n "],[1,[22,"palettes"],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/color-palettes/color-palettes-row"}}),Ember.TEMPLATES["select-kit/templates/components/combo-box/combo-box-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"each",[[24,["icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],null],false],[0," "]],"parameters":[1]},null],[0,"\\n\\n"],[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]]]]],false],[0,"\\n\\n"],[4,"if",[[24,["shouldDisplayClearableButton"]]],null,{"statements":[[0," "],[1,[28,"d-button",null,[["class","icon","action","ariaLabel"],["btn-clear","times",[24,["selectKit","onClearSelection"]],"clear_input"]]],false],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/combo-box/combo-box-header"}}),Ember.TEMPLATES["select-kit/templates/components/create-color-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"span",true],[8],[1,[22,"label"],false],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/create-color-row"}}),Ember.TEMPLATES["select-kit/templates/components/dropdown-select-box/dropdown-select-box-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"each",[[24,["icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],null],false],[0," "]],"parameters":[1]},null],[0,"\\n\\n"],[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit","shouldDisplayClearableButton"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]],[24,["shouldDisplayClearableButton"]]]]],false],[0,"\\n\\n"],[4,"if",[[24,["selectKit","options","showCaret"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/dropdown-select-box/dropdown-select-box-header"}}),Ember.TEMPLATES["select-kit/templates/components/dropdown-select-box/dropdown-select-box-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"if",[[24,["icons"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","icons"],[8],[0,"\\n "],[7,"span",true],[10,"class","selection-indicator"],[8],[9],[0,"\\n"],[4,"each",[[24,["icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],[["translatedtitle"],[[28,"dasherize",[[24,["title"]]],null]]]],false],[0,"\\n"]],"parameters":[1]},null],[0," "],[9],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[7,"div",true],[10,"class","texts"],[8],[0,"\\n "],[7,"span",true],[10,"class","name"],[8],[1,[28,"html-safe",[[24,["label"]]],null],false],[9],[0,"\\n "],[7,"span",true],[10,"class","desc"],[8],[1,[28,"html-safe",[[24,["description"]]],null],false],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/dropdown-select-box/dropdown-select-box-row"}}),Ember.TEMPLATES["select-kit/templates/components/email-group-user-chooser-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["item"],"statements":[[7,"div",true],[10,"class","choices"],[8],[0,"\\n"],[4,"each",[[24,["shownItems"]]],null,{"statements":[[0," "],[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit"],[[24,["tabindex"]],[23,1,[]],[24,["selectKit"]]]]],false],[0,"\\n"]],"parameters":[1]},null],[4,"if",[[24,["hasHiddenItems"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","x-more-item"],[11,"data-hidden-count",[22,"hiddenItemsCount"]],[8],[0,"\\n "],[1,[28,"i18n",["x_more"],[["count"],[[24,["hiddenItemsCount"]]]]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[4,"unless",[[24,["hasReachedMaximumSelection"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","choice input-wrapper"],[8],[0,"\\n "],[1,[28,"component",[[24,["selectKit","options","filterComponent"]]],[["selectKit","id"],[[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-filter"],null]]]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/email-group-user-chooser-header"}}),Ember.TEMPLATES["select-kit/templates/components/email-group-user-chooser-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[4,"if",[[24,["item","isUser"]]],null,{"statements":[[0," "],[1,[28,"avatar",[[24,["item"]]],[["imageSize"],["tiny"]]],false],[0,"\\n "],[7,"span",true],[10,"class","identifier"],[8],[1,[28,"format-username",[[24,["item","id"]]],null],false],[9],[0,"\\n "],[7,"span",true],[10,"class","name"],[8],[1,[24,["item","name"]],false],[9],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[24,["item","isGroup"]]],null,{"statements":[[0," "],[1,[28,"d-icon",["users"],null],false],[0,"\\n "],[7,"span",true],[10,"class","identifier"],[8],[1,[24,["item","id"]],false],[9],[0,"\\n "],[7,"span",true],[10,"class","name"],[8],[1,[24,["item","full_name"]],false],[9],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[28,"d-icon",["envelope"],null],false],[0,"\\n "],[7,"span",true],[10,"class","identifier"],[8],[1,[24,["item","id"]],false],[9],[0,"\\n"]],"parameters":[]}]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/email-group-user-chooser-row"}}),Ember.TEMPLATES["select-kit/templates/components/future-date-input-selector/future-date-input-selector-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"if",[[24,["icons"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","future-date-input-selector-icons"],[8],[0,"\\n "],[4,"each",[[24,["icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],null],false],[0," "]],"parameters":[1]},null],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]]]]],false],[0,"\\n\\n"],[4,"if",[[24,["selectedContent","datetime"]]],null,{"statements":[[0," "],[7,"span",true],[10,"class","future-date-input-selector-datetime"],[8],[0,"\\n "],[1,[24,["selectedContent","datetime"]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/future-date-input-selector/future-date-input-selector-header"}}),Ember.TEMPLATES["select-kit/templates/components/future-date-input-selector/future-date-input-selector-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"if",[[24,["item","icons"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","future-date-input-selector-icons"],[8],[0,"\\n "],[4,"each",[[24,["item","icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],null],false],[0," "]],"parameters":[1]},null],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[7,"span",true],[10,"class","name"],[8],[1,[22,"label"],false],[9],[0,"\\n\\n"],[4,"if",[[24,["item","datetime"]]],null,{"statements":[[0," "],[7,"span",true],[10,"class","future-date-input-selector-datetime"],[8],[0,"\\n "],[1,[24,["item","datetime"]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/future-date-input-selector/future-date-input-selector-row"}}),Ember.TEMPLATES["select-kit/templates/components/mini-tag-chooser/mini-tag-chooser-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]]]]],false],[0,"\\n\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/mini-tag-chooser/mini-tag-chooser-header"}}),Ember.TEMPLATES["select-kit/templates/components/mini-tag-chooser/selected-collection"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["tag"],"statements":[[4,"each",[[24,["tags"]]],null,{"statements":[[4,"d-button",null,[["translatedTitle","icon","action","actionParam","class"],[[23,1,["value"]],"times",[28,"action",[[23,0,[]],"deselectTag"],null],[23,1,["value"]],[23,1,["classNames"]]]],{"statements":[[0," "],[1,[28,"discourse-tag",[[23,1,["value"]]],[["noHref"],[true]]],false],[0,"\\n"]],"parameters":[]},null]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/mini-tag-chooser/selected-collection"}}),Ember.TEMPLATES["select-kit/templates/components/multi-select"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["collection"],"statements":[[4,"unless",[[24,["selectKit","isHidden"]]],null,{"statements":[[0," "],[1,[28,"component",[[24,["selectKit","options","headerComponent"]]],[["tabindex","value","selectedContent","selectKit","id"],[[24,["tabindex"]],[24,["value"]],[24,["selectedContent"]],[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-header"],null]]]],false],[0,"\\n\\n"],[4,"select-kit/select-kit-body",null,[["selectKit","id"],[[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-body"],null]]],{"statements":[[4,"if",[[24,["selectKit","isLoading"]]],null,{"statements":[[0," "],[7,"span",true],[10,"class","is-loading"],[8],[0,"\\n "],[1,[28,"loading-spinner",null,[["size"],["small"]]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[24,["selectKit","filter"]]],null,{"statements":[[4,"if",[[24,["selectKit","hasNoContent"]]],null,{"statements":[[0," "],[7,"span",true],[10,"class","no-content"],[8],[0,"\\n "],[1,[28,"i18n",["select_kit.no_content"],null],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null],[0,"\\n"],[4,"each",[[24,["collections"]]],null,{"statements":[[0," "],[1,[28,"component",[[28,"component-for-collection",[[23,1,["identifier"]],[24,["selectKit"]]],null]],[["collection","selectKit","value"],[[23,1,[]],[24,["selectKit"]],[24,["value"]]]]],false],[0,"\\n"]],"parameters":[1]},null]],"parameters":[]}]],"parameters":[]},null],[0,"\\n "],[7,"div",true],[10,"class","select-kit-wrapper"],[8],[9],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/multi-select"}}),Ember.TEMPLATES["select-kit/templates/components/multi-select/multi-select-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["item"],"statements":[[7,"div",true],[10,"class","choices"],[8],[0,"\\n"],[4,"each",[[24,["selectedContent"]]],null,{"statements":[[0," "],[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit"],[[24,["tabindex"]],[23,1,[]],[24,["selectKit"]]]]],false],[0,"\\n"]],"parameters":[1]},null],[0,"\\n"],[4,"unless",[[24,["hasReachedMaximumSelection"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","choice input-wrapper"],[8],[0,"\\n "],[1,[28,"component",[[24,["selectKit","options","filterComponent"]]],[["selectKit","id"],[[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-filter"],null]]]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/multi-select/multi-select-header"}}),Ember.TEMPLATES["select-kit/templates/components/multi-select/selected-category"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"div",false],[12,"tabindex","0"],[12,"title",[22,"title"]],[12,"data-value",[22,"value"]],[12,"data-name",[22,"name"]],[12,"class","select-kit-selected-name selected-name choice"],[3,"action",[[23,0,[]],"onSelectedNameClick"]],[8],[0,"\\n "],[7,"div",true],[10,"class","body"],[8],[0,"\\n "],[1,[22,"badge"],false],[0,"\\n "],[1,[28,"d-icon",["times"],null],false],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/multi-select/selected-category"}}),Ember.TEMPLATES["select-kit/templates/components/notifications-filter/notifications-filter-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"label",true],[10,"class","filter-text"],[8],[0,"\\n "],[1,[28,"i18n",["user.user_notifications.filters.filter_by"],null],false],[0,"\\n"],[9],[0,"\\n"],[7,"label",true],[10,"class","header-text"],[8],[0,"\\n "],[1,[28,"i18n",[[24,["label"]]],null],false],[0,"\\n"],[9],[0,"\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/notifications-filter/notifications-filter-header"}}),Ember.TEMPLATES["select-kit/templates/components/period-chooser/period-chooser-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"h2",true],[10,"class","selected-name"],[11,"title",[22,"title"]],[8],[0,"\\n "],[1,[28,"period-title",[[24,["value"]]],[["showDateRange","fullDay"],[true,[24,["selectKit","options","fullDay"]]]]],false],[0,"\\n"],[9],[0,"\\n\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/period-chooser/period-chooser-header"}}),Ember.TEMPLATES["select-kit/templates/components/period-chooser/period-chooser-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"span",true],[10,"class","selection-indicator"],[8],[9],[0,"\\n\\n"],[7,"span",true],[10,"class","period-title"],[8],[0,"\\n "],[1,[28,"period-title",[[24,["rowValue"]]],[["showDateRange","fullDay"],[true,[24,["selectKit","options","fullDay"]]]]],false],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/period-chooser/period-chooser-row"}}),Ember.TEMPLATES["select-kit/templates/components/pinned-button"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[7,"p",true],[10,"class","reason"],[8],[0,"\\n "],[1,[28,"pinned-options",null,[["value","topic"],[[24,["pinned"]],[24,["topic"]]]]],false],[0,"\\n "],[7,"span",true],[10,"class","text"],[8],[1,[28,"html-safe",[[24,["reasonText"]]],null],false],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/pinned-button"}}),Ember.TEMPLATES["select-kit/templates/components/select-kit/errors-collection"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["item"],"statements":[[4,"if",[[24,["collection"]]],null,{"statements":[[4,"each",[[24,["collection","content"]]],null,{"statements":[[0," "],[7,"li",true],[10,"class","select-kit-error"],[8],[1,[23,1,[]],false],[9],[0,"\\n"]],"parameters":[1]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/select-kit/errors-collection"}}),Ember.TEMPLATES["select-kit/templates/components/select-kit/select-kit-body"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["&default"],"statements":[[4,"if",[[24,["selectKit","isExpanded"]]],null,{"statements":[[0," "],[14,1],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/select-kit/select-kit-body"}}),Ember.TEMPLATES["select-kit/templates/components/select-kit/select-kit-collection"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["item"],"statements":[[4,"each",[[24,["collection","content"]]],null,{"statements":[[0," "],[1,[28,"component",[[28,"component-for-row",[[24,["collection","identifier"]],[23,1,[]],[24,["selectKit"]]],null]],[["item","value","selectKit"],[[23,1,[]],[24,["value"]],[24,["selectKit"]]]]],false],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/select-kit/select-kit-collection"}}),Ember.TEMPLATES["select-kit/templates/components/select-kit/select-kit-filter"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[4,"unless",[[24,["isHidden"]]],null,{"statements":[[0," "],[1,[28,"input",null,[["tabindex","class","placeholder","autocomplete","autocorrect","autocapitalize","autofocus","spellcheck","value","input","paste","keyDown","keyUp"],[-1,"filter-input",[24,["placeholder"]],"discourse","off","off",[24,["selectKit","options","autofocus"]],false,[28,"readonly",[[24,["selectKit","filter"]]],null],[28,"action",[[23,0,[]],"onInput"],null],[28,"action",[[23,0,[]],"onPaste"],null],[28,"action",[[23,0,[]],"onKeydown"],null],[28,"action",[[23,0,[]],"onKeyup"],null]]]],false],[0,"\\n\\n"],[4,"if",[[24,["selectKit","options","filterIcon"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[24,["selectKit","options","filterIcon"]]],[["class"],["filter-icon"]]],false],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/select-kit/select-kit-filter"}}),Ember.TEMPLATES["select-kit/templates/components/select-kit/select-kit-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"each",[[24,["icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],[["translatedtitle"],[[28,"dasherize",[[24,["title"]]],null]]]],false],[0,"\\n"]],"parameters":[1]},null],[0,"\\n"],[7,"span",true],[10,"class","name"],[8],[0,"\\n "],[1,[22,"label"],false],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/select-kit/select-kit-row"}}),Ember.TEMPLATES["select-kit/templates/components/select-kit/single-select-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["icon"],"statements":[[4,"each",[[24,["icons"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[23,1,[]]],null],false],[0," "]],"parameters":[1]},null],[0,"\\n\\n"],[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]]]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/select-kit/single-select-header"}}),Ember.TEMPLATES["select-kit/templates/components/selected-name"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[4,"if",[[24,["selectKit","options","showFullTitle"]]],null,{"statements":[[0," "],[7,"div",false],[12,"tabindex","0"],[12,"role","button"],[12,"lang",[22,"lang"]],[12,"title",[22,"title"]],[12,"data-value",[22,"value"]],[12,"data-name",[22,"name"]],[12,"class","select-kit-selected-name selected-name choice"],[3,"action",[[23,0,[]],"onSelectedNameClick"]],[8],[0,"\\n"],[4,"if",[[24,["item","icon"]]],null,{"statements":[[0," "],[1,[28,"d-icon",[[24,["item","icon"]]],null],false],[0,"\\n"]],"parameters":[]},null],[0,"\\n "],[7,"span",true],[10,"class","name"],[8],[0,"\\n "],[1,[22,"label"],false],[0,"\\n "],[9],[0,"\\n\\n"],[4,"if",[[24,["selectKit","options","clearOnClick"]]],null,{"statements":[[0," "],[1,[28,"d-icon",["times"],null],false],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[24,["shouldDisplayClearableButton"]]],null,{"statements":[[0," "],[1,[28,"d-button",null,[["class","icon","action","actionParam","ariaLabel"],["btn-clear","times",[24,["selectKit","deselect"]],[24,["item"]],"clear_input"]]],false],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0," "],[9],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[24,["item","icon"]]],null,{"statements":[[0," "],[7,"div",true],[10,"role","textbox"],[11,"lang",[22,"lang"]],[10,"class","select-kit-selected-name selected-name choice"],[8],[0,"\\n "],[1,[28,"d-icon",[[24,["item","icon"]]],null],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/selected-name"}}),Ember.TEMPLATES["select-kit/templates/components/single-select"]=Ember.HTMLBars.template({id:null,block:'{"symbols":["collection"],"statements":[[4,"unless",[[24,["selectKit","isHidden"]]],null,{"statements":[[0," "],[1,[28,"component",[[24,["selectKit","options","headerComponent"]]],[["tabindex","value","selectedContent","selectKit","id"],[[24,["tabindex"]],[24,["value"]],[24,["selectedContent"]],[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-header"],null]]]],false],[0,"\\n\\n"],[4,"select-kit/select-kit-body",null,[["selectKit","id"],[[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-body"],null]]],{"statements":[[0," "],[1,[28,"component",[[24,["selectKit","options","filterComponent"]]],[["selectKit","id"],[[24,["selectKit"]],[28,"concat",[[24,["selectKit","uniqueID"]],"-filter"],null]]]],false],[0,"\\n\\n"],[4,"if",[[24,["selectKit","isLoading"]]],null,{"statements":[[0," "],[7,"span",true],[10,"class","is-loading"],[8],[0,"\\n"],[4,"if",[[24,["site"]]],null,{"statements":[[0," "],[1,[28,"loading-spinner",null,[["size"],["small"]]],false],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[24,["selectKit","filter"]]],null,{"statements":[[4,"if",[[24,["selectKit","hasNoContent"]]],null,{"statements":[[0," "],[7,"span",true],[10,"class","no-content"],[8],[0,"\\n "],[1,[28,"i18n",["select_kit.no_content"],null],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null],[0,"\\n"],[4,"each",[[24,["collections"]]],null,{"statements":[[0," "],[1,[28,"component",[[28,"component-for-collection",[[23,1,["identifier"]],[24,["selectKit"]]],null]],[["collection","selectKit","value"],[[23,1,[]],[24,["selectKit"]],[24,["value"]]]]],false],[0,"\\n"]],"parameters":[1]},null]],"parameters":[]}]],"parameters":[]},null],[0,"\\n "],[7,"div",true],[10,"class","select-kit-wrapper"],[8],[9],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/single-select"}}),Ember.TEMPLATES["select-kit/templates/components/tag-chooser-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[28,"discourse-tag",[[24,["rowValue"]]],[["count","noHref"],[[24,["item","count"]],true]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/tag-chooser-row"}}),Ember.TEMPLATES["select-kit/templates/components/tag-drop/more-tags-collection"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[4,"if",[[24,["collection","content","shouldShowMoreTags"]]],null,{"statements":[[0," "],[7,"div",true],[10,"class","more-tags"],[8],[0,"\\n "],[1,[28,"i18n",["select_kit.components.tag_drop.filter_for_more"],null],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/tag-drop/more-tags-collection"}}),Ember.TEMPLATES["select-kit/templates/components/tag-drop/tag-drop-header"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[28,"component",[[24,["selectKit","options","selectedNameComponent"]]],[["tabindex","item","selectKit","shouldDisplayClearableButton"],[[24,["tabindex"]],[24,["selectedContent"]],[24,["selectKit"]],[24,["shouldDisplayClearableButton"]]]]],false],[0,"\\n\\n"],[1,[28,"d-icon",[[24,["caretIcon"]]],[["class"],["caret-icon"]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/tag-drop/tag-drop-header"}}),Ember.TEMPLATES["select-kit/templates/components/tag-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[28,"discourse-tag",[[24,["rowValue"]]],[["noHref","count"],[true,[24,["item","count"]]]]],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/tag-row"}}),Ember.TEMPLATES["select-kit/templates/components/toolbar-popup-menu-options/toolbar-popup-menu-options-heading"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[22,"heading"],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/toolbar-popup-menu-options/toolbar-popup-menu-options-heading"}}),Ember.TEMPLATES["select-kit/templates/components/topic-notifications-button"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[4,"if",[[24,["appendReason"]]],null,{"statements":[[0," "],[7,"p",true],[10,"class","reason"],[8],[0,"\\n "],[1,[28,"topic-notifications-options",null,[["value","topic","onChange","options"],[[24,["notificationLevel"]],[24,["topic"]],[28,"action",[[23,0,[]],"changeTopicNotificationLevel"],null],[28,"hash",null,[["icon","showFullTitle","preventsClickPropagation","showCaret"],[[24,["icon"]],[24,["showFullTitle"]],true,[24,["showCaret"]]]]]]]],false],[0,"\\n "],[7,"span",true],[10,"class","text"],[8],[1,[28,"html-safe",[[24,["notificationReasonText"]]],null],false],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[28,"topic-notifications-options",null,[["value","topic","onChange","options"],[[24,["notificationLevel"]],[24,["topic"]],[28,"action",[[23,0,[]],"changeTopicNotificationLevel"],null],[28,"hash",null,[["icon","showFullTitle","preventsClickPropagation","showCaret"],[[24,["icon"]],[24,["showFullTitle"]],true,[24,["showCaret"]]]]]]]],false],[0,"\\n"]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/topic-notifications-button"}}),Ember.TEMPLATES["select-kit/templates/components/user-chooser/user-row"]=Ember.HTMLBars.template({id:null,block:'{"symbols":[],"statements":[[1,[28,"avatar",[[24,["item"]]],[["imageSize"],["tiny"]]],false],[0,"\\n"],[7,"span",true],[10,"class","username"],[8],[1,[28,"format-username",[[24,["item","username"]]],null],false],[9],[0,"\\n"],[7,"span",true],[10,"class","name"],[8],[1,[24,["item","name"]],false],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"select-kit/templates/components/user-chooser/user-row"}}),define("discourse/app",["exports","@ember/application","mousetrap","discourse-common/resolver","discourse-common/config/environment"],(function(e,t,n,i,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAndClearThemeErrors=function(){var e=s;return s=[],e},e.default=void 0;var a=[],s=[],o=t.default.extend({rootElement:"#main",customEvents:{paste:"paste"},reset:function(){this._super.apply(this,arguments),n.default.reset()},Resolver:(0,i.buildResolver)("discourse"),_prepareInitializer:function(e){var t=function(e){var t=e.match(/^discourse\/theme\-(\d+)\//);if(t)return parseInt(t[1],10)}(e),n=null;try{if(!(n=requirejs(e,null,null,!0)))throw new Error(e+" must export an initializer.")}catch(e){if(!t||(0,r.isTesting)())throw e;return s.push([t,e]),void l()}var i=n.default,a=i.initialize;return i.initialize=function(e){try{return a.call(i,e.__container__,e)}catch(e){if(!t||(0,r.isTesting)())throw e;s.push([t,e]),l()}},i},start:function(){var e=this;$("noscript").remove(),Object.keys(requirejs._eak_seen).forEach((function(t){if(/\/pre\-initializers\//.test(t)){var n=e._prepareInitializer(t);n&&e.initializer(n)}else if(/\/(api\-)?initializers\//.test(t)){var i=e._prepareInitializer(t);i&&e.instanceInitializer(i)}}));var t=requirejs("discourse/lib/plugin-api").withPluginApi,n=0;a.forEach((function(i){e.instanceInitializer({name:"_discourse_plugin_".concat(++n),after:"inject-objects",initialize:function(){return t(i.version,i.code)}})}))},_registerPluginCode:function(e,t){a.push({version:e,code:t})}});function l(){var e=new CustomEvent("discourse-theme-error");document.dispatchEvent(e)}var u=o;e.default=u})),function(){if(window.unsupportedBrowser)throw"Unsupported browser detected";var e=requirejs("discourse/app").default.create();window.__DISCOURSE_RAW_TEMPLATES=requirejs("discourse-common/lib/raw-templates").__DISCOURSE_RAW_TEMPLATES,Object.keys(Ember.TEMPLATES).forEach((function(e){if(0===e.indexOf("select-kit")){var t=Ember.TEMPLATES[e];define(e,(function(){return t}))}})),window.Discourse=e}(),define("discourse/lib/to-markdown",["exports"],(function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,i){return n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(n):r.value}},n(e,t,i||e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return s(this,n)}}function s(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n]*>([\s\S]*?)<\/code>/gi,n=e,i=t.exec(n),r=[];for(;i;){var a="DISCOURSE_PLACEHOLDER_".concat(r.length+1),s=i[1];s=$("
").html(s).text().replace(/^\n/,"").replace(/\n$/,""),r.push([a,s]),e=e.replace(i[0],"".concat(a,"")),i=t.exec(n)}return{elements:function e(t){if("#text"!==t.nodeName&&void 0!==t.length){for(var n=[],i=0;i/,"").replace(/<\/b>$/,"").trim()).replace(/\n +/g,"\n").replace(/ +\n/g,"\n").replace(/ {2,}/g," ").replace(/\n{3,}/g,"\n\n").replace(/\t/g," "),i)}catch(e){return""}},e.Tag=void 0;var m=function(e){return e.replace(/^\s+/,"")},f=function(e){return e.replace(/\s+$/,"")},h=function(e){return(e.replace(/\\\|/,"").match(/\|/g)||[]).length},g=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"],b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];c(this,e),this.name=t,this.prefix=n,this.suffix=i,this.inline=r}return p(e,[{key:"decorate",value:function(e){if((this.prefix||this.suffix)&&(e=[this.prefix,e,this.suffix].join("")),this.inline){var t=this.element.prev,n=this.element.next;t&&"#text"!==t.name&&(e=" "+e),n&&"#text"!==n.name&&(e+=" ")}return e}},{key:"toMarkdown",value:function(){var e=this.element.innerMarkdown();return e&&e.trim()?this.decorate(e):e}}],[{key:"blocks",value:function(){return["address","article","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","hr","main","nav","p","pre","section"]}},{key:"headings",value:function(){return["h1","h2","h3","h4","h5","h6"]}},{key:"emphases",value:function(){return[["b","**"],["strong","**"],["i","*"],["em","*"],["s","~~"],["strike","~~"]]}},{key:"slices",value:function(){return["dt","dd","thead","tbody","tfoot"]}},{key:"trimmable",value:function(){return[].concat(l(e.blocks()),l(e.headings()),l(e.slices()),["aside","li","td","th","br","hr","blockquote","table","ol","tr","ul"])}},{key:"allowedTags",value:function(){return["ins","del","small","big","kbd","ruby","rt","rb","rp","mark"]}},{key:"block",value:function(t,n,r){return function(e){i(o,e);var s=a(o);function o(){var e;return c(this,o),(e=s.call(this,t,n,r)).gap="\n\n",e}return p(o,[{key:"decorate",value:function(e){var t=this.element.parent;return"p"===this.name&&t&&"li"===t.name&&(this.gap=""),"".concat(this.gap).concat(this.prefix).concat(e).concat(this.suffix).concat(this.gap)}}]),o}(e)}},{key:"aside",value:function(){return function(e){i(r,e);var t=a(r);function r(){return c(this,r),t.call(this)}return p(r,[{key:"toMarkdown",value:function(){if(!/\bquote\b/.test(this.element.attributes.class))return n(o(r.prototype),"toMarkdown",this).call(this);var e=this.element.children.find((function(e){return"blockquote"===e.name}));if(!e)return n(o(r.prototype),"toMarkdown",this).call(this);var t=v.parse([e],this.element)||"";if(0===(t=t.trim().replace(/^>/g,"")).length)return"";var i=this.element.attributes["data-username"],a=this.element.attributes["data-post"],s=this.element.attributes["data-topic"],l=i&&a&&s?'[quote="'.concat(i,", post:").concat(a,", topic:").concat(s,'"]'):"[quote]";return"\n\n".concat(l,"\n").concat(t,"\n[/quote]\n\n")}}]),r}(e.block("aside"))}},{key:"heading",value:function(t,n){var i="".concat(l(Array(n)).map((function(){return"#"})).join("")," ");return e.block(t,i,"")}},{key:"emphasis",value:function(t,r){return function(e){i(l,e);var s=a(l);function l(){return c(this,l),s.call(this,t,r,r,!0)}return p(l,[{key:"decorate",value:function(e){e.includes("\n")&&(this.prefix="<".concat(this.name,">"),this.suffix=""));var t=e.match(/^\s/)||[""];return this.prefix=t[0]+this.prefix,t=e.match(/\s$/)||[""],this.suffix=this.suffix+t[0],n(o(l.prototype),"decorate",this).call(this,e.trim())}}]),l}(e)}},{key:"allowedTag",value:function(t){return function(e){i(r,e);var n=a(r);function r(){return c(this,r),n.call(this,t,"<".concat(t,">"),""))}return r}(e)}},{key:"replace",value:function(t,n){return function(e){i(s,e);var r=a(s);function s(){var e;return c(this,s),(e=r.call(this,t,"","")).text=n,e}return p(s,[{key:"toMarkdown",value:function(){return this.text}}]),s}(e)}},{key:"span",value:function(){return function(e){i(r,e);var t=a(r);function r(){return c(this,r),t.call(this,"span")}return p(r,[{key:"decorate",value:function(e){return"badge badge-notification clicks"===this.element.attributes.class?"":n(o(r.prototype),"decorate",this).call(this,e)}}]),r}(e)}},{key:"link",value:function(){return function(e){i(n,e);var t=a(n);function n(){return c(this,n),t.call(this,"a","","",!0)}return p(n,[{key:"decorate",value:function(e){var t=this.element,n=t.attributes;if(/^mention/.test(n.class)&&"@"===e[0])return e;if("hashtag"===n.class&&"#"===e[0])return e;if(["lightbox","d-lazyload"].includes(n.class)&&function(e,t){return(e.children||[]).some((function(e){return e.name===t}))}(t,"img")){var i=n.href,r=(t.children||[]).find((function(e){return"img"===e.name})).attributes["data-base62-sha1"];return e=n.title||"",r&&(i="upload://".concat(r)),"!["+e+"]("+i+")"}if(n.href&&e!==n.href){e=e.replace(/\n{2,}/g,"\n");var a="";return n.class&&n.class.includes("attachment")&&(a="|attachment"),"["+e+a+"]("+n.href+")"}return e}}]),n}(e)}},{key:"image",value:function(){return function(e){i(n,e);var t=a(n);function n(){return c(this,n),t.call(this,"img","","",!0)}return p(n,[{key:"toMarkdown",value:function(){var e=this.element,t=e.attributes,n=e.parent&&e.parent.attributes||{},i=t.src||n.src,r=t["data-base62-sha1"];r&&(i="upload://".concat(r));var a=t.class||n.class;if(a&&a.includes("emoji"))return t.title||n.title;if(i){if(i.match(/^data:image\/([a-zA-Z]*);base64,([^\"]*)$/))return"[image]";var s=t.alt||n.alt||"",o=t.width||n.width,l=t.height||n.height,u=t.title;if(o&&l){var c=this.element.parentNames.includes("table")?"\\|":"|";s="".concat(s).concat(c).concat(o,"x").concat(l)}return"![".concat(s,"](").concat(i).concat(u?' "'.concat(u,'"'):"",")")}return""}}]),n}(e)}},{key:"slice",value:function(t,n){return function(e){i(s,e);var r=a(s);function s(){return c(this,s),r.call(this,t,"",n)}return p(s,[{key:"decorate",value:function(e){return this.element.next||(this.suffix=""),"".concat(e).concat(this.suffix)}}]),s}(e)}},{key:"cell",value:function(t){return function(e){i(r,e);var n=a(r);function r(){return c(this,r),n.call(this,t,"|")}return p(r,[{key:"toMarkdown",value:function(){var e=this.element.innerMarkdown().trim();if(e.includes("\n"))for(var t=this.element;t=t.parent;)if("table"===t.name){t.tag().invalid();break}return this.decorate(e)}}]),r}(e)}},{key:"li",value:function(){return function(e){i(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return p(r,[{key:"decorate",value:function(e){var t=this.element.filterParentNames(["ol","ul"]).slice(1).map((function(){return"\t"})).join(""),i=this.element.attributes;if(g.includes(i.class))try{var a=parseInt(i.style.match(/level./)[0].replace("level",""),10);t=Array(a).join("\t")+t}finally{"MsoListParagraphCxSpFirst"===i.class?t="\n\n".concat(t):"MsoListParagraphCxSpLast"===i.class&&(e="".concat(e,"\n"))}return n(o(r.prototype),"decorate",this).call(this,"".concat(t,"* ").concat(m(e)))}}]),r}(e.slice("li","\n"))}},{key:"code",value:function(){return function(e){i(r,e);var t=a(r);function r(){return c(this,r),t.call(this,"code","`","`")}return p(r,[{key:"decorate",value:function(e){return this.element.parentNames.includes("pre")?(this.prefix="\n\n```\n",this.suffix="\n```\n\n"):this.inline=!0,e=$("