{"version":3,"sources":["webpack:///../WCC.UI/App/components/dropdowns/base/base.scss?625b","webpack:///../WCC.UI/App/components/dropdowns/base/base.ts","webpack:///../WCC.UI/App/components/dropdowns/select/select.html?e847","webpack:///../WCC.UI/App/components/dropdowns/select/select.ts","webpack:///../WCC.UI/App/components/editors/thread/participantsPicker.html?f1a2","webpack:///../WCC.UI/App/components/editors/thread/participantsPicker.scss?948b","webpack:///../WCC.UI/App/components/editors/thread/participantsPicker.ts","webpack:///../WCC.UI/App/components/editors/thread/picker.html?2140","webpack:///../WCC.UI/App/components/editors/thread/picker.scss?134e","webpack:///../WCC.UI/App/components/editors/thread/picker.ts","webpack:///../WCC.UI/App/components/editors/thread/thread.scss?338b","webpack:///../WCC.UI/App/components/editors/thread/thread.ts","webpack:///../WCC.UI/App/components/editors/thread/visibilityButton.html?d86d","webpack:///../WCC.UI/App/components/editors/thread/visibilityButton.scss?451c","webpack:///../WCC.UI/App/components/editors/thread/visibilityButton.ts","webpack:///../WCC.UI/App/components/editors/thread/visibilityOptions.html?a03a","webpack:///../WCC.UI/App/components/editors/thread/visibilityOptions.scss?95e4","webpack:///../WCC.UI/App/components/editors/thread/visibilityOptions.ts","webpack:///../WCC.UI/App/components/editors/thread/visibilityTagsPicker.html?83c5","webpack:///../WCC.UI/App/components/editors/thread/visibilityTagsPicker.scss?37c9","webpack:///../WCC.UI/App/components/editors/thread/visibilityTagsPicker.ts","webpack:///../WCC.UI/App/decorators/componentModel.ts","webpack:///../WCC.UI/App/managers/discussion/people/tinyList.ts","webpack:///../WCC.UI/App/managers/discussion/translation.ts","webpack:///../WCC.UI/App/managers/localStorage.ts","webpack:///../WCC.UI/App/managers/nodes/attributeTracker.ts","webpack:///../WCC.UI/App/managers/tags/topicPeople.ts","webpack:///../WCC.UI/App/models/personTiny.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/dropdowns/base/base.scss","webpack:///../WCC.UI/App/components/editors/thread/participantsPicker.scss","webpack:///../WCC.UI/App/components/editors/thread/picker.scss","webpack:///../WCC.UI/App/components/editors/thread/thread.scss","webpack:///../WCC.UI/App/components/editors/thread/visibilityButton.scss","webpack:///../WCC.UI/App/components/editors/thread/visibilityOptions.scss","webpack:///../WCC.UI/App/components/editors/thread/visibilityTagsPicker.scss","webpack:///../WCC.UI/App/components/dropdowns/select/select.html","webpack:///../WCC.UI/App/components/editors/thread/participantsPicker.html","webpack:///../WCC.UI/App/components/editors/thread/picker.html","webpack:///../WCC.UI/App/components/editors/thread/visibilityButton.html","webpack:///../WCC.UI/App/components/editors/thread/visibilityOptions.html","webpack:///../WCC.UI/App/components/editors/thread/visibilityTagsPicker.html"],"names":["api","content","__esModule","default","module","i","options","exports","locals","Dropdown","constructor","jsonModel","_jsonModel$Items","this","items","ko","observable","Items","unwrap","theme","flattenComputed","textSize","findItem","itemOrPredicate","_","isFunction","find","isObject","includes","DropdownVM","model","info","bodyNode","onBodyClick","m","e","$rowOrBody","$","target","closest","is","children","length","preventDefault","stopPropagation","isAlwaysShown","pureComputed","checkIfAlwaysShown","isVisible","applyBindingsToNode","element","__decorate","injectable","componentModel","__param","inject","wccModules","componentConfig","componentInfo","expose","SelectDropdown","data","_ref","_data$Disabled","_data$noDefault","_data$highlightActive","super","defaultValue","noDefault","undefined","first","selectedItem","disabled","Disabled","placeholder","container","hasCustomScroll","customScroll","highlightActiveItem","select","item","clear","SelectDropdownVM","effects","dropdownNode","isOpen","dropdown","headerNodes","templateNodes","filter","contents","itemNodes","isHeaderAllowed","hasMultipleItems","hasSingleItem","smartDropdownConfig","register","NodeAttributeTracker","node","hasClass","click","onClick","css","any","components","preload","ThreadEditorParticipantsPickerVM","storage","editor","picker","peopleManager","get","TinyPeopleListManager","discussionId","settings","status","enums","MembershipStatusTypes","Member","value","sortKey","isLoadingPeople","pluck","people","pickerConfig","map","p","_p$personId","_p$fullName","id","personId","text","fullName","isLoading","isMultiple","threadVisibility","ThreadVisibility","Group","isReady","withEffect","editorPeopleIDs","system","isTheSameList","selection","clone","threadParticipantIDs","selectedPeopleIDs","ThreadEditorPickerVM","config","observableArray","hasData","selectConfig","multiple","selectSelection","registerLocal","require","ThreadEditorVM","ctx","isSaveFailed","labels","threadVisibilityTagIDs","isSaving","oReplySuggestion","oTranslatedReplySuggestion","materialUIEnabled","isMaterialUIEnabled","save","async","saveAdvanced","cancel","force","cancelInternal","allowToCancel","hasChanges","confirm","messages","AreYouSureYouWantToCancelAllYourChanges","isPreviewMode","preview","topicId","thread","extend","deferred","notifyIfChanged","threadTopicId","th","threadParentId","parentId","parentThread","parentThreadId","parentThreadTopicId","shouldClearParentOnSave","onSavedHandler","onSave","onCancelHandler","onCancel","userManager","CurrentUserManager","user","person","topicManager","TopicManager","topic","threadOwner","mapNotNull","Person","fromThread","threadOwnerId","o","height","NodeTracker","isRendered","threadStateAwaiter","getPromiseAwaiter","Promise","resolve","getStateFromThread","ex","handleError","threadState","checkIfReady","isBusy","checkIfBusy","checkIfHasChanges","allowToSave","checkIfAllowedToSave","checkIfAllowedToCancel","not","isReplyEditor","isNotNull","isEditMode","cHasModReply","_this$parentThread","_this$parentThread$re","_this$parentThread2","_this$parentThread2$r","_this$parentThread3","hasModReply","replies","r","isModerator","cCanHaveSuggestionsUI","_this$topic","cReplyContent","translationManager","DiscussionTranslationManager","oTranslationNeeded","requestAnimationFrame","DOMHelpers","isInViewPort","scrollTo","_this$thread","editing","initRequired","isInitCycle","reset","scope","localStorage","newComment","newReply","oldStateStr","oldState","JSON","parse","setState","state","getState","saveState","set","stringify","remove","setStateFromThread","shouldAutoSave","checkIfShouldAutoSave","overrides","errorOrResult","validate","isString","WCCError","visibilityOptions","Visibility","ThreadParticipantIDs","ThreadVisibilityTagIDs","saveDataRaw","getSaveData","isArray","WCC","Settings","NotNativeSpeaker","threadJson","IsForcedContentTranslationNeeded","ThreadContent","saveDataList","UnknownError","jsonThreads","saveData","toJson","getBaseThreadJson","updateThread","saveThread","saveMultipleThreads","finishEditing","ReloadPageAfterSubmitting","window","location","reload","console","log","jsonThread","commentsService","saveMultiple","update","finishThreadEditing","getS3Attachments","attachments","s3Attachments","forEach","attachment","Files","file","URLHelpers","isS3SignedLink","Link","push","Attachments","s3AttachmentPromises","ImageHelpers","checkIfS3ImageHasExpired","UserFileId","s3AttachmentResults","all","newAttachments","some","result","exists","showInfoMessage","visibility","_this$threadOwner","_this$threadOwner2","_this$threadOwner3","_this$threadOwner4","ParentThreadId","DiscussionTopicId","PostedById","ThreadCreator","nicknameOrName","ThreadCreatorUserImage","imageURL","CreatorTaskMemberStatus","servicesContext","allVisibilities","Public","title","icon","description","OtherParticipantsInTheDiscussionCanSeeThisPost","Private","PrivatePost","ThisPostIsOnlyVisibleToYouAndTheModerator","ByPerson","ThisPostIsOnlyVisibleToYouAndParticipantsYouHaveSelected","Tags","ByTag","ThisPostIsOnlyVisibleToYouAndParticipantsTaggedByTags","PrivateMessage","ThisPostIsAMessageOrQuestionToTheModerator","separate","PrivateModsAndObs","ThisPostIsOnlyVisibleToModeratorsAndObservers","ThreadEditorVisibilityButtonVM","visibilities","getVisibilities","visibilitiesSelect","selectedVisibility","public","group","tags","privateModAndObs","isRegular","commentsAreHidden","isIdeation","private","privateMessage","ThreadEditorVisibilityOptionsVM","participantsPicker","visibilityTagsPicker","_this$participantsPic","_this$visibilityTagsP","ThreadEditorVisibilityTagsPickerVM","tagsManager","TopicPeopleTagsManager","isLoadingTags","t","_t$contentTagId","contentTagId","tagValue","editorTagsIDs","selectedTagsIDs","componentModelMetadataKey","Symbol","ctor","Reflect","defineMetadata","accountId","busy","source","loading","requestsProcessed","updating","queryData","MembershipStatusType","SortKey","CollectionDataSource","load","bind","mapper","jsonPerson","PersonTiny","list","peopleService","subscriptions","accountPeople","subscribe","events","personChanged","on","onPersonChanged","queries","discussionParticipantsTiny","toArrayPost","addArgs","background","firstOrDefaultPost","managerConfig","isAllowedToShow","isAllowed","ui","isTranslationShown","isModeratorOrObserver","translationLanguage","isSupported","Storage","keys","commentId","WCCLocalStorageManagerScope","key","_localStorage$getItem","getItem","setItem","removeItem","localStorageManager","taskDescriptionShown","taskSecondaryDescriptionShown","pixabayQuery","unsplashQuery","commentsFilters","userId","cameraId","microphoneId","speakersId","youtubeVideosMetadata","attribute","predicate","action","withEffects","$node","observer","MutationObserver","mutations","mutation","oldValue","observe","attributes","attributeOldValue","attributeFilter","disconnect","dispose","TagsManagerBase","addTag","jsonTag","Error","removeTag","tag","tagsService","topicPeopleTags","toArray","PersonId","FullName","ImageURL","SystemHelpers","html","getTemplatesAndResources","document","head","appendChild","___CSS_LOADER_API_IMPORT___"],"mappings":"yIAAA,IAAIA,EAAM,EAAQ,gFACFC,EAAU,EAAQ,kJAIC,iBAFvBA,EAAUA,EAAQC,WAAaD,EAAQE,QAAUF,KAG/CA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAG9C,IAAIK,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPN,EAAIC,EAASK,GAI1BF,EAAOG,QAAUN,EAAQO,QAAU,I,q1BCO7B,MAAgBC,EAKlBC,YAAYC,GAA2B,IAAAC,EACnCC,KAAKC,MAAQC,EAAGC,WAA2B,QAAjBJ,EAAU,MAATD,OAAS,EAATA,EAAWM,aAAK,IAAAL,IAAa,MAATD,OAAS,EAATA,EAAWG,OAAOI,SAASf,QAAQ,IAClFU,KAAKM,MAAQJ,EAAGK,gBAAyB,MAATT,OAAS,EAATA,EAAWQ,MAAO,YAClDN,KAAKQ,SAAWN,EAAGK,gBAAyB,MAATT,OAAS,EAATA,EAAWU,SAAU,SAGlDC,SAASC,GACf,OAAIC,EAAEC,WAAWF,GACNV,KAAKC,QAAQY,KAAKH,GACpBC,EAAEG,SAASJ,IAAoBV,KAAKC,QAAQc,SAASL,GACnDA,OADN,GASb,IAAqBM,EAArB,MAGInB,YACwCoB,EACFC,GAJtC,KAAAC,SAAWjB,EAAGC,aAyBd,KAAAiB,YAAc,CAACC,EAAQC,KACnB,MACMC,EADUC,EAAEF,EAAEG,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sourcesContent":["var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./base.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import componentModel from 'decorators/componentModel';\r\nimport { inject, injectable } from \"inversify\";\r\nimport { PureComputed, Subscribable, SubscribableOrNullableValue, SubscribableOrValue } from \"knockout\";\r\nimport { wccModules } from \"../../../enums/wccModules\";\r\nimport './base.scss';\r\n\r\nexport interface DropdownItem {\n title: Subscribable | string\r\n value: T\r\n header?: SubscribableOrNullableValue\r\n separate?: SubscribableOrNullableValue\r\n separateAfter?: SubscribableOrNullableValue\r\n}\n\nexport interface JSONDropdown {\n Items?: SubscribableOrValue>>\r\n items?: SubscribableOrValue>>\r\n theme?: DropdownTheme\r\n textSize?: DropdownTextSize\r\n}\n\nexport type DropdownItemOrPredicate = DropdownItem | ((item: DropdownItem) => boolean)\nexport type DropdownTheme = 'darkgrey' | 'black' | 'blue' | 'grey' | 'white';\nexport type DropdownTextSize = 'medium' | 'small' | 'extrasmall' | 'large';\n\nexport abstract class Dropdown {\n items: PureComputed>>\n theme: Subscribable\n textSize: Subscribable\n\n constructor(jsonModel?: JSONDropdown) {\r\n this.items = ko.observable(jsonModel?.Items ?? jsonModel?.items).unwrap().default([]);\r\n this.theme = ko.flattenComputed(jsonModel?.theme, 'darkgrey');\r\n this.textSize = ko.flattenComputed(jsonModel?.textSize, 'small');\r\n }\r\n\r\n protected findItem(itemOrPredicate: DropdownItemOrPredicate) {\r\n if (_.isFunction(itemOrPredicate))\r\n return this.items().find(itemOrPredicate);\r\n else if (_.isObject(itemOrPredicate) && this.items().includes(itemOrPredicate))\r\n return itemOrPredicate;\r\n\n return undefined;\r\n }\r\n}\n\n@injectable()\n@componentModel(Dropdown)\nexport default class DropdownVM {\n bodyNode = ko.observable();\n\n constructor(\r\n @inject(wccModules.componentConfig) model: Dropdown,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo\r\n ) {\r\n const isAlwaysShown = ko.pureComputed(() => this.checkIfAlwaysShown());\r\n const isVisible = ko.pureComputed(() => isAlwaysShown() || model.items().length > 0);\r\n\r\n ko.applyBindingsToNode(info.element, {\n 'visible': isVisible,\n\n 'css': {\n 'wcc-dropdown': true,\n 'wcc-dropdown--black': model.theme.is('black'),\n 'wcc-dropdown--blue': model.theme.is('blue'),\n 'wcc-dropdown--grey': model.theme.is('grey'),\n 'wcc-dropdown--white': model.theme.is('white'),\n 'wcc-dropdown--text-m': model.textSize.is('medium'),\n 'wcc-dropdown--text-xs': model.textSize.is('extrasmall'),\n 'wcc-dropdown--text-lg': model.textSize.is('large')\n }\n });\r\n }\r\n\r\n onBodyClick = (m: any, e: JQueryEventObject) => {\r\n const $target = $(e.target);\r\n const $rowOrBody = $target.closest('li, .dropdown-menu');\r\n\r\n let isClickable = $rowOrBody.is('li') && $rowOrBody.children('a').length > 0;\r\n\r\n if (!isClickable) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n protected checkIfAlwaysShown() {\r\n return false;\r\n }\r\n}","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./select.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import { wccModules } from \"enums/wccModules\";\r\nimport { SmartDropdownOptions } from \"extensions/knockout/bindings/smartDropdown\";\r\nimport { inject, injectable } from \"inversify\";\r\nimport { Observable, PureComputed, Subscribable, SubscribableOrNullableValue } from \"knockout\";\r\nimport NodeAttributeTracker from \"../../../managers/nodes/attributeTracker\";\r\nimport { EffectsContainer } from \"../../../mixins/withEffects\";\r\nimport DropdownVM, { Dropdown, DropdownItem, DropdownItemOrPredicate, JSONDropdown } from \"../base/base\";\r\nimport './select.html';\r\n\r\nexport interface JSONSelectDropdown extends JSONDropdown {\n Disabled?: boolean\n\n placeholder?: SubscribableOrNullableValue\n container?: SubscribableOrNullableValue\n customScroll?: SubscribableOrNullableValue\n\n noDefault?: boolean \r\n disabled?: boolean\r\n highlightActiveItem?: boolean\r\n}\n\nexport class SelectDropdown extends Dropdown {\n selectedItem: PureComputed | undefined>\n disabled: Observable \n\n placeholder: Subscribable\n container: Subscribable\n\n hasCustomScroll: Subscribable\n\n highlightActiveItem: boolean\n noDefault: boolean\n\n constructor(data?: JSONSelectDropdown) {\n super(data);\n\n const defaultValue = data?.noDefault === true ? undefined : this.items.first();\n\n this.selectedItem = ko.observable().default(defaultValue);\n this.disabled = ko.observable(data?.Disabled ?? data?.disabled ?? false);\n\n this.placeholder = ko.flattenComputed(data?.placeholder);\n this.container = ko.flattenComputed(data?.container);\n\n this.hasCustomScroll = ko.flattenComputed(data?.customScroll, false);\n\n this.noDefault = data?.noDefault ?? false;\n this.highlightActiveItem = data?.highlightActiveItem ?? false; \n }\n\n select(itemOrPredicate: DropdownItemOrPredicate) {\n let item = this.findItem(itemOrPredicate);\n\n if (item !== this.selectedItem())\n this.selectedItem(item);\n }\n\n clear() {\n this.selectedItem(undefined);\n }\n}\n\n@injectable()\nexport default class SelectDropdownVM extends DropdownVM {\n private dropdown: SelectDropdown\n\n dropdownNode = ko.observable();\n\n isOpen = ko.observable(false);\n\n headerNodes: JQuery\n itemNodes: JQuery\n\n highlightActiveItem: boolean\n\n items: Subscribable>\n selectedItem: PureComputed\n\n placeholder: Subscribable \n \n isHeaderAllowed: Subscribable\n hasMultipleItems: Subscribable\n hasSingleItem: Subscribable\n\n smartDropdownConfig: SmartDropdownOptions\n\n constructor(\r\n @inject(wccModules.componentConfig) model: SelectDropdown,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n super(model, info);\r\n\r\n this.dropdown = model;\r\n this.highlightActiveItem = model.highlightActiveItem;\r\n\r\n this.placeholder = model.placeholder;\r\n\r\n this.headerNodes = $(info.templateNodes).filter('select-head').contents();\n this.itemNodes = $(info.templateNodes).filter('select-item').contents();\r\n\r\n this.items = model.items;\n this.selectedItem = model.selectedItem;\r\n\r\n this.isHeaderAllowed = ko.pureComputed(() => this.dropdown.noDefault || this.selectedItem() != undefined);\r\n this.hasMultipleItems = ko.pureComputed(() => this.items().length > 1 || this.dropdown.noDefault);\r\n this.hasSingleItem = ko.pureComputed(() => this.items().length == 1 && !this.dropdown.noDefault);\r\n\r\n this.smartDropdownConfig = {\n container: model.container\r\n }\r\n\r\n effects.register((items, selectedItem) => {\r\n if (selectedItem != undefined && !items.includes(selectedItem))\r\n this.selectedItem(undefined);\r\n }, [this.items, this.selectedItem]);\r\n\r\n effects.register(new NodeAttributeTracker(this.dropdownNode, 'class', () => true, node => this.isOpen(node.hasClass('open'))));\r\n\r\n ko.applyBindingsToNode(info.element, {\n click: (m: any, e: JQueryEventObject) => this.onClick(e),\n\n css: {\n 'wcc-dropdown--custom-scroll': model.hasCustomScroll\r\n }\n });\r\n\r\n if (!_(this.headerNodes).any())\n this.headerNodes = $(`\n\n\n\n\n\n\n`);\n\n if (!_(this.itemNodes).any())\n this.itemNodes = $(''); \r\n }\r\n\r\n select = (itemOrPredicate: DropdownItemOrPredicate) => this.dropdown.select(itemOrPredicate)\r\n\r\n private onClick(e: JQueryEventObject) {\n if (this.dropdown.disabled()) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\r\n}","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./participantsPicker.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./participantsPicker.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Observable, PureComputed } from 'knockout';\r\nimport { TinyPeopleListManager } from 'managers/discussion/people/tinyList';\r\nimport { IWCCStorageManager } from 'managers/iStorage';\r\nimport { withEffect } from 'mixins/withEffect';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport { DataFormat } from 'select2';\r\nimport './participantsPicker.html';\r\nimport './participantsPicker.scss';\r\nimport ThreadEditorPickerVM, { ThreadEditorPickerVMConfig } from './picker';\r\nimport ThreadEditorVM from './thread';\r\n\r\ncomponents.preload('wcc-select-2');\r\n\r\nexport interface ThreadEditorParticipantsPickerVMConfig {\r\n editor: ThreadEditorVM\r\n}\r\n\r\n@injectable()\r\nexport default class ThreadEditorParticipantsPickerVM {\r\n pickerConfig: ThreadEditorPickerVMConfig\r\n picker: Observable = ko.observable()\r\n\r\n isVisible: PureComputed\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) { editor }: ThreadEditorParticipantsPickerVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.storage) storage: IWCCStorageManager,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n const peopleManager = storage.get(TinyPeopleListManager, {\r\n discussionId: settings.discussionId,\r\n status: enums.MembershipStatusTypes.Member.value,\r\n sortKey: 'LastName'\r\n });\r\n\r\n const isLoadingPeople = peopleManager.pluck('loading', true);\r\n const people = peopleManager.pluck('people', []);\r\n\r\n this.pickerConfig = {\r\n data: people.map(p => ({ id: p.personId() ?? '', text: p.fullName() ?? '' })),\r\n\r\n isLoading: isLoadingPeople,\r\n isMultiple: true\r\n }\r\n\r\n this.isVisible = ko.pureComputed(() => editor.threadVisibility() === enums.ThreadVisibility.Group.value);\r\n\r\n effects.register(isReady => {\r\n if (!isReady) {\r\n editor.threadParticipantIDs([]);\r\n } else {\r\n return withEffect(picker => {\r\n if (picker != undefined) {\r\n return [\r\n withEffect(editorPeopleIDs => {\r\n if (!system.isTheSameList(editorPeopleIDs, picker.selection()))\r\n picker.selection(_.clone(editorPeopleIDs));\r\n }, [editor.threadParticipantIDs]),\r\n\r\n withEffect(selectedPeopleIDs => {\r\n if (!system.isTheSameList(selectedPeopleIDs, editor.threadParticipantIDs()))\r\n editor.threadParticipantIDs(_.clone(selectedPeopleIDs));\r\n }, [picker.selection]),\r\n ]\r\n }\r\n }, [this.picker]);\r\n }\r\n }, [this.isVisible]);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'visible': this.isVisible,\r\n\r\n 'css': {\r\n 'thread-editor-participants-picker': true\r\n }\r\n }, this);\r\n }\r\n}","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./picker.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./picker.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import Select2VM, { Select2VMConfig } from 'components/select2/select2';\r\nimport { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Observable, ObservableArray, Subscribable, SubscribableOrNullableValue } from 'knockout';\r\nimport { withEffect } from 'mixins/withEffect';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport { DataFormat } from 'select2';\r\nimport './picker.html';\r\nimport './picker.scss';\r\n\r\ncomponents.preload('wcc-select-2');\r\n\r\nexport interface ThreadEditorPickerVMConfig {\r\n data: SubscribableOrNullableValue>\r\n\r\n isMultiple: SubscribableOrNullableValue\r\n isLoading: SubscribableOrNullableValue\r\n}\r\n\r\n@injectable()\r\nexport default class ThreadEditorPickerVM {\r\n selectConfig: Select2VMConfig\r\n select: Observable = ko.observable()\r\n\r\n isLoading: Subscribable\r\n hasData: Subscribable\r\n\r\n selection: ObservableArray = ko.observableArray()\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) config: ThreadEditorPickerVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n const data = ko.flattenComputed(config.data, []);\r\n const isMultiple = ko.flattenComputed(config.isMultiple, false);\r\n\r\n this.isLoading = ko.flattenComputed(config.isLoading, false);\r\n this.hasData = ko.pureComputed(() => data().length > 0);\r\n\r\n this.selectConfig = {\r\n multiple: isMultiple,\r\n data: data\r\n }\r\n\r\n effects.register(select => {\r\n if (select != undefined) {\r\n return [\r\n withEffect(selection => {\r\n if (!system.isTheSameList(selection, select.selection()))\r\n select.selection(_.clone(selection));\r\n }, [this.selection]),\r\n\r\n withEffect(selectSelection => {\r\n if (!system.isTheSameList(selectSelection, this.selection()))\r\n this.selection(_.clone(select.selection()));\r\n }, [select.selection])\r\n ]\r\n }\r\n }, [this.select]);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'thread-editor-picker': true\r\n }\r\n }, this);\r\n }\r\n}","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./thread.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { DOMHelpers } from 'helpers/dom';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Observable, PureComputed, Subscribable } from 'knockout';\r\nimport { CurrentUserManager } from 'managers/currentUser';\r\nimport { IWCCStorageManager } from 'managers/iStorage';\r\nimport localStorage from 'managers/localStorage';\r\nimport { NodeTracker } from 'managers/nodes/tracker';\r\nimport { TopicManager } from 'managers/topic';\r\nimport { withEffect } from 'mixins/withEffect';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport { Person } from 'models/person';\r\nimport { Topic } from 'models/topic';\r\nimport { JSONTopicThread, TopicThread } from 'models/topicThread';\r\nimport WCCError from 'models/wccError';\r\nimport { ServicesContext } from 'services/context';\r\nimport { IThreadEditorVM, ThreadEditorVMConfig } from './thread.interfaces';\r\nimport './thread.scss';\r\nimport {has} from \"underscore\";\r\nimport DiscussionTranslationManager from \"../../../managers/discussion/translation\";\r\nimport { ImageHelpers } from '../../../helpers/images';\r\nimport { URLHelpers } from '../../../helpers/url';\r\n\r\ncomponents\r\n .registerLocal('thread-editor-visibility-button', () => require('./visibilityButton'))\r\n .registerLocal('thread-editor-visibility-options', () => require('./visibilityOptions'))\r\n .registerLocal('thread-editor-participants-picker', () => require('./participantsPicker'))\r\n .registerLocal('thread-editor-visibility-tags-picker', () => require('./visibilityTagsPicker'))\r\n .registerLocal('thread-editor-picker', () => require('./picker'));\r\n\r\n@injectable()\r\nexport default abstract class ThreadEditorVM implements IThreadEditorVM {\r\n private threadStateAwaiter: Subscribable | undefined>\r\n private threadState: Subscribable\r\n\r\n private isSaveFailed = ko.observable(false);\r\n\r\n private shouldClearParentOnSave: Subscribable\r\n\r\n private onSavedHandler?: Action<[Array]>\r\n private onCancelHandler?: Action\r\n\r\n labels = labels;\r\n\r\n threadVisibility = ko.observable();\r\n threadParticipantIDs = ko.observableArray();\r\n threadVisibilityTagIDs = ko.observableArray();\r\n\r\n isSaving = ko.observable(false);\r\n\r\n user: Subscribable\r\n topic: Subscribable\r\n topicId: Subscribable\r\n\r\n threadOwner: Subscribable\r\n threadOwnerId: Subscribable\r\n\r\n thread: Observable\r\n parentThread: PureComputed\r\n parentThreadId: Subscribable\r\n\r\n allowToSave: Subscribable\r\n allowToCancel: Subscribable\r\n\r\n isReady: Subscribable\r\n isLoading: Subscribable\r\n isBusy: Subscribable\r\n isReplyEditor: Subscribable\r\n isEditMode: Subscribable\r\n isPreviewMode: Subscribable\r\n hasChanges: Subscribable\r\n \r\n oTranslationNeeded: Subscribable\r\n\r\n cHasModReply: PureComputed;\r\n cCanHaveSuggestionsUI: PureComputed;\r\n cReplyContent: PureComputed | undefined>;\r\n \r\n oReplySuggestion = ko.observable();\r\n oTranslatedReplySuggestion = ko.observable();\r\n\r\n materialUIEnabled = ko.pureComputed(() => settings.isMaterialUIEnabled());\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) model: ThreadEditorVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.storage) protected storage: IWCCStorageManager,\r\n @inject(wccModules.servicesContext) protected ctx: ServicesContext,\r\n @inject(wccModules.effects) protected effects: EffectsContainer\r\n ) {\r\n this.isPreviewMode = ko.flattenComputed(model.preview, false);\r\n\r\n const topicId = ko.flattenComputed(model.topicId);\r\n const thread = ko.flattenComputed(model.thread);\r\n \r\n this.thread = ko.observable(thread()).extend({ deferred: true, notifyIfChanged: true })\r\n\r\n const threadTopicId = this.thread.pluck(th => th.topicId);\r\n const threadParentId = this.thread.pluck(th => th.parentId);\r\n\r\n const parentThread = ko.flattenComputed(model.parentThread);\r\n\r\n this.parentThread = ko.observable(parentThread).unwrap();\r\n this.parentThreadId = this.parentThread.pluck(th => th.id, threadParentId);\r\n\r\n const parentThreadTopicId = this.parentThread.pluck(th => th.topicId);\r\n this.topicId = threadTopicId.default(parentThreadTopicId).default(topicId);\r\n\r\n this.shouldClearParentOnSave = ko.pureComputed(() => this.parentThread() != undefined && this.parentThread() != parentThread());\r\n\r\n this.onSavedHandler = model.onSave;\r\n this.onCancelHandler = model.onCancel;\r\n\r\n const userManager = storage.get(CurrentUserManager, { discussionId: settings.discussionId });\r\n this.user = userManager.pluck(m => m.person);\r\n\r\n const topicManager = this.storage.get(TopicManager, { topicId: this.topicId });\r\n this.topic = topicManager.pluck(m => m.topic);\r\n\r\n this.threadOwner = this.thread.mapNotNull(th => Person.fromThread(th)).default(this.user);\r\n this.threadOwnerId = this.threadOwner.pluck(o => o.personId);\r\n\r\n const { height } = new NodeTracker({ node: info.element as HTMLElement });\r\n const isRendered = ko.pureComputed(() => height() > 0);\r\n\r\n this.threadStateAwaiter = this.thread.mapNotNull(thread => system.getPromiseAwaiter(Promise.resolve(this.getStateFromThread(thread)), ex => {\r\n this.thread(undefined);\r\n system.handleError(ex);\r\n }), this, true);\r\n\r\n this.threadState = ko.pureComputed(() => ko.unwrap(this.threadStateAwaiter()));\r\n\r\n this.isReady = ko.pureComputed(() => this.checkIfReady() && (this.thread() == undefined || this.threadState() != undefined));\r\n this.isBusy = ko.pureComputed(() => this.checkIfBusy());\r\n this.hasChanges = ko.pureComputed(() => this.checkIfHasChanges());\r\n\r\n this.allowToSave = ko.pureComputed(() => this.isReady() && !this.isBusy() && this.checkIfAllowedToSave());\r\n this.allowToCancel = ko.pureComputed(() => this.isReady() && !this.isBusy() && (this.hasChanges() || this.checkIfAllowedToCancel()));\r\n\r\n this.isLoading = this.isReady.not();\r\n this.isReplyEditor = this.parentThreadId.isNotNull();\r\n this.isEditMode = this.thread.isNotNull();\r\n\r\n this.cHasModReply = ko.pureComputed(() => {\r\n let hasModReply = this.parentThread()?.replies()?.length == 0 ? false : false;\r\n if(this.parentThread()?.replies()?.length \r\n && _.find(this.parentThread()?.replies() as TopicThread[], r => r.isModerator())) {\r\n hasModReply = true;\r\n }\r\n return hasModReply;\r\n });\r\n this.cCanHaveSuggestionsUI = ko.pureComputed(() => this.topic()?.cCanHaveSuggestionsUI() == true);\r\n //settings.summariseableActivityTypes.indexOf(this.topic()?.activityType() ?? -1) !== -1);\r\n //&& !this.cHasModReply());\r\n this.cReplyContent = ko.pureComputed(() => {\r\n return (this as any).text;\r\n });\r\n\r\n const translationManager = storage.get(DiscussionTranslationManager, { discussionId: settings.discussionId });\r\n this.oTranslationNeeded = translationManager.pluck('isAllowedToShow', false);\r\n\r\n //awaiting full construction\r\n requestAnimationFrame(() => {\r\n effects.register((thread, isRendered) => {\r\n if (thread != undefined && isRendered && !DOMHelpers.isInViewPort(info.element as HTMLElement))\r\n DOMHelpers.scrollTo(info.element as HTMLElement);\r\n }, [this.thread, isRendered]);\r\n\r\n effects.register(thread => {\r\n if (thread != undefined)\r\n this.thread(thread);\r\n }, [thread]);\r\n\r\n effects.register([\r\n () => {\r\n this.thread()?.editing(false);\r\n }\r\n ]);\r\n\r\n effects.register(async (thread, threadState, parentThreadId, topicId, threadOwnerId) => {\r\n //Editor can flick isReady flag during it's life time\r\n //but we need to reinit it only when main params are changed(this func args)\r\n let initRequired = true;\r\n\r\n return withEffect(async isReady => {\r\n if (isReady) {\r\n const isInitCycle = initRequired;\r\n\r\n initRequired = false;\r\n\r\n if (isInitCycle)\r\n this.reset(); //reset editor to base state\r\n\r\n if (threadState == undefined) {\r\n if (topicId != undefined && threadOwnerId != undefined) {\r\n //Find localstorage unit for this editor\r\n const scope = parentThreadId == undefined ?\r\n localStorage.newComment(topicId, threadOwnerId) :\r\n localStorage.newReply(topicId, threadOwnerId, parentThreadId);\r\n\r\n if (isInitCycle) {\r\n //Restore previous state from localstorage\r\n var oldStateStr = scope.get();\r\n\r\n if (oldStateStr != undefined) {\r\n //validate state (expired s3 links need to be purged)\r\n let oldState = JSON.parse(oldStateStr);\r\n ////console.log('setState BEFORE validate', oldState);\r\n //await this.validateAndUpdateS3Links(oldState);\r\n //console.log('setState AFTER validate', oldState);\r\n this.setState(oldState);\r\n }\r\n }\r\n\r\n const state = ko.pureComputed(() => this.getState());\r\n\r\n const saveState = (state: T | undefined) => {\r\n if (state != undefined)\r\n scope.set(JSON.stringify(state));\r\n else\r\n scope.remove();\r\n }\r\n\r\n //Start writing current state to localstorage\r\n return withEffect(state => saveState(state), [state]);\r\n }\r\n } else if (thread != undefined) {\r\n if (isInitCycle) {\r\n //init editor from thread and provided state\r\n this.setStateFromThread(thread);\r\n this.setState(threadState);\r\n }\r\n }\r\n }\r\n }, [this.isReady]);\r\n }, [this.thread, this.threadState, this.parentThreadId, this.topicId, this.threadOwnerId]);\r\n\r\n const shouldAutoSave = ko.pureComputed(() => this.checkIfShouldAutoSave());\r\n\r\n effects.register((allowToSave, shouldAutoSave, isSaveFailed) => {\r\n if (allowToSave && shouldAutoSave && !isSaveFailed)\r\n this.save();\r\n }, [this.allowToSave, shouldAutoSave, this.isSaveFailed]);\r\n });\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'thread-editor': true\r\n }\r\n });\r\n }\r\n\r\n save = async () => {\r\n await this.saveAdvanced();\r\n }\r\n\r\n cancel = (force?: any) => {\r\n if (force === true) {\r\n this.cancelInternal();\r\n } else if (this.allowToCancel()) {\r\n if (this.hasChanges())\r\n system.confirm(messages.AreYouSureYouWantToCancelAllYourChanges, () => this.cancelInternal());\r\n else\r\n this.cancelInternal();\r\n }\r\n }\r\n\r\n async saveAdvanced(overrides?: JSONTopicThread) {\r\n if (this.allowToSave()) {\r\n const errorOrResult = this.validate();\r\n\r\n if (_.isString(errorOrResult)) {\r\n system.handleError(new WCCError(errorOrResult));\r\n } else if (errorOrResult === true || errorOrResult == undefined) {\r\n try {\r\n this.isSaving(true);\r\n\r\n const thread = this.thread();\r\n\r\n const visibilityOptions: JSONTopicThread = {\r\n Visibility: this.threadVisibility(),\r\n ThreadParticipantIDs: this.threadParticipantIDs(),\r\n ThreadVisibilityTagIDs: this.threadVisibilityTagIDs()\r\n }\r\n\r\n const saveDataRaw = this.getSaveData();\r\n \r\n if(!_.isArray(saveDataRaw) && WCC.Settings.NotNativeSpeaker === true) {\r\n const threadJson = (saveDataRaw as JSONTopicThread);\r\n threadJson.IsForcedContentTranslationNeeded = true;\r\n if (this.isReplyEditor() && this.oTranslatedReplySuggestion()) {\r\n // Thread is a reply, has been built from reply suggestion and thread creator is not a native speaker \r\n if (threadJson.ThreadContent === this.oTranslatedReplySuggestion()) {\r\n // Suggestion has not been edited, and we can use suggestion that we have already got without translating it\r\n threadJson.ThreadContent = this.oReplySuggestion();\r\n threadJson.IsForcedContentTranslationNeeded = false;\r\n }\r\n }\r\n }\r\n \r\n const saveDataList = _.isArray(saveDataRaw) ? saveDataRaw : [saveDataRaw];\r\n\r\n if (saveDataList.length == 0)\r\n throw new WCCError(messages.UnknownError);\r\n\r\n const jsonThreads = saveDataList.map(saveData => {\r\n if (thread != undefined)\r\n return _({}).extend(thread.toJson(), visibilityOptions, saveData, overrides);\r\n else\r\n return _({}).extend(this.getBaseThreadJson(), visibilityOptions, saveData, overrides);\r\n });\r\n\r\n if (jsonThreads.length == 1) {\r\n if (thread != undefined)\r\n await this.updateThread(jsonThreads[0]);\r\n else\r\n await this.saveThread(jsonThreads[0]);\r\n } else {\r\n if (thread != undefined)\r\n throw new WCCError(messages.UnknownError);\r\n else\r\n await this.saveMultipleThreads(jsonThreads);\r\n }\r\n\r\n this.isSaveFailed(false);\r\n\r\n this.finishEditing();\r\n\r\n if (this.onSavedHandler) this.onSavedHandler(jsonThreads);\r\n \r\n try {\r\n if (WCC.Settings.ReloadPageAfterSubmitting == true) {\r\n window.location.reload();\r\n }\r\n }catch (ex) {\r\n console.log(ex);\r\n }\r\n \r\n } catch (ex) {\r\n system.handleError(ex, true);\r\n this.isSaveFailed(true);\r\n } finally {\r\n this.isSaving(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected abstract getSaveData(): JSONTopicThread | Array\r\n protected abstract getState(): T | undefined\r\n protected abstract setState(data: T): void\r\n protected abstract getStateFromThread(thread: TopicThread): Promise | T\r\n\r\n protected abstract validate(): string | undefined | boolean\r\n\r\n protected checkIfReady() {\r\n return this.user() != undefined &&\r\n this.threadOwner() != undefined &&\r\n this.topic() != undefined &&\r\n (this.threadStateAwaiter() == undefined || this.threadState() != undefined);\r\n }\r\n\r\n protected checkIfHasChanges() {\r\n return this.thread() != undefined;\r\n }\r\n\r\n protected checkIfAllowedToSave() {\r\n return true;\r\n }\r\n\r\n protected checkIfAllowedToCancel() {\r\n return false;\r\n }\r\n\r\n protected checkIfBusy() {\r\n return this.isSaving();\r\n }\r\n\r\n protected checkIfShouldAutoSave() {\r\n return false;\r\n }\r\n\r\n protected async saveThread(jsonThread: JSONTopicThread): Promise {\r\n await this.ctx.commentsService.save(jsonThread);\r\n }\r\n\r\n protected async saveMultipleThreads(jsonThreads: Array): Promise {\r\n await this.ctx.commentsService.saveMultiple(jsonThreads);\r\n }\r\n\r\n protected async updateThread(jsonThread: JSONTopicThread): Promise {\r\n await this.ctx.commentsService.update(jsonThread);\r\n }\r\n\r\n protected cancelInternal() {\r\n this.finishEditing();\r\n \r\n this.oReplySuggestion(undefined);\r\n this.oTranslatedReplySuggestion(undefined);\r\n\r\n if (this.onCancelHandler)\r\n this.onCancelHandler();\r\n }\r\n\r\n protected reset() {\r\n this.threadVisibility(undefined);\r\n this.threadParticipantIDs([]);\r\n this.threadVisibilityTagIDs([]);\r\n this.isSaveFailed(false);\r\n }\r\n\r\n protected finishEditing() {\r\n this.finishThreadEditing();\r\n\r\n this.reset();\r\n this.saveState();\r\n\r\n if (this.shouldClearParentOnSave())\r\n this.parentThread(undefined);\r\n }\r\n\r\n private finishThreadEditing() {\r\n const thread = this.thread();\r\n\r\n if (thread != undefined) {\r\n thread.editing(false);\r\n this.thread(undefined);\r\n }\r\n }\r\n\r\n private getS3Attachments(attachments: []): any[] {\r\n let s3Attachments: any[] = [];\r\n\r\n attachments.forEach((attachment: any) => {\r\n let s3signedFiles = attachment.Files.filter((file: any) => file && URLHelpers.isS3SignedLink(file.Link));\r\n\r\n if (s3signedFiles.length > 0) { \r\n s3Attachments.push(attachment);\r\n }\r\n });\r\n\r\n return s3Attachments;\r\n }\r\n\r\n //\r\n // Validate and clean up any expired s3 signed links\r\n //\r\n private async validateAndUpdateS3Links(state: any) {\r\n if (state.Attachments) {\r\n console.log('state.Attachments BEFORE', state.Attachments);\r\n\r\n let s3Attachments = this.getS3Attachments(state.Attachments);\r\n\r\n let s3AttachmentPromises: Promise[] = [];\r\n\r\n s3Attachments.forEach((attachment: any) => {\r\n attachment.Files.forEach((file: any) => {\r\n s3AttachmentPromises.push(ImageHelpers.checkIfS3ImageHasExpired(file.UserFileId, file.Link));\r\n });\r\n });\r\n\r\n console.log('S3 validation promises', s3AttachmentPromises);\r\n\r\n let s3AttachmentResults = await Promise.all(s3AttachmentPromises);\r\n\r\n console.log('S3 validation promise results', s3AttachmentResults);\r\n\r\n // filter our current attachments array with only valid s3 attachments\r\n let newAttachments = state.Attachments.filter(\r\n (attachment: any) => attachment.Files.some(\r\n (file: any) => s3AttachmentResults.some(\r\n (result: any) => result.id == file.UserFileId && result.exists)));\r\n\r\n console.log('Valid S3 attachments', newAttachments);\r\n\r\n // notify users that expired images have been removed\r\n if (state.Attachments.length != newAttachments.length) {\r\n system.showInfoMessage('NOTE: Expired image/video uploads have been removed from local cache for security reasons.');\r\n }\r\n\r\n // update our state attachments with changes (if applicable)\r\n state.Attachments = newAttachments;\r\n \r\n console.log('state.Attachments AFTER', state.Attachments);\r\n }\r\n }\r\n\r\n\r\n private saveState() {\r\n if (this.thread() == undefined) {\r\n const topicId = this.topicId();\r\n const threadOwnerId = this.threadOwnerId();\r\n const parentThreadId = this.parentThreadId()\r\n\r\n if (topicId != undefined && threadOwnerId != undefined) {\r\n const scope = parentThreadId == undefined ?\r\n localStorage.newComment(topicId, threadOwnerId) :\r\n localStorage.newReply(topicId, threadOwnerId, parentThreadId);\r\n\r\n const state = this.getState();\r\n\r\n if (state != undefined)\r\n scope.set(JSON.stringify(state));\r\n else\r\n scope.remove();\r\n }\r\n }\r\n }\r\n\r\n private setStateFromThread(thread: TopicThread) {\r\n this.threadVisibility(thread.visibility());\r\n this.threadParticipantIDs(thread.threadParticipantIDs());\r\n this.threadVisibilityTagIDs(thread.threadVisibilityTagIDs());\r\n }\r\n\r\n private getBaseThreadJson(): JSONTopicThread {\r\n return {\r\n ParentThreadId: this.parentThreadId(),\r\n DiscussionTopicId: this.topicId(),\r\n PostedById: this.threadOwner()?.personId(),\r\n ThreadCreator: this.threadOwner()?.nicknameOrName(),\r\n ThreadCreatorUserImage: this.threadOwner()?.imageURL(),\r\n CreatorTaskMemberStatus: this.threadOwner()?.status()\r\n }\r\n }\r\n}","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./visibilityButton.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./visibilityButton.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { DropdownItem } from 'components/dropdowns/base/base';\r\nimport { SelectDropdown } from 'components/dropdowns/select/select';\r\nimport { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Subscribable } from 'knockout';\r\nimport { CurrentUserManager } from 'managers/currentUser';\r\nimport { IWCCStorageManager } from 'managers/iStorage';\r\nimport { withEffect } from 'mixins/withEffect';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport { Person } from 'models/person';\r\nimport { Topic } from 'models/topic';\r\nimport ThreadEditorVM from './thread';\r\nimport './visibilityButton.html';\r\nimport './visibilityButton.scss';\r\n\r\ncomponents.preload('wcc-select');\r\n\r\nconst allVisibilities = {\r\n 'public': {\r\n value: enums.ThreadVisibility.Public.value,\r\n title: labels.Public,\r\n icon: '',\r\n description: labels.OtherParticipantsInTheDiscussionCanSeeThisPost\r\n },\r\n\r\n 'private': {\r\n value: enums.ThreadVisibility.Private.value,\r\n title: labels.PrivatePost,\r\n icon: '',\r\n description: labels.ThisPostIsOnlyVisibleToYouAndTheModerator\r\n },\r\n\r\n 'group': {\r\n value: enums.ThreadVisibility.Group.value,\r\n title: labels.ByPerson,\r\n icon: '',\r\n description: labels.ThisPostIsOnlyVisibleToYouAndParticipantsYouHaveSelected\r\n },\r\n\r\n 'tags': {\r\n value: enums.ThreadVisibility.Tags.value,\r\n title: labels.ByTag,\r\n icon: '',\r\n description: labels.ThisPostIsOnlyVisibleToYouAndParticipantsTaggedByTags\r\n },\r\n\r\n 'privateMessage': {\r\n value: enums.ThreadVisibility.PrivateMessage.value,\r\n title: labels.PrivateMessage,\r\n icon: '',\r\n description: labels.ThisPostIsAMessageOrQuestionToTheModerator,\r\n separate: true\r\n },\r\n\r\n 'privateModAndObs': {\r\n value: enums.ThreadVisibility.PrivateModsAndObs.value,\r\n title: labels.PrivatePost,\r\n icon: '',\r\n description: labels.ThisPostIsOnlyVisibleToModeratorsAndObservers,\r\n separate: true\r\n },\r\n}\r\n\r\ninterface ThreadVisibility {\r\n value: number\r\n title: string\r\n icon: string\r\n description: string\r\n separate?: boolean\r\n}\r\n\r\nexport interface ThreadEditorVisibilityButtonVMConfig {\r\n editor: ThreadEditorVM\r\n}\r\n\r\n@injectable()\r\nexport default class ThreadEditorVisibilityButtonVM {\r\n private topic: Subscribable\r\n private user: Subscribable\r\n private visibilities = ko.pureComputed(() => this.getVisibilities())\r\n\r\n editor: ThreadEditorVM\r\n visibilitiesSelect: SelectDropdown\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) config: ThreadEditorVisibilityButtonVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.storage) storage: IWCCStorageManager,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n this.editor = config.editor;\r\n\r\n this.topic = this.editor.topic;\r\n\r\n const userManager = storage.get(CurrentUserManager, { discussionId: settings.discussionId });\r\n this.user = userManager.pluck(m => m.person);\r\n\r\n this.visibilitiesSelect = new SelectDropdown({\r\n items: this.visibilities.map(visibility => visibility as DropdownItem)\r\n });\r\n\r\n const selectedVisibility = this.visibilitiesSelect.selectedItem.pluck('value');\r\n\r\n const isReady = ko.pureComputed(() => this.checkIfReady());\r\n\r\n effects.register(isReady => {\r\n if (isReady) {\r\n return [\r\n withEffect(visibility => {\r\n if (selectedVisibility() !== visibility)\r\n this.visibilitiesSelect.select(item => item.value === visibility);\r\n }, [this.editor.threadVisibility]),\r\n\r\n withEffect(selectedVisibility => {\r\n if (selectedVisibility !== this.editor.threadVisibility())\r\n this.editor.threadVisibility(selectedVisibility)\r\n }, [selectedVisibility])\r\n ]\r\n }\r\n }, [isReady]);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'visible': isReady,\r\n\r\n 'css': {\r\n 'thread-editor-visibility-button': true\r\n }\r\n }, this);\r\n }\r\n\r\n private checkIfReady() {\r\n return this.visibilities().length > 1;\r\n }\r\n\r\n private getVisibilities() {\r\n const topic = this.topic();\r\n const user = this.user();\r\n\r\n const visibilities: Array = [];\r\n\r\n if (topic != undefined && user != undefined) {\r\n visibilities.push(allVisibilities.public);\r\n\r\n if (user.isModerator()) {\r\n visibilities.push(allVisibilities.group);\r\n visibilities.push(allVisibilities.tags);\r\n visibilities.push(allVisibilities.privateModAndObs);\r\n } else if (user.isRegular() && !topic.commentsAreHidden() && !topic.isIdeation()) {\r\n visibilities.push(allVisibilities.private);\r\n visibilities.push(allVisibilities.privateMessage);\r\n }\r\n }\r\n\r\n return visibilities;\r\n }\r\n}","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./visibilityOptions.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./visibilityOptions.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Observable, PureComputed } from 'knockout';\r\nimport ThreadEditorVM from './thread';\r\nimport ThreadEditorParticipantsPickerVM from './participantsPicker';\r\nimport ThreadEditorVisibilityTagsPickerVM from './visibilityTagsPicker';\r\nimport './visibilityOptions.html';\r\nimport './visibilityOptions.scss';\r\n\r\nexport interface ThreadEditorVisibilityOptionsVMConfig {\r\n editor: ThreadEditorVM\r\n}\r\n\r\n@injectable()\r\nexport default class ThreadEditorVisibilityOptionsVM {\r\n editor: ThreadEditorVM\r\n\r\n participantsPicker: Observable = ko.observable()\r\n visibilityTagsPicker: Observable = ko.observable()\r\n\r\n isVisible: PureComputed\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) config: ThreadEditorVisibilityOptionsVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo\r\n ) {\r\n this.editor = config.editor;\r\n\r\n this.isVisible = ko.pureComputed(() => this.participantsPicker()?.isVisible() || this.visibilityTagsPicker()?.isVisible() || false);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'visible': this.isVisible,\r\n\r\n 'css': {\r\n 'thread-editor-visibility-options': true\r\n }\r\n }, this);\r\n }\r\n}","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./visibilityTagsPicker.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./visibilityTagsPicker.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Observable, PureComputed } from 'knockout';\r\nimport { IWCCStorageManager } from 'managers/iStorage';\r\nimport TopicPeopleTagsManager from 'managers/tags/topicPeople';\r\nimport { withEffect } from 'mixins/withEffect';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport { DataFormat } from 'select2';\r\nimport ThreadEditorPickerVM, { ThreadEditorPickerVMConfig } from './picker';\r\nimport ThreadEditorVM from './thread';\r\nimport './visibilityTagsPicker.html';\r\nimport './visibilityTagsPicker.scss';\r\n\r\ncomponents.preload('wcc-select-2');\r\n\r\nexport interface ThreadEditorVisibilityTagsPickerVMConfig {\r\n editor: ThreadEditorVM\r\n}\r\n\r\n@injectable()\r\nexport default class ThreadEditorVisibilityTagsPickerVM {\r\n pickerConfig: ThreadEditorPickerVMConfig\r\n picker: Observable = ko.observable()\r\n\r\n isVisible: PureComputed\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) { editor }: ThreadEditorVisibilityTagsPickerVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n @inject(wccModules.storage) storage: IWCCStorageManager,\r\n @inject(wccModules.effects) effects: EffectsContainer\r\n ) {\r\n const tagsManager = storage.get(TopicPeopleTagsManager, [editor.topicId]);\r\n const isLoadingTags = tagsManager.pluck('loading', true);\r\n const tags = tagsManager.pluck('tags', []);\r\n\r\n this.pickerConfig = {\r\n data: tags.map(t => ({ id: t.contentTagId() ?? '', text: t.tagValue() })),\r\n\r\n isLoading: isLoadingTags,\r\n isMultiple: true\r\n }\r\n\r\n this.isVisible = ko.pureComputed(() => editor.threadVisibility() === enums.ThreadVisibility.Tags.value);\r\n\r\n effects.register(isReady => {\r\n if (!isReady) {\r\n editor.threadVisibilityTagIDs([]);\r\n } else {\r\n return withEffect(picker => {\r\n if (picker != undefined) {\r\n return [\r\n withEffect(editorTagsIDs => {\r\n if (!system.isTheSameList(editorTagsIDs, picker.selection()))\r\n picker.selection(_.clone(editorTagsIDs));\r\n }, [editor.threadVisibilityTagIDs]),\r\n\r\n withEffect(selectedTagsIDs => {\r\n if (!system.isTheSameList(selectedTagsIDs, editor.threadVisibilityTagIDs()))\r\n editor.threadVisibilityTagIDs(_.clone(selectedTagsIDs));\r\n }, [picker.selection]),\r\n ]\r\n }\r\n }, [this.picker]);\r\n }\r\n }, [this.isVisible]);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'visible': this.isVisible,\r\n\r\n 'css': {\r\n 'thread-editor-visibility-tags-picker': true\r\n }\r\n }, this);\r\n }\r\n}","export const componentModelMetadataKey = Symbol('component:template');\r\n\r\nexport default function componentModel(model: any) {\r\n return (ctor: any) => {\r\n Reflect.defineMetadata(componentModelMetadataKey, model, ctor);\r\n return ctor;\r\n }\r\n}","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Subscribable } from 'knockout';\r\nimport { CollectionDataSource } from 'managers/datasources/collection';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport PersonTiny, { JSONPersonTiny } from 'models/personTiny';\r\nimport { ServicesContext } from 'services/context';\r\n\nconst { accountId } = settings;\n\nexport interface TinyPeopleListManagerConfig {\n discussionId: string\r\n status: number,\r\n sortKey: string\r\n}\n\ninterface QueryData {\n MembershipStatusType: number\r\n SortKey: string\r\n}\n\n@injectable()\nexport class TinyPeopleListManager {\n private discussionId: string\n private queryData: QueryData\n\n private source: CollectionDataSource\n \n\n people: Subscribable>\n\n busy = ko.pureComputed(() => this.source.busy())\n loading = ko.pureComputed(() => this.source.busy() && this.source.requestsProcessed() === 0);\n updating = ko.pureComputed(() => this.source.busy() && this.source.requestsProcessed() > 0);\n\n constructor(\n @inject(wccModules.managerConfig) { discussionId, status, sortKey }: TinyPeopleListManagerConfig,\n @inject(wccModules.servicesContext) private ctx: ServicesContext,\n @inject(wccModules.effects) effects: EffectsContainer\n ) {\n this.discussionId = discussionId;\n\n this.queryData = {\n MembershipStatusType: status,\r\n SortKey: sortKey\r\n }\n\n this.source = effects.register(new CollectionDataSource({\n load: this.load.bind(this),\n update: this.update.bind(this),\n mapper: jsonPerson => new PersonTiny(jsonPerson)\n }));\n\n this.people = this.source.list; \n\n if (accountId)\n ctx.peopleService.subscriptions.accountPeople.subscribe(accountId);\n\n ctx.peopleService.events.personChanged.on(this.onPersonChanged.bind(this));\n }\n\n private load() {\n return this.ctx\n .peopleService\n .queries\n .discussionParticipantsTiny(this.discussionId)\n .toArrayPost(this.queryData);\n }\n\n private async update(person: PersonTiny) {\n const jsonPerson: JSONPersonTiny = await this.ctx.peopleService.queries\n .discussionParticipantsTiny(this.discussionId)\n .addArgs({ '$filter': 'PersonId eq cast(' + person.personId() + ', Edm.Guid)' })\n .background()\n .firstOrDefaultPost(this.queryData);\n\n person.update(jsonPerson);\n }\n\n private onPersonChanged(personId: string) {\n this.source.update(person => person.personId() === personId);\n }\n}","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { PureComputed } from 'knockout';\r\nimport { CurrentUserManager } from 'managers/currentUser';\r\nimport { IWCCStorageManager } from 'managers/iStorage';\r\n\r\nexport interface DiscussionTranslationManagerConfig {\r\n discussionId: string\r\n}\r\n\r\n@injectable()\r\nexport default class DiscussionTranslationManager {\r\n isAllowed: PureComputed\r\n isAllowedToShow = ko.pureComputed(() => this.isAllowed() && settings.ui.isTranslationShown())\r\n\r\n constructor(\r\n @inject(wccModules.managerConfig) { discussionId }: DiscussionTranslationManagerConfig,\r\n @inject(wccModules.storage) storage: IWCCStorageManager\r\n ) {\r\n const userManager = storage.get(CurrentUserManager, { discussionId });\r\n const user = userManager.pluck('person');\r\n const isModeratorOrObserver = user.pluck('isModeratorOrObserver', false);\r\n\r\n this.isAllowed = ko.pureComputed(() => settings.translationLanguage != undefined && isModeratorOrObserver());\r\n }\r\n}","import { ILocalStorageScope } from \"../interfaces/localstorageScope\";\r\n\r\nconst isSupported = typeof Storage !== \"undefined\";\r\n\r\nconst keys = {\r\n newComment: (topicId: string, personId: string) => `topics/${topicId}/people/${personId}/comments/new`,\r\n newReply: (topicId: string, personId: string, commentId: string) => `topics/${topicId}/people/${personId}/comments/${commentId}/replies/new`\r\n}\r\n\r\nclass WCCLocalStorageManagerScope implements ILocalStorageScope {\r\n constructor(public key: string) { }\r\n\r\n get() {\r\n if (isSupported)\r\n return localStorage.getItem(this.key) ?? undefined;\r\n }\r\n\r\n set(value: string) {\r\n if (isSupported)\r\n localStorage.setItem(this.key, value);\r\n }\r\n\r\n remove() {\r\n if (isSupported)\r\n localStorage.removeItem(this.key);\r\n }\r\n}\r\n\r\nexport class WCCLocalStorageManager {\r\n keys = keys\r\n\r\n taskDescriptionShown = new WCCLocalStorageManagerScope('task/Content/shown');\r\n taskSecondaryDescriptionShown = new WCCLocalStorageManagerScope('task/secondarycontent/shown');\r\n\r\n pixabayQuery = new WCCLocalStorageManagerScope('pixabay/query');\r\n unsplashQuery = new WCCLocalStorageManagerScope('unsplash/query');\r\n\r\n newComment = (topicId: string, personId: string) => new WCCLocalStorageManagerScope(`topics/${topicId}/people/${personId}/comments/new`);\r\n newReply = (topicId: string, personId: string, commentId: string) => new WCCLocalStorageManagerScope(`topics/${topicId}/people/${personId}/comments/${commentId}/replies/new`);\r\n commentsFilters = (discussionId: string, userId: string) => new WCCLocalStorageManagerScope(`discussions/${discussionId}/commentsfilters/${userId}`);\r\n\r\n cameraId = (userId: string) => new WCCLocalStorageManagerScope(`users/${userId}/camera`);\r\n microphoneId = (userId: string) => new WCCLocalStorageManagerScope(`users/${userId}/microphone`);\r\n speakersId = (userId: string) => new WCCLocalStorageManagerScope(`users/${userId}/speakers`);\r\n\r\n youtubeVideosMetadata = new WCCLocalStorageManagerScope(`youtube/videos/metadata`);\r\n\r\n isSupported() {\r\n return isSupported;\r\n }\r\n\r\n getItem(key: string) {\r\n if (isSupported)\r\n return localStorage.getItem(key);\r\n\r\n return null;\r\n }\r\n\r\n setItem(key: string, value: string) {\r\n if (isSupported)\r\n localStorage.setItem(key, value);\r\n }\r\n\r\n removeItem(key: string) {\r\n if (isSupported)\r\n localStorage.removeItem(key);\r\n }\r\n}\r\n\r\nconst localStorageManager = new WCCLocalStorageManager();\r\n\r\nexport default localStorageManager;","import { Func } from 'interfaces/func';\r\nimport { SubscribableOrNullableValue } from 'knockout';\r\nimport { withEffects } from 'mixins/withEffects';\r\n\r\nexport default class NodeAttributeTracker {\r\n private effects = withEffects();\r\n\r\n constructor(node: SubscribableOrNullableValue, attribute: string, predicate: Func, oldValue: string | null]>, action: Action<[JQuery]>) {\r\n this.effects.register(node => {\r\n if (node != undefined) {\r\n const $node = $(node);\r\n\r\n const observer = new MutationObserver(mutations => {\r\n mutations.forEach(mutation => {\r\n if (predicate($node, mutation.oldValue))\r\n action($node);\r\n });\r\n });\r\n\r\n observer.observe(node, { attributes: true, attributeOldValue: true, attributeFilter: [attribute] });\r\n\r\n if (predicate($node, null))\r\n action($node);\r\n\r\n return () => observer.disconnect();\r\n }\r\n }, [node]);\r\n }\r\n\r\n dispose() {\r\n this.effects.dispose();\r\n }\r\n}","import { JSONTag, Tag } from 'models/tag';\r\nimport TagsManagerBase from './base';\r\n\nexport default class TopicPeopleTagsManager extends TagsManagerBase {\n topicId: string\n\n constructor(topicId: string) {\n super();\n\n this.topicId = topicId;\n }\n\n addTag(jsonTag: JSONTag): Promise {\n throw new Error('Unsupported operation');\n }\n\n removeTag(tag: Tag): Promise {\n throw new Error('Unsupported operation');\n }\n\n protected async load() {\n return await this.ctx.tagsService.queries.topicPeopleTags(this.topicId).background().toArray();\n }\n}","import { Observable } from 'knockout'\r\n\r\nexport interface JSONPersonTiny {\r\n PersonId?: string\r\n FullName?: string\r\n ImageURL?: string\r\n}\r\n\r\nexport default class PersonTiny {\r\n personId: Observable\r\n fullName: Observable\r\n imageURL: Observable\r\n\r\n constructor(config?: JSONPersonTiny) {\r\n this.personId = ko.observable(config?.PersonId);\r\n this.fullName = ko.observable(config?.FullName);\r\n this.imageURL = ko.observable(config?.ImageURL);\r\n }\r\n\r\n update(config: JSONPersonTiny) {\r\n this.personId(config.PersonId);\r\n this.fullName(config.FullName);\r\n this.imageURL(config.ImageURL);\r\n }\r\n}","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".wcc-dropdown{display:inline-block;position:relative;max-width:100%;vertical-align:text-bottom}.wcc-dropdown .dropdown-toggle{overflow:hidden}.wcc-dropdown .dropdown-toggle .wcc-link{color:#7a7a7a;border-bottom-color:#7a7a7a;font-size:13px;display:inline-block}.wcc-dropdown .dropdown-toggle .wcc-link:hover{color:#474747;border-bottom-color:#474747}.wcc-dropdown .dropdown-header{user-select:none}.wcc-dropdown li a{overflow:hidden;text-overflow:ellipsis}.wcc-dropdown.wcc-dropdown--custom-scroll .dropdown-menu::-webkit-scrollbar{width:8px;height:8px}.wcc-dropdown.wcc-dropdown--custom-scroll .dropdown-menu::-webkit-scrollbar-track{background-color:#e0e0dc;border-radius:4px}.wcc-dropdown.wcc-dropdown--custom-scroll .dropdown-menu::-webkit-scrollbar-thumb{background-color:#a0a0a0;border-radius:4px}.wcc-dropdown--black .dropdown-toggle .wcc-link{color:#262626;border-bottom-color:#262626}.wcc-dropdown--black .dropdown-toggle .wcc-link:hover{color:#000;border-bottom-color:#000}.wcc-dropdown--blue .dropdown-toggle .wcc-link{color:#5ca2dd;border-bottom-color:#5ca2dd}.wcc-dropdown--blue .dropdown-toggle .wcc-link:hover{color:#246faf;border-bottom-color:#246faf}.wcc-dropdown--grey .dropdown-toggle .wcc-link{color:#c6c6c6;border-bottom-color:#c6c6c6}.wcc-dropdown--grey .dropdown-toggle .wcc-link:hover{color:#939393;border-bottom-color:#939393}.wcc-dropdown--white .dropdown-toggle .wcc-link{color:#fff;border-bottom-color:#fff}.wcc-dropdown--white .dropdown-toggle .wcc-link:hover{color:#ccc;border-bottom-color:#ccc}.wcc-dropdown--text-m .dropdown-toggle .wcc-link{font-size:14px}.wcc-dropdown--text-xs .dropdown-toggle .wcc-link{font-size:12px}.wcc-dropdown--text-lg .dropdown-toggle .wcc-link{font-size:16px}.wcc-dropdown--dynamic .dropdown-menu{max-height:500px;max-width:360px;overflow-x:hidden}.wcc-dropdown--dynamic .dropdown-menu .divider:last-child{display:none}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".thread-editor-participants-picker{display:block}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".thread-editor-picker{display:block;width:100%}.thread-editor-picker__loader{font-size:16px;text-align:center;color:#f8f8f7}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".thread-editor{display:block;position:relative}.thread-editor__droparea{color:#7a7a7a;min-height:150px;margin:15px;border-width:2px;border-color:#a0a0a0}.thread-editor__droparea .droparea-label{font-size:25px}.thread-editor__droparea .glyphicons,.thread-editor__droparea .fas,.thread-editor__droparea .far,.thread-editor__droparea .fal{font-size:65px}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".thread-editor-visibility-button{display:inline-block;vertical-align:middle}.thread-editor-visibility-button .wcc-dropdown{z-index:1300}.thread-editor-visibility-button .wcc-dropdown .dropdown-toggle{overflow:visible}.thread-editor-visibility-button__select-button{padding:0 !important}.thread-editor-visibility-button__select-header{display:inline-flex;align-items:center;justify-content:center;min-width:105px;padding:4px 10px}.thread-editor-visibility-button__select-header>*{margin-right:5px}.thread-editor-visibility-button__select-header>*:last-child{margin-right:0}.thread-editor-visibility-button__select__title{font-weight:bold}.thread-editor-visibility-button__select__icon{font-size:11px}.thread-editor-visibility-button__select__icon--fixed{position:absolute;top:0;bottom:0;right:100%}.thread-editor-visibility-button__select-item{position:relative;display:flex}.thread-editor-visibility-button__select-item .thread-editor-visibility-button__select__icon{margin-right:7px;margin-top:2px}.thread-editor-visibility-button__select-item .thread-editor-visibility-button__select__icon--fixed{margin-right:3px;margin-top:3px}.thread-editor-visibility-button__select-item__body{white-space:normal;min-width:0}.thread-editor-visibility-button__select-item__title{font-weight:bold}.thread-editor-visibility-button__select-item__description{color:#7a7a7a;font-size:13px}.thread-editor-visibility-button__select-item__line-filler{white-space:nowrap;height:0;overflow:hidden}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".thread-editor-visibility-options{display:block}.select2-container--open{z-index:9300}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".thread-editor-visibility-tags-picker{display:block}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}