(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{"./collaboration/controllers/CommentsContextBarController.js":function(e,t,o){"use strict";o.r(t),function(e){o.d(t,"default",(function(){return p}));var r,i,n,a,l=o("./js/stores/get-store.js"),s=o("../../node_modules/mobx/lib/mobx.module.js");function d(e,t,o,r){o&&Object.defineProperty(e,t,{enumerable:o.enumerable,configurable:o.configurable,writable:o.writable,value:o.initializer?o.initializer.call(r):void 0})}function c(e,t,o,r,i){var n={};return Object.keys(r).forEach((function(e){n[e]=r[e]})),n.enumerable=!!n.enumerable,n.configurable=!!n.configurable,("value"in n||n.initializer)&&(n.writable=!0),n=o.slice().reverse().reduce((function(o,r){return r(e,t,o)||o}),n),i&&void 0!==n.initializer&&(n.value=n.initializer?n.initializer.call(i):void 0,n.initializer=void 0),void 0===n.initializer&&(Object.defineProperty(e,t,n),n=null),n}let p=(i=c((r=class{constructor(){d(this,"loaded",i,this),d(this,"loading",n,this),d(this,"loadingError",a,this)}setLoaded(e){this.loaded=e}setLoading(e){this.loading=e}setLoadingError(e){this.loadingError=e}get editor(){let e=Object(l.getStore)("ActiveWorkspaceSessionStore").activeEditor,t=Object(l.getStore)("EditorStore").find(e);return t&&t.model}get annotationOrder(){if(!this.editor)return;const t=this.editor.getAdditionalData("comments"),o=e.filter(t||[],(e=>e.anchor&&e.anchor.startsWith(`request/${this.editor.requestId}`)))||[],r=e.sortBy(o,"createdAt");return e.reduce(r.reverse(),((e,t)=>(e.includes(t.annotationId)||e.push(t.annotationId),e)),[])}}).prototype,"loaded",[s.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),n=c(r.prototype,"loading",[s.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),a=c(r.prototype,"loadingError",[s.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),c(r.prototype,"setLoaded",[s.action],Object.getOwnPropertyDescriptor(r.prototype,"setLoaded"),r.prototype),c(r.prototype,"setLoading",[s.action],Object.getOwnPropertyDescriptor(r.prototype,"setLoading"),r.prototype),c(r.prototype,"setLoadingError",[s.action],Object.getOwnPropertyDescriptor(r.prototype,"setLoadingError"),r.prototype),c(r.prototype,"editor",[s.computed],Object.getOwnPropertyDescriptor(r.prototype,"editor"),r.prototype),c(r.prototype,"annotationOrder",[s.computed],Object.getOwnPropertyDescriptor(r.prototype,"annotationOrder"),r.prototype),r)}.call(this,o("./node_modules/lodash/lodash.js"))}}]);